Documentation
¶
Index ¶
- Constants
- Variables
- func BuildSkillForkArgs(result *skill.InvocationResult) (json.RawMessage, error)
- func CleanOldOutputs()
- func NewCronTools() (*cron.Store, []agentcore.Tool)
- func NewTaskTools(store *storage.TaskStore, rt *task.Runtime, hookRunner *hooks.Runner) []agentcore.Tool
- func NewTeamTools(reg *team.Registry, rt *task.Runtime, leaderID string) []agentcore.Tool
- func SetOutputDir(dir string)
- func WrapWithOutputLimit(tools []agentcore.Tool) []agentcore.Tool
- type AllowToolsSetter
- type AllowedPromptArg
- type AskUserHandler
- type AskUserResponse
- type AskUserTool
- func (t *AskUserTool) Description() string
- func (t *AskUserTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *AskUserTool) Label() string
- func (t *AskUserTool) Name() string
- func (t *AskUserTool) PermissionMetadata() permission.Metadata
- func (t *AskUserTool) Schema() map[string]any
- func (t *AskUserTool) SetHandler(h AskUserHandler)
- type AssignmentNotifier
- type AssignmentPayload
- type CronCreateTool
- func (t *CronCreateTool) Description() string
- func (t *CronCreateTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *CronCreateTool) Label() string
- func (t *CronCreateTool) Name() string
- func (t *CronCreateTool) Schema() map[string]any
- func (t *CronCreateTool) Store() *cron.Store
- type CronDeleteTool
- type CronListTool
- type EnterPlanModeTool
- func (t *EnterPlanModeTool) Description() string
- func (t *EnterPlanModeTool) Execute(_ context.Context, _ json.RawMessage) (json.RawMessage, error)
- func (t *EnterPlanModeTool) Label() string
- func (t *EnterPlanModeTool) Name() string
- func (t *EnterPlanModeTool) PermissionMetadata() permission.Metadata
- func (t *EnterPlanModeTool) Schema() map[string]any
- func (t *EnterPlanModeTool) SetHandler(fn func() (string, error))
- func (t *EnterPlanModeTool) SetValidator(fn func() error)
- type ExitPlanModeTool
- func (t *ExitPlanModeTool) Description() string
- func (t *ExitPlanModeTool) Execute(_ context.Context, _ json.RawMessage) (json.RawMessage, error)
- func (t *ExitPlanModeTool) Label() string
- func (t *ExitPlanModeTool) Name() string
- func (t *ExitPlanModeTool) PermissionMetadata() permission.Metadata
- func (t *ExitPlanModeTool) Schema() map[string]any
- func (t *ExitPlanModeTool) SetExiter(fn func() (string, error))
- func (t *ExitPlanModeTool) SetValidator(fn func() error)
- type FetchProvider
- type ForkExecutor
- type GoalCreateTool
- func (t *GoalCreateTool) ConcurrencySafe(_ json.RawMessage) bool
- func (t *GoalCreateTool) Description() string
- func (t *GoalCreateTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *GoalCreateTool) Label() string
- func (t *GoalCreateTool) Name() string
- func (t *GoalCreateTool) PermissionMetadata() permission.Metadata
- func (t *GoalCreateTool) Schema() map[string]any
- func (t *GoalCreateTool) SetCreator(fn func(string, int) (goal.State, error))
- type GoalGetTool
- func (t *GoalGetTool) ConcurrencySafe(_ json.RawMessage) bool
- func (t *GoalGetTool) Description() string
- func (t *GoalGetTool) Execute(_ context.Context, _ json.RawMessage) (json.RawMessage, error)
- func (t *GoalGetTool) Label() string
- func (t *GoalGetTool) Name() string
- func (t *GoalGetTool) PermissionMetadata() permission.Metadata
- func (t *GoalGetTool) ReadOnly(_ json.RawMessage) bool
- func (t *GoalGetTool) Schema() map[string]any
- func (t *GoalGetTool) SetSnapshotter(fn func() goal.State)
- type GoalUpdateTool
- func (t *GoalUpdateTool) ConcurrencySafe(_ json.RawMessage) bool
- func (t *GoalUpdateTool) Description() string
- func (t *GoalUpdateTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *GoalUpdateTool) Label() string
- func (t *GoalUpdateTool) Name() string
- func (t *GoalUpdateTool) PermissionMetadata() permission.Metadata
- func (t *GoalUpdateTool) Schema() map[string]any
- func (t *GoalUpdateTool) SetHandlers(complete, block func(string) (goal.State, error))
- type InvocationApplier
- type JinaFetchProvider
- type JinaProvider
- type Option
- type OutputLimitedTool
- func (t *OutputLimitedTool) Description() string
- func (t *OutputLimitedTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *OutputLimitedTool) Label() string
- func (t *OutputLimitedTool) Name() string
- func (t *OutputLimitedTool) Schema() map[string]any
- func (t *OutputLimitedTool) Unwrap() agentcore.Tool
- type Question
- type SearchProvider
- type SearchResult
- type SendMessageTool
- func (t *SendMessageTool) Description() string
- func (t *SendMessageTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *SendMessageTool) Label() string
- func (t *SendMessageTool) Name() string
- func (t *SendMessageTool) Schema() map[string]any
- func (t *SendMessageTool) SetWaker(w TeammateWaker)
- type SkillExecutionResult
- type SkillTool
- func (t *SkillTool) Description() string
- func (t *SkillTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *SkillTool) Label() string
- func (t *SkillTool) Name() string
- func (t *SkillTool) Schema() map[string]any
- func (t *SkillTool) SetAllowToolsSetter(fn AllowToolsSetter)
- func (t *SkillTool) SetCatalog(catalog *skill.Catalog)
- func (t *SkillTool) SetForkExecutor(fn ForkExecutor)
- func (t *SkillTool) SetInvocationApplier(fn InvocationApplier)
- type TaskCreateTool
- func (t *TaskCreateTool) ConcurrencySafe(_ json.RawMessage) bool
- func (t *TaskCreateTool) Description() string
- func (t *TaskCreateTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *TaskCreateTool) Label() string
- func (t *TaskCreateTool) Name() string
- func (t *TaskCreateTool) Schema() map[string]any
- func (t *TaskCreateTool) SetNotifyFn(fn storage.TaskNotifyFn)
- func (t *TaskCreateTool) Store() *storage.TaskStore
- type TaskGetTool
- func (t *TaskGetTool) ConcurrencySafe(_ json.RawMessage) bool
- func (t *TaskGetTool) Description() string
- func (t *TaskGetTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *TaskGetTool) Label() string
- func (t *TaskGetTool) Name() string
- func (t *TaskGetTool) PermissionMetadata() permission.Metadata
- func (t *TaskGetTool) ReadOnly(_ json.RawMessage) bool
- func (t *TaskGetTool) Schema() map[string]any
- type TaskListTool
- func (t *TaskListTool) ConcurrencySafe(_ json.RawMessage) bool
- func (t *TaskListTool) Description() string
- func (t *TaskListTool) Execute(_ context.Context, _ json.RawMessage) (json.RawMessage, error)
- func (t *TaskListTool) Label() string
- func (t *TaskListTool) Name() string
- func (t *TaskListTool) PermissionMetadata() permission.Metadata
- func (t *TaskListTool) ReadOnly(_ json.RawMessage) bool
- func (t *TaskListTool) Schema() map[string]any
- type TaskOutputTool
- type TaskStopTool
- type TaskUpdateTool
- func (t *TaskUpdateTool) ConcurrencySafe(_ json.RawMessage) bool
- func (t *TaskUpdateTool) Description() string
- func (t *TaskUpdateTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *TaskUpdateTool) Label() string
- func (t *TaskUpdateTool) Name() string
- func (t *TaskUpdateTool) Schema() map[string]any
- func (t *TaskUpdateTool) SetAssignmentNotifier(fn AssignmentNotifier)
- type TavilyFetchProvider
- type TavilyProvider
- type TeamCreateTool
- type TeamDismissTool
- func (t *TeamDismissTool) Description() string
- func (t *TeamDismissTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
- func (t *TeamDismissTool) Label() string
- func (t *TeamDismissTool) Name() string
- func (t *TeamDismissTool) Schema() map[string]any
- func (t *TeamDismissTool) SetRosterRemover(fn func(name string))
- type TeammateWaker
- type WebFetchTool
- type WebSearchTool
Constants ¶
const (
// DefaultOutputLimit is the maximum tool output size before truncation (30KB).
DefaultOutputLimit = 30 * 1024
)
Variables ¶
var ErrPlanExitNotWired = errors.New("exit_plan_mode is not wired")
ErrPlanExitNotWired is returned when exit_plan_mode is invoked before the harness wires the exiter callback. Indicates a bootstrapping bug.
Functions ¶
func BuildSkillForkArgs ¶ added in v0.1.0
func BuildSkillForkArgs(result *skill.InvocationResult) (json.RawMessage, error)
func CleanOldOutputs ¶ added in v0.0.2
func CleanOldOutputs()
CleanOldOutputs removes tool output files older than 7 days.
func NewCronTools ¶ added in v0.0.2
NewCronTools creates a cron.Store and the three cron tools that share it.
func NewTaskTools ¶
func NewTaskTools(store *storage.TaskStore, rt *task.Runtime, hookRunner *hooks.Runner) []agentcore.Tool
NewTaskTools creates the task tools for both planning and background execution. Pass nil for rt if background task tools are not needed.
func NewTeamTools ¶ added in v0.2.0
NewTeamTools returns the team-coordination tools. team_create activates a team; send_message routes peer messages — to teammates by name or to subagents by task ID — so the LLM has one unified messaging surface. team_dismiss is the leader's graceful-shutdown surface. rt is required so send_message can deliver to subagents; pass it even when no team is active.
func SetOutputDir ¶ added in v0.1.0
func SetOutputDir(dir string)
SetOutputDir sets the directory used for large tool output files. Should be called once during bootstrap, before any tools execute.
Types ¶
type AllowToolsSetter ¶ added in v0.0.4
type AllowToolsSetter func(tools []string)
AllowToolsSetter grants temporary tool permissions for the active skill. Called with nil/empty to clear grants from the previous skill.
type AllowedPromptArg ¶ added in v0.1.3
AllowedPromptArg is a semantic label the model may attach to exit_plan_mode to remind the user about follow-up actions (e.g. {Tool: "Bash", Prompt: "go test"}). These are reference-only — they do NOT auto-allow tool calls. The approval engine surfaces them in the plan-exit prompt preview alongside the plan body.
type AskUserHandler ¶
type AskUserHandler func(ctx context.Context, questions []Question) (*AskUserResponse, error)
AskUserHandler blocks until the user submits or dismisses the dialog. On dismiss, returns a Response with Cancelled=true (not an error) so partial answers can still reach the model.
type AskUserResponse ¶
type AskUserResponse struct {
Answers map[string][]string // question text → selected labels (or user-typed text)
Notes map[string]string // question text → custom text the user typed
Cancelled bool // true if the user dismissed the dialog before submitting
}
AskUserResponse carries the outcome of an ask_user interaction.
Answers is always populated: an empty []string means the question was shown but not answered (only possible when Cancelled is true). Notes carries the raw text the user typed into "Type your own answer" — never echoed in the answer list, surfaced separately so the model sees it as user-authored.
type AskUserTool ¶
type AskUserTool struct {
// contains filtered or unexported fields
}
AskUserTool lets the model ask the user structured multi-choice questions.
func NewAskUser ¶
func NewAskUser() *AskUserTool
NewAskUser creates an AskUserTool with no handler. Call SetHandler before use.
func (*AskUserTool) Description ¶
func (t *AskUserTool) Description() string
func (*AskUserTool) Execute ¶
func (t *AskUserTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*AskUserTool) Label ¶
func (t *AskUserTool) Label() string
func (*AskUserTool) Name ¶
func (t *AskUserTool) Name() string
func (*AskUserTool) PermissionMetadata ¶ added in v0.1.3
func (t *AskUserTool) PermissionMetadata() permission.Metadata
func (*AskUserTool) Schema ¶
func (t *AskUserTool) Schema() map[string]any
func (*AskUserTool) SetHandler ¶
func (t *AskUserTool) SetHandler(h AskUserHandler)
SetHandler installs the UI callback. Calling with nil disables the tool.
type AssignmentNotifier ¶ added in v0.2.0
type AssignmentNotifier func(ctx context.Context, toAgent string, p AssignmentPayload)
AssignmentNotifier is invoked by TaskUpdateTool whenever a task's owner changes. Implementations typically deliver a message to the new owner's mailbox so the recipient picks it up at its next turn boundary. nil notifier disables the notification path (tests, leader-only sessions).
type AssignmentPayload ¶ added in v0.2.0
AssignmentPayload describes a fresh task assignment for an off-tool notifier. Carries everything the recipient teammate needs to start work without first re-fetching the task; the assigner name comes from the invoking ctx's team identity (leader is "team-lead").
type CronCreateTool ¶ added in v0.0.2
type CronCreateTool struct {
// contains filtered or unexported fields
}
CronCreateTool creates a scheduled cron job.
func (*CronCreateTool) Description ¶ added in v0.0.2
func (t *CronCreateTool) Description() string
func (*CronCreateTool) Execute ¶ added in v0.0.2
func (t *CronCreateTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*CronCreateTool) Label ¶ added in v0.0.2
func (t *CronCreateTool) Label() string
func (*CronCreateTool) Name ¶ added in v0.0.2
func (t *CronCreateTool) Name() string
func (*CronCreateTool) Schema ¶ added in v0.0.2
func (t *CronCreateTool) Schema() map[string]any
Schema exposes cron, prompt, recurring to the LLM. The durable parameter is intentionally omitted from the LLM schema but accepted internally (used by /loop command).
func (*CronCreateTool) Store ¶ added in v0.0.2
func (t *CronCreateTool) Store() *cron.Store
Store returns the underlying cron.Store.
type CronDeleteTool ¶ added in v0.0.2
type CronDeleteTool struct {
// contains filtered or unexported fields
}
CronDeleteTool deletes a cron job by ID.
func (*CronDeleteTool) Description ¶ added in v0.0.2
func (t *CronDeleteTool) Description() string
func (*CronDeleteTool) Execute ¶ added in v0.0.2
func (t *CronDeleteTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*CronDeleteTool) Label ¶ added in v0.0.2
func (t *CronDeleteTool) Label() string
func (*CronDeleteTool) Name ¶ added in v0.0.2
func (t *CronDeleteTool) Name() string
func (*CronDeleteTool) Schema ¶ added in v0.0.2
func (t *CronDeleteTool) Schema() map[string]any
type CronListTool ¶ added in v0.0.2
type CronListTool struct {
// contains filtered or unexported fields
}
CronListTool lists all cron jobs.
func (*CronListTool) Description ¶ added in v0.0.2
func (t *CronListTool) Description() string
func (*CronListTool) Execute ¶ added in v0.0.2
func (t *CronListTool) Execute(_ context.Context, _ json.RawMessage) (json.RawMessage, error)
func (*CronListTool) Label ¶ added in v0.0.2
func (t *CronListTool) Label() string
func (*CronListTool) Name ¶ added in v0.0.2
func (t *CronListTool) Name() string
func (*CronListTool) Schema ¶ added in v0.0.2
func (t *CronListTool) Schema() map[string]any
type EnterPlanModeTool ¶ added in v0.1.0
type EnterPlanModeTool struct {
// contains filtered or unexported fields
}
func NewEnterPlanMode ¶ added in v0.0.2
func NewEnterPlanMode() *EnterPlanModeTool
func (*EnterPlanModeTool) Description ¶ added in v0.1.0
func (t *EnterPlanModeTool) Description() string
func (*EnterPlanModeTool) Execute ¶ added in v0.1.0
func (t *EnterPlanModeTool) Execute(_ context.Context, _ json.RawMessage) (json.RawMessage, error)
func (*EnterPlanModeTool) Label ¶ added in v0.1.0
func (t *EnterPlanModeTool) Label() string
func (*EnterPlanModeTool) Name ¶ added in v0.1.0
func (t *EnterPlanModeTool) Name() string
func (*EnterPlanModeTool) PermissionMetadata ¶ added in v0.1.3
func (t *EnterPlanModeTool) PermissionMetadata() permission.Metadata
func (*EnterPlanModeTool) Schema ¶ added in v0.1.0
func (t *EnterPlanModeTool) Schema() map[string]any
func (*EnterPlanModeTool) SetHandler ¶ added in v0.1.3
func (t *EnterPlanModeTool) SetHandler(fn func() (string, error))
func (*EnterPlanModeTool) SetValidator ¶ added in v0.1.0
func (t *EnterPlanModeTool) SetValidator(fn func() error)
type ExitPlanModeTool ¶ added in v0.1.0
type ExitPlanModeTool struct {
// contains filtered or unexported fields
}
func NewExitPlanMode ¶ added in v0.0.2
func NewExitPlanMode() *ExitPlanModeTool
func (*ExitPlanModeTool) Description ¶ added in v0.1.0
func (t *ExitPlanModeTool) Description() string
func (*ExitPlanModeTool) Execute ¶ added in v0.1.0
func (t *ExitPlanModeTool) Execute(_ context.Context, _ json.RawMessage) (json.RawMessage, error)
func (*ExitPlanModeTool) Label ¶ added in v0.1.0
func (t *ExitPlanModeTool) Label() string
func (*ExitPlanModeTool) Name ¶ added in v0.1.0
func (t *ExitPlanModeTool) Name() string
func (*ExitPlanModeTool) PermissionMetadata ¶ added in v0.1.3
func (t *ExitPlanModeTool) PermissionMetadata() permission.Metadata
func (*ExitPlanModeTool) Schema ¶ added in v0.1.0
func (t *ExitPlanModeTool) Schema() map[string]any
func (*ExitPlanModeTool) SetExiter ¶ added in v0.1.3
func (t *ExitPlanModeTool) SetExiter(fn func() (string, error))
SetExiter wires the plan-mode state transition. Called only after the permission engine has approved the exit — ExitPlanMode is an ask-style tool, so the user has already seen the plan and chosen approve before the tool runs. The callback returns the approved plan content so it can be echoed in the tool result for the model.
func (*ExitPlanModeTool) SetValidator ¶ added in v0.1.0
func (t *ExitPlanModeTool) SetValidator(fn func() error)
type FetchProvider ¶
FetchProvider performs web page content extraction.
type ForkExecutor ¶ added in v0.0.4
type ForkExecutor func(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
ForkExecutor runs a task in a forked subagent context. It matches the SubAgentTool.Execute signature so it can be wired directly.
type GoalCreateTool ¶ added in v0.2.2
type GoalCreateTool struct {
// contains filtered or unexported fields
}
func NewGoalCreate ¶ added in v0.2.2
func NewGoalCreate() *GoalCreateTool
func (*GoalCreateTool) ConcurrencySafe ¶ added in v0.2.2
func (t *GoalCreateTool) ConcurrencySafe(_ json.RawMessage) bool
func (*GoalCreateTool) Description ¶ added in v0.2.2
func (t *GoalCreateTool) Description() string
func (*GoalCreateTool) Execute ¶ added in v0.2.2
func (t *GoalCreateTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*GoalCreateTool) Label ¶ added in v0.2.2
func (t *GoalCreateTool) Label() string
func (*GoalCreateTool) Name ¶ added in v0.2.2
func (t *GoalCreateTool) Name() string
func (*GoalCreateTool) PermissionMetadata ¶ added in v0.2.2
func (t *GoalCreateTool) PermissionMetadata() permission.Metadata
func (*GoalCreateTool) Schema ¶ added in v0.2.2
func (t *GoalCreateTool) Schema() map[string]any
func (*GoalCreateTool) SetCreator ¶ added in v0.2.2
type GoalGetTool ¶ added in v0.2.2
type GoalGetTool struct {
// contains filtered or unexported fields
}
func NewGoalGet ¶ added in v0.2.2
func NewGoalGet() *GoalGetTool
func (*GoalGetTool) ConcurrencySafe ¶ added in v0.2.2
func (t *GoalGetTool) ConcurrencySafe(_ json.RawMessage) bool
func (*GoalGetTool) Description ¶ added in v0.2.2
func (t *GoalGetTool) Description() string
func (*GoalGetTool) Execute ¶ added in v0.2.2
func (t *GoalGetTool) Execute(_ context.Context, _ json.RawMessage) (json.RawMessage, error)
func (*GoalGetTool) Label ¶ added in v0.2.2
func (t *GoalGetTool) Label() string
func (*GoalGetTool) Name ¶ added in v0.2.2
func (t *GoalGetTool) Name() string
func (*GoalGetTool) PermissionMetadata ¶ added in v0.2.2
func (t *GoalGetTool) PermissionMetadata() permission.Metadata
func (*GoalGetTool) ReadOnly ¶ added in v0.2.2
func (t *GoalGetTool) ReadOnly(_ json.RawMessage) bool
func (*GoalGetTool) Schema ¶ added in v0.2.2
func (t *GoalGetTool) Schema() map[string]any
func (*GoalGetTool) SetSnapshotter ¶ added in v0.2.2
func (t *GoalGetTool) SetSnapshotter(fn func() goal.State)
type GoalUpdateTool ¶ added in v0.2.2
type GoalUpdateTool struct {
// contains filtered or unexported fields
}
func NewGoalUpdate ¶ added in v0.2.2
func NewGoalUpdate() *GoalUpdateTool
func (*GoalUpdateTool) ConcurrencySafe ¶ added in v0.2.2
func (t *GoalUpdateTool) ConcurrencySafe(_ json.RawMessage) bool
func (*GoalUpdateTool) Description ¶ added in v0.2.2
func (t *GoalUpdateTool) Description() string
func (*GoalUpdateTool) Execute ¶ added in v0.2.2
func (t *GoalUpdateTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*GoalUpdateTool) Label ¶ added in v0.2.2
func (t *GoalUpdateTool) Label() string
func (*GoalUpdateTool) Name ¶ added in v0.2.2
func (t *GoalUpdateTool) Name() string
func (*GoalUpdateTool) PermissionMetadata ¶ added in v0.2.2
func (t *GoalUpdateTool) PermissionMetadata() permission.Metadata
func (*GoalUpdateTool) Schema ¶ added in v0.2.2
func (t *GoalUpdateTool) Schema() map[string]any
func (*GoalUpdateTool) SetHandlers ¶ added in v0.2.2
func (t *GoalUpdateTool) SetHandlers(complete, block func(string) (goal.State, error))
type InvocationApplier ¶ added in v0.1.0
type InvocationApplier func(result *skill.InvocationResult) error
type JinaFetchProvider ¶
type JinaProvider ¶
type JinaProvider struct {
APIKey string
Client *http.Client // nil uses default with 30s timeout
BaseURL string // default: https://s.jina.ai/
}
JinaProvider implements SearchProvider using the Jina search endpoint. It calls POST https://s.jina.ai/ with X-Respond-With: no-content to return only SERP metadata (title, URL, snippet) without full page content.
func (*JinaProvider) Search ¶
func (p *JinaProvider) Search(ctx context.Context, query string, maxResults int) ([]SearchResult, error)
type Option ¶
type Option struct {
Label string `json:"label"`
Description string `json:"description"`
Preview string `json:"preview,omitempty"`
}
Option is a selectable choice for a question.
type OutputLimitedTool ¶ added in v0.0.2
type OutputLimitedTool struct {
// contains filtered or unexported fields
}
OutputLimitedTool wraps a Tool and truncates oversized output to disk.
func (*OutputLimitedTool) Description ¶ added in v0.0.2
func (t *OutputLimitedTool) Description() string
func (*OutputLimitedTool) Execute ¶ added in v0.0.2
func (t *OutputLimitedTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*OutputLimitedTool) Label ¶ added in v0.0.2
func (t *OutputLimitedTool) Label() string
Label forwards the optional ToolLabeler interface.
func (*OutputLimitedTool) Name ¶ added in v0.0.2
func (t *OutputLimitedTool) Name() string
func (*OutputLimitedTool) Schema ¶ added in v0.0.2
func (t *OutputLimitedTool) Schema() map[string]any
func (*OutputLimitedTool) Unwrap ¶ added in v0.0.3
func (t *OutputLimitedTool) Unwrap() agentcore.Tool
Unwrap returns the underlying tool, allowing type assertions through the wrapper.
type Question ¶
type Question struct {
Question string `json:"question"`
Header string `json:"header"`
Options []Option `json:"options"`
MultiSelect bool `json:"multiSelect,omitempty"`
// Custom controls whether the host renders a built-in "Type your own
// answer" entry below the listed options. Nil = default true.
Custom *bool `json:"custom,omitempty"`
}
Question is a single multi-choice question.
func (Question) AllowsCustom ¶ added in v0.1.3
AllowsCustom reports whether the host should render a built-in "Type your own answer" entry for this question.
type SearchProvider ¶
type SearchProvider interface {
Search(ctx context.Context, query string, maxResults int) ([]SearchResult, error)
}
SearchProvider performs web searches.
type SearchResult ¶
type SearchResult struct {
Title string `json:"title"`
URL string `json:"url"`
Snippet string `json:"content"`
}
SearchResult represents a single web search result.
type SendMessageTool ¶ added in v0.2.0
type SendMessageTool struct {
// contains filtered or unexported fields
}
SendMessageTool is a unified parent/peer message delivery tool. Replaces the old send_to_subagent: a single tool now routes to either a teammate mailbox or a subagent's pending-message queue, picked by what `to` resolves to in the team registry / task runtime.
Resolution order:
- team.Registry name lookup (teammate or the reserved team-lead) — uses mailbox
- task.Runtime task-ID lookup (subagent) — uses AppendPending
The sender's identity is taken from team.IdentityFromContext(ctx). The leader (no identity) sends as "team-lead"; a teammate sends as its own name.
func NewSendMessageTool ¶ added in v0.2.0
func NewSendMessageTool(rt *task.Runtime, reg *team.Registry) *SendMessageTool
NewSendMessageTool wires the tool to the shared task runtime and team registry. Both are required.
func (*SendMessageTool) Description ¶ added in v0.2.0
func (t *SendMessageTool) Description() string
func (*SendMessageTool) Execute ¶ added in v0.2.0
func (t *SendMessageTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*SendMessageTool) Label ¶ added in v0.2.0
func (t *SendMessageTool) Label() string
func (*SendMessageTool) Name ¶ added in v0.2.0
func (t *SendMessageTool) Name() string
func (*SendMessageTool) Schema ¶ added in v0.2.0
func (t *SendMessageTool) Schema() map[string]any
func (*SendMessageTool) SetWaker ¶ added in v0.2.0
func (t *SendMessageTool) SetWaker(w TeammateWaker)
SetWaker enables lazy teammate resume: when send_message targets a teammate name with no live mailbox, the waker re-spawns it from its saved transcript with the message as its opening turn. Optional; nil keeps stop-is-final.
type SkillExecutionResult ¶ added in v0.1.0
type SkillExecutionResult struct {
PromptText string
Forked bool
ForkOutput json.RawMessage
}
func ExecuteSkillInvocation ¶ added in v0.1.0
func ExecuteSkillInvocation(ctx context.Context, result *skill.InvocationResult, apply InvocationApplier, fork ForkExecutor) (*SkillExecutionResult, error)
type SkillTool ¶ added in v0.0.4
type SkillTool struct {
// contains filtered or unexported fields
}
SkillTool lets the LLM invoke skills by name. It loads the skill file, strips frontmatter, expands $ARGUMENTS placeholders, and returns the formatted content as a tool result. Skills with context: fork are delegated to a subagent via the ForkExecutor.
func NewSkillTool ¶ added in v0.0.4
NewSkillTool creates a SkillTool with the given initial skill list.
func (*SkillTool) Description ¶ added in v0.0.4
func (*SkillTool) Execute ¶ added in v0.0.4
func (t *SkillTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*SkillTool) SetAllowToolsSetter ¶ added in v0.0.4
func (t *SkillTool) SetAllowToolsSetter(fn AllowToolsSetter)
SetAllowToolsSetter sets the function used to grant temporary tool permissions.
func (*SkillTool) SetCatalog ¶ added in v0.1.0
SetCatalog replaces the active skill catalog (called on /reload).
func (*SkillTool) SetForkExecutor ¶ added in v0.0.4
func (t *SkillTool) SetForkExecutor(fn ForkExecutor)
SetForkExecutor sets the function used to run context: fork skills in a subagent.
func (*SkillTool) SetInvocationApplier ¶ added in v0.1.0
func (t *SkillTool) SetInvocationApplier(fn InvocationApplier)
type TaskCreateTool ¶
type TaskCreateTool struct {
// contains filtered or unexported fields
}
TaskCreateTool creates new tasks.
func (*TaskCreateTool) ConcurrencySafe ¶ added in v0.1.1
func (t *TaskCreateTool) ConcurrencySafe(_ json.RawMessage) bool
func (*TaskCreateTool) Description ¶
func (t *TaskCreateTool) Description() string
func (*TaskCreateTool) Execute ¶
func (t *TaskCreateTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*TaskCreateTool) Label ¶
func (t *TaskCreateTool) Label() string
func (*TaskCreateTool) Name ¶
func (t *TaskCreateTool) Name() string
func (*TaskCreateTool) Schema ¶
func (t *TaskCreateTool) Schema() map[string]any
func (*TaskCreateTool) SetNotifyFn ¶
func (t *TaskCreateTool) SetNotifyFn(fn storage.TaskNotifyFn)
SetNotifyFn registers the TUI notification callback (delegates to store).
func (*TaskCreateTool) Store ¶
func (t *TaskCreateTool) Store() *storage.TaskStore
Store returns the underlying TaskStore.
type TaskGetTool ¶
type TaskGetTool struct {
// contains filtered or unexported fields
}
TaskGetTool retrieves a single task by ID.
func (*TaskGetTool) ConcurrencySafe ¶ added in v0.1.1
func (t *TaskGetTool) ConcurrencySafe(_ json.RawMessage) bool
func (*TaskGetTool) Description ¶
func (t *TaskGetTool) Description() string
func (*TaskGetTool) Execute ¶
func (t *TaskGetTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*TaskGetTool) Label ¶
func (t *TaskGetTool) Label() string
func (*TaskGetTool) Name ¶
func (t *TaskGetTool) Name() string
func (*TaskGetTool) PermissionMetadata ¶ added in v0.1.3
func (t *TaskGetTool) PermissionMetadata() permission.Metadata
func (*TaskGetTool) ReadOnly ¶ added in v0.1.1
func (t *TaskGetTool) ReadOnly(_ json.RawMessage) bool
func (*TaskGetTool) Schema ¶
func (t *TaskGetTool) Schema() map[string]any
type TaskListTool ¶
type TaskListTool struct {
// contains filtered or unexported fields
}
TaskListTool lists all tasks.
func (*TaskListTool) ConcurrencySafe ¶ added in v0.1.1
func (t *TaskListTool) ConcurrencySafe(_ json.RawMessage) bool
func (*TaskListTool) Description ¶
func (t *TaskListTool) Description() string
func (*TaskListTool) Execute ¶
func (t *TaskListTool) Execute(_ context.Context, _ json.RawMessage) (json.RawMessage, error)
func (*TaskListTool) Label ¶
func (t *TaskListTool) Label() string
func (*TaskListTool) Name ¶
func (t *TaskListTool) Name() string
func (*TaskListTool) PermissionMetadata ¶ added in v0.1.3
func (t *TaskListTool) PermissionMetadata() permission.Metadata
func (*TaskListTool) ReadOnly ¶ added in v0.1.1
func (t *TaskListTool) ReadOnly(_ json.RawMessage) bool
func (*TaskListTool) Schema ¶
func (t *TaskListTool) Schema() map[string]any
type TaskOutputTool ¶ added in v0.1.0
type TaskOutputTool struct {
// contains filtered or unexported fields
}
TaskOutputTool lets the model query or wait for background task output.
func (*TaskOutputTool) Description ¶ added in v0.1.0
func (t *TaskOutputTool) Description() string
func (*TaskOutputTool) Execute ¶ added in v0.1.0
func (t *TaskOutputTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*TaskOutputTool) Label ¶ added in v0.1.0
func (t *TaskOutputTool) Label() string
func (*TaskOutputTool) Name ¶ added in v0.1.0
func (t *TaskOutputTool) Name() string
func (*TaskOutputTool) Schema ¶ added in v0.1.0
func (t *TaskOutputTool) Schema() map[string]any
type TaskStopTool ¶ added in v0.1.0
type TaskStopTool struct {
// contains filtered or unexported fields
}
TaskStopTool lets the model terminate a background task.
func (*TaskStopTool) Description ¶ added in v0.1.0
func (t *TaskStopTool) Description() string
func (*TaskStopTool) Execute ¶ added in v0.1.0
func (t *TaskStopTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*TaskStopTool) Label ¶ added in v0.1.0
func (t *TaskStopTool) Label() string
func (*TaskStopTool) Name ¶ added in v0.1.0
func (t *TaskStopTool) Name() string
func (*TaskStopTool) Schema ¶ added in v0.1.0
func (t *TaskStopTool) Schema() map[string]any
type TaskUpdateTool ¶
type TaskUpdateTool struct {
// contains filtered or unexported fields
}
TaskUpdateTool modifies an existing task.
func (*TaskUpdateTool) ConcurrencySafe ¶ added in v0.1.1
func (t *TaskUpdateTool) ConcurrencySafe(_ json.RawMessage) bool
func (*TaskUpdateTool) Description ¶
func (t *TaskUpdateTool) Description() string
func (*TaskUpdateTool) Execute ¶
func (t *TaskUpdateTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*TaskUpdateTool) Label ¶
func (t *TaskUpdateTool) Label() string
func (*TaskUpdateTool) Name ¶
func (t *TaskUpdateTool) Name() string
func (*TaskUpdateTool) Schema ¶
func (t *TaskUpdateTool) Schema() map[string]any
func (*TaskUpdateTool) SetAssignmentNotifier ¶ added in v0.2.0
func (t *TaskUpdateTool) SetAssignmentNotifier(fn AssignmentNotifier)
SetAssignmentNotifier registers a notifier callback. Safe to call before any Execute; not safe to swap concurrently with Execute (no atomic guard — caller is expected to wire this once at bootstrap).
type TavilyFetchProvider ¶
type TavilyProvider ¶
type TavilyProvider struct {
APIKey string
Client *http.Client // nil uses default with 30s timeout
}
TavilyProvider implements SearchProvider using the Tavily API.
func (*TavilyProvider) Search ¶
func (p *TavilyProvider) Search(ctx context.Context, query string, maxResults int) ([]SearchResult, error)
type TeamCreateTool ¶ added in v0.2.0
type TeamCreateTool struct {
// contains filtered or unexported fields
}
TeamCreateTool renames the session's pre-created team to a meaningful label. A default team is always active from session start, so this tool's job is no longer "activate" — it's "give the team a name that reflects what we're working on". Once teammates have been spawned the rename is rejected (their agentIds would silently break).
Only one team can be active per session — the leader's role is single-team to keep the coordination surface small.
func NewTeamCreateTool ¶ added in v0.2.0
func NewTeamCreateTool(reg *team.Registry, leaderID string) *TeamCreateTool
NewTeamCreateTool constructs the tool. leaderID is recorded as the leader's task ID in the registry so future tools (e.g. drain inbox) can identify the leader entry. nil reg is a programmer error.
func (*TeamCreateTool) Description ¶ added in v0.2.0
func (t *TeamCreateTool) Description() string
func (*TeamCreateTool) Execute ¶ added in v0.2.0
func (t *TeamCreateTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*TeamCreateTool) Label ¶ added in v0.2.0
func (t *TeamCreateTool) Label() string
func (*TeamCreateTool) Name ¶ added in v0.2.0
func (t *TeamCreateTool) Name() string
func (*TeamCreateTool) Schema ¶ added in v0.2.0
func (t *TeamCreateTool) Schema() map[string]any
type TeamDismissTool ¶ added in v0.2.0
type TeamDismissTool struct {
// contains filtered or unexported fields
}
TeamDismissTool is the leader's "stop a teammate gracefully" surface. It writes a top-priority shutdown_request envelope to the teammate's mailbox; the teammate's runner picks it up at the next turn boundary and exits without consulting the model. The teammate's Entry status moves to Completed; its mailbox is closed by the spawner's defer.
Why a dedicated tool instead of folding into send_message:
- send_message takes plain text; this is a structured control message. Asking the LLM to hand-format JSON envelopes inside send_message is fragile and easy to get wrong.
- team_dismiss is leader-only (filtered out for all sub-agents via allAgentDisallowed). send_message stays available to teammates.
For hard abort (teammate stuck, no graceful path), the equivalent action is task_stop on the teammate's task ID — that cancels the runner's ctx and Run exits via ctx.Err() instead of message handling.
func NewTeamDismissTool ¶ added in v0.2.0
func NewTeamDismissTool(reg *team.Registry) *TeamDismissTool
NewTeamDismissTool wires the tool to the session's team registry. A nil registry is a programmer error.
func (*TeamDismissTool) Description ¶ added in v0.2.0
func (t *TeamDismissTool) Description() string
func (*TeamDismissTool) Execute ¶ added in v0.2.0
func (t *TeamDismissTool) Execute(_ context.Context, args json.RawMessage) (json.RawMessage, error)
func (*TeamDismissTool) Label ¶ added in v0.2.0
func (t *TeamDismissTool) Label() string
func (*TeamDismissTool) Name ¶ added in v0.2.0
func (t *TeamDismissTool) Name() string
func (*TeamDismissTool) Schema ¶ added in v0.2.0
func (t *TeamDismissTool) Schema() map[string]any
func (*TeamDismissTool) SetRosterRemover ¶ added in v0.2.0
func (t *TeamDismissTool) SetRosterRemover(fn func(name string))
SetRosterRemover registers a callback fired when a teammate is dismissed, so the persisted roster drops it and a later session resume does not resurrect a deliberately-retired teammate. Optional; nil disables roster cleanup.
type TeammateWaker ¶ added in v0.2.0
TeammateWaker re-spawns a dormant teammate from its persisted transcript and delivers a message as its opening turn. send_message consults it when a target name has no live teammate behind it — the lazy, message-driven resume path. Implemented by internal/agent.TeammateWaker; a nil waker disables wake, so a stopped teammate simply reports as not found.
type WebFetchTool ¶
type WebFetchTool struct {
// contains filtered or unexported fields
}
WebFetchTool fetches web content and returns markdown.
func NewWebFetch ¶
func NewWebFetch(providerName, apiKey string) *WebFetchTool
NewWebFetch creates a WebFetchTool for the configured provider. Supported providers: tavily, jina.
func (*WebFetchTool) Description ¶
func (t *WebFetchTool) Description() string
func (*WebFetchTool) Execute ¶
func (t *WebFetchTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*WebFetchTool) Label ¶
func (t *WebFetchTool) Label() string
func (*WebFetchTool) Name ¶
func (t *WebFetchTool) Name() string
func (*WebFetchTool) Schema ¶
func (t *WebFetchTool) Schema() map[string]any
type WebSearchTool ¶
type WebSearchTool struct {
// contains filtered or unexported fields
}
WebSearchTool provides web search capability.
func NewWebSearch ¶
func NewWebSearch(providerName, apiKey string) *WebSearchTool
NewWebSearch creates a WebSearchTool for the configured provider. Supported providers: tavily, jina.
func (*WebSearchTool) Description ¶
func (t *WebSearchTool) Description() string
func (*WebSearchTool) Execute ¶
func (t *WebSearchTool) Execute(ctx context.Context, args json.RawMessage) (json.RawMessage, error)
func (*WebSearchTool) Label ¶
func (t *WebSearchTool) Label() string
func (*WebSearchTool) Name ¶
func (t *WebSearchTool) Name() string
func (*WebSearchTool) Schema ¶
func (t *WebSearchTool) Schema() map[string]any