Help us shape the future of Go! Take the 2026 Go Developer Survey

types

package
v0.0.204 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType string
const (
	ActionThink      ActionType = "think"
	ActionToolCall   ActionType = "tool_call"
	ActionMessage    ActionType = "message"
	ActionError      ActionType = "error"
	ActionDone       ActionType = "done"
	ActionStepStart  ActionType = "step_start"
	ActionStepFinish ActionType = "step_finish"
	ActionSleep      ActionType = "sleep"
)

type AgentEvent

type AgentEvent struct {
	ID         string           `json:"id,omitempty"`
	Type       ActionType       `json:"type"`
	Role       string           `json:"role,omitempty"`
	Phase      EventPhase       `json:"phase,omitempty"`
	Timestamp  int64            `json:"timestamp,omitempty"`
	Text       string           `json:"text,omitempty"`
	Tool       string           `json:"tool,omitempty"`
	ToolInput  map[string]any   `json:"tool_input,omitempty"`
	ToolCallID string           `json:"tool_call_id,omitempty"`
	Output     string           `json:"output,omitempty"`
	Stderr     string           `json:"stderr,omitempty"`
	ExitCode   *int             `json:"exit_code,omitempty"`
	DelayMs    int              `json:"delay_ms,omitempty"`
	Mock       *MockConfig      `json:"mock,omitempty"`
	Changes    []FileChange     `json:"changes,omitempty"`
	Extensions *EventExtensions `json:"extensions,omitempty"`
}

type EventExtensions added in v0.0.48

type EventExtensions struct {
	GrokSession *GrokSessionExtension `json:"grok_session,omitempty"`
}

type EventPhase added in v0.0.19

type EventPhase string
const (
	PhaseInstant EventPhase = ""
	PhaseStart   EventPhase = "start"
	PhaseUpdate  EventPhase = "update"
	PhaseEnd     EventPhase = "end"
)

type FileChange

type FileChange struct {
	Path string `json:"path"`
	Kind string `json:"kind"`
}

type GrokSessionExtension added in v0.0.48

type GrokSessionExtension struct {
	Status    string `json:"status,omitempty"`
	TurnIndex int    `json:"turn_index,omitempty"`
}

type MockConfig

type MockConfig struct {
	Output   string       `json:"output,omitempty"`
	Stderr   string       `json:"stderr,omitempty"`
	ExitCode *int         `json:"exit_code,omitempty"`
	Content  string       `json:"content,omitempty"`
	Changes  []FileChange `json:"changes,omitempty"`
}

Jump to

Keyboard shortcuts

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