Expand description
In-memory session index built from adapter discovery.
Structs§
- History
Search Hit - One match.
- History
Search Options - Query parameters for [
SessionIndex::search_sessions]. - History
Search Outcome - Result of a bounded search.
- Meta
Cache 🔒File - Meta
Cache 🔒File Ref - Search
Candidate 🔒 - A session a search may open.
- Session
Index - In-memory index of discovered sessions.
- Unreadable
Session - A candidate session the search could not read.
Enums§
- Attribution 🔒
- Why a session is the caller’s.
- First
Build - 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 whenSessionMetaor whatextract_metaderives 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
loadreads — 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.