Skip to main content

Module index

Module index 

Source
Expand description

In-memory session index built from adapter discovery.

Structs§

HistorySearchHit
One match.
HistorySearchOptions
Query parameters for [SessionIndex::search_sessions].
HistorySearchOutcome
Result of a bounded search.
MetaCacheFile 🔒
MetaCacheFileRef 🔒
SearchCandidate 🔒
A session a search may open.
SessionIndex
In-memory index of discovered sessions.
UnreadableSession
A candidate session the search could not read.

Enums§

Attribution 🔒
Why a session is the caller’s.
FirstBuild
Outcome of SessionIndex::try_first_build.
Source 🔒
Where a searched session’s content comes from.

Constants§

DISCOVERY_ERRORS_LISTED 🔒
At most this many discovery errors are listed in a search’s answer.
META_CACHE_VERSION 🔒
Format version of the saved metadata cache (SessionIndex::with_cache_file). Bump when SessionMeta or what extract_meta derives changes meaning, so a stale file is rebuilt rather than trusted.
META_CACHE_WRITE_INTERVAL_MS 🔒
The saved metadata cache is rewritten at most this often (when changed).
SNIPPET_LEAD_CHARS 🔒
Characters of leading context kept before the match inside a snippet.
SNIPPET_MAX_CHARS 🔒
Max characters of matched text returned per hit.

Functions§

default_isolated_roots 🔒
AgentMux-ISOLATED provider-home roots under which delete/clear is permitted: <shared>/providers/ and <shared>/identities/. Anything outside these (the user’s personal ~/.claude / ~/.config/claude-*) is OFF-LIMITS so a “clear all” can never nuke transcripts AgentMux didn’t create.
find_case_insensitive 🔒
Case-insensitive substring search returning a byte offset into the original haystack, not into a lowercased copy of it.
match_message 🔒
Every match within one message: its prose, plus each tool call.
normalize_working_dir 🔒
Normalize a working directory for use as an index key.
search_candidates 🔒
Search message content and tool calls across a chosen set of sessions, whose content load reads — from a provider transcript or from AgentMux’s record. See [SessionIndex::search_sessions] for why stopping early is always reported.
snippet_around 🔒
Bound a matched region to something a caller can actually read, keeping a little context before the match so the hit is interpretable.
tool_name_matches 🔒
Whether a recorded tool name is the tool the caller named. Claude records an MCP tool with its server prefix (mcp__agentmux__SendMessage) while callers — and SearchHistory’s own schema — name it bare (SendMessage), so both forms match. Case-insensitive.
within_window 🔒
Whether a message falls inside the caller’s time window. A message with no timestamp (0) can’t be placed outside it, and dropping it could only hide evidence, so it’s kept.