cass

DocsInternals

The Connector Interface (Polymorphism)

The system is designed for extensibility via the Connector trait (src/connectors/mod.rs). This allows cass to treat disparate log formats as a uniform stream of events.

Mermaid diagram source
classDiagram
 class Connector {
 <<interface>>
 +detect() DetectionResult
 +scan(ScanContext) Vec~NormalizedConversation~
 }
 class NormalizedConversation {
 +agent_slug String
 +messages Vec~NormalizedMessage~
 }

 Connector <|-- ClaudeCodeConnector
 Connector <|-- CodexConnector
 Connector <|-- CursorConnector

 ClaudeCodeConnector ..> NormalizedConversation : emits
 CodexConnector ..> NormalizedConversation : emits
 CursorConnector ..> NormalizedConversation : emits

 note "35 connectors are registered at runtime; cass capabilities --json lists them"
  • Polymorphic Scanning: The indexer runs connector factories in parallel via rayon, creating fresh Box<dyn Connector> instances that are unaware of each other's underlying file formats (JSONL, SQLite, specialized JSON).
  • Resilient Parsing: Connectors handle legacy formats (e.g., integer vs ISO timestamps) and flatten complex tool-use blocks into searchable text.