traceview

package
v0.0.44 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetTraceLineParser

func SetTraceLineParser(fn func(json.RawMessage) (AgentTraceParsedEvent, bool))

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 AgentTraceChild

type AgentTraceChild struct {
	ID              string `json:"id"`
	Command         string `json:"command"`
	CommandLine     string `json:"command_line,omitempty"`
	Status          string `json:"status"`
	AgentRunnerID   string `json:"agent_runner_id,omitempty"`
	Model           string `json:"model,omitempty"`
	CreatedAt       string `json:"created_at"`
	DelegationID    string `json:"delegation_id,omitempty"`
	DelegationLabel string `json:"delegation_label,omitempty"`
}

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 AgentTraceFileChange = eventtypes.FileChange

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"`
}

func ParseMessages

func ParseMessages(lines []string, createdAt string) []AgentTraceMessage

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"`
	AgentRunnerID   string            `json:"agent_runner_id,omitempty"`
	ProviderID      string            `json:"provider_id,omitempty"`
	Model           string            `json:"model,omitempty"`
	ParentTraceID   string            `json:"parent_trace_id,omitempty"`
	ParentTraceDir  string            `json:"parent_trace_dir,omitempty"`
	ParentSessionID string            `json:"parent_session_id,omitempty"`
	DelegationID    string            `json:"delegation_id,omitempty"`
	DelegationLabel string            `json:"delegation_label,omitempty"`
	CodexThreadID   string            `json:"codex_thread_id,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"`
	Children        []AgentTraceChild `json:"children,omitempty"`
}

type AgentTraceParsedEvent

type AgentTraceParsedEvent struct {
	Message  *AgentTraceMessage
	Activity *AgentTraceActivity
}

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 = eventtypes.FileChange

type MessageRole

type MessageRole string
const (
	RoleAssistant MessageRole = "assistant"
	RoleToolCall  MessageRole = "tool_call"
)

Jump to

Keyboard shortcuts

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