verbs

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 109 Imported by: 0

Documentation

Overview

Package verbs is every verb of csf, the one application (#600): one process per machine that runs every agent session, and the thin client that talks to it. app/csf/cmd is only the process around Main. The harness and the knowledge, simulation and Copilot Workbench host were two binaries, both installed as csf; they are this one, the host's entry points under csf host.

csf host serve|mcp|initialize [flags] | call OPERATION | link | links ... | spine
csf bootstrap -repo DIR -local | csf ARCHIVE.tar.gz [ARGS...]
csf decide ... | csf scoreboard ...
csf init [-repo DIR] [-state DIR] [-listen ADDR]
csf serve -listen 127.0.0.1:14120 [-listen ADDR]... [-redirect ADDR]... [-state DIR] [-claude PATH] [-copilot PATH] [-executor claude-code|copilot] [-model MODEL] [-database-config FILE] [-ouroboros-repository DIR] [-ouroboros-fixers] [-ouroboros-corpus DIR] [-workbench-recipes DIR] [-detach]
csf submit -recipe agent.json | check -recipe agent.json
csf send -assignment ID [-operator] -message TEXT | -message-file FILE
csf propose -assignment ID -diff FILE -message TEXT
csf executor [-executor claude-code|copilot [-model MODEL]]
csf chat -assignment ID
csf list | get -assignment ID | cancel -assignment ID | ready -assignment ID | merge -assignment ID | events -assignment ID [-from N] | stop [-deadline D]
csf await CONDITION -deadline D [-pid N] [-assignment ID] [-phase P] [-turn N] [-pull-request PR] [-repository R] [-url U] [-status S] [-load L]
csf housekeeping -trigger NAME [-trigger NAME]... [-dry-run] [-scratch DIR]
csf ouroboros precheck -repository DIR [-state DIR] [-ticket N]...
csf slice add -ticket URL -recipe DIR [-slice ID] [-title T] [-depends-on ID]... [-contends ID]... [-hotspot NAME]... [-path GLOB]...
csf slice hold|release -slice ID -reason TEXT | pause|resume -reason TEXT | status
csf slice record|verify -assignment ID [-state DIR]
csf label -repo OWNER/NAME -model-container NAME (-ticket N | -tickets-file FILE)... [-model NAME] [-model-endpoint URL] [-checkout DIR] [-miner NAME=EXE]... [-batches N] [-think]
csf db status|start|stop [-state DIR]
csf docs link [-repo DIR] [PATH...]
csf endpoint retire -address HOST:PORT -moved-to HOST:PORT -acknowledgement TEXT [-state DIR]
csf upgrade [-commit SHA | -rollback] [-binary PATH] [-state DIR]
csf status [AGENT]... [-state DIR]
csf tail [AGENT]... [-kinds KINDS] [-n N] [-state DIR]

init, run at the root of any git repository, writes the sample assignment under .csf/assignments/sample and registers with the running host, or starts one, recording the repository as the mining loop's checkout when none is recorded yet. chat prints a session's chat address. serve is the host app: it brings up CSF's own database (a PostgreSQL container it owns, recorded in <state>/database.json; -database-config names someone else's instead), builds the one host runtime, mounts the session service, the cron service with the default housekeeping triggers (backups of the owned database hourly, and the -widgets checkout fast-forwarded every minute and after every merge), the mining loop with its four triggers (its checkout and corpus from -ouroboros-repository and -ouroboros-corpus, or as recorded in <state>/ouroboros-settings.json; -ouroboros-fixers lets it launch fixer sessions), the slice dispatcher and its pass every minute (csf slice add puts work in its graph), the chat, the Workbench at / (the operator's control plane: every session's card, live from the state directory, with its actions, and the launch form over the -workbench-recipes templates), the generated operations over HTTP and at /mcp, and one HTTP listener per address, plus one per -redirect alias that redirects every request to the same path on the first address's port, and records where it listens in <state>/harness.json. It refuses to start, before detaching, when an address of the endpoint registry (<state>/endpoints/registry.json) is neither served nor retired, and registers every address it serves once it listens; endpoint retire is the operator's record that an address is retired. Every session is given that /mcp as its csf MCP server. housekeeping runs named triggers once, now, against the running host's sessions, and prints every record it writes. label runs the ouroboros labeler over the mining tickets named, with the local model, and records every label under <state>/labeler.jsonl and the run under <state>/labeler.json for the Workbench's panel. db reports, starts or stops the owned database; stop leaves it running. stop returns once the host process has exited, as serve -detach returns once the host is ready; await waits for one condition up to its deadline, through the host's Await operation or, for harness-ready and harness-stopped, in the client. docs link links the ontology terms the README lint reports, in the named files or every tracked README. upgrade installs the csf binary CI released for a commit, or latest main, after checking its SHA-256, keeps the one it replaced for upgrade -rollback, and restarts the running host with the argument vector harness.json records, returning once the Workbench answers. status prints every session as one table row over the session_progress projection, and tail prints the lines its event logs fold to, labelled by agent; both read the state directory directly, never the host. Every other verb is a client of the generated harness operations, reaching the host at the recorded endpoint or -endpoint. Claude Code calls the same binary for each session gate:

csf gate PreToolUse <run directory>   < hook input

A Copilot session calls it the same way, through a plugin holding the same hooks. csf install-gates [-home DIR] hooks the operator's own Claude Code and Copilot sessions up to the gate, called on the home directory, which holds no run, so the gate answers in operator mode:

csf gate PreToolUse <home>   < hook input

A run lives in <state>/<assignment id>: events.jsonl, settings.json, run.json, the worktree and, while the session runs, its Bazel output base.

Index

Constants

View Source
const (

	// GitHubTokenVariable and GHTokenVariable name the token the GitHub
	// protocol client authenticates with, read through the config
	// capability, the first that is set.
	GitHubTokenVariable = "GITHUB_TOKEN"
	GHTokenVariable     = "GH_TOKEN"
	// GhConfigVariable and HomeVariable locate gh's config directory, whose
	// hosts.yml holds the token gh itself uses when neither variable is set.
	GhConfigVariable = "GH_CONFIG_DIR"
	HomeVariable     = "HOME"
)
View Source
const (

	// HousekeepingRecordFile is where every housekeeping record is appended,
	// one JSON object per line.
	HousekeepingRecordFile = "housekeeping.jsonl"

	// HostRecordFile is where serve records its endpoint and pid, for the
	// client verbs and for the operator.
	HostRecordFile = "harness.json"
)
View Source
const (

	// SampleDirectory is where init writes the sample assignment, relative
	// to the repository root.
	SampleDirectory = ".csf/assignments/sample"
)

Variables

This section is empty.

Functions

func Main

func Main(ctx context.Context, arguments []string, input io.Reader, output io.Writer, diagnostics io.Writer) int

Main runs one csf invocation, arguments after the binary name, and returns its exit status. The process's signals, streams and exit belong to the binary that calls it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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