Skip to main content

Crate second_brain_adapters

Crate second_brain_adapters 

Source

Modules§

claude_code
claude_memory
cursor
session_evidence

Structs§

ConversationSource
ExtractedEntity
IngestResult
StoreOutcome

Traits§

Adapter
IngestStore
The store surface store_ingest_result writes through. Every StoreAdmin has it through the blanket impl below; tests implement it directly to inject failing writes.

Functions§

project_slug
The project a transcript belongs to is the directory directly under the adapter’s projects root. Nothing below that level is a project: Claude Code nests subagent transcripts as <session>/subagents/*.jsonl and Cursor nests its own as agent-transcripts/<session>/*.jsonl, so the file’s parent directory names the wrong thing for both.
store_ingest_result
Persists one adapter result: every memory whose id is not already stored or tombstoned and whose first 128 characters are not already stored (embedded first when an embedder is given), its conversation once one of them lands and only if absent, a derived_from edge per stored memory, and a mentions edge per entity whose memory actually landed. Write failures are counted in the outcome rather than returned, so one bad row does not cost the rest.