fix(agent-runner): validate clean marketplace onboarding

This commit is contained in:
huanghuoguoguo
2026-07-15 07:52:43 +08:00
parent 99d9c227f9
commit 32216a82f5
10 changed files with 461 additions and 41 deletions
+15 -4
View File
@@ -110,10 +110,21 @@ export class CloudServiceClient extends BaseHttpClient {
'/api/v1/marketplace/extensions/search',
data,
)
.then((resp) => ({
plugins: resp?.extensions || [],
total: resp?.total || 0,
}))
.then((resp) => {
const extensions = resp?.extensions || [];
// Runner installation needs a concrete version. Older Space
// deployments omit it from the unified extension response.
if (
data.component_filter &&
extensions.some((extension) => !extension.latest_version)
) {
return this.searchMarketplaceExtensionsLegacy(data);
}
return {
plugins: extensions,
total: resp?.total || 0,
};
})
.catch(() => this.searchMarketplaceExtensionsLegacy(data));
}