diff --git a/scripts/e2e/npm-telegram-live-docker.sh b/scripts/e2e/npm-telegram-live-docker.sh index d2f13c392dc..aadc454d06f 100755 --- a/scripts/e2e/npm-telegram-live-docker.sh +++ b/scripts/e2e/npm-telegram-live-docker.sh @@ -249,6 +249,12 @@ for (const packageJsonPath of [ types: "./extensions/qa-channel/src/protocol.ts", default: "./extensions/qa-channel/src/protocol.ts", }; + if (!pkg.exports["./plugin-sdk/gateway-runtime"]) { + pkg.exports["./plugin-sdk/gateway-runtime"] = { + types: "./dist/plugin-sdk/browser-node-runtime.d.ts", + default: "./dist/plugin-sdk/browser-node-runtime.js", + }; + } fs.writeFileSync(packageJsonPath, `${JSON.stringify(pkg, null, 2)}\n`); } NODE diff --git a/test/scripts/npm-telegram-live.test.ts b/test/scripts/npm-telegram-live.test.ts index 8d51969946f..493077eb333 100644 --- a/test/scripts/npm-telegram-live.test.ts +++ b/test/scripts/npm-telegram-live.test.ts @@ -74,6 +74,8 @@ describe("package Telegram live Docker E2E", () => { expect(script).toContain('"./extensions/qa-channel/api.ts"'); expect(script).toContain('pkg.exports["./plugin-sdk/qa-channel-protocol"]'); expect(script).toContain('"./extensions/qa-channel/src/protocol.ts"'); + expect(script).toContain('pkg.exports["./plugin-sdk/gateway-runtime"]'); + expect(script).toContain('"./dist/plugin-sdk/browser-node-runtime.js"'); expect(gatewayRpcClient).toContain('from "openclaw/plugin-sdk/gateway-runtime"'); expect(qaRuntimeApi).toContain('from "openclaw/plugin-sdk/gateway-runtime"'); expect(gatewayRpcClient).not.toContain('from "openclaw/plugin-sdk/browser-node-runtime"');