Skip to main content

Module inspector

Module inspector 

Source
Expand description

Inspector capture types — ConsoleEntry, NetworkEntry, ring buffer + level/status enums.

Engine implementations capture these in always-on ring buffers (bounded; FIFO eviction). The agent reads them via the vs_inspect primitive (M5.7 PR2+).

WebKit Inspector protocol is internal only — it never appears on the agent-facing wire. See ADR 0008.

Structs§

ConsoleEntry
One captured console event.
DomDetail
Detail returned by Engine::dom: outer HTML + computed-style pairs for one ref.
Header
One request/response header pair, captured for vs_inspect request.
NetworkEntry
One captured network event.
PerformanceMetrics
Web Vitals + heap + DOM-stat block returned by Engine::performance. Floats use 2 decimals on the wire; missing metrics are emitted as 0 rather than dropped (keeps the line shape stable).
RequestDetail
Full detail for one captured network request — headers + bodies for both the request and response. Returned by crate::Engine::request_detail when the agent calls vs_inspect request <id>.
RingBuffer
Bounded FIFO ring buffer for inspector captures. Adding to a full buffer evicts the oldest entry. Reads return a snapshot in chronological order (oldest first).
ScriptEntry
One loaded script in Engine::scripts.
ScriptSource
Source of one script (returned by Engine::script_source).
StorageEntry
One entry returned by Engine::storage. Cookies use the optional flag fields; key/value stores use only key and value; IndexedDB uses key (db name) and value (version + object store names joined). The agent doesn’t need a sum type — a uniform shape keeps the wire format simple.

Enums§

ConsoleLevel
Console levels observable by vs_inspect console. Mirrors the browser’s console.<level>(...) family plus the synthetic error level we use for uncaught exceptions and unhandled rejections.
EvalResult
Result of Engine::eval_js. The Ok variant carries a JSON- serialized value (or empty for undefined/null); errors are distinguished by kind so the agent can react differently to a thrown exception vs. a SyntaxError vs. a binding/IO failure.
NetworkStatus
Status of a captured network request.
ScriptState
StorageScope
Storage scope for Engine::storage.

Constants§

DEFAULT_BUFFER_CAPACITY
Default ring-buffer capacity per kind, per page. Configurable via Daemon::with_inspector_buffer_capacity.