Skip to main content

Module derive

Module derive 

Source
Expand description

Shared derivation: ConversationViewtoolpath::v1::Path.

Provider-agnostic mapping used by the Pi, Claude, and future conversation providers. Takes a ConversationView and emits a Path document with one step per turn and a conversation.append structural change carrying the turn’s text, thinking, tool uses, and token usage.

Structs§

DeriveConfig
Configuration for derive_path.

Functions§

derive_path
Derive a Path from a ConversationView.
file_write_diff
Compute a unified diff string for a file-write tool invocation, given the raw tool input JSON. Handles Claude’s Edit / Write / MultiEdit / NotebookEdit shapes; returns None for any unrecognised shape or if nothing to diff.
unified_diff
Produce a minimal unified-diff string using similar::TextDiff.