Skip to main content

Crate tracevault_cli

Crate tracevault_cli 

Source

Modules§

agent
The AI coding agent a hook invocation belongs to. Carries the two agent-specific values stamped on an outgoing StreamEventRequest: the tool name (which the server keys its adapter off) and the protocol_version. Everything else in the capture path is agent-agnostic.
api_client
billing
Detects how the agent session behind a hook invocation is billed (gateway / API key / subscription), so the server can tell real spend from subscription usage priced at API list rates.
cli
The tracevault command surface and its dispatch, shared by the tracevault binary and by visdom (which mounts it under visdom trace).
commands
config
context
credentials
The on-disk credential (~/.config/tracevault/credentials.json) and the two kinds of authentication the CLI supports.
hooks
install_state
User-level install state (VIS-1109): what this machine’s Visdom setup was last brought to, so a newer CLI knows to run its upgrade step once (commands::upgrade), and the user’s Claude Code telemetry opt-out, so nothing ever turns telemetry back on after --no-claude-telemetry.
layout
Where this CLI keeps its files, and where releases before the visdom naming kept them.
oidc
OIDC / OAuth 2.0 plumbing for interactive (human) login.
paths
pending_queue
The offline queue of a session: pending-<target>.jsonl in its session directory, one StreamEventRequest per line, holding what a hook could not send.
program
Which command the hooks this CLI installs call.
resolution
Detached/workspace-mode repo resolution: turn a filesystem path into a RepoBinding (via the path’s git remote + the server), and pick the effective binding for an event/command from the precedence chain (--path flag → subagent worktree override → session active → bound .visdom/tracing.toml). See design §2/§3/§4.
session_state
Per-session workspace-mode state: which repo a roaming/detached Claude Code session is currently bound to. Persisted outside any repo so it survives a session that changes directories. Set by tracevault repo switch (sub-plan B); read by stream/commands as a resolution fallback.
subagents
Claude Code subagent transcripts.
transcript
Tool calls in an agent’s transcript, for tracevault check (which counts them) and the stream hook (which keeps a fileless agent’s tool calls in a local log check can read).
user_default
User-level default repo binding: a session-independent binding any Claude Code session inherits when nothing more specific resolves. Set by tracevault repo switch --user (or a no-session repo switch); read by stream/repo status as the lowest-precedence tier. Lets a container bind its repo before Claude launches — no session id required.
user_project_default
User-level default project binding: a session-independent binding any Claude Code session inherits when nothing more specific resolves. Set by tracevault project switch --user (or a no-session project switch); read by project status as the lowest-precedence tier, and by the capture path: commands::stream::capture_project reads it as its last tier, so this store can decide the project an event is attributed to. Since repo-less ingest landed it can do more than that — for a session with no repo binding it is the sole reason the event ships at all (see commands::stream::attribution_for). Lets a container bind its project before Claude launches — no session id required, which is exactly why it is the tier that carries pre-clone runs.