From 4e0c6363eb206399534b33991dbcc50118c311c0 Mon Sep 17 00:00:00 2001 From: Shaojin Wen Date: Wed, 24 Jun 2026 16:22:40 +0800 Subject: [PATCH] fix(sdk): raise browser daemon bundle budget to 126 KiB (#5801) The workspace permissions rules API (#5743) added workspacePermissions and the set/add/remove rule methods plus their types to the browser-facing DaemonClient (~718 bytes minified) without raising MAX_DAEMON_BROWSER_BUNDLE_BYTES. On top of the 125 KiB budget set in #5775, the daemon SDK bundle grew to 128651 bytes and exceeded the 128000-byte cap, breaking `npm run build` on main (E2E Tests fail at the bundle assertion). These are public class methods on DaemonClient and are not tree-shakeable, so the bytes ship regardless of consumers. Raise the cap one notch to 126 KiB (129024 bytes), following the established per-feature bump pattern. Co-authored-by: yiliang114 <1204183885@qq.com> --- packages/sdk-typescript/scripts/build.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/sdk-typescript/scripts/build.js b/packages/sdk-typescript/scripts/build.js index f917c2018e..558bcd5941 100755 --- a/packages/sdk-typescript/scripts/build.js +++ b/packages/sdk-typescript/scripts/build.js @@ -29,7 +29,9 @@ const rootDir = join(__dirname, '..'); // (install/update/enable/disable/uninstall/refresh/check update endpoints). // Bumped from 122KB to 124KB for daemon fork-session APIs/events. // Bumped from 124KB to 125KB for rewind/branch transcript/session APIs. -// Bumped from 125KB to 127KB for prompt clientId self-heal. +// Bumped from 125KB to 126KB for the workspace permissions rules API +// (workspacePermissions + set/add/remove rule methods + types, ~718 bytes). +// Bumped from 126KB to 127KB for prompt clientId self-heal. const MAX_DAEMON_BROWSER_BUNDLE_BYTES = 127 * 1024; rmSync(join(rootDir, 'dist'), { recursive: true, force: true });