oc_evidence_bundle
Capture a snapshot of the current page state including DOM, screenshot, network, and console, then bundle it into a directory for later analysis.
Instructions
Capture a snapshot of the current page state (DOM, screenshot, network slice, console, perceptual hash) and write it to a bundle directory. Returns { bundle_id, path, size_bytes, parts }. Default include = ['dom', 'screenshot']; pass include to capture more parts. network_window_ms (default 5000) limits the network slice to recent entries. Core-tier; does not depend on the pilot runtime.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include | No | Parts to capture. Default ['dom', 'screenshot']. Allowed: dom, screenshot, network, console, contract_facts, phash, gate, schema_diff. gate requires evidence.snapshot.gate; schema_diff requires target_schema and evidence.snapshot.observed. Missing inputs omit that part. | |
| evidence | No | Caller-supplied snapshot. Provide the subset of fields the requested parts need: `dom`, `screenshot_png_base64`, `network`, `console`, `contract_facts`, `now_ms`, `gate`, `observed`. Missing fields cause the corresponding part to be omitted gracefully. | |
| output_mode | No | "inline" (default): return the full payload in-band — byte-identical to v1.11.0. "handle": write payload to the handle store and return a small descriptor; redeem with oc_output_fetch. "auto": inline if payload ≤ output_inline_limit_bytes, otherwise handle. | |
| target_schema | No | Declared target schema (see src/core/contracts/schema-diff.ts: { version: 1, fields: [ { name, type, required? } ] }). When supplied together with `evidence.snapshot.observed` and the 'schema_diff' part is included, the bundle writes `schema_diff.json` containing the structured field-match diff. | |
| network_window_ms | No | Rolling window (ms) used to slice the supplied `evidence.snapshot.network` array. Default 5000. | |
| output_inline_limit_bytes | No | Only honored when output_mode="auto". If the serialized payload exceeds this byte count the response spills to a handle. Default: 32768. |