Commit Graph
3250 Commits
Author SHA1 Message Date
morluto 21a5122a9a fix(native)!: bound read_bytes to what a minimum MCP response delivers (#15583)
* fix(native)!: bound read_bytes to 1 MiB per call

read_bytes accepted any length up to Number.MAX_SAFE_INTEGER, both in the
public contract and in the Ghidra bridge request, so one call could ask a
provider to allocate and hex-encode an unbounded range before any
delivery budget applied. Admit at most 1,048,576 bytes per call: about
2 MiB of hex, inside the 10 MiB maximum agent result budget and the MCP
SDK's default 10 MiB stdio message buffer. The contract and the Ghidra
request share one MAX_READ_BYTES_LENGTH, the schema describes the bound
and how to read a longer range, and the refusal comes from input
admission before the provider runs.

Refs #8560

BREAKING CHANGE: read_bytes refuses length above 1048576 with
invalid_request on length. Read longer ranges as consecutive calls that
start at the previous address plus returned_bytes.

* fix(native): derive the read_bytes ceiling from the maximum agent result budget

The 1 MiB ceiling was a chosen number. Each byte returns as at least two
hex characters and no result can exceed MAXIMUM_AGENT_RESULT_BUDGET_BYTES,
so a read longer than half that maximum could never be delivered at any
budget. Derive MAX_READ_BYTES_LENGTH from it (5,242,880 bytes), so it
follows that ceiling instead of a separate constant.

* fix(native): size the read_bytes ceiling to a complete MCP response

MCP sends bytes_hex in both structuredContent and the text block, so a
read of N bytes needs about 4N bytes of response. The ceiling was half the
maximum agent budget, so a full read at it could not fit the default 10
MiB MCP response and failed after the provider finished. Derive it from
MINIMUM_RESPONSE_BYTES, which every server delivers, less a 64 KiB
Evidence envelope reserve, divided by four (2,605,056 bytes). The boundary
test now delivers a complete read at the ceiling.

The compact input schema drops field descriptions, so the consecutive-call
advice now lives in the tool description and the length refusal message,
from one READ_BYTES_CONTINUATION.

* refactor(limits): own the minimum MCP response size in the domain limits

nativeByteRead derives the read_bytes ceiling from the minimum MCP
response, but imported it from config, which the pure-layer boundary
forbids. Define MINIMUM_RESPONSE_BYTES with the other delivery limits in
src/domain/analysisResourceLimits.ts; the config parser, the byte-read
ceiling, the numeric-limit verifier and tests read it there.

* test(ghidra): verify read_bytes at its admitted ceiling

The real-Ghidra verifier still requested read_bytes with
Number.MAX_SAFE_INTEGER and with a length past the new ceiling, so it
stopped on input refusal.

- The boundary probe reads MAX_READ_BYTES_LENGTH, which runs past the
  probe's mapped bytes, so it still checks an explicit incomplete read,
  and refuses a length one over the ceiling.
- The large-result probe reads MAX_READ_BYTES_LENGTH through MCP and the
  CLI and checks it is delivered complete with the fixture's bytes. The
  annotation and dossier probes keep covering oversized delivery with a
  retained reference.

* test(ghidra): compare the served annotation description with its owner

The real-Ghidra boundary verifier compared annotate_native_function's
served description with the bare contract text. Since the open-target
prerequisite is appended by describeToolPrerequisite, the check failed
before reaching the read_bytes probes. Compare with the description that
owner produces from the contract and its availability.

* test(ghidra): run verifier probes under the shared command owner

The read_bytes and large-result verifier helpers launched the CLI, ps and
the compiler through promisify(execFile), outside the verifier's command
owner, so a failure or timeout could leave their children running. Pass
the native-value verifier's commands owner through verifyGhidraBoundaries,
verifyStartupCancellation and verifyGhidraLargeResults and run every
command with commands.exec. Expected-refusal checks read the owner's
VerifierCommandExitError output (snapshot.stdout.text).
2026-12-02 00:07:24 +00:00
morluto 6b57e8e17d fix(delivery): refuse within the budget when even the summary is over it (#15591)
* fix(delivery): refuse within the budget when even the summary is over it

When complete Evidence was over the agent result budget, MCP retained it
and delivered its summary without measuring the summary. A deb package
with many ar members, for example, produced a summary larger than the
budget it was meant to fit.

Measure the summary before retaining it. When it is still over the
budget, return a resource_constraint error that carries the same
delivery facts in details.reported_limits.agent_budget: the complete
size, the budget, the retained complete Evidence ID and the
inspect_analysis_view call that pages it within the budget. Errors are
already delivered within the budget.

The CLI path, which builds its summary separately, is unchanged.

* fix(delivery): measure the delivered answer and describe the refusal

- Measure the {summary, delivery} answer MCP sends, not the summary
  alone, when deciding whether the summary fits the budget.
- The refusal's delivery note says neither the result nor its summary
  was delivered, instead of reusing the summary-delivered note.
- Offer repeating the call with detail complete only for idempotent
  tools; a call with effects is told not to repeat its completed call.
- Build all three delivery refusals in this file through one
  responseRefusal helper, and lower the resource-constraint constructor
  baseline it no longer needs.

* Merge origin/main into fix/over-budget-summary-refusal

Also lower the untyped-budget-refusal baseline for ToolResultDelivery.ts,
which now builds its refusals through one helper.

* Merge origin/main into fix/over-budget-summary-refusal

With #15638, the page delivery.next names fits the effective budget.
The deb regression now asserts the followed page is within 4,096 bytes,
and the minimum-budget paging test accepts the refusal this branch
returns when the summary answer is over the budget too, following the
same next call.

* test(firmware): select a budget the vector-table summary answer fits

The test selected the 4,096-byte minimum budget to make the complete
vector-table report over budget. At that budget the summary answer with
its delivery facts is over the budget too, so this branch now refuses
with paging facts instead. Select 12,000 bytes: above the summary
answer and below the about 18 KB complete report, so the test still
exercises summary delivery.
2026-12-01 18:46:37 -05:00
morluto 44fbcfc787 feat(evtx)!: page event records with offset and report page facts (#15636)
* feat(evtx): page event records with offset and report page facts

inspect_evtx_archive stopped walking at max_records, so records past the first 20,000 (the newest events of a default-size Application log) could not be listed. The walk now covers every record. max_records stays a 20,000-record page bound, which limits retained Evidence. A new zero-based offset selects the first record listed. The result reports page { offset, limit, returned, total, next_offset }, and the record-limit-reached diagnostic names offset=next_offset. Coverage now describes parse loss only, so a page that leaves records out by selection is no longer partial, and chunk ending facts and endpoint checks cover records past the page.

Fixes #15612

* feat(evtx)!: qualify the file-tail offset for small and wrapped logs

The suggested tail offset is now the larger of 0 and page.total minus max_records, so a log smaller than one page gets a valid offset. File order is oldest first only in a log that has not wrapped; the guide and descriptions now say how chunks[] locates the newest records in a wrapped log.

BREAKING CHANGE: inspect_evtx_archive results now require page. Evidence saved before this change has no page, and inspect_analysis_view refuses to summarise it. Re-run inspect_evtx_archive on the log to produce current Evidence.
2026-12-01 17:15:02 -05:00
morluto 62e7c0b050 fix(views): size evidence-json pages to the effective agent result budget (#15638)
* fix(views): size evidence-json pages to the effective agent result budget

An over-budget delivery names inspect_analysis_view evidence-json at offset
0 as its next call. With limit omitted, a page held at most 24,576 bytes of
escaped text, sized for the 32 KiB default budget with a fixed 8 KiB
allowance for its view Evidence. Below about 32 KiB (the minimum is 4,096),
following next returned another answer over the budget.

The view service now pages an omitted limit as the largest page whose
view Evidence, measured as delivered, fits the effective budget (the
runtime override, then REA_AGENT_RESULT_BUDGET_BYTES, then the default).
A page over the budget shrinks by its measured excess and is projected
again. The MCP binding, application-execution views and the CLI pass the
launch seed they captured. A default page also never spans more code
units than the largest explicit limit, so large budgets keep fitting the
stdio frame. The fixed envelope constant and default page size are gone.

* perf(views): reuse the last window while shrinking an uncached evidence-json page
2026-12-01 17:13:14 -05:00
morluto efbb66c16a fix(errors)!: report wrong-format, missing-file and missing-Evidence refusals by their cause (#15581)
* fix(errors)!: report wrong-format, missing-file and missing-Evidence refusals by their cause

- inspect_labview_artifact refuses a file with no LabVIEW RSRC data as an
  unrecognized target (code unsupported_target, failure_kind unrecognized),
  as its format siblings do, instead of invalid_request. A PE whose
  resource tree could not be fully read is a malformed PE target.
- inspect_gpu_code_objects, inspect_model_artifact and Apktool reported a
  missing or non-regular selected file through their own copy of the
  selected-file refusal (BinaryTargetError, target_unavailable). They now
  use the shared projectSelectedArtifactFileFailure owner
  (invalid_request, conforming, with its own next step), and the copy is
  removed. The shared owner keeps the verified-symlink recovery the copy
  carried.
- A retained Evidence reference the session does not hold is
  invalid_request / invalid_input instead of evidence_integrity_mismatch.
  Altered or unauthenticated Evidence stays evidence_integrity_mismatch.

BREAKING CHANGE: error codes change for three refusals. A non-LabVIEW
file given to inspect_labview_artifact is unsupported_target (was
invalid_request). A missing or non-regular selected file for
inspect_gpu_code_objects, inspect_model_artifact or Apktool operations is
invalid_request (was target_unavailable). A missing retained Evidence
reference (details.reason "missing") is invalid_request with category
invalid_input (was evidence_integrity_mismatch / integrity_mismatch).
Callers that branch on these codes should match the new values;
details.reason, retry_class and the remediation are unchanged in meaning.

* test(model): expect the shared selected-file refusal for a missing model path

The process-global host read failure test still expected
target_unavailable for path errors on a model file. Those are now the
shared selected-file input refusal.

* fix(resources): name a rejected symlink in the shared selected-file refusal

The GPU and model readers' copy of the selected-file refusal said the
path was a symbolic link; the shared owner reported only ELOOP, so
rejectedSymlinkRecovery failed once they moved to it. Use the rejected
symlink's own message, and keep the errno message for every other
selected-path refusal.

* docs(errors): describe missing references and closure members as the caller's selection

The comment above RESOURCE_SNAPSHOT_NOT_APPLICABLE still said a missing
Evidence reference stays an integrity failure. Missing references,
including retained sources and closure members, are invalid_request; only
altered or unauthenticated Evidence stays an integrity failure.
2026-12-01 17:11:08 -05:00
morluto a5bf175e06 fix(artifacts)!: report reader admission limits as resource_constraint (#15588)
* fix(artifacts)!: report reader admission limits as resource_constraint

An artifact read refused by a reader limit (artifact_limits.*) or a
release-fixed allowance was code partial, which the error contract
reserves for a result cut short by a delivery or decode limit. The
read was refused at admission, so it is now resource_constraint, like
every other admission limit. The retry class is unchanged: change_first
when the limit can be raised, never when it cannot. A limit without
admission facts, such as a parser budget, stays partial.

The reader's own recovery, which names the parameter, its supported
range and the next step, and the reader_limit fact are unchanged.

Refs #15323

BREAKING CHANGE: artifact refusals with details.reason "limit" and a
details.reader_limit or fixed allowance report code and category
resource_constraint instead of partial. Match resource_constraint, or
read details.reason and details.reader_limit, which are unchanged.

* fix(errors): catalogue each artifact admission limit with the retry it returns

The catalogue listed one row for reader limits and fixed allowances with
change_first, though a fixed allowance and a reader limit already at its
maximum return never, and the release-fixed row still said partial.
List the raisable reader limit, the reader limit at its maximum and the
release-fixed allowance as separate rows, and test each row against the
error it projects.
2026-12-01 17:10:56 -05:00
morluto d59cfed040 fix(adb)!: report listing pages as facts instead of partial coverage (#15620)
The package, process, directory, feature and service listings reported a
caller-selected page only as a limitation sentence, and marked the result
coverage partial whenever the page omitted rows. A requested page is the
caller's selection, not lost coverage, and the next offset had to be
read out of prose.

pageListingItems now returns a page record, which each listing reports as
page: { offset, limit, returned, total, next_offset }, the shape
inspect_elf_unwind_ranges already serves. coverage reports parse loss
only, and the paging limitation sentence is removed.

Refs #15324

BREAKING CHANGE: list_adb_packages, list_adb_processes,
list_adb_directory, list_adb_features and list_adb_services no longer set
coverage partial or add a paging limitation when a page omits rows. Read
page.next_offset (null when none remain) and page.total instead.
2026-12-01 17:10:44 -05:00
morluto 05a9e8fb66 fix(desktop): recognize unpacked resources/app Electron applications (#15632)
* fix(desktop): recognize unpacked resources/app Electron applications

Electron loads an application from resources/app.asar, resources/app or
resources/default_app.asar. The desktop path convention recognized only the
ASAR names, so VS Code and GitHub Desktop, which ship an unpacked
resources/app folder, got no Electron candidate and only .NET probes for the
managed helpers they bundle.

The convention owner now reports the Electron application layout and its
depth for both forms. inspect_desktop_application emits an
electron-app-directory-convention fact for resources/app/package.json, adds it
to the Electron candidate and offers analyze_javascript_application on the
folder. Electron application probes are now application priority, so bundled
managed or native helpers no longer lead next_probes. Release exposure reads
the layout folder from the same convention, so an unpacked build names its
fuse host like an ASAR build.

* fix(desktop): derive Electron probes before bundled managed helpers

A bundled managed helper with its own .runtimeconfig.json, such as Git
Credential Manager in GitHub Desktop, is application priority too. Its probe
was derived first, so the stable priority sort still put it ahead of the
Electron application. Derive the Electron candidate and probes first.
2026-12-01 16:35:04 -05:00
morluto 3ff4a50481 fix(artifacts/ar): list members recorded under absolute paths (#15631)
lib.exe records the absolute object path it was given, such as
C:\build\Release\decode.obj, as the member name. The ar reader passed
that name to the shared path validator, which rejects absolute names,
so every such member was dropped and a static library built this way
looked empty with unknown coverage.

An absolute member name names a build-host location, not archive
structure. The reader now lists it under its last component, as
`llvm-ar x` writes it, keeps the recorded name in source_path, and adds
one reader-level limitation counting such members. Coverage stays
complete. A last component that is itself unsafe (empty, `.`, `..`)
is still refused and counted as before.

The absolute-name rule now has one owner in ArtifactPaths:
absoluteArtifactPathBasename classifies drive-absolute and POSIX-rooted
names, and normalizeArtifactPath uses it for its refusal.

Fixes #15618
2026-12-01 21:20:51 +00:00
morluto 5b5d66dcfc fix(evtx): treat zero-filled slots after the declared chunks as unused (#15621)
Logs exported with wevtutil epl keep all-zero 64 KiB slots after the chunks the file header declares. The inventory diagnosed each as invalid-chunk, added chunk-count-mismatch and reported partial coverage although every record was read. Following libevtx and omerbenamram/evtx, an all-zero slot past the declared count is now unused space. A nonzero slot there, and a zero slot inside the declared count, are still diagnosed.

Fixes #15611
2026-12-01 16:11:42 -05:00
morluto 8ca74c46c7 fix(deb)!: deliver inspect_deb_package within the agent result budget (#15432)
* 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
2026-12-01 16:15:36 +00:00
Afloat 4e4ad4cba3 fix(adb): validate resolved launcher identity before starting apps (#15420) 2026-12-02 00:05:15 +08:00
hhangandhhang 2c78ff1f75 fix(cli): reject non-integer output filter indices (#15491)
Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
2026-12-02 00:01:25 +08:00
morluto 6ac87697e7 fix(errors)!: make retry_class the only retry field of a target failure (#15450)
* 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
2026-12-01 10:36:15 -05:00
morluto 82613c0ace fix(session): never overwrite the open target with a snapshot or bundle (#15449)
* 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
2026-12-01 15:29:12 +00:00
morluto d958391201 fix(mcp): serve refinement-only input rules agents need before the first call (#15437)
* 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
2026-12-01 15:28:35 +00:00
Afloat dfc987577e fix(cli): honor index and open-ended output selectors (#15417)
* fix(cli): honor index and open-ended output selectors

* test(cli): count tokens for the selected array-shaped output
2026-12-01 19:57:18 +08:00
Anurag SinghandAnurag Singh 6ebe220e8b fix(artifacts): read NUL-terminated long names in Microsoft ar archives (#15453)
Microsoft lib.exe archives, including import libraries, use the ar
signature and keep long member names in the "//" table, but as
NUL-terminated strings rather than GNU's "/\n"-terminated entries.
The name table rejected every such reference, so members with names
longer than 15 characters were dropped from the inventory and
counted as undecodable, with unknown coverage.

The name table now decides its convention once from its final byte:
a table ending in NUL resolves entries that start at offset 0 or
after a NUL and end at the next NUL. GNU tables keep their existing
"/\n" rule, and the ar reader and Debian parser share the change.

Fixes #15452

Co-authored-by: Anurag Singh <211784907+Anurag-5ingh@users.noreply.github.com>
2026-12-01 19:33:54 +08:00
hhangandhhang 4d183de844 fix(tar): read archives with binary extended attributes (#15431)
Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
2026-12-01 01:42:26 -05:00
morluto cad578e74a fix(adb): refuse device directories before pulling (#15433)
* fix(adb): refuse device directories before pulling

adb pull copies a directory tree with no byte limit. pull_adb_file accepted
a directory device_path (for example /sdcard), and pull_adb_package accepted
a pm path line naming a directory; adb then pulled the whole tree under the
600 s timeout, the tool reported that the result could not be read back, and
the tree stayed on disk unrecorded.

Both pulls now run the existing test -d probe that push already uses.
pull_adb_file refuses a directory as invalid_request on device_path and
names list_adb_directory; pull_adb_package refuses a pm path directory with
reason directory_device_path before creating output. A probe that cannot
establish the answer fails the call rather than pulling.

Refs #15326

* fix(adb): keep the pm path answer when a directory probe fails

A failed directory probe now retains the completed pm path paths and the
entry being checked as a partial observation, and the pull_adb_file
directory refusal escapes the device path for display.
2026-12-01 01:42:08 -05:00
morluto b26c2ddd57 fix(mcp): admit declared hosts on a loopback HTTP bind (#15439) 2026-12-01 06:30:34 +00:00
morluto 1a85e2f4f5 docs(clients): state client tool-count limits and how to narrow REA's catalog (#15446) 2026-12-01 01:13:34 -05:00
morluto 9b471ab6ca fix(uefi): name the output budget and depth limit that stopped extraction (#15434)
extract_uefi_firmware with an exhausted output budget reported one generic
size-truncated gap per withheld payload (2995 with max_output_files 5),
empty limitations for a whole-image target, and nothing naming the limit.

Each budget gap now starts with the parameter and value that stopped it
(max_output_files or max_output_bytes), and the first limitation states how
many payloads and bytes the budget withheld, which parameter stopped them,
its maximum and how to continue. Depth-limited gaps name max_depth. A target
offset that maps nothing names inspect_uefi_firmware as the way to find valid
offsets.

Refs #15343
2026-12-01 01:11:08 -05:00
morluto 866ff0104f ci(hooks): check the advertised-schema summary before pushing source changes (#15428)
* ci(hooks): check the advertised-schema summary before pushing source changes

A stale advertised-schema summary was the most common PR CI failure in
a recent window (10 of 28 failing runs). The pre-push hook now runs
npm run verify:advertised-schemas when the branch changes non-test files
under src/, and skips it otherwise. On a schema change it took 6.5-9.5 s
to rebuild with a warm Turbo cache plus 0.9-2.6 s to check, and printed
the update command.

* ci(hooks): refuse pushes with uncommitted schema summaries and document the check

The schema check reads the working tree while CI reads the pushed
commit, so running --update-summary without committing the result
passed the hook and still failed CI. The hook now refuses the push
while files under scripts/verify/advertised-schemas/tools are
uncommitted. The testing guide and CONTRIBUTING describe when the hook
runs the check.
2026-12-01 00:41:42 -05:00
morluto bd353e7e5c fix(errors)!: producers declare retry class, refusal recovery and real error codes (#15372)
* fix(errors)!: derive retryable from the producer's declared retry class

`retryable` means the unchanged request may succeed, but it was computed
downstream as an OR of a code table and five class rules. Every error
classification now declares a retry class (same_call, change_first, never,
unknown_outcome); `retryable` is `same_call` after one incomplete-cleanup
check, and the RETRYABLE_CODES table is deleted.

Producer corrections:
- update_unknown revision conflicts are change_first and report
  details.current_revision; duplicate record_unknown reports
  details.existing_unknown_id.
- close_gdb_session's explicit-disposition refusal is change_first.
- Per-call artifact reader limits are change_first (never when the limit
  cannot rise).
- An exited or unreachable Hopper bridge, and a Hopper start that another
  REA session owns, are change_first.
- File-descriptor exhaustion (EMFILE/ENFILE) outside process launch is
  occupied host capacity (same_call) for private workspaces, model and GPU
  readers and JavaScript application reads.
- apktool JVM native-thread exhaustion follows the shared capacity default.

BREAKING CHANGE: these refusals now report `retryable: false` (descriptor
pressure now reports `retryable: true` as `resource_constraint`). Callers
that repeated them unchanged should follow the remediation first: re-read
the unknown and retry with details.current_revision, dispose GDB inferiors,
raise the reported reader limit, or restart the Hopper provider.

* fix(errors): require producers to name recovery for conforming refusals

A refusal whose arguments match the input schema was presented as a schema
error whenever its producer left out remediation, and many producers did.
AnalysisInputError's options are now a union: a conforming refusal must
supply both its outcome (userMessage) and next step (remediationAction),
so the compiler lists every producer; only contract violations may fall
back to the schema guidance.

Producers fixed: unknown Frida session and script, decompile_all
output-directory state, the duplicate unknown build computer factory
(collapsed), stale Cutter sessions, Mach-O architecture selection, output
roots that already exist, selected files the host refuses, Ghidra lookups
the bridge could not resolve, YARA path refusals, unresolved native symbol
names, apt key files and withheld sign-in state. A missing selected APK is
now target_unavailable like every other selected-file reader.

The capability fallback "Choose another analysis or target" is deleted; a
capability refusal without its own recovery names details.reason and
binary_session.

Refs #15312

* fix(errors): classify caller selections and target bytes by their real failure

Several refusals reported a code that reads as corruption or a crash:
- a missing unknown_id and a missing Evidence reference now report
  invalid_request instead of execution_failure and
  evidence_integrity_mismatch;
- close_binary with snapshot_path in a resource-only session reports
  invalid_request instead of evidence_integrity_mismatch;
- ADB push onto an existing device path and pulls into an occupied output
  directory are conforming invalid_request refusals naming overwrite or
  output_directory, not unreadable_output;
- damaged APK ZIP, signing-block, signer and central-directory structures
  are malformed targets, not invalid input;
- NuGet and VSIX bytes without a ZIP signature are unrecognized, not
  malformed;
- a historical source graph file whose entries contradict its root
  commitment is an integrity failure, not invalid input;
- a CDP protocol failure states what happened instead of the unclassified
  fallback message.

Refs #15319

* feat(errors): expose the producer's retry class as retry_class

Every error projection now carries retry_class (same_call, change_first, never or unknown_outcome) beside retryable, which stays true exactly for same_call. The field is additive: the error schema accepts errors retained by earlier releases without it.

Refs #15323

* fix(errors): address review of the folded error-contract PRs

Keep a provider's own capability message as its remediation; the binary_session fallback applies only to a bare declared reason. Delete the unused conformingInputRefusal helper. Compose both retry fields for a refused publication whose cleanup is incomplete. Report descriptor exhaustion from a JavaScript directory opendir as occupied capacity. Let an exited Hopper startup attempt without a setup failure code retry unchanged. Declare retry for the Ghidra superseded checkpoint and unknown IDA readiness. Redact ambiguous selector candidates. Give a Ghidra document miss its own recovery. Drop an unchanged-files claim the journal repair cannot make. Name each withheld sign-in refusal's step. Hash the source graph commitment before the cancellation yield. Keep the browser protocol_error message neutral. Add tests for mutation-audit survivors C3, C5, P2, P4, P8, H1, H4 and H5.

* fix(errors): keep a missing Evidence reference an integrity failure and state only the observed commitment mismatch

* test(desktop): assert the unknown build computer refusal's remediation, not its message

The refusal now carries its next step in remediation.action instead of the message, so the closed-computer checks assert the exact code, message and remediation facts.

* fix(errors): keep producer retry choices apart from cleanup and fixed ceilings

A capture's retryable flag no longer folds in pending cleanup, so the projection applies the cleanup rule once and a transient capture with pending cleanup reports change_first instead of never. A release-fixed artifact allowance reports never, and a stale admitted session identity reports change_first (reopen, then retry); both have catalogue rows. The bare capability-unavailable remediation names binary_session only for a binary-analysis session, so standalone bridges such as Cutter are pointed at their own reason.

* test(vsix): expect a non-ZIP selection to be refused as unrecognized

This PR reports bytes without a ZIP signature as another format (unrecognized), not a damaged package; the exact-reason assertion added on main still expected malformed.

* test(delivery): expect the capacity refusal's retry class in delivered failure facts

The exact failure facts asserted on main predate the projection's retry_class; occupied capacity reports same_call.

* fix(errors): mark a sent Hopper cancellation unknown and missing Evidence recoverable

A cancellation Hopper already received may still apply, so its retry class is unknown_outcome instead of same_call; an unsent cancellation keeps same_call. A missing EvidenceReferenceError is change_first, since importing the referenced records lets the same request succeed; other reference failures stay never. Both have catalogue rows.

* fix(hopper): ask for changed launch arguments before retrying an unencodable launch

A launcher path or argument that cannot be encoded as an AppleScript literal meets the same pre-launch guard on every attempt, so the start refusal is change_first and its retry_action is unknown; a start failure without a declared reason stays same_call.

* fix(errors): keep a one-shot cleanup failure's retry class with its cleanup state

A one-shot reply that reports cleanup_incomplete spread the primary or cleanup projection and overrode only retryable, so a timed-out read whose close also failed carried retry_class same_call. The reply now reads its retry class from the typed composed failure, and never offers the same call before cleanup settles.

* test(evtx): expect an unreadable selected log to be refused with its own recovery

This PR treats a well-formed path the host refused as a regular file as conforming input with its own remediation; the evtx boundary test still expected a schema-recovery refusal.

* test(javascript): expect a broken source-graph commitment as an integrity failure

This PR reports a well-formed historical source graph whose entries disagree with its root_sha256 as evidence_integrity_mismatch, not an input issue; the exact refusal assertion added on main still expected invalid_request.
2026-12-01 05:32:33 +00:00
morluto bdba620af3 fix(mcp): serve input rules agents need within every client's schema budget (#15393)
* test(mcp): check schema parity against the served tools/list

Schema parity tests registered contracts on a bare SDK server, so they
checked a schema REA never serves and missed the compact presentation's
losses (#15310, #15311).

- Add servedToolCatalog, which lists every tools/list page from a session
  server, and use it for parity checks in toolSchemaValidity and
  advertisedDialect.
- Add a catalog-wide test that derives one violating value per
  constrained canonical field from each contract example and requires
  the served schema to reject it or the served description to name the
  rule. Today's gaps are listed by root cause; an entry that stops
  matching fails the test.
- Remove absoluteLocalPathTools.test.ts; the catalog test covers every
  absolute-path field it checked.

Refs #15328

* test(mcp): add a seeded property and visited fields to served parity

- Generate string values for every constrained string field with a fixed
  fast-check seed; the refinement gaps it found (rules in .refine() with
  no served keyword or guidance) are listed with a violating value each.
- Assert the sweep derives violations for root, nested and array
  absolute-path fields.
- Check canonical schema validity against the contract schemas directly
  instead of a bare SDK server, and drop the served-listing test that
  validated canonicalInputSchema.
- Move the reserved environment key check into the compact handler test,
  which now requires the served description to name the rule.
- testing.md: assert parity against the served tools/list.

Refs #15328

* fix(mcp): advertise the absolute-path pattern and dialect-dropped rules

absoluteLocalPathStringSchema serialized as two allOf patterns, and the
dialect projection kept only the first (NUL-free), so every absolute-path
field advertised a schema that accepts relative paths.

- absoluteLocalPathStringSchema emits one pattern: the absolute envelope
  over a NUL-free path. NUL is still refused first with its own message.
- mergeAllOf conjoins exactly what it can: bounds keep the tighter value
  and negated-class patterns become one class. A pattern it cannot
  conjoin is named in tool guidance instead of dropped silently.
- multipleOf, length bounds of 1999 or more and exclusive bounds on
  non-integers become tool guidance, including on nullable values.
- Move the allOf merge into advertisedAllOf.ts.

Fixes #15310
Refs #15328

* fix(mcp): keep defaults, scalar rules, examples and field semantics in compact schemas

Compact input schemas dropped facts an agent needs for a correct first
call: every default, the enums and bounds of reduced root properties, any
example for reduced or pruned schemas, and the Frida cross-field rules.
Name-keyed fallback descriptions also labelled fields of another type.

- Tool guidance names root property defaults in one "Defaults:" sentence.
- A reduced schema keeps the enum, const, pattern and bounds of each
  scalar root property.
- A reduced or depth-pruned schema states its smallest canonical example
  (up to 1,024 bytes), and a pruned schema says nested fields are omitted.
- Frida contracts state each cross-field rule once, as the refusal and
  the root description.
- Fallback descriptions apply only to a property of the JSON type they
  describe; they move to propertyFallbackDescriptions.ts.

Refs #15311
Refs #15328

* test(mcp): validate the served schema in three advertisement tests

compare_artifacts sources, compare_web_captures inputs and the
analyze_javascript_application source selection called a canonical or
bare-server schema advertised. They now validate the served listing;
canonical rejections stay on the contract parser, and the gaps the
reduced form leaves are asserted with a pointer to the parity list.

Refs #15328

* test(mcp): check recovery promises on an agent's first wrong calls

Calls every served tool with generated wrong arguments on a session with
nothing open: an unknown path key, an omitted required field, valid
arguments for an active-target tool, a missing file and an unknown id.
Every refusal must name only advertised tools, name open_binary for an
active-target tool, give no schema remediation to arguments the served
schema accepts, and claim retryable only when an identical replay can
succeed. A seeded property varies the guessed key and missing path.

Known failures are listed by root cause (#15309, #15312, #15323 and the
active-target declarations #15350 removes); a new failure or a stale
entry fails the sweep.

* test(mcp): assert the served schema where tests claimed the advertisement

Five tests validated the canonical schema and called it advertised, so they
asserted rules the served tools/list does not carry: batch_decompile
maxItems, inspect_api_contract format and view, the inspect_dart_aot length
and line-terminator rules, extract_artifact uniqueItems, and examples on
compare_javascript_export_shapes. Each now validates the served schema and
keeps the handler enforcement. A missing rule is pinned as a known gap (in
the parity sweep where it can see the field, or beside the test where the
contract example leaves it unreachable), so the expectation fails once the
rule is served.

The parity sweep now also derives maxItems and uniqueItems violations from
example arrays; it finds inspect_managed_members type_names uniqueItems.
Two value-correct tests are relabelled and check the served schema too.

* fix(mcp): fit every advertised input schema under Codex's 5,000-byte compaction threshold

Codex compacts any MCP input schema above 5,000 serialized bytes and drops
descriptions and nested structure first, so update_analysis_settings
reached the model as a list of empty objects with no setting IDs. Lower the
advertised input budget from 13 KiB to 5,000 bytes, bound $ref expansion
separately so projection and depth pruning are judged on their result,
and advertise update_analysis_settings changes as one object whose setting
enum lists every ID; the canonical parser still enforces each setting's
bounds.

Refs #15339

* fix(mcp): address review findings across the served-schema stack

Keep the recorded description, or its absence, when the deferred runtime
materializes, so discovery and the loaded listing agree. Measure example
guidance in UTF-8 bytes once, resolve defaults through each property's own
reference scope, keep root names and types when scalar rules alone would
overflow the reduced form, and decline joining negated classes that a
literal hyphen could turn into a range.

Served parity now counts guidance only when one sentence labels the field
and states its rule, and counts uniqueItems guidance. That stricter match
exposed seven gaps the loose match hid; they join their root causes, and
the fixed arrayRules gap is removed. The first-contact sweep keys findings
by check, checks a structured next step against the served catalog, and
uses the catalog's own MCP settings.

* chore(mcp): refresh advertised catalog summaries

* fix(paths): keep the NUL path refusal's format reason

Moving the NUL check out of the advertised pattern turned its issue into a
custom refinement, so tool refusals reported reason invalid_value instead
of invalid_format with expected regex. The check now raises the same
format issue, and still stops before the absolute-path rule.

* fix(mcp): state the optional Frida device choice and match bounds by rule

The Frida device rule now says both fields may be omitted for the local
device. Served parity matches a numeric bound by its direction, unit and
complete value, so another bound on the same field cannot cover it.

* test(mcp): stop pinning served-schema omissions in workflow tests

Workflow tests asserted that the served schema accepts values runtime
refuses, so serving a rule would fail them. They keep the valid-input and
runtime-refusal checks; the catalog-wide parity sweep tracks what is
served.

* test(mcp): count a required field only when guidance requires it

A sentence that only mentions a field, or a same-named key under another
parent, no longer covers a missing required rule. Guidance must state the
requirement about the field's full path, or state a shape listing every
required key of the field's parent.

* test(mcp): credit a served rejection only to the rule that failed

The parity sweep counted any served rejection as coverage, so a probe that
also broke another rule (a too-long locale that breaks its pattern) hid a
missing bound. Served validation now reports every failing keyword, and a
rejection covers a rule only when that rule's served keyword fails.
2026-12-01 00:23:37 -05:00
morluto 0e07a3c876 fix(delivery)!: deliver over-budget results and errors inside the agent result budget (#15396)
* fix(mcp)!: deliver over-budget delivery facts inside the structured result

Codex and VS Code forward only structuredContent to the model, and Gemini
CLI and LangChain forward only the text blocks; _meta reaches no model. An
over-budget result put its delivery facts in a second text block and in
_meta, so Codex and VS Code agents received a summary with no sign that it
was one.

An over-budget result is now {summary, delivery} in structuredContent,
the shape the CLI already prints, and its one text block is that value's
serialization. The delivery layer owns the alternative: every budgeted
operation's registered output schema admits it, so canonical and compact
advertisements validate the result.

An overflowing completed result no longer picks its recovery by tool
name. The producer declares an overflow recovery (stateless, retained or
committed, with its next call and identities): list_unknowns,
get_evidence_bundle, inspect_address_context and committed unknowns
declare theirs in their bindings, and retained Evidence declares its own.
Undeclared results fall back to the contract's effects. Only a CLI
contract that reads no session is told to use its `rea` command, so
session reads and committed mutations are never told to use CLI JSON.

BREAKING CHANGE: When a budgeted tool's omitted detail returns a retained
summary, structuredContent is {"summary": <summary Evidence>, "delivery":
<delivery facts>} instead of the summary Evidence, the second
{"delivery": ...} text block is gone, and _meta["rea/agent-budget-delivery"]
is no longer set. Read the summary from structuredContent.summary and the
delivery facts from structuredContent.delivery (or the same members of the
text block). Pass detail "summary" or "complete" to receive Evidence at the
root as before.

Refs #15338
Refs #15326

* fix(delivery)!: deliver every error result under the agent result budget

A failure whose text exceeds delivery.agent_result_budget_bytes is now
retained whole as Evidence (mcp_tool_error in the MCP session,
cli_command_error in the CLI's private cache) and replaced by a bounded
summary. The summary keeps the code, category, retry, recovery and
remediation and every detail field that fits, names the fields it left
out, and carries details.failure_delivery with the inspect_analysis_view
call that pages the complete failure. Non-Evidence facts such as a
mid-extraction artifact inventory were previously inlined whole.

The transport's unretained string-ceiling fallback no longer points at
complete CLI JSON output.

BREAKING CHANGE: An MCP error, or a one-shot CLI failure without
--evidence_output, larger than the agent result budget is delivered as a
bounded summary: oversized details fields are listed in
details.omitted_details instead of being inlined, and
details.failure_delivery names the retained failure Evidence and the
inspect_analysis_view call that pages it. Pass detail complete (CLI
--detail complete) for the complete failure inline, or raise
delivery.agent_result_budget_bytes.

Refs #15326

* fix(delivery): keep overflow recovery from repeating effects or losing the session target

A retained overflow no longer offers the CLI command: the retained record is the complete result, and a call with effects is told not to repeat it. The CLI fallback for an unretained result excludes session tools. The MCP result guarantee is limited to successful results. The schema validity test selects the complete-result alternative of a budgeted output schema.

* fix(delivery): keep failure summaries schema-valid and CLI failure retention self-contained

boundedFailureSummary restores the details a code's schema requires. The CLI retains the failure as it was before its partial observation was summarized, so the record does not depend on a partial file the cache could evict, and a cache write that commits before failing or leaves cleanup incomplete keeps its receipt and cleanup owner.

* fix(delivery): retain the delivered CLI failure with its complete partial restored

* fix(delivery): budget CLI-enveloped failures through the envelope's owner

Provider-backed CLI commands wrap the canonical failure in their error envelope (a label and input diagnostics). The strict projection schema rejected the wrapped failure, so an over-budget failure printed whole without being retained. The envelope's owner now splits it; delivery budgets the canonical failure and keeps the envelope fields on the bounded result. CLI logging uses the same splitter instead of its own destructuring.

* fix(cli): print a bounded failure's retrieval facts on a terminal

A failure bounded to the agent budget carries its retained record and paging call in details.failure_delivery. The terminal presentation printed only the concise error for it, because its preserved-Evidence check did not know that field. It now does, so the structured failure is printed whole.
2026-12-01 04:10:00 +00:00
morluto 4d84c6919f fix(frida): recover detached sessions and report why Frida detached them (#15357)
* fix(frida): give detached and unknown sessions lifecycle recovery

A session whose target detached was refused with the unknown-session error,
"No open Frida session; start one with start_frida_session", although the
session is still held, frida_session_status still returns its remaining
messages and close_frida_session must still release it. Following the advice
abandoned the session and its messages.

load_frida_script and resume_frida_session now refuse a detached session with
a capability refusal naming frida_session_status, then close_frida_session.
Unknown session and script IDs conform to the input contract, so their
recovery names the lifecycle tools instead of schema guidance, matching the
gdb and rizin session errors.

Refs #15329

* fix(frida): track session phase and report why a session detached

ManagedSession kept attachment as a `detached` boolean beside
`cleanupStarted` and `resumeAfterDetachPending`, and the `detached`
signal handler ignored Frida's (reason, crash) arguments, so an agent
could see that a session detached but not whether the target exited,
crashed, or the connection dropped.

The session now has one phase: attached, detached with its detachment,
or closing with the detachment seen so far and whether a paused spawn
still owes a resume. The signal arguments are parsed at the native
boundary; a detach seen only through isDetached() is recorded as
`unobserved`. frida_session_status, start_frida_session and
instrument_with_frida report an optional `detachment` with Frida's
reason and crash summary, and the detached-session refusal names the
reason. close_frida_session cleanup is unchanged.

Refs #15329

* fix(frida): report whether a retained crash summary was truncated

A crash summary is bounded to 4096 bytes; detachment output now carries
crash_summary_truncated so a clipped summary is not presented as
complete. The detached-session test also proves messages captured before
the detach stay readable. Commits the advertised schema summary for
start_frida_session.

* docs(frida): state why the crash summary bound is fixed

* fix(frida): keep Frida's one-line crash summary complete instead of capping it

The 4096-byte cap had no format, protocol or resource reason, and cutting
the summary left no way to read the rest. The summary is now kept whole
apart from credential redaction, so the truncation flag and constant are
removed.
2026-12-01 02:36:09 +00:00
morluto 2d1748117e fix(browser): redact literal credentials in browser scenarios unless retained (#15347)
* fix(browser): redact literal credentials in browser scenarios unless retained

capture_browser_scenario records the scenario in Evidence parameters as
written. A literal Authorization header value or cookie seed therefore stayed
verbatim in Evidence, while the same record's network events redacted it.

Literal values of transport-credential headers (isTransportCredentialHeader)
and cookie seeds are now redacted like declared secrets. One domain owner,
scenarioLiteralCredentials, lists them with their redaction identities; the
capture session adds them to its redaction set, and Evidence parameters and
scenario_sha256 record the redacted scenario. A caller that wants the literal
kept sets retain_literal_credentials: true. Other literals stay ordinary
evidence; secrecy is not inferred from names.

Refs #15340

* test(browser): assert whole-value redaction instead of any change

not.toBe(value) also passed for partial redaction, such as a marker appended
with the secret left in place. Assert that each redacted value is exactly one
marker and that no fragment of the secret or its JSON-escaped form remains in
text, bytes, URLs or protected response bodies.

Refs #15340

* fix(browser): redact the trimmed spelling of padded literal credentials and commit the schema summary

* fix(browser): treat a credential header's prefix as part of its literal credential and retain fingerprint fixtures

* fix(browser): keep the bare literal token redacted beside the prefixed header
2026-12-01 02:27:15 +00:00
morluto c7fa6af8a3 test: fail loudly on setup refusals and assert exact MCP refusal and linkage facts (#15368)
* test(mcp): assert exact refusal, identity and Evidence linkage facts

Replace isError-only, expect.any and oracle-mirror checks in MCP and CLI workflow tests with the exact code, reason, subject identity and Evidence links the producers report. The capability-unavailable unknowns test now opens its target, so it exercises the path it names instead of NoBinaryOpenError.

* test: fail loudly on setup refusals, unrecorded paths and zombie liveness

Three shared helpers remove weakness classes from the suite:

- callOk (tests/support/mcp/toolResult.ts) fails at the setup step when a
  tool used as fixture setup refuses. It replaces the build-computer copy
  and the unchecked open_binary calls. serverUnknownsMcp's
  capability-unavailable test passed only because open_binary failed: its
  fixture refused health, and NoBinaryOpenError has the same "unavailable"
  category. The fixture now answers health, and the test asserts
  capability_unavailable for procedure_pseudo_code.
- expectRemoved (tests/support/expectRemoved.ts) throws when no path was
  recorded; access(list[0] ?? "") passed because "" is also ENOENT.
- expectProcessRunning checks ps state instead of signal 0, which still
  reaches a zombie that REA wrongly signalled.

Also asserts the open target before and after an ordinary close, the
written overwrite snapshot, and the comparison's links, status and
supporting unknown.

* test(mcp): compare delivered recovery with its owning projection
2026-12-01 02:26:44 +00:00
morluto 089dfa3a8b fix(setup): derive client deadlines from one record per client (#15371)
* fix(setup): derive client deadlines from one record per client

Each supported client definition now declares the MCP deadlines it applies
to REA's server: key, unit, built-in default, maximum, coverage and whether
progress resets it. Setup raises a shorter or missing deadline to REA's
recommendation within the client's maximum and keeps a longer one; doctor
reports the same shortfall from the same record. Cline, Zed, Antigravity,
Hermes, Goose and Gemini CLI gain deadlines; the codex/kimi/grok/dsh name
branches, the Goose timeout literal and the per-client startup constants
are removed.

Refs #15337

* fix(setup): keep a raised Goose timeout over a short inherited one and expect Antigravity's deadline
2026-12-01 01:48:59 +00:00
morluto 3394771745 docs(cline): explain heap exhaustion and how to raise each heap (#15394)
* docs(cline): explain heap exhaustion and how to raise each heap

A JavaScript heap out-of-memory error under Cline over Remote-SSH usually
comes from VS Code's extension host, which keeps every tool result for the
task, not from REA. Name which process it is, how to raise each heap, and the
regex worker side effect of raising REA's.

Refs #15330

* docs(cline): add NODE_OPTIONS to the existing launch env, inside nested transport
2026-11-30 20:42:57 -05:00
morluto fbfcad3152 fix(evidence): route web script export and WASM comparison through shared Evidence inputs (#15385)
* fix(evidence): resolve web script and WASM comparison sources through the shared Evidence input owner

export_web_scripts accepts its capture as declared Evidence input: a
complete record, a retained reference, or a retained inspect_analysis_view
summary, which reads its retained parent. compare_wasm_interfaces admits
both sides through resolveEvidenceRequest, so a malformed side is a
bounded evidence_integrity_mismatch and a summary reads its parent. The
summary-to-parent rule lives in the shared resolver as completeProducers.
A catalog test checks that every declared Evidence input resolves a
retained reference through the shared resolver.

Refs #15341

* fix(evidence): retain an inline web script capture before publishing and commit the schema summary
2026-11-30 20:42:45 -05:00
morluto 4bd5f2eaef docs(tool-design): require advertised prerequisites, served-schema parity and producer-owned recovery (#15344) 2026-11-30 18:25:39 -05:00
Taksh KothariandVincent Koc 6a728ba419 feat(evidence): page retained procedure aliases (#9325)
* feat(evidence): page retained procedure aliases

Bound alias pages by the serialized byte budget and advertise the native-inventory-aliases selector, including source_index.

* use the shared analysis-view page refusal for alias pages

the 1 MiB page budget already has a typed refusal, so this page does not declare a separate fixed ceiling.

* test(evidence): verify alias page recovery and portability

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-12-01 02:52:33 +08:00
ShuaixinHuang e8419acaf5 fix(javascript): explain relation omissions at semantic node ceilings (#15295) 2026-12-01 02:51:17 +08:00
Saim Shafique 326b3d6643 docs(captures): describe qlog page budget (#15290) 2026-12-01 02:47:04 +08:00
Saim Shafique ef85479432 docs(pcap): describe analysis-view page budget (#15289) 2026-12-01 02:46:34 +08:00
Saim Shafique 46367e5bef docs(targets): include Unix ar extraction in supported targets (#15288) 2026-12-01 02:46:27 +08:00
Saim Shafique 4b8019ec4c docs(captures): describe protobuf page budget (#15280) 2026-12-01 02:46:00 +08:00
CyberSproutandVincent Koc 1f233d091e docs(install): review a pinned release script before the curl installer (#14451)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-12-01 02:44:07 +08:00
Saim Shafique 3772cab2e5 docs(godot): include PCK format 1 in supported formats (#15270) 2026-12-01 01:26:11 +08:00
Saim Shafique 86d15047a9 docs(cli): list endpoint comparison among evidence-bundle commands (#15274) 2026-12-01 01:03:34 +08:00
Saim Shafique 33997f81c2 docs(targets): include universal Mach-O in Go and Rust support (#15271) 2026-12-01 01:02:44 +08:00
2afad5b789 fix(setup): honor OpenCode system, managed and policy configuration (#15081)
Discover the OpenCode system and managed layers and honor their effective
MCP policy when planning, publishing, diagnosing, or removing registrations.
Preserve the writable layer's dialect and verify effective registration
and policy after publication.

Fixes #15036.

Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Co-authored-by: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-01 00:48:10 +08:00
Ysopwnableandgensokyo-dev 3e3c2ba1cc feat(artifacts): inspect SWF and extract embedded payloads (#15264)
Inventory FWS and CWS files through the shared artifact reader. Preserve the
carrier and normalized identities, top-level tag counts, and individual
DefineBinaryData occurrences. Use the existing selected-extraction pipeline and
per-call artifact admission controls.

Refs #3614

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-01 00:41:11 +08:00
7bedbcb6f6 fix(javascript): scope the missing-listener rule to proven Node emitters (#8663)
* fix(javascript): scope the missing-listener rule to proven Node emitters

A listener method called without a listener argument passes `undefined` to
Node's `checkListener`, which throws before anything is registered or
removed, so no event operation exists. That rule currently applies to every
receiver, including objects that only look like an emitter.

Restrict it to a receiver whose stable initializer is `new EventEmitter()`
resolved through a proven `events` load, or a call Node's own
`child_process` factories answer with a `ChildProcess`. The proof is
withdrawn when `Function.prototype.call` was replaced, when the class
reference or its prototype object escaped to a call, when any member of the
shared `events` module was written, or when the selected method, the
receiver's own prototype or an earlier escape of the instance may have
replaced it. An effect that runs after the call cannot change whether it
threw.

Any other receiver keeps its operation as an unresolved candidate, as it did
before the missing argument was considered. Those include EventEmitter-style
APIs that define a one-argument form, such as Socket.IO's `socket.off("x")`,
which removes every listener for the event.

* fix(javascript): verify native emitter constructor and prototype ownership

* fix(javascript): retain escaped prototype constructor aliases

* fix(javascript): track acquired builtin module mutations

* fix(javascript): charge module acquisition to phase allowance

* fix(javascript): recognize computed builtin getter keys

---------

Co-authored-by: gongfpp <22683417+gongfpp@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-12-01 00:30:59 +08:00
061239a5de fix(setup): follow the registration Copilot, Codex, and Kiro load (#15230)
Follow the effective Copilot, Codex, and Kiro MCP registration. Use the
same resolved Kiro agent file for the approval plan and the write.

Fixes #15032.
Fixes #15034.
Fixes #15035.

Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Co-authored-by: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-12-01 00:19:28 +08:00
Saim Shafique 927aefbca2 docs(limits): correct Rust and SQLite producer input defaults (#15255) 2026-12-01 00:08:18 +08:00
Saim Shafique b445a0445f docs(godot): describe normalized PCK logical paths (#15257) 2026-12-01 00:08:08 +08:00