Skip to main content

Crate turnframe_tasks

Crate turnframe_tasks 

Source
Expand description

Small, typed model tasks: the engine that runs every model call of a turn.

A ModelTask states what one call needs and what it may answer. The TaskEngine resolves its instructions, applies its kind’s TaskProfile, reserves the call against the turn’s Budget, checks the answer, repairs, votes and escalates, and writes one TaskRecord per call into the TaskScope the turn owns.

ModuleWhat it decides
taskthe task trait, identifiers and structural errors
profileper-kind settings and their defaults
budgetwhat a turn may spend, and which bound stopped it
instructionswhich instruction text a call runs under
enginerunning a task: repair, votes, escalation, records
testinga provider that answers each task by its id

Re-exports§

pub use budget::Budget;
pub use budget::BudgetBound;
pub use budget::BudgetTracker;
pub use engine::RecordPolicy;
pub use engine::TASK_LABEL;
pub use engine::TURN_LABEL;
pub use engine::TaskCall;
pub use engine::TaskEngine;
pub use engine::TaskEngineBuilder;
pub use engine::TaskFailure;
pub use engine::TaskOutcome;
pub use engine::TaskScope;
pub use profile::Disagreement;
pub use profile::ProfileChange;
pub use profile::ProfileChanges;
pub use profile::TaskProfile;
pub use profile::TaskProfiles;
pub use task::ModelTask;
pub use task::StructuralError;
pub use task::TaskId;

Modules§

budget
What a turn’s model calls may spend, and which bound stopped them.
engine
Running a task: the call, repairs with the exact error, votes, escalation, records.
instructions
Which instruction text a task call runs under, and the reference the record cites.
profile
How each task kind is run: which model, which settings, how many votes and repairs.
task
What a model task is: one narrow question, its context, and the shape of its answer.
testing
A provider that answers each task by its id, for testing anything built on tasks.

Enums§

TaskKind
The kind of a task, which is also the purpose a provider router routes it by. Why the runtime is calling a model (spec §20.2).