toolpath-convo
Provider-agnostic conversation types and traits for AI coding tools.
This crate defines a common vocabulary for representing conversations from any AI coding assistant (Claude, Codex, OpenCode, etc.) without coupling consumer code to provider-specific data formats.
Overview
Types define the common data model:
| Type | What it represents |
|---|---|
Turn |
A single conversational turn (text, thinking, tool uses, model, tokens) |
Role |
Who produced the turn: User, Assistant, System, Other(String) |
ConversationView |
A complete conversation: ordered turns + timestamps |
ConversationMeta |
Lightweight metadata (no turns loaded) |
ToolInvocation |
A tool call within a turn |
ToolResult |
The result of a tool call |
TokenUsage |
Input/output token counts |
WatcherEvent |
Either a Turn or a Progress event |
Traits define how providers expose their data:
| Trait | What it does |
|---|---|
ConversationProvider |
List and load conversations from any source |
ConversationWatcher |
Poll for new conversational events |
Usage
use ;
// Provider crates implement ConversationProvider.
// Consumer code works against the trait:
Provider implementations
| Provider | Crate |
|---|---|
| Claude Code | toolpath-claude |
Part of Toolpath
This crate is part of the Toolpath workspace. See also:
toolpath-- core provenance types and query APItoolpath-claude-- Claude conversation providertoolpath-git-- derive from git historytoolpath-dot-- Graphviz DOT renderingtoolpath-cli-- unified CLI (cargo install toolpath-cli)- RFC -- full format specification