Documentation
¶
Overview ¶
Package harness defines the public execution seam for runner adapters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface {
Probe(context.Context) (Info, error)
Run(context.Context, Launch, Emit) (Result, error)
}
Adapter probes its executable and runs one isolated agent turn.
type Clarification ¶
Clarification is a bounded product question that can be answered by a caller before resuming the existing harness session.
type Emit ¶
Emit receives adapter events. Implementations must treat an error as a terminal failure and stop producing events for the launch.
type Event ¶
type Event struct {
Type string `json:"type"`
SessionID string `json:"sessionID,omitempty"`
TurnID string `json:"turnID,omitempty"`
Message string `json:"message,omitempty"`
Data json.RawMessage `json:"data,omitempty"`
Clarification *Clarification `json:"clarification,omitempty"`
}
Event is a bounded adapter event forwarded to the runner state engine.
type Info ¶
type Info struct {
Name string `json:"name"`
Version string `json:"version"`
Ready bool `json:"ready"`
Reasons []string `json:"reasons,omitempty"`
}
Info describes an adapter's executable and readiness state.
type Launch ¶
type Launch struct {
AttemptID string `json:"attemptID"`
Workdir string `json:"workdir"`
SessionID string `json:"sessionID,omitempty"`
Instructions string `json:"instructions"`
Model string `json:"model,omitempty"`
}
Launch identifies one worker attempt and the thread turn it should execute.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package claude adapts headless Claude Code to the runner harness.
|
Package claude adapts headless Claude Code to the runner harness. |
|
Package codex adapts the Codex app-server protocol to the runner harness.
|
Package codex adapts the Codex app-server protocol to the runner harness. |
|
internal
|
|
|
proc
Package proc holds the process-group primitives every harness adapter needs.
|
Package proc holds the process-group primitives every harness adapter needs. |
Click to show internal directories.
Click to hide internal directories.