pub struct SessionLedger {
pub spent: Arc<SpendNode>,
pub goal_spent: Option<GoalSpend>,
pub spent_recorded: Option<SpendRecord>,
pub calls: SessionCalls,
pub token_target: TokenTarget,
pub invoked_skills: Vec<String>,
pub nested_repos: BTreeMap<PathBuf, u64>,
pub nested_repos_at_start: Option<BTreeMap<PathBuf, u64>>,
}Fields§
§spent: Arc<SpendNode>The session’s node: every call of its turns spends into it as it is
made, their delegates’ and those made on their side included, and
session.token_budget is its ceiling.
goal_spent: Option<GoalSpend>The goal’s node, under the session’s, that its rounds spend into.
spent_recorded: Option<SpendRecord>What the session log last recorded of the two.
calls: SessionCalls§token_target: TokenTarget§invoked_skills: Vec<String>Skills invoked or announced so far, re-injected after compaction.
nested_repos: BTreeMap<PathBuf, u64>Repositories nested in the project the session has already reported or been told to keep, with a digest of their configuration then.
nested_repos_at_start: Option<BTreeMap<PathBuf, u64>>The repositories nested in the project before the session’s first
tool call ran, with a digest of their configuration then; None
until that call.
Implementations§
Source§impl SessionLedger
impl SessionLedger
Sourcepub fn spend_unrecorded(&self) -> Option<SpendRecord>
pub fn spend_unrecorded(&self) -> Option<SpendRecord>
Self::spend_record when the log does not have it yet; a session
that has spent nothing has nothing to record.
Sourcepub fn spend_record(&self) -> SpendRecord
pub fn spend_record(&self) -> SpendRecord
What the session and its goal have spent, as the log records it.
Sourcepub fn open_goal(
&mut self,
goal_id: &str,
limit: Option<u64>,
spent: Spend,
) -> Arc<SpendNode> ⓘ
pub fn open_goal( &mut self, goal_id: &str, limit: Option<u64>, spent: Spend, ) -> Arc<SpendNode> ⓘ
A node for goal goal_id under the session’s, holding limit, that
has spent spent already.