types

package
v0.7.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SkillEventTypePromptInvocation = "prompt_invocation"
	SkillEventTypeToolInvocation   = "tool_invocation"
)

Skill event types recorded in checkpoint metadata.

View Source
const (
	SkillSignalPiInputSlashCommand = "input_slash_command"
	SkillSignalPromptSlashCommand  = "prompt_slash_command"
	SkillSignalClaudeSkillToolUse  = "skill_tool_use"
)

Skill event source signals.

View Source
const (
	SkillCollapseTargetUserMessage = "user_message"
	SkillCollapseTargetToolPair    = "tool_pair"
)

Skill event collapse targets.

View Source
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 SkillEventCollapse struct {
	Target           string `json:"target"`
	Label            string `json:"label,omitempty"`
	DefaultCollapsed bool   `json:"default_collapsed"`
}

type SkillEventSkill added in v0.7.8

type SkillEventSkill struct {
	Name string `json:"name"`
}

type SkillEventSource added in v0.7.8

type SkillEventSource struct {
	Agent      string `json:"agent"`
	Signal     string `json:"signal"`
	Confidence string `json:"confidence"`
}

type SkillEventTranscriptAnchor added in v0.7.8

type SkillEventTranscriptAnchor struct {
	Unit      string   `json:"unit,omitempty"`
	Start     int      `json:"start,omitempty"`
	End       int      `json:"end,omitempty"`
	EntryIDs  []string `json:"entry_ids,omitempty"`
	ToolUseID string   `json:"tool_use_id,omitempty"`
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL