Documentation
¶
Index ¶
- func CompactTraceOutput(output string) string
- func RegisterAgentTraceAdapter(priority int, adapter AgentTraceAdapter)
- func TitleFromIdentifier(id string) string
- func TraceIsAssistantItem(itemType string) bool
- func TraceItemText(item *TraceItem) string
- func TraceMessageText(message *TraceMessage) string
- type ActivityStatus
- type ActivitySubtype
- type AgentTraceActivity
- type AgentTraceAdapter
- type AgentTraceDetail
- type AgentTraceFileChange
- type AgentTraceMessage
- type AgentTraceMetadata
- type AgentTraceParsedEvent
- type AgentTraceSummary
- type AgentTraceUpdate
- type FileChange
- type Message
- type MessageRole
- type ToolCallEvent
- type TraceContent
- type TraceEvent
- type TraceItem
- type TraceMessage
- type TracePlanItem
- type TraceTodoItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompactTraceOutput ¶
func RegisterAgentTraceAdapter ¶
func RegisterAgentTraceAdapter(priority int, adapter AgentTraceAdapter)
func TitleFromIdentifier ¶
func TraceIsAssistantItem ¶
func TraceItemText ¶
func TraceMessageText ¶
func TraceMessageText(message *TraceMessage) string
Types ¶
type ActivityStatus ¶
type ActivityStatus string
const ( StatusCompleted ActivityStatus = "completed" StatusFailed ActivityStatus = "failed" StatusInProgress ActivityStatus = "in_progress" StatusWarning ActivityStatus = "warning" StatusPending ActivityStatus = "pending" )
type ActivitySubtype ¶
type ActivitySubtype string
const ( SubtypeStarted ActivitySubtype = "started" SubtypeUpdated ActivitySubtype = "updated" SubtypeCompleted ActivitySubtype = "completed" )
type AgentTraceActivity ¶
type AgentTraceActivity struct {
Subtype ActivitySubtype `json:"subtype"`
CallID string `json:"call_id,omitempty"`
ToolName string `json:"tool_name"`
Summary string `json:"summary"`
Kind string `json:"kind,omitempty"`
Status ActivityStatus `json:"status,omitempty"`
FileChanges []AgentTraceFileChange `json:"file_changes,omitempty"`
ReplaceSummary bool `json:"replace_summary,omitempty"`
}
type AgentTraceAdapter ¶
type AgentTraceAdapter interface {
Name() string
Parse(raw json.RawMessage) (AgentTraceParsedEvent, bool)
}
type AgentTraceDetail ¶
type AgentTraceDetail struct {
Metadata AgentTraceMetadata `json:"metadata"`
Prompt string `json:"prompt"`
Messages []AgentTraceMessage `json:"messages"`
RawLines []json.RawMessage `json:"raw_lines"`
}
type AgentTraceFileChange ¶
type AgentTraceMessage ¶
type AgentTraceMessage struct {
Role MessageRole `json:"role"`
Content string `json:"content"`
Sources []string `json:"sources,omitempty"`
ToolCall *AgentTraceActivity `json:"tool_call,omitempty"`
StartedAt *int64 `json:"started_at,omitempty"`
FinishedAt *int64 `json:"finished_at,omitempty"`
}
type AgentTraceMetadata ¶
type AgentTraceMetadata struct {
ID string `json:"id"`
Command string `json:"command"`
CommandArgs []string `json:"command_args,omitempty"`
CommandLine string `json:"command_line,omitempty"`
TopicPath string `json:"topic_path,omitempty"`
Workspace string `json:"workspace,omitempty"`
OutputPath string `json:"output_path,omitempty"`
ResumeCommand string `json:"resume_command,omitempty"`
ProviderID string `json:"provider_id,omitempty"`
Model string `json:"model,omitempty"`
Status string `json:"status"`
Tags []string `json:"tags,omitempty"`
Error string `json:"error,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
PromptPath string `json:"prompt_path"`
LogPath string `json:"log_path"`
}
type AgentTraceParsedEvent ¶
type AgentTraceParsedEvent struct {
Message *AgentTraceMessage
Activity *AgentTraceActivity
}
func ParseAgentTraceLine ¶
func ParseAgentTraceLine(raw json.RawMessage) (AgentTraceParsedEvent, bool)
type AgentTraceSummary ¶
type AgentTraceSummary struct {
AgentTraceMetadata
LogLineCount int `json:"log_line_count"`
}
type AgentTraceUpdate ¶
type AgentTraceUpdate struct {
Metadata AgentTraceMetadata `json:"metadata"`
Messages []AgentTraceMessage `json:"messages"`
RawLineCount int `json:"raw_line_count"`
}
type FileChange ¶
type FileChange = AgentTraceFileChange
type Message ¶
type Message = AgentTraceMessage
type MessageRole ¶
type MessageRole string
const ( RoleAssistant MessageRole = "assistant" RoleToolCall MessageRole = "tool_call" )
type ToolCallEvent ¶
type ToolCallEvent = AgentTraceActivity
type TraceContent ¶
type TraceEvent ¶
type TraceEvent struct {
Type string `json:"type"`
Subtype string `json:"subtype,omitempty"`
CallID string `json:"call_id,omitempty"`
Message *TraceMessage `json:"message,omitempty"`
Result string `json:"result,omitempty"`
Item *TraceItem `json:"item,omitempty"`
ToolCall map[string]json.RawMessage `json:"tool_call,omitempty"`
Delta string `json:"delta,omitempty"`
Text string `json:"text,omitempty"`
}
type TraceItem ¶
type TraceItem struct {
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Text string `json:"text,omitempty"`
Message string `json:"message,omitempty"`
Content []TraceContent `json:"content,omitempty"`
Command string `json:"command,omitempty"`
AggregatedOutput string `json:"aggregated_output,omitempty"`
ExitCode *int `json:"exit_code,omitempty"`
Status string `json:"status,omitempty"`
Items []TraceTodoItem `json:"items,omitempty"`
Plan []TracePlanItem `json:"plan,omitempty"`
Explanation string `json:"explanation,omitempty"`
Changes []FileChange `json:"changes,omitempty"`
Raw json.RawMessage `json:"-"`
}
func (*TraceItem) UnmarshalJSON ¶
type TraceMessage ¶
type TraceMessage struct {
Content []TraceContent `json:"content"`
}
type TracePlanItem ¶
type TraceTodoItem ¶
Click to show internal directories.
Click to hide internal directories.