Versions in this module Expand all Collapse all v1 v1.0.0 Feb 23, 2026 Changes in this version + type Call struct + Host string + Name string + Params map[string]any + Path string + SessionID string + StreamSink func(chunk string, isStderr bool) + Usage sandbox.ResourceUsage + type CallResult struct + Call Call + CompletedAt time.Time + Err error + Result *ToolResult + StartedAt time.Time + func (r CallResult) Duration() time.Duration + type DefaultValidator struct + func (v DefaultValidator) Validate(params map[string]interface{}, schema *JSONSchema) error + type Executor struct + func NewExecutor(registry *Registry, sb *sandbox.Manager) *Executor + func (e *Executor) Execute(ctx context.Context, call Call) (*CallResult, error) + func (e *Executor) ExecuteAll(ctx context.Context, calls []Call) []CallResult + func (e *Executor) Registry() *Registry + func (e *Executor) WithOutputPersister(persister *OutputPersister) *Executor + func (e *Executor) WithPermissionResolver(resolver PermissionResolver) *Executor + func (e *Executor) WithSandbox(sb *sandbox.Manager) *Executor + type FunctionSchema struct + Description string + Name string + Parameters *ParameterSchema + type JSONSchema struct + Enum []interface{} + Items *JSONSchema + Maximum *float64 + Minimum *float64 + Pattern string + Properties map[string]interface{} + Required []string + Type string + type MCPServerOptions struct + DisabledTools []string + EnabledTools []string + Env map[string]string + Headers map[string]string + Timeout time.Duration + ToolTimeout time.Duration + type OutputPersister struct + BaseDir string + DefaultThresholdBytes int + PerToolThresholdBytes map[string]int + func NewOutputPersister() *OutputPersister + func (p *OutputPersister) MaybePersist(call Call, result *ToolResult) error + type OutputRef struct + Path string + SizeBytes int64 + Truncated bool + type ParameterSchema struct + Properties map[string]*PropertySchema + Required []string + Type string + type PermissionResolver func(context.Context, Call, security.PermissionDecision) (security.PermissionDecision, error) + type PropertySchema struct + Description string + Enum []string + Items *PropertySchema + Type string + type Registry struct + func NewRegistry() *Registry + func (r *Registry) Close() + func (r *Registry) Execute(ctx context.Context, name string, params map[string]interface{}) (_ *ToolResult, err error) + func (r *Registry) Get(name string) (Tool, error) + func (r *Registry) List() []Tool + func (r *Registry) Register(tool Tool) error + func (r *Registry) RegisterMCPServer(ctx context.Context, serverPath, serverName string) error + func (r *Registry) RegisterMCPServerWithOptions(ctx context.Context, serverPath, serverName string, opts MCPServerOptions) error + func (r *Registry) SetValidator(v Validator) + type SpoolFileFactory func() (io.WriteCloser, string, error) + type SpoolWriter struct + func NewSpoolWriter(threshold int, fileFactory SpoolFileFactory) *SpoolWriter + func (w *SpoolWriter) Close() error + func (w *SpoolWriter) Path() string + func (w *SpoolWriter) String() string + func (w *SpoolWriter) Truncated() bool + func (w *SpoolWriter) Write(p []byte) (int, error) + func (w *SpoolWriter) WriteString(s string) (int, error) + type StreamChunk struct + Content string + IsStderr bool + Timestamp time.Time + type StreamingTool interface + StreamExecute func(ctx context.Context, params map[string]interface{}, ...) (*ToolResult, error) + type Tool interface + Description func() string + Execute func(ctx context.Context, params map[string]interface{}) (*ToolResult, error) + Name func() string + Schema func() *JSONSchema + type ToolResult struct + Data interface{} + Error error + Output string + OutputRef *OutputRef + Success bool + type ToolSchema struct + Function *FunctionSchema + Type string + type Validator interface + Validate func(params map[string]interface{}, schema *JSONSchema) error