Documentation
¶
Overview ¶
Package worker owns host worker process execution for Brain drivers.
The package is the seam between deterministic orchestration policy and the unsafe OS-process layer: callers hand a Mission to a Runner, and concrete runners guarantee bounded execution, output prefixing, environment propagation, and process-tree cleanup.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mission ¶
type Mission struct {
Command string // worker command
MissionID string // logical mission id, when available
Root string // project root; when set, a durable spec-scoped mission record is persisted
SessionID string
WorkerID string
Spec string
TaskID string
Attempt int // task attempt (>= 1); keys the durable mission filename
Role string
Files []string // SPECD_ARTIFACT hint
Deadline string // RFC3339Nano
// Payload is optional mission-file JSON content. When nil, the Mission itself
// is written. This preserves the existing Pinky mission file contract while
// keeping process execution decoupled from internal/core types.
Payload any
}
Mission is the execution unit handed to a Runner.
type Runner ¶
Runner executes one Mission to completion (or deadline). Implementations own child process groups and must not leave orphaned children behind Run.
type ShellRunner ¶
ShellRunner runs missions with the POSIX shell contract used by Brain.
Click to show internal directories.
Click to hide internal directories.