diff --git a/extensions/discord/package.json b/extensions/discord/package.json index a1e89867758..efd655226ca 100644 --- a/extensions/discord/package.json +++ b/extensions/discord/package.json @@ -68,6 +68,9 @@ "build": { "openclawVersion": "2026.5.1-beta.1" }, + "bundle": { + "includeInCore": true + }, "release": { "publishToClawHub": true, "publishToNpm": true diff --git a/scripts/e2e/lib/kitchen-sink-plugin/assertions.mjs b/scripts/e2e/lib/kitchen-sink-plugin/assertions.mjs index 4d9ff06da4e..5a010330981 100644 --- a/scripts/e2e/lib/kitchen-sink-plugin/assertions.mjs +++ b/scripts/e2e/lib/kitchen-sink-plugin/assertions.mjs @@ -148,7 +148,6 @@ const INVALID_PROBE_DIAGNOSTIC_SURFACE_MODES = new Set(["full", "conformance", " function assertExpectedDiagnostics(surfaceMode, errorMessages) { const expectedErrorMessages = new Set([ - 'agent harness "kitchen-sink-agent-harness" registration missing required runtime methods', 'channel "kitchen-sink-channel-probe" registration missing required config helpers', "cli registration missing explicit commands metadata", "only bundled plugins can register Codex app-server extension factories", diff --git a/src/infra/package-dist-inventory.test.ts b/src/infra/package-dist-inventory.test.ts index e810e35fa34..57f699d1acb 100644 --- a/src/infra/package-dist-inventory.test.ts +++ b/src/infra/package-dist-inventory.test.ts @@ -250,6 +250,37 @@ describe("package dist inventory", () => { }); }); + it("keeps publishable core-package runtime plugin dist trees in the inventory", async () => { + await withTempDir({ prefix: "openclaw-dist-inventory-core-runtime-" }, async (packageRoot) => { + const coreRuntime = path.join(packageRoot, "dist", "extensions", "core-chat", "index.js"); + const corePackageJson = path.join(packageRoot, "extensions", "core-chat", "package.json"); + + await fs.mkdir(path.dirname(coreRuntime), { recursive: true }); + await fs.mkdir(path.dirname(corePackageJson), { recursive: true }); + await fs.writeFile(coreRuntime, "export {};\n", "utf8"); + await fs.writeFile( + corePackageJson, + JSON.stringify({ + name: "@openclaw/core-chat", + openclaw: { + bundle: { + includeInCore: true, + }, + release: { + publishToClawHub: true, + publishToNpm: true, + }, + }, + }), + "utf8", + ); + + await expect(writePackageDistInventory(packageRoot)).resolves.toEqual([ + "dist/extensions/core-chat/index.js", + ]); + }); + }); + it("reports runtime-created install staging dirs during installed dist verification", async () => { await withTempDir({ prefix: "openclaw-dist-inventory-stage-" }, async (packageRoot) => { const realFile = path.join(packageRoot, "dist", "real-AbC123.js"); diff --git a/src/infra/package-dist-inventory.ts b/src/infra/package-dist-inventory.ts index ef0c0d3b2e9..432788f9e70 100644 --- a/src/infra/package-dist-inventory.ts +++ b/src/infra/package-dist-inventory.ts @@ -104,6 +104,14 @@ function isPublishableExternalizedBundledManifest(value: unknown): boolean { if (!release || typeof release !== "object") { return false; } + const bundle = (openclaw as { bundle?: unknown }).bundle; + if ( + bundle && + typeof bundle === "object" && + (bundle as { includeInCore?: unknown }).includeInCore === true + ) { + return false; + } const typedRelease = release as { publishToClawHub?: unknown; publishToNpm?: unknown }; return typedRelease.publishToNpm === true || typedRelease.publishToClawHub === true; }