@impulselab/hepha 0.2.636 → 0.2.637

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/dist/index.js CHANGED
@@ -3465,6 +3465,19 @@ function isFollowStopStatus(status) {
3465
3465
  return status !== void 0 && (TERMINAL.has(status) || BLOCKED.has(status));
3466
3466
  }
3467
3467
 
3468
+ // ../../packages/realtime/src/events/session/shared/session-status-constants.ts
3469
+ var SESSION_SANDBOX_CAPACITY_WAIT_REASON = "No Ares machine has room for this sandbox. Waiting for capacity";
3470
+
3471
+ // ../../packages/realtime/src/events/session/capacity/is-sandbox-capacity-park.ts
3472
+ function isSandboxCapacityPark(input) {
3473
+ return input.status === "waiting_human" && input.statusReason === SESSION_SANDBOX_CAPACITY_WAIT_REASON;
3474
+ }
3475
+
3476
+ // src/lib/session/is-follow-stop-session.ts
3477
+ function isFollowStopSession(session) {
3478
+ return isFollowStopStatus(session.status) && !isSandboxCapacityPark(session);
3479
+ }
3480
+
3468
3481
  // src/lib/session/retry/resolve-follow-outage-budget.ts
3469
3482
  function resolveFollowOutageBudget() {
3470
3483
  const raw = process.env.HEPHA_FOLLOW_MAX_OUTAGE_SECONDS?.trim();
@@ -3553,7 +3566,7 @@ async function followSession(sessionId, options = {}, dependencies = defaultFoll
3553
3566
  )
3554
3567
  });
3555
3568
  emptyPolls = 0;
3556
- if (isFollowStopStatus(session.status)) {
3569
+ if (isFollowStopSession(session)) {
3557
3570
  return session;
3558
3571
  }
3559
3572
  }