Skip to main content

Crate everruns_engine

Crate everruns_engine 

Source
Expand description

Deterministic, sans-I/O turn planning for Everruns execution hosts.

Given a serializable TurnState, parsed ActivityOutcome, and host-resolved HostFacts, its pure functions return the next TurnPlan and TurnLifecycleEffects. Framework applications use everruns; this focused crate lets runtime, worker, durable, and custom hosts in the Everruns ecosystem share one turn model.

The engine performs no I/O: no stores, sockets, process execution, event emission, or Utc::now(). Hosts resolve those facts, pass now in, call the planner, and perform the returned effects. This makes the loop testable as table tests over values, and lets an in-process host and a durable host share one implementation of turn semantics.

§Example

use everruns_engine::{TurnPlan, TurnState};

fn accepts_plan(_state: &TurnState, _plan: &TurnPlan) {}

Structs§

ActOutcome
Parsed act activity output the planner decides over.
ActPlan
Engine-owned act scheduling payload.
ActSchedulingFacts
Session facts the host pre-resolves for the reason→act scheduling case.
HostFacts
Host-resolved facts the engine needs but cannot fetch itself.
TurnState
Host-owned state carried across turn phases.

Enums§

ActivityOutcome
Typed, parsed activity output the engine plans the next step from.
TurnLifecycleEffect
A lifecycle side effect the engine decided must be recorded, described as data rather than performed.
TurnPlan
Generic next-step decision for a host turn.

Functions§

plan_after_act
Plan the next step after an act activity finishes.
plan_after_process_input
Plan the reason step that follows a completed process_input activity.
plan_after_reason
Plan the next step after a reason activity finishes.
plan_next_turn
Plan the next host step after an activity finishes.
reason_schedules_act
Does this reason outcome schedule an act phase?