Skip to main content

Module dock_snapshot

Module dock_snapshot 

Source
Expand description

In-memory, latest-per-block cache of Activity Dock ToolNode status deltas, pushed from the frontend as they happen. Backs muxspect dock (read) and muxspect dock clear (write).

See docs/specs/SPEC_MUXSPECT_DOCK_DIAGNOSIS_AND_REMEDIATION_2026_08_06.md §3.1. Never persisted — this mirrors the dock’s own nature: if no renderer is currently attached to a block, there is nothing live to report, and losing this cache on restart is correct, not a bug.

Structs§

DockNodeSnapshot
One ToolNode’s last-known status, as reported by the renderer that owns it. observed_at is stamped on receipt by the server (not trusted from the client) so muxspect dock’s age computation is consistent even if the renderer’s clock is skewed.
DockSnapshotCache

Constants§

MAX_NODE_AGE_MS 🔒
Defense-in-depth cap on how long an entry can survive without a fresh push before get() evicts it, regardless of status. The real fix for “an already-resolved node never gets reported” is pushing the resolution back (see agent-document-store.ts’s pushResolvedDockNodes, wired for every known resolution path — streaming AND the SessionEnd/HistoryLoaded/HistoryRestored/ScrubOrphanedInProgress scrub paths). This is the backstop for any path that isn’t one of those (reagentx P1 on PR #2432 flagged the total absence of any bound at all — evict_block existed for whole-block removal but nothing time-based existed per-node). One hour comfortably exceeds any legitimate single tool-call duration.

Type Aliases§

BlockNodes 🔒
One block’s tracked nodes, keyed by node id so a later delta for the same node overwrites rather than accumulates.