@tablation/crew 0.100.2 → 0.100.3

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.
Files changed (2) hide show
  1. package/dist/cli.js +9 -5
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -19476,12 +19476,12 @@ async function runOnePassUnguarded(o) {
19476
19476
  live.delete(role);
19477
19477
  continue;
19478
19478
  }
19479
- started.push(role);
19480
- let ready = () => {
19479
+ let settle = () => {
19481
19480
  };
19482
19481
  const settled = new Promise((resolve7) => {
19483
- ready = resolve7;
19482
+ settle = resolve7;
19484
19483
  });
19484
+ const ready = (tookTicket2) => settle(tookTicket2);
19485
19485
  const run2 = spawn9(role, decision, ctx, { ready }).then(() => {
19486
19486
  breaker.recordSuccess(role);
19487
19487
  clearShipAttention(o.state, `role_parked:${role}`);
@@ -19527,18 +19527,20 @@ async function runOnePassUnguarded(o) {
19527
19527
  }
19528
19528
  }).finally(() => {
19529
19529
  lock.release();
19530
- ready(false);
19530
+ settle(void 0);
19531
19531
  });
19532
19532
  if (o.inFlight) {
19533
19533
  const set = o.inFlight;
19534
19534
  set.add(run2);
19535
19535
  void run2.finally(() => set.delete(run2));
19536
19536
  }
19537
+ const reported = TICKET_ROLES.has(role) ? await settled : true;
19538
+ const tookTicket = reported !== false;
19539
+ if (tookTicket) started.push(role);
19537
19540
  if (roleCap(role) <= 1) {
19538
19541
  live.delete(role);
19539
19542
  continue;
19540
19543
  }
19541
- const tookTicket = await settled;
19542
19544
  if (tookTicket && count + 1 < roleCap(role)) live.set(role, count + 1);
19543
19545
  else live.delete(role);
19544
19546
  }
@@ -19768,6 +19770,8 @@ async function runRoleAgentLocked(role, decision, ctx, hooks, held) {
19768
19770
  );
19769
19771
  return;
19770
19772
  }
19773
+ } else {
19774
+ hooks?.ready(true);
19771
19775
  }
19772
19776
  }
19773
19777
  const plan = planAgentRun({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tablation/crew",
3
- "version": "0.100.2",
3
+ "version": "0.100.3",
4
4
  "description": "A standing team of headless agents that picks work off a Tablation board, does it on a machine you control, and reports back.",
5
5
  "type": "module",
6
6
  "license": "MIT",