Documentation
¶
Overview ¶
Package hitl is the human-in-the-loop primitive: any plugin that needs an operator's input — clarifying a question, approving a destructive tool call, picking among curated plans, or signing off on a memory write — emits hitl.requested and waits on hitl.responded.
The plugin owns the LLM-facing ask_user tool, which is the LLM's direct path to the same machinery: the tool accepts an extended schema that lets the model present a freeform question, a multi-choice prompt, or both. Approval gates and memory plugins emit hitl.requested directly, without going through the tool.
Index ¶
- func New() engine.Plugin
- type Plugin
- func (p *Plugin) Capabilities() []engine.Capability
- func (p *Plugin) ConfigSchema() []byte
- func (p *Plugin) Dependencies() []string
- func (p *Plugin) Emissions() []string
- func (p *Plugin) ID() string
- func (p *Plugin) Init(ctx engine.PluginContext) error
- func (p *Plugin) LiveCalls() uint64
- func (p *Plugin) Name() string
- func (p *Plugin) Ready() error
- func (p *Plugin) Requires() []engine.Requirement
- func (p *Plugin) Shutdown(_ context.Context) error
- func (p *Plugin) Subscriptions() []engine.EventSubscription
- func (p *Plugin) Version() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin owns the hitl.requested/hitl.responded registry and the LLM-facing ask_user tool.
func (*Plugin) Capabilities ¶
func (p *Plugin) Capabilities() []engine.Capability
func (*Plugin) ConfigSchema ¶
ConfigSchema implements engine.ConfigSchemaProvider.
func (*Plugin) Dependencies ¶
func (*Plugin) LiveCalls ¶
LiveCalls returns the count of ask_user invocations that survived the replay short-circuit. Tests assert zero during replay — the user is never re-prompted; the journaled answer is replayed.
func (*Plugin) Requires ¶
func (p *Plugin) Requires() []engine.Requirement
func (*Plugin) Subscriptions ¶
func (p *Plugin) Subscriptions() []engine.EventSubscription