Documentation
¶
Index ¶
- func NewSubagentFinalizationPolicy(onBegin func(agent.FinalizationReason)) agent.FinalizationPolicy
- type Bash
- type Edit
- type PresentationSnapshot
- type Read
- type Registry
- func (r *Registry) Close() error
- func (r *Registry) Definitions() []agent.ToolDefinition
- func (r *Registry) Execute(ctx context.Context, call agent.ToolCall, updates agent.ToolUpdateSink) (agent.ToolResult, error)
- func (r *Registry) Presentation(snapshot agent.ToolCallSnapshot) agent.ToolPresentation
- type Subagent
- func (s *Subagent) Close() error
- func (*Subagent) Definition() agent.ToolDefinition
- func (s *Subagent) Execute(ctx context.Context, arguments json.RawMessage, updates agent.ToolUpdateSink) (agent.ToolResult, error)
- func (s *Subagent) Presentation(snapshot PresentationSnapshot) agent.ToolPresentation
- func (s *Subagent) StatusUpdates() <-chan agent.SubagentStatus
- type SubagentCancel
- type SubagentModelProfile
- type SubagentProgress
- type SubagentRun
- type SubagentWait
- type Tool
- type UpdateGoal
- type Write
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSubagentFinalizationPolicy ¶
func NewSubagentFinalizationPolicy(onBegin func(agent.FinalizationReason)) agent.FinalizationPolicy
Types ¶
type Bash ¶
type Bash struct {
// contains filtered or unexported fields
}
func (*Bash) Definition ¶
func (*Bash) Definition() agent.ToolDefinition
func (*Bash) Execute ¶
func (b *Bash) Execute(ctx context.Context, arguments json.RawMessage, updates agent.ToolUpdateSink) (agent.ToolResult, error)
func (*Bash) Presentation ¶
func (b *Bash) Presentation(snapshot PresentationSnapshot) agent.ToolPresentation
type Edit ¶
type Edit struct {
// contains filtered or unexported fields
}
func (*Edit) Definition ¶
func (*Edit) Definition() agent.ToolDefinition
func (*Edit) Execute ¶
func (e *Edit) Execute(ctx context.Context, arguments json.RawMessage, updates agent.ToolUpdateSink) (agent.ToolResult, error)
func (*Edit) Presentation ¶
func (*Edit) Presentation(snapshot PresentationSnapshot) agent.ToolPresentation
type PresentationSnapshot ¶
type Read ¶
type Read struct {
// contains filtered or unexported fields
}
func (*Read) Definition ¶
func (*Read) Definition() agent.ToolDefinition
func (*Read) Execute ¶
func (r *Read) Execute(ctx context.Context, arguments json.RawMessage, _ agent.ToolUpdateSink) (agent.ToolResult, error)
func (*Read) Presentation ¶
func (*Read) Presentation(snapshot PresentationSnapshot) agent.ToolPresentation
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) Definitions ¶
func (r *Registry) Definitions() []agent.ToolDefinition
func (*Registry) Execute ¶
func (r *Registry) Execute(ctx context.Context, call agent.ToolCall, updates agent.ToolUpdateSink) (agent.ToolResult, error)
func (*Registry) Presentation ¶
func (r *Registry) Presentation(snapshot agent.ToolCallSnapshot) agent.ToolPresentation
type Subagent ¶
type Subagent struct {
// contains filtered or unexported fields
}
func NewSubagent ¶
func NewSubagent(run SubagentRun, supportedThinkingLevels ...agent.ThinkingLevel) *Subagent
func NewSubagentWithThinkingLevels ¶
func NewSubagentWithThinkingLevels(run SubagentRun, supportedThinkingLevels func(SubagentModelProfile) []agent.ThinkingLevel) *Subagent
func (*Subagent) Definition ¶
func (*Subagent) Definition() agent.ToolDefinition
func (*Subagent) Execute ¶
func (s *Subagent) Execute(ctx context.Context, arguments json.RawMessage, updates agent.ToolUpdateSink) (agent.ToolResult, error)
func (*Subagent) Presentation ¶
func (s *Subagent) Presentation(snapshot PresentationSnapshot) agent.ToolPresentation
func (*Subagent) StatusUpdates ¶
func (s *Subagent) StatusUpdates() <-chan agent.SubagentStatus
type SubagentCancel ¶
type SubagentCancel struct {
// contains filtered or unexported fields
}
func NewSubagentCancel ¶
func NewSubagentCancel(subagents *Subagent) *SubagentCancel
func (*SubagentCancel) Definition ¶
func (*SubagentCancel) Definition() agent.ToolDefinition
func (*SubagentCancel) Execute ¶
func (cancel *SubagentCancel) Execute(ctx context.Context, arguments json.RawMessage, _ agent.ToolUpdateSink) (agent.ToolResult, error)
func (*SubagentCancel) Presentation ¶
func (*SubagentCancel) Presentation(snapshot PresentationSnapshot) agent.ToolPresentation
type SubagentModelProfile ¶
type SubagentModelProfile string
const ( SubagentModelFast SubagentModelProfile = "fast" SubagentModelBalanced SubagentModelProfile = "balanced" SubagentModelPowerful SubagentModelProfile = "powerful" )
type SubagentProgress ¶
type SubagentRun ¶
type SubagentRun func(context.Context, string, SubagentModelProfile, agent.ThinkingLevel, func(SubagentProgress)) (agent.RunResult, error)
type SubagentWait ¶
type SubagentWait struct {
// contains filtered or unexported fields
}
func NewSubagentWait ¶
func NewSubagentWait(subagents *Subagent) *SubagentWait
func (*SubagentWait) Definition ¶
func (*SubagentWait) Definition() agent.ToolDefinition
func (*SubagentWait) Execute ¶
func (wait *SubagentWait) Execute(ctx context.Context, arguments json.RawMessage, _ agent.ToolUpdateSink) (agent.ToolResult, error)
func (*SubagentWait) Presentation ¶
func (*SubagentWait) Presentation(snapshot PresentationSnapshot) agent.ToolPresentation
type Tool ¶
type Tool interface {
Definition() agent.ToolDefinition
Execute(ctx context.Context, arguments json.RawMessage, updates agent.ToolUpdateSink) (agent.ToolResult, error)
}
Tool returns ordinary argument and execution failures as ToolResult values with IsError set. It returns a Go error only when the agent turn itself must stop, such as cancellation or a failed presentation update. Execute may be called concurrently for calls from the same provider response.
type UpdateGoal ¶
type UpdateGoal struct {
// contains filtered or unexported fields
}
func NewUpdateGoal ¶
func NewUpdateGoal(complete func() error) *UpdateGoal
func (*UpdateGoal) Definition ¶
func (*UpdateGoal) Definition() agent.ToolDefinition
func (*UpdateGoal) Execute ¶
func (tool *UpdateGoal) Execute(ctx context.Context, arguments json.RawMessage, _ agent.ToolUpdateSink) (agent.ToolResult, error)
func (*UpdateGoal) Presentation ¶
func (*UpdateGoal) Presentation(snapshot PresentationSnapshot) agent.ToolPresentation
type Write ¶
type Write struct {
// contains filtered or unexported fields
}
func (*Write) Definition ¶
func (*Write) Definition() agent.ToolDefinition
func (*Write) Execute ¶
func (w *Write) Execute(ctx context.Context, arguments json.RawMessage, _ agent.ToolUpdateSink) (agent.ToolResult, error)
func (*Write) Presentation ¶
func (*Write) Presentation(snapshot PresentationSnapshot) agent.ToolPresentation
Source Files
¶
Click to show internal directories.
Click to hide internal directories.