Skip to main content

Module derive

Module derive 

Source
Expand description

Derive Toolpath documents from opencode sessions.

Each Turn becomes a Step. Every step’s change map carries:

  • One entry at opencode://<session-id> with a conversation.append structural op describing the turn’s text, thinking, and tool-call summaries.
  • Sibling entries for each file touched between the turn’s snapshot endpoints. When the snapshot git repo is on disk, ArtifactChange.raw is the real unified diff from git. Otherwise we fall back to file paths reported by tool inputs with no raw perspective.

Structs§

DeriveConfig
Configuration for deriving a Toolpath Path from an opencode session.

Functions§

derive_path
Derive a Path from a loaded opencode Session.
derive_path_with_resolver
Like derive_path but with a custom PathResolver (useful for tests with a temp data directory).
derive_project
Derive a Path from multiple sessions.