pub struct HatlessRalph { /* private fields */ }Expand description
Hatless Ralph - the constant coordinator.
Implementations§
Source§impl HatlessRalph
impl HatlessRalph
Sourcepub fn new(
completion_promise: impl Into<String>,
core: CoreConfig,
registry: &HatRegistry,
starting_event: Option<String>,
) -> Self
pub fn new( completion_promise: impl Into<String>, core: CoreConfig, registry: &HatRegistry, starting_event: Option<String>, ) -> Self
Creates a new HatlessRalph.
§Arguments
completion_promise- String that signals loop completioncore- Core configuration (scratchpad, specs_dir, guardrails)registry- Hat registry for topology generationstarting_event- Optional event to publish after coordination to start hat workflow
Sourcepub fn build_prompt(&self, context: &str, active_hats: &[&Hat]) -> String
pub fn build_prompt(&self, context: &str, active_hats: &[&Hat]) -> String
Builds Ralph’s prompt with filtered instructions for only active hats.
This method reduces token usage by including instructions only for hats that are currently triggered by pending events, while still showing the full hat topology table for context.
For solo mode (no hats), pass an empty slice: &[]
Sourcepub fn should_handle(&self, _topic: &Topic) -> bool
pub fn should_handle(&self, _topic: &Topic) -> bool
Always returns true - Ralph handles all events as fallback.
Auto Trait Implementations§
impl Freeze for HatlessRalph
impl RefUnwindSafe for HatlessRalph
impl Send for HatlessRalph
impl Sync for HatlessRalph
impl Unpin for HatlessRalph
impl UnsafeUnpin for HatlessRalph
impl UnwindSafe for HatlessRalph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more