When header detection admitted no route for a file, open_binary and
inspect_artifact refused it with the generic "select a supported,
well-formed target", leaving no next step for a headerless firmware or
memory image. The explicit raw-binary load is the only route that admits
such a file, so the producer now names it with its required architecture
and entry_point. inspect_artifact shares the same detection, so it is
not offered as a way to identify the file.
Refs #15319
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* test(domain): assert the specific refusal behind each bare toThrow
Replace bare toThrow() in domain tests with the Zod issue path and code, the AnalysisInputError issue path and reason, the parse failure kind and message, or the contract message each refusal reports. Make the Evidence admission loop state which candidates the schema accepts so its rejection branch is known to run.
* test(domain): assert the BigInt serialization refusal message
* test(domain): assert the failing union branch behind root union refusals
An invalid escape in an unquoted Apktool 3 string reached JSON.parse and surfaced as a bare SyntaxError ("Bad Unicode escape in JSON at position 10") that did not name apktool.yml. Report it as the parser's existing invalid Apktool 3 string refusal, keeping the JSON error as its cause, and assert each malformed-field case's refusal.
* fix(deb)!: deliver inspect_deb_package within the agent result budget
inspect_deb_package registered a retained summary view but declared no
detail selector and no summary delivery, so a large .deb inventory was
always inlined whole (about 790 KB for 5000 files).
The tool now takes detail like inspect_nuget_nupkg: omitted detail returns
complete Evidence within delivery.agent_result_budget_bytes and the retained
summary otherwise, and the CLI gains --detail and --evidence_output.
BREAKING CHANGE: inspect_deb_package with detail omitted now returns its
retained summary when complete Evidence exceeds the agent result budget in
a session that can page it. Pass detail "complete" (CLI --detail complete)
for complete inline delivery.
Refs #15326
* test(deb): read the retained parent without reopening the package
The desktop doctor test injected platform linux, but project registrations
are read only for the platform REA runs on, so on macOS the project
opencode.json was skipped and the test failed; Linux CI matched by chance.
Use the host platform, as the file's other project tests do.
The Electron loader-history case without a proven first loader asserted
nothing. Every unchanged history leaves the frame tree attach-limited, so
assert it for all of them.
* fix(errors)!: make retry_class the only retry field of a target failure
A target failure reported two retry fields: its own `retry` hint
(`none | backoff | after_change`) and the `retry_class` every error
carries. They mapped one to one, so readers had to reconcile both.
`retry_class` is now the single owner: the target-failure table declares
it directly, the projection no longer emits `retry`, the error schema no
longer accepts it, and the CLI recovery rewrite reads `retry_class`.
BREAKING CHANGE: target failures no longer include `retry`, and the
error schema rejects it. Read `retry_class` instead: `backoff` is
`same_call`, `after_change` is `change_first` and `none` is `never`.
* test(errors): readers reject the removed target-failure retry field
* fix(errors): report a missing selected file with its next step, not the schema
Nine readers hand-built their own copy of the selected-file refusal
(access denied, or an input issue for ENOENT, ENOTDIR, ELOOP and the
other path errnos) instead of using the shared
projectSelectedArtifactFileFailure. The copies left out the conforming
outcome and next step, so a well-formed path to a missing file was
presented as a schema mismatch with inspect_input_contract.
API contract, APK signature, byte entropy, Electron fuse, Playwright
trace, NTFS journal, release exposure, Android mapping and web capture
reads now use the shared owner. A missing OCI image-layout directory
names a directory as its next step.
The first-contact sweep lists none of these as known failures any more;
#15372 already fixed the other 35 entries and the stale-revision replay.
Refs #15312
* fix(errors): give the remaining schema-valid refusals their next step
These refusals accepted a well-formed request and still sent the caller
back to the input schema:
- update_analysis_settings with a stale expected_revision now names
inspect_analysis_settings and the current revision.
- inspect_electron_fuses on an app or file that is not Electron names
what to select; capture_electron_scenario reports the same refusal
on executable_path instead of path.
- inspect_analysis_view on a multi-record Evidence bundle without
source.evidence_id, or with an absent one, says to pick a listed id.
- extract_uefi_firmware with an unmapped or ambiguous target names
inspect_uefi_firmware or target.source_stream.
- inspect_labview_artifact on a file without LabVIEW RSRC data names
what to select.
Refs #15312
* fix(session): never overwrite the open target with a snapshot or bundle
* test(session): cover a hard-linked target and own the test directory cleanup
* fix(mcp): serve refinement-only input rules agents need before the first call
- UEFI paths use the shared absolute-path schema, so the served schema
carries the absolute-path pattern instead of a refinement.
- Blank-text checks (guided workflow ids, prompt arguments, guidance
queries, residual-unknown text) are a served `\S` pattern, not a trim
refinement.
- Input groups name the selector values that open them, for example
`operation=architectures` for inspect_with_objdump.
- inspect_native_data_type states its one-of rule in the tool description,
from the same constant the refusal uses.
- The served-schema parity sweep credits a cross-field rule when the
description states the refusal or the selecting input group, with
controls, and drops the fixed refinement gaps.
Refs #15311
* fix(mcp): serve endpoint and literal rules on reduced schemas; state wider patterns
- A reduced schema over budget drops name-derived fallback descriptions
before its scalar rules, so analyze_web_bundle keeps its bounds.
- Reduced root properties that are unions of literals serve their values
as one enum (detail, format).
- CDP and Inspector endpoint schemas declare the explicit-port envelope
that explicitEndpointAuthority reads, as their pattern.
- A pattern the portable grammar can only serve wider (`\S`, the adb
serial) is also stated exactly in guidance.
- The parity sweep drops the endpoint and literal gaps; the generated
property accepts the host-independent absolute-path envelope.
Refs #15311
* fix(ida): bound each MCP HTTP reply message like stdio frames
IDA over stdio refuses a reply message above 64 MiB with max_response_bytes,
but IDA over HTTP read a successful JSON reply whole with readText() and
JSON.parse, and an SSE stream without any limit. JEB and the agentenv driver
share the same HTTP response validator and were equally unbounded.
validateMcpHttpResponse, which already owns the accepted reply bytes for
UTF-8 validation, now also counts each message (the whole JSON body, or each
SSE event) and refuses one over the consumer's limit before the SDK buffers
or parses it, closing the transport as it does for malformed UTF-8. IDA uses
one message limit for stdio and HTTP and reports the HTTP refusal exactly as
the stdio one: a non-retryable transport resource constraint attributed to
the operation with max_response_bytes. JEB and agentenv use the same 64 MiB
default.
Refs #15326
* fix(ida): count SSE events across CR, LF and CRLF line endings
The per-event counter only recognized LF, so a valid CR-only SSE stream was
counted as one message and could be refused although every event fit.
* fix(ida): count a CRLF event separator with its event and register the HTTP message ceiling
A blank line ended by CR reset the event count before its LF, so that LF
was charged to the next event and an event exactly at the limit was
refused. The reset now waits for the possible LF.
The message allowance is declared through fixedAllowanceOptions so the
fixed-ceiling guard sees it, and is registered as a protocol ceiling.