agentxchain 2.155.0 → 2.155.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentxchain",
3
- "version": "2.155.0",
3
+ "version": "2.155.1",
4
4
  "description": "CLI for AgentXchain — governed multi-agent software delivery",
5
5
  "type": "module",
6
6
  "bin": {
@@ -349,7 +349,7 @@ async function runDueSchedules(context, opts = {}) {
349
349
  // ---------------------------------------------------------------------------
350
350
 
351
351
  function isSessionTerminal(session) {
352
- return ['completed', 'idle_exit', 'failed', 'stopped', 'vision_exhausted', 'vision_expansion_exhausted'].includes(session?.status);
352
+ return ['completed', 'idle_exit', 'failed', 'stopped', 'vision_exhausted', 'vision_expansion_exhausted', 'session_budget'].includes(session?.status);
353
353
  }
354
354
 
355
355
  function getContinuousEnabledScheduleIds(config) {
@@ -498,6 +498,7 @@ async function advanceScheduleContinuousSession(context, entry, opts = {}) {
498
498
  blocked: 'continuous_blocked',
499
499
  vision_exhausted: 'continuous_vision_exhausted',
500
500
  vision_expansion_exhausted: 'continuous_vision_expansion_exhausted',
501
+ session_budget: 'continuous_session_budget_exhausted',
501
502
  running: 'continuous_running',
502
503
  };
503
504
  let schedStatus = statusMap[step.status] || 'continuous_running';
@@ -1148,11 +1148,11 @@ export async function advanceContinuousRunOnce(context, session, contOpts, execu
1148
1148
  // Session budget check (cumulative spend across all runs) — before idle policy
1149
1149
  const sessionBudget = session.per_session_max_usd ?? contOpts.perSessionMaxUsd ?? null;
1150
1150
  if (sessionBudget != null && (session.cumulative_spent_usd || 0) >= sessionBudget) {
1151
- session.status = 'completed';
1151
+ session.status = 'session_budget';
1152
1152
  session.budget_exhausted = true;
1153
1153
  writeContinuousSession(root, session);
1154
1154
  log(`Session budget exhausted: $${(session.cumulative_spent_usd || 0).toFixed(2)} spent of $${sessionBudget.toFixed(2)} limit.`);
1155
- return { ok: true, status: 'completed', action: 'session_budget_exhausted', stop_reason: 'session_budget' };
1155
+ return { ok: true, status: 'session_budget', action: 'session_budget_exhausted', stop_reason: 'session_budget' };
1156
1156
  }
1157
1157
 
1158
1158
  // Idle-cycle check: on_idle policy determines behavior
@@ -1634,7 +1634,7 @@ export async function executeContinuousRun(context, contOpts, executeGovernedRun
1634
1634
  const step = await advanceContinuousRunOnce(context, session, contOpts, executeGovernedRun, log);
1635
1635
 
1636
1636
  // Terminal states
1637
- if (step.status === 'completed' || step.status === 'idle_exit' || step.status === 'failed' || step.status === 'blocked' || step.status === 'stopped' || step.status === 'vision_exhausted' || step.status === 'vision_expansion_exhausted') {
1637
+ if (step.status === 'completed' || step.status === 'idle_exit' || step.status === 'failed' || step.status === 'blocked' || step.status === 'stopped' || step.status === 'vision_exhausted' || step.status === 'vision_expansion_exhausted' || step.status === 'session_budget') {
1638
1638
  const terminalMessage = describeContinuousTerminalStep(step, contOpts);
1639
1639
  if (terminalMessage) {
1640
1640
  log(terminalMessage);