harness

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 7 Imported by: 0

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

View Source
const (
	OpenCode = "opencode"
	Claude   = "claude"
	Codex    = "codex"
	Grok     = "grok"
	Muse     = "muse"
)

The harness words.

View Source
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.

View Source
const ProviderPrefix = "subscription-"

ProviderPrefix begins the provider word of a headless harness's route.

Variables

View Source
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

func IsHeadless(kind string) bool

IsHeadless reports whether kind is one of the headless harnesses.

func KindOf

func KindOf(bin string) string

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 MuseArgv added in v1.2.19

func MuseArgv(bin, model, promptFile string) []string

MuseArgv runs the route's model against the card's prompt file.

func MuseInput added in v1.2.19

func MuseInput(env []string) (key string, child []string)

MuseInput extracts the provider key while stripping it from the child environment.

func ProviderOf

func ProviderOf(kind string) string

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

type MuseResult struct {
	Text    string
	Model   string
	Usage   map[string]int64
	Failure string
	Turns   int
}

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.

Directories

Path Synopsis
Package notice is the one delivery rule every nova-hook harness shares (docs/SPEC-HOOK.md, the harness notice; TLA+ model owed: tla/HarnessNotice.tla, TLC on a bench later).
Package notice is the one delivery rule every nova-hook harness shares (docs/SPEC-HOOK.md, the harness notice; TLA+ model owed: tla/HarnessNotice.tla, TLC on a bench later).

Jump to

Keyboard shortcuts

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