Documentation
¶
Overview ¶
Package convert renders a conversation read from one agent for another agent's writer: what the receiving agent should see (its own words and the user's as messages, the other agent's tool activity as clearly labelled text), within a budget, with a report of everything left out and a briefing at the end. It never calls a model.
Index ¶
Constants ¶
BudgetShare is the share of the target's context the converted history may use.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Briefing ¶
type Briefing struct {
FromVersion string
SourceID string
SourceLoc string
TargetLoc string
When time.Time
Branch string
Head string // the commit at transfer time
Dirty int
Plan []ir.PlanEntry
Missing []string // differences in instructions, skills, MCP servers
ToolNames string // the target's own tool names, to use instead of the history's
Note string // a handoff note the source agent wrote, if any
Rules []Rules // the user's instructions for every project, carried when asked
}
Briefing is what the receiving agent is told at the end of the history.
type Report ¶
type Report struct {
Fidelity Fidelity `json:"fidelity"`
Budget int `json:"budgetTokens"`
Used int `json:"usedTokens"`
Messages int `json:"messages"`
ToolCalls int `json:"toolCalls"`
NativeCalls int `json:"nativeCalls,omitempty"`
Reasoning int `json:"reasoningDropped"`
Attachments int `json:"attachmentsAsPlaceholders,omitempty"`
Truncated int `json:"outputsShortened"`
Summarised int `json:"stepsSummarised"`
Redactions int `json:"redactions,omitempty"`
PathsMapped int `json:"pathsMapped"`
Summary string `json:"summary"`
}
Report is what a conversion keeps and leaves out.
type Request ¶
type Request struct {
Nodes []ir.Node
From string // the source agent's name ("Claude Code")
To string // the target agent's name ("Codex")
Fidelity Fidelity
Native bool // render exact tool calls natively (the target writer supports it)
Window int // the target's context, in tokens
Mappings []agent.Mapping // source paths → target paths
Briefing Briefing
Redact func([]byte) ([]byte, int)
SkipBefore int // render only nodes from this index (round-trip deltas); earlier ones are context
}
Request is one rendering.