Expand description
Free-standing parsing/path utilities used by the rest of subagent_watcher
— none of these need &self. Covers: JSONL line parsing, journal-count
reading, workflow/session id derivation from a path, the block-delete
cascade subscriber, and Claude config dir resolution.
Functions§
- derive_
claude_ config_ dir - Derive the Claude Code config directory for a host agent. Only matches
reality for an agent with an explicit per-account auth dir —
prefer
resolve_claude_config_dirwhen the block’s meta is available. - resolve_
claude_ config_ dir - The authoritative Claude Code config directory for a block.
- spawn_
block_ prune_ subscriber - Subscribe to the reducer’s
srv_events_txbroadcast and prunewatcher’s per-block state onEvent::BlockDeleted/TabDeleted/WorkspaceDeleted— the robust backstop described onSubagentWatcher::prune_block’s doc comment. Mirrorscrates/cef/src/srv_ipc.rs’s cascaded-block-id extraction (same three-arm match, same rationale:TabDeleted/WorkspaceDeletednever emit a per-block event of their own — seereducer/tab.rs::handle_delete_tab’s doc comment — soblock_idsis the only signal for a block that cascaded out via its tab/workspace) andserver/mux_obj_bridge.rs::run_mux_obj_bridge’s subscribe-loop plumbing (lag/close handling).