Documentation
¶
Index ¶
Constants ¶
const ( SkillEventTypePromptInvocation = "prompt_invocation" SkillEventTypeToolInvocation = "tool_invocation" )
Skill event types recorded in checkpoint metadata.
const ( SkillSignalPiInputSlashCommand = "input_slash_command" SkillSignalPromptSlashCommand = "prompt_slash_command" SkillSignalClaudeSkillToolUse = "skill_tool_use" )
Skill event source signals.
const ( SkillCollapseTargetUserMessage = "user_message" SkillCollapseTargetToolPair = "tool_pair" )
Skill event collapse targets.
const (
SkillConfidenceExplicit = "explicit"
)
Skill event confidence values.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentName ¶
type AgentName string
AgentName is the registry key type for agents (e.g., "claude-code", "gemini").
type AgentType ¶
type AgentType string
AgentType is the display name type stored in metadata/trailers (e.g., "Claude Code", "Gemini CLI").
type SkillEvent ¶ added in v0.7.8
type SkillEvent struct {
ID string `json:"id,omitempty"`
EventType string `json:"event_type"`
Skill SkillEventSkill `json:"skill"`
Source SkillEventSource `json:"source"`
TurnID string `json:"turn_id,omitempty"`
Timestamp string `json:"timestamp,omitempty"`
TranscriptAnchor *SkillEventTranscriptAnchor `json:"transcript_anchor,omitempty"`
Native map[string]string `json:"native,omitempty"`
Collapse SkillEventCollapse `json:"collapse"`
}
SkillEvent records a native agent skill signal without rewriting the raw transcript. Consumers use TranscriptAnchor/Native to locate the underlying raw event and Collapse to decide whether/how to hide verbose skill material by default.
type SkillEventCollapse ¶ added in v0.7.8
type SkillEventSkill ¶ added in v0.7.8
type SkillEventSkill struct {
Name string `json:"name"`
}
type SkillEventSource ¶ added in v0.7.8
type SkillEventTranscriptAnchor ¶ added in v0.7.8
type TokenUsage ¶ added in v0.7.8
type TokenUsage struct {
// InputTokens is the number of input tokens (fresh, not from cache)
InputTokens int `json:"input_tokens"`
// CacheCreationTokens is tokens written to cache (billable at cache write rate)
CacheCreationTokens int `json:"cache_creation_tokens"`
// CacheReadTokens is tokens read from cache (discounted rate)
CacheReadTokens int `json:"cache_read_tokens"`
// OutputTokens is the number of output tokens generated
OutputTokens int `json:"output_tokens"`
// APICallCount is the number of API calls made
APICallCount int `json:"api_call_count"`
// SubagentTokens contains token usage from spawned subagents (if any)
SubagentTokens *TokenUsage `json:"subagent_tokens,omitempty"`
}
TokenUsage represents aggregated token usage for a checkpoint. This is agent-agnostic and can be populated by any agent that tracks token usage.