fix: keep legacy lazy chunks importable after updates (#80478)

This commit is contained in:
Peter Steinberger
2026-05-11 02:10:19 +01:00
committed by GitHub
parent 922468c4fa
commit 88943e14f9
5 changed files with 35 additions and 0 deletions

View File

@@ -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.

View File

@@ -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",

View File

@@ -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"),

View File

@@ -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-");

View File

@@ -213,6 +213,7 @@ function buildCoreDistEntries(): Record<string, string> {
"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<string, string> {
"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",