events

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentActivityEventData

type AgentActivityEventData struct {
	Activity    string `json:"activity"`
	Model       string `json:"model,omitempty"`
	Description string `json:"description,omitempty"`
}

AgentActivityEventData is the payload for agent.activity events. Activity can be "model" (model detected), "subagent_started", "subagent_progress".

type AgentStatusEventData

type AgentStatusEventData struct {
	Status     string `json:"status"`
	Error      string `json:"error,omitempty"`
	DurationMs int    `json:"duration_ms,omitempty"`
	NumTurns   int    `json:"num_turns,omitempty"`
	StopReason string `json:"stop_reason,omitempty"`
	Model      string `json:"model,omitempty"`
}

AgentStatusEventData is the payload for agent.status events.

type Broadcaster

type Broadcaster interface {
	BroadcastMessageCreated(channelID string, data MessageEventData)
	BroadcastMessageStreaming(channelID string, data MessageStreamingData)
	BroadcastAgentStatus(channelID string, data AgentStatusEventData)
	BroadcastToolUse(channelID string, data ToolUseEventData)
	BroadcastAgentActivity(channelID string, data AgentActivityEventData)
	BroadcastChannelCreated(parentChannelID, channelID string)
	BroadcastChannelDeleted(channelID string)
}

Broadcaster broadcasts events to connected clients.

type MessageEventData

type MessageEventData struct {
	MsgID      string `json:"msg_id"`
	AuthorID   string `json:"author_id"`
	AuthorName string `json:"author_name"`
	Content    string `json:"content"`
	IsBot      bool   `json:"is_bot"`
}

MessageEventData is the payload for message.created events.

type MessageStreamingData

type MessageStreamingData struct {
	Content string `json:"content"`
}

MessageStreamingData is the payload for message.streaming events (partial bot response).

type ToolUseEventData

type ToolUseEventData struct {
	ToolName string `json:"tool_name"`
	Input    string `json:"input"`
}

ToolUseEventData is the payload for tool.use events.

Jump to

Keyboard shortcuts

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