Skip to main content

Module connectors

Module connectors 

Source
Expand description

Connectors for agent histories.

All connector implementations live in franken_agent_detection. This module provides re-export stubs for backward-compatible import paths.

Modules§

aider
Connector for Aider session logs.
amp
Implementation lives in franken_agent_detection::connectors::amp.
chatgpt
Implementation lives in franken_agent_detection::connectors::chatgpt.
claude_code
Compatibility shim for the Claude Code connector.
clawdbot
Connector for Clawdbot session logs.
cline
Implementation lives in franken_agent_detection::connectors::cline.
codex
copilot
Connector for GitHub Copilot Chat session logs.
copilot_cli
Connector for GitHub Copilot CLI (gh copilot) event logs.
crush
Connector for Charm’s Crush AI coding agent sessions.
cursor
Connector for Cursor session logs.
factory
Connector for Factory session logs.
gemini
Connector for Gemini session logs.
hermes
Connector for Hermes Agent session storage.
kimi
Connector for Kimi Code (Moonshot AI) session logs.
openclaw
Implementation lives in franken_agent_detection::connectors::openclaw.
opencode
Connector for OpenCode session logs.
pi_agent
Implementation lives in franken_agent_detection::connectors::pi_agent.
qwen
Connector for Qwen Code (Alibaba) session logs.
vibe
Connector for Vibe (Mistral) session logs.

Structs§

DetectionResult
High-level detection status for a connector.
DiscoveredSourceFile
A file a connector is about to consume or consult while building sessions.
ExtractedTokenUsage
Extracted token usage from a single message’s raw data.
ModelInfo
Normalized model identification.
NormalizedConversation
Normalized conversation emitted by connectors.
NormalizedMessage
NormalizedSnippet
Origin
Per-conversation provenance metadata.
PathMapping
A single path mapping rule for rewriting paths.
PathTrie
Prefix trie optimized for workspace path rewriting.
ScanContext
Shared scan context parameters.
ScanRoot
A root directory to scan with associated provenance.
WorkspaceCache
Probabilistic workspace membership cache using bloom filter for fast rejection.

Enums§

DiscoveredSourceRole
Connector-declared role for a file used during source reconstruction.
Platform
Platform hint for choosing default paths.
SourceKind
The kind/type of a source.
TokenDataSource
Quality indicator for extracted token data.

Constants§

LOCAL_SOURCE_ID
The default source ID for local conversations.

Traits§

Connector
The interface that all agent connectors implement.

Functions§

estimate_tokens_from_content
Estimate tokens from content length for agents that do not provide token data.
extract_claude_code_tokens
Extract token usage from a Claude Code message’s raw data.
extract_codex_tokens
Extract token usage from a Codex message’s raw data.
extract_tokens_for_agent
Extract token usage from a message, dispatching by agent type.
file_modified_since
Check if a file was modified since the given timestamp. Returns true if the file should be processed (modified since timestamp or no timestamp given).
flatten_content
Flatten content that may be a string or array of content blocks. Extracts text from text blocks and tool names from tool_use blocks.
franken_detection_for_connector
Best-effort detection from franken-agent-detection for supported connectors.
get_connector_factories
Get all available connector factories.
normalize_model
Normalize raw model strings into (family, tier, provider).
parse_timestamp
Parse a timestamp from either i64 milliseconds or ISO-8601 string. Returns milliseconds since Unix epoch, or None if unparseable.
reindex_messages
Re-assign sequential indices to messages starting from 0. Use this after filtering or sorting messages to ensure idx values are contiguous.