Expand description
Contracts module for Ralph configuration and queue/task JSON structures.
Responsibilities:
- Own the canonical data models for config, queue, and task contracts.
- Re-export the public contract types for crate-wide access.
Not handled here:
- Queue persistence and IO (see
crate::queue). - CLI argument parsing or command behavior (see
crate::cli).
Invariants/assumptions:
- Public contract types remain stable and are re-exported from this module.
- Serde/schemars attributes define the wire contract and must not drift.
Re-exports§
pub use crate::constants::versions::SESSION_STATE_VERSION;
Structs§
- Agent
Config - Agent runner defaults. Built-in runner IDs: codex, opencode, gemini, claude, cursor, kimi, pi. Plugin runner IDs are also supported as non-empty strings.
- ArgSpec
- A single CLI argument/flag.
- Blocking
State - CiGate
Config - Structured CI gate execution settings.
- CliSpec
- Root CLI spec document.
- Command
Spec - A command/subcommand and its arguments.
- Config
- Root configuration struct for Ralph.
- Loop
Config - Run loop waiting configuration for daemon/continuous mode.
- Machine
CliSpec Document - Machine
Config Resolve Document - Machine
Config Safety Summary - Machine
Continuation Action - Machine
Continuation Summary - Machine
Dashboard Read Document - Machine
Decompose Document - Machine
Doctor Report Document - Machine
Error Document - Machine
Graph Read Document - Machine
Parallel Lifecycle Counts - Worker counts by lifecycle for
machine run parallel-status(document v3+). - Machine
Parallel Status Document - Machine
Queue Paths - Machine
Queue Read Document - Machine
Queue Repair Document - Machine
Queue Undo Document - Machine
Queue Unlock Inspect Document - Machine
Queue Validate Document - Machine
Resume Decision - Machine
RunEvent Envelope - Machine
RunSummary Document - Machine
System Info Document - Machine
Task Create Document - Machine
Task Create Request - Machine
Task Mutation Document - Machine
Validation Warning - Machine
Workspace Overview Document - Notification
Config - Desktop notification configuration.
- Parallel
Config - Parallel run-loop configuration.
- Phase
Override Config - Per-phase configuration overrides for runner, model, and reasoning effort.
- Phase
Overrides - Phase overrides container for Phase 1/2/3 execution.
- Phase
Settings Snapshot - Per-phase settings persisted for display/logging purposes.
- Plugin
Config - Per-plugin configuration.
- Plugins
Config - Plugin configuration container.
- Queue
Aging Thresholds - Aging threshold configuration for
ralph queue aging. - Queue
Config - Queue-related configuration.
- Queue
File - Runner
CliConfig Root - Runner
CliOptions Patch - Runner
Retry Config - Runner retry/backoff configuration for transient failure handling.
- Session
State - Session state persisted to enable crash recovery.
- Task
- Task
Agent - Webhook
Config - Webhook configuration for HTTP task event notifications.
Enums§
- Blocking
Reason - Blocking
Status - Claude
Permission Mode - GitPublish
Mode - Git publish mode for post-run repository changes.
- GitRevert
Mode - Git revert mode for handling runner/supervision errors.
- Machine
Error Code - Machine
Queue Unlock Condition - Machine
RunEvent Kind - Model
- Model
Effort - Project
Type - Project type classification.
- Reasoning
Effort - Runner
- Runner
Approval Mode - Runner
Output Format - Runner
Plan Mode - Runner
Sandbox Mode - Runner
Verbosity - Scan
Prompt Version - Scan prompt version to use for scan operations.
- Task
Priority - Task priority used for queue ordering and display.
- Task
Status - Unsupported
Option Policy - Webhook
Event Subscription - Webhook event subscription type for config. Each variant corresponds to a WebhookEventType, plus Wildcard for “all events”.
- Webhook
Queue Policy - Backpressure policy for webhook delivery queue.
Constants§
- CLI_
SPEC_ VERSION - Current JSON format version for
CliSpec. - MACHINE_
CLI_ SPEC_ VERSION - MACHINE_
CONFIG_ RESOLVE_ VERSION - MACHINE_
DASHBOARD_ READ_ VERSION - MACHINE_
DECOMPOSE_ VERSION - MACHINE_
DOCTOR_ REPORT_ VERSION - MACHINE_
ERROR_ VERSION - MACHINE_
GRAPH_ READ_ VERSION - MACHINE_
PARALLEL_ STATUS_ VERSION - MACHINE_
QUEUE_ READ_ VERSION - MACHINE_
QUEUE_ REPAIR_ VERSION - MACHINE_
QUEUE_ UNDO_ VERSION - MACHINE_
QUEUE_ UNLOCK_ INSPECT_ VERSION - MACHINE_
QUEUE_ VALIDATE_ VERSION - MACHINE_
RUN_ EVENT_ VERSION - MACHINE_
RUN_ SUMMARY_ VERSION - MACHINE_
SYSTEM_ INFO_ VERSION - MACHINE_
TASK_ CREATE_ VERSION - MACHINE_
TASK_ MUTATION_ VERSION - MACHINE_
WORKSPACE_ OVERVIEW_ VERSION