Expand description
§Toolpath Claude
Derive Toolpath provenance documents from Claude conversation logs.
This crate absorbs the claude_convo library and adds a derive module
for mapping Claude conversations to Toolpath Path documents.
§Overview
Claude stores conversation data in JSONL files within ~/.claude/projects/. This library provides:
- Type-safe structures for conversations and messages
- Convenient APIs for reading conversation history
- Query capabilities for filtering and searching messages
- Derivation of Toolpath Path documents from conversation logs
§Quick Start
use toolpath_claude::{ClaudeConvo, ConversationQuery};
// Create a conversation manager
let manager = ClaudeConvo::new();
// List all projects with conversations
let projects = manager.list_projects().unwrap();
// Read a specific conversation
let convo = manager.read_conversation(
"/Users/alice/project",
"session-uuid-123"
).unwrap();
// Query messages
let query = ConversationQuery::new(&convo);
let user_messages = query.by_role(toolpath_claude::MessageRole::User);
// Derive a Toolpath Path from the conversation
let config = toolpath_claude::derive::DeriveConfig::default();
let path = toolpath_claude::derive::derive_path(&convo, &config);Re-exports§
pub use async_watcher::AsyncConversationWatcher;pub use async_watcher::WatcherConfig;pub use async_watcher::WatcherHandle;pub use error::ConvoError;pub use error::Result;pub use io::ConvoIO;pub use paths::PathResolver;pub use query::ConversationQuery;pub use query::HistoryQuery;pub use reader::ConversationReader;pub use types::CacheCreation;pub use types::ContentPart;pub use types::Conversation;pub use types::ConversationEntry;pub use types::ConversationMetadata;pub use types::HistoryEntry;pub use types::Message;pub use types::MessageContent;pub use types::MessageRole;pub use types::ToolResultContent;pub use types::Usage;pub use watcher::ConversationWatcher;
Modules§
- async_
watcher - Async Conversation Watcher
- derive
- Derive Toolpath documents from Claude conversation logs.
- error
- io
- paths
- query
- reader
- types
- watcher
- Conversation watching/tailing functionality.
Structs§
- Claude
Convo - High-level interface for reading Claude conversations.