diff --git a/CHANGELOG.md b/CHANGELOG.md index 75e88ea0956..6a34a812208 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ Docs: https://docs.openclaw.ai - Google/Gemini: normalize retired nested Gemini 3 Pro Preview ids while converting manifest catalog rows into emitted provider config, so `google/gemini-3.1-pro-preview` is used for testing instead of `google/gemini-3-pro-preview`. - Native apps: advertise the Gateway protocol compatibility range so chat and node sessions can connect to v3 gateways after additive v4 client updates. +- Gateway/agents: keep stale `sessions_send` ACP manager and `web_fetch` runtime chunks importable after package updates, preventing live gateways from breaking before restart. Fixes #78804. Thanks @Gomesy72. - Gateway: avoid synchronous restart-sentinel state probes during post-attach startup, preventing slow Windows or redirected state directories from blocking channel turns. Fixes #79264. Thanks @liyi58. - Agents/auth: update successful model auth profile status with one locked store write, reducing post-model reply latency from duplicate `auth-profiles.json` saves. Thanks @mcaxtr. - Agents/image: honor explicit `image` tool model overrides even when `agents.defaults.imageModel` is unset, restoring one-off vision calls for configured multimodal providers. Fixes #79341. Thanks @haumanto. diff --git a/scripts/runtime-postbuild.mjs b/scripts/runtime-postbuild.mjs index d039ea5b3f8..8161268de29 100644 --- a/scripts/runtime-postbuild.mjs +++ b/scripts/runtime-postbuild.mjs @@ -48,6 +48,10 @@ const LEGACY_ROOT_RUNTIME_COMPAT_ALIASES = [ ["provider-dispatcher-6EQEtc-t.js", "provider-dispatcher.runtime.js"], ["provider-dispatcher-BpL2E92x.js", "provider-dispatcher.runtime.js"], ["provider-dispatcher-JG96SkLX.js", "provider-dispatcher.runtime.js"], + // v2026.5.4 tool/control-plane lazy chunks. These predate the stable + // nested dist entries, but live gateways may still import them after update. + ["manager-DzRWrKSA.js", "acp/control-plane/manager.js"], + ["runtime-CeGN4XUC.js", "web-fetch/runtime.js"], ]; const LEGACY_PLUGIN_INSTALL_RUNTIME_MARKERS = [ "scanPackageInstallSource", diff --git a/src/infra/tsdown-config.test.ts b/src/infra/tsdown-config.test.ts index f172e21a961..1ffb345e103 100644 --- a/src/infra/tsdown-config.test.ts +++ b/src/infra/tsdown-config.test.ts @@ -85,6 +85,7 @@ describe("tsdown config", () => { expect(entryKeys(distGraph)).toEqual( expect.arrayContaining([ + "acp/control-plane/manager", "agents/auth-profiles.runtime", "agents/model-catalog.runtime", "agents/models-config.runtime", @@ -101,6 +102,7 @@ describe("tsdown config", () => { "plugins/provider-discovery.runtime", "plugins/provider-runtime.runtime", "plugins/runtime/index", + "web-fetch/runtime", "plugin-sdk/compat", "plugin-sdk/index", bundledEntry("active-memory"), diff --git a/test/scripts/runtime-postbuild.test.ts b/test/scripts/runtime-postbuild.test.ts index bd059376aed..f2fdb6b0bb4 100644 --- a/test/scripts/runtime-postbuild.test.ts +++ b/test/scripts/runtime-postbuild.test.ts @@ -654,6 +654,32 @@ describe("runtime postbuild static assets", () => { ); }); + it("writes compatibility aliases for previous tool and ACP manager chunk names", async () => { + const rootDir = createTempDir("openclaw-runtime-postbuild-"); + const distDir = path.join(rootDir, "dist"); + await fs.mkdir(path.join(distDir, "acp", "control-plane"), { recursive: true }); + await fs.mkdir(path.join(distDir, "web-fetch"), { recursive: true }); + await fs.writeFile( + path.join(distDir, "acp", "control-plane", "manager.js"), + "export const getAcpSessionManager = true;\n", + "utf8", + ); + await fs.writeFile( + path.join(distDir, "web-fetch", "runtime.js"), + "export const resolveWebFetchDefinition = true;\n", + "utf8", + ); + + writeLegacyRootRuntimeCompatAliases({ rootDir }); + + expect(await fs.readFile(path.join(distDir, "manager-DzRWrKSA.js"), "utf8")).toBe( + 'export * from "./acp/control-plane/manager.js";\n', + ); + expect(await fs.readFile(path.join(distDir, "runtime-CeGN4XUC.js"), "utf8")).toBe( + 'export * from "./web-fetch/runtime.js";\n', + ); + }); + it("writes legacy CLI exit compatibility chunks", async () => { const rootDir = createTempDir("openclaw-runtime-postbuild-"); diff --git a/tsdown.config.ts b/tsdown.config.ts index f22aa6d6114..d0b215c826c 100644 --- a/tsdown.config.ts +++ b/tsdown.config.ts @@ -213,6 +213,7 @@ function buildCoreDistEntries(): Record { "agents/auth-profiles.runtime": "src/agents/auth-profiles.runtime.ts", "agents/model-catalog.runtime": "src/agents/model-catalog.runtime.ts", "agents/models-config.runtime": "src/agents/models-config.runtime.ts", + "acp/control-plane/manager": "src/acp/control-plane/manager.ts", "cli/gateway-lifecycle.runtime": "src/cli/gateway-cli/lifecycle.runtime.ts", "provider-dispatcher.runtime": "src/auto-reply/reply/provider-dispatcher.runtime.ts", "server-close.runtime": "src/gateway/server-close.runtime.ts", @@ -228,6 +229,7 @@ function buildCoreDistEntries(): Record { "infra/boundary-file-read": "src/infra/boundary-file-read.ts", "plugins/provider-discovery.runtime": "src/plugins/provider-discovery.runtime.ts", "plugins/provider-runtime.runtime": "src/plugins/provider-runtime.runtime.ts", + "web-fetch/runtime": "src/web-fetch/runtime.ts", "plugins/public-surface-runtime": "src/plugins/public-surface-runtime.ts", "plugins/loader": "src/plugins/loader.ts", "plugins/sdk-alias": "src/plugins/sdk-alias.ts",