Skip to main content

Module effects

Module effects 

Source
Expand description

Running effectful steps.

The loop is small on purpose:

poll ──► Await(effects) ──► perform (concurrently, journaled) ──┐
  ▲                                                             │
  └─────────────────────────────────────────────────────────────┘
  └──► Done(value) ──► finished

On concurrency. Effects within a turn run on scoped OS threads, the same mechanism crate::executor already uses for parallel branches — not an async runtime. A model call is a blocking socket read; a handful of them in flight is a handful of parked threads, which costs nothing and keeps Step::poll synchronous, the Python bridge a plain call, and the GIL-release discipline identical to the one the executor already proved. An async runtime would earn its keep at thousands of concurrent calls; a step awaiting three tools is not that, and paying for it up front would colour every signature in the crate.

Re-exports§

pub use graph_handler::GraphHandler;
pub use journal::EffectJournal;
pub use journal::EffectSite;
pub use sleep_handler::SleepHandler;

Modules§

graph_handler
Running a Soma graph as an effect.
journal
Record-once, replay-forever — the durability half of effectful execution.
sleep_handler
Waiting, as an effect.

Structs§

EffectDriver
Drives steps: performs their effects, journals them, emits their events.

Enums§

NodeOutcome
How a node finished.

Traits§

EffectHandler
Performs one kind of effect.