Documentation
¶
Index ¶
- type ContextBuilder
- func (c *ContextBuilder) BuildMessages(history []*session.Message, current string, media []string) []*schema.Message
- func (c *ContextBuilder) BuildSystemPrompt() string
- func (c *ContextBuilder) InvalidateCache(changedPath string)
- func (c *ContextBuilder) SetRuntimeMetrics(recorder *metrics.RuntimeMetrics)
- type Loop
- func (l *Loop) AuditRuntimePolicyStartup(ctx context.Context, cfg *config.Config)
- func (l *Loop) ProcessDirect(ctx context.Context, content string) (string, error)
- func (l *Loop) ProcessForChannel(ctx context.Context, channel, chatID, senderID, content string) (string, error)
- func (l *Loop) ProcessForChannelWithSession(ctx context.Context, channel, chatID, senderID, sessionID, content string) (string, error)
- func (l *Loop) RegisterDefaultTools(cfg *config.Config) error
- func (l *Loop) Run(ctx context.Context) error
- func (l *Loop) SetActivityRecorder(recorder func(channel, chatID string))
- func (l *Loop) SetRuntimeMetrics(recorder *metrics.RuntimeMetrics)
- func (l *Loop) Tools() *tools.Registry
- type SubagentManager
- type SubagentManagerOptions
- type SubagentTaskRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextBuilder ¶
type ContextBuilder struct {
// contains filtered or unexported fields
}
func NewContextBuilder ¶
func NewContextBuilder(workspacePath string) *ContextBuilder
NewContextBuilder creates a context builder
func (*ContextBuilder) BuildMessages ¶
func (c *ContextBuilder) BuildMessages(history []*session.Message, current string, media []string) []*schema.Message
BuildMessages constructs the full message list
func (*ContextBuilder) BuildSystemPrompt ¶
func (c *ContextBuilder) BuildSystemPrompt() string
BuildSystemPrompt assembles the system prompt
func (*ContextBuilder) InvalidateCache ¶ added in v0.6.3
func (c *ContextBuilder) InvalidateCache(changedPath string)
InvalidateCache clears the cached system prompt parts if the changed path is relevant. If changedPath is empty, it forces invalidation.
func (*ContextBuilder) SetRuntimeMetrics ¶ added in v0.6.3
func (c *ContextBuilder) SetRuntimeMetrics(recorder *metrics.RuntimeMetrics)
SetRuntimeMetrics attaches a runtime metrics recorder
type Loop ¶
type Loop struct {
OnToolStart func(name, args string)
OnToolFinish func(name, result string, err error)
// contains filtered or unexported fields
}
Loop is the main agent processing loop
func (*Loop) AuditRuntimePolicyStartup ¶ added in v0.4.2
AuditRuntimePolicyStartup writes startup policy audit events.
func (*Loop) ProcessDirect ¶
ProcessDirect processes a message directly (for CLI)
func (*Loop) ProcessForChannel ¶ added in v0.1.4
func (l *Loop) ProcessForChannel(ctx context.Context, channel, chatID, senderID, content string) (string, error)
ProcessForChannel processes a message directly for a given channel/session.
func (*Loop) ProcessForChannelWithSession ¶ added in v0.3.0
func (l *Loop) ProcessForChannelWithSession(ctx context.Context, channel, chatID, senderID, sessionID, content string) (string, error)
ProcessForChannelWithSession processes a message for a channel/chat using an optional explicit session id.
func (*Loop) RegisterDefaultTools ¶
RegisterDefaultTools registers all built-in tools
func (*Loop) SetActivityRecorder ¶ added in v0.3.0
SetActivityRecorder attaches a callback used to track the latest active channel/chat.
func (*Loop) SetRuntimeMetrics ¶ added in v0.4.2
func (l *Loop) SetRuntimeMetrics(recorder *metrics.RuntimeMetrics)
SetRuntimeMetrics attaches a runtime metrics recorder for tool execution stats.
type SubagentManager ¶ added in v0.3.0
type SubagentManager struct {
// contains filtered or unexported fields
}
SubagentManager executes delegated tasks in background or synchronously.
func NewSubagentManager ¶ added in v0.3.0
func NewSubagentManager(msgBus *bus.MessageBus, processor subagentProcessor, timeout time.Duration) *SubagentManager
NewSubagentManager creates a subagent manager.
func NewSubagentManagerWithOptions ¶ added in v0.5.0
func NewSubagentManagerWithOptions(msgBus *bus.MessageBus, processor subagentProcessor, options SubagentManagerOptions) *SubagentManager
NewSubagentManagerWithOptions creates a subagent manager with orchestration options.
func (*SubagentManager) RunSync ¶ added in v0.3.0
func (m *SubagentManager) RunSync(ctx context.Context, req tools.SubagentRequest) (string, error)
RunSync executes a subagent task synchronously and returns its result.
func (*SubagentManager) RunWorkflow ¶ added in v0.5.0
func (m *SubagentManager) RunWorkflow(ctx context.Context, req tools.WorkflowRequest) (string, error)
RunWorkflow executes a subagent workflow in sequential or parallel mode and returns an aggregated summary.
func (*SubagentManager) Spawn ¶ added in v0.3.0
func (m *SubagentManager) Spawn(ctx context.Context, req tools.SubagentRequest) (string, error)
Spawn starts a subagent task asynchronously.
type SubagentManagerOptions ¶ added in v0.5.0
SubagentManagerOptions configures timeout/retry/concurrency for delegated tasks.