tools

package
v0.11.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0, MIT Imports: 59 Imported by: 0

Documentation

Overview

Package tools — alarm_set / alarm_list / alarm_cancel tools exposed to the agent. These wrap an AlarmGateway so the same tool surface works against either:

  • The daemon's in-process AlarmClock (when registered inside the daemon binary itself — used by SOP steps, future autonomous scheduling, etc.)
  • A daemon RPC client (when registered inside the TUI — alarm_set dials the daemon socket, daemon owns the Postgres DB)

The TUI accesses alarms through the daemon socket rather than opening a direct DB connection. The split through AlarmGateway keeps that constraint honest without duplicating the tool logic.

Package tools — arch_read / glossary_read / glossary_add_term surface the project's OVERKILL_ARCH.md and CONTEXT.md to the agent (master plan §6.5 Wall 2).

The agent reads these for architecture context before non-trivial changes, and writes to the glossary when a new domain term is established mid-conversation ("term X actually means Y here").

Both files live in the PROJECT ROOT, not the agent's config dir. Wall 2 reads them too; this is the same source of truth.

Package tools — `ask_user` tool, lets the agent surface a question to the human mid-turn. The actual UI bridge lives in the TUI; this file only defines the tool contract.

Package tools — autocommit_stage exposes automation.AutoCommitter so the agent can fire a religious commit (master plan §4.8) after a verified stage like test-pass / build-green.

Package tools — automation_list and cron_list surface SOP runs and scheduled jobs to the interactive agent (master plan §7.1, §7.2).

Background: SOPs and cron jobs are owned by the daemon process; the interactive TUI never participated. The agent had zero visibility into scheduled work — it couldn't warn "your build cron fires in 4 min" or "the deploy SOP is paused waiting on your approval."

These read-only tools query the same Postgres tables the daemon writes to. No live scheduler dependency. The daemon (or `overkill cron` / `overkill sop`) still owns mutation; the agent just reads.

Package tools — bookmark_create / bookmark_list / bookmark_recall (master plan §7.4 message bookmarking / reply-context).

Reuses internal/tags + internal/journal: a bookmark is just a tag on a journal entry ID, prefixed `bookmark:` to distinguish it from file-path tags. Recall looks up the entry by ID and returns its content so the agent can pull it back into context.

Why piggyback on tags instead of a dedicated table: the §7.4 plan uses "tag this message" as the trigger phrase. The data shape is identical (label → ID + note). Adding a parallel system would just be two places to look for the same answer.

Package tools — browser_dev tool wraps the external `dev-browser` CLI (https://github.com/SawyerHood/dev-browser) so the agent can drive a long-running developer browser session via small JS scripts piped in via stdin (master plan §7.3).

Why dev-browser as a third option (alongside chromedp + WebSocket browser):

  • chromedp owns the headless workflow.
  • dev-browser keeps a stateful, named-page session the user can see.
  • It exposes Playwright's full surface plus snapshotForAI() — easier for the model to reason about real pages.

The tool degrades cleanly when the binary is missing.

Package tools — checkpoint_snapshot / checkpoint_list / checkpoint_restore surface internal/checkpoint to the agent (master plan §4.8).

Use case: before any destructive operation (patch, fs_write, rm) the agent can call checkpoint_snapshot with the affected paths. If anything goes wrong, the user runs `/rollback <id>` (or the agent invokes checkpoint_restore directly).

Package tools — additional output compressors covering tools beyond the shell/grep/git core. Each compressor is conservative: it only trims when the saving is meaningful, and never alters the JSON envelope structure.

Registered automatically via NewCompressorRegistry.

Package tools — dev-browser surface (Batch J).

Four tools, deliberately narrow:

  • devbrowser_open(name, url) navigate to URL, return snapshot
  • browser_snapshot(name) re-snapshot without navigating
  • devbrowser_click(name, selector) click the matching element
  • browser_type(name, selector, text) type into the matching field

"snapshotForAI" returns a structured page (title, headings, links, forms, bounded text) — not raw HTML. The model reads a scannable summary instead of choking on 100KB of markup per turn.

No browser_evaluate. No file_upload. No download. The narrow surface IS the safety story — the model can drive a browser but can't smuggle arbitrary JS in.

Package tools — diagnose_next_tier surfaces the diagnostic ladder (master plan §4.13) so the agent, when a fix attempt fails, can ask for the next-deeper verification step rather than guessing.

Package tools — Architecture diagram generator. Generates Mermaid diagrams from codebase structure descriptions.

Package tools — shared tool registry factory.

Entry points (run.go, web.go, slack.go, tui.go) previously hand-rolled 3-8 tool registrations each, diverging over time. This factory centralises every available tool constructor behind NewDefaultRegistry so adding a tool in one place registers it everywhere.

Sub-package tools (tts, messaging, imagegen) live outside the tools package and some transitively import gateway → agent → tools, creating an import cycle if imported here. Those tools are accepted as pre-built Tool values via FactoryDeps.ExtraTools. Callers construct them in their own package (cmd/overkill) where the cycle doesn't apply.

Package tools — failhypo_search exposes the failed-hypothesis store (internal/journal/failhypo.go) to the agent.

Why the agent needs this: the store is most valuable when the agent queries it BEFORE retrying a known-dead path, not when a human runs `overkill failhypo search` afterwards. One extra tool_call mid-turn is cheap; re-doing a 20-minute debug loop is not. This is the §4.19 layered-disclosure pattern applied to the failure record instead of the flight log.

Package tools — create_goal / get_goal / update_goal expose the per-session GoalStore to the agent. Follows the same pattern as plan tools (PlanQuerier interface for testability).

Package tools — overkill_introspect lets the agent read auto-generated introspection files (CODEBASE.md, MODEL_CARD.md, KNOWN_ISSUES.md, ARCHITECTURE.md) from ~/.overkill/introspection/ on demand. Read-only. See master plan §4.18.

Package tools — journal_search / journal_timeline / journal_get surface the FlightRecorder 3-layer query protocol to the agent (master plan §4.19).

Layered disclosure: cheap index first (search), zoom into surrounding context (timeline), pull full detail only when needed (get). Designed to keep the agent's hot path budget-conscious — many results at low cost, drill in selectively.

Package tools — learn_record surfaces skills.LearnTrigger so the agent (or the user via /learn) can mark a problem class as "solved again", triggering a save-as-skill suggestion once the threshold is hit (master plan §6.2).

Package tools — lsp_hover / lsp_definition / lsp_references / lsp_symbols expose the running LSP manager to the agent so it can query the language server for semantic info on the current codebase.

Package tools — memory_* tools wrap the memory.Orchestrator (master plan §6.1). Each tool is nil-safe: when the Orchestrator hasn't been wired the tool returns a polite "memory not configured" message rather than panicking.

Package tools — `patch` tool: applies a unified diff to a file with strict context validation.

The format accepted is the standard unified diff hunk:

@@ -<oldStart>,<oldCount> +<newStart>,<newCount> @@
 context line
-removed line
+added line

Multiple hunks are applied in file order. A context-line mismatch fails the whole apply (no partial writes).

Package tools — pipeline_run surfaces the incremental pipeline (master plan §4.11) to the agent. The pipeline turns a one-line feature request into a 4-stage walk: spec → test → code → refactor.

Package tools — plan_set / plan_check / plan_status / plan_clear expose the per-session plan store (internal/plan) to the agent. One active plan per session; the TUI right pane reads from the same store so the user sees what the agent committed to and what it's already ticked off.

record_learning + learnings_search expose the durable learnings stream — the prose reflection layer the agent fills in at end-of-task. Stored append-only; read paths support both global and model-scoped (§4.16) lookups.

Package tools — playbook_* tools surface the ACE-style playbook store (§8.2 Phase 5 #6) to the agent.

Typical flow:

  1. agent calls playbook_rank(task_type="migration") and reads top-K candidates.
  2. agent calls playbook_use(id=X) to record selection. Bumps LastUsedAt + UseCount.
  3. agent reads the playbook's Content into its own context and executes the procedure.
  4. After completion, agent calls playbook_record_outcome(id=X, success=true|false). Counter updates.
  5. If the playbook would have worked with a tweak, agent calls playbook_refine(parent_id=X, content=...) to create a child version. The parent's history stays intact; the child starts with a neutral prior.

Package tools — regression_record / regression_list / regression_verify surface walls.RegressionBank to the agent (master plan §6.5 Wall 3).

Package tools — segment_create / segment_list / segment_rank / segment_load / segment_delete expose the memory.SegmentStore to the agent (§8.2 Phase 5 #3 MemAgent segment memory).

Use case: in a massive codebase, the agent uses these tools to define labeled slices ("auth module", "payment tests") and retrieve top-K relevant slices for a given query — replacing "grep the whole repo" with "load the auth segment".

Package tools — skill_extract surfaces skills.Extract so the agent can auto-create a SKILL.md after solving a problem (master plan §6.2 Voyager).

Package tools — slice_decompose exposes the vertical-slice decomposition pipeline (master plan §4.11) to the agent.

Given a free-text spec, the slicer:

  1. Decomposes into tracer-bullet issues cutting through ALL layers (schema → API → UI → tests), each independently demoable.
  2. Classifies each slice HITL (needs human) vs AFK (agent-mergeable).
  3. Topologically sorts so dependency references use real IDs.

The agent calls this when the user asks "break this down" or "scaffold tickets for this feature". Pure function — no LLM call.

Package tools — task_open / task_close / task_link_commit / task_note / task_list lets the agent maintain a cross-session task graph (§8.3 Phase 5 #2).

Why typed tools instead of letting the agent edit a markdown file: the task graph is the surface that lets the agent surface "you asked me to fix X 3 days ago" at session open. A hallucinating turn rewriting the file could mass-close real open work or invent ghost tasks. The protected-path gate blocks raw writes; these tools provide the structured mutation channel.

Package tools — Spider-Man problem (master plan §4.12).

`agent_writes_code → agent_writes_tests → agent_says "all good"` is the fundamental QA failure mode. The Spider-Man tool spawns an isolated test agent that sees the **spec, not the implementation conversation** so its verification isn't compromised by knowing how the code was written.

Package tools — `understand_anything` tool (Batch I).

One arg: path. Returns extracted text + metadata. The agent reads this on the next turn and can reason about ANY file — PDF, audio, office docs, code, configs, images, even unknown binaries (which come back as "binary file: <mime> <size> <first-bytes-hex>" instead of an error). The "no, I CAN handle that file" UX.

Package tools — vision_describe runs a vision model over a webpage, a file on disk, or the current browser viewport. The agent itself is text-only; this tool is the seam where pixels become prose.

Package tools — wall_architecture and wall_ouroboros tools surface walls.ArchitectureWall and walls.OuroborosWall to the agent so the model can self-check before declaring a change done (master plan §6.5 walls 1 and 2). Wall 3 (regression bank) lives in regression.go.

Index

Constants

This section is empty.

Variables

View Source
var DefaultBlockedHosts = []string{
	"localhost",
	"127.0.0.1",
	"0.0.0.0",
	"::1",
	"169.254.0.0/16",
}

DefaultBlockedHosts is the conservative SSRF blocklist applied on top of any user-configured blocklist. Bare host strings, CIDR ranges, or the special tokens `localhost` / `metadata` are all valid entries.

Functions

func ApplyHunks

func ApplyHunks(src string, hunks []Hunk) (string, error)

ApplyHunks applies hunks to src and returns the resulting content. A context mismatch in any hunk fails the whole operation.

func ClassifyBrowserURLRisk

func ClassifyBrowserURLRisk(rawURL string) string

ClassifyBrowserURLRisk returns the recommended risk level for navigating to a given URL. Public so internal/agent can call it from classifyToolRisk.

func FormatPreview

func FormatPreview(preview *PushPreview) string

func ReadWorkspaceFile

func ReadWorkspaceFile(ctx context.Context, dir, name string, limit int) ([]byte, bool, error)

ReadWorkspaceFile reads a bounded prefix through a pinned workspace root. It follows contained symlinks, refuses escapes/non-regular files, and reports truncation without first allocating or reading the entire input file.

func WithBashSecurity

func WithBashSecurity(enabled BashSecurityOption) func(*PTYShellTool)

WithBashSecurity enables or disables shell-specific security validation. When enabled, the bash validator chain runs before the generic CommandScanner.

func WithCoordinationAbort

func WithCoordinationAbort(ctx context.Context, abort context.CancelCauseFunc) context.Context

WithCoordinationAbort lets an application-owned worker stop further model and tool iterations after its agreement gate rejects an effect. It never grants identity or authority, and ordinary tool calls have no abort callback.

func WithoutCommandScan

func WithoutCommandScan() func(*ShellTool)

WithoutCommandScan disables the in-tool security scan. Used by tests that need to exercise commands the scanner would block. Production callers should leave the scanner on.

Types

type ACPRemote

type ACPRemote struct {
	URL   string
	Token string
}

ACPRemote is trusted application configuration. Credentials never appear in model tool arguments, schemas, or receipts. A name fixes the destination.

type ACPSendTool

type ACPSendTool struct {
	// contains filtered or unexported fields
}

ACPSendTool dispatches a sub-task to another ACP agent on the network.

func NewACPSendTool

func NewACPSendTool(peers ...map[string]ACPRemote) *ACPSendTool

func (*ACPSendTool) Description

func (t *ACPSendTool) Description() string

func (*ACPSendTool) Execute

func (t *ACPSendTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

func (*ACPSendTool) Name

func (t *ACPSendTool) Name() string

type AlarmGateway

type AlarmGateway interface {
	Set(*automation.Alarm) error
	Cancel(id string) bool
	List() []*automation.Alarm
}

AlarmGateway is the small surface the alarm tools need. Both automation.AlarmClock (in-process daemon use) and a daemon RPC client (TUI use) satisfy it structurally — Set/Cancel/List signatures match. No wrapper required, just pass either.

type ArchReadTool

type ArchReadTool struct {
	// contains filtered or unexported fields
}

ArchReadTool returns OVERKILL_ARCH.md content. The agent calls it before non-trivial structural changes.

func NewArchReadTool

func NewArchReadTool(r ProjectRootResolver) *ArchReadTool

func (*ArchReadTool) Execute

func (*ArchReadTool) Name

func (t *ArchReadTool) Name() string

type ArchitectureWallTool

type ArchitectureWallTool struct {
	// contains filtered or unexported fields
}

ArchitectureWallTool runs the rule-based architecture wall over a set of changed files. Cheap — no LLM call. Designed to be invoked by the agent before committing a patch.

func NewArchitectureWallTool

func NewArchitectureWallTool(w *walls.ArchitectureWall) *ArchitectureWallTool

func (*ArchitectureWallTool) Execute

func (*ArchitectureWallTool) Name

func (t *ArchitectureWallTool) Name() string

type AskUserBridge

type AskUserBridge func(ctx context.Context, prompt string, choices []string) (text string, index int, cancel bool)

AskUserBridge is the function the tool calls into to actually surface the question. The TUI provides this; CLI/headless modes can pass a stub.

type AskUserInput

type AskUserInput struct {
	Question string   `json:"question"`
	Choices  []string `json:"choices,omitempty"`
}

AskUserInput is the JSON schema accepted by the tool.

type AskUserOutput

type AskUserOutput struct {
	Answer    string `json:"answer"`
	Index     int    `json:"index"`
	Cancelled bool   `json:"cancelled"`
}

AskUserOutput is the JSON schema returned by the tool.

type AskUserTool

type AskUserTool struct {
	// contains filtered or unexported fields
}

AskUserTool implements Tool. It serializes the question, hands it to the bridge, and returns the answer as JSON.

func NewAskUserTool

func NewAskUserTool(bridge AskUserBridge) *AskUserTool

NewAskUserTool builds the tool. bridge is required; nil bridge always cancels.

func (*AskUserTool) Description

func (t *AskUserTool) Description() string

func (*AskUserTool) Execute

func (t *AskUserTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

Execute parses the input, calls the bridge, and serializes the answer.

func (*AskUserTool) Name

func (t *AskUserTool) Name() string

Name returns the tool identifier exposed to the model.

func (*AskUserTool) Schema

func (t *AskUserTool) Schema() json.RawMessage

type AutocommitStageTool

type AutocommitStageTool struct {
	// contains filtered or unexported fields
}

AutocommitStageTool wraps an AutoCommitter for one repo.

func NewAutocommitStageTool

func NewAutocommitStageTool(c *automation.AutoCommitter) *AutocommitStageTool

func (*AutocommitStageTool) Execute

func (*AutocommitStageTool) Name

func (t *AutocommitStageTool) Name() string

type AutomationListTool

type AutomationListTool struct {
	// contains filtered or unexported fields
}

AutomationListTool returns every known SOP with its status. Read-only.

func NewAutomationListTool

func NewAutomationListTool(s AutomationLister) *AutomationListTool

func (*AutomationListTool) Execute

func (*AutomationListTool) Name

func (t *AutomationListTool) Name() string

type AutomationLister

type AutomationLister interface {
	LoadSOPs() ([]automation.SOP, error)
}

AutomationLister is the minimal surface for listing SOPs without pulling in the full engine. *automation.PostgresSOPStore satisfies it.

type AvailableTool

type AvailableTool interface{ Available() bool }

AvailableTool is an optional dynamic catalog gate. Native tools without it retain their existing behavior; unavailable adapters never resolve or advertise.

type BashSecurityOption

type BashSecurityOption bool

BashSecurityOption controls whether the bash validator chain runs inside PTYShellTool.Execute. Pass true to enable.

type BookmarkCreateTool

type BookmarkCreateTool struct {
	// contains filtered or unexported fields
}

BookmarkCreateTool tags a journal entry ID with a user label so it can be recalled later. ID is typically obtained via journal_search.

func NewBookmarkCreateTool

func NewBookmarkCreateTool(t *tags.Manager) *BookmarkCreateTool

func (*BookmarkCreateTool) Execute

func (*BookmarkCreateTool) Name

func (t *BookmarkCreateTool) Name() string

type BookmarkListTool

type BookmarkListTool struct {
	// contains filtered or unexported fields
}

func NewBookmarkListTool

func NewBookmarkListTool(t *tags.Manager) *BookmarkListTool

func (*BookmarkListTool) Execute

func (*BookmarkListTool) Name

func (t *BookmarkListTool) Name() string

type BookmarkRecallTool

type BookmarkRecallTool struct {
	// contains filtered or unexported fields
}

func NewBookmarkRecallTool

func NewBookmarkRecallTool(t *tags.Manager, j JournalReader) *BookmarkRecallTool

func (*BookmarkRecallTool) Execute

func (*BookmarkRecallTool) Name

func (t *BookmarkRecallTool) Name() string

type BrowserClickTool

type BrowserClickTool struct {
	// contains filtered or unexported fields
}

BrowserClickTool — click element.

func NewBrowserClickTool

func NewBrowserClickTool(mgr *browser.Manager, policy BrowserHostPolicy) *BrowserClickTool

func (*BrowserClickTool) Execute

func (*BrowserClickTool) Name

func (t *BrowserClickTool) Name() string

type BrowserDevTool

type BrowserDevTool struct {
	// contains filtered or unexported fields
}

BrowserDevTool runs a JS snippet through `dev-browser`.

func NewBrowserDevTool

func NewBrowserDevTool() *BrowserDevTool

NewBrowserDevTool resolves the binary on PATH. Returns a tool that returns a clear error from Execute when dev-browser isn't installed; callers can register it unconditionally.

func (*BrowserDevTool) Execute

func (*BrowserDevTool) IsAvailable

func (t *BrowserDevTool) IsAvailable() bool

IsAvailable reports whether dev-browser is on PATH. Useful for /browser status to show the third option as available/unavailable.

func (*BrowserDevTool) Name

func (t *BrowserDevTool) Name() string

type BrowserEvalTool

type BrowserEvalTool struct {
	// contains filtered or unexported fields
}

BrowserEvalTool — run arbitrary JS. Always classified high-risk.

func NewBrowserEvalTool

func NewBrowserEvalTool(mgr *browser.Manager, policy BrowserHostPolicy) *BrowserEvalTool

func (*BrowserEvalTool) Execute

func (*BrowserEvalTool) Name

func (t *BrowserEvalTool) Name() string

type BrowserFillTool

type BrowserFillTool struct {
	// contains filtered or unexported fields
}

BrowserFillTool — type text into an input.

func NewBrowserFillTool

func NewBrowserFillTool(mgr *browser.Manager, policy BrowserHostPolicy) *BrowserFillTool

func (*BrowserFillTool) Execute

func (*BrowserFillTool) Name

func (t *BrowserFillTool) Name() string

type BrowserHostPolicy

type BrowserHostPolicy struct {
	Allowed []string
	Blocked []string
}

BrowserHostPolicy decides whether a given URL is reachable. Allowed hosts take precedence over blocked hosts only when the allow list is non-empty.

func (BrowserHostPolicy) CheckURL

func (p BrowserHostPolicy) CheckURL(rawURL string) error

CheckURL validates a URL against this policy. Returns nil when allowed, an error describing the violation otherwise.

type BrowserMarkdownTool

type BrowserMarkdownTool struct {
	// contains filtered or unexported fields
}

BrowserMarkdownTool — render the current page as markdown.

func NewBrowserMarkdownTool

func NewBrowserMarkdownTool(mgr *browser.Manager, policy BrowserHostPolicy) *BrowserMarkdownTool

func (*BrowserMarkdownTool) Execute

func (*BrowserMarkdownTool) Name

func (t *BrowserMarkdownTool) Name() string

type BrowserNavigateTool

type BrowserNavigateTool struct {
	// contains filtered or unexported fields
}

BrowserNavigateTool — alias of open with explicit risk semantics per scheme.

func NewBrowserNavigateTool

func NewBrowserNavigateTool(mgr *browser.Manager, policy BrowserHostPolicy) *BrowserNavigateTool

func (*BrowserNavigateTool) Execute

func (*BrowserNavigateTool) Name

func (t *BrowserNavigateTool) Name() string

type BrowserOpenTool

type BrowserOpenTool struct {
	// contains filtered or unexported fields
}

BrowserOpenTool — navigate to a URL.

func NewBrowserOpenTool

func NewBrowserOpenTool(mgr *browser.Manager, policy BrowserHostPolicy) *BrowserOpenTool

func (*BrowserOpenTool) Execute

func (*BrowserOpenTool) Name

func (t *BrowserOpenTool) Name() string

type BrowserScreenshotTool

type BrowserScreenshotTool struct {
	// contains filtered or unexported fields
}

BrowserScreenshotTool — PNG bytes (base64-encoded).

func NewBrowserScreenshotTool

func NewBrowserScreenshotTool(mgr *browser.Manager, policy BrowserHostPolicy) *BrowserScreenshotTool

func (*BrowserScreenshotTool) Execute

func (*BrowserScreenshotTool) Name

func (t *BrowserScreenshotTool) Name() string

type BrowserSelectTool

type BrowserSelectTool struct {
	// contains filtered or unexported fields
}

BrowserSelectTool — pick a value from a <select>.

func NewBrowserSelectTool

func NewBrowserSelectTool(mgr *browser.Manager, policy BrowserHostPolicy) *BrowserSelectTool

func (*BrowserSelectTool) Execute

func (*BrowserSelectTool) Name

func (t *BrowserSelectTool) Name() string

type BrowserTextTool

type BrowserTextTool struct {
	// contains filtered or unexported fields
}

BrowserTextTool — extract visible text by selector.

func NewBrowserTextTool

func NewBrowserTextTool(mgr *browser.Manager, policy BrowserHostPolicy) *BrowserTextTool

func (*BrowserTextTool) Execute

func (*BrowserTextTool) Name

func (t *BrowserTextTool) Name() string

type BrowserWaitTool

type BrowserWaitTool struct {
	// contains filtered or unexported fields
}

BrowserWaitTool — wait for selector to appear.

func NewBrowserWaitTool

func NewBrowserWaitTool(mgr *browser.Manager, policy BrowserHostPolicy) *BrowserWaitTool

func (*BrowserWaitTool) Execute

func (*BrowserWaitTool) Name

func (t *BrowserWaitTool) Name() string

type CanvasHandler

type CanvasHandler func(context.Context, string, string) (json.RawMessage, error)

CanvasHandler is bound by the application to one persisted session. It never receives model-selected identity, a database, renderer code or filesystem path.

type CanvasTool

type CanvasTool struct {
	// contains filtered or unexported fields
}

func NewCanvasTool

func NewCanvasTool(handler CanvasHandler) *CanvasTool

func (*CanvasTool) Available

func (t *CanvasTool) Available() bool

func (*CanvasTool) Description

func (t *CanvasTool) Description() string

func (*CanvasTool) Execute

func (t *CanvasTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

func (*CanvasTool) IsConcurrencySafe

func (t *CanvasTool) IsConcurrencySafe(input json.RawMessage) bool

func (*CanvasTool) Name

func (t *CanvasTool) Name() string

func (*CanvasTool) Schema

func (t *CanvasTool) Schema() json.RawMessage

type CheckpointListTool

type CheckpointListTool struct {
	// contains filtered or unexported fields
}

CheckpointListTool returns checkpoints for the current session.

func NewCheckpointListTool

func NewCheckpointListTool(m *checkpoint.Manager, sessionFn func() string) *CheckpointListTool

func (*CheckpointListTool) Execute

func (*CheckpointListTool) Name

func (t *CheckpointListTool) Name() string

type CheckpointRestoreTool

type CheckpointRestoreTool struct {
	// contains filtered or unexported fields
}

CheckpointRestoreTool rolls back to a named checkpoint.

func NewCheckpointRestoreTool

func NewCheckpointRestoreTool(m *checkpoint.Manager) *CheckpointRestoreTool

func (*CheckpointRestoreTool) Execute

func (*CheckpointRestoreTool) Name

func (t *CheckpointRestoreTool) Name() string

type CheckpointSnapshotTool

type CheckpointSnapshotTool struct {
	// contains filtered or unexported fields
}

CheckpointSnapshotTool captures the current contents of one or more files.

func NewCheckpointSnapshotTool

func NewCheckpointSnapshotTool(m *checkpoint.Manager, sessionFn func() string) *CheckpointSnapshotTool

func (*CheckpointSnapshotTool) Execute

func (*CheckpointSnapshotTool) Name

func (t *CheckpointSnapshotTool) Name() string

type CommitInfo

type CommitInfo struct {
	Hash    string
	Message string
	Author  string
	Date    string
}

type Compressor

type Compressor interface {
	ToolName() string
	Compress(output json.RawMessage) (json.RawMessage, int, error)
}

type CompressorRegistry

type CompressorRegistry struct {
	// contains filtered or unexported fields
}

func NewCompressorRegistry

func NewCompressorRegistry() *CompressorRegistry

func (*CompressorRegistry) Compress

func (cr *CompressorRegistry) Compress(toolName string, output json.RawMessage) (json.RawMessage, int, error)

func (*CompressorRegistry) Register

func (cr *CompressorRegistry) Register(c Compressor) error

type ConcurrencySafeTool

type ConcurrencySafeTool interface {
	Tool
	// IsConcurrencySafe reports whether this invocation of the tool
	// can run in parallel with other concurrent-safe tools. Tool
	// implementations should base this on the input — e.g., a Bash
	// tool returns true for "ls" but false for "npm install".
	IsConcurrencySafe(input json.RawMessage) bool
}

ConcurrencySafeTool is an optional interface. Tools that implement it can execute in parallel with other concurrency-safe tools. Tools that don't implement it default to exclusive execution (one at a time).

type CreateGoalTool

type CreateGoalTool struct {
	// contains filtered or unexported fields
}

func NewCreateGoalTool

func NewCreateGoalTool(q GoalQuerier) *CreateGoalTool

func (*CreateGoalTool) Execute

func (*CreateGoalTool) Name

func (t *CreateGoalTool) Name() string

type CronListTool

type CronListTool struct {
	// contains filtered or unexported fields
}

CronListTool returns every known cron job with its next run, sorted by next run (closest first). Read-only — the daemon owns dispatch.

func NewCronListTool

func NewCronListTool(s CronLister) *CronListTool

func (*CronListTool) Execute

func (*CronListTool) Name

func (t *CronListTool) Name() string

type CronLister

type CronLister interface {
	LoadJobs(ctx context.Context) ([]cron.Job, error)
}

CronLister is the minimal surface for listing cron jobs without a live Scheduler. *cron.PostgresJobStore satisfies it.

type CurrentModelProvider

type CurrentModelProvider interface {
	Model() string
}

CurrentModelProvider lets the tool ask for the model that's active RIGHT NOW so default-on filtering applies. Optional — nil disables auto-filter (returns everything).

type DAGMemoryTool

type DAGMemoryTool struct {
	// contains filtered or unexported fields
}

DAGMemoryTool identity is bound by application assembly, never model input.

func (*DAGMemoryTool) Available

func (t *DAGMemoryTool) Available() bool

func (*DAGMemoryTool) Description

func (t *DAGMemoryTool) Description() string

func (*DAGMemoryTool) Execute

func (t *DAGMemoryTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

func (*DAGMemoryTool) InterruptBehavior

func (t *DAGMemoryTool) InterruptBehavior() InterruptBehavior

func (*DAGMemoryTool) IsConcurrencySafe

func (t *DAGMemoryTool) IsConcurrencySafe(json.RawMessage) bool

func (*DAGMemoryTool) Name

func (t *DAGMemoryTool) Name() string

func (*DAGMemoryTool) Schema

func (t *DAGMemoryTool) Schema() json.RawMessage

type DelegateTool

type DelegateTool struct {
	// contains filtered or unexported fields
}

DelegateTool delegates work to sub-agents via the subagent.Manager.

func NewDelegateTool

func NewDelegateTool(manager *subagent.Manager) *DelegateTool

NewDelegateTool creates a DelegateTool backed by the given Manager. If manager is nil the tool is disabled and all calls return an error.

func (*DelegateTool) Execute

func (d *DelegateTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

Execute dispatches a single task or a batch of tasks to the sub-agent manager.

func (*DelegateTool) Name

func (d *DelegateTool) Name() string

Name returns the tool identifier.

type DevBrowserClickTool

type DevBrowserClickTool struct {
	Manager *devbrowser.Manager
}

DevBrowserClickTool implements devbrowser_click.

func NewDevBrowserClickTool

func NewDevBrowserClickTool(m *devbrowser.Manager) *DevBrowserClickTool

NewDevBrowserClickTool wires the manager.

func (*DevBrowserClickTool) Execute

func (*DevBrowserClickTool) Name

func (t *DevBrowserClickTool) Name() string

type DevBrowserOpenTool

type DevBrowserOpenTool struct {
	Manager *devbrowser.Manager
}

DevBrowserOpenTool implements browser_open.

func NewDevBrowserOpenTool

func NewDevBrowserOpenTool(m *devbrowser.Manager) *DevBrowserOpenTool

NewDevBrowserOpenTool wires the manager.

func (*DevBrowserOpenTool) Execute

func (*DevBrowserOpenTool) Name

func (t *DevBrowserOpenTool) Name() string

type DevBrowserSnapshotTool

type DevBrowserSnapshotTool struct {
	Manager *devbrowser.Manager
}

DevBrowserSnapshotTool implements browser_snapshot.

func NewDevBrowserSnapshotTool

func NewDevBrowserSnapshotTool(m *devbrowser.Manager) *DevBrowserSnapshotTool

NewDevBrowserSnapshotTool wires the manager.

func (*DevBrowserSnapshotTool) Execute

func (*DevBrowserSnapshotTool) Name

func (t *DevBrowserSnapshotTool) Name() string

type DevBrowserTypeTool

type DevBrowserTypeTool struct {
	Manager *devbrowser.Manager
}

DevBrowserTypeTool implements browser_type.

func NewDevBrowserTypeTool

func NewDevBrowserTypeTool(m *devbrowser.Manager) *DevBrowserTypeTool

NewDevBrowserTypeTool wires the manager.

func (*DevBrowserTypeTool) Execute

func (*DevBrowserTypeTool) Name

func (t *DevBrowserTypeTool) Name() string

type DiagnoseNextTierTool

type DiagnoseNextTierTool struct{}

DiagnoseNextTierTool returns the next ladder tier given a current one.

func NewDiagnoseNextTierTool

func NewDiagnoseNextTierTool() *DiagnoseNextTierTool

func (*DiagnoseNextTierTool) Execute

func (*DiagnoseNextTierTool) Name

func (t *DiagnoseNextTierTool) Name() string

type DiagramComponent

type DiagramComponent struct {
	Name        string   `json:"name"`
	Kind        string   `json:"kind"` // service, database, gateway, tool, external
	Description string   `json:"description"`
	DependsOn   []string `json:"depends_on"`
}

DiagramComponent describes one node in the architecture.

type DiagramInput

type DiagramInput struct {
	Title       string             `json:"title"`       // Diagram title
	Type        string             `json:"type"`        // Mermaid diagram type: flowchart, sequenceDiagram, classDiagram, erDiagram, graph
	Description string             `json:"description"` // Natural language description of what to diagram
	Components  []DiagramComponent `json:"components,omitempty"`
}

DiagramInput is the JSON input for the diagram tool.

type DiagramRenderer

type DiagramRenderer interface {
	Render(mermaid string, title string) (svg string, err error)
}

DiagramRenderer converts Mermaid syntax to rendered output.

type DiagramTool

type DiagramTool struct {
	// contains filtered or unexported fields
}

DiagramTool generates Mermaid architecture diagrams. The LLM calls this with a natural-language description of the architecture, and it returns a Mermaid diagram string + rendered HTML wrapper.

func NewDiagramTool

func NewDiagramTool(renderer DiagramRenderer) *DiagramTool

NewDiagramTool creates a diagram generation tool.

func (*DiagramTool) Description

func (t *DiagramTool) Description() string

Description explains what the tool does.

func (*DiagramTool) Execute

func (t *DiagramTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

Execute generates a Mermaid diagram from the input.

func (*DiagramTool) Name

func (t *DiagramTool) Name() string

Name returns the tool identifier.

func (*DiagramTool) Schema

func (t *DiagramTool) Schema() json.RawMessage

type ExecutionGuard

type ExecutionGuard func(context.Context, Tool, json.RawMessage) (json.RawMessage, error)

ExecutionGuard is installed by the application when constructing a session. The supplied tool is the original adapter; invoke it only after admission.

func NewCoordinationExecutionGuard

func NewCoordinationExecutionGuard(store *coordination.Store, peerID, workspace string) ExecutionGuard

NewCoordinationExecutionGuard binds application identity outside model input. The database lock covers admission through synchronous execution, so another peer cannot claim/reassign a path between checking it and writing the file. This is cooperative tool admission, not an OS or remote-process sandbox.

type ExecutionOptions

type ExecutionOptions struct {
	Timeout    time.Duration
	WorkingDir string
	Env        map[string]string
}

type FSInput

type FSInput struct {
	Action  string `json:"action"`
	Path    string `json:"path"`
	Content string `json:"content"`
	Old     string `json:"old"`
	New     string `json:"new"`
	Pattern string `json:"pattern"`
	Offset  int    `json:"offset"`
	Limit   int    `json:"limit"`
}

type FSTool

type FSTool struct {
	// contains filtered or unexported fields
}

func NewFSTool

func NewFSTool(rootDir string) *FSTool

func (*FSTool) Execute

func (f *FSTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

func (*FSTool) Name

func (f *FSTool) Name() string

type FactoryDeps

type FactoryDeps struct {
	Canvas     CanvasHandler        // application-bound persisted session canvas
	ACPRemotes map[string]ACPRemote // trusted named destinations/credentials

	// CWD is the working directory for file-system-scoped tools.
	CWD            string
	ExecutionGuard ExecutionGuard

	// ── Browser ──────────────────────────────────────────────────────
	BrowserManager *browser.Manager
	BrowserPolicy  BrowserHostPolicy

	// ── Dev browser (legacy narrow surface) ──────────────────────────
	DevBrowserManager *devbrowser.Manager

	// ── Vision ───────────────────────────────────────────────────────
	VisionDescriber vision.Describer

	// ── LSP ──────────────────────────────────────────────────────────
	LSPQuerier LSPQuerier
	LSPManager *lsp.Manager

	// ── Memory ───────────────────────────────────────────────────────
	MemoryOrchestrator *memory.Orchestrator

	// ── Plan ─────────────────────────────────────────────────────────
	PlanQuerier PlanQuerier

	// ── Checkpoint ───────────────────────────────────────────────────
	CheckpointManager   *checkpoint.Manager
	CheckpointSessionFn func() string

	// ── Subagent ─────────────────────────────────────────────────────
	SubagentManager *subagent.Manager

	// ── Goal ─────────────────────────────────────────────────────────
	GoalQuerier GoalQuerier

	// ── Tasks ────────────────────────────────────────────────────────
	TasksStore        TasksStore
	SessionIDProvider SessionIDProvider

	// ── Segments ─────────────────────────────────────────────────────
	SegmentsStore SegmentsStore

	// ── Standing Orders ──────────────────────────────────────────────
	StandingOrdersStore StandingOrdersStore

	// ── Journal ──────────────────────────────────────────────────────
	JournalQuerier JournalQuerier
	JournalReader  JournalReader // bookmark_recall

	// ── Playbooks ────────────────────────────────────────────────────
	PlaybooksStore PlaybooksStore

	// ── Automation ───────────────────────────────────────────────────
	AutomationLister AutomationLister
	CronLister       CronLister

	// ── FailHypo ─────────────────────────────────────────────────────
	FailHypoQuerier FailHypoQuerier

	// ── Learnings ────────────────────────────────────────────────────
	LearningsQuerier LearningsQuerier
	LearnRecorder    LearnRecorder

	// ── Pipeline ─────────────────────────────────────────────────────
	PipelineRunner PipelineRunner

	// ── Project Root ─────────────────────────────────────────────────
	ProjectRootResolver ProjectRootResolver

	// ── Ask User ─────────────────────────────────────────────────────
	AskUserBridge AskUserBridge

	// ── Alarm ────────────────────────────────────────────────────────
	AlarmGateway   AlarmGateway
	AlarmSessionFn func() string

	// ── Tags ─────────────────────────────────────────────────────────
	TagsManager *tags.Manager

	// ── Architecture Walls ───────────────────────────────────────────
	ArchitectureWall *walls.ArchitectureWall
	OuroborosWall    *walls.OuroborosWall

	// ── Regression Bank ──────────────────────────────────────────────
	RegressionBank *walls.RegressionBank

	// ── Autocommit ───────────────────────────────────────────────────
	AutoCommitter *automation.AutoCommitter

	// ── Multimodal ───────────────────────────────────────────────────
	MultimodalRegistry *multimodal.Registry

	// ── Introspect / Skill Extract ───────────────────────────────────
	IntrospectDir   string
	SkillExtractDir string

	// ── Extra tools ──────────────────────────────────────────────────
	// For sub-package tools (tts, messaging, imagegen) that live outside
	// the tools package and may transitively import gateway → agent →
	// tools (creating an import cycle if imported here). Callers in
	// cmd/overkill construct these tools and append them here.
	ExtraTools []Tool
}

FactoryDeps holds all optional runtime dependencies needed to construct tools. Fields are nil/zero when the corresponding subsystem is not available; NewDefaultRegistry skips tools whose dependencies are missing.

type FailHypoQuerier

type FailHypoQuerier interface {
	Search(query string) ([]journal.FailedHypothesis, error)
	SearchForModel(query, modelID string) ([]journal.FailedHypothesis, error)
	All() ([]journal.FailedHypothesis, error)
}

FailHypoQuerier is the minimal surface the tool needs from a real *journal.FailedHypothesisStore. Local so internal/tools doesn't take a hard dep on the concrete store type.

type FailHypoSearchTool

type FailHypoSearchTool struct {
	// contains filtered or unexported fields
}

func NewFailHypoSearchTool

func NewFailHypoSearchTool(q FailHypoQuerier) *FailHypoSearchTool

func (*FailHypoSearchTool) Execute

func (*FailHypoSearchTool) Name

func (t *FailHypoSearchTool) Name() string

func (*FailHypoSearchTool) WithCurrentModel

WithCurrentModel attaches a model provider so the tool defaults to filtering hits to the active model. Callers can still pass model_id="*" in the request to opt out and see every model.

type FileDiff

type FileDiff struct {
	Path      string
	Status    string
	Additions int
	Deletions int
}

type GetGoalTool

type GetGoalTool struct {
	// contains filtered or unexported fields
}

func NewGetGoalTool

func NewGetGoalTool(q GoalQuerier) *GetGoalTool

func (*GetGoalTool) Execute

func (*GetGoalTool) Name

func (t *GetGoalTool) Name() string

type GitCompressor

type GitCompressor struct{}

func (*GitCompressor) Compress

func (gc *GitCompressor) Compress(output json.RawMessage) (json.RawMessage, int, error)

func (*GitCompressor) ToolName

func (gc *GitCompressor) ToolName() string

type GitInput

type GitInput struct {
	Action      string   `json:"action"`
	Staged      bool     `json:"staged"`
	Stat        bool     `json:"stat"`
	Count       int      `json:"count"`
	Paths       []string `json:"paths"`
	Message     string   `json:"message"`
	Ref         string   `json:"ref"`
	StashAction string   `json:"stash_action"`
}

type GitTool

type GitTool struct {
	// contains filtered or unexported fields
}

func NewGitTool

func NewGitTool(workingDir string) *GitTool

func (*GitTool) Execute

func (g *GitTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

func (*GitTool) Name

func (g *GitTool) Name() string

type GlossaryAddTermTool

type GlossaryAddTermTool struct {
	// contains filtered or unexported fields
}

GlossaryAddTermTool appends a new term to CONTEXT.md so the canonical vocabulary grows alongside the conversation. Idempotent on the term identifier — calling twice with the same `term` overwrites the existing entry's body in place.

func NewGlossaryAddTermTool

func NewGlossaryAddTermTool(r ProjectRootResolver) *GlossaryAddTermTool

func (*GlossaryAddTermTool) Execute

func (*GlossaryAddTermTool) Name

func (t *GlossaryAddTermTool) Name() string

type GlossaryReadTool

type GlossaryReadTool struct {
	// contains filtered or unexported fields
}

func NewGlossaryReadTool

func NewGlossaryReadTool(r ProjectRootResolver) *GlossaryReadTool

func (*GlossaryReadTool) Execute

func (*GlossaryReadTool) Name

func (t *GlossaryReadTool) Name() string

type GoalQuerier

type GoalQuerier interface {
	SetWithBudgets(ctx context.Context, sessionID, text string, tokenBudget, timeBudget int) error
	Get(ctx context.Context, sessionID string) (goalJSON json.RawMessage, err error)
	SetStatus(ctx context.Context, sessionID string, status string) error
	GetStatus(ctx context.Context, sessionID string) (string, error)
}

GoalQuerier is the minimal surface the goal tools need. Defined locally so internal/tools stays free of concrete-store imports for testing — same pattern as PlanQuerier.

type GoalStoreBackend

type GoalStoreBackend interface {
	SetWithBudgets(ctx context.Context, sessionID, text string, tokenBudget, timeBudget int) error
	Get(ctx context.Context, sessionID string) (json.RawMessage, error)
	SetStatus(ctx context.Context, sessionID string, status string) error
}

GoalStoreBackend is the concrete store interface the tools need.

type GrepCompressor

type GrepCompressor struct{}

func (*GrepCompressor) Compress

func (gc *GrepCompressor) Compress(output json.RawMessage) (json.RawMessage, int, error)

func (*GrepCompressor) ToolName

func (gc *GrepCompressor) ToolName() string

type GrepInput

type GrepInput struct {
	Pattern    string `json:"pattern"`
	Include    string `json:"include"`
	MaxResults int    `json:"max_results"`
}

type GrepTool

type GrepTool struct {
	// contains filtered or unexported fields
}

func NewGrepTool

func NewGrepTool(rootDir string) *GrepTool

func (*GrepTool) Execute

func (g *GrepTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

func (*GrepTool) Name

func (g *GrepTool) Name() string

type HeadTailCompressor

type HeadTailCompressor struct {
	// contains filtered or unexported fields
}

HeadTailCompressor is a generic compressor that keeps the first and last portion of a long string-`output` ToolResult and drops the middle. Used for fs, web, browser_text/markdown, lsp_*, pty_shell, and patch.

func NewHeadTailCompressor

func NewHeadTailCompressor(tool string, head, tail int) *HeadTailCompressor

NewHeadTailCompressor builds a HeadTailCompressor that fires when the underlying ToolResult.Output exceeds head+tail+1024 bytes.

func (*HeadTailCompressor) Compress

func (h *HeadTailCompressor) Compress(output json.RawMessage) (json.RawMessage, int, error)

func (*HeadTailCompressor) ToolName

func (h *HeadTailCompressor) ToolName() string

type HoverResult

type HoverResult struct {
	Contents string `json:"contents"`
}

HoverResult is the trimmed hover payload returned to the agent.

type Hunk

type Hunk struct {
	OldStart int
	OldCount int
	NewStart int
	NewCount int
	Lines    []string // each starts with ' ', '-', or '+'
}

Hunk is one parsed @@ ... @@ block.

func ParseUnifiedDiff

func ParseUnifiedDiff(patch string) ([]Hunk, error)

ParseUnifiedDiff parses a unified diff string into hunks. File header lines (--- / +++) are tolerated and skipped.

type InterruptBehavior

type InterruptBehavior int

InterruptBehavior describes how a tool reacts to user interruption.

const (
	// InterruptCancel means the tool is killed immediately when the
	// user sends a new message. Suitable for read-only tools and
	// idempotent operations.
	InterruptCancel InterruptBehavior = iota
	// InterruptBlock means the tool finishes before the agent responds
	// to the user. Suitable for writes that must not leave half a file.
	InterruptBlock
)

type InterruptibleTool

type InterruptibleTool interface {
	Tool
	InterruptBehavior() InterruptBehavior
}

InterruptibleTool is an optional interface. Tools that implement it declare their interruption policy. Tools that don't default to InterruptBlock (let them finish).

type IntrospectTool

type IntrospectTool struct {
	// contains filtered or unexported fields
}

IntrospectTool exposes the introspection read-path.

func NewIntrospectTool

func NewIntrospectTool(dir string) *IntrospectTool

NewIntrospectTool wires the introspection dir. Pass empty to default to ~/.overkill/introspection.

func (*IntrospectTool) Execute

func (*IntrospectTool) Name

func (t *IntrospectTool) Name() string

type JournalGetTool

type JournalGetTool struct {
	// contains filtered or unexported fields
}

func NewJournalGetTool

func NewJournalGetTool(q JournalQuerier) *JournalGetTool

func (*JournalGetTool) Execute

func (*JournalGetTool) Name

func (t *JournalGetTool) Name() string

type JournalQuerier

type JournalQuerier interface {
	SearchFlight(opts journal.FlightSearchOptions) ([]journal.FlightIndexHit, error)
	TimelineFlight(anchorID string, depth int) ([]journal.Entry, error)
	GetFlight(id string) (*journal.Entry, error)
}

JournalQuerier is the minimal surface the journal tools need from a real *journal.FlightRecorder. Defined locally so internal/tools doesn't take a hard dep beyond the entry types it serialises.

type JournalReader

type JournalReader interface {
	GetFlight(id string) (*journal.Entry, error)
}

JournalReader is the minimal surface bookmark_recall needs from a real *journal.FlightRecorder.

type JournalSearchTool

type JournalSearchTool struct {
	// contains filtered or unexported fields
}

func NewJournalSearchTool

func NewJournalSearchTool(q JournalQuerier) *JournalSearchTool

func (*JournalSearchTool) Execute

func (*JournalSearchTool) Name

func (t *JournalSearchTool) Name() string

type JournalTimelineTool

type JournalTimelineTool struct {
	// contains filtered or unexported fields
}

func NewJournalTimelineTool

func NewJournalTimelineTool(q JournalQuerier) *JournalTimelineTool

func (*JournalTimelineTool) Execute

func (*JournalTimelineTool) Name

func (t *JournalTimelineTool) Name() string

type LSPDefinitionTool

type LSPDefinitionTool struct {
	// contains filtered or unexported fields
}

LSPDefinitionTool returns the definition site(s) of the symbol at a position.

func NewLSPDefinitionTool

func NewLSPDefinitionTool(q LSPQuerier) *LSPDefinitionTool

NewLSPDefinitionTool wires an LSPQuerier into the tool.

func (*LSPDefinitionTool) Execute

Execute implements Tool.

func (*LSPDefinitionTool) Name

func (t *LSPDefinitionTool) Name() string

Name implements Tool.

type LSPHoverTool

type LSPHoverTool struct {
	// contains filtered or unexported fields
}

LSPHoverTool returns hover documentation at file:line:column.

func NewLSPHoverTool

func NewLSPHoverTool(q LSPQuerier) *LSPHoverTool

NewLSPHoverTool wires an LSPQuerier into the tool.

func (*LSPHoverTool) Execute

Execute implements Tool.

func (*LSPHoverTool) Name

func (t *LSPHoverTool) Name() string

Name implements Tool.

type LSPQuerier

type LSPQuerier interface {
	// Available reports whether any language server is running and can handle
	// the given path. Tools short-circuit with a clear error otherwise.
	Available(path string) bool
	Hover(ctx context.Context, path string, line, col int) (HoverResult, error)
	Definition(ctx context.Context, path string, line, col int) ([]LocationResult, error)
	References(ctx context.Context, path string, line, col int) ([]LocationResult, error)
}

LSPQuerier is the minimal surface the LSP tools need. Keeping it local to the tools package avoids a hard dep on *lsp.Manager and lets tests fake it.

HoverClient / LocClient are tiny shims so we can return strongly-typed responses without leaking the full Client through the interface.

type LSPReferencesTool

type LSPReferencesTool struct {
	// contains filtered or unexported fields
}

LSPReferencesTool returns usage sites of the symbol at a position.

func NewLSPReferencesTool

func NewLSPReferencesTool(q LSPQuerier) *LSPReferencesTool

NewLSPReferencesTool wires an LSPQuerier into the tool.

func (*LSPReferencesTool) Execute

Execute implements Tool.

func (*LSPReferencesTool) Name

func (t *LSPReferencesTool) Name() string

Name implements Tool.

type LSPSymbolsTool

type LSPSymbolsTool struct {
	// contains filtered or unexported fields
}

LSPSymbolsTool returns the document outline for a file via the LSP manager. It still takes the concrete manager because document symbols isn't part of the minimal LSPQuerier surface — callers that don't have an *lsp.Manager can skip registering it.

func NewLSPSymbolsTool

func NewLSPSymbolsTool(mgr *lsp.Manager) *LSPSymbolsTool

NewLSPSymbolsTool wires an *lsp.Manager into the tool.

func (*LSPSymbolsTool) Execute

Execute implements Tool.

func (*LSPSymbolsTool) Name

func (t *LSPSymbolsTool) Name() string

Name implements Tool.

type LearnRecordTool

type LearnRecordTool struct {
	// contains filtered or unexported fields
}

LearnRecordTool wraps a LearnRecorder.

func NewLearnRecordTool

func NewLearnRecordTool(rec LearnRecorder) *LearnRecordTool

NewLearnRecordTool wraps the trigger. Pass a *skills.LearnTrigger.

func (*LearnRecordTool) Execute

func (*LearnRecordTool) Name

func (t *LearnRecordTool) Name() string

type LearnRecorder

type LearnRecorder interface {
	RecordSuccess(class string) bool
	Snapshot() map[string]int
}

LearnRecorder is the minimal surface this tool needs from a LearnTrigger.

type LearningsQuerier

type LearningsQuerier interface {
	Append(l plan.Learning) error
	All() ([]plan.Learning, error)
	Search(query string) ([]plan.Learning, error)
	SearchForModel(query, modelID string) ([]plan.Learning, error)
}

LearningsQuerier is the minimal surface the tools need.

type LearningsSearchTool

type LearningsSearchTool struct {
	// contains filtered or unexported fields
}

func NewLearningsSearchTool

func NewLearningsSearchTool(q LearningsQuerier) *LearningsSearchTool

func (*LearningsSearchTool) Execute

func (*LearningsSearchTool) Name

func (t *LearningsSearchTool) Name() string

func (*LearningsSearchTool) WithCurrentModel

type LocationResult

type LocationResult struct {
	File      string `json:"file"`
	Line      int    `json:"line"`
	Column    int    `json:"column"`
	EndLine   int    `json:"end_line,omitempty"`
	EndColumn int    `json:"end_column,omitempty"`
}

LocationResult is a file/line/column triple returned for definition/references.

type MemoryForgetTool

type MemoryForgetTool struct {
	// contains filtered or unexported fields
}

MemoryForgetTool deletes a stored memory (and its vector if applicable).

func NewMemoryForgetTool

func NewMemoryForgetTool(o *memory.Orchestrator) *MemoryForgetTool

func (*MemoryForgetTool) Execute

func (*MemoryForgetTool) Name

func (t *MemoryForgetTool) Name() string

type MemoryRecallTool

type MemoryRecallTool struct {
	// contains filtered or unexported fields
}

MemoryRecallTool searches stored memories by relevance.

func NewMemoryRecallTool

func NewMemoryRecallTool(o *memory.Orchestrator) *MemoryRecallTool

func (*MemoryRecallTool) Execute

func (*MemoryRecallTool) Name

func (t *MemoryRecallTool) Name() string

type MemoryRememberTool

type MemoryRememberTool struct {
	// contains filtered or unexported fields
}

MemoryRememberTool stores a memory and (when the bridge is wired) its embedding.

func NewMemoryRememberTool

func NewMemoryRememberTool(o *memory.Orchestrator) *MemoryRememberTool

func (*MemoryRememberTool) Execute

func (*MemoryRememberTool) Name

func (t *MemoryRememberTool) Name() string

type OuroborosWallTool

type OuroborosWallTool struct {
	// contains filtered or unexported fields
}

OuroborosWallTool runs the LLM-based adversarial code review. EXPENSIVE — every invocation costs a provider call against the configured review model. The agent should only call this when the user explicitly asks for a review, or before a destructive merge.

The wall needs its own provider (a separate LLM instance from the main agent — the §6.5 spec: "uses a different model so it isn't reviewing itself"). When the wall is constructed without a provider, the tool returns a configuration error so the agent surfaces the gap to the user instead of pretending it ran.

func NewOuroborosWallTool

func NewOuroborosWallTool(w *walls.OuroborosWall) *OuroborosWallTool

func (*OuroborosWallTool) Execute

func (*OuroborosWallTool) Name

func (t *OuroborosWallTool) Name() string

type PTYShellTool

type PTYShellTool struct {
	// contains filtered or unexported fields
}

PTYShellTool runs a command inside a pseudo-terminal so that progress bars, prompts, and other TTY-aware output behave the way the user expects.

func NewPTYShellTool

func NewPTYShellTool(cwd string, opts ...func(*PTYShellTool)) *PTYShellTool

func (*PTYShellTool) Execute

func (t *PTYShellTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

func (*PTYShellTool) Name

func (t *PTYShellTool) Name() string

type PatchCompressor

type PatchCompressor struct{}

PatchCompressor strips the file contents from a successful patch result, keeping only the per-file action summary. Failed patches keep their full error context so the agent can debug.

func (PatchCompressor) Compress

func (PatchCompressor) Compress(output json.RawMessage) (json.RawMessage, int, error)

func (PatchCompressor) ToolName

func (PatchCompressor) ToolName() string

type PatchInput

type PatchInput struct {
	Path  string `json:"path"`
	Patch string `json:"patch"`
}

PatchInput is the JSON schema accepted by the tool.

type PatchOutput

type PatchOutput struct {
	Path         string `json:"path"`
	HunksApplied int    `json:"hunks_applied"`
	Result       string `json:"result"` // resulting file content
}

PatchOutput is the JSON schema returned by the tool.

type PatchTool

type PatchTool struct {
	// contains filtered or unexported fields
}

PatchTool implements Tool. It validates and applies unified diffs.

func NewPatchTool

func NewPatchTool(rootDir string) *PatchTool

NewPatchTool creates a patch tool rooted at rootDir. Paths are resolved relative to it.

func (*PatchTool) Execute

func (p *PatchTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

Execute parses the patch and applies it.

func (*PatchTool) Name

func (p *PatchTool) Name() string

Name returns the tool identifier.

type PipelineRunner

type PipelineRunner interface {
	// Run executes all four stages sequentially. The result is whatever
	// JSON shape the underlying pipeline.PipelineResult marshals to; the
	// tool passes it through to the model without re-shaping.
	Run(ctx context.Context, request string) (json.RawMessage, error)
}

PipelineRunner is the minimal surface this tool needs from a real pipeline.Executor. Local interface keeps internal/tools free of the internal/pipeline import — the wire-up in cmd/overkill plugs a real Executor in. Returning a JSON-marshallable shape (passed through raw) means the tool doesn't need pipeline.PipelineResult either.

type PipelineTool

type PipelineTool struct {
	// contains filtered or unexported fields
}

PipelineTool exposes the runner as a single agent tool. The agent calls it with a free-text feature request; the tool returns the full 4-stage trace plus a success flag.

func NewPipelineTool

func NewPipelineTool(r PipelineRunner) *PipelineTool

func (*PipelineTool) Execute

func (*PipelineTool) Name

func (t *PipelineTool) Name() string

type PlanCheckTool

type PlanCheckTool struct {
	// contains filtered or unexported fields
}

func NewPlanCheckTool

func NewPlanCheckTool(q PlanQuerier) *PlanCheckTool

func (*PlanCheckTool) Execute

func (*PlanCheckTool) Name

func (t *PlanCheckTool) Name() string

type PlanClearTool

type PlanClearTool struct {
	// contains filtered or unexported fields
}

func NewPlanClearTool

func NewPlanClearTool(q PlanQuerier) *PlanClearTool

func (*PlanClearTool) Execute

func (*PlanClearTool) Name

func (t *PlanClearTool) Name() string

type PlanQuerier

type PlanQuerier interface {
	Current() *plan.Plan
	Set(title string, items []string) (*plan.Plan, error)
	Check(itemID, note string) (*plan.Plan, error)
	Uncheck(itemID string) (*plan.Plan, error)
	Clear() error
	Remaining() int
}

PlanQuerier is the minimal surface the plan tools need. Local interface keeps internal/tools free of concrete-store imports for testing — same pattern as JournalQuerier.

type PlanSetTool

type PlanSetTool struct {
	// contains filtered or unexported fields
}

func NewPlanSetTool

func NewPlanSetTool(q PlanQuerier) *PlanSetTool

func (*PlanSetTool) Execute

func (*PlanSetTool) Name

func (t *PlanSetTool) Name() string

type PlanStatusTool

type PlanStatusTool struct {
	// contains filtered or unexported fields
}

func NewPlanStatusTool

func NewPlanStatusTool(q PlanQuerier) *PlanStatusTool

func (*PlanStatusTool) Execute

func (*PlanStatusTool) Name

func (t *PlanStatusTool) Name() string

type PlaybookCreateTool

type PlaybookCreateTool struct {
	// contains filtered or unexported fields
}

func NewPlaybookCreateTool

func NewPlaybookCreateTool(s PlaybooksStore) *PlaybookCreateTool

func (*PlaybookCreateTool) Execute

func (*PlaybookCreateTool) Name

func (t *PlaybookCreateTool) Name() string

type PlaybookListTool

type PlaybookListTool struct {
	// contains filtered or unexported fields
}

func NewPlaybookListTool

func NewPlaybookListTool(s PlaybooksStore) *PlaybookListTool

func (*PlaybookListTool) Execute

func (*PlaybookListTool) Name

func (t *PlaybookListTool) Name() string

type PlaybookRankTool

type PlaybookRankTool struct {
	// contains filtered or unexported fields
}

func NewPlaybookRankTool

func NewPlaybookRankTool(s PlaybooksStore) *PlaybookRankTool

func (*PlaybookRankTool) Execute

func (*PlaybookRankTool) Name

func (t *PlaybookRankTool) Name() string

type PlaybookRecordOutcomeTool

type PlaybookRecordOutcomeTool struct {
	// contains filtered or unexported fields
}

func NewPlaybookRecordOutcomeTool

func NewPlaybookRecordOutcomeTool(s PlaybooksStore) *PlaybookRecordOutcomeTool

func (*PlaybookRecordOutcomeTool) Execute

func (*PlaybookRecordOutcomeTool) Name

type PlaybookRefineTool

type PlaybookRefineTool struct {
	// contains filtered or unexported fields
}

func NewPlaybookRefineTool

func NewPlaybookRefineTool(s PlaybooksStore) *PlaybookRefineTool

func (*PlaybookRefineTool) Execute

func (*PlaybookRefineTool) Name

func (t *PlaybookRefineTool) Name() string

type PlaybookUseTool

type PlaybookUseTool struct {
	// contains filtered or unexported fields
}

func NewPlaybookUseTool

func NewPlaybookUseTool(s PlaybooksStore) *PlaybookUseTool

func (*PlaybookUseTool) Execute

func (*PlaybookUseTool) Name

func (t *PlaybookUseTool) Name() string

type PlaybooksStore

type PlaybooksStore interface {
	Create(pb *playbooks.Playbook) (*playbooks.Playbook, error)
	Get(id string) (*playbooks.Playbook, error)
	Delete(id string) error
	Use(id string) (*playbooks.Playbook, error)
	RecordOutcome(id string, success bool) (*playbooks.Playbook, error)
	Refine(parentID, content, description string) (*playbooks.Playbook, error)
	All() ([]*playbooks.Playbook, error)
	Rank(taskType, query string, topK int, opts playbooks.RankOptions) ([]playbooks.Hit, error)
}

PlaybooksStore is the minimal surface the tools need.

type ProjectRootResolver

type ProjectRootResolver func() string

ProjectRootResolver supplies the project root path at tool-call time. Lazy because the working directory can change between agent boot and the first tool call.

type PushPreview

type PushPreview struct {
	Commits    []CommitInfo
	Files      []FileDiff
	HasSecrets bool
	SecretHits []SecretHit
}

func GeneratePushPreview

func GeneratePushPreview(ctx context.Context, workDir string) (*PushPreview, error)

type RecordLearningTool

type RecordLearningTool struct {
	// contains filtered or unexported fields
}

func (*RecordLearningTool) Execute

func (*RecordLearningTool) Name

func (t *RecordLearningTool) Name() string

func (*RecordLearningTool) WithCurrentModel

WithCurrentModel attaches a model provider so each recorded learning is tagged with the active model (§4.16).

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewDefaultRegistry

func NewDefaultRegistry(deps FactoryDeps) *Registry

NewDefaultRegistry builds a fully-populated Registry from the provided dependencies. Core tools (shell, fs, git, grep, web, patch, pty) are always registered. Infrastructure tools are registered only when their corresponding dependency is non-nil/zero. ExtraTools are unconditionally appended — callers are responsible for nil-checking before appending.

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Get

func (r *Registry) Get(name string) (Tool, error)

func (*Registry) GetConcurrency

func (r *Registry) GetConcurrency(name string, input json.RawMessage) (Tool, bool)

GetConcurrency checks whether the named tool with the given input is safe to run concurrently with other tools. Returns true for read-only operations (Read, Grep, Glob, LSP) and false for everything else (Bash, Write, Edit). Tools can implement the optional ConcurrencySafeTool interface for per-input decisions.

func (*Registry) Has

func (r *Registry) Has(name string) bool

Has reports whether a tool with the given name is already registered. Used by callers that want idempotent registration (e.g. MCP rescans).

func (*Registry) List

func (r *Registry) List() []string

func (*Registry) Register

func (r *Registry) Register(tool Tool) error

func (*Registry) SetExecutionGuard

func (r *Registry) SetExecutionGuard(guard ExecutionGuard)

type RegressionListTool

type RegressionListTool struct {
	// contains filtered or unexported fields
}

RegressionListTool returns all known regressions newest-first.

func NewRegressionListTool

func NewRegressionListTool(b *walls.RegressionBank) *RegressionListTool

func (*RegressionListTool) Execute

func (*RegressionListTool) Name

func (t *RegressionListTool) Name() string

type RegressionRecordTool

type RegressionRecordTool struct {
	// contains filtered or unexported fields
}

RegressionRecordTool persists a new regression after a bug-fix.

func NewRegressionRecordTool

func NewRegressionRecordTool(b *walls.RegressionBank) *RegressionRecordTool

func (*RegressionRecordTool) Execute

func (*RegressionRecordTool) Name

func (t *RegressionRecordTool) Name() string

type RegressionVerifyTool

type RegressionVerifyTool struct {
	// contains filtered or unexported fields
}

RegressionVerifyTool re-runs every recorded TestCmd and reports pass/fail.

func NewRegressionVerifyTool

func NewRegressionVerifyTool(b *walls.RegressionBank) *RegressionVerifyTool

func (*RegressionVerifyTool) Execute

func (*RegressionVerifyTool) Name

func (t *RegressionVerifyTool) Name() string

type SecretHit

type SecretHit struct {
	File    string
	Line    int
	Pattern string
	Preview string
}

func ScanForSecrets

func ScanForSecrets(ctx context.Context, workDir string) ([]SecretHit, error)

type SegmentCreateTool

type SegmentCreateTool struct {
	// contains filtered or unexported fields
}

func NewSegmentCreateTool

func NewSegmentCreateTool(s SegmentsStore) *SegmentCreateTool

func (*SegmentCreateTool) Execute

func (*SegmentCreateTool) Name

func (t *SegmentCreateTool) Name() string

type SegmentDeleteTool

type SegmentDeleteTool struct {
	// contains filtered or unexported fields
}

func NewSegmentDeleteTool

func NewSegmentDeleteTool(s SegmentsStore) *SegmentDeleteTool

func (*SegmentDeleteTool) Execute

func (*SegmentDeleteTool) Name

func (t *SegmentDeleteTool) Name() string

type SegmentListTool

type SegmentListTool struct {
	// contains filtered or unexported fields
}

func NewSegmentListTool

func NewSegmentListTool(s SegmentsStore) *SegmentListTool

func (*SegmentListTool) Execute

func (*SegmentListTool) Name

func (t *SegmentListTool) Name() string

type SegmentLoadTool

type SegmentLoadTool struct {
	// contains filtered or unexported fields
}

func NewSegmentLoadTool

func NewSegmentLoadTool(s SegmentsStore) *SegmentLoadTool

func (*SegmentLoadTool) Execute

func (*SegmentLoadTool) Name

func (t *SegmentLoadTool) Name() string

type SegmentRankTool

type SegmentRankTool struct {
	// contains filtered or unexported fields
}

func NewSegmentRankTool

func NewSegmentRankTool(s SegmentsStore) *SegmentRankTool

func (*SegmentRankTool) Execute

func (*SegmentRankTool) Name

func (t *SegmentRankTool) Name() string

type SegmentsStore

type SegmentsStore interface {
	Create(seg *memory.Segment) (*memory.Segment, error)
	Get(id string) (*memory.Segment, error)
	Delete(id string) error
	All() ([]*memory.Segment, error)
	Search(query string) ([]*memory.Segment, error)
	Rank(query string, topK int, opts memory.RankOptions) ([]memory.SegmentHit, error)
	Touch(id string) error
	LoadFiles(id string) ([]string, error)
}

SegmentsStore is the minimal surface the tools need.

type SessionGoalQuerier

type SessionGoalQuerier struct {
	// contains filtered or unexported fields
}

SessionGoalQuerier adapts a concrete GoalStore to the querier interface. The agent wiring layer creates this and passes it to tool constructors.

func NewSessionGoalQuerier

func NewSessionGoalQuerier(store GoalStoreBackend, sessionIDFn func() string) *SessionGoalQuerier

NewSessionGoalQuerier wraps a GoalStoreBackend with a session ID supplier.

func (*SessionGoalQuerier) Get

func (q *SessionGoalQuerier) Get(ctx context.Context, sessionID string) (json.RawMessage, error)

func (*SessionGoalQuerier) GetStatus

func (q *SessionGoalQuerier) GetStatus(ctx context.Context, sessionID string) (string, error)

func (*SessionGoalQuerier) SetStatus

func (q *SessionGoalQuerier) SetStatus(ctx context.Context, sessionID string, status string) error

func (*SessionGoalQuerier) SetWithBudgets

func (q *SessionGoalQuerier) SetWithBudgets(ctx context.Context, sessionID, text string, tokenBudget, timeBudget int) error

type SessionIDProvider

type SessionIDProvider interface {
	SessionID() string
}

SessionIDProvider lets the tool tag records with the active session ID without callers having to thread it manually.

type ShellCompressor

type ShellCompressor struct{}

func (*ShellCompressor) Compress

func (sc *ShellCompressor) Compress(output json.RawMessage) (json.RawMessage, int, error)

func (*ShellCompressor) ToolName

func (sc *ShellCompressor) ToolName() string

type ShellInput

type ShellInput struct {
	Command        string            `json:"command"`
	TimeoutSeconds int               `json:"timeout_seconds"`
	WorkingDir     string            `json:"working_dir"`
	Env            map[string]string `json:"env"`
}

type ShellOutput

type ShellOutput struct {
	// Raw combined bytes include ANSI escapes and the completion marker;
	// visible output retains at most 1 MiB plus a truncation notice.
	OutputTruncated bool   `json:"output_truncated,omitempty"`
	OutputBytes     int64  `json:"output_bytes,omitempty"`
	ExitCode        int    `json:"exit_code"`
	Stdout          string `json:"stdout"`
	Stderr          string `json:"stderr"`
	TimedOut        bool   `json:"timed_out"`
	Completed       bool   `json:"completed"`
	// Cwd is $PWD at the moment the marker fired — i.e. the working
	// directory the shell ended in (after any `cd` in the command).
	// Empty when the marker didn't carry a cwd (legacy / parse failure).
	Cwd string `json:"cwd,omitempty"`
	// ElapsedMs is wall-clock time from exec start to marker. Measured
	// Go-side. Includes shell startup + the command itself.
	ElapsedMs int64 `json:"elapsed_ms,omitempty"`
}

type ShellTool

type ShellTool struct {
	// contains filtered or unexported fields
}

func NewShellTool

func NewShellTool(opts ...func(*ShellTool)) *ShellTool

func (*ShellTool) Execute

func (s *ShellTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

func (*ShellTool) Name

func (s *ShellTool) Name() string

type SkillExtractTool

type SkillExtractTool struct {
	// contains filtered or unexported fields
}

SkillExtractTool writes a new SKILL.md under ~/.overkill/skills/<name>/.

func NewSkillExtractTool

func NewSkillExtractTool(outputDir string) *SkillExtractTool

NewSkillExtractTool wires the output directory. Pass empty to default to ~/.overkill/skills.

func (*SkillExtractTool) Execute

func (*SkillExtractTool) Name

func (t *SkillExtractTool) Name() string

type SliceDecomposeTool

type SliceDecomposeTool struct{}

SliceDecomposeTool wraps pipeline.DecomposeIntoSlices + pipeline.TopologicalSort behind the agent tool interface.

func NewSliceDecomposeTool

func NewSliceDecomposeTool() *SliceDecomposeTool

func (*SliceDecomposeTool) Execute

func (*SliceDecomposeTool) Name

func (t *SliceDecomposeTool) Name() string

type SpiderTestTool

type SpiderTestTool struct {
	// contains filtered or unexported fields
}

SpiderTestTool wraps a TestAgentRunner. The parent passes a spec + file list; the test agent never sees the parent's history.

func NewSpiderTestTool

func NewSpiderTestTool(ta TestAgentRunner) *SpiderTestTool

func (*SpiderTestTool) Execute

func (*SpiderTestTool) Name

func (t *SpiderTestTool) Name() string

type SpiderValidateTool

type SpiderValidateTool struct {
	// contains filtered or unexported fields
}

SpiderValidateTool re-runs an existing test bundle against the live impl files to catch tests-coupled-to-implementation. Same isolation contract: the validator sees only the test code + impl file paths, not the chat.

func NewSpiderValidateTool

func NewSpiderValidateTool(ta TestAgentRunner) *SpiderValidateTool

func (*SpiderValidateTool) Execute

func (*SpiderValidateTool) Name

func (t *SpiderValidateTool) Name() string

type StandingOrderAddTool

type StandingOrderAddTool struct {
	// contains filtered or unexported fields
}

func NewStandingOrderAddTool

func NewStandingOrderAddTool(s StandingOrdersStore) *StandingOrderAddTool

func (*StandingOrderAddTool) Execute

func (*StandingOrderAddTool) Name

func (t *StandingOrderAddTool) Name() string

type StandingOrderListTool

type StandingOrderListTool struct {
	// contains filtered or unexported fields
}

func NewStandingOrderListTool

func NewStandingOrderListTool(s StandingOrdersStore) *StandingOrderListTool

func (*StandingOrderListTool) Execute

func (*StandingOrderListTool) Name

func (t *StandingOrderListTool) Name() string

type StandingOrderRemoveTool

type StandingOrderRemoveTool struct {
	// contains filtered or unexported fields
}

func (*StandingOrderRemoveTool) Execute

func (*StandingOrderRemoveTool) Name

func (t *StandingOrderRemoveTool) Name() string

type StandingOrderToggleTool

type StandingOrderToggleTool struct {
	// contains filtered or unexported fields
}

func (*StandingOrderToggleTool) Execute

func (*StandingOrderToggleTool) Name

func (t *StandingOrderToggleTool) Name() string

type StandingOrdersStore

type StandingOrdersStore interface {
	AddEVR(text, verify, report string) (*automation.StandingOrder, error)
	Remove(id string) error
	SetEnabled(id string, enabled bool) error
	All() []automation.StandingOrder
}

StandingOrdersStore is the minimal surface the tools need.

type SubagentStatusTool

type SubagentStatusTool struct {
	// contains filtered or unexported fields
}

SubagentStatusTool returns the live StatusReport for a contract-driven child.

func NewSubagentStatusTool

func NewSubagentStatusTool(m *subagent.Manager) *SubagentStatusTool

NewSubagentStatusTool creates the tool. A nil manager disables it.

func (*SubagentStatusTool) Execute

func (*SubagentStatusTool) Name

func (t *SubagentStatusTool) Name() string

type SubagentWaitTool

type SubagentWaitTool struct {
	// contains filtered or unexported fields
}

SubagentWaitTool blocks the caller until the named contract child finishes (or the optional timeout elapses) and returns the FinalReport.

func NewSubagentWaitTool

func NewSubagentWaitTool(m *subagent.Manager) *SubagentWaitTool

NewSubagentWaitTool creates the tool. A nil manager disables it.

func (*SubagentWaitTool) Execute

func (t *SubagentWaitTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

func (*SubagentWaitTool) Name

func (t *SubagentWaitTool) Name() string

type TagAddTool

type TagAddTool struct {
	// contains filtered or unexported fields
}

TagAddTool registers a (path, tag) annotation in the user's tag store.

func NewTagAddTool

func NewTagAddTool(m *tags.Manager) *TagAddTool

func (*TagAddTool) Execute

func (t *TagAddTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

func (*TagAddTool) Name

func (t *TagAddTool) Name() string

type TagListTool

type TagListTool struct {
	// contains filtered or unexported fields
}

TagListTool lists tags, optionally filtered by tag name or path.

func NewTagListTool

func NewTagListTool(m *tags.Manager) *TagListTool

func (*TagListTool) Execute

func (t *TagListTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

func (*TagListTool) Name

func (t *TagListTool) Name() string

type TagRemoveTool

type TagRemoveTool struct {
	// contains filtered or unexported fields
}

TagRemoveTool removes (path, tag) — or all tags on the path if Tag is empty.

func NewTagRemoveTool

func NewTagRemoveTool(m *tags.Manager) *TagRemoveTool

func (*TagRemoveTool) Execute

func (t *TagRemoveTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

func (*TagRemoveTool) Name

func (t *TagRemoveTool) Name() string

type TaskCloseTool

type TaskCloseTool struct {
	// contains filtered or unexported fields
}

func NewTaskCloseTool

func NewTaskCloseTool(store TasksStore) *TaskCloseTool

func (*TaskCloseTool) Execute

func (*TaskCloseTool) Name

func (t *TaskCloseTool) Name() string

type TaskLinkCommitTool

type TaskLinkCommitTool struct {
	// contains filtered or unexported fields
}

func NewTaskLinkCommitTool

func NewTaskLinkCommitTool(store TasksStore) *TaskLinkCommitTool

func (*TaskLinkCommitTool) Execute

func (*TaskLinkCommitTool) Name

func (t *TaskLinkCommitTool) Name() string

type TaskListTool

type TaskListTool struct {
	// contains filtered or unexported fields
}

func NewTaskListTool

func NewTaskListTool(store TasksStore) *TaskListTool

func (*TaskListTool) Execute

func (*TaskListTool) Name

func (t *TaskListTool) Name() string

type TaskNoteTool

type TaskNoteTool struct {
	// contains filtered or unexported fields
}

func NewTaskNoteTool

func NewTaskNoteTool(store TasksStore) *TaskNoteTool

func (*TaskNoteTool) Execute

func (*TaskNoteTool) Name

func (t *TaskNoteTool) Name() string

type TaskOpenTool

type TaskOpenTool struct {
	// contains filtered or unexported fields
}

func NewTaskOpenTool

func NewTaskOpenTool(store TasksStore, p SessionIDProvider) *TaskOpenTool

func (*TaskOpenTool) Execute

func (*TaskOpenTool) Name

func (t *TaskOpenTool) Name() string

type TasksStore

type TasksStore interface {
	Open(sessionID, intent string) (*tasks.Task, error)
	Get(id string) (*tasks.Task, error)
	SetStatus(id string, status tasks.Status) (*tasks.Task, error)
	LinkCommit(id, sha string) (*tasks.Task, error)
	AppendNote(id, note string) (*tasks.Task, error)
	All() ([]*tasks.Task, error)
	OpenTasks() ([]*tasks.Task, error)
}

TasksStore is the minimal surface the tools need. Keeps the import boundary clean for testing.

type TestAgentRunner

type TestAgentRunner interface {
	GenerateTests(ctx context.Context, language string, files []string, spec, description string) (string, error)
	ValidateTests(ctx context.Context, testCode string, implFiles []string) (string, error)
}

TestAgentRunner is the minimal surface this tool needs from a real agent.TestAgent. Defined locally to avoid an import cycle (agent → tools is the canonical direction; tools must not import agent).

type Tool

type Tool interface {
	Name() string
	Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)
}

func NewACPTaskTools

func NewACPTaskTools(peers map[string]ACPRemote) []Tool

func NewAlarmCancelTool

func NewAlarmCancelTool(gw AlarmGateway) Tool

func NewAlarmListTool

func NewAlarmListTool(gw AlarmGateway) Tool

func NewAlarmSetTool

func NewAlarmSetTool(gw AlarmGateway, sessionID func() string) Tool

NewAlarmSetTool returns the alarm_set tool. sessionID is called at Execute time so the tool always stamps the CURRENT session id, even if the agent migrated sessions between registration and call.

func NewBoundRemoteCoordinationTools

func NewBoundRemoteCoordinationTools(endpoint, token string, expected coordination.Peer) ([]Tool, error)

NewBoundRemoteCoordinationTools requires the application's persisted identity on every call before sending effects. The model cannot supply this snapshot.

func NewCoordinationContractTool

func NewCoordinationContractTool(store *coordination.Store, peerID string) Tool

func NewCoordinationTools

func NewCoordinationTools(store *coordination.Store, peerID string) []Tool

NewCoordinationTools binds identity outside model input. The caller supplies an authenticated peer belonging to the session's project and owns the store.

func NewDAGMemoryTools

func NewDAGMemoryTools(store *seahorse.PostgresStore, session string) []Tool

func NewRemoteCoordinationTools

func NewRemoteCoordinationTools(endpoint, token string) ([]Tool, error)

NewRemoteCoordinationTools constructs six tools for one explicitly provisioned remote peer identity. Endpoint and scoped token belong to trusted application setup. Callers must not replace local identity-bound tools implicitly. This constructor alone does not persist a session binding or install an executor.

type ToolResult

type ToolResult struct {
	Output  string `json:"output"`
	Error   string `json:"error,omitempty"`
	Success bool   `json:"success"`
}

type UnderstandTool

type UnderstandTool struct {
	Registry *multimodal.Registry
	// Cwd is used to resolve relative paths. Empty allows absolute-
	// only paths.
	Cwd string
}

UnderstandTool wraps a multimodal.Registry. The agent calls Execute with {"path": "..."}.

func NewUnderstandTool

func NewUnderstandTool(r *multimodal.Registry, cwd string) *UnderstandTool

NewUnderstandTool wires a registry + cwd.

func (*UnderstandTool) Execute

func (*UnderstandTool) Name

func (u *UnderstandTool) Name() string

type UpdateGoalTool

type UpdateGoalTool struct {
	// contains filtered or unexported fields
}

func NewUpdateGoalTool

func NewUpdateGoalTool(q GoalQuerier) *UpdateGoalTool

func (*UpdateGoalTool) Execute

func (*UpdateGoalTool) Name

func (t *UpdateGoalTool) Name() string

type VisionDescribeTool

type VisionDescribeTool struct {
	Describer vision.Describer
	Mgr       *browser.Manager  // optional; required for url/screenshot modes
	Policy    BrowserHostPolicy // re-uses the same SSRF policy as browser tools
	// RootDir bounds the `file:` mode so `vision_describe` can't read
	// arbitrary paths like /etc/shadow. File mode fails closed without a root.
	RootDir string
}

VisionDescribeTool wraps a vision.Describer and (optionally) the browser manager so the agent can describe web pages without a separate "screenshot, then describe" two-step.

func NewVisionDescribeTool

func NewVisionDescribeTool(d vision.Describer, mgr *browser.Manager, policy BrowserHostPolicy) *VisionDescribeTool

NewVisionDescribeTool wires the dependencies. Mgr may be nil when only file-based describes are needed.

func (*VisionDescribeTool) Description

func (t *VisionDescribeTool) Description() string

func (*VisionDescribeTool) Execute

Execute resolves exactly one source of pixels then hands it to the describer. Sources are mutually exclusive in the docs but we degrade gracefully: url > file > current-viewport.

func (*VisionDescribeTool) Name

func (t *VisionDescribeTool) Name() string

func (*VisionDescribeTool) Schema

func (t *VisionDescribeTool) Schema() json.RawMessage

func (*VisionDescribeTool) WithRootDir

func (t *VisionDescribeTool) WithRootDir(dir string) *VisionDescribeTool

WithRootDir constrains the `file:` describe mode to a workspace root.

type WebInput

type WebInput struct {
	URL     string `json:"url"`
	Format  string `json:"format"`
	MaxSize int    `json:"max_size"`
}

type WebOutput

type WebOutput struct {
	URL         string `json:"url"`
	Content     string `json:"content"`
	StatusCode  int    `json:"status_code"`
	ContentType string `json:"content_type"`
	Truncated   bool   `json:"truncated"`
}

type WebTool

type WebTool struct {
	// contains filtered or unexported fields
}

func NewWebTool

func NewWebTool() *WebTool

func (*WebTool) AllowLocalForTests

func (w *WebTool) AllowLocalForTests() *WebTool

AllowLocalForTests bypasses the SSRF block so httptest servers (which bind 127.0.0.1) work in unit tests. Production callers must never set this — leaving it false keeps the agent from being a reflective probe for internal services.

func (*WebTool) Execute

func (w *WebTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

func (*WebTool) Name

func (w *WebTool) Name() string

type WorktreeAddTool

type WorktreeAddTool struct {
	// contains filtered or unexported fields
}

WorktreeAddTool creates a new isolated workspace.

func NewWorktreeAddTool

func NewWorktreeAddTool(repo string) *WorktreeAddTool

func (*WorktreeAddTool) Execute

func (t *WorktreeAddTool) Execute(ctx context.Context, input json.RawMessage) (json.RawMessage, error)

func (*WorktreeAddTool) Name

func (t *WorktreeAddTool) Name() string

type WorktreeListTool

type WorktreeListTool struct {
	// contains filtered or unexported fields
}

WorktreeListTool surfaces existing git worktrees.

func NewWorktreeListTool

func NewWorktreeListTool(repo string) *WorktreeListTool

func (*WorktreeListTool) Execute

func (*WorktreeListTool) Name

func (t *WorktreeListTool) Name() string

type WorktreeRemoveTool

type WorktreeRemoveTool struct {
	// contains filtered or unexported fields
}

WorktreeRemoveTool removes a worktree (risky — agent must route via approval).

func NewWorktreeRemoveTool

func NewWorktreeRemoveTool(repo string) *WorktreeRemoveTool

func (*WorktreeRemoveTool) Execute

func (*WorktreeRemoveTool) Name

func (t *WorktreeRemoveTool) Name() string

Directories

Path Synopsis
Package bash provides security classification for shell commands.
Package bash provides security classification for shell commands.
Package imagegen provides text-to-image generation tools for Overkill.
Package imagegen provides text-to-image generation tools for Overkill.
Package messaging provides cross-platform messaging tools for Overkill.
Package messaging provides cross-platform messaging tools for Overkill.
Package tts provides text-to-speech tools for Overkill.
Package tts provides text-to-speech tools for Overkill.

Jump to

Keyboard shortcuts

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