Documentation
¶
Overview ¶
Package harness is the vocabulary of the harnesses a card's child runs under: the one word a route row, a packet and a launch name a harness by. It is a leaf (standard library only) so nova-config's route kind, the sprint's route and nova-swarm's launcher all spell the words from one list.
A harness is known by the name of its program. opencode is the harness every provider row of the providers table launches (pkg/swarm providers.go); claude, codex and grok are the headless harnesses of the heavy tier (the owner, 2026-10-04): subscription logins on one machine, each run as a one-shot child printing its own usage, and the route row names which (docs/SPEC-SWARM.md, the headless harnesses).
Index ¶
Constants ¶
const ( OpenCode = "opencode" Claude = "claude" Codex = "codex" Grok = "grok" Muse = "muse" )
The harness words.
const MuseKeyEnv = "META_API_KEY"
MuseKeyEnv is the member's seat-secret name. It is consumed on stdin, removed from the harness environment, and never passed to tool children.
const ProviderPrefix = "subscription-"
ProviderPrefix begins the provider word of a headless harness's route.
Variables ¶
var Headless = []string{Claude, Codex, Grok}
Headless names the subscription harnesses that run one-shot and report usage. Muse is also headless, with a provider key on stdin instead of a subscription.
Kinds is every harness word a route row may carry, in the order a list prints them.
Functions ¶
func IsHeadless ¶
IsHeadless reports whether kind is one of the headless harnesses.
func KindOf ¶
KindOf is the harness a binary is: the headless harness its program name spells (`claude`, `/Users/g/.local/bin/codex`, `grok.exe`), and opencode for any other program, which the providers table launches as it always has.
func MuseInput ¶ added in v1.2.19
MuseInput extracts the provider key while stripping it from the child environment.
func ProviderOf ¶
ProviderOf is the provider word the routes of a headless harness carry: `subscription-claude`, `subscription-codex`, `subscription-grok`, and "" for any other kind. A rest is a provider's (internal/sprint route_rest.go), so one word per harness keeps one harness's expired login from resting the other two.
Types ¶
type MuseResult ¶ added in v1.2.19
MuseResult is the terminal answer and summed provider usage, with absent classes left absent. Failure is the terminal refusal for the existing classifier.
func ReadMuse ¶ added in v1.2.19
func ReadMuse(out []byte) (MuseResult, error)
ReadMuse reads the version-one JSONL envelopes. Model calls, not goal attribution mirrors, own the usage, so each reported call is counted once.