1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! The budget seam — deliberately stopping a turn that would otherwise keep
//! burning resources without producing useful work.
//!
//! Mirrors everruns' `HardLimitStopRule` + `BudgetChecker`: a host supplies
//! a [`BudgetChecker`] (token spend, dollar cost, wall-clock time —
//! agentyk doesn't need to know which); the engine asks it before each
//! turn action and, on [`BudgetDecision::Seal`], stops the turn via
//! [`crate::turn::TurnState::on_seal`] rather than letting it run to
//! [`crate::turn::TurnOutcome::MaxIterations`]. No default policy ships.
use async_trait;
use crateSessionId;
/// Whether a turn may take its next action.
/// Decides whether a turn may keep going.
///
/// A host supplies one to stop work that is no longer worth doing — token
/// spend, wall-clock, dollars. Core never defines what a budget is.