Documentation
¶
Index ¶
- type AskUser
- func (a *AskUser) AuditSummary(argsJSON string) string
- func (a *AskUser) Info(context.Context) (*tool.ToolInfo, error)
- func (a *AskUser) InvokableRun(ctx context.Context, argsJSON string) (*tool.ToolResult, error)
- func (a *AskUser) PrepareCall(context.Context, uuid.UUID, string) (tool.Request, tool.PreparedArtifact, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AskUser ¶
type AskUser struct {
// contains filtered or unexported fields
}
AskUser asks the human a question via the loop's user-input gate. It holds no dependencies beyond the (overridable) requestUserInput seam.
func NewAskUser ¶
func NewAskUser() *AskUser
NewAskUser constructs an AskUser whose seam is wired to the real loop.RequestUserInput (which reads the runner-injected ctx values per call).
func (*AskUser) AuditSummary ¶
AuditSummary returns "AskUser: <question>". The question is shown to the user at the gate anyway, so it is not a secret. Unparsable args / an empty question yield a generic summary.
func (*AskUser) InvokableRun ¶
InvokableRun parses the args, requests user input via the seam, validates the answer against the choice list (if any), and returns the validated answer as the tool-result text. Every failure is a tool-result error STRING; it never returns a Go error.
func (*AskUser) PrepareCall ¶
func (a *AskUser) PrepareCall(context.Context, uuid.UUID, string) (tool.Request, tool.PreparedArtifact, error)
PrepareCall implements the mandatory tool preparation capability with a PURE, empty request: AskUser routes a question through the loop's own user-input capability — no filesystem, network, or command effect — so there is no capability to gate. Argument validation stays in InvokableRun (every failure is a tool-result string the model can recover from).