Expand description
speccoder’s tools: what an attempt may do to
its worktree, served to agentplane as tool servers fs, proc and git.
Domain failures (no such file, ambiguous edit, protected path) come back
as ordinary results {"ok": false, "error": …} so the model can see them
and recover; agentplane ToolErrors are reserved for infrastructure.
Modules§
- paths
- Path rules for tools: normalisation, containment, secrets, and the protected set the model may never write.
- policy
- The policy classifier: every tool call is allowed, needs approval, or is denied — decided by code, before the call.
Structs§
- Edit
File - Replace an exact string in a file: once (it must occur exactly once) or everywhere.
- GitDiff
- Show the diff of the working tree against HEAD, optionally for one path.
- GitStatus
- Show changed, added and untracked files.
- List
Files - List files (not ignored by .gitignore), optionally under a directory and matching a glob.
- Read
File - Read a text file in the workspace, optionally a range of lines.
- Resolve
- speccoder’s own step, never offered to the model: the object a call would reach — the file a write lands in, the program a command runs.
- RunCommand
- Run a program (no shell) in the workspace with a timeout; stdin is closed.
- Search
Code - Search file contents with a regular expression (respects .gitignore).
- Tool
Spec - One tool as the model and agentplane see it.
- Workspace
Tools - Tools bound to one worktree.
- Write
File - Create or replace a whole file.
Constants§
- EXPECT
- The internal field the tool loop sets on a call decided on an object.
- LINE_
CAP - Characters kept per search-result line.
- LIST_
CAP list_filescap.- MAX_
COMMAND_ SECS - Longest
run_commandtimeout a model may ask for. - READ_
CAP read_filecap.- SEARCH_
CAP search_codematch cap.
Functions§
- catalog
- Every tool, in a stable order (the order is part of the cached prompt prefix).
- declarations
- The model-facing declarations, in catalog order.
- internal
- speccoder’s own tools, which the tool loop calls and the model is never
offered:
fs/resolve.