Skip to main content

Crate everruns_engine

Crate everruns_engine 

Source
Expand description

The turn engine: the sans-IO turn planner for the Everruns agentic runtime.

everruns-engine owns the authoritative, deterministic turn-planning brain for the Sans-IO Turn State epic (knowledge/foundations/sans-io-turn-state.md). Given a serializable TurnState, a parsed ActivityOutcome, and any host-resolved HostFacts, its pure functions return the next TurnPlan together with the TurnLifecycleEffects the host must perform.

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.

The dependency direction is strictly engine -> core; the engine never depends on runtime/server/worker/platform/durable.

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?