askuser

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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

func (a *AskUser) AuditSummary(argsJSON string) string

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) Info

func (a *AskUser) Info(context.Context) (*tool.ToolInfo, error)

Info returns AskUser's self-description. Name MUST equal "AskUser".

func (*AskUser) InvokableRun

func (a *AskUser) InvokableRun(ctx context.Context, argsJSON string) (*tool.ToolResult, error)

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

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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL