qwen-code/packages
Yufeng He ebf29f1187
fix(core): parse QWEN_SERVE_MCP_CLIENT_BUDGET strictly as a decimal integer (#5752)
* fix(core): parse QWEN_SERVE_MCP_CLIENT_BUDGET strictly as a decimal integer

readBudgetFromEnv used Number(rawBudget), so Number("0x10")=16, Number("1e2")=100
and Number("1.0")=1 all passed isInteger and were silently accepted as a budget.
Require plain decimal digits (/^\d+$/) like the other integer env vars, keeping
the existing stderr breadcrumb for invalid values.

* fix(acp): apply strict budget-env parsing to createWorkspaceMcpBudget

The pooled path parsed QWEN_SERVE_MCP_CLIENT_BUDGET with a loose Number() +
isInteger, so 0x10, 1e2 and 1.0 silently set a budget while the manager's
readBudgetFromEnv (already strict) rejected them. Use the same /^\d+$/ +
isSafeInteger parse and emit the same stderr breadcrumb on invalid input.
Export the function and cover the parsing with unit tests.

* docs: sync readBudgetFromEnv JSDoc with the stderr breadcrumb

The doc still said invalid budget values are silently ignored, but the
function now writes a stderr breadcrumb when it rejects one. Match the
doc to the behavior.
2026-06-24 13:51:44 +08:00
..
acp-bridge fix(daemon): Reject stale prompt client admission (#5784) 2026-06-24 11:04:08 +08:00
audio-capture chore(release): v0.19.1 [skip ci] 2026-06-23 17:26:10 +08:00
channels fix(core): Align MCP OAuth guidance and docs (#5589) 2026-06-24 07:09:53 +08:00
cli fix(core): parse QWEN_SERVE_MCP_CLIENT_BUDGET strictly as a decimal integer (#5752) 2026-06-24 13:51:44 +08:00
core fix(core): parse QWEN_SERVE_MCP_CLIENT_BUDGET strictly as a decimal integer (#5752) 2026-06-24 13:51:44 +08:00
desktop feat(desktop): show file preview in a resizable side panel instead of fullscreen (#5730) 2026-06-23 02:38:48 +00:00
sdk-java fix(core): Align MCP OAuth guidance and docs (#5589) 2026-06-24 07:09:53 +08:00
sdk-python doc[sdk-python] Expand Python SDK usage documentation (#3995) 2026-05-12 15:27:00 +08:00
sdk-typescript fix(daemon): Reject stale prompt client admission (#5784) 2026-06-24 11:04:08 +08:00
vscode-ide-companion fix(core): require integer microcompaction keep count (#5652) 2026-06-24 07:05:31 +08:00
web-shell feat(serve): voice dictation over the daemon for the Web Shell (#5755) 2026-06-24 11:32:43 +08:00
web-templates chore(release): v0.19.1 [skip ci] 2026-06-23 17:26:10 +08:00
webui refactor(web-shell): restructure chat UI (#5775) 2026-06-23 22:43:19 +08:00
zed-extension chore(deps): upgrade ink 6.2.3 → 7.0.2 + bump Node engine to 22 (#3860) 2026-05-11 17:29:50 +08:00