Documentation
¶
Overview ¶
Terminal application that composes the harness, the window manager and the cards, with a headless runner for scripts
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Headless ¶
func Headless(ctx context.Context, opts HeadlessOptions) int
Runs one prompt, mission or workflow to completion without a terminal and returns the exit code
func StartMission ¶
Message that starts a mission handed on the command line once the program is up
func StartPrompt ¶
Message that starts a prompt handed on the command line once the program is up
func StartWorkflow ¶
Message that starts a workflow handed on the command line once the program is up
Types ¶
type HeadlessOptions ¶
type HeadlessOptions struct {
Config harness.Config
Resume string
Dir string
// Prompt to run, read from Input when empty
Prompt string
// Objective a mission is started with instead of a plain prompt
Mission string
// Kind the session runs as, none when empty
Kind string
// Workflow run with the prompt as its argument instead of a plain run
Workflow string
// Writes every bridge message as one JSON object per line instead of text
Print bool
// Answers every approval yes, every approval is denied otherwise
Yes bool
Out io.Writer
Err io.Writer
In io.Reader
}
What a scripted run needs beside the configuration
type Line ¶
type Line struct {
Type string `json:"type"`
Time time.Time `json:"time"`
Run string `json:"run,omitempty"`
Seq int64 `json:"seq,omitempty"`
Agent string `json:"agent,omitempty"`
Parent string `json:"parent,omitempty"`
Depth int `json:"depth,omitempty"`
Round int `json:"round,omitempty"`
Event string `json:"event,omitempty"`
Kind string `json:"kind,omitempty"`
Index int `json:"index,omitempty"`
Delta string `json:"delta,omitempty"`
Text string `json:"text,omitempty"`
Call *protocol.ToolCall `json:"call,omitempty"`
Result json.RawMessage `json:"result,omitempty"`
IsError bool `json:"is_error,omitempty"`
Error string `json:"error,omitempty"`
Usage *protocol.Usage `json:"usage,omitempty"`
Duration float64 `json:"duration_ms,omitempty"`
Data json.RawMessage `json:"data,omitempty"`
Verdict string `json:"verdict,omitempty"`
Status int `json:"status,omitempty"`
Path string `json:"path,omitempty"`
}
One bridge message as the print mode writes it
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Bubble Tea model running the harness behind the window manager
func (*Model) Filter ¶
Program filter that runs the shutdown before any quit message, whichever card or signal raised it
func (*Model) Init ¶
Starts the manager and restored cards, lists models, watches the keybind file and fires the session start hooks