agentevent

package
v0.48.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentAssistantChunk

type AgentAssistantChunk struct {
	Meta    EventMeta
	Role    AssistantRole
	Content string
	Done    bool
}

type AgentEvent

type AgentEvent interface {
	// contains filtered or unexported methods
}

func DecodeClaudeCodeEvent

func DecodeClaudeCodeEvent(payload map[string]any) AgentEvent

func DecodeGooseEvent

func DecodeGooseEvent(payload map[string]any) AgentEvent

type AgentFileEdit

type AgentFileEdit struct {
	Meta   EventMeta
	Path   string
	Before string
	After  string
}

type AgentFileRead

type AgentFileRead struct {
	Meta EventMeta
	Path string
}

type AgentPostToolUse

type AgentPostToolUse struct {
	Meta      EventMeta
	ToolName  string
	ToolInput map[string]any
	Output    any
	Ok        bool
	ErrorMsg  string
}

type AgentPreToolUse

type AgentPreToolUse struct {
	Meta      EventMeta
	ToolName  string
	ToolInput map[string]any
}

type AgentSessionEnd

type AgentSessionEnd struct {
	Meta   EventMeta
	Reason string
}

type AgentSessionStart

type AgentSessionStart struct {
	Meta EventMeta
	Cwd  string
}

type AgentShellExec

type AgentShellExec struct {
	Meta     EventMeta
	Command  string
	ExitCode int
	Stdout   string
	Stderr   string
}

type AgentSource

type AgentSource string
const (
	AgentSourceOpencode   AgentSource = "opencode"
	AgentSourceGoose      AgentSource = "goose"
	AgentSourceClaudeCode AgentSource = "claude-code"
	AgentSourceACP        AgentSource = "acp"
)

func AllAgentSource added in v0.48.3

func AllAgentSource() []AgentSource

func ParseAgentSource

func ParseAgentSource(s string) (AgentSource, bool)

func (AgentSource) String

func (e AgentSource) String() string

type AgentUnknown

type AgentUnknown struct {
	Meta EventMeta
	Kind string
}

type AgentUserPromptSubmit

type AgentUserPromptSubmit struct {
	Meta   EventMeta
	Prompt string
}

type AssistantRole added in v0.48.1

type AssistantRole string
const (
	AssistantRoleAssistant AssistantRole = "assistant"
	AssistantRoleUser      AssistantRole = "user"
)

func AllAssistantRole added in v0.48.3

func AllAssistantRole() []AssistantRole

func ParseAssistantRole added in v0.48.1

func ParseAssistantRole(s string) (AssistantRole, bool)

func (AssistantRole) String added in v0.48.1

func (e AssistantRole) String() string

type EventMeta

type EventMeta struct {
	Source     AgentSource
	SessionID  string
	WorkingDir string
	Timestamp  time.Time
	Raw        map[string]any
}

Jump to

Keyboard shortcuts

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