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 (Claude, Codex, OpenCode, Gemini, or Cursor).
- ArgSpec
- A single CLI argument/flag.
- 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.
- 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.
- Plugin
Processor Config - Plugin processor executable configuration.
- Plugin
Runner Config - Plugin runner executable 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§
- Claude
Permission Mode - GitRevert
Mode - Git revert mode for handling runner/supervision errors.
- 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
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.