gizai/agent/coding
The coding tools of an agent that works on one machine: read, bash, edit and write, with the names, arguments, limits and result texts that coding models are trained on (pi's tool set, github.com/earendil-works/pi, MIT). Each tool is a bash command of the host's Shell (a container, a computer, a remote host), so the tools work wherever bash runs, and a result is plain text: a file's lines reach the model as lines, not as an escaped JSON string.
import * as Coding from "gizai/agent/coding";Types
Shell
type Shell = (command: string, input: Option<bytes>, seconds: i64) => RanRuns COMMAND with bash on the machine, INPUT (when given) on its standard input, its standard error merged into its output, killed after SECONDS: exit code 124 when it was.
Functions
instructions
function instructions(cwd: string): stringThe instructions that go with the tools, for an agent working in folder CWD; the host appends its own.
Effects: fail, alloc.
tools
function tools(shell: Shell): Vec<Agent.Tool>The tools read, bash, edit and write on the machine of SHELL.
Effects: fail, read, write, alloc.