Skip to main content

Module archive

Module archive 

Source
Expand description

Conversation archival — converts conversations into persistent markdown archives.

Supports two input paths:

  1. JSONL hook — called directly by Claude Code SessionEnd hook (standalone)
  2. Pulse-null — called with in-memory Messages (behind feature flag)

Both converge into archive_conversation() which writes the markdown file, updates ARCHIVE.md, and appends to EPHEMERAL.md.

Structs§

ArchiveResult
Result of archiving a conversation — used by callers for graph ingestion.
SessionMetadata
Session metadata provided by the caller.

Functions§

append_index
Append an entry to ARCHIVE.md (markdown table row).
archive_all_unarchived
Archive all unarchived JSONL transcripts found under ~/.claude/projects/.
archive_all_with_base
archive_conversation
Archive a conversation from internal types.
archive_from_jsonl
Archive a session from a JSONL transcript file.
graph_ingest
Ingest an archive result into the knowledge graph (if enabled).
highest_conversation_number
Scan conversations/ for highest conversation-NNN number. Returns 0 if none.
pipeline_sync_on_archive
Sync pipeline documents into the graph (if auto_sync enabled).
run_from_hook
Main archive-session flow, called from the SessionEnd hook. Reads hook input from stdin.