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
actactivity output the planner decides over. - ActPlan
- Engine-owned act scheduling payload.
- ActScheduling
Facts - Session facts the host pre-resolves for the reason→act scheduling case.
- Host
Facts - Host-resolved facts the engine needs but cannot fetch itself.
- Turn
State - Host-owned state carried across turn phases.
Enums§
- Activity
Outcome - Typed, parsed activity output the engine plans the next step from.
- Turn
Lifecycle Effect - A lifecycle side effect the engine decided must be recorded, described as data rather than performed.
- Turn
Plan - Generic next-step decision for a host turn.
Functions§
- plan_
after_ act - Plan the next step after an
actactivity finishes. - plan_
after_ process_ input - Plan the reason step that follows a completed
process_inputactivity. - plan_
after_ reason - Plan the next step after a
reasonactivity finishes. - plan_
next_ turn - Plan the next host step after an activity finishes.
- reason_
schedules_ act - Does this reason outcome schedule an act phase?