Documentation
¶
Index ¶
- func ContextWithInvocation(ctx context.Context, invocation Invocation) context.Context
- func Def(name, description string, argsProto any) *aop.ToolDefinition
- func ParseArgs[T any](arguments string) (T, error)
- func ResultHasImages(r *Result) bool
- func ResultText(r *Result) string
- func SchemaOf(proto any) map[string]any
- func WorkDirFromContext(ctx context.Context, fallback string) string
- type Definition
- type Executor
- type Invocation
- type Result
- type Tool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithInvocation ¶
func ContextWithInvocation(ctx context.Context, invocation Invocation) context.Context
func Def ¶
func Def(name, description string, argsProto any) *aop.ToolDefinition
Def builds a complete Definition from a name, description, and an args struct prototype.
func ResultHasImages ¶
func ResultText ¶
Types ¶
type Definition ¶
type Definition = aop.ToolDefinition
Definition describes a tool the LLM can invoke — the AOP transport proto.
type Executor ¶
type Executor interface {
ToolDefinitions() []*aop.ToolDefinition
ExecuteTool(ctx context.Context, name, arguments string) (*Result, error)
}
Executor is the minimal interface the agent loop needs to discover and invoke tools. CommandRegistry satisfies it directly.
type Invocation ¶
type Invocation struct {
WorkDir string
}
Invocation carries executor-owned context that must not become model-facing tool arguments.
func InvocationFromContext ¶
func InvocationFromContext(ctx context.Context) Invocation
type Result ¶
type Result = aop.ToolResult
Result is the value returned by Tool.Execute — the AOP tool result proto.
func ErrorResult ¶
func TerminateResult ¶
func TextResult ¶
Click to show internal directories.
Click to hide internal directories.