Repository navigation
Conversation
… it (#3072) Number("") and Number(" ") are 0, and 0 means "no timeout", so an unset shell variable passed as --connect-timeout "$X" silently turned off the connect safeguard and a run against a hung server never ended. Parse a blank value as NaN, the idiom the --load-* parsers already use, so it is the same usage error as any other non-number. Applied to both the one-shot CLI and mcpdo's connect parser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
A flag such as --cursor or --tool-arg passed to a method that does not read it was accepted and ignored with exit 0, so a script paging tools/list with --cursor fetched the same page forever. A table now maps each method-specific flag to the methods runMethod actually consumes it for, and any other combination is a usage error naming those methods. The check runs ahead of the short-circuit returns, as --strict does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
--connect-timeout (CLI and mcpdo) and --wait-for-auth now reject a value above 2^31-1 ms as a usage error. A connectionTimeout from a config file, catalog or Server Settings is clamped to that bound by InspectorClient.connect(), since those values are not validated at read time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
JSON.parse turns 1e400 into Infinity, which JSON.stringify writes as null, so the tool silently received null. Run the same finite-number check --tool-arg already uses and fail before connecting, with mcpdo's wording and without echoing the value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
Only the key (or header name) has to be non-empty. `-e KEY=` sets KEY to
the empty string on web, TUI, CLI and mcpdo, as a config file's
`"env": {"KEY": ""}` already does (#3066). `--tool-arg k=` (and
`--metadata` / `--tool-metadata` / `--event-arg`, which share the parser)
sends "" on the CLI and mcpdo, matching `--prompt-args q=`. `--header
"X:"` sends an empty field value, which RFC 9110 allows. A missing `=` or
colon, and an empty key or name, are still rejected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: cliffhall <cliff@futurescale.com>
…mes (#3070) A JSON-RPC error response now exits 5 as server_error, carrying jsonRpcCode/jsonRpcData; a stdio server that cannot be spawned or exits before answering exits 14 as server_exited; a non-http(s) server URL is refused up front as a usage error instead of exiting 4 (retryable). mcpdo relays the new envelope fields across the daemon socket. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
`--tool-arg` (CLI and mcpdo) and mcpdo's `key:=value` positionals used to JSON-parse every value at parse time, so `zip=10001` reached a string-typed property as a number and was rejected. The values now stay raw text until `tools/call` / `--load` has looked the tool up, and a shared core helper (core/cli/utils/tool-arg-types.ts) types them by the declared property type: string keeps the text (a whole JSON string literal is still unquoted), number/integer/boolean/object/array go through the client's existing JSON parse and must match, and undeclared or union-typed keys keep the old parse. --tool-args-json and inline JSON stay verbatim. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
…3068) `JSON.parse` turns every number into a float64, so an integer past ±2^53 in --tool-arg, --tool-args-json, --metadata, --tool-metadata or mcpdo's key:=value / inline-JSON positionals reached the server rounded, with exit 0. A shared `parseJsonExact` (core/cli/utils/exact-json.ts) uses the reviver's `context.source` to detect an integer literal that does not survive the conversion, and both clients reject it as a usage error naming the key but never the value, as they already do for 1e400. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
… refusal (#3070) Address Copilot's first review on #3086: a ConnectionClosed counts as a server exit only at the top level (a wrapped HTTP subscription close is not one); a ProtocolError is classified before the HTTP/auth checks so an application-defined 401/429 code keeps its JSON-RPC fields; the scheme refusal is its own error type so an aborted:// scheme cannot match the unreachable pattern; and mapJsonStrings copies into a null-prototype record so an own __proto__ key survives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
…3075) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
…off (#3073) Both short-circuit modes return before any method runs, so a method flag matching the given --method was still ignored there. Refuse every method-specific flag with either mode, and run the check after the --load validations so a load run keeps its own conflict messages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
`JSON.stringify` writes a double's shortest round-trip form, so an exactly representable literal like 1000000000000000128 still reached the wire as 1000000000000000100. Compare the source digits against the integer the serialized token denotes, exponent notation included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
InspectorClient raises a -32602 ProtocolError itself when a successful tool result fails its outputSchema; the server sent no error code. Raise it as a marked ToolOutputValidationError subclass, so every existing ProtocolError consumer is unchanged, and exclude it from server_error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
The reviver walk recurses where a plain JSON.parse does not, so very deep but valid JSON now throws RangeError, and the key=value parsers' catch-all fallback would have sent it as a string. A shared `parseJsonOrString` takes the fallback on SyntaxError only, turns an inexact integer into the usage error, and propagates anything else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
…t' into v2/feat/3075-schema-typed-tool-args
… into v2/feat/3075-schema-typed-tool-args
…-trip' into v2/feat/3075-schema-typed-tool-args
… into v2/feat/3075-schema-typed-tool-args Signed-off-by: cliffhall <cliff@futurescale.com> # Conflicts: # clients/cli/README.md
…hod-flags' into v2/feat/3075-schema-typed-tool-args
…rs' into v2/feat/3075-schema-typed-tool-args
Rollup for tracker #3080: #3075 conflicted textually with every sibling in clients/cli/src/cli.ts and with #3068 in mcpdo's parsers, so this branch carries the resolution and merges last. - Imports: keep #3075's tool-arg-types imports beside #3068's exact-json ones and #3074's suggest-flag import. - mcpdo: #3075 moved --tool-arg / key:=value parsing into autoParseValue; it now passes the key so #3068's integer-precision guard applies on that path (parseToolArgValue included), with a regression test. - collectToolArgText accepted no empty value, which would have undone #3069 for --tool-arg once both merged; k= is now the empty string, which a string or undeclared property receives as "" and a typed non-string property refuses as a usage error (tests for both). - CLI README --tool-arg row: #3075's schema typing plus #3069's k= and #3068's integer-precision sentences. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
…t' into v2/chore/3080-rollup
… into v2/chore/3080-rollup
…-trip' into v2/chore/3080-rollup
… into v2/chore/3080-rollup
…hod-flags' into v2/chore/3080-rollup
…rs' into v2/chore/3080-rollup
…rs' into v2/chore/3080-rollup
…rgs' into v2/chore/3080-rollup
Member
Author
|
Closing as intended. CI is green on this rollup (build, coverage, windows, DCO, CodeQL), and all eight constituent branches merged onto |
This was referenced Nov 30, 2026
CLI --tool-args-json silently sends 1e400 as null (round-trip guard missing; mcpdo rejects it)
#3067
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3080
Temporary rollup PR. Do not merge. It merges every open PR for tracker #3080's sub-issues onto
v2/main. Its only job is to prove they work together without conflict. Once CI is green it will be closed, and the constituent PRs will be merged individually in this order:--connect-timeoutis a usage error--tool-args-jsonround-trip guard-e KEY=(empty value) is rejected on all four clients, though--configpasses an empty env value through #3066)--tool-arg. It now carries the other seven branches, because it conflicted with each of them incli.ts. It also makes two behaviour fixes that only matter once these PRs are combined:k=is accepted by CLI: coerce --tool-arg values using the tool's inputSchema (zip=10001 is sent as a number to a string field) #3075's collector, so CLI/mcpdo reject empty values for --tool-arg k=, -e VAR= and --header "X:" (--prompt-args q= and config env accept them) #3069 isn't undone.#3074 (PR #3079) already merged into
v2/main.No Copilot review is requested on this PR; each constituent PR completed its own review loop.
🤖 Generated with Claude Code