From cb7b2850e4a2443a3ffdb042769a71aa82628b0c Mon Sep 17 00:00:00 2001 From: Chris Zhang Date: Sun, 3 May 2026 14:27:13 +0800 Subject: [PATCH] fix(build): externalize Feishu Lark SDK Externalize @larksuiteoapi/node-sdk from the bundled Feishu ESM runtime so packaged startup loads the SDK as a plugin-local runtime dependency instead of inlining the SDK's ESM __dirname path. Adds changelog credit and a tsdown-config regression assertion. Fixes #76291. Fixes #76494. Co-authored-by: Chris Zhang <4436110+zqchris@users.noreply.github.com> --- CHANGELOG.md | 1 + src/infra/tsdown-config.test.ts | 8 +++++++- tsdown.config.ts | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c139b430927..bc57db3f96c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ Docs: https://docs.openclaw.ai - Agents/sessions: keep delayed `sessions_send` A2A replies alive after soft wait-window timeouts, while preserving terminal run timeouts and avoiding stale target replies in requester sessions. Fixes #76443. Thanks @ryswork1993 and @vincentkoc. - Config/doctor: cap `.clobbered.*` forensic snapshots per config path and serialize snapshot writes so repeated `doctor --fix` recovery loops cannot flood the config directory. Fixes #76454; carries forward #65649. Thanks @JUSTICEESSIELP, @rsnow, and @vincentkoc. - Feishu: suppress duplicate text when replies send native voice media while preserving captions for ordinary audio files and falling back to text plus attachment links when voice uploads fail. +- Feishu: keep packaged Feishu startup from bundling the Lark SDK's ESM `__dirname` path by loading the SDK as a plugin-local runtime dependency. Fixes #76291 and #76494. (#76392) Thanks @zqchris. - Channels/secrets: resolve SecretRef-backed channel credentials through external plugin secret contracts after the plugin split, covering runtime startup, target discovery, webhook auth, disabled-account enumeration, and late-bound web_search config. Fixes #76371. (#76449) Thanks @joshavant and @neeravmakwana. - Docker/Gateway: pass Docker setup `.env` values into gateway and CLI containers and preserve exec SecretRef `passEnv` keys in managed service plans, so 1Password Connect-backed Discord tokens keep resolving after doctor or plugin repair. Thanks @vincentkoc. - Control UI/WebChat: explain compaction boundaries in chat history and link directly to session checkpoint controls so pre-compaction turns no longer look silently lost after refresh. Fixes #76415. Thanks @BunsDev. diff --git a/src/infra/tsdown-config.test.ts b/src/infra/tsdown-config.test.ts index b67b9e6fc29..40f7a065694 100644 --- a/src/infra/tsdown-config.test.ts +++ b/src/infra/tsdown-config.test.ts @@ -147,13 +147,19 @@ describe("tsdown config", () => { if (typeof neverBundle === "function") { expect(neverBundle("@lancedb/lancedb")).toBe(true); + expect(neverBundle("@larksuiteoapi/node-sdk")).toBe(true); expect(neverBundle("@matrix-org/matrix-sdk-crypto-nodejs")).toBe(true); expect(neverBundle("matrix-js-sdk/lib/client.js")).toBe(true); expect(neverBundle("qrcode-terminal/lib/main.js")).toBe(true); expect(neverBundle("not-a-runtime-dependency")).toBe(false); } else { expect(neverBundle).toEqual( - expect.arrayContaining(["@lancedb/lancedb", "matrix-js-sdk", "qrcode-terminal"]), + expect.arrayContaining([ + "@lancedb/lancedb", + "@larksuiteoapi/node-sdk", + "matrix-js-sdk", + "qrcode-terminal", + ]), ); } expect(typeof external).toBe("function"); diff --git a/tsdown.config.ts b/tsdown.config.ts index 10e7f482677..3f6bc9fee85 100644 --- a/tsdown.config.ts +++ b/tsdown.config.ts @@ -160,6 +160,7 @@ const bundledPluginFile = (pluginId: string, relativePath: string) => `${bundledPluginRoot(pluginId)}/${relativePath}`; const explicitNeverBundleDependencies = [ "@lancedb/lancedb", + "@larksuiteoapi/node-sdk", "@matrix-org/matrix-sdk-crypto-nodejs", "matrix-js-sdk", "qrcode-terminal",