fix(plugins): load official hosted plugins from bundled resources
This commit is contained in:
@@ -621,8 +621,12 @@ export async function verifyBundledCodingPluginResources({
|
||||
}
|
||||
|
||||
const sdkAssetPaths = packageFiles.filter((file) => SDK_ASSET_PATH_PATTERN.test(file));
|
||||
if (sdkAssetPaths.length === 0) throw new Error(`Packaged coding plugin has no SDK assets: ${packageName}`);
|
||||
const adapterId = packagedCapability.adapterId;
|
||||
if (packagedCapability.schemaVersion === 1 && sdkAssetPaths.length === 0) {
|
||||
throw new Error(`Packaged schema-1 coding plugin has no SDK assets: ${packageName}`);
|
||||
}
|
||||
const adapterId = packagedCapability.schemaVersion === 2
|
||||
? packagedCapability.pluginId
|
||||
: packagedCapability.adapterId;
|
||||
const tools = Array.isArray(packagedCapability.tools) ? packagedCapability.tools : [];
|
||||
const toolNames = tools.map((tool) => tool?.name);
|
||||
if (typeof adapterId !== 'string' || adapterId.length === 0 || tools.length === 0
|
||||
|
||||
Reference in New Issue
Block a user