Commit Graph
630 Commits
Author SHA1 Message Date
morluto d1a9a67664 perf(server): carry overflowing error encoding in WeakMap for ErrorEvidenceTransport (#13812)
* perf(server): carry overflowing error encoding in WeakMap for ErrorEvidenceTransport

* test(mcp): verify oversized error encoding reuse
2026-11-22 20:51:44 -05:00
morluto 89ecf87810 fix(environment): release terminal state response readers (#13830) 2026-11-23 01:50:12 +00:00
morluto 3843fb2dd0 refactor(composition): prune binaryDiagnostics re-export barrel and migrate callers (#13839)
Closes #13838
2026-11-22 20:41:11 -05:00
morluto 1157ff5d69 perf(environment): reuse measured state reply sizes (#13824) 2026-11-23 01:37:48 +00:00
morluto 55c4f5633c refactor(analysis-view): unify 4 retained-summary wrappers into executeRetainedSummaryOperation (#13810) 2026-11-22 20:25:44 -05:00
morluto f6a83f1fcf fix(contracts/mcp): collapse Evidence wire schemas, project type lists, preserve discover_tools guidance (#13752)
* fix(contracts/mcp): collapse Evidence wire schemas, project type lists, preserve discover_tools guidance

* fix(mcp): preserve borrowed Evidence arrays in advertised schemas

* fix(mcp): retain typed union constraints and clarify tool discovery

* test(mcp): refresh advertised schema summaries

* style(mcp): format compact schema tests
2026-11-22 20:23:50 -05:00
morluto f51aa44e74 perf(server): zero-alloc errorTextWireBytes, lazy overflow recovery, skip duplicate SDK validation (#13766) 2026-11-23 00:49:22 +00:00
morluto 67388539e0 refactor(server): extract ErrorEvidenceTransport from EvidenceMcpServerCore (#13761)
* refactor(server): extract ErrorEvidenceTransport from EvidenceMcpServerCore

* refactor(mcp): drop unused error encoding import
2026-11-23 00:37:03 +00:00
morluto 2532adda84 perf(cli/server/dotnet): single-pass --token-count JSON, indexed CLI command lookup, single status parse, and direct loops (#13631)
* perf(cli/server/dotnet): single-pass --token-count JSON, indexed CLI command lookup, single status parse, and direct loops

* fix(cli): admit JSON token counting before retaining output
2026-11-22 22:13:50 +00:00
morluto 09a5ea1abc perf(server): measure MCP tool result parts in a single zero-allocation scan (#13598) 2026-11-22 15:51:02 -05:00
morluto 2b5f495228 perf(application/server): bucket ReleaseExposure layouts, use Set in environmentStateStore, and avoid owned-payload deep-clones (#13558)
* perf(application/server): bucket ReleaseExposure layouts, use Set in environmentStateStore, and avoid owned-payload deep-clones

* perf: skip preferred release reads when evidence is settled
2026-11-22 15:21:00 -05:00
morluto 5b63cf16ee perf(mcp/providers): eliminate ErrorEvidenceTransport double-encoding and redundant deep-clones (#13495)
* perf(mcp/providers): eliminate ErrorEvidenceTransport double-encoding and redundant deep-clones (#13493)

* fix(mcp): preserve projected error encoding through SDK results
2026-11-22 18:24:15 +00:00
morluto 8688eb0195 perf(cli/mcp): eliminate eager JSON schema work, double projection, and O(N^2) error compaction (#13466)
* perf(cli/mcp): eliminate eager JSON schema work, double projection, and O(N^2) error compaction (#13464)

* test(mcp): cover reuse of the registration input schema projection
2026-11-22 16:42:37 +00:00
morluto 90ca43e052 perf(mcp/providers): accelerate toolResultEncoding via C++ byteLength/stringify, memoize tshark PATH probes, and enlarge managed hash buffer (#13474)
* perf(mcp/providers): accelerate toolResultEncoding via C++ byteLength/stringify, memoize tshark PATH probes, and enlarge managed hash buffer (#13472)

* fix(pcap): refresh cached TShark availability in live sessions
2026-11-22 16:38:17 +00:00
morluto 787b5aafb9 perf(cli/mcp): decouple analysis view contracts and defer tshark PATH probes (#13316)
* perf(cli,mcp): decouple analysisViewResult/session contracts from CLI paths and defer tshark PATH probes

* test(cli): separate one-shot import suites from catalog startup
2026-11-22 14:54:02 +00:00
morluto 375483b6b3 perf(mcp/cli): skip unused output schema projection, error deep-clones, and startup z.toJSONSchema (#13426)
* perf(mcp/cli): skip unused output schema projection, error deep-clones, and startup z.toJSONSchema

Addresses #13354, #13275, #13302.

* refactor(contracts): share advertised input dialect traversal and rules
2026-11-22 09:08:37 -05:00
morluto e807ccdc48 perf(schemas): use discriminatedUnion and ownedJsonValueSchema for O(1) dispatch and zero-clone parsing (#13311)
Refs #13302
2026-11-22 08:54:27 -05:00
Xiangfang Chen 3ca89d8272 feat(android): pin jadx-headless-mcp 0.8.0
Move the audited engine release and its submodule gitlink from v0.7.1 to
v0.8.0 (commit 2b2a560e, sha256 4b9a01c2...). Upstream only changed
source-window paging and metadata-only field reads, so the six tools REA
consumes and the bridge identity stay unchanged.

Hand-copied version numbers now derive from JADX_RELEASE: the fixture
download name, the metadata-bridge workflow path and the fake MCP
server's reported engine version. The composition fallback availability
text no longer names a release, because the Android boundary owns the
versioned remediation.

Validation: build:cached, check:fast, docs:check, test:focused over the
16 Android test files (296 tests), and verify:android against the real
0.8.0 JAR and ApiDemos 6.0.18.
2026-11-22 16:01:00 +08:00
Afloat a16669ab2a feat(evidence): paginate retained evidence discovery summaries (#9084)
* feat(evidence): paginate retained evidence discovery summaries

Let callers page summary metadata in canonical Evidence ID order without loading record payloads into the response. Keep filter and link totals global to all matches and preserve the unpaged response for existing clients.

* test(evidence): use the supported compact schema profile

* docs(evidence): explain the summary pagination request default

* test: align verification fixtures with current public contracts

Keep the production changes from upstream and update the verification consumers that still asserted their retired contracts:

- assert unknown workflow identity structurally and retain the bounded provider caveats;
- observe the process capture's partial-error delivery while preserving live cleanup ownership assertions;
- use the package's declared imports in the isolated release controller;
- refresh the replay card digest after the Evidence subject identity migration;
- use the supported compact Kimi profile while testing case-insensitive environment keys;
- assert each public interface's own capture issue path.

These are shared test and verifier compatibility repairs. The evidence summary pagination and config-printer feature changes remain separate.

* test: observe the session close result in Kuna retry coverage

* test: follow the persisted DOL snapshot target identity

* test: align CLI and progress fixtures with shared owners

Reuse the core registrar for decompile-all instead of registering it twice
after upstream #11680. Assert the outer MCP start/completion notifications
separately from provider cleanup progress introduced by #11637, retaining
cleanup, rate, timeout, cancellation, and evidence assertions.

* docs: link CLI paging guidance to its canonical contract
2026-11-22 15:42:02 +08:00
morluto 11a75a5c19 fix(guidance): direct workflow errors to the scoped inventory (#13321)
* fix(guidance): direct workflow errors to the scoped inventory

* fix(mcp): type the progressive catalog registration boundary
2026-11-22 04:26:57 +00:00
morluto 87243c0c0e perf(schemas): eliminate generator/clone overhead in schema compaction and compact union projections (#13313) 2026-11-22 03:57:03 +00:00
morluto 4485912fd8 fix(evidence): bound omitted validation issue locations (#13309)
* fix(evidence): bound omitted validation issue locations

* fix(evidence): keep diagnostic locations that fit
2026-11-22 03:53:11 +00:00
morluto 7a2e8da495 perf(mcp): index tool contracts, skip unadvertised projection, parallelize status probes, and stream tool result sizing (#13263)
* perf(mcp): index tool contracts, skip unadvertised projection, parallelize status probes, and stream tool result sizing

* fix(mcp): await readiness before session status and defer omission worklist
2026-11-22 03:42:23 +00:00
Deepak Jain (DJ) fd40fd9ab2 fix(mcp): accept discover_tools in exact-name discovery batches (#13288)
With REA_MCP_TOOL_CATALOG_PROFILE=hot-cold, discover_tools is listed in
tools/list, yet an exact-name request that named it failed with "Unknown
or excluded tool names. No tools were loaded." Exact names load
atomically, so a batch such as ["inspect_sqlite_database",
"discover_tools"] also left the valid cold tool unloaded.

The catalog validated names against the domain registrations it was
built from, and the server registered the adapter only after building
it. The server now registers discover_tools first and passes that
registration to ProgressiveToolCatalog. Exact-name lookup, the returned
entries and both counts read one inventory that includes the adapter,
which replaces the two "+ 1" adjustments. Search and reset still cover
only domain tools, so a query never spends a page slot on the adapter
and reset never hides it. Unknown or excluded names are still rejected
before anything loads.

Signed-off-by: Deepak Jain <deepujain@gmail.com>
2026-11-21 21:37:07 -05:00
morluto 1ed4471c59 test(mcp): consolidate HTTP factory and shutdown settlement checks (#13253) 2026-11-21 20:19:28 -05:00
morluto 333e6de311 test(mcp): consolidate HTTP admission and socket reuse checks (#13252)
* test(mcp): consolidate HTTP admission and socket reuse checks

* test(mcp): report GET body assertions from the test
2026-11-22 01:09:29 +00:00
morluto 0299413e86 perf(mcp): filter prompt completions before sorting (#13251) 2026-11-22 01:09:10 +00:00
morluto 00974e5a61 test(mcp): consolidate progressive catalog wire checks (#13248) 2026-11-22 00:43:59 +00:00
Lewis WongandClaude Opus 5.5 2d182f865f fix(apple): report the declared archiver of a keyed archive
Keyed archives may now name another archiver, so the name is source
metadata a caller needs: a SceneKit scene says SCNKeyedArchiver. The
keyed-archive result gains `archiver`, the declared `$archiver` string, and
the inspect_keyed_archive contract describes archives written by
NSKeyedArchiver or a subclass archiver such as SCNKeyedArchiver instead of
NSKeyedArchiver plists only.

The reviewed golden graph adds `"archiver": "NSKeyedArchiver"` for its
capture; only its provenance digest changes, and the captured XML does not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 19:51:56 +01:00
Kaoru0822 8f2b865c06 perf(mcp): reduce deferred catalog startup data (#13039)
* perf(mcp): trim deferrable result schema storage

* test(mcp): guard the deferred catalog output projection

* test(mcp): validate hardening against the canonical output schema
2026-11-21 00:47:31 -08:00
morluto 4edb900bdd test(mcp): consolidate shutdown and retry lifecycle checks (#12847)
test(mcp): consolidate runtime shutdown and retry checks
2026-11-20 09:14:54 -05:00
morluto 11c951228c test(mcp): consolidate result delivery and capture checks (#12836) 2026-11-20 08:48:55 -05:00
morluto bb7bdd2fba test(mcp): consolidate admission and lifecycle checks (#12833)
* test(mcp): consolidate canonical batch capacity checks

* test(mcp): keep separate cold-start prompt checks

* test(mcp): consolidate byte entropy request checks

* test(mcp): consolidate progress checks and remove waiting sleeps
2026-11-20 08:44:13 -05:00
morluto 3caa46f980 test(mcp): consolidate derived operation progress coverage (#12778)
* test(mcp): consolidate derived operation cancellation and progress checks

* test(mcp): assert progress phases independently of wording

* test(mcp): narrow unknown notification messages before checking phases
2026-11-20 08:01:08 -05:00
bartman081523andmorluto d380dc2409 feat(uefi): add pure-TypeScript UEFI firmware analysis tools (#12342)
* feat(uefi): add pure-TS UEFI firmware volume/FFS parser with inspect/extract tools

Add a dependency-free rea-uefi provider that maps AMI/Aptio flash images:
- inspect_uefi_firmware: aligned _FVH discovery, volume-relative FFS walking,
  guided section/compression classification, conservative PSP-directory probing,
  embedded-volume rescan and leftover-region classification; incremental SHA-256
  and explicit integrity notes.
- extract_uefi_firmware: whole-image/volume/FFS-file/section extraction with
  LZMA-custom/LZMAF86 and AMD-zlib decoding, SafeOutputTree staging, derivations
  and extraction_gaps.
- UefiArtifactReader + 'uefi' format wiring across inventory/domain/contracts
  so parsed volumes and extracted PE32/TE files hand off to deep-provider
  analysis (open_binary -> Ghidra).

* feat(uefi): add inspect_uefi_nvram for AMI NVRAM variable stores

Add a pure-TypeScript tool that maps the vendor AMI NVRAM variable stores
(factory-default "StdDefaults" and peers) inside a flash image:
- scan the raw image for NVAR entry chains ("NVAR" + u16 total size +
  u32 attribute 0x8[23]FFFFFF + state + NUL-terminated name + data),
- recurse into a container entry whose data is itself an NVAR chain, so the
  StdDefaults setup variables surface as depth/parent_offset rows,
- report attributes, state, data range, SHA-256 and trailing padding per entry.

Verified against B550 AORUS Elite V2 FId: one StdDefaults store at 0x37090 with
the 11 expected nested variables (Setup, PlatformLang, AMITSESetup, XhciDID,
GcSensorVarName, PCI_COMMON, SioSetupData, UsbSupport, NetworkStackVar,
SecureBootSetup, Setup). Exposed as MCP tool and inspect-uefi-nvram CLI command.

* fix(uefi): address review on checksums, compression, guided sections, NVRAM bounds

- FFS file checksum: verify the two's-complement invariant (payload sum +
  stored byte == 0 mod 256) instead of comparing sums, and encode the correct
  complement in the fixture builder.
- Compression sections (type 0x01): use the 9-byte header and classify EFI
  standard compression instead of 'none', so extraction reports a gap rather
  than publishing compressed bytes as a raw section.
- GUID-defined sections: derive GUID/data-offset/attributes from the parsed
  common header size (compact or extended) and reject out-of-range payload
  offsets.
- AMI NVRAM: bound recursive chains to the enclosing container's data end and
  report partial coverage when a valid nested chain is cut by max_depth.

* fix(uefi): bound decode memory, serialize operations, enforce deadline, mark truncation

- LZMA worker: enforce max_output_bytes while decoding through a bounded output
  sink, so an oversized stream is rejected during expansion instead of after a
  full decompression plus a second Buffer copy.
- Provider: serialize admitted operations (the promised single decode-worker
  lane must not become one worker per overlapping call) and apply one
  whole-request deadline that covers every decode stage, not a fresh per-stream
  timer. close() drains the queue and the resource scope.
- Scan: track truncated sections of known type and report coverage partial
  instead of complete when a section declares more bytes than are present.

* fix(uefi): cancellable queue, timeout surfacing, availability and reader omissions

- Queue: check the caller signal before enqueue and when a job reaches the head,
  and race the queued promise against abort so a cancelled wait returns
  immediately instead of blocking behind the active request.
- Deadline: track the internal deadline and return AnalysisTimeoutError instead
  of the AnalysisCancelledError that runOwnedCommand reports for any external
  abort, preserving the real failure reason for CLI/MCP callers.
- CapabilityInventory: treat inspect_uefi_nvram like the other bundled rea-uefi
  tools so discovery does not demand Unblob for it.
- UefiArtifactReader: report image truncation through onOmission so inventory
  coverage reflects the unread suffix even when no volume was found.

* fix(uefi): limit early cancellation to unstarted jobs and preserve timeout cleanup

- #raceWithAbort only returns early for jobs that have not started; once a
  request is running, await it so worker cleanup and completed output are
  preserved instead of being discarded by a bare cancellation.
- Reclassify a deadline-induced cancellation as AnalysisTimeoutError while
  keeping its cause and cleanup observations, and never override a different
  primary failure.

* docs(licenses): record UEFI decoder dependency notices

* fix(uefi): preserve stream provenance and bound firmware analysis

* feat(uefi): decode LZMAF86 guided sections

* fix(uefi): validate publication before commit and order decoder cleanup

* fix(uefi): preserve unsupported volumes and extraction gaps

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 21:19:35 +00:00
hhangandhhang 9c25fb1e29 perf(mcp): defer runtime loading for scoped stdio discovery (#12237)
* perf(mcp): defer runtime loading for scoped stdio discovery

* test(mcp): cover prompt-first scoped stdio startup

---------

Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
2026-11-19 06:35:29 -05:00
morluto 85ac88fe87 fix(cli): classify MCP launcher arguments once (#12152)
Refs #12129
2026-11-19 03:59:09 +00:00
morluto df12107af5 test(environment): shrink catalog display fixtures (#11941) 2026-11-18 10:43:57 +08:00
morluto 4f68939830 test(environment): verify escaped card capacity at the wire boundary (#11937) 2026-11-18 10:28:39 +08:00
morluto 01e691f4a2 test(environment): use the compiled standalone card proof (#11935)
* test(environment): use the compiled standalone card proof

* test(environment): retire the mirrored card producer check
2026-11-18 10:15:28 +08:00
morluto a4a57727e9 test(environment): consolidate data-plane ordering proofs (#11929)
* test(environment): consolidate data-plane ordering proofs

* test(environment): check raw reset notification response

* test(environment): join controlled requests during cleanup
2026-11-18 10:00:15 +08:00
morluto 7ea9a229e9 test(environment): consolidate state reply budget proofs (#11921) 2026-11-18 09:42:01 +08:00
morluto 48e27e19b7 test: prune redundant and implementation-coupled coverage 2026-11-17 18:48:24 -05:00
morluto 8871ee882e test(mcp): consolidate guided workflow coverage across public adapters (#11886) 2026-11-18 06:59:02 +08:00
Matt Van Hornandgensokyo-dev 05be423acb feat(artifacts): inspect Maven POM and Gradle module metadata
Inspect local Maven/Gradle metadata as Evidence with bounded report/XML admission, preserved caller choices and owned cleanup.

Refs #8828; broader comparison and resolution work remains outside this change.

Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-17 14:40:38 +00:00
Matt Van Hornandgensokyo-dev 43b9fa87fb feat(artifacts): inspect NuGet package metadata and dependencies
Inspect supplied NuGet packages as local Evidence with bounded ZIP parsing, preserved caller choices and credential-safe metadata.

Fixes #8144

Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-17 13:13:02 +00:00
Matt Van Hornandgensokyo-dev 637e4cb60c feat(native): inspect DWARF compile units offline
Add bounded offline DWARF compilation-unit inspection with source provenance, explicit coverage, caller-selected controls and shared ELF compression framing.

Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-17 10:04:46 +00:00
Matt Van Hornandgensokyo-dev 54e3918d1c feat(elf): report separate debug-file linkage and verify a candidate debug file
Add offline ELF separate-debug linkage inspection with explicit candidate verification, bounded streaming, canonical parser limits and preserved complete/partial Evidence provenance.

Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-17 09:25:07 +00:00
Matt Van Hornandgensokyo-dev e9c72dbd1f feat(elf): inspect dynamic dependencies and required symbol versions
Add offline ELF dependency, search-path, symbol-version and import inspection with retained Evidence summaries and pages. Bound GNU-hash work and preserve cancellation, stable identity and caller-selected parameters across CLI/MCP.

Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-17 08:19:52 +00:00
morluto e741366c94 refactor(mcp): route managed operations through the session auxiliary route (#11773)
* refactor(mcp): route managed operations through the session auxiliary route

Refs #11674

* fix(mcp): preserve managed session factory for fixed sources and narrow port type
2026-11-16 16:30:22 -05:00