Skip to main content

Crate plannotator_tui_hosts

Crate plannotator_tui_hosts 

Source
Expand description

Find a coding agent’s transcript on disk and read its recent rendered messages.

Everything here is pure over strings, slices, and injected directories: no ~, no environment reads, no spawned processes. The binary passes in sessions_dir, projects_dir, a process-table snapshot, and an env lookup. The rules come from Plannotator’s last implementation (see docs/decisions.md, decision 9).

Modules§

claude
Claude Code: ~/.claude/sessions/<pid>.json names a running session, and ~/.claude/projects/<slug>/<session>.jsonl is its transcript.
codex
Codex: $CODEX_HOME/sessions/YYYY/MM/DD/rollout-<timestamp>-<thread>.jsonl.
copilot
GitHub Copilot CLI: $COPILOT_HOME/session-state/<uuid>/ holds events.jsonl, workspace.yaml (a cwd: line) and, while the session runs, inuse.<pid>.lock.
droid
Droid (Factory): $FACTORY_CONFIG_DIR/sessions/<slug>/<session>.jsonl, where the slug is Claude Code’s rule for a cwd and the entries are Claude’s shape with id/parentId.
pi
Pi (pi-mono coding agent): <sessions>/--<encoded cwd>--/<timestamp>_<uuid>.jsonl.

Structs§

Message
One rendered message: every text block that shares the host’s message id, in order.
SessionMeta
~/.claude/sessions/<pid>.json: one running Claude Code session.

Enums§

Host
A supported agent host.
HostError
Role

Functions§

detect_host
Which host launched us, from the environment. PLANNOTATOR_TUI_HOST overrides when it names a known host; then the hosts’ own markers, in Plannotator’s order; then Claude Code.