Skip to main content

Crate ralph_core

Crate ralph_core 

Source
Expand description

§ralph-core

Core orchestration functionality for the Ralph Orchestrator framework.

This crate provides:

  • The main orchestration loop for coordinating multiple agents
  • Configuration loading and management
  • State management for agent sessions
  • Message routing between agents
  • Terminal capture for session recording
  • Benchmark task definitions and workspace isolation

Re-exports§

pub use task_definition::TaskDefinition;
pub use task_definition::TaskDefinitionError;
pub use task_definition::TaskSetup;
pub use task_definition::TaskSuite;
pub use task_definition::Verification;
pub use workspace::CleanupPolicy;
pub use workspace::TaskWorkspace;
pub use workspace::VerificationResult;
pub use workspace::WorkspaceError;
pub use workspace::WorkspaceInfo;
pub use workspace::WorkspaceManager;

Modules§

task_definition
Task definition types for benchmark harness.
testing
Testing utilities for deterministic E2E tests.
workspace
Workspace isolation for benchmark tasks.

Structs§

CliCapture
A writer that captures all output while forwarding to an inner writer.
CliCapturePair
A pair of capture wrappers for stdout and stderr.
CliConfig
CLI backend configuration.
CoreConfig
Core paths and settings shared across all hats.
Event
A simplified event for reading from JSONL.
EventHistory
Reader for event history files.
EventLogger
Logger that writes events to a JSONL file.
EventLoop
The main event loop orchestrator.
EventLoopConfig
Event loop configuration.
EventMetadata
Metadata for an event topic.
EventParser
Parser for extracting events from CLI output.
EventReader
Reads new events from .agent/events.jsonl since last read.
EventRecord
A logged event record for debugging.
HatConfig
Configuration for a single hat.
HatInfo
Information about a hat for prompt generation.
HatRegistry
Registry for managing and creating hats from configuration.
HatTopology
Hat topology for multi-hat mode prompt generation.
HatlessRalph
Hatless Ralph - the constant coordinator.
InstructionBuilder
Builds instructions for custom hats.
LoopState
Current state of the event loop.
MalformedLine
Information about a malformed JSONL line.
ParseResult
Result of parsing events from a JSONL file.
PlayerConfig
Configuration for session playback.
RalphConfig
Top-level configuration for Ralph Orchestrator.
Record
A timestamped record in the JSONL session file.
SessionPlayer
Plays back recorded sessions.
SessionRecorder
Records session events to a JSONL output.
SummaryWriter
Writes the loop summary file on termination.
TimestampedRecord
A parsed record with timing information for replay.

Enums§

HatBackend
Backend configuration for a hat.
ReplayMode
Replay mode for session playback.
TerminationReason
Reason the event loop terminated.