fix(sdk): raise browser daemon bundle budget to 126 KiB (#5801)
Some checks are pending
Qwen Code CI / Classify PR (push) Waiting to run
Qwen Code CI / Test (ubuntu-latest, Node 22.x) (push) Blocked by required conditions
Qwen Code CI / Test (macos-latest, Node 22.x) (push) Blocked by required conditions
Qwen Code CI / Test (windows-latest, Node 22.x) (push) Blocked by required conditions
Qwen Code CI / Post Coverage Comment (push) Blocked by required conditions
Qwen Code CI / CodeQL (push) Blocked by required conditions
Qwen Code CI / Integration Tests (CLI, No Sandbox) (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run

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>
This commit is contained in:
Shaojin Wen 2026-06-24 16:22:40 +08:00 committed by GitHub
parent 3fbb5c1a26
commit 4e0c6363eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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