Documentation
¶
Overview ¶
Package agentapi defines the shared interfaces and types used across the agent, tools, orchestrator, gateway, and cron packages. Centralising them here eliminates interface duplication and the adapter shims that were previously needed to bridge identical-but-separate type definitions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Announcer ¶
type Announcer interface {
AnnounceToSession(sessionKey, text string)
}
Announcer delivers async subagent results back to a session's channel.
type Chatter ¶
Chatter is the minimal interface required to participate in delegation and orchestration. Both *Agent and *CLIAgent satisfy it.
type ConfirmRequest ¶
type ConfirmRequest struct {
SessionKey string
Command string
Pattern string // the matched dangerous pattern
ResultCh chan bool
}
ConfirmRequest describes a dangerous command that needs user approval.
type Confirmer ¶
type Confirmer interface {
// RequestConfirm sends a confirmation prompt to the user on the active channel.
// Returns true if the user confirms, false if denied or timed out.
RequestConfirm(ctx context.Context, req ConfirmRequest) (bool, error)
}
Confirmer can present a confirmation prompt to the user and return the result.
type Deliverer ¶
type Deliverer interface {
SendToAllPaired(text string)
}
Deliverer delivers messages to paired users across channels.
type Describer ¶
type Describer interface {
Description() string
}
Describer is an optional interface that tools can implement to provide a human-readable description. The description is passed to the LLM in the function definition so it can make better tool-selection decisions.
type Response ¶
type Response struct {
Text string
Stopped bool // true if max iterations reached
Usage ResponseUsage
}
Response holds the final result of a conversation turn.
type ResponseUsage ¶
ResponseUsage holds token usage for a response.
type SessionKeyContextKey ¶
type SessionKeyContextKey struct{}
SessionKeyContextKey is the context key for passing the active session key to tools at execution time.