diff --git a/src/plugins/contracts/inventory/bundled-capability-metadata.ts b/src/plugins/contracts/inventory/bundled-capability-metadata.ts index 1a4d8ef44c5..fb9f11c89f0 100644 --- a/src/plugins/contracts/inventory/bundled-capability-metadata.ts +++ b/src/plugins/contracts/inventory/bundled-capability-metadata.ts @@ -69,31 +69,7 @@ function readJsonRecord(filePath: string): Record | undefined { } } -function collectExcludedPackagedExtensionDirs(): ReadonlySet { - const packageJson = readJsonRecord(path.join(OPENCLAW_PACKAGE_ROOT, "package.json")); - const files = packageJson?.files; - if (!Array.isArray(files)) { - return new Set(); - } - const excluded = new Set(); - for (const entry of files) { - if (typeof entry !== "string") { - continue; - } - const match = /^!dist\/extensions\/([^/]+)\/\*\*$/u.exec(entry); - if (match?.[1]) { - excluded.add(match[1]); - } - } - return excluded; -} - -const EXCLUDED_PACKAGED_EXTENSION_DIRS = collectExcludedPackagedExtensionDirs(); - function readBundledCapabilityManifest(pluginDir: string): BundledCapabilityManifest | undefined { - if (EXCLUDED_PACKAGED_EXTENSION_DIRS.has(path.basename(pluginDir))) { - return undefined; - } const packageJson = readJsonRecord(path.join(pluginDir, "package.json")); const packageManifest = getPackageManifestMetadata(packageJson as PackageManifest); const extensions = normalizeBundledPluginStringList(packageManifest?.extensions);