diff --git a/.agents/skills/reverse-engineer-anything/SKILL.md b/.agents/skills/reverse-engineer-anything/SKILL.md
index cd50cff64..3b508af1c 100644
--- a/.agents/skills/reverse-engineer-anything/SKILL.md
+++ b/.agents/skills/reverse-engineer-anything/SKILL.md
@@ -2,7 +2,7 @@
name: reverse-engineer-anything
description: Reverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.
metadata:
- version: "40"
+ version: "41"
---
# REA
@@ -61,11 +61,20 @@ explicit path or endpoint and do not need it.
consult the NativeAOT workflow in `references/native-and-artifacts.md` for
optional metadata recovery and its supported host/layout boundary.
- User-owned browser page already open: `list_browser_targets`.
-- Retained HAR/native mitmproxy capture: `inspect_web_network_capture`. Select
+- Fiddler Everywhere traffic or a native `.saz` capture: read the
+ [Fiddler workflow](references/runtime-observation.md#fiddler-everywhere-traffic-debugging).
+ Inspect saved SAZ with `inspect_web_network_capture` and `format: "saz"`;
+ connect Everywhere's separate MCP server for live traffic.
+- Retained HAR/SAZ/native mitmproxy/aioquic qlog capture: `inspect_web_network_capture`. Select
original record ordinals when useful; inspect producer fields and byte/number
sidecars without fetching recorded URLs or claiming live attribution. See
[historical captures](https://github.com/morluto/rea/blob/main/docs/web-network-captures.md) for the exact upstream
- profile and credential exclusions.
+ profile and credential exclusions. Qlog support starts with aioquic 1.5.0
+ JSON 0.3; stream coverage and endpoint loss declarations do not recover bodies
+ or establish network loss. Prefer detail summary, then kind qlog trace/stream
+ pages; select one trace, stream ID and direction for contribution/range pages.
+ Facts retain all-recorded-events-before-selection scope. Other qlog layouts
+ and PCAP correlation are unsupported.
- User-owned Electron runtime already open: `list_electron_targets`.
- Recorded packet captures: `inspect_packet_capture` with selected TShark fields,
display filters and decode-as rules. Requires Linux, util-linux prlimit and `REA_TSHARK_COMMAND`; see
diff --git a/.agents/skills/reverse-engineer-anything/references/runtime-observation.md b/.agents/skills/reverse-engineer-anything/references/runtime-observation.md
index 3e16a3e19..2d660d675 100644
--- a/.agents/skills/reverse-engineer-anything/references/runtime-observation.md
+++ b/.agents/skills/reverse-engineer-anything/references/runtime-observation.md
@@ -26,3 +26,18 @@ passive browser/Electron Evidence exist. Prefer captured-source digest identity;
report path/digest disagreement as a mismatch and preserve ambiguity. Explicit
path mappings are inference inputs and never broaden filesystem or CDP authority.
A bundle observed at runtime does not prove every contained module executed.
+
+## Fiddler Everywhere traffic debugging
+
+For large saved captures, request `detail: "summary"`, then page retained Evidence
+with `inspect_analysis_view` and `view: {kind: "capture", detail: "preview", offset: 0, limit: 20}`.
+Select complete record pages only for needed headers, metadata or payloads; views
+read the historical parent without repeating capture decoding.
+
+Inspect native `.saz` snapshots with `inspect_web_network_capture` and
+`format: "saz"`; encrypted archives are unsupported. For live
+traffic analysis, connect Everywhere's separate MCP server and use its
+advertised session tools with an explicit `sessionsSource` (`LiveTraffic` or
+`AgentCalls`). Preserve existing sessions and filters when inspecting a
+recorded run. See the [capture and MCP guide](https://github.com/morluto/rea/blob/main/docs/web-network-captures.md)
+for the workflow and Telerik's public setup and traffic-debugging skills.
diff --git a/README.md b/README.md
index 1e14f3a2d..49173ab4b 100644
--- a/README.md
+++ b/README.md
@@ -161,7 +161,7 @@ Additional tools and host support depend on the target:
| Recorded Linux crashes | Raw notes, every recorded thread's registers/signals and optional mapping candidates | Caller-supplied pwntools on Linux x64; optional GDB/pwndbg; [recorded crashes](docs/recorded-crashes.md) |
| JavaScript / Electron | Modules, imports, source maps, routes, IPC and native add-on relationships | Node.js and npm; [application analysis](https://rea.tools/guides/javascript/) |
| Websites | Page structure, scripts, network observations and requested screenshots | A Chrome-family browser; [browser analysis](https://rea.tools/guides/browser/) |
-| Saved network captures | Requests, responses, exposed payloads and source locations | HAR; mitmdump on Linux for native mitmproxy captures; [capture guide](docs/web-network-captures.md) |
+| Saved network captures | Requests, responses, exposed payloads and source locations | HAR or Fiddler Everywhere SAZ; mitmdump on Linux for native mitmproxy; [capture guide](docs/web-network-captures.md) |
| .NET assemblies | Metadata, CIL instructions, declared native dependencies and build comparisons | None (static only); [managed-code guide](docs/managed-code-analysis.md) |
| Android APKs | Manifest declarations, classes, decompiled methods and references | Headless JADX and a full JDK on Linux/macOS/Windows x64; [Android guide](docs/android-analysis.md) |
| Android devices | Devices, packages, processes, logs, dumps, screen captures, and APK/file transfers | Caller-supplied adb (emulator or hardware); [ADB guide](docs/adb-device-analysis.md) |
diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts
index 3b0a3f08f..3b604193e 100644
--- a/docs/.vitepress/config.ts
+++ b/docs/.vitepress/config.ts
@@ -37,6 +37,10 @@ export default defineConfig({
link: "/javascript-application-workflows",
},
{ text: "Browser observation", link: "/browser-observation" },
+ {
+ text: "Web network captures",
+ link: "/web-network-captures",
+ },
{ text: "Electron observation", link: "/electron-observation" },
{ text: "Process capture", link: "/process-capture" },
{ text: ".NET assemblies", link: "/managed-code-analysis" },
diff --git a/docs/android-analysis.md b/docs/android-analysis.md
index 5a4a2f879..d98d9b5da 100644
--- a/docs/android-analysis.md
+++ b/docs/android-analysis.md
@@ -9,6 +9,27 @@ This family is present on repository main and in npm 4.1.0. Check the
[released package boundary](installation.md#released-package-and-main) and the
connected server's tool list before selecting it.
+## Optional package delivery
+
+The MCP `inspect_android_package` request keeps complete output when `detail` is
+omitted or `"complete"`. Select `detail: "summary"` explicitly to receive all
+package, SDK and permission declarations, engine identity and class/resource
+counts without decoded manifest text or duplicate raw provider replies. A
+retaining session keeps the complete original Evidence and returns a distinct
+linked `inspect_analysis_view` summary. This changes delivery, not JADX analysis.
+
+Use the returned `normalized_result.parent_evidence_id` with
+`inspect_analysis_view`, source kind `retained-evidence`, and
+`view: {kind: "android", facet: "manifest", offset: 0, limit: 4096}` to read the
+exact decoded manifest without reopening the APK. Offsets and limits count UTF-16
+code units; follow `coverage.next_offset`. The page preserves `source_status` and
+`reported_total_bytes`: exhausting retained text does not make a partial decoded
+manifest complete. Complete source Evidence remains exportable under the existing
+session lifetime. Servers without retention reject summary before starting JADX.
+One-shot CLI output remains complete. Older servers require the existing complete
+request after schema discovery. APK authenticity and runtime behavior remain
+unverified.
+
## Supply tools
Use a **full JDK 17 or newer** (including its compiler module) and
diff --git a/docs/browser-observation.md b/docs/browser-observation.md
index 2e3d8e37c..2f73f4261 100644
--- a/docs/browser-observation.md
+++ b/docs/browser-observation.md
@@ -8,6 +8,10 @@ exported script's native imports under an explicit URL/import-map context.
REA can attach to a user-owned Chrome-family browser through the Chrome DevTools Protocol (CDP) and produce bounded Evidence about an existing page. This is a passive reverse-engineering capability, not a general browser automation or remote-control surface.
+For request/response bodies and traffic debugging, see
+[Fiddler Everywhere captures and MCP](web-network-captures.md#reading-fiddler-captures-saz).
+Inspect native SAZ or HAR 1.2 offline with REA, or connect Everywhere's separate MCP server.
+
## Shipped surfaces
- `list_browser_targets` / `rea list-browser-targets` discovers all eligible page targets at the endpoint by default, with an optional exact-origin filter.
diff --git a/docs/client-configuration.md b/docs/client-configuration.md
index c0e629d66..a6e254488 100644
--- a/docs/client-configuration.md
+++ b/docs/client-configuration.md
@@ -6,6 +6,12 @@ for the reviewed setup transaction and [client IDs](installation.md#supported-ag
The versioned verification notes below describe their stated runs; live service
acceptance is verified only where explicitly recorded.
+## Fiddler Everywhere alongside REA
+
+Connect Fiddler Everywhere's MCP server separately for HTTP traffic debugging,
+preserving your REA client entry. See the
+[setup instructions and public skills](web-network-captures.md#fiddler-everywhere-mcp-and-public-skills).
+
## GitHub Copilot CLI
For GitHub Copilot CLI 1.0.95, `gpt-4.1` model metadata can block ordinary
diff --git a/docs/packet-captures.md b/docs/packet-captures.md
index d56a80037..e8ce3ae92 100644
--- a/docs/packet-captures.md
+++ b/docs/packet-captures.md
@@ -4,7 +4,7 @@
in an existing capture. Network, USB or Bluetooth recordings can use the same
field/filter interface when the installed TShark supports their encapsulation
and dissectors. This tool does not acquire traffic, open an interface or control
-a device. HAR/mitmproxy web-capture workflows remain separate.
+a device. HAR/SAZ/mitmproxy web-capture workflows remain separate.
Supply an existing TShark 4.x installation **on Linux**, with util-linux
`prlimit` available at `/usr/bin/prlimit`. Override its absolute path with
diff --git a/docs/web-network-captures.md b/docs/web-network-captures.md
index d49f1dcc3..c447c4783 100644
--- a/docs/web-network-captures.md
+++ b/docs/web-network-captures.md
@@ -25,6 +25,36 @@ and original zero-based producer ordinals; duplicate or out-of-range selections
are input errors. Every record is validated before selection, so selecting one
entry does not hide a malformed entry elsewhere.
+For agent discovery over MCP, request `detail: "summary"`. REA retains the
+complete selected Evidence in the session and returns identity and counts.
+Use `normalized_result.parent_evidence_id` with `inspect_analysis_view`:
+
+```json
+{
+ "source": {
+ "kind": "retained-evidence",
+ "evidence_id": ""
+ },
+ "view": { "kind": "capture", "detail": "preview", "offset": 0, "limit": 20 }
+}
+```
+
+Preview pages select recorded HTTP headline fields, event names/times when
+present, original locations and byte descriptors; they omit headers, XML and
+payload content. Choose `detail: "complete"` in that view for exact record
+pages, including all sidecars. Offsets follow the parent's selected record
+order; producer ordinals remain unchanged. `total_records` counts the original
+capture while `retained_records` and page coverage count records in the parent.
+An exhausted page does not establish absence from unselected records.
+
+Views do not reopen the file or rerun its decoder. They remain historical
+Evidence if the source changes or disappears; inspect the capture again to
+observe new bytes. The inspection tool's default `detail: "complete"` preserves
+existing inline delivery. For CLI use, save complete inspection JSON and pass
+it as inline Evidence to `inspect-analysis-view`; the same summary and capture
+page contracts apply. Large complete records can still exceed MCP's response
+budget; export the retained Evidence when a single record cannot fit.
+
## Formats and upstream profiles
HAR uses unchanged `har-schema@2.0.0` draft-06 schemas, `ajv@8.20.0`,
@@ -57,11 +87,80 @@ tested upstream source is tag `v12.2.3`, commit
an explicit unsupported-profile diagnostic. Non-Linux native decoding is not
supported by this adapter.
+## Reading Fiddler captures (`.saz`)
+
+Fiddler Everywhere saves traffic in **Session Archive Zip (`.saz`)** files.
+Inspect native SAZ directly, without installing Fiddler or converting to HAR:
+
+```sh
+rea inspect-web-network-capture /absolute/session.saz saz --json
+rea inspect-web-network-capture /absolute/session.saz saz --record 0 --json
+```
+
+MCP uses the same `capture_path`, `format: "saz"`, and optional
+`record_ordinals` fields as the examples above. REA pairs `raw/_c.txt`
+requests, `_s.txt` responses, and `_m.xml` metadata by filename stem. Archive
+member names identify the source; zero-based ordinals follow each session's
+first member in ZIP directory order, not its numeric ID or capture time.
+
+HTTP fields and ordered duplicate headers are retained, with stored body bytes
+in binary sidecars. Bodies are not dechunked or decompressed. Metadata is an
+XML node tree; optional `_w.txt` and `_g.txt` files retain opaque WebSocket and
+gRPC message bytes. Missing members remain null, distinct from empty bodies.
+See Telerik's [SAZ format reference](https://www.telerik.com/fiddler/fiddler-everywhere/documentation/knowledge-base/fiddler-archives).
+
+The existing ZIP reader verifies read members; expanded archive contents are
+limited to 32 MiB in addition to the input/output budgets below. Encrypted
+archives and unrecognized raw session members are unsupported. SAZ requires an
+enforced decoder memory bound: Node's fixed heap, or the Windows Job Object
+commit limit. Bun on hosts without that Job Object limit returns capability
+unavailable before starting the SAZ decoder. Non-session
+members are inventoried without decoding their content. Original files remain
+unchanged. Linux verification includes independently checked public recorded
+Mattermost captures from [FOREST](https://github.com/dfrc-korea/FOREST/tree/405c9154658a128ea203a6c10040cec55111ed03/api-results/dataset)
+and the Fiddler author's [encoding corpus](https://github.com/ericlaw1979/Clearinet/blob/b6faf78cde1e72042980364f180ceb34b77d1434/Test/data/Encodings.saz),
+plus synthetic malformed/limit fixtures. Their exporting product versions are
+not authenticated. An interactive export from a current Fiddler Everywhere
+installation and its live MCP server remain unverified. Support here is the
+bounded documented raw HTTP/XML SAZ layout, not every product/version profile.
+
+For visual inspection, use Everywhere's **Import Snapshot**, then **Inspectors**
+and **Overview**. HAR remains an alternative: select sessions, choose
+**Export > HTTPArchive**, and confirm `log.version` is `"1.2"`. Preserve the
+original SAZ when exporting. See the [import/export instructions](https://www.telerik.com/fiddler/fiddler-everywhere/documentation/collaboration/exporting-and-importing).
+
+## Fiddler Everywhere MCP and public skills
+
+For agent-driven traffic debugging, connect Everywhere's MCP server separately
+from REA. Run a current Everywhere release with MCP access (Trial, Pro, or
+higher), internet access, and a compatible MCP client. Use
+**Settings > MCP Server > Coding agent**, or **Manual setup** with the generated
+API key. The default endpoint is `http://localhost:8868/mcp`. See Telerik's
+[MCP setup guide](https://www.telerik.com/fiddler/fiddler-everywhere/documentation/agent-tools/fiddler-mcp-server)
+and [agent-skills prerequisites](https://www.telerik.com/fiddler/fiddler-everywhere/documentation/agent-tools/agent-skills).
+
+Telerik's [public skills](https://github.com/telerik/fiddler-agent-tools) cover
+installation (`fiddler-download-setup`), connection setup, and traffic analysis:
+
+```sh
+npx skills add telerik/fiddler-agent-tools --skill fiddler-mcp-setup
+npx skills add telerik/fiddler-agent-tools --skill fiddler-traffic-debugging
+```
+
+After setup, reload the agent client and use the connected server's advertised
+tool names and schemas. Check status, list sessions, then inspect relevant
+session IDs. Set `sessionsSource` to `LiveTraffic` for HTTP(S) traffic or
+`AgentCalls` for enriched LLM calls; active filters affect the session list.
+For an existing run, skip the skill's pre-capture steps that replace process
+filters and clear sessions. The documented MCP session sources do not provide
+a saved-snapshot selector; use the SAZ workflow above for saved files. REA does
+not register or wrap the Fiddler MCP server.
+
## Reading the evidence
- `artifact` identifies the caller-selected file and stable snapshot digest.
-- `records` preserve producer order/ordinals and original JSON pointers or byte
- ranges. No live browser transaction or scenario IDs are invented.
+- `records` preserve producer order/ordinals and original JSON pointers, byte
+ ranges, or SAZ member names. No live browser transaction or scenario IDs are invented.
- `reported` retains the producer's fields. HAR container metadata is returned
separately, with `log.entries` replaced by `null` and `records_pointer`
identifying the record collection. This is an inspection representation,
@@ -156,7 +255,7 @@ response fields, including HAR's `status: 0` and an empty `mimeType`, remain
unknown, not invented statuses or MIME types.
The view makes no handler-identity, schema or causality claim. It performs no
-network activity. Native mitmproxy captures return a typed unsupported error.
+network activity. Native mitmproxy, SAZ and qlog captures return a typed unsupported error.
Parents inspected with `sensitive_values`, or whose Evidence does not record
`sensitive_value_count`, return a typed unsupported error whose reason is the
canonical token `sensitive_values_unretained`. The view would write path
@@ -192,14 +291,15 @@ Complete evidence has a 32 MiB input, 96 MiB decoder reply and 64-level nesting
budget. Exceeding a budget returns no partial success.
Oversized selected captures return an input error identifying `capture_path`
and the byte budget; owned reply/output failures remain output or provider errors.
-HAR runs in an owned
-192 MiB Node old-generation heap with one V8 worker. Native decoding applies
+HAR, SAZ and qlog run in an owned
+192 MiB Node old-generation heap with one V8 worker. Mitmproxy decoding applies
Linux limits of 768 MiB address space, 30 seconds CPU and 96 MiB file output;
both commands have a 30-second wall deadline and independently supervised
process cleanup. Owned decoder diagnostics retain at most 1 MiB across stdout
and stderr; the collector drops overflow as it arrives, reports the limit
failure and verifies cleanup. Heap limits alone do not establish aggregate RSS limits.
-When REA runs on Bun, the HAR decoder runs on Bun, which ignores these V8 heap
+SAZ and qlog refuse decoding when neither a Node heap limit nor a Windows Job Object bound can be enforced. Existing HAR availability is preserved.
+When REA runs on Bun, the HAR/SAZ/qlog decoder runs on Bun, which ignores these V8 heap
flags; its limitations and resource failures then omit the heap sizes. On
Windows, the decoder's owned Job Object instead limits its committed memory to
704 MiB, the 192 MiB budget plus a 512 MiB reserve for Bun itself. The
@@ -207,7 +307,7 @@ limitations state that limit, and reaching it returns `resource_constraint`
with `process_memory_limit_bytes`, whatever exit status Bun reports.
Observed decoder memory exhaustion returns `resource_constraint`, with the
-selected capture, applicable limits and retained process diagnostics. HAR's
+selected capture, applicable limits and retained process diagnostics. HAR/SAZ/qlog's
old-generation heap is fixed; inherited `NODE_OPTIONS` cannot raise it.
Record selection happens after complete decoding and does not reduce that
workload. Use a smaller capture exported by its producer or another decoder
@@ -234,3 +334,108 @@ Command cleanup failures retain the original status and both diagnostic streams;
the decoder's ownership preparation receives the same cancellation signal.
MCP advertises the same strict named input contract used by the application. Historical inspection delegates argument validation to that shared application boundary so accepted explicit-sensitive declarations also cover invalid argument names and other correction details. The SDK receives raw arguments through its Standard Schema interface; malformed inputs still fail before decoder or filesystem effects and return the normal structured REA error. Protocol-envelope validation remains owned by MCP.
+
+## Retained aioquic qlog
+
+Select `format: "qlog"` through `inspect_web_network_capture`, or:
+
+```bash
+rea inspect-web-network-capture /absolute/origin.qlog qlog --json
+rea inspect-web-network-capture /absolute/origin.qlog qlog --record 95 --record 0 --json
+```
+
+The initial profile is **aioquic 1.5.0, JSON qlog 0.3**: one JSON object with
+`qlog_format: "JSON"`, `qlog_version: "0.3"`, `traces` containing object events
+with `name`, finite numeric `time` and object `data`. JSON-SEQ, JSONL, columnar
+array events and other versions are unsupported. Duplicate JSON members,
+malformed UTF-8, invalid interpreted QUIC integers and excessive nesting fail
+without partial success, including in events outside the selected ordinals.
+Well-formed event subsets and missing frame metadata remain inspectable.
+Unknown extensions are retained; this is not validation of every qlog schema.
+
+Choosing the format selects the interpretation profile; the file does not
+necessarily report or authenticate an aioquic version. The profile's clock
+uses Unix-epoch milliseconds, verified in aioquic 1.5.0's `QuicLoggerTrace`
+`log_event`/`encode_time`. The `qlog.clock.basis` and Evidence analysis profile
+state that assumption explicitly. Numeric lexemes survive independently of
+safe JSON-number projections; decimal spelling does not establish physical
+clock precision or monotonicity.
+
+Every event has a global ordinal from trace/event source traversal and its
+original `/traces/T/events/E` pointer. This order is not a global time sort.
+Trace index and the selected artifact identify a connection observation;
+reported ODCID is preserved without claiming global uniqueness. Streams are
+scoped by trace, stream ID and sent/received direction. Control/QPACK streams
+are retained, so counting streams does not count HTTP requests.
+
+`qlog` is a typed facet required exactly for this format. Its scope is
+`all-recorded-events-before-selection`: selection changes returned event
+records while facts cite the original ordinals across the entire recorded
+file. The container retains trace metadata with each events array replaced
+by null; there is no single events pointer shared by all traces.
+
+| Fact | Basis and limits |
+| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Original event and loss declaration | Observed endpoint report; `recovery:packet_lost` does not prove actual network loss. Missing packet number/type remains unknown. |
+| STREAM ranges and byte totals | Derived per trace and direction from reported offsets and lengths using exact integer arithmetic. `unique_bytes` unions intervals; `frame_length_sum` includes overlaps; `repeated_bytes` is their difference. Overlap alone does not prove retransmission or equal contents. |
+| FIN final sizes | Reported offset plus length where FIN is true; multiple conflicting sizes remain visible. A final size does not establish complete coverage or a received body. |
+| Incomplete fact records | Ordinals with omitted/redacted interpretable frame metadata; usable fields in other records survive. An empty list does not establish complete logging or capture. |
+| HTTP bodies and causality | `body_bytes: "not-reported"`; lengths and headers are metadata, with no reconstructed body, hash, timing causality or live process attribution. |
+
+QUIC integer fields interpreted here accept exact nonnegative JSON integer
+values through `2^62 - 1`, including equivalent exponent notation. Offsets plus
+lengths must fit that range. Derived sums are decimal strings and are not
+rounded to JavaScript numbers. A missing offset is unknown, never defaulted to
+zero. Ranges can start above zero or contain gaps. Packet headers, HTTP events,
+raw lengths and unknown extensions remain producer evidence rather than being
+normalized into invented HAR requests.
+
+The adapter excludes authorization/proxy authorization/cookie/set-cookie
+values in known HTTP frame events, reset tokens in transport parameters and
+NEW_CONNECTION_ID frames, and NEW_TOKEN frame tokens. Known URL header userinfo
+and explicit sensitive values follow the shared exclusions. Ordinary extension
+fields and token-looking query text remain retained. Explicit declarations also
+cover normalized numeric projections, derived totals and trace pointers; facts
+that cannot be safely shown are omitted with incomplete-record coordinates.
+No keylog, PCAP, live URL or recorded target is opened by the qlog decoder.
+
+To repeat the real-provider lane with **local caller-supplied evidence** from
+the educational aioquic 1.5.0 experiment (one origin trace, known 32,803-byte
+stream coverage and one 1,169-byte repeated range in the loss case):
+
+```bash
+npm run verify:web:qlog -- /absolute/control/origin.qlog /absolute/loss/origin.qlog /absolute/new-report.json
+```
+
+This lane checks built CLI/stdio MCP parity, SDK-converted JSON Schemas,
+artifact digests, original event count, selection scope, retained parent lookup,
+credential exclusions and the known control/loss facts. The report is created
+exclusively and contains no keys or captured credential values. It is a
+fixture-specific verification, not a general loss detector. CI uses synthetic
+format inputs for malformed cases and limits; those tests do not establish
+producer provenance. PCAP parsing and correlation remain outside this stage.
+
+### Focused qlog views
+
+Use MCP `inspect_web_network_capture` with `format: "qlog", detail: "summary"`
+for identity, profile, scope and retained-fact counts. Then pass its
+`normalized_result.parent_evidence_id` to `inspect_analysis_view` as a
+`retained-evidence` source.
+
+```json
+{"kind":"qlog","facet":"traces","offset":0,"limit":10}
+{"kind":"qlog","facet":"streams","trace_index":0,"offset":0,"limit":10}
+{"kind":"qlog","facet":"contributions","trace_index":0,"stream_id":"0","direction":"sent","offset":0,"limit":20}
+```
+
+Trace pages omit nested lists and give their counts. Stream pages preserve
+exact byte totals but omit contributions, ranges and final-size lists. For
+those lists select `contributions`, `ranges` or `final-sizes` with all three
+stream selectors. `loss-declarations` and `incomplete-records` need only
+`trace_index`. Offsets count rows in that retained facet; defaults are 0 and 64. Missing or ambiguous selectors fail rather than choosing a connection.
+
+These views page already interpreted facts without decoding again or opening
+the source, and work after its deletion. Facts still cover all recorded events
+before parent record selection. Their exhaustion does not prove logging or
+network completeness. Event preview/complete pages remain available through
+kind `capture`, with original numeric lexemes and producer ordinals preserved.
diff --git a/experiments/analysis-efficiency/README.md b/experiments/analysis-efficiency/README.md
index 79bac97e0..8afef3a66 100644
--- a/experiments/analysis-efficiency/README.md
+++ b/experiments/analysis-efficiency/README.md
@@ -37,6 +37,11 @@ raw MCP replies from observed client execution/discovery and usage. Optional
trial capture retains tool/usage items while excluding account and ambient state;
existing ephemeral trials keep their default behavior.
+Follow-up: [Android package delivery and retained manifest](android-package-summary.md)
+records real NewPipe SDK pairs, unchanged old requests/Evidence, exact retained
+text, and actual Codex outcomes including client errors and a failed discovery.
+Reply bytes fall; model-token/time gains are not established.
+
Follow-up: [resource counters at payload completion](resource-counters.md) adds
optional owned counter observations while preserving unknown whole-scope final
counters, default receipt shape and the unchanged CPU/memory safeguards.
diff --git a/experiments/analysis-efficiency/android-package-summary.md b/experiments/analysis-efficiency/android-package-summary.md
new file mode 100644
index 000000000..448202d87
--- /dev/null
+++ b/experiments/analysis-efficiency/android-package-summary.md
@@ -0,0 +1,166 @@
+# Android package summary and exact retained manifest
+
+Continues [#2016](https://github.com/morluto/rea/issues/2016) and
+[#2438](https://github.com/morluto/rea/pull/2438). The recurring NewPipe question
+asks for APK/package/version identity, all case-sensitive MainActivity matches
+and all reported onCreate entries, including explicit null DEX descriptors.
+Complete package replies delivered decoded manifest text and duplicate upstream
+calls unrelated to those selected facts.
+
+## Compatibility and ownership
+
+MCP `inspect_android_package` accepts explicit `detail: "summary"`; omitted and
+`"complete"` requests preserve the complete output and provider request. The
+one-shot CLI stays complete. Summary selection happens in the application
+workflow, independently of the engine protocol, using the existing retained
+analysis-view machinery. No third-party plugin API or persistent analysis cache
+is introduced. Servers lacking retention reject summary before provider work.
+
+The complete original Evidence stays under its original ID and session lifetime.
+A distinct linked derived view returns all package/SDK/permission declarations,
+engine identity, class/resource counts and signature-verification status.
+Manifest metadata retains the producer's partial/complete status, nullable
+reported byte total, and observed UTF-16 length. Text and duplicate raw calls
+remain in the original record, rather than being rewritten under its ID.
+
+Use `inspect_analysis_view` with the parent's ID and
+`view: {kind: "android", facet: "manifest", offset: 0, limit: 4096}` to read exact
+retained decoded text. Follow `coverage.next_offset`; surrogate boundaries use
+the existing text-page implementation. Exhaustion describes the retained text,
+not global completeness when the producer says partial. APK signatures and
+runtime behavior remain unverified. Engine artifact SHA-256 identifies the JAR;
+views require the authenticated APK subject and never substitute the engine
+hash for a missing target identity. Older servers require schema discovery and
+the original complete request; automatic fallback is not introduced.
+
+## Frozen runtime and real SDK pairs
+
+Source runtime: `28c84e78cf2fbfde4aceed345b773c59eb889f68`; later test-only schema
+typing corrections do not relabel these receipts. Compiled dist/bridge file-table
+SHA-256: `5332dda13981f043e146b3601ebec1f380d9f698280ca53d75786b638a912e11`.
+The frozen old runtime is `8bc1601ca51e417ca472d90ea0367e9418a1a0f2`, digest
+`9e7380f537301bf0cfe2926f5619011af848af7c220750e75189498e65d825e1`.
+
+Real NewPipe 0.29.1 bytes, acquisition and digest are pinned in `corpus.json`.
+Actual configured JADX headless MCP 0.7.1/Java runs use the same selected
+provider settings and search-path digests, one worker and 768 MiB Java heap.
+Node is 24.18.0; actual SDK client/server are 2.3.1. Processes and engines are
+fresh per trial; host page caches are not flushed. SDK schema mode is selected
+in both treatments. Heavy runs are serial, with one CPU, unchanged 3 GiB early
+stop/4 GiB hard memory, no swap, and 192 tasks.
+
+All four candidate workflows use three successful public MCP calls. Only the
+first package delivery changes. Both pairs pass settings and selected-fact
+comparison, including all declarations, manifest status/length, engine identity,
+original limitations, matching class rows and onCreate entries. Original replies
+and IDs remain separate. A fresh old-runtime complete workflow also passes
+comparison against the candidate complete request; both complete package replies
+are exactly 119,527 compact client-result JSON bytes. This is scoped compatibility
+evidence, not a guarantee for every historical release/client/host.
+
+| Trial | Package reply bytes | SDK workflow seconds | Payload CPU seconds | Kernel peak bytes |
+| -------------- | ------------------: | -------------------: | ------------------: | ----------------: |
+| sdk-complete-1 | 119,527 | 24.059 | 25.259 | 1,225,076,736 |
+| sdk-summary-1 | 8,659 | 23.694 | 24.894 | 1,226,870,784 |
+| sdk-summary-2 | 8,659 | 24.407 | 25.611 | 1,228,296,192 |
+| sdk-complete-2 | 119,527 | 24.509 | 25.740 | 1,229,844,480 |
+
+Summary replies are 8,659 bytes, about 92.8% smaller; all three replies together
+fall from 149,577 to 38,709 bytes. This is a delivery result, not a model-token
+or engine-work saving. The SDK timing differences are small. CPU and memory do
+not establish a reduction. No provider setting or analysis scope changes.
+Transport roundtrip includes server/client work and is not an engine-only timer.
+
+The complete catalog is 2,506,213 compact JSON bytes versus 2,497,635 on the old
+runtime: about 0.34% growth, including intervening main changes. Discovery cost
+remains visible alongside selected-delivery savings.
+
+## Authentic old Evidence continuation
+
+A real package record from old runtime 8bc160 imports into the candidate and
+supports retained summary, exact manifest pages, inline portable summary and
+export through actual public SDK tools. The new session explicitly selects an
+absent JADX JAR; this workflow performs no package analysis. Eleven successful
+calls preserve the original record, original ID, all declarations and all 25,222
+manifest UTF-16 units. Manifest UTF-8 SHA-256:
+`fee192fe2a6d7892c22cba115184c74c7e2c42ce464e8bb37be6289f2c16881d`.
+The exported original record is deeply equal to the imported record.
+
+## Actual Codex task outcomes
+
+Four serial trials run in complete/summary/summary/complete order on the same
+frozen candidate. Requested configuration: Codex CLI 0.161.0, `gpt-5.6-terra` high,
+three exact selected tool names and the same optional context/discovery capture
+settings. The requested alias does not certify the server-resolved model. The
+original analyst question is unchanged; equal treatment instructions explicitly
+choose package detail and explain the summary carrier. Temporary configuration
+points to the frozen modified REA MCP; no global configuration is edited.
+
+| Trial | Input | Cached | Uncached | Output | Seconds | MCP calls | Usage records | Facts |
+| ---------------- | ------: | -----: | -------: | -----: | ------: | --------: | ------------: | ----- |
+| model-complete-1 | 39,267 | 23,040 | 16,227 | 1,690 | 94.053 | 3 | 3 | Pass |
+| model-summary-1 | 128,417 | 93,440 | 34,977 | 3,633 | 150.401 | 8 | 9 | Pass |
+| model-summary-2 | 54,437 | 37,120 | 17,317 | 2,185 | 123.677 | 3 | 4 | Pass |
+| model-complete-2 | 21,332 | 9,984 | 11,348 | 667 | 20.774 | 0 | 2 | Fail |
+
+Three answers pass the original selected-fact gate against the actual SDK
+producer. Each trial preserves APK bytes and removes its isolated profile.
+The first summary trial makes five successful calls and three rejected requests:
+an invented `case_sensitive` argument, empty class-search input and empty
+class-inspection input. It then repeats successful package/search work. These
+errors and correction turns remain part of measured task cost; strict existing
+schemas correctly reject them. The second summary trial uses the intended three
+successful calls, but still does not establish improved total/uncached input or
+latency against the factually acceptable first complete control.
+
+The final complete control's first client executor filters `ALL_TOOLS` for the
+same three exact names and receives an empty array. It makes zero MCP calls,
+reports all requested facts unknown and fails the factual gate. Identical name
+filters worked in the other trials. Stderr contains no explanatory error; the
+client visibility failure remains unexplained and is not attributed to REA or
+summary delivery. Its short duration is not comparable completed work. The
+original failed receipt is retained rather than replaced by a successful trial.
+
+These measurements demonstrate no real-model token or speed gain. Smaller raw
+MCP envelopes do not establish smaller model context; observed usage also
+includes discovery, execution context, corrections and extra responses. Usage
+records count captured usage items rather than asserting exact remote request
+contents or equating MCP calls with model rounds. The complete default and
+opt-in choice remain unchanged; this is useful delivery/retention capability,
+not a general performance recommendation.
+
+All model runs have verified payload-completion witnesses with only the observer
+remaining and zero memory/task limit events at that phase. Kernel peaks are
+602,472,448–1,444,945,920 bytes; the failed no-analysis control is included in that
+range and is not evidence of lower analysis memory. Whole-scope final counters
+remain unknown and the existing full resource grader stays false. No broader
+CPU, memory, OS/provider or model claim is made.
+
+## Resource interpretation
+
+Every SDK run and portable continuation has a verified owned
+payload-exited-observer-alive witness, with only the observer remaining and no
+memory/task limit events at that phase. Kernel peak and CPU include that opt-in
+observer. Whole-scope terminal counters remain unknown; the existing complete
+physical resource grader is not changed or called successful. No OOM stress or
+resource-limit increase is used.
+
+## Verification and scope
+
+Twenty-seven relevant converted-schema, SDK, domain and existing Android
+failure/cancellation/cleanup checks pass. A three-case focused rerun passes after
+a test-only schema typing correction. The 1 MiB manifest protocol fixture verifies
+original default/full output, reconstruction after source removal, unchanged
+exported Evidence and one engine launch. Other cases preserve nulls and partial
+status, Unicode boundaries and tagged malformed/missing-identity failures, and
+reject unavailable retention or cancelled requests before provider work. These
+fixtures verify production boundaries; actual JADX claims use the real NewPipe
+runs above. Full supported single-thread compiler and unchanged lint pass under
+the same memory safeguards. No other Android OS/device/provider lane is inferred.
+
+Raw SDK/model replies, private profiles and resource receipts stay outside Git.
+Reproduce SDK pairs using the existing `measure.mjs` with `--artifact newpipe.apk`,
+`--schemas selected`, identical explicit provider configuration and frozen runtime,
+and alternating `--delivery complete` / `--delivery summary`. Preserve failed
+attempts and run `compare.mjs` on both pair orders. Model findings require their
+own identical analyst facts and explicit delivery controls.
diff --git a/experiments/analysis-efficiency/measure.mjs b/experiments/analysis-efficiency/measure.mjs
index 3e34d935e..bfac3adb6 100644
--- a/experiments/analysis-efficiency/measure.mjs
+++ b/experiments/analysis-efficiency/measure.mjs
@@ -666,7 +666,40 @@ const workflows = {
}
},
"newpipe.apk": async () => {
- const pkg = await call("inspect_android_package", { path: values.path });
+ const packageInput = {
+ path: values.path,
+ ...(values.delivery === "summary" ? { detail: "summary" } : {}),
+ };
+ const definition = catalogDefinitions.get("inspect_android_package");
+ if (
+ definition === undefined ||
+ !new Ajv2020({ strict: false, validateFormats: false }).validate(
+ definition.inputSchema,
+ packageInput,
+ )
+ )
+ throw new Error(
+ "Selected Android delivery is not advertised by this runtime",
+ );
+ const pkg = await call("inspect_android_package", packageInput);
+ const result = normalized(pkg);
+ const report = values.delivery === "summary" ? result.summary : result;
+ if (
+ values.delivery === "summary" &&
+ (result.kind !== "summary" ||
+ result.parent_operation !== "inspect_android_package")
+ )
+ throw new Error("Runtime returned no retained Android package summary");
+ const { manifest, ...declarations } = report;
+ const manifestObservation =
+ values.delivery === "summary"
+ ? manifest
+ : {
+ status: manifest.status,
+ reported_total_bytes: manifest.reported_total_bytes,
+ text_code_units: manifest.text.length,
+ text_included: false,
+ };
const found = await call("search_android_classes", {
path: values.path,
query: "MainActivity",
@@ -677,9 +710,12 @@ const workflows = {
});
return {
artifact_sha256: targetSha(pkg),
- package_name: normalized(pkg).package_name,
- version_name: normalized(pkg).version_name,
- version_code: normalized(pkg).version_code,
+ package_name: report.package_name,
+ version_name: report.version_name,
+ version_code: report.version_code,
+ package_declarations: declarations,
+ manifest_observation: manifestObservation,
+ package_limitations: pkg.limitations,
matches: normalized(found).matches,
coverage: normalized(found).coverage,
onCreate: normalized(cls).methods.filter(
diff --git a/package.json b/package.json
index f803cc00c..801f72ebf 100644
--- a/package.json
+++ b/package.json
@@ -278,7 +278,8 @@
"artifacts:error-schema": "node scripts/generate-error-schema.mjs",
"test:prepare": "node scripts/check-dependency-install.mjs && node scripts/run-exclusive.mjs artifacts turbo run artifacts:mcp-catalog artifacts:product-catalog artifacts:managed-evidence",
"evidence:check:built": "node scripts/generate-completion-ledger.mjs --check",
- "docs:prepare": "node scripts/generate-package-metadata.mjs && turbo run artifacts:product-catalog artifacts:managed-evidence artifacts:error-schema"
+ "docs:prepare": "node scripts/generate-package-metadata.mjs && turbo run artifacts:product-catalog artifacts:managed-evidence artifacts:error-schema",
+ "verify:web:qlog": "npm run build:cached && node scripts/verify-qlog-captures.mjs"
},
"lint-staged": {
"*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}": [
diff --git a/scripts/lib/catalog-builders.mjs b/scripts/lib/catalog-builders.mjs
index 1658c08fa..f97f5ed5c 100644
--- a/scripts/lib/catalog-builders.mjs
+++ b/scripts/lib/catalog-builders.mjs
@@ -272,6 +272,11 @@ export const providerCatalog = (sources) => {
contracts:
sources.webNetworkCaptureContracts.WEB_NETWORK_CAPTURE_TOOL_CONTRACTS,
},
+ {
+ identity: sources.webNetworkCaptureProvider.SAZ_CAPTURE_PROVIDER_IDENTITY,
+ contracts:
+ sources.webNetworkCaptureContracts.WEB_NETWORK_CAPTURE_TOOL_CONTRACTS,
+ },
{
identity:
sources.webNetworkCaptureProvider.MITMPROXY_CAPTURE_PROVIDER_IDENTITY,
diff --git a/scripts/verify-qlog-captures.mjs b/scripts/verify-qlog-captures.mjs
new file mode 100644
index 000000000..8d1a16f6c
--- /dev/null
+++ b/scripts/verify-qlog-captures.mjs
@@ -0,0 +1,215 @@
+#!/usr/bin/env node
+import assert from "node:assert/strict";
+import { execFile } from "node:child_process";
+import { createHash } from "node:crypto";
+import { readFile, writeFile } from "node:fs/promises";
+import { isAbsolute } from "node:path";
+import { fileURLToPath } from "node:url";
+import { promisify } from "node:util";
+import { Client } from "@modelcontextprotocol/client";
+import { StdioClientTransport } from "@modelcontextprotocol/client/stdio";
+import { Ajv2020 } from "ajv/dist/2020.js";
+import { parseEvidence } from "../dist/domain/evidence.js";
+
+// Caller-supplied producer evidence stays local; no fixture capture or secrets are bundled.
+const [controlPath, lossPath, reportPath] = process.argv.slice(2);
+if (
+ ![controlPath, lossPath, reportPath].every(
+ (value) => typeof value === "string" && isAbsolute(value),
+ )
+)
+ throw new Error(
+ "Usage: node scripts/verify-qlog-captures.mjs /absolute/control/origin.qlog /absolute/loss/origin.qlog /absolute/new-report.json",
+ );
+const entrypoint = fileURLToPath(new URL("./rea.mjs", import.meta.url));
+const client = new Client({ name: "qlog-producer-verifier", version: "1" });
+const environment = {
+ PATH: process.env.PATH ?? "/usr/bin:/bin",
+ REA_LOG_LEVEL: "silent",
+ HOPPER_LAUNCHER_PATH: "/rea-unconfigured-deep-provider/hopper",
+};
+const transport = new StdioClientTransport({
+ command: process.execPath,
+ args: [entrypoint, "mcp"],
+ env: environment,
+ stderr: "pipe",
+});
+let diagnostics = "";
+transport.stderr?.on("data", (bytes) => {
+ if (diagnostics.length < 65536) diagnostics += bytes.toString("utf8");
+});
+const ajv = new Ajv2020({ strict: false, validateFormats: false });
+const measurements = [];
+try {
+ try {
+ await client.connect(transport);
+ } catch (cause) {
+ throw new Error(`MCP startup failed: ${diagnostics}`, { cause });
+ }
+ const tool = (await client.listTools()).tools.find(
+ (tool) => tool.name === "inspect_web_network_capture",
+ );
+ assert.ok(tool?.outputSchema);
+ for (const schema of [tool.inputSchema, tool.outputSchema])
+ assert.ok(ajv.validateSchema(schema));
+ const validateOutput = ajv.compile(tool.outputSchema);
+ for (const [lane, path] of [
+ ["control", controlPath],
+ ["loss", lossPath],
+ ]) {
+ const source = await readFile(path);
+ const raw = JSON.parse(source.toString("utf8"));
+ const sha256 = createHash("sha256").update(source).digest("hex");
+ assert.equal(raw.qlog_format, "JSON");
+ assert.equal(raw.qlog_version, "0.3");
+ const input = { capture_path: path, format: "qlog" };
+ assert.ok(ajv.validate(tool.inputSchema, input));
+ const response = await client.callTool({
+ name: tool.name,
+ arguments: input,
+ });
+ assert.notEqual(response.isError, true);
+ assert.ok(
+ validateOutput(response.structuredContent),
+ JSON.stringify(validateOutput.errors),
+ );
+ const mcp = parseEvidence(response.structuredContent);
+ const completed = await promisify(execFile)(
+ process.execPath,
+ [entrypoint, "inspect-web-network-capture", path, "qlog", "--json"],
+ { env: environment, timeout: 40_000, maxBuffer: 96 * 1024 * 1024 },
+ );
+ const cli = parseEvidence(JSON.parse(completed.stdout));
+ assert.equal(cli.evidence_id, mcp.evidence_id);
+ assert.deepEqual(cli.normalized_result, mcp.normalized_result);
+ const capture = mcp.normalized_result;
+ assert.equal(capture.artifact.sha256, sha256);
+ assert.equal(
+ capture.total_records,
+ raw.traces.reduce((sum, trace) => sum + trace.events.length, 0),
+ );
+ for (const [ordinal, original] of raw.traces
+ .flatMap((trace) => trace.events)
+ .entries()) {
+ const record = capture.records[ordinal];
+ assert.equal(record.ordinal, ordinal);
+ assert.equal(record.reported.name, original.name);
+ assert.equal(record.reported.time, original.time);
+ assert.deepEqual(record.binary_fields, []);
+ assert.ok(
+ record.numeric_literals.some(
+ (number) =>
+ number.pointer === "/time" &&
+ Number(number.literal) === original.time,
+ ),
+ );
+ }
+ assert.equal(capture.qlog.body_bytes, "not-reported");
+ assert.equal(mcp.authority, "historical-reference");
+ assert.equal(
+ mcp.analysis_profile.parameters.qlog_profile,
+ "aioquic-1.5.0-json-0.3",
+ );
+ const trace = capture.qlog.traces[0];
+ assert.equal(trace.vantage_point, "server");
+ const stream = trace.streams.find(
+ (stream) => stream.stream_id === "0" && stream.direction === "sent",
+ );
+ assert.ok(stream);
+ assert.equal(stream.unique_bytes, "32803");
+ assert.equal(
+ stream.frame_length_sum,
+ lane === "control" ? "32803" : "33972",
+ );
+ assert.equal(stream.repeated_bytes, lane === "control" ? "0" : "1169");
+ assert.equal(trace.loss_declarations.length, lane === "control" ? 0 : 1);
+ if (lane === "loss")
+ assert.deepEqual(trace.loss_declarations[0].packet_number, {
+ state: "reported",
+ value: "5",
+ });
+ // Structurally-known secrets may not survive in Evidence, including sidecars.
+ const serialized = JSON.stringify(mcp);
+ for (const original of raw.traces.flatMap((trace) => trace.events)) {
+ if (
+ original.name === "transport:parameters_set" &&
+ typeof original.data.stateless_reset_token === "string"
+ )
+ assert.ok(!serialized.includes(original.data.stateless_reset_token));
+ for (const frame of original.data.frames ?? []) {
+ if (
+ frame.frame_type === "new_connection_id" &&
+ typeof frame.reset_token === "string"
+ )
+ assert.ok(!serialized.includes(frame.reset_token));
+ if (frame.frame_type === "new_token" && typeof frame.token === "string")
+ assert.ok(!serialized.includes(frame.token));
+ }
+ }
+ const retained = await client.callTool({
+ name: "inspect_analysis_view",
+ arguments: {
+ source: { kind: "retained-evidence", evidence_id: mcp.evidence_id },
+ view: { kind: "api-surface" },
+ },
+ });
+ assert.equal(retained.isError, true);
+ assert.equal(
+ JSON.parse(retained.content.find((item) => item.type === "text").text)
+ .error.code,
+ "unsupported_target",
+ );
+ const selected = await client.callTool({
+ name: tool.name,
+ arguments: { ...input, record_ordinals: [capture.total_records - 1, 0] },
+ });
+ const subset = parseEvidence(selected.structuredContent).normalized_result;
+ assert.deepEqual(
+ subset.records.map((record) => record.ordinal),
+ [capture.total_records - 1, 0],
+ );
+ assert.deepEqual(subset.qlog, capture.qlog);
+ measurements.push({
+ lane,
+ path,
+ sha256,
+ evidence_id: mcp.evidence_id,
+ profile_digest: mcp.analysis_profile.digest,
+ events: capture.total_records,
+ stream_id: stream.stream_id,
+ unique_bytes: stream.unique_bytes,
+ frame_length_sum: stream.frame_length_sum,
+ repeated_bytes: stream.repeated_bytes,
+ loss_declarations: trace.loss_declarations.length,
+ cli_mcp_parity: true,
+ retained_reference: true,
+ selected_scope_preserved: true,
+ auth_exclusions: true,
+ });
+ }
+ await client.ping();
+ const report = {
+ status: "passed",
+ profile: "aioquic-1.5.0-json-0.3",
+ measurements,
+ limitations: [
+ "Caller supplies provenance; format selection does not authenticate the producer.",
+ "These known loopback cases do not establish WAN behavior, other qlog producers, platforms or general completeness.",
+ "No PCAP or keylog is read by this verifier; repeated STREAM coverage is not proof of retransmission or network loss.",
+ ],
+ };
+ await writeFile(reportPath, JSON.stringify(report, null, 2) + "\n", {
+ flag: "wx",
+ mode: 0o600,
+ });
+ console.log(
+ JSON.stringify({
+ status: report.status,
+ cases: measurements.length,
+ report: reportPath,
+ }),
+ );
+} finally {
+ await client.close();
+ await transport.close();
+}
diff --git a/src/application/WebNetworkCaptureService.ts b/src/application/WebNetworkCaptureService.ts
index 326016a26..8e29ebb10 100644
--- a/src/application/WebNetworkCaptureService.ts
+++ b/src/application/WebNetworkCaptureService.ts
@@ -10,12 +10,14 @@ import {
AnalysisInputError,
AnalysisOutputError,
} from "../domain/analysisErrorCore.js";
+import { createAnalysisProfile } from "../domain/analysisProfile.js";
import { createEvidence, type Evidence } from "../domain/evidence.js";
import { analysisInputErrorFromIssues } from "../domain/inputIssueProjection.js";
import { jsonObjectSchema } from "../domain/jsonValue.js";
import { err, ok, type Result } from "../domain/result.js";
import {
inspectWebNetworkCaptureInputSchema,
+ captureSensitiveValues,
webNetworkCaptureSchema,
} from "../domain/webNetworkCapture.js";
@@ -32,21 +34,8 @@ export class WebNetworkCaptureService {
): Promise> {
if (options?.signal?.aborted)
return err(new AnalysisCancelledError(OPERATION));
- const declarations =
- inspectWebNetworkCaptureInputSchema.shape.sensitive_values.safeParse(
- typeof rawInput === "object" &&
- rawInput !== null &&
- "sensitive_values" in rawInput
- ? rawInput.sensitive_values
- : undefined,
- );
const failure = (error: AnalysisError): Result =>
- err(
- redactExplicitFailure(
- error,
- declarations.success ? declarations.data : [],
- ),
- );
+ err(redactExplicitFailure(error, captureSensitiveValues(rawInput)));
const parsed = inspectWebNetworkCaptureInputSchema.safeParse(rawInput);
if (!parsed.success)
return failure(
@@ -187,6 +176,15 @@ export class WebNetworkCaptureService {
? [...limitations, subjectUnavailableReason]
: limitations,
},
+ ...(safeValue.format !== "qlog"
+ ? {}
+ : {
+ analysisProfile: createAnalysisProfile(value.decoder, {
+ qlog_profile: safeValue.qlog.profile,
+ clock: safeValue.qlog.clock,
+ scope: safeValue.qlog.scope,
+ }),
+ }),
confidence: "observed",
authority: "historical-reference",
limitations,
diff --git a/src/application/analysisView/AnalysisViewService.ts b/src/application/analysisView/AnalysisViewService.ts
index a5b603a86..baaa6b7ca 100644
--- a/src/application/analysisView/AnalysisViewService.ts
+++ b/src/application/analysisView/AnalysisViewService.ts
@@ -47,14 +47,8 @@ export const inspectAnalysisViewValidated = (
input: InspectAnalysisViewInput,
lookup?: EvidenceLookup,
): Result => {
- const inline = input.source.kind === "inline" ? input.source.evidence : null;
- const inlineCapture =
- typeof inline === "object" &&
- inline !== null &&
- Object.getOwnPropertyDescriptor(inline, "operation")?.value ===
- "inspect_web_network_capture";
const accumulator =
- input.view.kind === "api-surface" || inlineCapture
+ input.view.kind === "api-surface"
? new WebNetworkApiSurfaceAccumulator()
: undefined;
if (input.source.kind === "inline" && accumulator !== undefined) {
diff --git a/src/application/android/AndroidPackageInspection.ts b/src/application/android/AndroidPackageInspection.ts
new file mode 100644
index 000000000..3fbaa2f1b
--- /dev/null
+++ b/src/application/android/AndroidPackageInspection.ts
@@ -0,0 +1,43 @@
+import type { ExecutionOptions } from "../AnalysisProvider.js";
+import type { AndroidAnalysisService } from "./AndroidAnalysisService.js";
+import {
+ requireAnalysisViewRetention,
+ summarizeRetainedAnalysis,
+ type AnalysisViewRetention,
+} from "../analysisView/AnalysisViewService.js";
+import type { AnalysisError } from "../../domain/analysisErrorBase.js";
+import { AnalysisCancelledError } from "../../domain/analysisErrorCore.js";
+import { androidPackageInspectionInputSchema } from "../../domain/android/androidAnalysis.js";
+import type { Evidence } from "../../domain/evidence.js";
+import { analysisInputErrorFromIssues } from "../../domain/inputIssueProjection.js";
+import { err, type Result } from "../../domain/result.js";
+
+/** Preserve the complete provider request; select retained delivery explicitly. */
+export const inspectAndroidPackage = async (
+ service: AndroidAnalysisService,
+ rawInput: unknown,
+ retention: AnalysisViewRetention,
+ options?: ExecutionOptions,
+): Promise> => {
+ const operation = "inspect_android_package";
+ if (options?.signal?.aborted === true)
+ return err(new AnalysisCancelledError(operation));
+ const parsed = androidPackageInspectionInputSchema.safeParse(rawInput);
+ if (!parsed.success)
+ return err(
+ analysisInputErrorFromIssues(operation, parsed.error.issues, rawInput, {
+ cause: parsed.error,
+ }),
+ );
+ if (parsed.data.detail === "summary") {
+ const ready = requireAnalysisViewRetention(operation, retention);
+ if (!ready.ok) return ready;
+ }
+ const executed = await service.execute(
+ operation,
+ { path: parsed.data.path },
+ options,
+ );
+ if (!executed.ok || parsed.data.detail !== "summary") return executed;
+ return summarizeRetainedAnalysis(executed.value, retention);
+};
diff --git a/src/browser/history/CaptureFailures.test.ts b/src/browser/history/CaptureFailures.test.ts
index ff7be71a6..047722ac5 100644
--- a/src/browser/history/CaptureFailures.test.ts
+++ b/src/browser/history/CaptureFailures.test.ts
@@ -4,7 +4,7 @@ import { projectAnalysisError } from "../../domain/analysisErrorProjection.js";
import { analysisErrorProjectionSchema } from "../../contracts/errorSchemas.js";
import { inspectWebNetworkCaptureInputSchema } from "../../domain/webNetworkCapture.js";
import { historicalCaptureFailure } from "./CaptureFailures.js";
-import { HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES } from "./CaptureRelease.js";
+import { NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES } from "./CaptureRelease.js";
import { redactExplicitFailure } from "../../domain/explicitSensitiveFailure.js";
import { OwnedCommandFailure } from "../../process/OwnedCommand.js";
@@ -118,7 +118,7 @@ it.each([
},
});
// The enforced limit is reported only where Bun runs on Windows.
- if (HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES === null)
+ if (NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES === null)
expect(JSON.stringify(projected)).not.toContain(
"process_memory_limit_bytes",
);
@@ -126,12 +126,12 @@ it.each([
expect(projected).toMatchObject({
details: {
reported_limits: {
- process_memory_limit_bytes: HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES,
+ process_memory_limit_bytes: NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES,
},
},
remediation: {
action: expect.stringContaining(
- `${String(HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES)} bytes`,
+ `${String(NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES)} bytes`,
),
},
});
diff --git a/src/browser/history/CaptureFailures.ts b/src/browser/history/CaptureFailures.ts
index 228541545..b525126a5 100644
--- a/src/browser/history/CaptureFailures.ts
+++ b/src/browser/history/CaptureFailures.ts
@@ -18,9 +18,9 @@ import {
} from "../../domain/webNetworkCapture.js";
import { OwnedCommandFailure } from "../../process/OwnedCommand.js";
import {
- HAR_CAPTURE_HEAP_ENFORCED,
- HAR_CAPTURE_HEAP_LIMITS,
- HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES,
+ NODE_CAPTURE_HEAP_ENFORCED,
+ NODE_CAPTURE_HEAP_LIMITS,
+ NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES,
} from "./CaptureRelease.js";
const OPERATION = "inspect_web_network_capture";
@@ -78,7 +78,7 @@ export const historicalCaptureFailure = (
);
if (
phase === "decoder" &&
- input.format === "har" &&
+ input.format !== "mitmproxy" &&
cause.reason === "process" &&
(cause.snapshot?.signal === "SIGABRT" ||
(cause.snapshot?.signal === null && cause.snapshot.exitCode === 134)) &&
@@ -86,7 +86,7 @@ export const historicalCaptureFailure = (
)
return captureMemoryFailure(
input,
- "The HAR decoder exhausted its fixed V8 heap",
+ `The ${input.format} decoder exhausted its fixed V8 heap`,
cause,
);
}
@@ -195,15 +195,17 @@ export const captureMemoryFailure = (
format: input.format,
maximum_input_bytes: WEB_NETWORK_CAPTURE_LIMITS.inputBytes,
maximum_reply_bytes: WEB_NETWORK_CAPTURE_LIMITS.outputBytes,
- ...(input.format === "har" && HAR_CAPTURE_HEAP_ENFORCED
+ ...(input.format !== "mitmproxy" && NODE_CAPTURE_HEAP_ENFORCED
? {
- old_generation_heap_mib: HAR_CAPTURE_HEAP_LIMITS.oldGenerationMiB,
- semi_space_heap_mib: HAR_CAPTURE_HEAP_LIMITS.semiSpaceMiB,
+ old_generation_heap_mib: NODE_CAPTURE_HEAP_LIMITS.oldGenerationMiB,
+ semi_space_heap_mib: NODE_CAPTURE_HEAP_LIMITS.semiSpaceMiB,
}
: {}),
- ...(input.format === "har" &&
- HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES !== null
- ? { process_memory_limit_bytes: HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES }
+ ...(input.format !== "mitmproxy" &&
+ NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES !== null
+ ? {
+ process_memory_limit_bytes: NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES,
+ }
: {}),
...(cause instanceof OwnedCommandFailure
? {
@@ -214,7 +216,7 @@ export const captureMemoryFailure = (
},
{
cause,
- remediationAction: `Use a smaller capture exported by its producer, or another decoder with sufficient capacity for the original capture. Preserve the original for provenance; a subset does not establish complete-capture coverage.${input.format === "har" && HAR_CAPTURE_HEAP_ENFORCED ? ` REA's HAR old-generation heap is fixed at ${HAR_CAPTURE_HEAP_LIMITS.oldGenerationMiB} MiB; inherited NODE_OPTIONS cannot raise it.` : ""}${input.format === "har" && HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES !== null ? ` REA's HAR decoder process commit limit is fixed at ${String(HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES)} bytes.` : ""}`,
+ remediationAction: `Use a smaller capture exported by its producer, or another decoder with sufficient capacity for the original capture. Preserve the original for provenance; a subset does not establish complete-capture coverage.${input.format !== "mitmproxy" && NODE_CAPTURE_HEAP_ENFORCED ? ` REA's Node capture old-generation heap is fixed at ${NODE_CAPTURE_HEAP_LIMITS.oldGenerationMiB} MiB; inherited NODE_OPTIONS cannot raise it.` : ""}${input.format !== "mitmproxy" && NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES !== null ? ` REA's Node capture decoder process commit limit is fixed at ${String(NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES)} bytes.` : ""}`,
...(cause instanceof OwnedCommandFailure && cause.snapshot !== null
? {
capturedOutput: {
diff --git a/src/browser/history/CaptureFormatError.ts b/src/browser/history/CaptureFormatError.ts
index fd7a9272d..a31b3057d 100644
--- a/src/browser/history/CaptureFormatError.ts
+++ b/src/browser/history/CaptureFormatError.ts
@@ -1,7 +1,7 @@
/** Expected malformed, unsupported or oversized producer data at a historical decoder boundary. */
export class CaptureFormatError extends Error {
constructor(
- readonly reason: "format" | "unsupported" | "input-limit",
+ readonly reason: "format" | "unsupported" | "input-limit" | "limit",
message: string,
readonly pointer = "",
) {
diff --git a/src/browser/history/HarJson.ts b/src/browser/history/CaptureJson.ts
similarity index 83%
rename from src/browser/history/HarJson.ts
rename to src/browser/history/CaptureJson.ts
index 257630932..59743788a 100644
--- a/src/browser/history/HarJson.ts
+++ b/src/browser/history/CaptureJson.ts
@@ -2,6 +2,7 @@ import { visit } from "jsonc-parser";
import { LosslessNumber } from "lossless-json";
import { WEB_NETWORK_CAPTURE_LIMITS } from "../../domain/webNetworkCapture.js";
import { CaptureFormatError } from "./CaptureFormatError.js";
+import { TextDecoder } from "node:util";
type Frame =
| {
@@ -13,7 +14,10 @@ type Frame =
| { kind: "array"; pointer: string; items: unknown[] };
/** Materialize upstream JSON events without duplicate folding, prototype setters or numeric rounding. */
-export const parseHarJson = (text: string): unknown => {
+export const parseCaptureJson = (
+ text: string,
+ format: "HAR" | "qlog",
+): unknown => {
const frames: Frame[] = [];
let result: unknown;
const valuePointer = (): string => {
@@ -29,7 +33,7 @@ export const parseHarJson = (text: string): unknown => {
if (frames.length > WEB_NETWORK_CAPTURE_LIMITS.depth)
throw new CaptureFormatError(
"input-limit",
- "HAR exceeds the 64-level complete-evidence nesting budget.",
+ `${format} exceeds the 64-level complete-evidence nesting budget.`,
valuePointer(),
);
};
@@ -69,7 +73,7 @@ export const parseHarJson = (text: string): unknown => {
if (frame.members.has(key))
throw new CaptureFormatError(
"format",
- "HAR JSON contains duplicate object members.",
+ `${format} JSON contains duplicate object members.`,
);
frame.pendingKey = key;
},
@@ -103,7 +107,7 @@ export const parseHarJson = (text: string): unknown => {
throw new TypeError("JSON visitor emitted an unsupported literal.");
},
onError: () => {
- throw new CaptureFormatError("format", "HAR is malformed JSON.");
+ throw new CaptureFormatError("format", `${format} is malformed JSON.`);
},
},
{
@@ -114,3 +118,18 @@ export const parseHarJson = (text: string): unknown => {
);
return result;
};
+
+/** UTF-8 JSON decoding skips one permitted BOM and rejects malformed bytes. */
+export const decodeCaptureText = (
+ bytes: Uint8Array,
+ format: "HAR" | "qlog",
+): string => {
+ try {
+ return new TextDecoder("utf-8", { fatal: true }).decode(bytes);
+ } catch {
+ throw new CaptureFormatError(
+ "format",
+ `${format} is not valid UTF-8 JSON.`,
+ );
+ }
+};
diff --git a/src/browser/history/CaptureRelease.ts b/src/browser/history/CaptureRelease.ts
index d8af643aa..77f29df51 100644
--- a/src/browser/history/CaptureRelease.ts
+++ b/src/browser/history/CaptureRelease.ts
@@ -8,19 +8,19 @@ export const HAR_CAPTURE_PROVIDER_IDENTITY = {
version: "har-schema@2.0.0;jsonc-parser@3.3.1;lossless-json@4.3.1",
} as const;
-/** Fixed V8 heap settings used by the owned HAR decoder process. */
-export const HAR_CAPTURE_HEAP_LIMITS = {
+/** Fixed V8 heap settings used by the owned Node capture decoder process. */
+export const NODE_CAPTURE_HEAP_LIMITS = {
oldGenerationMiB: 192,
semiSpaceMiB: 8,
} as const;
-/** The HAR decoder runs on this executable; Bun accepts but ignores V8 heap flags. */
-export const HAR_CAPTURE_HEAP_ENFORCED =
+/** The Node capture decoder runs on this executable; Bun accepts but ignores V8 heap flags. */
+export const NODE_CAPTURE_HEAP_ENFORCED =
javaScriptRuntime(process.versions).id === "node";
/** Windows Job Object commit limit replacing the ignored heap flags under Bun; otherwise null. */
-export const HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES =
- javaScriptWorkerMemoryLimitBytes(HAR_CAPTURE_HEAP_LIMITS.oldGenerationMiB);
+export const NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES =
+ javaScriptWorkerMemoryLimitBytes(NODE_CAPTURE_HEAP_LIMITS.oldGenerationMiB);
/** Native executable profile verified with unchanged mitmproxy raw-state decoding. */
export const MITMPROXY_CAPTURE_PROVIDER_IDENTITY = {
@@ -28,3 +28,18 @@ export const MITMPROXY_CAPTURE_PROVIDER_IDENTITY = {
name: "REA offline native mitmproxy adapter",
version: "12.2.3",
} as const;
+
+/** Native SAZ member decoding with the existing ZIP and XML package profiles. */
+export const SAZ_CAPTURE_PROVIDER_IDENTITY = {
+ id: "fiddler-saz",
+ name: "REA Fiddler SAZ capture adapter",
+ version: "1;zip.js@2.15.0;xmldom@0.9.12",
+} as const;
+
+/** Fixed offline interpretation profile, not an authenticated producer claim. */
+export const QLOG_CAPTURE_PROVIDER_IDENTITY = {
+ id: "aioquic-qlog-json",
+ name: "REA aioquic qlog capture adapter",
+ version:
+ "aioquic-profile@1.5.0;qlog@0.3;jsonc-parser@3.3.1;lossless-json@4.3.1",
+} as const;
diff --git a/src/browser/history/HarCapture.test.ts b/src/browser/history/HarCapture.test.ts
index 2eb1fe21a..9614384cc 100644
--- a/src/browser/history/HarCapture.test.ts
+++ b/src/browser/history/HarCapture.test.ts
@@ -1,7 +1,8 @@
import { createHash } from "node:crypto";
import { expect, it } from "vitest";
import { historicalHar } from "../../../tests/fixtures/historicalHar.js";
-import { decodeHarCapture, decodeHarText } from "./HarCapture.js";
+import { decodeCaptureText } from "./CaptureJson.js";
+import { decodeHarCapture } from "./HarCapture.js";
it.each([
{ values: [] },
@@ -563,18 +564,21 @@ it("ignores one leading byte-order mark, as HAR 1.2 requires of readers", () =>
const text = JSON.stringify(historicalHar());
const body = Buffer.from(text, "utf8");
const marked = Buffer.concat([Buffer.from([0xef, 0xbb, 0xbf]), body]);
- expect(decodeHarText(marked)).toBe(text);
- expect(decodeHarCapture(decodeHarText(marked), [])).toEqual(
- decodeHarCapture(decodeHarText(body), []),
+ expect(decodeCaptureText(marked, "HAR")).toBe(text);
+ expect(decodeHarCapture(decodeCaptureText(marked, "HAR"), [])).toEqual(
+ decodeHarCapture(decodeCaptureText(body, "HAR"), []),
);
// A second mark is content, not an encoding signature.
expect(() =>
decodeHarCapture(
- decodeHarText(Buffer.concat([Buffer.from([0xef, 0xbb, 0xbf]), marked])),
+ decodeCaptureText(
+ Buffer.concat([Buffer.from([0xef, 0xbb, 0xbf]), marked]),
+ "HAR",
+ ),
[],
),
).toThrow("HAR is malformed JSON.");
- expect(() => decodeHarText(Buffer.from([0x7b, 0xff, 0x7d]))).toThrow(
- "HAR is not valid UTF-8 JSON.",
- );
+ expect(() =>
+ decodeCaptureText(Buffer.from([0x7b, 0xff, 0x7d]), "HAR"),
+ ).toThrow("HAR is not valid UTF-8 JSON.");
});
diff --git a/src/browser/history/HarCapture.ts b/src/browser/history/HarCapture.ts
index f3a83af15..83b442f5c 100644
--- a/src/browser/history/HarCapture.ts
+++ b/src/browser/history/HarCapture.ts
@@ -1,7 +1,6 @@
import { createHash } from "node:crypto";
-import { TextDecoder } from "node:util";
import { isSafeNumber, LosslessNumber } from "lossless-json";
-import { parseHarJson } from "./HarJson.js";
+import { parseCaptureJson } from "./CaptureJson.js";
import type { JsonValue } from "../../domain/jsonValue.js";
import {
WEB_NETWORK_CAPTURE_LIMITS,
@@ -26,25 +25,12 @@ type Projection = Pick<
"reported" | "numeric_literals" | "binary_fields" | "redactions"
>;
-/**
- * Decode retained HAR bytes as UTF-8. HAR 1.2 lets writers emit a byte-order
- * mark and requires readers to ignore it, so one leading BOM is skipped.
- */
-export const decodeHarText = (bytes: Uint8Array): string => {
- try {
- // ignoreBOM: false (the default) is what skips the mark; true keeps it.
- return new TextDecoder("utf-8", { fatal: true }).decode(bytes);
- } catch {
- throw new CaptureFormatError("format", "HAR is not valid UTF-8 JSON.");
- }
-};
-
/** Decode a retained HAR with exact numeric lexemes and unchanged upstream schema validation. */
export const decodeHarCapture = (
text: string,
sensitiveValues: readonly string[],
): DecodedCapture => {
- const raw = parseHarJson(text);
+ const raw = parseCaptureJson(text, "HAR");
const validation = projectHar(raw, [], false);
createHarValidator()(validation.reported);
if (
diff --git a/src/browser/history/HarCaptureAdapter.ts b/src/browser/history/HarCaptureAdapter.ts
deleted file mode 100644
index 9a5204257..000000000
--- a/src/browser/history/HarCaptureAdapter.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { fileURLToPath } from "node:url";
-import type { HistoricalCaptureFormatAdapter } from "./HistoricalCaptureFormatAdapter.js";
-import {
- HAR_CAPTURE_PROVIDER_IDENTITY,
- HAR_CAPTURE_HEAP_LIMITS,
- HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES,
-} from "./CaptureRelease.js";
-
-/** HAR's parser/schema packages run in one bounded Node heap, without network or target execution. */
-export class HarCaptureAdapter implements HistoricalCaptureFormatAdapter {
- readonly format = "har";
- readonly identity = HAR_CAPTURE_PROVIDER_IDENTITY;
- async command(requestPath: string): Promise<{
- command: string;
- arguments: readonly string[];
- memoryLimitBytes?: number;
- }> {
- return {
- command: process.execPath,
- arguments: [
- `--max-old-space-size=${HAR_CAPTURE_HEAP_LIMITS.oldGenerationMiB}`,
- `--max-semi-space-size=${HAR_CAPTURE_HEAP_LIMITS.semiSpaceMiB}`,
- "--v8-pool-size=1",
- "--single-threaded",
- fileURLToPath(new URL("./HarCaptureProcess.js", import.meta.url)),
- requestPath,
- ],
- ...(HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES === null
- ? {}
- : { memoryLimitBytes: HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES }),
- };
- }
-}
diff --git a/src/browser/history/HistoricalCaptureDecoder.ts b/src/browser/history/HistoricalCaptureDecoder.ts
index 155ba229b..7f6e7b83a 100644
--- a/src/browser/history/HistoricalCaptureDecoder.ts
+++ b/src/browser/history/HistoricalCaptureDecoder.ts
@@ -4,9 +4,9 @@ import {
captureMemoryFailure,
} from "./CaptureFailures.js";
import {
- HAR_CAPTURE_HEAP_ENFORCED,
- HAR_CAPTURE_HEAP_LIMITS,
- HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES,
+ NODE_CAPTURE_HEAP_ENFORCED,
+ NODE_CAPTURE_HEAP_LIMITS,
+ NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES,
} from "./CaptureRelease.js";
import { projectAnalysisError } from "../../domain/analysisErrorProjection.js";
import type { HistoricalCaptureFormatAdapter } from "./HistoricalCaptureFormatAdapter.js";
@@ -198,22 +198,37 @@ export class HistoricalCaptureDecoder {
OPERATION,
"Capture decoder changed the selected upstream profile identity.",
);
- result = ok({
- ...reply.value,
+ const common = {
artifact: {
path: input.capture_path,
sha256: snapshot.sha256,
bytes: snapshot.bytes.length,
},
- format: input.format,
- runtime_attribution: "unknown",
+
+ runtime_attribution: "unknown" as const,
limitations: [
+ ...(adapter.limitations ?? []),
"This is retained producer evidence, without live browser transaction IDs, scenario provenance, execution attribution or deployment authenticity. Recorded URLs are never fetched.",
"Every record is decoded before selection; no partial success is returned on malformed input or a resource limit.",
"Known authentication headers/cookies and explicitly marked literal values are excluded. Unknown extension names do not establish sensitivity.",
- `A 32 MiB input, 96 MiB reply and 64-level nesting budget bound complete evidence. ${harMemoryLimitation()}; native decoding uses a 768 MiB Linux address-space limit. Each owned command has a 30-second deadline with independent cleanup.`,
+ `A 32 MiB input, 96 MiB reply and 64-level nesting budget bound complete evidence. ${nodeMemoryLimitation()}; mitmproxy decoding uses a 768 MiB Linux address-space limit. Each owned command has a 30-second deadline with independent cleanup.`,
],
- });
+ };
+ if (input.format === "qlog") {
+ if (!("qlog" in reply.value))
+ throw new AnalysisOutputError(
+ OPERATION,
+ "Capture decoder omitted qlog transport facts.",
+ );
+ result = ok({ ...reply.value, ...common, format: "qlog" });
+ } else {
+ if ("qlog" in reply.value)
+ throw new AnalysisOutputError(
+ OPERATION,
+ "Capture decoder supplied inapplicable qlog transport facts.",
+ );
+ result = ok({ ...reply.value, ...common, format: input.format });
+ }
} catch (cause: unknown) {
result = err(
redactExplicitFailure(
@@ -251,13 +266,13 @@ export class HistoricalCaptureDecoder {
}
}
-/** The HAR decoder runs on this executable; only Node.js enforces its V8 heap flags. */
-const harMemoryLimitation = (): string => {
- if (HAR_CAPTURE_HEAP_ENFORCED)
- return `HAR uses a ${String(HAR_CAPTURE_HEAP_LIMITS.oldGenerationMiB)} MiB Node old-generation heap`;
- return HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES === null
- ? "HAR runs on Bun, which does not enforce REA's V8 heap flags"
- : `HAR runs on Bun, which does not enforce REA's V8 heap flags, under a ${String(HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES)}-byte Windows Job Object commit limit`;
+/** The Node capture decoder runs on this executable; only Node.js enforces its V8 heap flags. */
+const nodeMemoryLimitation = (): string => {
+ if (NODE_CAPTURE_HEAP_ENFORCED)
+ return `HAR/SAZ/qlog use a ${String(NODE_CAPTURE_HEAP_LIMITS.oldGenerationMiB)} MiB Node old-generation heap`;
+ return NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES === null
+ ? "HAR/SAZ/qlog run on Bun, which does not enforce REA's V8 heap flags"
+ : `HAR/SAZ/qlog run on Bun, which does not enforce REA's V8 heap flags, under a ${String(NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES)}-byte Windows Job Object commit limit`;
};
const replyFailureReason = (cause: unknown): string => {
diff --git a/src/browser/history/HistoricalCaptureFormatAdapter.ts b/src/browser/history/HistoricalCaptureFormatAdapter.ts
index 811ea56e2..9660fd579 100644
--- a/src/browser/history/HistoricalCaptureFormatAdapter.ts
+++ b/src/browser/history/HistoricalCaptureFormatAdapter.ts
@@ -3,6 +3,7 @@ import type { InspectWebNetworkCaptureInput } from "../../domain/webNetworkCaptu
/** Format-specific process profile keeps mature upstream code behind a replaceable adapter seam. */
export interface HistoricalCaptureFormatAdapter {
readonly format: InspectWebNetworkCaptureInput["format"];
+ readonly limitations?: readonly string[];
readonly identity: {
readonly id: string;
readonly name: string;
diff --git a/src/browser/history/NodeCaptureAdapter.test.ts b/src/browser/history/NodeCaptureAdapter.test.ts
new file mode 100644
index 000000000..bf2528f5b
--- /dev/null
+++ b/src/browser/history/NodeCaptureAdapter.test.ts
@@ -0,0 +1,18 @@
+import { expect, it, vi } from "vitest";
+import { AnalysisCapabilityUnavailableError } from "../../domain/analysisErrorCore.js";
+import { NodeCaptureAdapter } from "./NodeCaptureAdapter.js";
+
+vi.mock("./CaptureRelease.js", async (original) => ({
+ ...(await original()),
+ NODE_CAPTURE_HEAP_ENFORCED: false,
+ NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES: null,
+}));
+
+it.each(["saz", "qlog"] as const)(
+ "refuses a %s worker when the runtime has no enforceable memory bound",
+ async (format) => {
+ await expect(
+ new NodeCaptureAdapter(format).command("/owned/request.json"),
+ ).rejects.toBeInstanceOf(AnalysisCapabilityUnavailableError);
+ },
+);
diff --git a/src/browser/history/NodeCaptureAdapter.ts b/src/browser/history/NodeCaptureAdapter.ts
new file mode 100644
index 000000000..8f33430ca
--- /dev/null
+++ b/src/browser/history/NodeCaptureAdapter.ts
@@ -0,0 +1,61 @@
+import { fileURLToPath } from "node:url";
+import type { HistoricalCaptureFormatAdapter } from "./HistoricalCaptureFormatAdapter.js";
+import {
+ NODE_CAPTURE_HEAP_ENFORCED,
+ HAR_CAPTURE_PROVIDER_IDENTITY,
+ SAZ_CAPTURE_PROVIDER_IDENTITY,
+ QLOG_CAPTURE_PROVIDER_IDENTITY,
+ NODE_CAPTURE_HEAP_LIMITS,
+ NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES,
+} from "./CaptureRelease.js";
+import { AnalysisCapabilityUnavailableError } from "../../domain/analysisErrorCore.js";
+
+/** Package-backed capture decoders share one bounded offline Node process profile. */
+export class NodeCaptureAdapter implements HistoricalCaptureFormatAdapter {
+ readonly identity;
+ readonly limitations;
+ constructor(readonly format: "har" | "saz" | "qlog") {
+ this.identity =
+ format === "har"
+ ? HAR_CAPTURE_PROVIDER_IDENTITY
+ : format === "saz"
+ ? SAZ_CAPTURE_PROVIDER_IDENTITY
+ : QLOG_CAPTURE_PROVIDER_IDENTITY;
+ this.limitations =
+ format === "saz"
+ ? [
+ "SAZ ordinals follow first session-member occurrence in ZIP directory order, not chronology or numeric session ID.",
+ "HTTP fields use byte-preserving Latin-1 text; start-line separators and header delimiters are not projected. Bodies retain stored bytes without transfer/content decoding. Absent members are null, distinct from empty bodies.",
+ "XML preserves node order and attribute/text values, not its original byte serialization. WebSocket and gRPC members retain opaque message-file bytes, not decoded protocol events.",
+ "Non-session archive members are inventoried but their content is not decoded.",
+ ]
+ : [];
+ }
+ async command(requestPath: string) {
+ if (
+ this.format !== "har" &&
+ !NODE_CAPTURE_HEAP_ENFORCED &&
+ NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES === null
+ )
+ throw new AnalysisCapabilityUnavailableError(
+ this.identity.id,
+ "inspect_web_network_capture",
+ `${this.format} decoding requires an enforced decoder memory limit. Run REA with Node.js on this host.`,
+ );
+ return {
+ command: process.execPath,
+ arguments: [
+ `--max-old-space-size=${NODE_CAPTURE_HEAP_LIMITS.oldGenerationMiB}`,
+ `--max-semi-space-size=${NODE_CAPTURE_HEAP_LIMITS.semiSpaceMiB}`,
+ "--v8-pool-size=1",
+ "--single-threaded",
+ fileURLToPath(new URL("./NodeCaptureProcess.js", import.meta.url)),
+ requestPath,
+ this.format,
+ ],
+ ...(NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES === null
+ ? {}
+ : { memoryLimitBytes: NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES }),
+ };
+ }
+}
diff --git a/src/browser/history/HarCaptureProcess.ts b/src/browser/history/NodeCaptureProcess.ts
similarity index 53%
rename from src/browser/history/HarCaptureProcess.ts
rename to src/browser/history/NodeCaptureProcess.ts
index 1e4c66c76..ff45a869a 100644
--- a/src/browser/history/HarCaptureProcess.ts
+++ b/src/browser/history/NodeCaptureProcess.ts
@@ -3,7 +3,6 @@ import { z } from "zod";
import { readStableArtifact } from "../../artifacts/readStableArtifact.js";
import { WEB_NETWORK_CAPTURE_LIMITS } from "../../domain/webNetworkCapture.js";
import { CaptureFormatError } from "./CaptureFormatError.js";
-import { decodeHarCapture, decodeHarText } from "./HarCapture.js";
const requestSchema = z.strictObject({
snapshot_path: z.string(),
@@ -11,24 +10,37 @@ const requestSchema = z.strictObject({
sensitive_values: z.array(z.string().min(1)),
});
-/** Decode untrusted HAR in an owned, bounded heap rather than the long-lived MCP process. */
+/** Parse untrusted captures in an owned heap and return one complete bounded reply. */
const main = async (): Promise => {
+ const format = z.enum(["har", "saz", "qlog"]).parse(process.argv[3]);
const request = requestSchema.parse(
JSON.parse(await readFile(process.argv[2] ?? "", "utf8")),
);
let reply: unknown;
try {
- const snapshot = await readStableArtifact(
- request.snapshot_path,
- WEB_NETWORK_CAPTURE_LIMITS.inputBytes,
- );
- reply = {
- ok: true,
- value: decodeHarCapture(
- decodeHarText(snapshot.bytes),
+ let value;
+ if (format !== "saz") {
+ const { decodeCaptureText } = await import("./CaptureJson.js");
+ const decoder =
+ format === "har"
+ ? (await import("./HarCapture.js")).decodeHarCapture
+ : (await import("./QlogCapture.js")).decodeQlogCapture;
+ const snapshot = await readStableArtifact(
+ request.snapshot_path,
+ WEB_NETWORK_CAPTURE_LIMITS.inputBytes,
+ );
+ value = decoder(
+ decodeCaptureText(snapshot.bytes, format === "har" ? "HAR" : "qlog"),
request.sensitive_values,
- ),
- };
+ );
+ } else {
+ const { decodeSazCapture } = await import("./SazCapture.js");
+ value = await decodeSazCapture(
+ request.snapshot_path,
+ request.sensitive_values,
+ );
+ }
+ reply = { ok: true, value };
} catch (cause: unknown) {
reply =
cause instanceof CaptureFormatError
@@ -41,7 +53,7 @@ const main = async (): Promise => {
: {
ok: false,
reason: "decoder",
- message: `HAR decoder failed unexpectedly (${cause instanceof Error ? cause.name : "unknown exception"}).`,
+ message: `Capture decoder failed unexpectedly (${cause instanceof Error ? cause.name : "unknown exception"}).`,
pointer: "",
};
}
@@ -50,7 +62,7 @@ const main = async (): Promise => {
text = JSON.stringify({
ok: false,
reason: "limit",
- message: "HAR reply exceeds the complete-evidence output budget.",
+ message: "Capture reply exceeds the complete-evidence output budget.",
pointer: "",
});
await writeFile(request.reply_path, text, { flag: "wx", mode: 0o600 });
diff --git a/src/browser/history/QlogCapture.test.ts b/src/browser/history/QlogCapture.test.ts
new file mode 100644
index 000000000..bd67d4e80
--- /dev/null
+++ b/src/browser/history/QlogCapture.test.ts
@@ -0,0 +1,259 @@
+import { expect, it } from "vitest";
+import { decodeQlogCapture } from "./QlogCapture.js";
+import { decodeCaptureText } from "./CaptureJson.js";
+import { CaptureFormatError } from "./CaptureFormatError.js";
+
+// Synthetic format inputs exercise distinct parser semantics, not producer provenance.
+const event = (frames: unknown[], name = "transport:packet_sent") => ({
+ name,
+ time: 1791819895000.25,
+ data: { header: { packet_type: "1RTT", packet_number: 5 }, frames },
+});
+const frame = (offset: number, length: number, fin = false) => ({
+ frame_type: "stream",
+ stream_id: 0,
+ offset,
+ length,
+ fin,
+});
+const capture = (events: unknown[], extra: Record = {}) =>
+ JSON.stringify({
+ qlog_format: "JSON",
+ qlog_version: "0.3",
+ ...extra,
+ traces: [
+ {
+ common_fields: { ODCID: "same" },
+ vantage_point: { name: "aioquic", type: "server" },
+ events,
+ },
+ ],
+ });
+const facts = (text: string, sensitive: string[] = []) => {
+ const decoded = decodeQlogCapture(text, sensitive);
+ if (!("qlog" in decoded)) throw new Error("qlog facet required");
+ return { decoded, traces: decoded.qlog.traces };
+};
+
+it("derives interval unions per trace/direction while retaining event source order and extensions", () => {
+ const original = JSON.parse(
+ capture([
+ event([frame(10, 10)]),
+ event([frame(0, 15), frame(30, 5, true)]),
+ event([frame(0, 4)], "transport:packet_received"),
+ {
+ name: "recovery:packet_lost",
+ time: 1,
+ data: { packet_number: 5, type: "1RTT" },
+ },
+ ]),
+ );
+ original.traces.push({
+ ...original.traces[0],
+ events: [event([frame(0, 3)])],
+ });
+ Object.defineProperty(original, "__proto__", {
+ enumerable: true,
+ value: { ordinary: true },
+ });
+ original.extra = "https://example.test/path?token=ordinary";
+ const { decoded, traces } = facts(JSON.stringify(original));
+ expect(traces[0]?.streams[0]).toMatchObject({
+ stream_id: "0",
+ direction: "sent",
+ unique_bytes: "25",
+ frame_length_sum: "30",
+ repeated_bytes: "5",
+ covered_ranges: [
+ { start: "0", end: "20" },
+ { start: "30", end: "35" },
+ ],
+ reported_final_sizes: ["35"],
+ });
+ expect(traces[0]?.streams[1]).toMatchObject({
+ direction: "received",
+ unique_bytes: "4",
+ });
+ expect(traces[1]?.streams[0]).toMatchObject({ unique_bytes: "3" });
+ expect(traces[0]?.loss_declarations[0]).toMatchObject({
+ confidence: "observed",
+ packet_number: { state: "reported", value: "5" },
+ packet_number_space: "application",
+ });
+ expect(decoded.records.at(-1)?.location).toEqual({
+ kind: "json-pointer",
+ pointer: "/traces/1/events/0",
+ });
+ expect(decoded.container.reported).toMatchObject({
+ extra: original.extra,
+ ["__proto__"]: { ordinary: true },
+ });
+ expect(Reflect.get(Object.prototype, "ordinary")).toBeUndefined();
+});
+
+it("keeps exact 62-bit integers and numeric lexemes without allocating exponent expansion", () => {
+ const text = capture([event([frame(0, 0, true)])])
+ .replace('"stream_id":0', '"stream_id":4611686018427387903')
+ .replace('"offset":0', '"offset":9007199254740993')
+ .replace('"length":0', '"length":1e3');
+ const { decoded, traces } = facts(text);
+ expect(traces[0]?.streams[0]).toMatchObject({
+ stream_id: "4611686018427387903",
+ unique_bytes: "1000",
+ reported_final_sizes: ["9007199254741993"],
+ });
+ expect(decoded.records[0]?.numeric_literals).toContainEqual({
+ pointer: "/data/frames/0/length",
+ producer_type: "json-number",
+ literal: "1e3",
+ });
+ expect(decoded.records[0]?.reported).toMatchObject({
+ data: { frames: [{ stream_id: null, offset: null, length: 1000 }] },
+ });
+});
+
+it("keeps incomplete fields unknown and FIN without bytes as metadata", () => {
+ const { traces } = facts(
+ capture([
+ event([{ frame_type: "stream", stream_id: 0, length: 5 }]),
+ event([frame(10, 0, true)]),
+ { name: "recovery:packet_lost", time: 1, data: {} },
+ {
+ name: "extension:custom",
+ time: 0,
+ data: { body: "ordinary evidence" },
+ },
+ ]),
+ );
+ expect(traces[0]?.incomplete_fact_records).toEqual([0]);
+ expect(traces[0]?.streams[0]).toMatchObject({
+ unique_bytes: "0",
+ covered_ranges: [],
+ reported_final_sizes: ["10"],
+ });
+ expect(traces[0]?.loss_declarations[0]?.packet_number.state).toBe("unknown");
+});
+
+it("excludes structural auth material and explicit normalized values without guessing extension secrecy", () => {
+ const text = capture([
+ {
+ name: "http:frame_parsed",
+ time: 1,
+ data: {
+ frame: {
+ frame_type: "headers",
+ headers: [
+ { name: "authorization", value: "Bearer credential" },
+ { name: ":path", value: "/?token=ordinary" },
+ { name: "location", value: "https://user:pass@example.test/a" },
+ ],
+ },
+ },
+ },
+ {
+ name: "transport:parameters_set",
+ time: 2,
+ data: { stateless_reset_token: "reset-credential" },
+ },
+ event([
+ { frame_type: "new_connection_id", reset_token: "reset-frame" },
+ { frame_type: "new_token", token: "new-token" },
+ frame(0, 100),
+ ]),
+ {
+ name: "extension:custom",
+ time: 3,
+ data: {
+ secret: "caller-selected ordinary value",
+ reset_token: "extension ordinary",
+ },
+ },
+ ]).replace('"length":100', '"length":1e2');
+ const { decoded, traces } = facts(text, ["100"]);
+ const serialized = JSON.stringify(decoded);
+ for (const hidden of [
+ "Bearer credential",
+ "reset-credential",
+ "reset-frame",
+ "new-token",
+ "100",
+ "user:pass",
+ ])
+ expect(serialized).not.toContain(hidden);
+ expect(serialized).toContain("token=ordinary");
+ expect(serialized).toContain("caller-selected ordinary value");
+ expect(traces[0]?.streams).toEqual([]);
+ expect(traces[0]?.incomplete_fact_records).toContain(2);
+});
+
+it("hides marked ancestor keys and safe derived sums while still validating hidden subtrees", () => {
+ const text = capture([event([frame(0, 3), frame(3, 4)])]);
+ expect(facts(text, ["7"]).traces[0]?.streams).toEqual([]);
+ const { decoded, traces } = facts(text, ["events"]);
+ expect(decoded.records[0]?.reported).toBe(null);
+ expect(decoded.records[0]?.location.kind).toBe("unknown");
+ expect(traces[0]?.location.kind).toBe("unknown");
+ expect(traces[0]?.streams).toEqual([]);
+ expect(() =>
+ facts(text.replace('"length":3', '"length":-3'), ["events"]),
+ ).toThrow(CaptureFormatError);
+});
+
+it.each([
+ "-1",
+ "0.5",
+ "4611686018427387904",
+ "1e1000000",
+ "1e-1000000",
+ '"3"',
+ "true",
+])("rejects malformed or out-of-range STREAM integer %s", (literal) => {
+ expect(() =>
+ facts(
+ capture([event([frame(0, 3)])]).replace(
+ '"length":3',
+ `"length":${literal}`,
+ ),
+ ),
+ ).toThrow(CaptureFormatError);
+});
+
+it.each([
+ '{"qlog_format":"JSON","qlog_format":"JSON","qlog_version":"0.3","traces":[]}',
+ capture([]).slice(0, -1),
+ capture([]) + " {}",
+ capture([{ name: "invalid", time: "1", data: {} }]),
+ capture([[1, "transport", "packet_sent", {}]]),
+ capture([event([{ ...frame(0, 1), fin: "true" }])]),
+ capture([event([{ ...frame(0, 1), offset: 4611686018427388000 }])]),
+])(
+ "rejects malformed JSON/profile events with no partial success: %s",
+ (text) => {
+ expect(() => facts(text)).toThrow(CaptureFormatError);
+ },
+);
+
+it("rejects other qlog containers/versions and excessive nesting, accepts empty profiles and UTF-8 BOM", () => {
+ for (const extra of [{ qlog_format: "JSON-SEQ" }, { qlog_version: "0.4" }])
+ expect(() => facts(capture([], extra))).toThrow("Only the aioquic");
+ expect(() =>
+ facts(
+ capture([], {
+ extension: JSON.parse("[".repeat(65) + "0" + "]".repeat(65)),
+ }),
+ ),
+ ).toThrow("nesting budget");
+ expect(
+ facts('{"qlog_format":"JSON","qlog_version":"0.3","traces":[]}').traces,
+ ).toEqual([]);
+ const raw = Buffer.from(capture([]));
+ expect(
+ facts(
+ decodeCaptureText(
+ Buffer.concat([Buffer.from([0xef, 0xbb, 0xbf]), raw]),
+ "qlog",
+ ),
+ ).decoded.total_records,
+ ).toBe(0);
+ expect(() => decodeCaptureText(Buffer.from([0xff]), "qlog")).toThrow("UTF-8");
+});
diff --git a/src/browser/history/QlogCapture.ts b/src/browser/history/QlogCapture.ts
new file mode 100644
index 000000000..2e8a1f790
--- /dev/null
+++ b/src/browser/history/QlogCapture.ts
@@ -0,0 +1,503 @@
+import { isSafeNumber, LosslessNumber } from "lossless-json";
+import type { JsonValue } from "../../domain/jsonValue.js";
+import type { QlogCaptureFacts } from "../../domain/qlogCapture.js";
+import {
+ webNetworkCapturePayloadSchema,
+ type WebNetworkCaptureRecord,
+} from "../../domain/webNetworkCapture.js";
+import type { z } from "zod";
+import { parseCaptureJson } from "./CaptureJson.js";
+import { CaptureFormatError } from "./CaptureFormatError.js";
+import {
+ CaptureRedaction,
+ captureObject,
+ capturePointer,
+} from "./CaptureRedaction.js";
+import { QLOG_CAPTURE_PROVIDER_IDENTITY } from "./CaptureRelease.js";
+
+const MAX_VARINT = (1n << 62n) - 1n;
+const credentials = new Set([
+ "authorization",
+ "proxy-authorization",
+ "cookie",
+ "set-cookie",
+]);
+type Projection = Pick<
+ WebNetworkCaptureRecord,
+ "reported" | "numeric_literals" | "binary_fields" | "redactions"
+>;
+type Trace = QlogCaptureFacts["traces"][number];
+type Stream = Trace["streams"][number];
+
+/** Inspect the selected aioquic JSON profile without authenticating its producer or interpreting other qlog layouts. */
+export const decodeQlogCapture = (
+ text: string,
+ sensitiveValues: readonly string[],
+): z.output => {
+ const raw = parseCaptureJson(text, "qlog");
+ if (!object(raw) || raw.qlog_format !== "JSON" || raw.qlog_version !== "0.3")
+ throw new CaptureFormatError(
+ "unsupported",
+ "Only the aioquic 1.5.0 JSON qlog 0.3 profile is supported.",
+ );
+ if (!Array.isArray(raw.traces))
+ return invalid("qlog must contain a traces array.", "/traces");
+ const traces = raw.traces.map(validateTrace);
+ const container = project(
+ { ...raw, traces: traces.map((trace) => ({ ...trace, events: null })) },
+ sensitiveValues,
+ );
+ const records: WebNetworkCaptureRecord[] = [];
+ const facts: Trace[] = [];
+ const excluded = (value: string): boolean =>
+ sensitiveValues.some((literal) => value.includes(literal));
+ const ancestorsHidden = excluded("traces") || excluded("events");
+ for (const [traceIndex, trace] of traces.entries()) {
+ const tracePointer = `/traces/${traceIndex}`;
+ const fact = createTraceFact(
+ trace,
+ traceIndex,
+ sensitiveValues,
+ ancestorsHidden,
+ );
+ const streams = new Map();
+ for (const [eventIndex, event] of trace.events.entries()) {
+ const ordinal = records.length;
+ const projection: Projection = ancestorsHidden
+ ? {
+ reported: null,
+ numeric_literals: [],
+ binary_fields: [],
+ redactions: [{ pointer: "", reason: "explicit-sensitive-value" }],
+ }
+ : project(event, sensitiveValues);
+ records.push({
+ ordinal,
+ location: ancestorsHidden
+ ? { kind: "unknown", reason: "explicit-sensitive-value" }
+ : {
+ kind: "json-pointer",
+ pointer: `${tracePointer}/events/${eventIndex}`,
+ },
+ ...projection,
+ limitations: [
+ "Record ordinal is derived from trace/event source traversal, not global time order. Qlog lengths and FIN do not expose original HTTP body bytes or establish network completeness.",
+ ],
+ });
+ collectTransportFacts(projection, ordinal, { fact, streams, excluded });
+ }
+ for (const stream of streams.values()) {
+ summarizeStream(stream);
+ const numericValues = [
+ stream.frame_length_sum,
+ stream.unique_bytes,
+ stream.repeated_bytes,
+ ...stream.reported_final_sizes,
+ ...stream.covered_ranges.flatMap((r) => [r.start, r.end]),
+ ];
+ if (numericValues.some(excluded))
+ fact.incomplete_fact_records.push(
+ ...stream.contributions.map((c) => c.record_ordinal),
+ );
+ else fact.streams.push(stream);
+ }
+ fact.incomplete_fact_records = [...new Set(fact.incomplete_fact_records)];
+ facts.push(fact);
+ }
+ return {
+ decoder: { ...QLOG_CAPTURE_PROVIDER_IDENTITY },
+ container: {
+ reported: container.reported,
+ numeric_literals: container.numeric_literals,
+ redactions: container.redactions,
+ records_pointer: null,
+ },
+ total_records: records.length,
+ records,
+ qlog: {
+ profile: "aioquic-1.5.0-json-0.3",
+ scope: "all-recorded-events-before-selection",
+ body_bytes: "not-reported",
+ clock: {
+ unit: "milliseconds",
+ domain: "unix-epoch",
+ basis: "selected-aioquic-profile-not-producer-authentication",
+ },
+ traces: facts,
+ },
+ };
+};
+
+const createTraceFact = (
+ trace: Record & { events: unknown[] },
+ traceIndex: number,
+ sensitiveValues: readonly string[],
+ ancestorsHidden: boolean,
+): Trace => {
+ const tracePointer = `/traces/${traceIndex}`;
+ const metadata = project(
+ { ...trace, events: null },
+ sensitiveValues,
+ ).reported;
+ const meta = !ancestorsHidden && object(metadata) ? metadata : null;
+ const common =
+ meta !== null && object(meta.common_fields) ? meta.common_fields : null;
+ const vantage =
+ meta !== null && object(meta.vantage_point)
+ ? meta.vantage_point.type
+ : null;
+ return {
+ trace_index: traceIndex,
+ location: ancestorsHidden
+ ? { kind: "unknown", reason: "explicit-sensitive-value" }
+ : { kind: "json-pointer", pointer: tracePointer },
+ event_count: trace.events.length,
+ odcid: typeof common?.ODCID === "string" ? common.ODCID : null,
+ vantage_point:
+ vantage === "client" || vantage === "server" ? vantage : null,
+ loss_declarations: [],
+ streams: [],
+ incomplete_fact_records: [],
+ };
+};
+
+const validateTrace = (
+ trace: unknown,
+ index: number,
+): Record & { events: unknown[] } => {
+ const pointer = `/traces/${index}`;
+ if (!object(trace) || !Array.isArray(trace.events))
+ return invalid("qlog trace must contain an events array.", pointer);
+ for (const [eventIndex, event] of trace.events.entries()) {
+ const eventPointer = `${pointer}/events/${eventIndex}`;
+ if (
+ !object(event) ||
+ typeof event.name !== "string" ||
+ !(event.time instanceof LosslessNumber) ||
+ !Number.isFinite(Number(event.time.value)) ||
+ !object(event.data)
+ )
+ invalid(
+ "qlog events must be objects with name, finite numeric time and object data.",
+ eventPointer,
+ );
+ // Validate interpretable fields on ORIGINAL values even when a declaration
+ // subsequently hides them. Missing fields remain meaningful unknowns.
+ if (event.name === "recovery:packet_lost")
+ unsigned(event.data.packet_number, `${eventPointer}/data/packet_number`);
+ if (packetEvent(event.name) && Array.isArray(event.data.frames)) {
+ for (const [frameIndex, frame] of event.data.frames.entries()) {
+ if (object(frame) && frame.frame_type === "stream") {
+ validateStreamFrame(
+ frame,
+ `${eventPointer}/data/frames/${frameIndex}`,
+ );
+ }
+ }
+ }
+ }
+ return { ...trace, events: trace.events };
+};
+
+const validateStreamFrame = (
+ frame: Record,
+ p: string,
+): void => {
+ unsigned(frame.stream_id, `${p}/stream_id`);
+ const offset = unsigned(frame.offset, `${p}/offset`);
+ const length = unsigned(frame.length, `${p}/length`);
+ if (offset !== null && length !== null && offset + length > MAX_VARINT)
+ invalid("qlog stream final offset exceeds the QUIC varint range.", p);
+ if (
+ frame.fin !== undefined &&
+ frame.fin !== null &&
+ typeof frame.fin !== "boolean"
+ )
+ invalid("qlog STREAM fin must be boolean when reported.", `${p}/fin`);
+};
+
+const collectTransportFacts = (
+ projection: Projection,
+ ordinal: number,
+ state: {
+ fact: Trace;
+ streams: Map;
+ excluded: (value: string) => boolean;
+ },
+): void => {
+ const { fact, streams, excluded } = state;
+ if (!object(projection.reported) || !object(projection.reported.data)) {
+ fact.incomplete_fact_records.push(ordinal);
+ return;
+ }
+ const visible = projection.reported;
+ const data = visible.data;
+ if (!object(data)) return;
+ const literals = new Map(
+ projection.numeric_literals.map((n) => [n.pointer, n.literal]),
+ );
+ const read = (value: unknown, pointer: string): bigint | null => {
+ const literal = literals.get(pointer);
+ const number = unsigned(
+ literal === undefined ? value : new LosslessNumber(literal),
+ pointer,
+ );
+ return number !== null && excluded(number.toString()) ? null : number;
+ };
+ if (visible.name === "recovery:packet_lost") {
+ fact.loss_declarations.push(lossDeclaration(data, ordinal, read));
+ }
+ if (!packetEvent(visible.name)) return;
+ if (!Array.isArray(data.frames)) {
+ fact.incomplete_fact_records.push(ordinal);
+ return;
+ }
+ for (const [frameIndex, frame] of data.frames.entries()) {
+ if (
+ !object(frame) ||
+ frame.frame_type === undefined ||
+ frame.frame_type === null
+ ) {
+ fact.incomplete_fact_records.push(ordinal);
+ continue;
+ }
+ if (frame.frame_type !== "stream") continue;
+ const p = `/data/frames/${frameIndex}`;
+ const id = read(frame.stream_id, `${p}/stream_id`),
+ offset = read(frame.offset, `${p}/offset`),
+ length = read(frame.length, `${p}/length`);
+ if (id === null || offset === null || length === null) {
+ fact.incomplete_fact_records.push(ordinal);
+ continue;
+ }
+ const direction =
+ visible.name === "transport:packet_sent" ? "sent" : "received";
+ const key = `${direction}/${id}`;
+ let stream = streams.get(key);
+ if (stream === undefined) {
+ stream = {
+ stream_id: id.toString(),
+ direction,
+ confidence: "derived",
+ scope: "observed-stream-frame-ranges",
+ contributions: [],
+ covered_ranges: [],
+ unique_bytes: "0",
+ frame_length_sum: "0",
+ repeated_bytes: "0",
+ reported_final_sizes: [],
+ };
+ streams.set(key, stream);
+ }
+ stream.contributions.push({
+ record_ordinal: ordinal,
+ frame_index: frameIndex,
+ offset: offset.toString(),
+ length: length.toString(),
+ fin: typeof frame.fin === "boolean" ? frame.fin : null,
+ });
+ }
+};
+
+const lossDeclaration = (
+ data: Record,
+ ordinal: number,
+ read: (value: unknown, pointer: string) => bigint | null,
+): Trace["loss_declarations"][number] => {
+ const pn = read(data.packet_number, "/data/packet_number");
+ const type = typeof data.type === "string" ? data.type : null;
+ return {
+ record_ordinal: ordinal,
+ confidence: "observed",
+ packet_number:
+ pn === null
+ ? {
+ state: "unknown",
+ reason: "omitted-null-or-redacted",
+ }
+ : { state: "reported", value: pn.toString() },
+ packet_type: type,
+ packet_number_space:
+ type === "initial"
+ ? "initial"
+ : type === "handshake"
+ ? "handshake"
+ : type === "0RTT" || type === "1RTT"
+ ? "application"
+ : null,
+ };
+};
+
+const summarizeStream = (stream: Stream): void => {
+ const spans = stream.contributions
+ .map(
+ (c) => [BigInt(c.offset), BigInt(c.offset) + BigInt(c.length)] as const,
+ )
+ .sort((a, b) => (a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0));
+ const merged: { start: bigint; end: bigint }[] = [];
+ for (const [start, end] of spans) {
+ if (start === end) continue;
+ const last = merged.at(-1);
+ if (last !== undefined && start <= last.end)
+ last.end = end > last.end ? end : last.end;
+ else merged.push({ start, end });
+ }
+ const sum = stream.contributions.reduce((s, c) => s + BigInt(c.length), 0n);
+ const unique = merged.reduce((s, r) => s + r.end - r.start, 0n);
+ stream.covered_ranges = merged.map((r) => ({
+ start: r.start.toString(),
+ end: r.end.toString(),
+ }));
+ stream.frame_length_sum = sum.toString();
+ stream.unique_bytes = unique.toString();
+ stream.repeated_bytes = (sum - unique).toString();
+ stream.reported_final_sizes = [
+ ...new Set(
+ stream.contributions
+ .filter((c) => c.fin === true)
+ .map((c) => (BigInt(c.offset) + BigInt(c.length)).toString()),
+ ),
+ ];
+};
+
+const packetEvent = (name: unknown): boolean =>
+ name === "transport:packet_sent" || name === "transport:packet_received";
+const object = (value: unknown): value is Record =>
+ captureObject(value) && !(value instanceof LosslessNumber);
+const invalid = (message: string, pointer: string): never => {
+ throw new CaptureFormatError("format", message, pointer);
+};
+
+/** Canonicalize JSON integer notation exactly, checking expansion before allocation. */
+const unsigned = (value: unknown, pointer: string): bigint | null => {
+ if (value === undefined || value === null) return null;
+ const literal =
+ value instanceof LosslessNumber
+ ? value.value
+ : typeof value === "number"
+ ? String(value)
+ : "";
+ const m = /^(-?)([0-9]+)(?:\.([0-9]+))?(?:[eE]([+-]?[0-9]+))?$/u.exec(
+ literal,
+ );
+ if (m === null)
+ return invalid("qlog QUIC integer must be a JSON number.", pointer);
+ const digits = `${m[2]}${m[3] ?? ""}`.replace(/^0+/u, "");
+ if (digits === "") return 0n;
+ const exponent = m[4] === undefined ? 0 : Number(m[4]);
+ const shift = exponent - (m[3]?.length ?? 0);
+ const count = digits.length + shift;
+ if (m[1] === "-" || !Number.isSafeInteger(shift) || count > 19 || count <= 0)
+ return invalid(
+ "qlog QUIC integer is negative, fractional or outside the 62-bit range.",
+ pointer,
+ );
+ if (shift < 0 && /[1-9]/u.test(digits.slice(count)))
+ return invalid("qlog QUIC integer is fractional.", pointer);
+ const canonical =
+ shift < 0 ? digits.slice(0, count) : digits + "0".repeat(shift);
+ const result = BigInt(canonical);
+ if (result > MAX_VARINT)
+ return invalid("qlog QUIC integer exceeds the 62-bit range.", pointer);
+ return result;
+};
+
+/** Preserve JSON values/lexemes and structurally exclude only transport credentials and declared values. */
+const project = (
+ value: unknown,
+ sensitiveValues: readonly string[],
+): Projection => {
+ const redactor = new CaptureRedaction(sensitiveValues);
+ const numeric_literals: Projection["numeric_literals"] = [];
+ const eventName = object(value) ? value.name : null;
+ const visit = (
+ item: unknown,
+ pointer: string,
+ parent?: Record,
+ ): JsonValue => {
+ const header =
+ (eventName === "http:frame_created" ||
+ eventName === "http:frame_parsed") &&
+ /^\/data\/frame\/headers\/\d+\/value$/u.test(pointer) &&
+ typeof parent?.name === "string";
+ if (
+ (header && credentials.has(String(parent?.name).toLowerCase())) ||
+ qlogToken(eventName, pointer, parent)
+ )
+ return redactor.credential(pointer);
+ if (item instanceof LosslessNumber) {
+ if (
+ redactor.text(item.value, pointer) === null ||
+ (isSafeNumber(item.value) &&
+ redactor.text(String(Number(item.value)), pointer) === null)
+ )
+ return null;
+ numeric_literals.push({
+ pointer,
+ producer_type: "json-number",
+ literal: item.value,
+ });
+ return isSafeNumber(item.value) ? Number(item.value) : null;
+ }
+ if (typeof item === "string")
+ return redactor.text(
+ item,
+ pointer,
+ header &&
+ ["location", "referer", "origin"].includes(
+ String(parent?.name).toLowerCase(),
+ ),
+ );
+ if (item === null || typeof item === "boolean") return item;
+ if (Array.isArray(item))
+ return item.map((child, index) =>
+ visit(child, capturePointer(pointer, String(index))),
+ );
+ if (object(item))
+ return Object.fromEntries(
+ Object.entries(item).flatMap(([key, child]) => {
+ if (sensitiveValues.some((literal) => key.includes(literal))) {
+ redactor.redactions.push({
+ pointer,
+ reason: "explicit-sensitive-value",
+ scope: "property-name",
+ });
+ return [];
+ }
+ return [[key, visit(child, capturePointer(pointer, key), item)]];
+ }),
+ );
+ return invalid("qlog parser returned a non-JSON value.", pointer);
+ };
+ return {
+ reported: visit(value, ""),
+ numeric_literals,
+ binary_fields: [],
+ redactions: redactor.redactions,
+ };
+};
+
+const qlogToken = (
+ eventName: unknown,
+ pointer: string,
+ parent?: Record,
+): boolean => {
+ if (
+ packetEvent(eventName) &&
+ /^\/data\/frames\/\d+\/reset_token$/u.test(pointer) &&
+ parent?.frame_type === "new_connection_id"
+ )
+ return true;
+ if (
+ packetEvent(eventName) &&
+ /^\/data\/frames\/\d+\/token$/u.test(pointer) &&
+ parent?.frame_type === "new_token"
+ )
+ return true;
+ if (
+ eventName === "transport:parameters_set" &&
+ pointer === "/data/stateless_reset_token"
+ )
+ return true;
+ return false;
+};
diff --git a/src/browser/history/SazCapture.ts b/src/browser/history/SazCapture.ts
new file mode 100644
index 000000000..0d597eb5a
--- /dev/null
+++ b/src/browser/history/SazCapture.ts
@@ -0,0 +1,174 @@
+import { ZipArtifactReader } from "../../artifacts/ZipArtifactReader.js";
+import {
+ ArtifactReaderFailure,
+ type ArtifactEntry,
+} from "../../artifacts/ArtifactReader.js";
+import {
+ WEB_NETWORK_CAPTURE_LIMITS,
+ type WebNetworkCaptureRecord,
+} from "../../domain/webNetworkCapture.js";
+import { SAZ_CAPTURE_PROVIDER_IDENTITY } from "./CaptureRelease.js";
+import { CaptureFormatError } from "./CaptureFormatError.js";
+import { decodeSazHttp } from "./SazHttp.js";
+import { decodeSazMetadata } from "./SazMetadata.js";
+import { projectSazRecord, type SazValue } from "./SazProjection.js";
+
+/** Decode native SAZ sessions without extracting files, running Fiddler or converting to HAR. */
+export const decodeSazCapture = async (
+ snapshotPath: string,
+ sensitiveValues: readonly string[],
+) => {
+ const reader = new ZipArtifactReader(
+ snapshotPath,
+ "zip",
+ WEB_NETWORK_CAPTURE_LIMITS.inputBytes,
+ );
+ try {
+ const groups = new Map();
+ const inventory: SazValue[] = [];
+ const paths = new Set();
+ let declaredBytes = 0;
+ for await (const entry of reader.entries()) {
+ if (paths.has(entry.path))
+ throw new CaptureFormatError(
+ "format",
+ "SAZ contains duplicate archive member names.",
+ );
+ paths.add(entry.path);
+ if (entry.encrypted)
+ throw new CaptureFormatError(
+ "unsupported",
+ "Encrypted SAZ archives are unsupported; export an unencrypted copy from Fiddler Everywhere.",
+ );
+ if (entry.kind !== "file" && entry.kind !== "directory")
+ throw new CaptureFormatError(
+ "unsupported",
+ "SAZ archive links are unsupported.",
+ );
+ if (entry.declaredSize !== null) {
+ if (!Number.isSafeInteger(entry.declaredSize) || entry.declaredSize < 0)
+ throw new CaptureFormatError("format", "SAZ member size is invalid.");
+ declaredBytes += entry.declaredSize;
+ }
+ if (declaredBytes > WEB_NETWORK_CAPTURE_LIMITS.inputBytes)
+ throw new CaptureFormatError(
+ "limit",
+ "SAZ expanded members exceed the 32 MiB complete-evidence budget.",
+ );
+ inventory.push({
+ path: entry.path,
+ kind: entry.kind,
+ bytes: entry.declaredSize,
+ });
+ if (entry.kind !== "file") continue;
+ const match = /^raw\/(\d+)_(c\.txt|s\.txt|m\.xml|w\.txt|g\.txt)$/.exec(
+ entry.path,
+ );
+ if (match?.[1] !== undefined) {
+ const group = groups.get(match[1]) ?? [];
+ group.push(entry);
+ groups.set(match[1], group);
+ } else if (entry.path.startsWith("raw/")) {
+ throw new CaptureFormatError(
+ "unsupported",
+ "SAZ contains an unrecognized raw session member.",
+ );
+ }
+ }
+ if (groups.size === 0)
+ throw new CaptureFormatError(
+ "format",
+ "Archive contains no SAZ session members.",
+ );
+ const records: WebNetworkCaptureRecord[] = [];
+ for (const [session_id, entries] of groups) {
+ const source: Record = {
+ session_id,
+ request: null,
+ response: null,
+ metadata: null,
+ websocket: null,
+ grpc: null,
+ };
+ for (const entry of entries) {
+ const stream = await reader.open(entry);
+ const chunks: Buffer[] = [];
+ let length = 0;
+ for await (const chunk of stream) {
+ if (!Buffer.isBuffer(chunk))
+ throw new CaptureFormatError(
+ "format",
+ "SAZ member stream returned non-byte data.",
+ );
+ length += chunk.length;
+ if (length > (entry.declaredSize ?? 0))
+ throw new CaptureFormatError(
+ "format",
+ "SAZ member exceeds its declared size.",
+ );
+ chunks.push(chunk);
+ }
+ if (length !== entry.declaredSize)
+ throw new CaptureFormatError(
+ "format",
+ "SAZ member does not match its declared size.",
+ );
+ const bytes = Buffer.concat(chunks, length);
+ if (entry.path.endsWith("_c.txt"))
+ source.request = {
+ member: entry.path,
+ ...decodeSazHttp(bytes, true),
+ };
+ else if (entry.path.endsWith("_s.txt"))
+ source.response = {
+ member: entry.path,
+ ...decodeSazHttp(bytes, false),
+ };
+ else if (entry.path.endsWith("_m.xml"))
+ source.metadata = {
+ member: entry.path,
+ document: decodeSazMetadata(bytes),
+ };
+ else
+ source[entry.path.endsWith("_w.txt") ? "websocket" : "grpc"] = {
+ member: entry.path,
+ messages: bytes,
+ };
+ }
+ records.push({
+ ordinal: records.length,
+ location: {
+ kind: "archive-members",
+ members: entries.map((entry) => entry.path),
+ },
+ ...projectSazRecord(source, sensitiveValues),
+ limitations: [],
+ });
+ }
+ const container = projectSazRecord({ members: inventory }, sensitiveValues);
+ return {
+ decoder: { ...SAZ_CAPTURE_PROVIDER_IDENTITY },
+ container: {
+ reported: container.reported,
+ numeric_literals: container.numeric_literals,
+ redactions: container.redactions,
+ records_pointer: null,
+ },
+ total_records: records.length,
+ records,
+ };
+ } catch (cause: unknown) {
+ if (cause instanceof CaptureFormatError) throw cause;
+ if (cause instanceof ArtifactReaderFailure && cause.reason === "limit")
+ throw new CaptureFormatError(
+ "limit",
+ "SAZ archive exceeds the ZIP reader's resource budget.",
+ );
+ throw new CaptureFormatError(
+ "format",
+ "SAZ archive or session data is malformed or fails ZIP integrity validation.",
+ );
+ } finally {
+ await reader.close();
+ }
+};
diff --git a/src/browser/history/SazHttp.ts b/src/browser/history/SazHttp.ts
new file mode 100644
index 000000000..246dd6164
--- /dev/null
+++ b/src/browser/history/SazHttp.ts
@@ -0,0 +1,72 @@
+import { CaptureFormatError } from "./CaptureFormatError.js";
+
+/** Preserve ordered HTTP fields and the stored body; never dechunk, decompress or fetch. */
+export const decodeSazHttp = (bytes: Buffer, request: boolean) => {
+ const crlfSplit = bytes.indexOf("\r\n\r\n");
+ // Once a CRLF separator is found, only an earlier LF separator can win.
+ // Avoid searching an otherwise unrelated large body a second time.
+ const lfSplit = bytes
+ .subarray(0, crlfSplit < 0 ? bytes.length : crlfSplit)
+ .indexOf("\n\n");
+ // The first separator ends the headers. Later separators belong to the
+ // stored body, which may use different line endings or contain binary data.
+ const split =
+ crlfSplit >= 0 && (lfSplit < 0 || crlfSplit < lfSplit) ? crlfSplit : -1;
+ const boundary = split < 0 ? lfSplit : split;
+ if (boundary < 0)
+ throw new CaptureFormatError(
+ "format",
+ "SAZ HTTP message has no header/body separator.",
+ );
+ const lines = bytes
+ .subarray(0, boundary)
+ .toString("latin1")
+ .split(split < 0 ? "\n" : "\r\n");
+ const first = lines.shift() ?? "";
+ const fields = request
+ ? /^(\S+) +(\S+) +(HTTP\/\d+(?:\.\d+)?)$/.exec(first)
+ : /^(HTTP\/\d+(?:\.\d+)?) +(\d{3})(?: (.*))?$/.exec(first);
+ if (fields === null)
+ throw new CaptureFormatError("format", "SAZ HTTP start line is malformed.");
+ const headers: { name: string; value: string }[] = [];
+ for (const line of lines) {
+ if (/^[ \t]/.test(line)) {
+ const previous = headers.at(-1);
+ if (previous === undefined)
+ throw new CaptureFormatError(
+ "format",
+ "SAZ HTTP header continuation has no field.",
+ );
+ previous.value += `${split < 0 ? "\n" : "\r\n"}${line}`;
+ continue;
+ }
+ const colon = line.indexOf(":");
+ // HTTP/2 pseudo-headers use the second colon as the delimiter.
+ const delimiter = colon === 0 ? line.indexOf(":", 1) : colon;
+ if (delimiter < 1)
+ throw new CaptureFormatError("format", "SAZ HTTP header is malformed.");
+ const name = line.slice(0, delimiter);
+ if (!/^:?[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(name))
+ throw new CaptureFormatError(
+ "format",
+ "SAZ HTTP header name is malformed.",
+ );
+ headers.push({ name, value: line.slice(delimiter + 1) });
+ }
+ const start = request
+ ? {
+ method: fields[1] ?? "",
+ url: fields[2] ?? "",
+ http_version: fields[3] ?? "",
+ }
+ : {
+ http_version: fields[1] ?? "",
+ status: fields[2] ?? "",
+ reason: fields[3] ?? "",
+ };
+ return {
+ ...start,
+ headers,
+ body: bytes.subarray(boundary + (split < 0 ? 2 : 4)),
+ };
+};
diff --git a/src/browser/history/SazMetadata.ts b/src/browser/history/SazMetadata.ts
new file mode 100644
index 000000000..6e311f8e6
--- /dev/null
+++ b/src/browser/history/SazMetadata.ts
@@ -0,0 +1,83 @@
+import { DOMParser, ParseError, type Node } from "@xmldom/xmldom";
+import type { JsonValue } from "../../domain/jsonValue.js";
+import { WEB_NETWORK_CAPTURE_LIMITS } from "../../domain/webNetworkCapture.js";
+import { CaptureFormatError } from "./CaptureFormatError.js";
+
+/** Preserve XML node order, attribute names and text without interpreting producer-specific flags. */
+export const decodeSazMetadata = (bytes: Buffer): JsonValue => {
+ let xml: string;
+ try {
+ const encoding =
+ bytes[0] === 0xff && bytes[1] === 0xfe
+ ? "utf-16le"
+ : bytes[0] === 0xfe && bytes[1] === 0xff
+ ? "utf-16be"
+ : "utf-8";
+ xml = new TextDecoder(encoding, { fatal: true }).decode(bytes);
+ } catch {
+ throw new CaptureFormatError(
+ "unsupported",
+ "SAZ metadata must use UTF-8 or BOM-marked UTF-16.",
+ );
+ }
+ let parseFailed = false;
+ let document: ReturnType;
+ try {
+ document = new DOMParser({
+ normalizeLineEndings: (source) => source,
+ onError: () => {
+ parseFailed = true;
+ },
+ }).parseFromString(xml, "application/xml");
+ } catch (cause: unknown) {
+ if (!(cause instanceof ParseError)) throw cause;
+ throw new CaptureFormatError(
+ "format",
+ "SAZ metadata is not well-formed XML.",
+ );
+ }
+ // The pinned parser does not resolve external or DTD-defined entities.
+ // Inspect its parsed node; text inside comments/CDATA is ordinary evidence.
+ if (document.doctype !== null)
+ throw new CaptureFormatError(
+ "unsupported",
+ "SAZ metadata DTDs are unsupported.",
+ );
+ if (parseFailed)
+ throw new CaptureFormatError(
+ "format",
+ "SAZ metadata is not well-formed XML.",
+ );
+ if (document.documentElement?.tagName !== "Session")
+ throw new CaptureFormatError(
+ "format",
+ "SAZ metadata must have a Session document element.",
+ );
+ const visit = (node: Node, depth: number): JsonValue => {
+ if (depth > WEB_NETWORK_CAPTURE_LIMITS.depth)
+ throw new CaptureFormatError(
+ "input-limit",
+ "SAZ metadata exceeds the complete-evidence nesting budget.",
+ );
+ const children: JsonValue[] = [];
+ for (let child = node.firstChild; child !== null; child = child.nextSibling)
+ children.push(visit(child, depth + 1));
+ const attributes: JsonValue[] = [];
+ if (node.nodeType === 1) {
+ const element = node as import("@xmldom/xmldom").Element;
+ for (let i = 0; i < element.attributes.length; i++) {
+ const attribute = element.attributes.item(i);
+ if (attribute !== null)
+ attributes.push({ name: attribute.name, value: attribute.value });
+ }
+ }
+ return {
+ name: node.nodeName,
+ type: node.nodeType,
+ value: node.nodeValue,
+ attributes,
+ children,
+ };
+ };
+ return visit(document, 0);
+};
diff --git a/src/browser/history/SazProjection.ts b/src/browser/history/SazProjection.ts
new file mode 100644
index 000000000..eba813628
--- /dev/null
+++ b/src/browser/history/SazProjection.ts
@@ -0,0 +1,131 @@
+import { createHash } from "node:crypto";
+import { isUtf8 } from "node:buffer";
+import type { JsonValue } from "../../domain/jsonValue.js";
+import {
+ WEB_NETWORK_CAPTURE_LIMITS,
+ type WebNetworkCaptureRecord,
+} from "../../domain/webNetworkCapture.js";
+import { CaptureRedaction, capturePointer } from "./CaptureRedaction.js";
+import { CaptureFormatError } from "./CaptureFormatError.js";
+
+export type SazValue =
+ | JsonValue
+ | Buffer
+ | { readonly [key: string]: SazValue }
+ | readonly SazValue[];
+
+/** Project native byte fields with the same credential and explicit-literal exclusions as HAR. */
+export const projectSazRecord = (
+ source: SazValue,
+ sensitiveValues: readonly string[],
+) => {
+ const redactor = new CaptureRedaction(sensitiveValues);
+ const binary_fields: WebNetworkCaptureRecord["binary_fields"] = [];
+ const visit = (
+ value: SazValue,
+ pointer: string,
+ depth: number,
+ parent?: Readonly>,
+ ): JsonValue => {
+ if (depth > WEB_NETWORK_CAPTURE_LIMITS.depth)
+ throw new CaptureFormatError(
+ "input-limit",
+ "SAZ projection exceeds the complete-evidence nesting budget.",
+ pointer,
+ );
+ if (parent !== undefined && redactor.harCredential(pointer, parent))
+ return redactor.credential(pointer);
+ if (Buffer.isBuffer(value)) {
+ const base64 = value.toString("base64");
+ const sha256 = createHash("sha256").update(value).digest("hex");
+ const hidden =
+ redactor.sensitiveBytes(value) ||
+ sensitiveValues.some(
+ (literal) =>
+ base64.includes(literal) ||
+ sha256.includes(literal) ||
+ String(value.length).includes(literal),
+ );
+ if (hidden) {
+ binary_fields.push({
+ pointer,
+ representation: "producer-bytes",
+ state: "redacted",
+ content_base64: null,
+ bytes: null,
+ sha256: null,
+ });
+ redactor.redactions.push({
+ pointer,
+ reason: "explicit-sensitive-value",
+ });
+ return null;
+ }
+ binary_fields.push({
+ pointer,
+ representation: "producer-bytes",
+ state: "retained",
+ content_base64: base64,
+ bytes: value.length,
+ sha256,
+ });
+ return isUtf8(value) ? value.toString("utf8") : null;
+ }
+ if (typeof value === "string") {
+ // HTTP fields are Latin-1 views of bytes. A UTF-8 declaration must also
+ // exclude its byte spelling, even when its display is mojibake.
+ if (
+ /^\/(request|response)\//.test(pointer) &&
+ !pointer.endsWith("/member") &&
+ redactor.sensitiveBytes(Buffer.from(value, "latin1"))
+ ) {
+ redactor.redactions.push({
+ pointer,
+ reason: "explicit-sensitive-value",
+ });
+ return null;
+ }
+ return redactor.text(
+ value,
+ pointer,
+ redactor.harTransportUrl(pointer, parent),
+ );
+ }
+ if (value === null || typeof value === "boolean") return value;
+ if (typeof value === "number")
+ return redactor.text(String(value), pointer) === null ? null : value;
+ if (Array.isArray(value))
+ return value.map((child: SazValue, i: number) =>
+ visit(child, capturePointer(pointer, String(i)), depth + 1),
+ );
+ return Object.fromEntries(
+ Object.entries(value).flatMap(([key, child]) => {
+ if (sensitiveValues.some((literal) => key.includes(literal))) {
+ redactor.redactions.push({
+ pointer,
+ reason: "explicit-sensitive-value",
+ scope: "property-name",
+ });
+ return [];
+ }
+ return [
+ [
+ key,
+ visit(
+ child,
+ capturePointer(pointer, key),
+ depth + 1,
+ value as Readonly>,
+ ),
+ ],
+ ];
+ }),
+ );
+ };
+ return {
+ reported: visit(source, "", 0),
+ binary_fields,
+ numeric_literals: [],
+ redactions: redactor.redactions,
+ };
+};
diff --git a/src/cli/webNetworkCaptureCommands.ts b/src/cli/webNetworkCaptureCommands.ts
index 1b902969c..655d34bc1 100644
--- a/src/cli/webNetworkCaptureCommands.ts
+++ b/src/cli/webNetworkCaptureCommands.ts
@@ -1,4 +1,5 @@
import { z } from "incur";
+import { WEB_NETWORK_CAPTURE_FORMATS } from "../domain/webNetworkCapture.js";
import { createWebNetworkCaptureService } from "../composition/webNetworkCaptures.js";
import { CLI_COMMANDS } from "../cliCommandNames.js";
import { logCliCommand } from "../cliLogging.js";
@@ -16,10 +17,12 @@ export const registerWebNetworkCaptureCommands = (
const service = createWebNetworkCaptureService(environment);
cli.command(CLI_COMMANDS.inspectWebNetworkCapture, {
description:
- "Inspect retained HAR or native mitmproxy records without fetching recorded URLs",
+ "Inspect retained HAR, native mitmproxy, Fiddler SAZ or aioquic qlog records without fetching recorded URLs",
args: z.object({
capturePath: z.string().describe("Absolute local capture path"),
- format: z.enum(["har", "mitmproxy"]).describe("Producer capture format"),
+ format: z
+ .enum(WEB_NETWORK_CAPTURE_FORMATS)
+ .describe("Producer capture format"),
}),
options: z.object({
record: z
diff --git a/src/composition/webNetworkCaptures.ts b/src/composition/webNetworkCaptures.ts
index 6dc7668d4..9d9e8c6cc 100644
--- a/src/composition/webNetworkCaptures.ts
+++ b/src/composition/webNetworkCaptures.ts
@@ -1,6 +1,6 @@
import { WebNetworkCaptureService } from "../application/WebNetworkCaptureService.js";
import { HistoricalCaptureDecoder } from "../browser/history/HistoricalCaptureDecoder.js";
-import { HarCaptureAdapter } from "../browser/history/HarCaptureAdapter.js";
+import { NodeCaptureAdapter } from "../browser/history/NodeCaptureAdapter.js";
import { MitmproxyCaptureAdapter } from "../browser/history/MitmproxyCaptureAdapter.js";
/** Compose offline format adapters without import-time reads, installation or process startup. */
@@ -9,7 +9,12 @@ export const createWebNetworkCaptureService = (
): WebNetworkCaptureService =>
new WebNetworkCaptureService(
new HistoricalCaptureDecoder(
- [new HarCaptureAdapter(), new MitmproxyCaptureAdapter(environment)],
+ [
+ new NodeCaptureAdapter("har"),
+ new NodeCaptureAdapter("saz"),
+ new NodeCaptureAdapter("qlog"),
+ new MitmproxyCaptureAdapter(environment),
+ ],
environment,
),
);
diff --git a/src/contracts/analysisViewToolContracts.ts b/src/contracts/analysisViewToolContracts.ts
index 682c49e6b..06506c83e 100644
--- a/src/contracts/analysisViewToolContracts.ts
+++ b/src/contracts/analysisViewToolContracts.ts
@@ -16,7 +16,7 @@ export const ANALYSIS_VIEW_TOOL_CONTRACTS = [
...toolContractMetadata("inspect_analysis_view"),
kind: "application",
description:
- 'Inspect selected views of completed binary-layout, JavaScript application, native analyze_function, inspect_artifact, inventory_artifact, inspect_wasm_artifact, inspect_evm_interface, inspect_managed_artifact or inspect_web_network_capture Evidence without repeating analysis. The api-surface view groups retained HAR requests by method, origin and format-rule path template; templated segments are inferences. It reads no headers or bodies and reports no query values. For a retained record use source: {kind: "retained-evidence", evidence_id: ""}. Use normalized_result.parent_evidence_id from a summary receipt. Source kind is required. Portable source uses {kind: "inline", evidence: }. For layout, JavaScript, native, inventory, WASM, EVM and managed artifact sources, request a summary with view: {kind: "summary"}; summary is a view kind and has no facet. The WASM summary gives validation, counts, WAT digest/length, tool profile and execution/network states without reading WAT text. Select a layout mitigations/linkage facet, one section/symbol/module, or a stable page. Module pages include assets, bundled and source modules; use node_id for ambiguous or unavailable paths. Inventory uses view: {kind: "inventory", collection: "occurrences", logical_paths: ["package.json"], offset: 0, limit: 64}. Inventory views page nodes, occurrences, edges or integrity contradictions; occurrence logical_paths matches exact recorded strings (omitted means all available, [] means none). source_complete distinguishes complete inventories from partial source records; page exhaustion does not prove absence in a partial source. WASM views use kind wasm and facet sections/imports/exports/candidates/glue/wat/headers/details/tool_profile; text facets use UTF-16 code units and source forms remain exact. EVM summary returns all inferred interface candidates, carrier/decoded identities and explicit unknowns without hex or duplicate stdout. EVM views use kind evm and facet functions/bytecode_hex/stdout/stderr; function pages preserve the original candidate rows, and text offsets/limits count UTF-16 code units (hex has two characters per decoded byte). Exhausting candidate pages does not establish global interface completeness. Managed artifact summaries preserve complete identity/classification, metadata status, module/MVID, frameworks, coverage and limitations without unrelated inventories. Managed pages use kind managed and collection references/resources/attributes, retaining source coverage and build-local token scope; page exhaustion does not establish complete metadata. Native views select procedure, pseudocode, assembly, basic blocks, comments, callers/callees, references, unresolved calls, referenced strings/names, native API and high-pcode. Use nonnegative offset and a positive caller-selected limit (defaults 0 and 64); pseudocode uses UTF-16 code units, other native pages use rows. Returns artifact identity, parent Evidence ID, a distinct view digest, coverage, limitations and unknowns. Actual serialized size determines MCP transport admission; choose a smaller page or export the complete retained Evidence if needed.',
+ 'Inspect selected views of completed binary-layout, JavaScript application, native analyze_function, inspect_artifact, inventory_artifact, inspect_wasm_artifact, inspect_evm_interface, inspect_managed_artifact, inspect_android_package or inspect_web_network_capture Evidence without repeating analysis. Historical capture summaries return identity and counts without bodies or archive inventories. Capture views page retained records: view {kind: "capture", detail: "preview" | "complete", offset: 0, limit: 20}; preview selects recorded headline fields and binary descriptors, complete returns exact records with all sidecars. Offsets follow the selected parent record order, preserving original producer ordinals. Paging never reopens the source or reruns the decoder. Qlog summaries keep profile/scope and counts; kind qlog pages traces, streams, loss-declarations, incomplete-records, contributions, ranges or final-sizes. Except traces, select trace_index; stream-specific facets also require exact stream_id and direction. Facts retain all-recorded-events-before-selection scope, and interval overlap or endpoint loss declarations do not prove retransmission or network loss. The api-surface view groups retained HAR requests by method, origin and format-rule path template; templated segments are inferences. It reads no headers or bodies and reports no query values. For a retained record use source: {kind: "retained-evidence", evidence_id: ""}. Use normalized_result.parent_evidence_id from a summary receipt. Source kind is required. Portable source uses {kind: "inline", evidence: }. For layout, JavaScript, native, inventory, WASM, EVM, managed artifact and Android package sources, request a summary with view: {kind: "summary"}; summary is a view kind and has no facet. The WASM summary gives validation, counts, WAT digest/length, tool profile and execution/network states without reading WAT text. Select a layout mitigations/linkage facet, one section/symbol/module, or a stable page. Module pages include assets, bundled and source modules; use node_id for ambiguous or unavailable paths. Inventory uses view: {kind: "inventory", collection: "occurrences", logical_paths: ["package.json"], offset: 0, limit: 64}. Inventory views page nodes, occurrences, edges or integrity contradictions; occurrence logical_paths matches exact recorded strings (omitted means all available, [] means none). source_complete distinguishes complete inventories from partial source records; page exhaustion does not prove absence in a partial source. WASM views use kind wasm and facet sections/imports/exports/candidates/glue/wat/headers/details/tool_profile; text facets use UTF-16 code units and source forms remain exact. EVM summary returns all inferred interface candidates, carrier/decoded identities and explicit unknowns without hex or duplicate stdout. EVM views use kind evm and facet functions/bytecode_hex/stdout/stderr; function pages preserve the original candidate rows, and text offsets/limits count UTF-16 code units (hex has two characters per decoded byte). Exhausting candidate pages does not establish global interface completeness. Managed artifact summaries preserve complete identity/classification, metadata status, module/MVID, frameworks, coverage and limitations without unrelated inventories. Managed pages use kind managed and collection references/resources/attributes, retaining source coverage and build-local token scope; page exhaustion does not establish complete metadata. Android package summaries retain all declarations, engine identity and counts without decoded manifest text. Android manifest pages use kind android, facet manifest, offset and limit in UTF-16 code units; source_status preserves partial decoded coverage even when the retained text page is exhausted. Native views select procedure, pseudocode, assembly, basic blocks, comments, callers/callees, references, unresolved calls, referenced strings/names, native API and high-pcode. Use nonnegative offset and a positive caller-selected limit (defaults 0 and 64); pseudocode uses UTF-16 code units, other native pages use rows. Returns artifact identity, parent Evidence ID, a distinct view digest, coverage, limitations and unknowns. Actual serialized size determines MCP transport admission; choose a smaller page or export the complete retained Evidence if needed.',
inputSchema: inspectAnalysisViewInputSchema,
outputSchema: evidenceResultOf(analysisViewResultSchema),
examples: [
diff --git a/src/contracts/android/androidToolContracts.ts b/src/contracts/android/androidToolContracts.ts
index df2cccf59..b555fcbea 100644
--- a/src/contracts/android/androidToolContracts.ts
+++ b/src/contracts/android/androidToolContracts.ts
@@ -1,7 +1,10 @@
+import { z } from "zod";
import {
androidInputSchemas,
+ androidPackageInspectionInputSchema,
androidResultSchemas,
} from "../../domain/android/androidAnalysis.js";
+import { androidPackageSummaryViewResultSchema } from "../../domain/analysisView/analysisView.js";
import type { ToolContract } from "../toolContractTypes.js";
import { evidenceResultOf } from "../toolOutputSchemaPrimitives.js";
import { toolContractMetadata } from "../toolEffects.js";
@@ -12,14 +15,21 @@ export const ANDROID_TOOL_CONTRACTS = [
name: "inspect_android_package",
...toolContractMetadata("inspect_android_package"),
description:
- "Inspect a local APK's package, SDK and permission declarations, decoded manifest and class/resource counts. Does not execute the APK or verify signatures. Requires a caller-supplied JADX MCP JAR and JDK; uses one worker in an isolated temporary workspace.",
+ 'Inspect a local APK\'s package, SDK and permission declarations, decoded manifest and class/resource counts. Omitted or complete detail preserves the complete result. Select detail: "summary" for all declarations, engine identity and counts without decoded manifest text or duplicate raw calls; retains the complete source and returns a distinct linked inspect_analysis_view summary. Read the exact retained manifest with view kind android, facet manifest, offset and limit (UTF-16 code units), using normalized_result.parent_evidence_id. Does not execute the APK or verify signatures. Requires a caller-supplied JADX MCP JAR and JDK; uses one worker in an isolated temporary workspace.',
kind: "android-provider",
- inputSchema: androidInputSchemas.inspect_android_package,
+ inputSchema: androidPackageInspectionInputSchema,
outputSchema: evidenceResultOf(
- androidResultSchemas.inspect_android_package,
+ z.union([
+ androidResultSchemas.inspect_android_package,
+ androidPackageSummaryViewResultSchema,
+ ]),
),
examples: [
{ title: "Inspect an APK", input: { path: "/tmp/Example.apk" } },
+ {
+ title: "Inspect APK declarations with retained manifest",
+ input: { path: "/tmp/Example.apk", detail: "summary" },
+ },
],
},
{
diff --git a/src/contracts/webNetworkCaptureToolContracts.ts b/src/contracts/webNetworkCaptureToolContracts.ts
index cb919172f..592dd9b54 100644
--- a/src/contracts/webNetworkCaptureToolContracts.ts
+++ b/src/contracts/webNetworkCaptureToolContracts.ts
@@ -4,7 +4,11 @@ import {
} from "../domain/webNetworkCapture.js";
import type { ToolContract } from "./toolContractTypes.js";
import { toolContractMetadata } from "./toolEffects.js";
-import { evidenceResultOf } from "./toolOutputSchemaPrimitives.js";
+import {
+ analysisDetailSchema,
+ analysisDetailOutputSchemaOf,
+} from "./analysisDetail.js";
+import { webNetworkCaptureSummaryViewResultSchema } from "../domain/analysisView/analysisView.js";
/** Historical inspection is distinct from live browser capture and runtime authority. */
export const WEB_NETWORK_CAPTURE_TOOL_CONTRACTS = [
@@ -12,11 +16,24 @@ export const WEB_NETWORK_CAPTURE_TOOL_CONTRACTS = [
name: "inspect_web_network_capture",
...toolContractMetadata("inspect_web_network_capture"),
description:
- "Inspect retained local HAR 1.2 or native mitmproxy capture records without contacting recorded URLs. Returns original ordinals, pointers/byte ranges, preserved producer fields, precise numeric representations and exact exposed binary bytes inline. Excludes known transport credentials and explicitly marked values. Decodes every record before optional ordinal selection; malformed or oversized captures return no partial success. Duplicate HAR members are invalid; prototype-named members such as __proto__ are preserved as ordinary own JSON members without prototype mutation. Uses pinned upstream parsers, owned temporary files and bounded offline processes. Native mitmproxy requires caller-supplied mitmdump 12.2.3 on Linux. Browser transaction IDs, runtime attribution and original bytes of HAR Unicode text remain unknown.",
+ "Request detail summary for capture identity and counts; then page retained records with inspect_analysis_view kind capture (preview or complete), avoiding repeated decoding. Default detail complete preserves existing inline delivery. Inspect retained local HAR 1.2, native mitmproxy, Fiddler SAZ or aioquic 1.5.0 JSON qlog 0.3 events without contacting recorded URLs. Returns original ordinals, pointers/byte ranges/archive member names, preserved producer fields, precise numeric representations and exact exposed binary bytes inline. Excludes known transport credentials and explicitly marked values. Decodes every record before optional ordinal selection; malformed or oversized captures return no partial success. Duplicate JSON members are invalid; prototype-named members such as __proto__ are preserved as ordinary own JSON members without prototype mutation. Qlog reports trace-scoped STREAM interval unions and endpoint loss declarations; it does not recover bodies, prove network loss or correlate PCAP. Other qlog layouts are unsupported. Uses pinned upstream parsers, owned temporary files and bounded offline processes. SAZ preserves HTTP fields, XML metadata and encoded body/message bytes without replay or HAR conversion; encrypted archives are unsupported. Native mitmproxy requires caller-supplied mitmdump 12.2.3 on Linux. Browser transaction IDs, runtime attribution and original bytes of HAR Unicode text remain unknown.",
kind: "browser-provider",
- inputSchema: inspectWebNetworkCaptureInputSchema,
- outputSchema: evidenceResultOf(webNetworkCaptureSchema),
+ inputSchema: inspectWebNetworkCaptureInputSchema.extend({
+ detail: analysisDetailSchema,
+ }),
+ outputSchema: analysisDetailOutputSchemaOf(
+ webNetworkCaptureSchema,
+ webNetworkCaptureSummaryViewResultSchema,
+ ),
examples: [
+ {
+ title: "Inspect retained aioquic qlog events",
+ input: {
+ capture_path: "/captures/origin.qlog",
+ format: "qlog",
+ record_ordinals: [0, 2],
+ },
+ },
{
title: "Inspect historical HAR entries",
input: {
diff --git a/src/domain/analysisView/analysisView.ts b/src/domain/analysisView/analysisView.ts
index 4ab9c77da..05f879024 100644
--- a/src/domain/analysisView/analysisView.ts
+++ b/src/domain/analysisView/analysisView.ts
@@ -55,7 +55,24 @@ import {
wasmViewItemSchema,
wasmSummarySchema,
} from "./wasmArtifactView.js";
+import {
+ projectWebNetworkCaptureView,
+ captureViewRequestSchema,
+ captureViewItemsSchema,
+ captureSummarySchema,
+} from "./webNetworkCaptureView.js";
import type { WebNetworkApiSurfaceAccumulator } from "./WebNetworkApiSurfaceAccumulator.js";
+import {
+ qlogViewRequestSchema,
+ qlogViewPageSchema,
+ qlogViewContextSchema,
+} from "./qlogCaptureView.js";
+import {
+ projectAndroidPackageView,
+ androidPackageSummarySchema,
+ androidViewRequestSchema,
+ androidManifestViewItemSchema,
+} from "./androidPackageView.js";
/** Public name of the selected-view workflow. */
export const INSPECT_ANALYSIS_VIEW_OPERATION = "inspect_analysis_view" as const;
@@ -169,7 +186,10 @@ export const analysisViewRequestSchema = z.discriminatedUnion("kind", [
wasmViewRequestSchema,
evmViewRequestSchema,
managedViewRequestSchema,
+ androidViewRequestSchema,
apiSurfaceViewSchema,
+ captureViewRequestSchema,
+ qlogViewRequestSchema,
]);
// The application owns admission and authenticated Evidence parsing. SDK and
@@ -209,7 +229,7 @@ const artifactSchema = z.strictObject({
path: z
.string()
.describe("Exact recorded artifact path, including an empty string."),
- sha256: digestSchema,
+ sha256: digestSchema.nullable(),
});
const layoutSummarySchema = z.strictObject({
@@ -283,6 +303,8 @@ const viewResultBase = {
"inspect_wasm_artifact",
"inspect_evm_interface",
"inspect_managed_artifact",
+ "inspect_web_network_capture",
+ "inspect_android_package",
]),
parent_digest: digestSchema,
view_digest: digestSchema,
@@ -340,6 +362,20 @@ export const managedArtifactSummaryViewResultSchema = z.strictObject({
summary: managedSummarySchema,
});
+/** Exact historical capture summary, with no body or member-inventory payload. */
+export const webNetworkCaptureSummaryViewResultSchema = z.strictObject({
+ ...summaryViewResultBase,
+ parent_operation: z.literal("inspect_web_network_capture"),
+ summary: captureSummarySchema,
+});
+
+/** Exact package declarations with retained decoded manifest text. */
+export const androidPackageSummaryViewResultSchema = z.strictObject({
+ ...summaryViewResultBase,
+ parent_operation: z.literal("inspect_android_package"),
+ summary: androidPackageSummarySchema,
+});
+
/** Projected facts for one selected view of retained analysis Evidence. */
export const analysisViewResultSchema = z.discriminatedUnion("kind", [
z.strictObject({
@@ -362,8 +398,25 @@ export const analysisViewResultSchema = z.discriminatedUnion("kind", [
wasmSummarySchema,
evmSummarySchema,
managedSummarySchema,
+ captureSummarySchema,
+ androidPackageSummarySchema,
]),
}),
+ z.strictObject({
+ kind: z.literal("capture"),
+ view: captureViewRequestSchema,
+ items: captureViewItemsSchema,
+ ...viewResultBase,
+ parent_operation: z.literal("inspect_web_network_capture"),
+ }),
+ z.strictObject({
+ kind: z.literal("qlog"),
+ view: qlogViewRequestSchema,
+ page: qlogViewPageSchema,
+ context: qlogViewContextSchema,
+ ...viewResultBase,
+ parent_operation: z.literal("inspect_web_network_capture"),
+ }),
z.strictObject({
kind: z.literal("facet"),
view: facetViewSchema,
@@ -410,6 +463,13 @@ export const analysisViewResultSchema = z.discriminatedUnion("kind", [
...managedViewContextSchema.shape,
parent_operation: z.literal("inspect_managed_artifact"),
}),
+ z.strictObject({
+ kind: z.literal("android"),
+ view: androidViewRequestSchema,
+ item: androidManifestViewItemSchema,
+ ...viewResultBase,
+ parent_operation: z.literal("inspect_android_package"),
+ }),
z.strictObject({
kind: z.literal("inventory"),
view: inventoryViewSchema,
@@ -477,9 +537,18 @@ export type UnsignedAnalysisView =
>
| Omit, "view_digest">
| Omit, "view_digest">
+ | Omit, "view_digest">
+ | Omit<
+ Extract,
+ "view_digest"
+ >
| Omit<
Extract,
"view_digest"
+ >
+ | Omit<
+ Extract,
+ "view_digest"
>;
/** Attach the content digest that must change when projected bytes change. */
@@ -525,7 +594,7 @@ const unsupportedParent = (
new AnalysisUnsupportedTargetError(
INSPECT_ANALYSIS_VIEW_OPERATION,
parentArtifactPath(parent),
- `Parent Evidence operation ${JSON.stringify(parent.operation)} does not support analysis views. Use completed binary layout, JavaScript application, native function, artifact inventory/inspection, WASM, EVM, managed artifact, or web network capture Evidence.`,
+ `Parent Evidence operation ${JSON.stringify(parent.operation)} does not support analysis views. Use completed binary layout, JavaScript application, native function, artifact inventory/inspection, WASM, EVM, managed artifact, Android package, or web network capture Evidence.`,
);
const parentArtifactPath = (parent: AnalysisViewParent): string => {
@@ -554,6 +623,7 @@ const retainedViewProjectors = new Map([
["inspect_wasm_artifact", projectWasmArtifactView],
["inspect_evm_interface", projectEvmInterfaceView],
["inspect_managed_artifact", projectManagedArtifactView],
+ ["inspect_android_package", projectAndroidPackageView],
["inspect_artifact", projectArtifactInventoryView],
["inventory_artifact", projectArtifactInventoryView],
]);
@@ -575,10 +645,7 @@ export const projectAnalysisView = (
},
]),
);
- if (
- view.kind === "api-surface" ||
- parent.operation === "inspect_web_network_capture"
- ) {
+ if (view.kind === "api-surface") {
const projected = projectWebNetworkApiSurfaceView(
parent,
view,
@@ -586,6 +653,10 @@ export const projectAnalysisView = (
);
return projected.ok ? ok(sealAnalysisView(projected.value)) : projected;
}
+ if (parent.operation === "inspect_web_network_capture") {
+ const projected = projectWebNetworkCaptureView(parent, view);
+ return projected.ok ? ok(sealAnalysisView(projected.value)) : projected;
+ }
if (parent.operation === "inspect_binary_layout") {
const layout = binaryLayoutSchema.safeParse(parent.normalizedResult);
if (!layout.success)
diff --git a/src/domain/analysisView/androidPackageView.ts b/src/domain/analysisView/androidPackageView.ts
new file mode 100644
index 000000000..caf948c10
--- /dev/null
+++ b/src/domain/analysisView/androidPackageView.ts
@@ -0,0 +1,136 @@
+import { z } from "zod";
+import type { AnalysisError } from "../analysisErrorBase.js";
+import { androidResultSchemas } from "../android/androidAnalysis.js";
+import { analysisInputErrorFromIssues } from "../inputIssueProjection.js";
+import { err, ok, type Result } from "../result.js";
+import {
+ analysisViewInputError,
+ type AnalysisViewParent,
+ type AnalysisViewRequest,
+ type UnsignedAnalysisView,
+} from "./analysisView.js";
+import { completeWithinViewCoverage } from "./analysisViewCoverage.js";
+import { analysisTextPage } from "./analysisViewText.js";
+
+const packageSchema = androidResultSchemas.inspect_android_package;
+
+/** All package declarations remain inline; decoded manifest text stays retained. */
+export const androidPackageSummarySchema = packageSchema.extend({
+ manifest: packageSchema.shape.manifest.omit({ text: true }).extend({
+ text_code_units: z.number().int().nonnegative(),
+ text_included: z.literal(false),
+ }),
+});
+
+/** Exact decoded text; offsets and limits count UTF-16 code units. */
+export const androidViewRequestSchema = z.strictObject({
+ kind: z.literal("android"),
+ facet: z.literal("manifest"),
+ offset: z.number().int().nonnegative().default(0),
+ limit: z.number().int().positive(),
+});
+
+export const androidManifestViewItemSchema = z.strictObject({
+ text: z.string(),
+ unit: z.literal("utf16-code-units"),
+ source_status: packageSchema.shape.manifest.shape.status,
+ reported_total_bytes: packageSchema.shape.manifest.shape.reported_total_bytes,
+});
+
+/** Project an authenticated package record without reopening the APK or engine. */
+export const projectAndroidPackageView = (
+ parent: AnalysisViewParent,
+ view: AnalysisViewRequest,
+): Result => {
+ if (view.kind !== "summary" && view.kind !== "android")
+ return err(
+ analysisViewInputError([
+ {
+ path: ["view"],
+ reason: "invalid_value",
+ message:
+ "Android package Evidence supports summary and manifest views.",
+ },
+ ]),
+ );
+ const parsed = packageSchema.safeParse(parent.normalizedResult);
+ if (!parsed.success)
+ return err(
+ analysisInputErrorFromIssues(
+ "inspect_analysis_view",
+ parsed.error.issues.map((issue) => ({
+ ...issue,
+ path: ["source", "normalized_result", ...issue.path],
+ })),
+ { source: { normalized_result: parent.normalizedResult } },
+ { cause: parsed.error },
+ ),
+ );
+ // Engine artifact_sha256 identifies the JAR, never the APK. A missing
+ // authenticated APK subject cannot be repaired using the engine identity.
+ if (parent.subject == null)
+ return err(
+ analysisViewInputError([
+ {
+ path: ["source", "subject"],
+ reason: "invalid_value",
+ message:
+ "Android package views require the recorded APK subject identity.",
+ },
+ ]),
+ );
+ const report = parsed.data;
+ const shared = {
+ parent_evidence_id: parent.evidenceId,
+ parent_operation: "inspect_android_package" as const,
+ parent_digest: parent.evidenceId.slice(3),
+ artifact: {
+ path: parent.subject.local_path,
+ sha256: parent.subject.digest.sha256,
+ },
+ limitations: [...parent.limitations],
+ unknowns: [
+ "APK signatures were not verified; package declarations do not establish authenticity or runtime behavior.",
+ ...(report.manifest.status === "partial"
+ ? [
+ "The decoded manifest is partial; exhausting retained text does not establish complete manifest coverage.",
+ ]
+ : []),
+ ],
+ };
+ if (view.kind === "summary") {
+ const { text, ...manifest } = report.manifest;
+ return ok({
+ kind: "summary",
+ view,
+ ...shared,
+ summary: {
+ ...report,
+ manifest: {
+ ...manifest,
+ text_code_units: text.length,
+ text_included: false,
+ },
+ },
+ coverage: completeWithinViewCoverage(1, 1),
+ });
+ }
+ const page = analysisTextPage(
+ report.manifest.text,
+ view.offset,
+ view.limit,
+ "Manifest",
+ );
+ if (!page.ok) return page;
+ return ok({
+ kind: "android",
+ view,
+ ...shared,
+ item: {
+ ...page.value.item,
+ source_status: report.manifest.status,
+ reported_total_bytes: report.manifest.reported_total_bytes,
+ },
+ coverage: page.value.coverage,
+ });
+};
diff --git a/src/domain/analysisView/javascriptApplicationView.ts b/src/domain/analysisView/javascriptApplicationView.ts
index 5e5f9bb88..41a22f8d9 100644
--- a/src/domain/analysisView/javascriptApplicationView.ts
+++ b/src/domain/analysisView/javascriptApplicationView.ts
@@ -241,22 +241,14 @@ export const projectJavaScriptApplicationView = (
analysis: JavaScriptApplicationAnalysisResult,
view: Exclude,
): Result => {
+ if (view.kind !== "summary" && view.kind !== "item" && view.kind !== "page")
+ return err(
+ jsIncompatible(
+ "JavaScript application Evidence supports summary, module item or module page views.",
+ ),
+ );
const shared = parentFields(parent, analysis);
const modules = moduleEntries(analysis.graph.nodes);
- if (view.kind === "native")
- return err(
- jsIncompatible("Native views require analyze_function Evidence."),
- );
- if (view.kind === "inventory")
- return err(jsIncompatible("Inventory views require artifact Evidence."));
- if (view.kind === "wasm")
- return err(
- jsIncompatible("WASM views require inspect_wasm_artifact Evidence."),
- );
- if (view.kind === "evm")
- return err(
- jsIncompatible("EVM views require inspect_evm_interface Evidence."),
- );
if (view.kind === "summary")
return ok({
kind: "summary",
@@ -291,12 +283,6 @@ export const projectJavaScriptApplicationView = (
coverage: completeCoverage(modules.length, analysis.graph.nodes.length),
...shared,
});
- if (view.kind === "facet")
- return err(
- jsIncompatible(
- "facet views apply to inspect_binary_layout Evidence (mitigations or linkage).",
- ),
- );
if (view.kind === "item") {
if (view.collection !== "modules")
return err(
@@ -314,7 +300,7 @@ export const projectJavaScriptApplicationView = (
...shared,
});
}
- if (view.collection !== "modules")
+ if (view.kind !== "page" || view.collection !== "modules")
return err(
jsIncompatible(
"Section and symbol collections apply to inspect_binary_layout Evidence.",
diff --git a/src/domain/analysisView/qlogCaptureView.ts b/src/domain/analysisView/qlogCaptureView.ts
new file mode 100644
index 000000000..a3bdf88c3
--- /dev/null
+++ b/src/domain/analysisView/qlogCaptureView.ts
@@ -0,0 +1,248 @@
+import { z } from "zod";
+import {
+ qlogCaptureFactsSchema,
+ type QlogCaptureFacts,
+} from "../qlogCapture.js";
+import { err, ok, type Result } from "../result.js";
+import type { AnalysisError } from "../analysisErrorBase.js";
+import { analysisViewInputError } from "./analysisView.js";
+import { pageViewCoverage } from "./analysisViewCoverage.js";
+
+const traceSchema = qlogCaptureFactsSchema.shape.traces.element;
+const streamSchema = traceSchema.shape.streams.element;
+export const qlogViewContextSchema = qlogCaptureFactsSchema.omit({
+ traces: true,
+});
+export const qlogSummarySchema = qlogViewContextSchema.extend({
+ trace_count: z.number().int().nonnegative(),
+ retained_stream_count: z.number().int().nonnegative(),
+ loss_declaration_count: z.number().int().nonnegative(),
+ incomplete_fact_record_count: z.number().int().nonnegative(),
+});
+
+/** Select retained trace facts without copying event inventories or every contribution. */
+const pageRequestShape = {
+ kind: z.literal("qlog"),
+ offset: z.number().int().nonnegative().default(0),
+ limit: z.number().int().positive().default(64),
+};
+const traceSelectorShape = { trace_index: z.number().int().nonnegative() };
+const streamSelectorShape = {
+ ...traceSelectorShape,
+ stream_id: streamSchema.shape.stream_id,
+ direction: streamSchema.shape.direction,
+};
+export const qlogViewRequestSchema = z.discriminatedUnion("facet", [
+ z.strictObject({ ...pageRequestShape, facet: z.literal("traces") }),
+ z.strictObject({
+ ...pageRequestShape,
+ ...traceSelectorShape,
+ facet: z.literal("streams"),
+ }),
+ z.strictObject({
+ ...pageRequestShape,
+ ...traceSelectorShape,
+ facet: z.literal("loss-declarations"),
+ }),
+ z.strictObject({
+ ...pageRequestShape,
+ ...traceSelectorShape,
+ facet: z.literal("incomplete-records"),
+ }),
+ z.strictObject({
+ ...pageRequestShape,
+ ...streamSelectorShape,
+ facet: z.literal("contributions"),
+ }),
+ z.strictObject({
+ ...pageRequestShape,
+ ...streamSelectorShape,
+ facet: z.literal("ranges"),
+ }),
+ z.strictObject({
+ ...pageRequestShape,
+ ...streamSelectorShape,
+ facet: z.literal("final-sizes"),
+ }),
+]);
+export type QlogViewRequest = z.output;
+
+const traceSummarySchema = traceSchema
+ .omit({
+ streams: true,
+ loss_declarations: true,
+ incomplete_fact_records: true,
+ })
+ .extend({
+ stream_count: z.number().int().nonnegative(),
+ loss_declaration_count: z.number().int().nonnegative(),
+ incomplete_fact_record_count: z.number().int().nonnegative(),
+ });
+const streamSummarySchema = streamSchema
+ .omit({
+ contributions: true,
+ covered_ranges: true,
+ reported_final_sizes: true,
+ })
+ .extend({
+ contribution_count: z.number().int().nonnegative(),
+ covered_range_count: z.number().int().nonnegative(),
+ reported_final_size_count: z.number().int().nonnegative(),
+ });
+/** Each page advertises exactly the retained item contract for its facet. */
+export const qlogViewPageSchema = z.discriminatedUnion("facet", [
+ z.strictObject({
+ facet: z.literal("traces"),
+ items: z.array(traceSummarySchema),
+ }),
+ z.strictObject({
+ facet: z.literal("streams"),
+ items: z.array(streamSummarySchema),
+ }),
+ z.strictObject({
+ facet: z.literal("loss-declarations"),
+ items: traceSchema.shape.loss_declarations,
+ }),
+ z.strictObject({
+ facet: z.literal("incomplete-records"),
+ items: traceSchema.shape.incomplete_fact_records,
+ }),
+ z.strictObject({
+ facet: z.literal("contributions"),
+ items: streamSchema.shape.contributions,
+ }),
+ z.strictObject({
+ facet: z.literal("ranges"),
+ items: streamSchema.shape.covered_ranges,
+ }),
+ z.strictObject({
+ facet: z.literal("final-sizes"),
+ items: streamSchema.shape.reported_final_sizes,
+ }),
+]);
+type QlogViewPage = z.output;
+
+export const summarizeQlogCapture = (qlog: QlogCaptureFacts) => {
+ const { traces, ...context } = qlog;
+ return {
+ ...context,
+ trace_count: traces.length,
+ retained_stream_count: traces.reduce(
+ (sum, trace) => sum + trace.streams.length,
+ 0,
+ ),
+ loss_declaration_count: traces.reduce(
+ (sum, trace) => sum + trace.loss_declarations.length,
+ 0,
+ ),
+ incomplete_fact_record_count: traces.reduce(
+ (sum, trace) => sum + trace.incomplete_fact_records.length,
+ 0,
+ ),
+ };
+};
+
+const summarizeTrace = ({
+ streams,
+ loss_declarations,
+ incomplete_fact_records,
+ ...trace
+}: QlogCaptureFacts["traces"][number]) => ({
+ ...trace,
+ stream_count: streams.length,
+ loss_declaration_count: loss_declarations.length,
+ incomplete_fact_record_count: incomplete_fact_records.length,
+});
+const summarizeStream = ({
+ contributions,
+ covered_ranges,
+ reported_final_sizes,
+ ...stream
+}: QlogCaptureFacts["traces"][number]["streams"][number]) => ({
+ ...stream,
+ contribution_count: contributions.length,
+ covered_range_count: covered_ranges.length,
+ reported_final_size_count: reported_final_sizes.length,
+});
+
+/** Array offsets refer to retained facts, whose scope remains all recorded events. */
+export const projectQlogCapturePage = (
+ qlog: QlogCaptureFacts,
+ view: QlogViewRequest,
+): Result<
+ {
+ context: z.output;
+ page: QlogViewPage;
+ coverage: ReturnType;
+ },
+ AnalysisError
+> => {
+ const invalid = (field: string, message: string) =>
+ err(
+ analysisViewInputError([
+ { path: ["view", field], reason: "invalid_value", message },
+ ]),
+ );
+ const slice = (items: readonly T[]) =>
+ items.slice(view.offset, view.offset + view.limit);
+ let page: QlogViewPage;
+ let total: number;
+ if (view.facet === "traces") {
+ total = qlog.traces.length;
+ page = {
+ facet: "traces",
+ items: slice(qlog.traces).map(summarizeTrace),
+ };
+ } else {
+ const matches = qlog.traces.filter(
+ (trace) => trace.trace_index === view.trace_index,
+ );
+ if (matches.length !== 1)
+ return invalid(
+ "trace_index",
+ "Select one unambiguous retained trace index.",
+ );
+ const trace = matches[0]!;
+ if (view.facet === "streams") {
+ total = trace.streams.length;
+ page = {
+ facet: "streams",
+ items: slice(trace.streams).map(summarizeStream),
+ };
+ } else if (view.facet === "loss-declarations") {
+ total = trace.loss_declarations.length;
+ page = { facet: view.facet, items: slice(trace.loss_declarations) };
+ } else if (view.facet === "incomplete-records") {
+ total = trace.incomplete_fact_records.length;
+ page = { facet: view.facet, items: slice(trace.incomplete_fact_records) };
+ } else {
+ const matches = trace.streams.filter(
+ (stream) =>
+ stream.stream_id === view.stream_id &&
+ stream.direction === view.direction,
+ );
+ if (matches.length !== 1)
+ return invalid(
+ "stream_id",
+ "Select one unambiguous retained stream ID and direction within the trace.",
+ );
+ const stream = matches[0]!;
+ if (view.facet === "contributions") {
+ total = stream.contributions.length;
+ page = { facet: view.facet, items: slice(stream.contributions) };
+ } else if (view.facet === "ranges") {
+ total = stream.covered_ranges.length;
+ page = { facet: view.facet, items: slice(stream.covered_ranges) };
+ } else {
+ total = stream.reported_final_sizes.length;
+ page = { facet: view.facet, items: slice(stream.reported_final_sizes) };
+ }
+ }
+ }
+ const { traces: _traces, ...context } = qlog;
+ return ok({
+ context,
+ page,
+ coverage: pageViewCoverage(view.offset, page.items.length, total),
+ });
+};
diff --git a/src/domain/analysisView/webNetworkApiSurfaceView.test.ts b/src/domain/analysisView/webNetworkApiSurfaceView.test.ts
index f13e392ff..b57d54b59 100644
--- a/src/domain/analysisView/webNetworkApiSurfaceView.test.ts
+++ b/src/domain/analysisView/webNetworkApiSurfaceView.test.ts
@@ -85,11 +85,13 @@ it("pages groups independently of record completeness and preserves null digests
});
it("rejects native captures and malformed parents with typed errors", () => {
const capture = analysisViewCaptureFixture();
- capture.format = "mitmproxy";
- expect(project(capture)).toMatchObject({
- ok: false,
- error: { _tag: "AnalysisUnsupportedTargetError" },
- });
+ for (const format of ["mitmproxy", "saz"] as const) {
+ capture.format = format;
+ expect(project(capture)).toMatchObject({
+ ok: false,
+ error: { _tag: "AnalysisUnsupportedTargetError" },
+ });
+ }
expect(
projectAnalysisView(
{
diff --git a/src/domain/analysisView/webNetworkCaptureView.test.ts b/src/domain/analysisView/webNetworkCaptureView.test.ts
new file mode 100644
index 000000000..ff73b29a6
--- /dev/null
+++ b/src/domain/analysisView/webNetworkCaptureView.test.ts
@@ -0,0 +1,176 @@
+import { expect, it } from "vitest";
+import { createHash } from "node:crypto";
+import { createEvidence } from "../evidence.js";
+import { webNetworkCaptureSchema } from "../webNetworkCapture.js";
+import { projectAnalysisView } from "./analysisView.js";
+
+const capture = () => {
+ const body = Buffer.from("original body");
+ const artifact = {
+ path: "/recordings/input.saz",
+ sha256: "b".repeat(64),
+ bytes: 100,
+ };
+ const decoder = { id: "fixture", name: "Fixture", version: "1" };
+ const report = webNetworkCaptureSchema.parse({
+ artifact,
+ decoder,
+ format: "saz",
+ runtime_attribution: "unknown",
+ limitations: [],
+ container: {
+ reported: { members: [] },
+ numeric_literals: [],
+ redactions: [],
+ records_pointer: null,
+ },
+ total_records: 9,
+ records: [7, 2].map((ordinal) => ({
+ ordinal,
+ location: { kind: "archive-members", members: [`raw/${ordinal}_c.txt`] },
+ reported: {
+ session_id: String(ordinal),
+ time: null,
+ request: {
+ method: "POST",
+ url: "https://example.invalid/a",
+ body: body.toString(),
+ },
+ },
+ binary_fields: [
+ {
+ pointer: "/request/body",
+ representation: "producer-bytes",
+ state: "retained",
+ content_base64: body.toString("base64"),
+ bytes: body.length,
+ sha256: createHash("sha256").update(body).digest("hex"),
+ },
+ ],
+ numeric_literals: [
+ {
+ pointer: "/time",
+ producer_type: "json-number",
+ literal: "9007199254740993",
+ },
+ ],
+ redactions: [],
+ limitations: [],
+ })),
+ });
+ const evidence = createEvidence({ ...artifact, format: "file" }, decoder, {
+ operation: "inspect_web_network_capture",
+ parameters: { record_ordinals: [7, 2] },
+ result: report,
+ confidence: "observed",
+ authority: "historical-reference",
+ });
+ return {
+ report,
+ parent: {
+ evidenceId: evidence.evidence_id,
+ operation: evidence.operation,
+ normalizedResult: report,
+ subject: evidence.subject,
+ limitations: evidence.limitations,
+ },
+ };
+};
+
+it("keeps selected-record page coverage distinct from capture coverage and unsafe number absence", () => {
+ const { parent, report } = capture();
+ const summary = projectAnalysisView(parent, { kind: "summary" });
+ expect(summary.ok && summary.value).toMatchObject({
+ summary: { total_records: 9, retained_records: 2 },
+ coverage: { examined: 2, total: 2 },
+ });
+ const preview = projectAnalysisView(parent, {
+ kind: "capture",
+ detail: "preview",
+ offset: 0,
+ limit: 1,
+ });
+ expect(preview.ok && preview.value).toMatchObject({
+ items: [
+ {
+ ordinal: 7,
+ reported: { time: null },
+ numeric_literals: [{ pointer: "/time", literal: "9007199254740993" }],
+ },
+ ],
+ coverage: { total: 2, examined: 1, next_offset: 1, exhausted: false },
+ });
+ expect(JSON.stringify(preview)).not.toContain("original body");
+ expect(JSON.stringify(preview)).not.toContain("content_base64");
+ const complete = projectAnalysisView(parent, {
+ kind: "capture",
+ detail: "complete",
+ offset: 1,
+ limit: 1,
+ });
+ expect(complete.ok && complete.value).toMatchObject({
+ items: [report.records[1]],
+ coverage: { total: 2, examined: 1, next_offset: null, exhausted: true },
+ });
+ const empty = projectAnalysisView(parent, {
+ kind: "capture",
+ detail: "preview",
+ offset: 50,
+ limit: 1,
+ });
+ expect(empty.ok && empty.value).toMatchObject({
+ items: [],
+ coverage: {
+ status: "empty",
+ total: 2,
+ examined: 0,
+ next_offset: null,
+ exhausted: true,
+ },
+ });
+});
+
+it("retains explicitly unknown digests and rejects a different subject path", () => {
+ const { parent, report } = capture();
+ const unknown = projectAnalysisView(
+ {
+ ...parent,
+ subject: null,
+ normalizedResult: {
+ ...report,
+ artifact: { ...report.artifact, sha256: null },
+ },
+ },
+ { kind: "summary" },
+ );
+ expect(unknown.ok && unknown.value).toMatchObject({
+ artifact: { sha256: null },
+ });
+ expect(unknown.ok && unknown.value.unknowns.join(" ")).toContain(
+ "excluded artifact digest",
+ );
+ if (parent.subject === null) throw new Error("Expected fixture subject");
+ const mismatched = projectAnalysisView(
+ {
+ ...parent,
+ subject: { ...parent.subject, local_path: "/different/source.saz" },
+ },
+ { kind: "summary" },
+ );
+ expect(mismatched.ok).toBe(false);
+});
+
+it("rejects invalid ordinal coverage in a borrowed parent", () => {
+ const { parent, report } = capture();
+ const result = projectAnalysisView(
+ {
+ ...parent,
+ normalizedResult: {
+ ...report,
+ records: [report.records[0], report.records[0]],
+ },
+ },
+ { kind: "summary" },
+ );
+ expect(result.ok).toBe(false);
+});
diff --git a/src/domain/analysisView/webNetworkCaptureView.ts b/src/domain/analysisView/webNetworkCaptureView.ts
new file mode 100644
index 000000000..b335e9241
--- /dev/null
+++ b/src/domain/analysisView/webNetworkCaptureView.ts
@@ -0,0 +1,264 @@
+import { z } from "zod";
+import type { AnalysisError } from "../analysisErrorBase.js";
+import { analysisInputErrorFromIssues } from "../inputIssueProjection.js";
+import type { JsonValue } from "../jsonValue.js";
+import { err, ok, type Result } from "../result.js";
+import {
+ webNetworkCaptureRecordSchema,
+ webNetworkCaptureBinaryDescriptorSchema,
+ webNetworkCaptureSchema,
+ webNetworkCaptureArtifactSchema,
+ webNetworkCaptureDecoderSchema,
+ WEB_NETWORK_CAPTURE_FORMATS,
+ type WebNetworkCaptureRecord,
+ type WebNetworkCapture,
+} from "../webNetworkCapture.js";
+import {
+ analysisViewInputError,
+ type AnalysisViewParent,
+ type AnalysisViewRequest,
+ type UnsignedAnalysisView,
+} from "./analysisView.js";
+import {
+ completeWithinViewCoverage,
+ pageViewCoverage,
+} from "./analysisViewCoverage.js";
+import {
+ qlogSummarySchema,
+ summarizeQlogCapture,
+ projectQlogCapturePage,
+} from "./qlogCaptureView.js";
+
+/** Offsets page the parent's retained record order, preserving producer ordinals. */
+export const captureViewRequestSchema = z.strictObject({
+ kind: z.literal("capture"),
+ detail: z.enum(["preview", "complete"]).default("preview"),
+ offset: z.number().int().nonnegative().default(0),
+ limit: z.number().int().positive().default(64),
+});
+
+const previewSchema = webNetworkCaptureRecordSchema.extend({
+ binary_fields: z.array(webNetworkCaptureBinaryDescriptorSchema),
+});
+export const captureViewItemsSchema = z.array(
+ z.union([webNetworkCaptureRecordSchema, previewSchema]),
+);
+
+/** Count/identity overview; bodies and the archive member inventory stay in the parent. */
+export const captureSummarySchema = z.strictObject({
+ artifact: webNetworkCaptureArtifactSchema,
+ decoder: webNetworkCaptureDecoderSchema,
+ format: z.enum(WEB_NETWORK_CAPTURE_FORMATS),
+ total_records: z.number().int().nonnegative(),
+ retained_records: z.number().int().nonnegative(),
+ runtime_attribution: z.literal("unknown"),
+ qlog: qlogSummarySchema.optional(),
+});
+
+const object = (
+ value: JsonValue,
+): Readonly> | null =>
+ value !== null && typeof value === "object" && !Array.isArray(value)
+ ? value
+ : null;
+
+/** Select already parsed producer facts without interpreting HTTP or payload bytes again. */
+const preview = (record: WebNetworkCaptureRecord) => {
+ const source = object(record.reported);
+ const reported: Record = {};
+ const selectedPointers = new Set();
+ if (source !== null) {
+ for (const key of ["session_id", "name", "time", "startedDateTime", "type"])
+ if (Object.hasOwn(source, key) && source[key] !== undefined) {
+ reported[key] = source[key];
+ selectedPointers.add(`/${key}`);
+ }
+ for (const key of ["request", "response"]) {
+ const value = source[key];
+ if (!Object.hasOwn(source, key) || value === undefined) continue;
+ const fields = object(value);
+ if (fields === null) {
+ // Preserve a reported null/scalar instead of inventing HTTP fields.
+ reported[key] = value;
+ continue;
+ }
+ const selected: Record = {};
+ for (const field of [
+ "method",
+ "url",
+ "httpVersion",
+ "http_version",
+ "status",
+ "statusText",
+ "reason",
+ ])
+ if (Object.hasOwn(fields, field) && fields[field] !== undefined) {
+ selected[field] = fields[field];
+ selectedPointers.add(`/${key}/${field}`);
+ }
+ reported[key] = selected;
+ }
+ }
+ return {
+ ...record,
+ reported: source === null ? record.reported : reported,
+ binary_fields: record.binary_fields.map(
+ ({ content_base64: _content, ...field }) => field,
+ ),
+ numeric_literals:
+ source === null
+ ? record.numeric_literals
+ : record.numeric_literals.filter(({ pointer }) =>
+ selectedPointers.has(pointer),
+ ),
+ };
+};
+
+/** Authenticate the retained report and its subject at one owning boundary. */
+const parseCaptureParent = (
+ parent: AnalysisViewParent,
+): Result => {
+ const parsed = webNetworkCaptureSchema.safeParse(parent.normalizedResult);
+ if (!parsed.success)
+ return err(
+ analysisInputErrorFromIssues(
+ "inspect_analysis_view",
+ parsed.error.issues.map((issue) => ({
+ ...issue,
+ path: ["source", "normalized_result", ...issue.path],
+ })),
+ { source: { normalized_result: parent.normalizedResult } },
+ { cause: parsed.error },
+ ),
+ );
+ const report = parsed.data;
+ if (
+ report.artifact.sha256 !== null &&
+ (parent.subject == null ||
+ parent.subject.local_path !== report.artifact.path ||
+ parent.subject.digest.sha256 !== report.artifact.sha256)
+ )
+ return err(
+ analysisViewInputError([
+ {
+ path: ["source", "subject"],
+ reason: "invalid_value",
+ message:
+ "Capture parent subject must identify the report's exact path and SHA-256.",
+ },
+ ]),
+ );
+ return ok(report);
+};
+
+/** Page immutable retained facts; no capture file, provider or network is consulted. */
+export const projectWebNetworkCaptureView = (
+ parent: AnalysisViewParent,
+ view: AnalysisViewRequest,
+): Result => {
+ if (
+ view.kind !== "summary" &&
+ view.kind !== "capture" &&
+ view.kind !== "qlog"
+ )
+ return err(
+ analysisViewInputError([
+ {
+ path: ["view"],
+ reason: "invalid_value",
+ message:
+ "Historical captures support summary, capture record pages, qlog fact pages and admitted api-surface views.",
+ },
+ ]),
+ );
+ const parsed = parseCaptureParent(parent);
+ if (!parsed.ok) return parsed;
+ const report = parsed.value;
+ const shared = {
+ parent_evidence_id: parent.evidenceId,
+ parent_operation: "inspect_web_network_capture" as const,
+ parent_digest: parent.evidenceId.slice(3),
+ artifact: { path: report.artifact.path, sha256: report.artifact.sha256 },
+ limitations: [
+ ...new Set([
+ ...parent.limitations,
+ ...report.limitations,
+ "Capture record pages cover the records selected into the parent Evidence, in that selected order; total_records counts the original decoded capture.",
+ ]),
+ ],
+ unknowns: [
+ "Historical records do not establish live runtime attribution or deployment authenticity.",
+ ...(report.artifact.sha256 === null
+ ? ["The explicitly excluded artifact digest remains unknown."]
+ : []),
+ ],
+ };
+ if (view.kind === "summary")
+ return ok({
+ kind: "summary",
+ view,
+ ...shared,
+ summary: {
+ artifact: report.artifact,
+ decoder: report.decoder,
+ format: report.format,
+ total_records: report.total_records,
+ retained_records: report.records.length,
+ runtime_attribution: report.runtime_attribution,
+ ...(report.format === "qlog"
+ ? { qlog: summarizeQlogCapture(report.qlog) }
+ : {}),
+ },
+ coverage: completeWithinViewCoverage(
+ report.records.length,
+ report.records.length,
+ ),
+ });
+ if (view.kind === "qlog") {
+ if (report.format !== "qlog")
+ return err(
+ analysisViewInputError([
+ {
+ path: ["view", "kind"],
+ reason: "invalid_value",
+ message: "Qlog fact views require retained qlog Evidence.",
+ },
+ ]),
+ );
+ const projected = projectQlogCapturePage(report.qlog, view);
+ return projected.ok
+ ? ok({
+ kind: "qlog",
+ view,
+ ...shared,
+ ...projected.value,
+ limitations: [
+ ...shared.limitations,
+ "Qlog fact pages retain all-recorded-events-before-selection scope. Exhausting a page does not establish network completeness, body recovery, retransmission or actual loss.",
+ ],
+ })
+ : projected;
+ }
+ const records = report.records.slice(view.offset, view.offset + view.limit);
+ return ok({
+ kind: "capture",
+ view,
+ ...shared,
+ items: captureViewItemsSchema.parse(
+ view.detail === "complete" ? records : records.map(preview),
+ ),
+ coverage: pageViewCoverage(
+ view.offset,
+ records.length,
+ report.records.length,
+ ),
+ limitations: [
+ ...shared.limitations,
+ ...(view.detail === "preview"
+ ? [
+ "Preview selects recorded headline fields and byte descriptors; headers, XML, bodies, message data and other fields remain in complete record pages. Missing preview fields do not establish their absence from the producer record.",
+ ]
+ : []),
+ ],
+ });
+};
diff --git a/src/domain/android/androidAnalysis.ts b/src/domain/android/androidAnalysis.ts
index e27be2b20..ca4d6db59 100644
--- a/src/domain/android/androidAnalysis.ts
+++ b/src/domain/android/androidAnalysis.ts
@@ -45,6 +45,12 @@ export const androidInputSchemas = {
}),
} as const;
+/** Optional retained delivery is separate from the engine's APK request. */
+export const androidPackageInspectionInputSchema =
+ androidInputSchemas.inspect_android_package.extend({
+ detail: z.enum(["complete", "summary"]).optional(),
+ });
+
/** Supported static Android operations. */
export type AndroidOperation = keyof typeof androidInputSchemas;
/** Validated Android requests carry their selected operation. */
diff --git a/src/domain/qlogCapture.ts b/src/domain/qlogCapture.ts
new file mode 100644
index 000000000..575cf2a60
--- /dev/null
+++ b/src/domain/qlogCapture.ts
@@ -0,0 +1,76 @@
+import { z } from "zod";
+
+const decimal = z.string().regex(/^(0|[1-9][0-9]*)$/u);
+const unsignedFact = z.discriminatedUnion("state", [
+ z.strictObject({ state: z.literal("reported"), value: decimal }),
+ z.strictObject({
+ state: z.literal("unknown"),
+ reason: z.literal("omitted-null-or-redacted"),
+ }),
+]);
+const traceLocation = z.discriminatedUnion("kind", [
+ z.strictObject({ kind: z.literal("json-pointer"), pointer: z.string() }),
+ z.strictObject({
+ kind: z.literal("unknown"),
+ reason: z.literal("explicit-sensitive-value"),
+ }),
+]);
+
+/** Exact, source-bound transport facts; coverage never establishes network completeness. */
+export const qlogCaptureFactsSchema = z.strictObject({
+ profile: z.literal("aioquic-1.5.0-json-0.3"),
+ scope: z.literal("all-recorded-events-before-selection"),
+ body_bytes: z.literal("not-reported"),
+ clock: z.strictObject({
+ unit: z.literal("milliseconds"),
+ domain: z.literal("unix-epoch"),
+ basis: z.literal("selected-aioquic-profile-not-producer-authentication"),
+ }),
+ traces: z.array(
+ z.strictObject({
+ trace_index: z.number().int().nonnegative(),
+ location: traceLocation,
+ event_count: z.number().int().nonnegative(),
+ odcid: z.string().nullable(),
+ vantage_point: z.enum(["client", "server"]).nullable(),
+ incomplete_fact_records: z.array(z.number().int().nonnegative()),
+ loss_declarations: z.array(
+ z.strictObject({
+ record_ordinal: z.number().int().nonnegative(),
+ confidence: z.literal("observed"),
+ packet_number: unsignedFact,
+ packet_type: z.string().nullable(),
+ packet_number_space: z
+ .enum(["initial", "handshake", "application"])
+ .nullable(),
+ }),
+ ),
+ streams: z.array(
+ z.strictObject({
+ stream_id: decimal,
+ direction: z.enum(["sent", "received"]),
+ confidence: z.literal("derived"),
+ scope: z.literal("observed-stream-frame-ranges"),
+ contributions: z.array(
+ z.strictObject({
+ record_ordinal: z.number().int().nonnegative(),
+ frame_index: z.number().int().nonnegative(),
+ offset: decimal,
+ length: decimal,
+ fin: z.boolean().nullable(),
+ }),
+ ),
+ covered_ranges: z.array(
+ z.strictObject({ start: decimal, end: decimal }),
+ ),
+ unique_bytes: decimal,
+ frame_length_sum: decimal,
+ repeated_bytes: decimal,
+ reported_final_sizes: z.array(decimal),
+ }),
+ ),
+ }),
+ ),
+});
+
+export type QlogCaptureFacts = z.output;
diff --git a/src/domain/webNetworkCapture.ts b/src/domain/webNetworkCapture.ts
index ed31d5c70..77752f8e5 100644
--- a/src/domain/webNetworkCapture.ts
+++ b/src/domain/webNetworkCapture.ts
@@ -1,6 +1,7 @@
import { z } from "zod";
import { jsonValueSchema } from "./jsonValue.js";
import { localPathStringSchema } from "./localPath.js";
+import { qlogCaptureFactsSchema } from "./qlogCapture.js";
/** Complete historical evidence budgets; exceeding a budget returns no partial capture. */
export const WEB_NETWORK_CAPTURE_LIMITS = {
@@ -10,12 +11,19 @@ export const WEB_NETWORK_CAPTURE_LIMITS = {
depth: 64,
} as const;
+export const WEB_NETWORK_CAPTURE_FORMATS = [
+ "har",
+ "mitmproxy",
+ "saz",
+ "qlog",
+] as const;
+
/** Inspect an explicit retained capture without contacting its recorded destinations. */
export const inspectWebNetworkCaptureInputSchema = z.strictObject({
capture_path: localPathStringSchema.describe(
- "Absolute local HAR or mitmproxy capture path.",
+ "Absolute local HAR, mitmproxy, Fiddler SAZ or aioquic qlog capture path.",
),
- format: z.enum(["har", "mitmproxy"]),
+ format: z.enum(WEB_NETWORK_CAPTURE_FORMATS),
record_ordinals: z
.array(z.number().int().nonnegative())
.min(1)
@@ -31,6 +39,21 @@ export const inspectWebNetworkCaptureInputSchema = z.strictObject({
),
});
+/** Read declarations through their owning schema for service and adapter failures. */
+export const captureSensitiveValues = (
+ rawInput: unknown,
+): readonly string[] => {
+ const parsed =
+ inspectWebNetworkCaptureInputSchema.shape.sensitive_values.safeParse(
+ typeof rawInput === "object" &&
+ rawInput !== null &&
+ "sensitive_values" in rawInput
+ ? rawInput.sensitive_values
+ : undefined,
+ );
+ return parsed.success ? parsed.data : [];
+};
+
const pointerSchema = z
.string()
.describe("RFC 6901 pointer in the producer's reported object.");
@@ -53,21 +76,26 @@ const binaryBase = {
pointer: pointerSchema,
representation: z.enum(["producer-bytes", "har-base64-content"]),
};
+const retainedBinaryDescriptorSchema = z.strictObject({
+ ...binaryBase,
+ state: z.literal("retained"),
+ bytes: z.number().int().nonnegative(),
+ sha256: z.string().regex(/^[0-9a-f]{64}$/),
+});
+const redactedBinaryDescriptorSchema = z.strictObject({
+ ...binaryBase,
+ state: z.literal("redacted"),
+ bytes: z.null(),
+ sha256: z.null(),
+});
+/** Exact byte facts shared by complete records and previews that omit content. */
+export const webNetworkCaptureBinaryDescriptorSchema = z.discriminatedUnion(
+ "state",
+ [retainedBinaryDescriptorSchema, redactedBinaryDescriptorSchema],
+);
const binarySchema = z.discriminatedUnion("state", [
- z.strictObject({
- ...binaryBase,
- state: z.literal("retained"),
- content_base64: z.string(),
- bytes: z.number().int().nonnegative(),
- sha256: z.string().regex(/^[0-9a-f]{64}$/),
- }),
- z.strictObject({
- ...binaryBase,
- state: z.literal("redacted"),
- content_base64: z.null(),
- bytes: z.null(),
- sha256: z.null(),
- }),
+ retainedBinaryDescriptorSchema.extend({ content_base64: z.string() }),
+ redactedBinaryDescriptorSchema.extend({ content_base64: z.null() }),
]);
const numberSchema = z.strictObject({
pointer: pointerSchema,
@@ -84,6 +112,10 @@ export const webNetworkCaptureRecordSchema = z.strictObject({
reason: z.literal("explicit-sensitive-value"),
}),
z.strictObject({ kind: z.literal("json-pointer"), pointer: pointerSchema }),
+ z.strictObject({
+ kind: z.literal("archive-members"),
+ members: z.array(z.string()).min(1),
+ }),
z.strictObject({
kind: z.literal("byte-range"),
offset: z.number().int().nonnegative(),
@@ -97,69 +129,85 @@ export const webNetworkCaptureRecordSchema = z.strictObject({
limitations: z.array(z.string()),
});
-/** Decoded records retain unique producer ordinals within their declared coverage. */
-export const webNetworkCapturePayloadSchema = z
- .strictObject({
- decoder: z.strictObject({
- id: z.string().min(1),
- name: z.string().min(1),
- version: z.string().min(1),
- }),
- container: z.strictObject({
- reported: jsonValueSchema,
- numeric_literals: z.array(numberSchema),
- redactions: z.array(redactionSchema),
- records_pointer: pointerSchema.nullable(),
- }),
- total_records: z.number().int().nonnegative(),
- records: z.array(webNetworkCaptureRecordSchema),
- })
- .superRefine((capture, context) => {
- if (capture.records.length > capture.total_records) {
+/** The selected offline parser profile, independent of authenticated producer identity. */
+export const webNetworkCaptureDecoderSchema = z.strictObject({
+ id: z.string().min(1),
+ name: z.string().min(1),
+ version: z.string().min(1),
+});
+
+/** Source coverage is shared by every offline decoder. */
+const payloadShape = {
+ decoder: webNetworkCaptureDecoderSchema,
+ container: z.strictObject({
+ reported: jsonValueSchema,
+ numeric_literals: z.array(numberSchema),
+ redactions: z.array(redactionSchema),
+ records_pointer: pointerSchema.nullable(),
+ }),
+ total_records: z.number().int().nonnegative(),
+ records: z.array(webNetworkCaptureRecordSchema),
+};
+const refineCoverage = (
+ capture: { total_records: number; records: { ordinal: number }[] },
+ context: z.RefinementCtx,
+): void => {
+ const seen = new Set();
+ for (const [index, record] of capture.records.entries()) {
+ if (record.ordinal >= capture.total_records || seen.has(record.ordinal)) {
context.addIssue({
code: "custom",
- path: ["records"],
- message: "Retained record count exceeds the declared capture total.",
+ path: ["records", index, "ordinal"],
+ message:
+ "Retained ordinals must be unique and within the declared capture total.",
});
return;
}
- const seen = new Set();
- for (const [index, record] of capture.records.entries()) {
- if (record.ordinal >= capture.total_records || seen.has(record.ordinal)) {
- context.addIssue({
- code: "custom",
- path: ["records", index, "ordinal"],
- message:
- "Retained ordinals must be unique and within the declared capture total.",
- });
- return;
- }
- seen.add(record.ordinal);
- }
- });
-
-/** Historical capture inspection has file identity, producer provenance and explicit unknowns. */
-export const webNetworkCaptureSchema =
- webNetworkCapturePayloadSchema.safeExtend({
- artifact: z.strictObject({
- path: z
- .string()
- .describe(
- "Selected artifact path; empty when explicitly excluded from Evidence.",
- ),
- sha256: z
- .string()
- .regex(/^[0-9a-f]{64}$/)
- .nullable()
- .describe(
- "Observed artifact SHA-256; null only when explicitly excluded by a sensitive declaration.",
- ),
- bytes: z.number().int().nonnegative(),
+ seen.add(record.ordinal);
+ }
+};
+/** Strict alternatives prevent undefined-valued facets from entering JSON Evidence. */
+export const webNetworkCapturePayloadSchema = z
+ .union([
+ z.strictObject({ ...payloadShape, qlog: qlogCaptureFactsSchema }),
+ z.strictObject(payloadShape),
+ ])
+ .superRefine(refineCoverage);
+/** Caller-selected file identity; explicit exclusions remain unknown. */
+export const webNetworkCaptureArtifactSchema = z.strictObject({
+ path: z
+ .string()
+ .describe(
+ "Selected artifact path; empty when explicitly excluded from Evidence.",
+ ),
+ sha256: z
+ .string()
+ .regex(/^[0-9a-f]{64}$/)
+ .nullable()
+ .describe("Observed SHA-256; null only when explicitly excluded."),
+ bytes: z.number().int().nonnegative(),
+});
+const artifactShape = {
+ artifact: webNetworkCaptureArtifactSchema,
+ runtime_attribution: z.literal("unknown"),
+ limitations: z.array(z.string()),
+};
+/** Qlog transport facts occur exactly on the qlog alternative. */
+export const webNetworkCaptureSchema = z
+ .discriminatedUnion("format", [
+ z.strictObject({
+ ...payloadShape,
+ ...artifactShape,
+ format: z.enum(["har", "mitmproxy", "saz"]),
}),
- format: z.enum(["har", "mitmproxy"]),
- runtime_attribution: z.literal("unknown"),
- limitations: z.array(z.string()),
- });
+ z.strictObject({
+ ...payloadShape,
+ ...artifactShape,
+ format: z.literal("qlog"),
+ qlog: qlogCaptureFactsSchema,
+ }),
+ ])
+ .superRefine(refineCoverage);
export type InspectWebNetworkCaptureInput = z.output<
typeof inspectWebNetworkCaptureInputSchema
diff --git a/src/domain/webNetworkCaptureCoordinates.ts b/src/domain/webNetworkCaptureCoordinates.ts
index 6cba46cd9..a975c6b4a 100644
--- a/src/domain/webNetworkCaptureCoordinates.ts
+++ b/src/domain/webNetworkCaptureCoordinates.ts
@@ -22,6 +22,8 @@ export const excludeCaptureCoordinates = (
const location =
(record.location.kind === "json-pointer" &&
sensitive(record.location.pointer)) ||
+ (record.location.kind === "archive-members" &&
+ record.location.members.some(sensitive)) ||
(record.location.kind === "byte-range" &&
(sensitive(String(record.location.offset)) ||
sensitive(String(record.location.bytes))))
@@ -51,8 +53,30 @@ export const excludeCaptureCoordinates = (
numeric_literals: sidecars(value.container.numeric_literals),
redactions: sidecars(value.container.redactions),
};
+ const qlog =
+ value.format === "qlog"
+ ? {
+ ...value.qlog,
+ traces: value.qlog.traces.map((trace) => {
+ if (
+ trace.location.kind !== "json-pointer" ||
+ !sensitive(trace.location.pointer)
+ )
+ return trace;
+ excluded = true;
+ return {
+ ...trace,
+ location: {
+ kind: "unknown" as const,
+ reason: "explicit-sensitive-value" as const,
+ },
+ };
+ }),
+ }
+ : undefined;
return {
...value,
+ ...(qlog === undefined ? {} : { qlog }),
container,
records,
limitations: excluded
diff --git a/src/generatedPackageMetadata.ts b/src/generatedPackageMetadata.ts
index 1af9203ad..bada60663 100644
--- a/src/generatedPackageMetadata.ts
+++ b/src/generatedPackageMetadata.ts
@@ -5,5 +5,5 @@ export const PACKAGE_METADATA = {
serverSdkVersion: "2.3.1",
clientSdkVersion: "2.3.1",
coreSdkVersion: "2.3.1",
- skillVersion: "40",
+ skillVersion: "41",
} as const;
diff --git a/src/server/createServer.ts b/src/server/createServer.ts
index 12ad6418b..c213efb0b 100644
--- a/src/server/createServer.ts
+++ b/src/server/createServer.ts
@@ -515,6 +515,7 @@ const registerConfiguredAnalysisTools = (
toolLogger,
recordEvidence,
withAdmittedAnalysis,
+ evidenceById,
);
registerJebTools(
server,
@@ -616,6 +617,7 @@ const registerConfiguredAnalysisTools = (
toolLogger,
recordEvidence,
withAdmittedAnalysis,
+ evidenceById,
);
registerJavaScriptRecoveryTool(
server,
diff --git a/src/server/registerAnalysisViewTool.ts b/src/server/registerAnalysisViewTool.ts
index ebd204edd..d427c0cb4 100644
--- a/src/server/registerAnalysisViewTool.ts
+++ b/src/server/registerAnalysisViewTool.ts
@@ -7,7 +7,10 @@ import { toolContract } from "../contracts/toolContracts.js";
import type { Logger } from "pino";
import { createEvidenceToolHandler } from "./contractToolHandler.js";
import type { WithAdmittedAnalysis } from "./analysisAdmission.js";
-import { toolRegistrationOptions } from "./toolRegistrationOptions.js";
+import {
+ toolRegistrationOptions,
+ applicationValidatedInputSchema,
+} from "./toolRegistrationOptions.js";
/** Bind selected-view projection to its named contract and session Evidence owner. */
export const registerAnalysisViewTool = (
@@ -18,6 +21,7 @@ export const registerAnalysisViewTool = (
withAdmittedAnalysis?: WithAdmittedAnalysis,
): void => {
const contract = toolContract("inspect_analysis_view");
+ const registration = toolRegistrationOptions(contract);
const handler = createEvidenceToolHandler(
server,
(input) => Promise.resolve(inspectAnalysisView(input, evidenceById)),
@@ -27,7 +31,10 @@ export const registerAnalysisViewTool = (
);
server.registerTool(
contract.name,
- toolRegistrationOptions(contract),
+ {
+ ...registration,
+ inputSchema: applicationValidatedInputSchema(registration.inputSchema),
+ },
handler(contract),
);
};
diff --git a/src/server/registerAndroidTools.ts b/src/server/registerAndroidTools.ts
index 722bd6695..a8c29a187 100644
--- a/src/server/registerAndroidTools.ts
+++ b/src/server/registerAndroidTools.ts
@@ -1,6 +1,8 @@
import type { EvidenceMcpServer } from "./EvidenceMcpServer.js";
import type { EvidenceWriter } from "../application/investigation/InvestigationRecordPort.js";
import { AndroidAnalysisService } from "../application/android/AndroidAnalysisService.js";
+import { inspectAndroidPackage } from "../application/android/AndroidPackageInspection.js";
+import type { EvidenceLookup } from "../application/EvidenceInputResolver.js";
import { summarizeRetainedAndroidSearch } from "../application/android/AndroidSearchEvidenceSummary.js";
import { toolContract } from "../contracts/toolContracts.js";
import type { Logger } from "pino";
@@ -18,6 +20,7 @@ export const registerAndroidTools = (
logger: Logger,
recordEvidence?: EvidenceWriter["recordEvidence"],
withAdmittedAnalysis?: WithAdmittedAnalysis,
+ evidenceById?: EvidenceLookup,
): void => {
const handler = createContractToolHandler(
server,
@@ -44,10 +47,26 @@ export const registerAndroidTools = (
withAdmittedAnalysis,
);
const packageContract = toolContract("inspect_android_package");
+ const packageService: ContractToolService<"inspect_android_package"> = {
+ execute: (_operation, input, options) =>
+ inspectAndroidPackage(
+ service,
+ input,
+ { recordEvidence, evidenceById },
+ options,
+ ),
+ };
+ const packageHandler = createContractToolHandler(
+ server,
+ packageService,
+ logger,
+ recordEvidence,
+ withAdmittedAnalysis,
+ );
server.registerTool(
packageContract.name,
toolRegistrationOptions(packageContract),
- handler(packageContract),
+ packageHandler(packageContract),
);
const searchContract = toolContract("search_android_classes");
server.registerTool(
diff --git a/src/server/registerWebNetworkCaptureTool.ts b/src/server/registerWebNetworkCaptureTool.ts
index 9f0c9dec8..3e9759504 100644
--- a/src/server/registerWebNetworkCaptureTool.ts
+++ b/src/server/registerWebNetworkCaptureTool.ts
@@ -1,12 +1,23 @@
import type { EvidenceMcpServer } from "./EvidenceMcpServer.js";
-import type { StandardSchemaWithJSON } from "@modelcontextprotocol/server";
+import type { EvidenceLookup } from "../application/EvidenceInputResolver.js";
+import {
+ requireAnalysisViewRetention,
+ summarizeRetainedAnalysis,
+} from "../application/analysisView/AnalysisViewService.js";
+import { analysisInputErrorFromIssues } from "../domain/inputIssueProjection.js";
+import { redactExplicitFailure } from "../domain/explicitSensitiveFailure.js";
+import { captureSensitiveValues } from "../domain/webNetworkCapture.js";
+import { err } from "../domain/result.js";
import type { WebNetworkCaptureService } from "../application/WebNetworkCaptureService.js";
import type { EvidenceWriter } from "../application/investigation/InvestigationRecordPort.js";
import { toolContract } from "../contracts/toolContracts.js";
import type { Logger } from "pino";
import type { WithAdmittedAnalysis } from "./analysisAdmission.js";
import { createEvidenceToolHandler } from "./contractToolHandler.js";
-import { toolRegistrationOptions } from "./toolRegistrationOptions.js";
+import {
+ toolRegistrationOptions,
+ applicationValidatedInputSchema,
+} from "./toolRegistrationOptions.js";
/** Bind historical inspection to its named contract and caller-owned Evidence writer. */
export const registerWebNetworkCaptureTool = (
@@ -15,22 +26,41 @@ export const registerWebNetworkCaptureTool = (
logger: Logger,
recordEvidence?: EvidenceWriter["recordEvidence"],
withAdmittedAnalysis?: WithAdmittedAnalysis,
+ evidenceById?: EvidenceLookup,
): void => {
const contract = toolContract("inspect_web_network_capture");
const registration = toolRegistrationOptions(contract);
// Keep the exact advertised contract; the shared service validates raw input
// before effects so caller-declared sensitivity also covers invalid arguments.
// SDK pre-validation otherwise emits unprojected issue paths as plain text.
- const inputSchema: StandardSchemaWithJSON = {
- "~standard": {
- ...registration.inputSchema["~standard"],
- vendor: "rea-application",
- validate: (value: unknown) => ({ value }),
- },
- };
+ const inputSchema = applicationValidatedInputSchema(registration.inputSchema);
const handler = createEvidenceToolHandler(
server,
- (input, options) => service.inspect(input, options),
+ async (rawInput, options) => {
+ const parsed = contract.inputSchema.safeParse(rawInput);
+ if (!parsed.success)
+ return err(
+ redactExplicitFailure(
+ analysisInputErrorFromIssues(
+ contract.name,
+ parsed.error.issues,
+ rawInput,
+ { cause: parsed.error },
+ ),
+ captureSensitiveValues(rawInput),
+ ),
+ );
+ const { detail, ...input } = parsed.data;
+ const retention = { recordEvidence, evidenceById };
+ if (detail === "summary") {
+ const ready = requireAnalysisViewRetention(contract.name, retention);
+ if (!ready.ok) return ready;
+ }
+ const inspected = await service.inspect(input, options);
+ return detail === "summary" && inspected.ok
+ ? summarizeRetainedAnalysis(inspected.value, retention)
+ : inspected;
+ },
logger,
recordEvidence,
withAdmittedAnalysis,
diff --git a/src/server/toolRegistrationOptions.ts b/src/server/toolRegistrationOptions.ts
index 4615971d4..c943be3f2 100644
--- a/src/server/toolRegistrationOptions.ts
+++ b/src/server/toolRegistrationOptions.ts
@@ -1,9 +1,21 @@
import type { ToolContract } from "../contracts/toolContractTypes.js";
+import type { StandardSchemaWithJSON } from "@modelcontextprotocol/server";
import {
toolInputSchemaWithMetadata,
toolOutputSchemaWithMetadata,
} from "../contracts/toolSchemaMetadata.js";
+/** Preserve advertised contracts while the application owns structured input failures. */
+export const applicationValidatedInputSchema = (
+ schema: StandardSchemaWithJSON,
+): StandardSchemaWithJSON => ({
+ "~standard": {
+ ...schema["~standard"],
+ vendor: "rea-application",
+ validate: (value: unknown) => ({ value }),
+ },
+});
+
/** Project the canonical Zod contracts directly into SDK registration. */
export const toolRegistrationOptions = (
contract: Contract,
diff --git a/tests/acceptance/tools/historicalCaptureResources.test.ts b/tests/acceptance/tools/historicalCaptureResources.test.ts
index d4c56d644..64a7b6638 100644
--- a/tests/acceptance/tools/historicalCaptureResources.test.ts
+++ b/tests/acceptance/tools/historicalCaptureResources.test.ts
@@ -5,7 +5,7 @@ import { fileURLToPath } from "node:url";
import { promisify } from "node:util";
import { expect, it } from "vitest";
-import { HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES } from "../../../src/browser/history/CaptureRelease.js";
+import { NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES } from "../../../src/browser/history/CaptureRelease.js";
import { WEB_NETWORK_CAPTURE_LIMITS } from "../../../src/domain/webNetworkCapture.js";
import { connectLocalToolsMcp } from "../../fixtures/localToolsMcp.js";
import { parseMcpToolError } from "../../fixtures/mcpToolError.js";
@@ -46,7 +46,7 @@ const capture = (count: number) =>
// Node.js enforces the decoder's V8 heap flags. Bun ignores them; on Windows
// the decoder's Job Object commit limit is the enforced bound instead, and
// Bun elsewhere has no bound this capture can reach.
-const jobLimit = HAR_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES;
+const jobLimit = NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES;
it.skipIf(process.versions.bun !== undefined && jobLimit === null)(
"reports real HAR memory exhaustion through CLI and MCP and preserves server usability",
async () => {
diff --git a/tests/acceptance/tools/qlogCapture.test.ts b/tests/acceptance/tools/qlogCapture.test.ts
new file mode 100644
index 000000000..be67c3a34
--- /dev/null
+++ b/tests/acceptance/tools/qlogCapture.test.ts
@@ -0,0 +1,457 @@
+import { execFile } from "node:child_process";
+import { writeFile, truncate, rm } from "node:fs/promises";
+import { join } from "node:path";
+import { fileURLToPath } from "node:url";
+import { promisify } from "node:util";
+import { expect, it as runtimeTest } from "vitest";
+import {
+ NODE_CAPTURE_HEAP_ENFORCED,
+ NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES,
+} from "../../../src/browser/history/CaptureRelease.js";
+import { webNetworkCaptureSummaryViewResultSchema } from "../../../src/domain/analysisView/analysisView.js";
+import { parseEvidence } from "../../../src/domain/evidence.js";
+import {
+ webNetworkCaptureSchema,
+ WEB_NETWORK_CAPTURE_LIMITS,
+} from "../../../src/domain/webNetworkCapture.js";
+import { connectLocalToolsMcp } from "../../fixtures/localToolsMcp.js";
+import { parseMcpToolError } from "../../fixtures/mcpToolError.js";
+import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js";
+
+const execute = promisify(execFile);
+const hasMemoryBound =
+ NODE_CAPTURE_HEAP_ENFORCED ||
+ NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES !== null;
+const it = runtimeTest.skipIf(!hasMemoryBound);
+const cli = fileURLToPath(new URL("../../../scripts/rea.mjs", import.meta.url));
+const event = {
+ name: "transport:packet_sent",
+ time: 1791819895000.25,
+ data: {
+ header: { packet_type: "1RTT", packet_number: 5 },
+ frames: [
+ { frame_type: "stream", stream_id: 0, offset: 10, length: 5, fin: true },
+ ],
+ },
+};
+const qlog = (events: unknown[]) =>
+ JSON.stringify({
+ qlog_format: "JSON",
+ qlog_version: "0.3",
+ traces: [
+ {
+ vantage_point: { name: "aioquic", type: "server" },
+ common_fields: { ODCID: "trace-local" },
+ events,
+ },
+ ],
+ });
+
+const assertAdditionalQlogFacets = async (
+ call: Awaited>["call"],
+ retained: { kind: string; evidence_id: string },
+): Promise => {
+ for (const [view, expected] of [
+ [
+ { kind: "qlog", facet: "traces", offset: 1, limit: 1 },
+ [{ trace_index: 1, event_count: 1, stream_count: 1 }],
+ ],
+ [
+ { kind: "qlog", facet: "loss-declarations", trace_index: 0 },
+ [{ record_ordinal: 1, packet_number: { state: "reported", value: "5" } }],
+ ],
+ [{ kind: "qlog", facet: "incomplete-records", trace_index: 0 }, []],
+ [
+ {
+ kind: "qlog",
+ facet: "ranges",
+ trace_index: 0,
+ stream_id: "0",
+ direction: "sent",
+ },
+ [{ start: "10", end: "15" }],
+ ],
+ [
+ {
+ kind: "qlog",
+ facet: "final-sizes",
+ trace_index: 0,
+ stream_id: "0",
+ direction: "sent",
+ },
+ ["15"],
+ ],
+ [{ kind: "qlog", facet: "traces", offset: 99 }, []],
+ ] as const) {
+ const response = await call("inspect_analysis_view", {
+ source: retained,
+ view,
+ });
+ expect(response.isError, JSON.stringify(response)).not.toBe(true);
+ expect(
+ parseEvidence(response.structuredContent).normalized_result,
+ ).toMatchObject({
+ page: { items: expected },
+ coverage: { exhausted: true },
+ });
+ }
+};
+
+it("pages original trace-scoped facts after source deletion without conflating selected events or identical stream IDs", async () => {
+ const root = await createTestTempDirectory("rea-qlog-pages-");
+ const path = join(root, "input.qlog");
+ const source = JSON.parse(
+ qlog([
+ event,
+ {
+ name: "recovery:packet_lost",
+ time: 1791819895001,
+ data: { packet_number: 5, type: "1RTT" },
+ },
+ ]),
+ );
+ source.traces.push({
+ ...source.traces[0],
+ events: [
+ {
+ ...event,
+ data: {
+ frames: [
+ {
+ frame_type: "stream",
+ stream_id: 0,
+ offset: 100,
+ length: 3,
+ fin: true,
+ },
+ ],
+ },
+ },
+ ],
+ });
+ await writeFile(path, JSON.stringify(source));
+ const { call } = await connectLocalToolsMcp();
+ const response = await call("inspect_web_network_capture", {
+ capture_path: path,
+ format: "qlog",
+ detail: "summary",
+ record_ordinals: [2],
+ });
+ expect(response.isError, JSON.stringify(response)).not.toBe(true);
+ const summary = webNetworkCaptureSummaryViewResultSchema.parse(
+ parseEvidence(response.structuredContent).normalized_result,
+ );
+ expect(summary).toMatchObject({
+ summary: {
+ total_records: 3,
+ retained_records: 1,
+ qlog: {
+ trace_count: 2,
+ retained_stream_count: 2,
+ loss_declaration_count: 1,
+ },
+ },
+ });
+ expect(JSON.stringify(summary)).not.toContain('"contributions"');
+ if (
+ !("parent_evidence_id" in summary) ||
+ typeof summary.parent_evidence_id !== "string"
+ )
+ throw new Error("Missing retained parent");
+ const retained = {
+ kind: "retained-evidence",
+ evidence_id: summary.parent_evidence_id,
+ };
+ const parent = parseEvidence(
+ (
+ await call("inspect_web_network_capture", {
+ capture_path: path,
+ format: "qlog",
+ record_ordinals: [2],
+ })
+ ).structuredContent,
+ );
+ expect(parent.evidence_id).toBe(summary.parent_evidence_id);
+ const portablePath = join(root, "parent.json");
+ await rm(path);
+ const pages = [];
+ for (const trace_index of [0, 1]) {
+ const page = await call("inspect_analysis_view", {
+ source: retained,
+ view: { kind: "qlog", facet: "streams", trace_index, limit: 1 },
+ });
+ expect(page.isError, JSON.stringify(page)).not.toBe(true);
+ pages.push(parseEvidence(page.structuredContent).normalized_result);
+ }
+ expect(pages[0]).toMatchObject({
+ page: { items: [{ stream_id: "0", unique_bytes: "5" }] },
+ context: { scope: "all-recorded-events-before-selection" },
+ });
+ expect(pages[1]).toMatchObject({
+ page: { items: [{ stream_id: "0", unique_bytes: "3" }] },
+ });
+ await assertAdditionalQlogFacets(call, retained);
+ const view = {
+ kind: "qlog",
+ facet: "contributions",
+ trace_index: 0,
+ stream_id: "0",
+ direction: "sent",
+ offset: 0,
+ limit: 1,
+ };
+ const contribution = parseEvidence(
+ (await call("inspect_analysis_view", { source: retained, view }))
+ .structuredContent,
+ );
+ expect(contribution.normalized_result).toMatchObject({
+ page: {
+ items: [{ record_ordinal: 0, frame_index: 0, offset: "10", length: "5" }],
+ },
+ coverage: { total: 1, exhausted: true },
+ });
+ await writeFile(
+ portablePath,
+ JSON.stringify({ source: { kind: "inline", evidence: parent }, view }),
+ );
+ const cliResult = await execute(process.execPath, [
+ cli,
+ "inspect-analysis-view",
+ portablePath,
+ "--json",
+ ]);
+ expect(parseEvidence(JSON.parse(cliResult.stdout)).normalized_result).toEqual(
+ contribution.normalized_result,
+ );
+ for (const invalid of [
+ { kind: "qlog", facet: "streams" },
+ { kind: "qlog", facet: "streams", trace_index: 99 },
+ { ...view, stream_id: "99" },
+ { kind: "qlog", facet: "traces", trace_index: 0 },
+ ])
+ expect(
+ parseMcpToolError(
+ await call("inspect_analysis_view", {
+ source: retained,
+ view: invalid,
+ }),
+ ),
+ ).toMatchObject({ error: { code: "invalid_request" } });
+}, 60_000);
+
+runtimeTest.runIf(!hasMemoryBound)(
+ "refuses qlog when this runtime cannot enforce a decoder memory bound",
+ async () => {
+ const { call } = await connectLocalToolsMcp();
+ const root = await createTestTempDirectory("rea-qlog-unbounded-");
+ const path = join(root, "input.qlog");
+ await writeFile(path, qlog([event]));
+ expect(
+ parseMcpToolError(
+ await call("inspect_web_network_capture", {
+ capture_path: path,
+ format: "qlog",
+ }),
+ ),
+ ).toMatchObject({ error: { code: "capability_unavailable" } });
+ },
+);
+
+it("runs built CLI and real stdio SDK with exact evidence parity, selection, retained references and strict schemas", async () => {
+ const root = await createTestTempDirectory("rea-qlog-public-");
+ const path = join(root, "input.qlog");
+ await writeFile(
+ path,
+ qlog([
+ event,
+ {
+ name: "recovery:packet_lost",
+ time: 1791819895001.125,
+ data: { packet_number: 5, type: "1RTT" },
+ },
+ ]),
+ );
+ const { call, client } = await connectLocalToolsMcp();
+ const input = { capture_path: path, format: "qlog", record_ordinals: [1, 0] };
+ const response = await call("inspect_web_network_capture", input);
+ expect(response.isError, JSON.stringify(response)).not.toBe(true);
+ const mcp = parseEvidence(response.structuredContent);
+ const result = await execute(process.execPath, [
+ cli,
+ "inspect-web-network-capture",
+ path,
+ "qlog",
+ "--record",
+ "1",
+ "--record",
+ "0",
+ "--json",
+ ]);
+ const cliEvidence = parseEvidence(JSON.parse(result.stdout));
+ expect(cliEvidence.evidence_id).toBe(mcp.evidence_id);
+ expect(cliEvidence.normalized_result).toEqual(mcp.normalized_result);
+ expect(mcp.analysis_profile?.parameters).toMatchObject({
+ qlog_profile: "aioquic-1.5.0-json-0.3",
+ });
+ expect(mcp.authority).toBe("historical-reference");
+ const decoded = webNetworkCaptureSchema.parse(mcp.normalized_result);
+ expect(decoded.records.map((record) => record.ordinal)).toEqual([1, 0]);
+ if (decoded.format !== "qlog") throw new Error("qlog format required");
+ expect(decoded.qlog.traces[0]?.streams[0]).toMatchObject({
+ unique_bytes: "5",
+ covered_ranges: [{ start: "10", end: "15" }],
+ });
+ const retained = await call("inspect_analysis_view", {
+ source: { kind: "retained-evidence", evidence_id: mcp.evidence_id },
+ view: { kind: "api-surface" },
+ });
+ // An unsupported view over an existing retained parent proves lookup without pretending qlog is HAR.
+ expect(parseMcpToolError(retained)).toMatchObject({
+ error: { code: "unsupported_target" },
+ });
+ await client.ping();
+ for (const record_ordinals of [[2], [0, 0]]) {
+ expect(
+ parseMcpToolError(
+ await call("inspect_web_network_capture", {
+ ...input,
+ record_ordinals,
+ }),
+ ),
+ ).toMatchObject({ error: { code: "invalid_request" } });
+ }
+ const hidden = await call("inspect_web_network_capture", {
+ capture_path: path,
+ format: "qlog",
+ sensitive_values: ["trace-local", "/traces/0", "input.qlog"],
+ });
+ expect(JSON.stringify(hidden)).not.toContain("trace-local");
+ expect(JSON.stringify(hidden)).not.toContain("/traces/0");
+ expect(JSON.stringify(hidden)).not.toContain("input.qlog");
+ const hiddenEvidence = parseEvidence(hidden.structuredContent);
+ expect(
+ webNetworkCaptureSchema.parse(hiddenEvidence.normalized_result).artifact
+ .path,
+ ).toBe("");
+ const invalid = await call("inspect_web_network_capture", {
+ ...input,
+ mysecret: true,
+ sensitive_values: ["mysecret"],
+ });
+ expect(parseMcpToolError(invalid)).toMatchObject({
+ error: { code: "invalid_request" },
+ });
+ expect(JSON.stringify(invalid)).not.toContain("mysecret");
+}, 60_000);
+
+it("fails whole-capture validation before selection and survives malformed, unsupported and oversized qlog", async () => {
+ const root = await createTestTempDirectory("rea-qlog-errors-");
+ const path = join(root, "input.qlog");
+ const { call, client } = await connectLocalToolsMcp();
+ for (const [text, code] of [
+ [qlog([event, { ...event, time: "invalid" }]), "invalid_request"],
+ [qlog([event]).slice(0, -1), "invalid_request"],
+ [
+ qlog([event]).replace('"qlog_version":"0.3"', '"qlog_version":"0.4"'),
+ "capability_unavailable",
+ ],
+ [
+ qlog([
+ {
+ ...event,
+ extension: JSON.parse("[".repeat(65) + "0" + "]".repeat(65)),
+ },
+ ]),
+ "invalid_request",
+ ],
+ ] as const) {
+ await writeFile(path, text);
+ expect(
+ parseMcpToolError(
+ await call("inspect_web_network_capture", {
+ capture_path: path,
+ format: "qlog",
+ record_ordinals: [0],
+ }),
+ ),
+ ).toMatchObject({ error: { code } });
+ const failed: unknown = await execute(process.execPath, [
+ cli,
+ "inspect-web-network-capture",
+ path,
+ "qlog",
+ "--json",
+ ]).catch((cause: unknown) => cause);
+ expect(failed).toMatchObject({
+ code: 1,
+ stdout: expect.stringContaining(`"code":"${code}"`),
+ });
+ }
+ await truncate(path, WEB_NETWORK_CAPTURE_LIMITS.inputBytes + 1);
+ expect(
+ parseMcpToolError(
+ await call("inspect_web_network_capture", {
+ capture_path: path,
+ format: "qlog",
+ }),
+ ),
+ ).toMatchObject({ error: { code: "invalid_request" } });
+ await writeFile(path, qlog([event]));
+ await client.ping();
+ expect(
+ (
+ await call("inspect_web_network_capture", {
+ capture_path: path,
+ format: "qlog",
+ })
+ ).isError,
+ ).not.toBe(true);
+}, 60_000);
+
+runtimeTest.skipIf(process.versions.bun !== undefined || !hasMemoryBound)(
+ "contains actual qlog decoder heap exhaustion and keeps MCP usable",
+ async () => {
+ const root = await createTestTempDirectory("rea-qlog-capacity-");
+ const path = join(root, "dense.qlog");
+ const dense = qlog(Array(100_000).fill(event));
+ expect(Buffer.byteLength(dense)).toBeLessThan(
+ WEB_NETWORK_CAPTURE_LIMITS.inputBytes,
+ );
+ await writeFile(path, dense);
+ const { call, client } = await connectLocalToolsMcp();
+ const response = await call("inspect_web_network_capture", {
+ capture_path: path,
+ format: "qlog",
+ record_ordinals: [0],
+ });
+ expect(parseMcpToolError(response)).toMatchObject({
+ error: {
+ code: "resource_constraint",
+ details: {
+ resource: "memory",
+ reported_limits: { old_generation_heap_mib: 192 },
+ },
+ },
+ });
+ const failed: unknown = await execute(
+ process.execPath,
+ [cli, "inspect-web-network-capture", path, "qlog", "--json"],
+ { timeout: 40_000, maxBuffer: 1024 * 1024 },
+ ).catch((cause: unknown) => cause);
+ expect(failed).toMatchObject({
+ code: 1,
+ stdout: expect.stringContaining('"code":"resource_constraint"'),
+ });
+ await writeFile(path, qlog([event]));
+ await client.ping();
+ expect(
+ (
+ await call("inspect_web_network_capture", {
+ capture_path: path,
+ format: "qlog",
+ })
+ ).isError,
+ ).not.toBe(true);
+ },
+ 60_000,
+);
diff --git a/tests/boundary/browser/sazWebCapture.test.ts b/tests/boundary/browser/sazWebCapture.test.ts
new file mode 100644
index 000000000..69eca33b8
--- /dev/null
+++ b/tests/boundary/browser/sazWebCapture.test.ts
@@ -0,0 +1,499 @@
+import { createHash } from "node:crypto";
+import { execFile } from "node:child_process";
+import { readFile, unlink, writeFile } from "node:fs/promises";
+import { join } from "node:path";
+import { promisify } from "node:util";
+import { fileURLToPath } from "node:url";
+import { gzipSync } from "node:zlib";
+import { Uint8ArrayReader, Uint8ArrayWriter, ZipWriter } from "@zip.js/zip.js";
+import { Ajv2020 } from "ajv/dist/2020.js";
+import { expect, it as runtimeTest } from "vitest";
+import { z } from "zod";
+import { parseEvidence } from "../../../src/domain/evidence.js";
+import { webNetworkCaptureSchema } from "../../../src/domain/webNetworkCapture.js";
+import { connectLocalToolsMcp } from "../../fixtures/localToolsMcp.js";
+import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js";
+
+import {
+ NODE_CAPTURE_HEAP_ENFORCED,
+ NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES,
+} from "../../../src/browser/history/CaptureRelease.js";
+const hasMemoryBound =
+ NODE_CAPTURE_HEAP_ENFORCED ||
+ NODE_CAPTURE_PROCESS_MEMORY_LIMIT_BYTES !== null;
+
+const it = runtimeTest.skipIf(!hasMemoryBound);
+
+// Synthetic member fixtures based on Telerik's SAZ layout; not a real-producer golden.
+const compressedBody = gzipSync(Buffer.from("stored compressed body"));
+const members = (): [string, Buffer][] => [
+ [
+ "raw/0042_s.txt",
+ Buffer.concat([
+ Buffer.from(
+ "HTTP/1.1 200 OK\r\nContent-Encoding: gzip\r\nSet-Cookie: server-credential\r\n\r\n",
+ ),
+ compressedBody,
+ ]),
+ ],
+ [
+ "raw/7_c.txt",
+ Buffer.concat([
+ Buffer.from("POST /bytes HTTP/2.0\r\n:authority: example.test\r\n\r\n"),
+ Buffer.from([0xff, 0, 0x80]),
+ ]),
+ ],
+ [
+ "raw/0042_c.txt",
+ Buffer.from(
+ "GET https://user:password@example.test/a HTTP/1.1\r\nAuthorization: Bearer client-credential\r\nCookie: cookie-credential\r\nX-Duplicate: one\r\nX-Duplicate: two\r\nX-Text: unicode-\u03b2\r\n\r\n",
+ ),
+ ],
+ [
+ "raw/0042_m.xml",
+ Buffer.from(
+ '',
+ ),
+ ],
+ ["raw/0042_w.txt", Buffer.from("opaque websocket message file")],
+ ["raw/7_g.txt", Buffer.from([0, 1, 2])],
+ ["[Content_Types].xml", Buffer.from("")],
+];
+const archive = async (entries = members(), password?: string, level = 6) => {
+ const writer = new ZipWriter(new Uint8ArrayWriter(), {
+ useWebWorkers: false,
+ level,
+ ...(password === undefined ? {} : { password }),
+ });
+ for (const [name, bytes] of entries)
+ await writer.add(name, new Uint8ArrayReader(bytes));
+ return Buffer.from(await writer.close());
+};
+const fixture = async (bytes: Buffer) => {
+ const root = await createTestTempDirectory("rea-saz-capture-");
+ const path = join(root, "capture.saz");
+ await writeFile(path, bytes);
+ return path;
+};
+const entrypoint = fileURLToPath(
+ new URL("../../../scripts/rea.mjs", import.meta.url),
+);
+const cliResponse = async (path: string, extra: string[] = []) => {
+ try {
+ const { stdout } = await promisify(execFile)(
+ process.execPath,
+ [
+ entrypoint,
+ "inspect-web-network-capture",
+ path,
+ "saz",
+ "--json",
+ ...extra,
+ ],
+ { timeout: 40_000, maxBuffer: 4 * 1024 * 1024 },
+ );
+ return { ok: true, stdout };
+ } catch (cause: unknown) {
+ if (
+ cause instanceof Error &&
+ "stdout" in cause &&
+ typeof cause.stdout === "string"
+ )
+ return { ok: false, stdout: cause.stdout };
+ throw cause;
+ }
+};
+const cli = async (path: string, extra: string[] = []) => {
+ const result = await cliResponse(path, extra);
+ expect(result.ok, result.stdout).toBe(true);
+ return parseEvidence(JSON.parse(result.stdout));
+};
+
+it("inspects native SAZ through the public CLI and MCP with equal evidence, bytes and archive coordinates", async () => {
+ const bytes = await archive();
+ const path = await fixture(bytes);
+ const evidence = await cli(path, ["--record", "1", "--record", "0"]);
+ const capture = webNetworkCaptureSchema.parse(evidence.normalized_result);
+ expect(capture).toMatchObject({
+ format: "saz",
+ total_records: 2,
+ runtime_attribution: "unknown",
+ records: [
+ { ordinal: 1, reported: { session_id: "7", response: null } },
+ {
+ ordinal: 0,
+ reported: {
+ session_id: "0042",
+ request: { url: "https://example.test/a" },
+ response: { status: "200" },
+ },
+ },
+ ],
+ });
+ expect(capture.records[1]?.location).toEqual({
+ kind: "archive-members",
+ members: [
+ "raw/0042_s.txt",
+ "raw/0042_c.txt",
+ "raw/0042_m.xml",
+ "raw/0042_w.txt",
+ ],
+ });
+ expect(capture.records[1]?.binary_fields).toContainEqual({
+ pointer: "/response/body",
+ representation: "producer-bytes",
+ state: "retained",
+ content_base64: compressedBody.toString("base64"),
+ bytes: compressedBody.length,
+ sha256: createHash("sha256").update(compressedBody).digest("hex"),
+ });
+ expect(capture.records[0]?.binary_fields).toContainEqual(
+ expect.objectContaining({
+ pointer: "/request/body",
+ content_base64: "/wCA",
+ }),
+ );
+ expect(capture.records[1]?.binary_fields).toContainEqual(
+ expect.objectContaining({
+ pointer: "/request/body",
+ bytes: 0,
+ content_base64: "",
+ }),
+ );
+ expect(capture.records[1]?.reported).toMatchObject({
+ request: {
+ headers: [
+ { name: "Authorization", value: null },
+ { name: "Cookie", value: null },
+ { name: "X-Duplicate", value: " one" },
+ { name: "X-Duplicate", value: " two" },
+ { name: "X-Text" },
+ ],
+ },
+ });
+ expect(JSON.stringify(capture)).toContain("retained metadata");
+ for (const secret of [
+ "user:password",
+ "client-credential",
+ "server-credential",
+ "cookie-credential",
+ ])
+ expect(JSON.stringify(capture)).not.toContain(secret);
+ expect(capture.artifact.sha256).toBe(
+ createHash("sha256").update(bytes).digest("hex"),
+ );
+ expect(await readFile(path)).toEqual(bytes);
+
+ const { client, call } = await connectLocalToolsMcp();
+ const tool = (await client.listTools()).tools.find(
+ (item) => item.name === "inspect_web_network_capture",
+ );
+ if (tool?.outputSchema === undefined)
+ throw new Error("Missing capture schema");
+ const args = { capture_path: path, format: "saz", record_ordinals: [1, 0] };
+ const ajv = new Ajv2020({ strict: false, validateFormats: false });
+ expect(ajv.validate(tool.inputSchema, args)).toBe(true);
+ const response = await call("inspect_web_network_capture", args);
+ expect(response.isError, JSON.stringify(response)).not.toBe(true);
+ const fromMcp = parseEvidence(response.structuredContent);
+ expect(fromMcp.normalized_result).toEqual(evidence.normalized_result);
+ const bundle = await client.callTool({
+ name: "get_evidence_bundle",
+ arguments: { detail: "complete" },
+ });
+ const records = z
+ .object({ result: z.object({ records: z.array(z.unknown()) }) })
+ .parse(bundle.structuredContent)
+ .result.records.map(parseEvidence);
+ expect(
+ records.find((record) => record.evidence_id === fromMcp.evidence_id),
+ ).toEqual(fromMcp);
+}, 60_000);
+
+it("pages retained SAZ Evidence through public MCP and portable CLI after source deletion", async () => {
+ const path = await fixture(await archive());
+ const { call } = await connectLocalToolsMcp();
+ const args = { capture_path: path, format: "saz", record_ordinals: [1, 0] };
+ const full = await call("inspect_web_network_capture", args);
+ const fromMcp = parseEvidence(full.structuredContent);
+ const capture = webNetworkCaptureSchema.parse(fromMcp.normalized_result);
+ const summaryArgs = { ...args, detail: "summary" };
+ const summaryResponse = await call(
+ "inspect_web_network_capture",
+ summaryArgs,
+ );
+ expect(summaryResponse.isError, JSON.stringify(summaryResponse)).not.toBe(
+ true,
+ );
+ const summary = parseEvidence(summaryResponse.structuredContent);
+ expect(summary.normalized_result).toMatchObject({
+ kind: "summary",
+ parent_evidence_id: fromMcp.evidence_id,
+ summary: { format: "saz", total_records: 2, retained_records: 2 },
+ });
+ expect(JSON.stringify(summary)).not.toContain(
+ compressedBody.toString("base64"),
+ );
+
+ // Retained pages must keep their snapshot semantics after the input disappears.
+ await unlink(path);
+ const source = {
+ kind: "retained-evidence",
+ evidence_id: fromMcp.evidence_id,
+ };
+ const previewArgs = {
+ source,
+ view: { kind: "capture", offset: 0, limit: 1 },
+ };
+ const previewResponse = await call("inspect_analysis_view", previewArgs);
+ expect(previewResponse.isError, JSON.stringify(previewResponse)).not.toBe(
+ true,
+ );
+ const preview = parseEvidence(previewResponse.structuredContent);
+ expect(preview.normalized_result).toMatchObject({
+ items: [
+ {
+ ordinal: 1,
+ reported: {
+ session_id: "7",
+ request: { method: "POST", url: "/bytes" },
+ },
+ },
+ ],
+ coverage: { examined: 1, total: 2, next_offset: 1, exhausted: false },
+ });
+ expect(JSON.stringify(preview)).not.toContain("content_base64");
+ const completeResponse = await call("inspect_analysis_view", {
+ source,
+ view: { kind: "capture", detail: "complete", offset: 1, limit: 1 },
+ });
+ expect(completeResponse.isError, JSON.stringify(completeResponse)).not.toBe(
+ true,
+ );
+ const complete = parseEvidence(completeResponse.structuredContent);
+ expect(complete.normalized_result).toMatchObject({
+ items: [capture.records[1]],
+ coverage: { next_offset: null, exhausted: true },
+ });
+
+ const workflow = join(path, "..", "summary-view.json");
+ await writeFile(
+ workflow,
+ JSON.stringify({
+ source: { kind: "inline", evidence: fromMcp },
+ view: { kind: "summary" },
+ }),
+ );
+ const standalone = await promisify(execFile)(process.execPath, [
+ entrypoint,
+ "inspect-analysis-view",
+ workflow,
+ "--json",
+ ]);
+ expect(
+ parseEvidence(JSON.parse(standalone.stdout)).normalized_result,
+ ).toEqual(summary.normalized_result);
+}, 60_000);
+
+it("keeps CRLF separators inside a body after LF-only HTTP headers", async () => {
+ const body = Buffer.from("\ufefffirst\r\n\r\nsecond\n\nthird");
+ const bytes = await archive([
+ [
+ "raw/1_c.txt",
+ Buffer.concat([
+ Buffer.from("POST https://example.test/ HTTP/1.1\nX-Test: request\n\n"),
+ body,
+ ]),
+ ],
+ [
+ "raw/1_s.txt",
+ Buffer.concat([
+ Buffer.from("HTTP/1.1 200 OK\nX-Test: response\n\n"),
+ body,
+ ]),
+ ],
+ ]);
+ const path = await fixture(bytes);
+ const capture = webNetworkCaptureSchema.parse(
+ (await cli(path)).normalized_result,
+ );
+ expect(capture.records[0]?.reported).toMatchObject({
+ request: {
+ headers: [{ name: "X-Test", value: " request" }],
+ body: body.toString("utf8"),
+ },
+ response: {
+ headers: [{ name: "X-Test", value: " response" }],
+ body: body.toString("utf8"),
+ },
+ });
+ for (const pointer of ["/request/body", "/response/body"])
+ expect(capture.records[0]?.binary_fields).toContainEqual({
+ pointer,
+ representation: "producer-bytes",
+ state: "retained",
+ content_base64: body.toString("base64"),
+ bytes: body.length,
+ sha256: createHash("sha256").update(body).digest("hex"),
+ });
+ expect(await readFile(path)).toEqual(bytes);
+});
+
+it("excludes explicit literals from XML, HTTP byte views, member coordinates and binary sidecars", async () => {
+ const path = await fixture(await archive());
+ const result = await cli(path, [
+ "--sensitive-value",
+ "0042",
+ "--sensitive-value",
+ "unicode-\u03b2",
+ "--sensitive-value",
+ compressedBody.toString("base64"),
+ "--sensitive-value",
+ "retained metadata",
+ ]);
+ const capture = webNetworkCaptureSchema.parse(result.normalized_result);
+ expect(capture.records[0]?.location).toEqual({
+ kind: "unknown",
+ reason: "explicit-sensitive-value",
+ });
+ expect(capture.records[0]?.binary_fields).toContainEqual({
+ pointer: "/response/body",
+ representation: "producer-bytes",
+ state: "redacted",
+ bytes: null,
+ sha256: null,
+ content_base64: null,
+ });
+ const text = JSON.stringify(result);
+ for (const secret of [
+ "0042",
+ "unicode-",
+ "retained metadata",
+ compressedBody.toString("base64"),
+ createHash("sha256").update(compressedBody).digest("hex"),
+ ])
+ expect(text).not.toContain(secret);
+});
+
+it("retains folded headers, stored chunk framing and BOM-marked UTF-16 metadata", async () => {
+ const body = "3\r\none\r\n0\r\n\r\n";
+ const path = await fixture(
+ await archive([
+ [
+ "raw/1_s.txt",
+ Buffer.from(
+ `HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\nX-Folded: first\r\n second\r\n\r\n${body}`,
+ ),
+ ],
+ [
+ "raw/1_m.xml",
+ Buffer.from(
+ '\ufeff\u03b2]]>',
+ "utf16le",
+ ),
+ ],
+ [
+ "raw/2_c.txt",
+ Buffer.from(
+ "CONNECT example.test:443 HTTP/1.1\nHost: example.test:443\n\n",
+ ),
+ ],
+ ]),
+ );
+ const evidence = await cli(path);
+ const capture = webNetworkCaptureSchema.parse(evidence.normalized_result);
+ expect(capture.records[0]?.reported).toMatchObject({
+ request: null,
+ response: {
+ body,
+ headers: [
+ { name: "Transfer-Encoding", value: " chunked" },
+ { name: "X-Folded", value: " first\r\n second" },
+ ],
+ },
+ });
+ expect(capture.records[0]?.binary_fields).toContainEqual(
+ expect.objectContaining({
+ pointer: "/response/body",
+ content_base64: Buffer.from(body).toString("base64"),
+ }),
+ );
+ expect(JSON.stringify(capture.records[0]?.reported)).toContain("\u03b2");
+ expect(capture.records[1]?.reported).toMatchObject({
+ request: { method: "CONNECT", url: "example.test:443", body: "" },
+ });
+});
+
+it.each([
+ "bad-http",
+ "bad-xml",
+ "dtd",
+ "unknown-member",
+ "encrypted",
+ "duplicate",
+ "crc",
+ "expanded-limit",
+])("rejects %s before returning a selected subset", async (variant) => {
+ let entries = members();
+ if (variant === "bad-http")
+ entries.push(["raw/8_c.txt", Buffer.from("malformed-private-input")]);
+ if (variant === "bad-xml")
+ entries.push(["raw/8_m.xml", Buffer.from("")]);
+ if (variant === "dtd")
+ entries.push([
+ "raw/8_m.xml",
+ Buffer.from(
+ ']>&external;',
+ ),
+ ]);
+ if (variant === "unknown-member")
+ entries.push(["raw/8_unknown.txt", Buffer.from("unknown extension")]);
+ if (variant === "duplicate")
+ entries = [
+ ["raw/8_c.txt", Buffer.from("GET /a HTTP/1.1\r\n\r\n")],
+ ["raw/9_c.txt", Buffer.from("GET /b HTTP/1.1\r\n\r\n")],
+ ];
+ let bytes = await archive(
+ entries,
+ variant === "encrypted" ? "fixture-password" : undefined,
+ variant === "crc" ? 0 : 6,
+ );
+ if (variant === "duplicate")
+ bytes = Buffer.from(
+ bytes.toString("latin1").replaceAll("raw/9_c.txt", "raw/8_c.txt"),
+ "latin1",
+ );
+ if (variant === "crc") {
+ const offset = bytes.indexOf(Buffer.from("HTTP/1.1 200 OK"));
+ expect(offset).toBeGreaterThan(0);
+ bytes[offset + 9] = 0x35;
+ }
+ if (variant === "expanded-limit") {
+ const central = bytes.indexOf(Buffer.from([0x50, 0x4b, 0x01, 0x02]));
+ bytes.writeUInt32LE(33 * 1024 * 1024, central + 24);
+ }
+ const path = await fixture(bytes);
+ const result = await cliResponse(path, ["--record", "0"]);
+ expect(result.ok, result.stdout).toBe(false);
+ expect(JSON.parse(result.stdout).category).toBe(
+ ["encrypted", "unknown-member", "dtd"].includes(variant)
+ ? "unsupported_provider"
+ : variant === "expanded-limit"
+ ? "execution_failure"
+ : "invalid_input",
+ );
+ if (variant === "expanded-limit")
+ expect(JSON.parse(result.stdout).code).toBe("unreadable_output");
+ expect(JSON.stringify(result)).not.toContain("malformed-private-input");
+});
+
+runtimeTest.runIf(!hasMemoryBound)(
+ "reports SAZ unavailable when its runtime cannot enforce decoder memory",
+ async () => {
+ const response = await cliResponse(await fixture(await archive()));
+ expect(response.ok).toBe(false);
+ expect(JSON.parse(response.stdout)).toMatchObject({
+ code: "capability_unavailable",
+ });
+ },
+);
diff --git a/tests/boundary/mcp/androidPackageSummaryMcp.test.ts b/tests/boundary/mcp/androidPackageSummaryMcp.test.ts
new file mode 100644
index 000000000..960886b02
--- /dev/null
+++ b/tests/boundary/mcp/androidPackageSummaryMcp.test.ts
@@ -0,0 +1,295 @@
+import { unlink } from "node:fs/promises";
+import { Client, InMemoryTransport } from "@modelcontextprotocol/client";
+import { Ajv2020 } from "ajv/dist/2020.js";
+import { expect, it, onTestFinished, vi } from "vitest";
+import { AndroidAnalysisService } from "../../../src/application/android/AndroidAnalysisService.js";
+import { inspectAndroidPackage } from "../../../src/application/android/AndroidPackageInspection.js";
+import { inspectAnalysisView } from "../../../src/application/analysisView/AnalysisViewService.js";
+import { androidResultSchemas } from "../../../src/domain/android/androidAnalysis.js";
+import {
+ androidPackageSummaryViewResultSchema,
+ analysisViewResultSchema,
+} from "../../../src/domain/analysisView/analysisView.js";
+import { createEvidence, parseEvidence } from "../../../src/domain/evidence.js";
+import type { JsonValue } from "../../../src/domain/jsonValue.js";
+import { createServer } from "../../../src/server/createServer.js";
+import { createApplicationMcpHarness } from "../../fixtures/applicationMcpHarness.js";
+import { createTestBinarySession } from "../../fixtures/binarySession.js";
+import { parseMcpToolError } from "../../fixtures/mcpToolError.js";
+import {
+ createJadxProtocolFixture,
+ verifyJadxFixtureCleanup,
+} from "../../fixtures/android/jadx.js";
+
+it.skipIf(process.platform === "win32")(
+ "retains complete APK Evidence and reads exact manifest without its source or another engine launch",
+ async () => {
+ const { provider, apk, launches } =
+ await createJadxProtocolFixture("large-manifest");
+ const harness = await createApplicationMcpHarness({
+ serverOptions: { androidAnalysis: provider },
+ });
+ onTestFinished(harness.close);
+ const { client, session } = harness;
+ const catalog = (await client.listTools()).tools;
+ const definition = catalog.find(
+ (tool) => tool.name === "inspect_android_package",
+ );
+ if (definition?.outputSchema === undefined)
+ throw new Error("Missing APK schema");
+ const outputSchema: Record = definition.outputSchema;
+ const ajv = new Ajv2020({ strict: false, validateFormats: false });
+ expect(ajv.validateSchema(definition.inputSchema)).toBe(true);
+ expect(ajv.validateSchema(outputSchema)).toBe(true);
+ expect(
+ ajv.validate(definition.inputSchema, { path: apk, detail: "summary" }),
+ ).toBe(true);
+ expect(
+ ajv.validate(
+ catalog.find((tool) => tool.name === "inspect_android_class")!
+ .inputSchema,
+ {
+ path: apk,
+ class_name: "fixture.Target",
+ detail: "summary",
+ },
+ ),
+ ).toBe(false);
+ const reply = await client.callTool({
+ name: "inspect_android_package",
+ arguments: { path: apk, detail: "summary" },
+ });
+ expect(reply.isError).not.toBe(true);
+ expect(
+ ajv.validate(outputSchema, reply.structuredContent),
+ JSON.stringify(ajv.errors),
+ ).toBe(true);
+ const receipt = parseEvidence(reply.structuredContent);
+ const view = androidPackageSummaryViewResultSchema.parse(
+ receipt.normalized_result,
+ );
+ const parent = session.evidenceById(view.parent_evidence_id);
+ if (parent === undefined)
+ throw new Error("Complete package Evidence not retained");
+ const report = androidResultSchemas.inspect_android_package.parse(
+ parent.normalized_result,
+ );
+ expect(parent.operation).toBe("inspect_android_package");
+ expect(parent.parameters).toEqual({ path: apk });
+ expect(view.artifact.sha256).toBe(parent.subject?.digest.sha256);
+ expect(view.artifact.sha256).not.toBe(report.engine.artifact_sha256);
+ expect(receipt.evidence_id).not.toBe(parent.evidence_id);
+ expect(receipt.evidence_links).toEqual([parent.evidence_id]);
+ const { manifest, ...declarations } = report;
+ expect(view.summary).toMatchObject(declarations);
+ expect(view.summary.manifest).toEqual({
+ status: manifest.status,
+ reported_total_bytes: manifest.reported_total_bytes,
+ text_code_units: manifest.text.length,
+ text_included: false,
+ });
+ expect(receipt.raw_result).toBeNull();
+ expect(parent.raw_result).not.toBeNull();
+ for (const detail of [undefined, "complete"]) {
+ const full = parseEvidence(
+ (
+ await client.callTool({
+ name: "inspect_android_package",
+ arguments: {
+ path: apk,
+ ...(detail === undefined ? {} : { detail }),
+ },
+ })
+ ).structuredContent,
+ );
+ expect(full.operation).toBe("inspect_android_package");
+ expect(full.normalized_result).toEqual(parent.normalized_result);
+ expect(full.parameters).toEqual(parent.parameters);
+ expect(full.raw_result).not.toBeNull();
+ }
+ const before = JSON.stringify(parent);
+ await unlink(apk);
+ let text = "";
+ let offset = 0;
+ do {
+ const paged = await client.callTool({
+ name: "inspect_analysis_view",
+ arguments: {
+ source: {
+ kind: "retained-evidence",
+ evidence_id: parent.evidence_id,
+ },
+ view: { kind: "android", facet: "manifest", offset, limit: 700000 },
+ },
+ });
+ expect(paged.isError).not.toBe(true);
+ const page = analysisViewResultSchema.parse(
+ parseEvidence(paged.structuredContent).normalized_result,
+ );
+ if (page.kind !== "android") throw new Error("Unexpected manifest page");
+ text += page.item.text;
+ expect(page.item.source_status).toBe(manifest.status);
+ expect(page.item.reported_total_bytes).toBe(
+ manifest.reported_total_bytes,
+ );
+ offset = page.coverage.next_offset ?? manifest.text.length;
+ } while (offset < manifest.text.length);
+ expect(text).toBe(manifest.text);
+ const portable = inspectAnalysisView({
+ source: { kind: "inline", evidence: parseEvidence(JSON.parse(before)) },
+ view: { kind: "summary" },
+ });
+ if (!portable.ok) throw portable.error;
+ expect(portable.value.normalized_result).toEqual(view);
+ expect(JSON.stringify(session.evidenceById(parent.evidence_id))).toBe(
+ before,
+ );
+ expect(
+ session
+ .exportEvidenceBundle()
+ .records.find((record) => record.evidence_id === parent.evidence_id),
+ ).toEqual(parent);
+ expect(launches).toHaveLength(1);
+ await harness.close();
+ await verifyJadxFixtureCleanup(launches);
+ },
+ 30000,
+);
+
+it("preserves partial/unknown declarations and Unicode text while rejecting missing APK identity and malformed source", () => {
+ const report = {
+ engine: {
+ name: "jadx",
+ version: null,
+ artifact_sha256: "b".repeat(64),
+ source_revision: null,
+ worker_count: 1,
+ heap_limit_mib: null,
+ },
+ package_name: null,
+ version_name: null,
+ version_code: null,
+ min_sdk: null,
+ target_sdk: null,
+ permissions: [],
+ manifest: { status: "partial", text: "a😀b", reported_total_bytes: null },
+ class_count: 0,
+ resource_count: 0,
+ signature_verification: "not_performed",
+ };
+ const evidence = (result: JsonValue = report, hasSubject = true) =>
+ createEvidence(
+ hasSubject
+ ? { path: "/original.apk", sha256: "a".repeat(64), format: "apk" }
+ : undefined,
+ { id: "jadx", name: "JADX", version: "0.7.1" },
+ {
+ operation: "inspect_android_package",
+ parameters: {},
+ result,
+ limitations: ["Original limit"],
+ },
+ );
+ const parent = evidence();
+ const source = { kind: "inline", evidence: parent };
+ const summary = inspectAnalysisView({ source, view: { kind: "summary" } });
+ if (!summary.ok) throw summary.error;
+ const overview = androidPackageSummaryViewResultSchema.parse(
+ summary.value.normalized_result,
+ );
+ expect(overview.summary.package_name).toBeNull();
+ expect(overview.summary.manifest.status).toBe("partial");
+ expect(overview.limitations).toEqual(parent.limitations);
+ const page = inspectAnalysisView({
+ source,
+ view: { kind: "android", facet: "manifest", offset: 0, limit: 4 },
+ });
+ if (!page.ok) throw page.error;
+ const result = analysisViewResultSchema.parse(page.value.normalized_result);
+ expect(result).toMatchObject({
+ kind: "android",
+ item: {
+ text: "a😀b",
+ source_status: "partial",
+ reported_total_bytes: null,
+ },
+ coverage: { exhausted: true },
+ });
+ expect(result.unknowns.join(" ")).toContain("partial");
+ for (const offset of [2])
+ expect(
+ inspectAnalysisView({
+ source,
+ view: { kind: "android", facet: "manifest", offset, limit: 2 },
+ }),
+ ).toMatchObject({ ok: false, error: { _tag: "AnalysisInputError" } });
+ for (const invalid of [
+ evidence(report, false),
+ evidence({ ...report, class_count: -1 }),
+ ])
+ expect(
+ inspectAnalysisView({
+ source: { kind: "inline", evidence: invalid },
+ view: { kind: "summary" },
+ }),
+ ).toMatchObject({ ok: false, error: { _tag: "AnalysisInputError" } });
+});
+
+it("rejects unavailable retention, invalid selectors and cancellation before provider execution", async () => {
+ const execute = vi.fn();
+ const provider = {
+ execute,
+ close: async () => {},
+ inspectAvailability: vi.fn(),
+ };
+ const service = new AndroidAnalysisService(provider);
+ const retention = { recordEvidence: undefined, evidenceById: undefined };
+ expect(
+ await inspectAndroidPackage(
+ service,
+ { path: "/missing.apk", detail: "summary" },
+ retention,
+ ),
+ ).toMatchObject({
+ ok: false,
+ error: { _tag: "AnalysisCapabilityUnavailableError" },
+ });
+ expect(
+ await inspectAndroidPackage(
+ service,
+ { path: "/missing.apk", detail: "other" },
+ retention,
+ ),
+ ).toMatchObject({ ok: false, error: { _tag: "AnalysisInputError" } });
+ expect(
+ await inspectAndroidPackage(
+ service,
+ { path: "/missing.apk", detail: "summary" },
+ retention,
+ { signal: AbortSignal.abort() },
+ ),
+ ).toMatchObject({ ok: false, error: { _tag: "AnalysisCancelledError" } });
+ expect(execute).not.toHaveBeenCalled();
+ const session = createTestBinarySession(() => {
+ throw new Error("Unexpected deep provider");
+ });
+ const server = createServer(
+ { kind: "fixed", analysis: session },
+ { androidAnalysis: provider },
+ );
+ const client = new Client({ name: "android-fixed-summary", version: "1" });
+ onTestFinished(async () => {
+ await client.close();
+ await server.close();
+ await session.close();
+ });
+ const [a, b] = InMemoryTransport.createLinkedPair();
+ await server.connect(b);
+ await client.connect(a);
+ const reply = await client.callTool({
+ name: "inspect_android_package",
+ arguments: { path: "/missing.apk", detail: "summary" },
+ });
+ expect(parseMcpToolError(reply).error.code).toBe("capability_unavailable");
+ expect(execute).not.toHaveBeenCalled();
+});
diff --git a/website/locales/ar/messages.po b/website/locales/ar/messages.po
index 8a7ea9d40..329f0cd96 100644
--- a/website/locales/ar/messages.po
+++ b/website/locales/ar/messages.po
@@ -70,7 +70,7 @@ msgstr "بواسطة N0zoM1z0 * 10 أكتوبر 2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4660,7 +4660,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "نسخ قراءة البرامج النصية المحملة"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "العودة للأعلى"
@@ -11469,7 +11469,7 @@ msgstr "الأدلة"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -11489,7 +11489,7 @@ msgstr "الكود المصدري"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -11509,7 +11509,7 @@ msgstr "رخصة MIT"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -11529,7 +11529,7 @@ msgstr "انضم إلى المجتمع"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -12461,6 +12461,23 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "التبديل إلى الوضع الداكن"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"لفحص أجسام طلبات HTTP واستجاباتها، استخدم {ph0}Fiddler Everywhere: تسجيلات "
+"SAZ وMCP والمهارات العامة{ph1}. صدّر بتنسيق SAZ ?? HAR 1.2 للحصول على أدلة "
+"تسجيل في REA دون اتصال، أو اربط خادم MCP في Everywhere لفحص حركة المرور "
+"المسجلة مع وكيلك."
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "دليل الإعداد"
diff --git a/website/locales/de/messages.po b/website/locales/de/messages.po
index 3b4690d00..ee3fec463 100644
--- a/website/locales/de/messages.po
+++ b/website/locales/de/messages.po
@@ -71,7 +71,7 @@ msgstr "Von N0zoM1z0 · 10. Oktober 2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4854,7 +4854,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "Kopieren Lesen Sie die geladenen Skripte"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "Nach oben"
@@ -11930,7 +11930,7 @@ msgstr "Anleitungen"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -11950,7 +11950,7 @@ msgstr "Quellcode"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -11970,7 +11970,7 @@ msgstr "MIT-Lizenz"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -11990,7 +11990,7 @@ msgstr "Zur Community"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -12939,6 +12939,24 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "Zum dunklen Modus wechseln"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"Für HTTP-Anfrage- und Antwortinhalte verwenden Sie {ph0}Fiddler Everywhere: "
+"SAZ-Aufzeichnungen, MCP und öffentliche Skills{ph1}. Exportieren Sie SAZ "
+"oder HAR 1.2 für die Offline-Auswertung der Aufzeichnung als REA Evidence, "
+"oder verbinden Sie den MCP-Server von Everywhere, um aufgezeichneten "
+"Datenverkehr mit Ihrem Agenten zu untersuchen."
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "Einrichtungsanleitung"
diff --git a/website/locales/es/messages.po b/website/locales/es/messages.po
index a9d6e8fb6..f40b06204 100644
--- a/website/locales/es/messages.po
+++ b/website/locales/es/messages.po
@@ -71,7 +71,7 @@ msgstr "Por N0zoM1z0 * 10 octubre 2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4827,7 +4827,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "Copiar leer los scripts cargados"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "Volver arriba"
@@ -11849,7 +11849,7 @@ msgstr "Guías"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -11869,7 +11869,7 @@ msgstr "Código fuente"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -11889,7 +11889,7 @@ msgstr "Licencia MIT"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -11909,7 +11909,7 @@ msgstr "Únete a la comunidad"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -12853,6 +12853,24 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "Cambiar al modo oscuro"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"Para examinar los cuerpos de las solicitudes y respuestas HTTP, use "
+"{ph0}Fiddler Everywhere: capturas SAZ, MCP y habilidades públicas{ph1}. "
+"Exporte SAZ o HAR 1.2 para obtener Evidence de capturas en REA sin conexión,"
+" o conecte el servidor MCP de Everywhere para inspeccionar el tráfico "
+"capturado con su agente."
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "Guía de instalación"
diff --git a/website/locales/fa/messages.po b/website/locales/fa/messages.po
index 65fd093ac..e163a131b 100644
--- a/website/locales/fa/messages.po
+++ b/website/locales/fa/messages.po
@@ -70,7 +70,7 @@ msgstr "توسط N0zoM1z0 * 10 اکتبر 2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4694,7 +4694,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "کپی خواندن اسکریپت های لود شده"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "بازگشت به بالا"
@@ -11564,7 +11564,7 @@ msgstr "راهنماها"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -11584,7 +11584,7 @@ msgstr "کد منبع"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -11604,7 +11604,7 @@ msgstr "مجوز MIT"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -11624,7 +11624,7 @@ msgstr "به جامعه بپیوندید"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -12563,6 +12563,23 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "تغییر به حالت تیره"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"برای بررسی بدنهٔ درخواستها و پاسخهای HTTP، از {ph0}Fiddler Everywhere: "
+"ضبطهای SAZ، سرور MCP و مهارتهای عمومی{ph1} استفاده کنید. برای Evidence ضبط"
+" در REA بهصورت آفلاین، خروجی SAZ ?? HAR 1.2 بگیرید، یا سرور MCP نرمافزار "
+"Everywhere را متصل کنید تا ترافیک ضبطشده را با عامل خود بررسی کنید."
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "راهنمای نصب"
diff --git a/website/locales/fr/messages.po b/website/locales/fr/messages.po
index 899844e40..f6e6ab357 100644
--- a/website/locales/fr/messages.po
+++ b/website/locales/fr/messages.po
@@ -71,7 +71,7 @@ msgstr "Par N0zoM1z0 · 10 octobre 2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4834,7 +4834,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "Copier lire les scripts chargés"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "Haut de page"
@@ -11860,7 +11860,7 @@ msgstr "Guides"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -11880,7 +11880,7 @@ msgstr "Code source"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -11900,7 +11900,7 @@ msgstr "Licence MIT"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -11920,7 +11920,7 @@ msgstr "Rejoindre la communauté"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -12867,6 +12867,24 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "Passer au mode sombre"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"Pour examiner les corps des requêtes et réponses HTTP, utilisez {ph0}Fiddler"
+" Everywhere : captures SAZ, MCP et compétences publiques{ph1}. Exportez en "
+"SAZ ou HAR 1.2 pour obtenir des Evidence de capture dans REA hors ligne, ou "
+"connectez le serveur MCP d’Everywhere pour inspecter le trafic capturé avec "
+"votre agent."
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "Guide d’installation"
diff --git a/website/locales/id/messages.po b/website/locales/id/messages.po
index 39e1ae619..6faa06dad 100644
--- a/website/locales/id/messages.po
+++ b/website/locales/id/messages.po
@@ -71,7 +71,7 @@ msgstr "Oleh N0zoM1z0 · 10 Oktober 2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4785,7 +4785,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "Salin baca skrip yang dimuat"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "Kembali ke atas"
@@ -11739,7 +11739,7 @@ msgstr "Panduan"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -11759,7 +11759,7 @@ msgstr "Kode sumber"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -11779,7 +11779,7 @@ msgstr "Lisensi MIT"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -11799,7 +11799,7 @@ msgstr "Gabung komunitas"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -12740,6 +12740,24 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "Beralih ke mode gelap"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"Untuk memeriksa isi permintaan dan respons HTTP, gunakan {ph0}Fiddler "
+"Everywhere: rekaman SAZ, MCP, dan skill publik{ph1}. Ekspor SAZ atau HAR 1.2"
+" untuk menghasilkan Evidence rekaman di REA secara luring, atau hubungkan "
+"server MCP Everywhere untuk memeriksa lalu lintas yang direkam bersama agen "
+"Anda."
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "Panduan pemasangan"
diff --git a/website/locales/it/messages.po b/website/locales/it/messages.po
index 0c1aff1c9..fdebe81d8 100644
--- a/website/locales/it/messages.po
+++ b/website/locales/it/messages.po
@@ -70,7 +70,7 @@ msgstr "Di N0zoM1z0 * 10 ottobre 2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4809,7 +4809,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "Copia leggi gli script caricati"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "Torna in alto"
@@ -11797,7 +11797,7 @@ msgstr "Guide"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -11817,7 +11817,7 @@ msgstr "Codice sorgente"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -11837,7 +11837,7 @@ msgstr "Licenza MIT"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -11857,7 +11857,7 @@ msgstr "Unisciti alla community"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -12801,6 +12801,24 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "Passa alla modalità scura"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"Per esaminare i corpi delle richieste e delle risposte HTTP, usa "
+"{ph0}Fiddler Everywhere: acquisizioni SAZ, MCP e skill pubbliche{ph1}. "
+"Esporta SAZ o HAR 1.2 per ottenere Evidence delle acquisizioni in REA "
+"offline, oppure collega il server MCP di Everywhere per esaminare il "
+"traffico acquisito con il tuo agente."
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "Guida all’installazione"
diff --git a/website/locales/ja/messages.po b/website/locales/ja/messages.po
index 8f23848c6..10ed8ee27 100644
--- a/website/locales/ja/messages.po
+++ b/website/locales/ja/messages.po
@@ -69,7 +69,7 @@ msgstr "によってN0zoM1z0•10 10月2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4440,7 +4440,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "ロードされたスクリプトをコピーして読みます"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "ページ上部へ"
@@ -10971,7 +10971,7 @@ msgstr "ガイド"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -10991,7 +10991,7 @@ msgstr "ソースコード"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -11011,7 +11011,7 @@ msgstr "MIT ライセンス"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -11031,7 +11031,7 @@ msgstr "コミュニティに参加"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -11947,6 +11947,22 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "ダークモードに切り替える"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"HTTP リクエストとレスポンスの本文を調べるには、{ph0}Fiddler Everywhere:SAZ "
+"キャプチャ、MCP、公開スキル{ph1}を利用してください。SAZ ??? HAR 1.2 をエクスポートすれば REA でオフラインのキャプチャ "
+"Evidence を取得できます。また、Everywhere の MCP サーバーを接続して、エージェントと一緒に記録済みの通信を調べることもできます。"
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "セットアップガイド"
diff --git a/website/locales/ko/messages.po b/website/locales/ko/messages.po
index 62a18cf20..efcf4a708 100644
--- a/website/locales/ko/messages.po
+++ b/website/locales/ko/messages.po
@@ -68,7 +68,7 @@ msgstr "여N0zoM1z0·10 월 2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4422,7 +4422,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "로드 된 스크립트 읽기 복사"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "맨 위로"
@@ -10937,7 +10937,7 @@ msgstr "가이드"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -10957,7 +10957,7 @@ msgstr "소스 코드"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -10977,7 +10977,7 @@ msgstr "MIT 라이선스"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -10997,7 +10997,7 @@ msgstr "커뮤니티 참여"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -11911,6 +11911,22 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "다크 모드로 전환"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"HTTP 요청과 응답 본문을 살펴보려면 {ph0}Fiddler Everywhere: SAZ 캡처, MCP 및 공개 스킬{ph1}을 "
+"사용하세요. SAZ ?? HAR 1.2로 내보내면 REA에서 오프라인 캡처 Evidence를 얻을 수 있으며, Everywhere의 "
+"MCP 서버를 연결하여 에이전트와 함께 캡처된 트래픽을 살펴볼 수도 있습니다."
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "설정 가이드"
diff --git a/website/locales/messages.pot b/website/locales/messages.pot
index e5f6fea82..ab1a4a17e 100644
--- a/website/locales/messages.pot
+++ b/website/locales/messages.pot
@@ -131,7 +131,7 @@ msgstr ""
#: website/public/examples/dino-lab/index.html:467 website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490 website/public/guides/index.html:274
+#: website/public/guides/browser/index.html:499 website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
#: website/public/showcase/aegis/index.html:800
@@ -148,7 +148,7 @@ msgstr ""
#: website/public/examples/dino-lab/index.html:468 website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491 website/public/guides/index.html:275
+#: website/public/guides/browser/index.html:500 website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
#: website/public/showcase/aegis/index.html:801
@@ -165,7 +165,7 @@ msgstr ""
#: website/public/examples/dino-lab/index.html:469 website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492 website/public/guides/index.html:276
+#: website/public/guides/browser/index.html:501 website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
#: website/public/showcase/aegis/index.html:802
@@ -182,7 +182,7 @@ msgstr ""
#: website/public/examples/dino-lab/index.html:470 website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493 website/public/guides/index.html:277
+#: website/public/guides/browser/index.html:502 website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
#: website/public/showcase/aegis/index.html:803
@@ -201,7 +201,7 @@ msgstr ""
#: website/public/examples/dino-lab/index.html:475 website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498 website/public/guides/index.html:282
+#: website/public/guides/browser/index.html:507 website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
#: website/public/showcase/aegis/index.html:808
@@ -4299,6 +4299,18 @@ msgid ""
"workflow{ph1} to follow files and process boundaries."
msgstr ""
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ captures, MCP "
+"and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA capture Evidence, or "
+"connect Everywhere's MCP server to inspect captured traffic with your agent."
+msgstr ""
+
#: website/public/guides/browser/index.html:6
msgctxt "page:guides/browser/index.html"
msgid "Browser and Network Analysis — REA"
@@ -4346,7 +4358,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr ""
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr ""
diff --git a/website/locales/pl/messages.po b/website/locales/pl/messages.po
index 2c80f47bd..3a6657178 100644
--- a/website/locales/pl/messages.po
+++ b/website/locales/pl/messages.po
@@ -70,7 +70,7 @@ msgstr "Przez N0zoM1z0 * 10 października 2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4754,7 +4754,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "Kopiuj przeczytaj załadowane Skrypty"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "Do góry"
@@ -11703,7 +11703,7 @@ msgstr "Poradniki"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -11723,7 +11723,7 @@ msgstr "Kod źródłowy"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -11743,7 +11743,7 @@ msgstr "Licencja MIT"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -11763,7 +11763,7 @@ msgstr "Dołącz do społeczności"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -12706,6 +12706,23 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "Przełącz na ciemny motyw"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"Aby zbadać treść żądań i odpowiedzi HTTP, użyj {ph0}Fiddler Everywhere: "
+"zapisów SAZ, MCP i publicznych umiejętności{ph1}. Wyeksportuj SAZ lub HAR "
+"1.2, aby uzyskać Evidence z zapisu w REA offline, lub połącz serwer MCP "
+"Everywhere, aby analizować zapisany ruch z agentem."
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "Instrukcja instalacji"
diff --git a/website/locales/pt-BR/messages.po b/website/locales/pt-BR/messages.po
index 0e1b8a3a3..a0741271d 100644
--- a/website/locales/pt-BR/messages.po
+++ b/website/locales/pt-BR/messages.po
@@ -70,7 +70,7 @@ msgstr "Por N0zoM1z0 * 10 de outubro de 2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4793,7 +4793,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "Copiar ler os scripts carregados"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "Voltar ao topo"
@@ -11780,7 +11780,7 @@ msgstr "Guias"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -11800,7 +11800,7 @@ msgstr "Código-fonte"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -11820,7 +11820,7 @@ msgstr "Licença MIT"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -11840,7 +11840,7 @@ msgstr "Participe da comunidade"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -12780,6 +12780,24 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "Alternar para o modo escuro"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"Para examinar os corpos das requisições e respostas HTTP, use {ph0}Fiddler "
+"Everywhere: capturas SAZ, MCP e habilidades públicas{ph1}. Exporte SAZ ou "
+"HAR 1.2 para obter Evidence das capturas no REA offline, ou conecte o "
+"servidor MCP do Everywhere para inspecionar o tráfego capturado com seu "
+"agente."
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "Guia de instalação"
diff --git a/website/locales/ru/messages.po b/website/locales/ru/messages.po
index 4349d04ef..9f0486916 100644
--- a/website/locales/ru/messages.po
+++ b/website/locales/ru/messages.po
@@ -70,7 +70,7 @@ msgstr "Автор: N0zoM1z0 · 10 октября 2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4804,7 +4804,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "Копировать читать загруженные скрипты"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "Наверх"
@@ -11817,7 +11817,7 @@ msgstr "Руководства"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -11837,7 +11837,7 @@ msgstr "Исходный код"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -11857,7 +11857,7 @@ msgstr "Лицензия MIT"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -11877,7 +11877,7 @@ msgstr "Вступить в сообщество"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -12822,6 +12822,24 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "Переключить на тёмную тему"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"Для изучения тел запросов и ответов HTTP используйте {ph0}Fiddler "
+"Everywhere: захваты SAZ, MCP и общедоступные навыки{ph1}. Экспортируйте SAZ "
+"??? HAR 1.2 для получения Evidence захвата в REA без подключения к сети или "
+"подключите MCP-сервер Everywhere, чтобы исследовать записанный трафик вместе"
+" с агентом."
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "Руководство по установке"
diff --git a/website/locales/th/messages.po b/website/locales/th/messages.po
index 2fab386ea..94e6d1873 100644
--- a/website/locales/th/messages.po
+++ b/website/locales/th/messages.po
@@ -70,7 +70,7 @@ msgstr "โดย N0zoM1z0 ·10 ตุลาคม 2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4674,7 +4674,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "คัดลอกอ่านสคริปต์ที่โหลด"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "กลับขึ้นด้านบน"
@@ -11461,7 +11461,7 @@ msgstr "คู่มือ"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -11481,7 +11481,7 @@ msgstr "ซอร์สโค้ด"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -11501,7 +11501,7 @@ msgstr "สัญญาอนุญาต MIT"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -11521,7 +11521,7 @@ msgstr "เข้าร่วมชุมชน"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -12459,6 +12459,24 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "เปลี่ยนเป็นโหมดมืด"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"หากต้องการตรวจสอบเนื้อหาคำขอและคำตอบ HTTP ให้ใช้ {ph0}Fiddler Everywhere: "
+"ข้อมูลที่บันทึกในรูปแบบ SAZ, MCP และทักษะสาธารณะ{ph1} ส่งออกเป็น SAZ ???? "
+"HAR 1.2 เพื่อรับ Evidence จากข้อมูลที่บันทึกใน REA แบบออฟไลน์ "
+"หรือเชื่อมต่อเซิร์ฟเวอร์ MCP ของ Everywhere "
+"เพื่อตรวจสอบทราฟฟิกที่บันทึกไว้ร่วมกับเอเจนต์ของคุณ"
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "คู่มือการติดตั้ง"
diff --git a/website/locales/tr/messages.po b/website/locales/tr/messages.po
index 7de2f7e5a..e4d0ba4a0 100644
--- a/website/locales/tr/messages.po
+++ b/website/locales/tr/messages.po
@@ -71,7 +71,7 @@ msgstr "Başlangıç N0zoM1z0 * 10 Ekim 2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4754,7 +4754,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "Kopyala yüklenen komut dosyalarını oku"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "Başa dön"
@@ -11690,7 +11690,7 @@ msgstr "Rehberler"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -11710,7 +11710,7 @@ msgstr "Kaynak kod"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -11730,7 +11730,7 @@ msgstr "MIT lisansı"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -11750,7 +11750,7 @@ msgstr "Topluluğa katıl"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -12688,6 +12688,24 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "Koyu temaya geç"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"HTTP istek ve yanıt gövdelerini incelemek için {ph0}Fiddler Everywhere: SAZ "
+"kayıtları, MCP ve herkese açık beceriler{ph1} rehberini kullanın. REA ile "
+"çevrimdışı kayıt Evidence elde etmek için SAZ veya HAR 1.2 dışa aktarın veya"
+" kaydedilen trafiği ajanınızla incelemek için Everywhere MCP sunucusunu "
+"bağlayın."
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "Kurulum rehberi"
diff --git a/website/locales/uk/messages.po b/website/locales/uk/messages.po
index ddd250d24..a5fae5c80 100644
--- a/website/locales/uk/messages.po
+++ b/website/locales/uk/messages.po
@@ -70,7 +70,7 @@ msgstr "Автор: N0zoM1z0 · 10 жовтня 2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4780,7 +4780,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "Копіювати читати завантажені скрипти"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "Нагору"
@@ -11769,7 +11769,7 @@ msgstr "Посібники"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -11789,7 +11789,7 @@ msgstr "Вихідний код"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -11809,7 +11809,7 @@ msgstr "Ліцензія MIT"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -11829,7 +11829,7 @@ msgstr "Приєднатися до спільноти"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -12773,6 +12773,24 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "Перемкнути на темну тему"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"Для дослідження тіл запитів і відповідей HTTP використовуйте {ph0}Fiddler "
+"Everywhere: захоплення SAZ, MCP і загальнодоступні навички{ph1}. Експортуйте"
+" SAZ ??? HAR 1.2 для отримання Evidence захоплення в REA без підключення до "
+"мережі або підключіть MCP-сервер Everywhere, щоб досліджувати записаний "
+"трафік разом з агентом."
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "Посібник зі встановлення"
diff --git a/website/locales/vi/messages.po b/website/locales/vi/messages.po
index 3aa144d2f..d9dd57fb0 100644
--- a/website/locales/vi/messages.po
+++ b/website/locales/vi/messages.po
@@ -70,7 +70,7 @@ msgstr "Bởi N0zoM1z0 * 10 tháng mười 2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4764,7 +4764,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "Sao chép đọc các tập lệnh đã tải"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "Về đầu trang"
@@ -11679,7 +11679,7 @@ msgstr "Hướng dẫn"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -11699,7 +11699,7 @@ msgstr "Mã nguồn"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -11719,7 +11719,7 @@ msgstr "Giấy phép MIT"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -11739,7 +11739,7 @@ msgstr "Tham gia cộng đồng"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -12675,6 +12675,23 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "Chuyển sang giao diện tối"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"Để kiểm tra phần thân yêu cầu và phản hồi HTTP, hãy dùng {ph0}Fiddler "
+"Everywhere: bản ghi SAZ, MCP và kỹ năng công khai{ph1}. Xuất SAZ ho?c HAR "
+"1.2 để lấy Evidence từ bản ghi trong REA ngoại tuyến, hoặc kết nối máy chủ "
+"MCP của Everywhere để kiểm tra lưu lượng đã ghi cùng trợ lý của bạn."
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "Hướng dẫn cài đặt"
diff --git a/website/locales/zh-CN/messages.po b/website/locales/zh-CN/messages.po
index b9350e625..91728965c 100644
--- a/website/locales/zh-CN/messages.po
+++ b/website/locales/zh-CN/messages.po
@@ -68,7 +68,7 @@ msgstr "通过N0zoM1z0*10十月2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4237,7 +4237,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "复制读取加载的脚本"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "回到顶部"
@@ -10700,7 +10700,7 @@ msgstr "指南"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -10720,7 +10720,7 @@ msgstr "源代码"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -10740,7 +10740,7 @@ msgstr "MIT 许可证"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -10760,7 +10760,7 @@ msgstr "加入社区"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -11666,6 +11666,21 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "切换到深色模式"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"要检查 HTTP 请求和响应正文,请使用{ph0}Fiddler Everywhere:SAZ 捕获、MCP 和公开技能{ph1}。导出 SAZ ? "
+"HAR 1.2 可在 REA 中离线获取捕获 Evidence,也可以连接 Everywhere 的 MCP 服务器,让智能体检查已捕获的流量。"
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "安装指南"
diff --git a/website/locales/zh-TW/messages.po b/website/locales/zh-TW/messages.po
index 98984f130..875779f14 100644
--- a/website/locales/zh-TW/messages.po
+++ b/website/locales/zh-TW/messages.po
@@ -68,7 +68,7 @@ msgstr "透過N0zoM1z0*10十月2026"
#: website/public/faq/index.html:573
#: website/public/first-investigation/index.html:523
#: website/public/get-started/index.html:882
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
#: website/public/guides/index.html:282
#: website/public/guides/javascript/index.html:503
#: website/public/guides/native/index.html:509 website/public/index.html:1191
@@ -4252,7 +4252,7 @@ msgctxt "page:guides/browser/index.html"
msgid "Copy read the loaded scripts"
msgstr "複製讀取載入的指令碼"
-#: website/public/guides/browser/index.html:498
+#: website/public/guides/browser/index.html:507
msgctxt "page:guides/browser/index.html"
msgid "Back to top"
msgstr "回到頂部"
@@ -10719,7 +10719,7 @@ msgstr "指南"
#: website/public/faq/index.html:565
#: website/public/first-investigation/index.html:515
#: website/public/get-started/index.html:874
-#: website/public/guides/browser/index.html:490
+#: website/public/guides/browser/index.html:499
#: website/public/guides/index.html:274
#: website/public/guides/javascript/index.html:495
#: website/public/guides/native/index.html:501 website/public/index.html:1183
@@ -10739,7 +10739,7 @@ msgstr "原始碼"
#: website/public/faq/index.html:566
#: website/public/first-investigation/index.html:516
#: website/public/get-started/index.html:875
-#: website/public/guides/browser/index.html:491
+#: website/public/guides/browser/index.html:500
#: website/public/guides/index.html:275
#: website/public/guides/javascript/index.html:496
#: website/public/guides/native/index.html:502 website/public/index.html:1184
@@ -10759,7 +10759,7 @@ msgstr "MIT 許可證"
#: website/public/faq/index.html:567
#: website/public/first-investigation/index.html:517
#: website/public/get-started/index.html:876
-#: website/public/guides/browser/index.html:492
+#: website/public/guides/browser/index.html:501
#: website/public/guides/index.html:276
#: website/public/guides/javascript/index.html:497
#: website/public/guides/native/index.html:503 website/public/index.html:1185
@@ -10779,7 +10779,7 @@ msgstr "加入社群"
#: website/public/faq/index.html:568
#: website/public/first-investigation/index.html:518
#: website/public/get-started/index.html:877
-#: website/public/guides/browser/index.html:493
+#: website/public/guides/browser/index.html:502
#: website/public/guides/index.html:277
#: website/public/guides/javascript/index.html:498
#: website/public/guides/native/index.html:504 website/public/index.html:1186
@@ -11686,6 +11686,21 @@ msgctxt "runtime"
msgid "Switch to dark mode"
msgstr "切換至深色模式"
+#. {ph0}:
+#. {ph1}:
+#: website/public/guides/browser/index.html:480
+#, python-brace-format
+msgctxt "page:guides/browser/index.html"
+msgid ""
+"For HTTP request and response bodies, use {ph0}Fiddler Everywhere: SAZ "
+"captures, MCP and public skills{ph1}. Export SAZ or HAR 1.2 for offline REA "
+"capture Evidence, or connect Everywhere's MCP server to inspect captured "
+"traffic with your agent."
+msgstr ""
+"若要檢查 HTTP 請求與回應本文,請使用{ph0}Fiddler Everywhere:SAZ 擷取、MCP 與公開技能{ph1}。匯出 SAZ ? "
+"HAR 1.2 可在 REA 中離線取得擷取 Evidence,也可以連接 Everywhere 的 MCP 伺服器,讓代理檢查已擷取的流量。"
+
#~ msgctxt "page:index.html"
#~ msgid "Setup guide"
#~ msgstr "安裝指南"
diff --git a/website/public/guides/browser/index.html b/website/public/guides/browser/index.html
index 6437873c2..60185ddb6 100644
--- a/website/public/guides/browser/index.html
+++ b/website/public/guides/browser/index.html
@@ -477,6 +477,15 @@ link.click();
application workflow to follow files
and process boundaries.
+
+ For HTTP request and response bodies, use
+ Fiddler Everywhere: SAZ captures, MCP and public skills. Export SAZ or HAR 1.2 for offline REA capture Evidence, or
+ connect Everywhere's MCP server to inspect captured traffic with
+ your agent.
+