@tablation/crew 0.137.1 → 0.137.2

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 (3) hide show
  1. package/README.md +5 -1
  2. package/dist/cli.js +157 -69
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -216,6 +216,10 @@ was hit for real, and doubles every line.
216
216
  chains cycles immediately when there's work and backs off when there isn't
217
217
  (launchd `KeepAlive`/systemd `Restart=on-failure` restart it if it crashes).
218
218
  Installing it starts it, the same as installing any other service would.
219
+ On a ship with several enabled routes the unit serves all of them: each pass
220
+ polls every route, applies each route's sweeps, beats each workspace's Ships
221
+ row and starts the most urgent work across the fleet first (`crew daemon
222
+ <route>` serves just one).
219
223
  `bin/crew daemon start|stop|status|restart` control that same service
220
224
  directly — useful without a full reinstall — except on the plain-crontab
221
225
  fallback, which cannot supervise a persistent process and so keeps the old
@@ -241,7 +245,7 @@ now on disk. `crew daemon restart` forces this immediately, for a manual
241
245
  ```
242
246
  crew poll [route] decide a cycle and report it; writes nothing
243
247
  crew run [route] [--role R] run the winning role's session, then release
244
- crew daemon [route] run the persistent supervisor loop in the foreground
248
+ crew daemon [route] run the persistent supervisor loop in the foreground (every enabled route when none is named)
245
249
  crew daemon start|stop|status control the installed `run` service directly
246
250
  crew daemon restart stop then start it (force-picks-up an update)
247
251
  crew release [route] merge what QA verified, version it, ship it
package/dist/cli.js CHANGED
@@ -21433,7 +21433,7 @@ async function decideFleet(o) {
21433
21433
  const eligible = o.routes.filter((c) => o.enabledOnly === false ? true : c.enabled);
21434
21434
  const entries = await Promise.all(eligible.map(async (route2) => {
21435
21435
  try {
21436
- const decision = await decideCycle({ route: route2, ship: o.ship, state: o.state, emit: o.emit.forRoute(route2.route) });
21436
+ const decision = await (o.decide ?? decideCycle)({ route: route2, ship: o.ship, state: o.state, emit: o.emit.forRoute(route2.route) });
21437
21437
  const sel = decision.selection;
21438
21438
  if (!sel.selected) return { route: route2, decision, rank: NOTHING_ACTIONABLE };
21439
21439
  const rawRank = sel.ranks[sel.selected] ?? NOTHING_ACTIONABLE;
@@ -25143,11 +25143,16 @@ async function runOnePass(o) {
25143
25143
  }
25144
25144
  async function runOnePassUnguarded(o) {
25145
25145
  if (o.state.isPaused()) return { pending: [], started: [], skipped: [] };
25146
+ const { ctx } = await prepareRoutePass(o);
25147
+ const decision = await (o.decide ?? decideCycle)(ctx);
25148
+ await applyRouteDecision(o, ctx, decision);
25149
+ const { started, skipped } = await fillSlots(o, [{ ctx, decision, roles: decision.selection.pending }]);
25150
+ await publishShipAttention(o.state, o.route, o.ship);
25151
+ return { pending: decision.selection.pending, started, skipped };
25152
+ }
25153
+ async function prepareRoutePass(o) {
25146
25154
  await hydrateApiKeys([o.route], o.getSessionStore);
25147
25155
  const emit = o.newEmitter();
25148
- const decide = o.decide ?? decideCycle;
25149
- const spawn13 = o.spawnRoleAgent ?? runRoleAgent;
25150
- const breaker = o.spawnBreaker ?? new SpawnBreaker();
25151
25156
  const ctx = { route: o.route, ship: o.ship, state: o.state, emit, getSessionStore: o.getSessionStore };
25152
25157
  if (o.sandboxCache) {
25153
25158
  try {
@@ -25169,7 +25174,10 @@ async function runOnePassUnguarded(o) {
25169
25174
  emit.warn(`sandbox hygiene failed: ${e instanceof Error ? e.message : String(e)}`);
25170
25175
  }
25171
25176
  }
25172
- const decision = await decide(ctx);
25177
+ return { ctx };
25178
+ }
25179
+ async function applyRouteDecision(o, ctx, decision) {
25180
+ const { emit } = ctx;
25173
25181
  o.state.attention(o.route.route).persist(decision.attention);
25174
25182
  o.state.unroutable(o.route.route).persist(decision.unroutable);
25175
25183
  if (decision.sweep.length) {
@@ -25185,6 +25193,14 @@ async function runOnePassUnguarded(o) {
25185
25193
  emit.warn(`could not sweep: ${e.message}`, { step: "sweep" });
25186
25194
  }
25187
25195
  }
25196
+ if (decision.epicSync.length) {
25197
+ const tracker = new Tracker(o.route, o.ship);
25198
+ try {
25199
+ await applyEpicSync(tracker, decision.epicSync, tracker.contract, emit);
25200
+ } catch (e) {
25201
+ emit.warn(`could not sync epics: ${e.message}`, { step: "sweep" });
25202
+ }
25203
+ }
25188
25204
  if (decision.holdReleases?.length) {
25189
25205
  const tracker = new Tracker(o.route, o.ship);
25190
25206
  await applyHoldReleases(tracker, decision.holdReleases, tracker.contract, emit);
@@ -25278,34 +25294,99 @@ async function runOnePassUnguarded(o) {
25278
25294
  emit.warn(`could not check idle periscopes: ${e.message}`, { step: "sweep" });
25279
25295
  }
25280
25296
  }
25281
- const order = [...decision.selection.pending].sort(
25282
- (a, b) => (decision.selection.ranks[a] ?? Number.POSITIVE_INFINITY) - (decision.selection.ranks[b] ?? Number.POSITIVE_INFINITY)
25283
- );
25297
+ }
25298
+ async function runFleetPass(o) {
25299
+ const routes = o.routes.length === 1 ? o.routes : o.routes.filter((r) => r.enabled);
25300
+ const one = routes.length === 1 ? routes[0] : void 0;
25301
+ const perRoute = (route2) => ({
25302
+ ...o,
25303
+ route: route2,
25304
+ newEmitter: () => o.newEmitter(route2),
25305
+ sandboxCache: o.sandboxCache ? () => o.sandboxCache(route2) : void 0,
25306
+ decide: o.decide
25307
+ });
25308
+ if (one) return runOnePass(perRoute(one));
25309
+ try {
25310
+ if (o.state.isPaused()) return { pending: [], started: [], skipped: [] };
25311
+ const ctxs = /* @__PURE__ */ new Map();
25312
+ for (const route2 of routes) {
25313
+ try {
25314
+ ctxs.set(route2.route, (await prepareRoutePass(perRoute(route2))).ctx);
25315
+ } catch (e) {
25316
+ if (isUpgradeRequired(e) || isTransientError(e)) throw e;
25317
+ o.newEmitter(route2).warn(`${route2.route}: could not prepare the pass: ${e.message}`, { step: "poll" });
25318
+ }
25319
+ }
25320
+ const decide = o.decide ?? decideCycle;
25321
+ const fleet = await decideFleet({
25322
+ routes: routes.filter((r) => ctxs.has(r.route)),
25323
+ ship: o.ship,
25324
+ state: o.state,
25325
+ emit: o.newEmitter(routes[0]),
25326
+ decide: (c) => decide({ ...ctxs.get(c.route.route), emit: c.emit })
25327
+ });
25328
+ if (fleet.entries.length && fleet.entries.every((e) => e.error)) throw new Error(fleet.entries[0].error);
25329
+ const live = [];
25330
+ for (const e of fleet.entries) {
25331
+ const ctx = ctxs.get(e.route.route);
25332
+ if (e.error || !e.decision) continue;
25333
+ await applyRouteDecision(perRoute(e.route), ctx, e.decision);
25334
+ live.push({ ctx, decision: e.decision, roles: e.decision.selection.pending });
25335
+ }
25336
+ await Promise.all(live.map(async ({ ctx }) => {
25337
+ try {
25338
+ await new Tracker(ctx.route, o.ship).beatShip(o.ship.name);
25339
+ } catch (e) {
25340
+ ctx.emit.warn(`could not beat ship for ${ctx.route.route}: ${e.message}`, { step: "poll" });
25341
+ }
25342
+ }));
25343
+ const { started, skipped } = await fillSlots(o, live, fleet.winner && { route: fleet.winner.route.route, role: fleet.winner.role });
25344
+ for (const { ctx } of live) await publishShipAttention(o.state, ctx.route, o.ship);
25345
+ return { pending: [...new Set(live.flatMap((l) => l.roles))], started, skipped };
25346
+ } catch (e) {
25347
+ if (!isUpgradeRequired(e)) throw e;
25348
+ const route2 = routes[0];
25349
+ await raiseFromUpgradeRequired({ state: o.state, emit: o.newEmitter(route2), route: route2, ship: o.ship }, e);
25350
+ return { pending: [], started: [], skipped: [] };
25351
+ }
25352
+ }
25353
+ async function fillSlots(o, routes, first) {
25354
+ const spawn13 = o.spawnRoleAgent ?? runRoleAgent;
25355
+ const breaker = o.spawnBreaker ?? new SpawnBreaker();
25356
+ const fleet = routes.length > 1;
25357
+ const rankOf = (c) => c.decision.selection.ranks[c.role] ?? Number.POSITIVE_INFINITY;
25358
+ const isFirst = (c) => !!first && c.ctx.route.route === first.route && c.role === first.role;
25359
+ const order = routes.flatMap((r) => r.roles.map((role) => ({ role, ctx: r.ctx, decision: r.decision }))).sort((a, b) => Number(isFirst(b)) - Number(isFirst(a)) || rankOf(a) - rankOf(b));
25360
+ const { state } = o;
25284
25361
  const started = [];
25285
25362
  const skipped = [];
25286
25363
  const roleCap = (role) => TICKET_ROLES.has(role) ? o.roleConcurrency?.[role] ?? 1 : 1;
25287
- const live = new Map(order.map((r) => [r, 0]));
25364
+ const live = new Map(order.map((c) => [c, 0]));
25288
25365
  while (live.size) {
25289
- for (const role of order) {
25290
- const count = live.get(role);
25366
+ for (const cand of order) {
25367
+ const count = live.get(cand);
25291
25368
  if (count === void 0) continue;
25292
- if (openShipAttention(o.state).some((i) => i.key === seatCannotWriteKey(role))) {
25293
- if (await (o.seatWriteRefused ?? ((r) => seatWriteStillRefused(o.route, r, { userAgent: o.ship.userAgent })))(role)) {
25294
- if (count === 0) skipped.push({ role, reason: "seat role cannot write the hand-off fields \u2014 see attention" });
25295
- live.delete(role);
25369
+ const { role, ctx, decision } = cand;
25370
+ const skip = (reason) => {
25371
+ if (count === 0) skipped.push({ role, reason: fleet ? `${ctx.route.route}: ${reason}` : reason });
25372
+ };
25373
+ if (openShipAttention(state).some((i) => i.key === seatCannotWriteKey(role))) {
25374
+ if (await (o.seatWriteRefused ?? ((r) => seatWriteStillRefused(ctx.route, r, { userAgent: o.ship.userAgent })))(role)) {
25375
+ skip("seat role cannot write the hand-off fields \u2014 see attention");
25376
+ live.delete(cand);
25296
25377
  continue;
25297
25378
  }
25298
- clearShipAttention(o.state, seatCannotWriteKey(role));
25379
+ clearShipAttention(state, seatCannotWriteKey(role));
25299
25380
  }
25300
25381
  if (!breaker.allows(role)) {
25301
- if (count === 0) skipped.push({ role, reason: "agent recently failed to start \u2014 waiting before retry" });
25302
- live.delete(role);
25382
+ skip("agent recently failed to start \u2014 waiting before retry");
25383
+ live.delete(cand);
25303
25384
  continue;
25304
25385
  }
25305
- const lock = o.state.acquireRun(role, o.maxConcurrentAgents, roleCap(role));
25386
+ const lock = state.acquireRun(role, o.maxConcurrentAgents, roleCap(role));
25306
25387
  if (!lock.ok) {
25307
- if (count === 0) skipped.push({ role, reason: lock.reason });
25308
- live.delete(role);
25388
+ skip(lock.reason);
25389
+ live.delete(cand);
25309
25390
  continue;
25310
25391
  }
25311
25392
  let settle = () => {
@@ -25316,47 +25397,47 @@ async function runOnePassUnguarded(o) {
25316
25397
  const ready = (tookTicket2) => settle(tookTicket2);
25317
25398
  const run4 = spawn13(role, decision, ctx, { ready }).then(() => {
25318
25399
  breaker.recordSuccess(role);
25319
- clearShipAttention(o.state, `role_parked:${role}`);
25320
- clearShipAttention(o.state, workspaceAuthKey(role));
25321
- clearShipAttention(o.state, workspaceAllowanceKey(role));
25400
+ clearShipAttention(state, `role_parked:${role}`);
25401
+ clearShipAttention(state, workspaceAuthKey(role));
25402
+ clearShipAttention(state, workspaceAllowanceKey(role));
25322
25403
  }).catch(async (e) => {
25323
25404
  const message = e.message;
25324
25405
  if (e instanceof SignedOutError) {
25325
25406
  breaker.pause(role, SIGNED_OUT_PAUSE_MS);
25326
- emit.warn(`${role} paused: ${message}`, { step: "agent", role });
25327
- await raiseShipAttention({ state: o.state, emit, route: o.route, ship: o.ship }, signedOutItem(e.toolchain, e.mode));
25407
+ ctx.emit.warn(`${role} paused: ${message}`, { step: "agent", role });
25408
+ await raiseShipAttention({ state, emit: ctx.emit, route: ctx.route, ship: o.ship }, signedOutItem(e.toolchain, e.mode));
25328
25409
  return;
25329
25410
  }
25330
25411
  if (e instanceof WorkspaceAllowanceExhausted) {
25331
25412
  breaker.pause(role, ALLOWANCE_PAUSE_MS);
25332
- emit.warn(`${role} paused: ${message}`, { step: "agent", role });
25333
- await raiseShipAttention({ state: o.state, emit, route: o.route, ship: o.ship }, workspaceAllowanceItem(o.route.route, role));
25413
+ ctx.emit.warn(`${role} paused: ${message}`, { step: "agent", role });
25414
+ await raiseShipAttention({ state, emit: ctx.emit, route: ctx.route, ship: o.ship }, workspaceAllowanceItem(ctx.route.route, role));
25334
25415
  return;
25335
25416
  }
25336
25417
  if (e instanceof WorkspaceAuthRefused) {
25337
25418
  breaker.recordFailure(role, message);
25338
- emit.warn(`${role} agent refused: ${message}`, { step: "agent", role });
25339
- await raiseShipAttention({ state: o.state, emit, route: o.route, ship: o.ship }, {
25419
+ ctx.emit.warn(`${role} agent refused: ${message}`, { step: "agent", role });
25420
+ await raiseShipAttention({ state, emit: ctx.emit, route: ctx.route, ship: o.ship }, {
25340
25421
  kind: "workspace_auth",
25341
25422
  key: workspaceAuthKey(role),
25342
- message: `${o.route.route}: ${message}`,
25423
+ message: `${ctx.route.route}: ${message}`,
25343
25424
  since: (/* @__PURE__ */ new Date()).toISOString()
25344
25425
  });
25345
25426
  return;
25346
25427
  }
25347
25428
  if (!(e instanceof AgentSpawnError)) {
25348
- emit.warn(`${role} agent run failed: ${message}`, { step: "agent", role });
25429
+ ctx.emit.warn(`${role} agent run failed: ${message}`, { step: "agent", role });
25349
25430
  return;
25350
25431
  }
25351
25432
  const report = breaker.recordFailure(role, message);
25352
25433
  if (report.firstOfMessage || report.parked) {
25353
- emit.warn(`${role} agent could not start: ${message}`, { step: "agent", role });
25434
+ ctx.emit.warn(`${role} agent could not start: ${message}`, { step: "agent", role });
25354
25435
  }
25355
25436
  if (report.parked) {
25356
- emit.error(
25437
+ ctx.emit.error(
25357
25438
  `${role} parked for ${Math.round(report.retryInMs / 1e3)}s after ${report.failures} consecutive failed starts \u2014 check that ship.agent.bin is installed and on PATH`
25358
25439
  );
25359
- await raiseShipAttention({ state: o.state, emit, route: o.route, ship: o.ship }, {
25440
+ await raiseShipAttention({ state, emit: ctx.emit, route: ctx.route, ship: o.ship }, {
25360
25441
  kind: "role_parked",
25361
25442
  key: `role_parked:${role}`,
25362
25443
  message: `${role} agent is parked after ${report.failures} failed starts: ${message}`,
@@ -25376,23 +25457,22 @@ async function runOnePassUnguarded(o) {
25376
25457
  const tookTicket = reported2 !== false;
25377
25458
  if (tookTicket) started.push(role);
25378
25459
  if (roleCap(role) <= 1) {
25379
- live.delete(role);
25460
+ live.delete(cand);
25380
25461
  continue;
25381
25462
  }
25382
- if (tookTicket && count + 1 < roleCap(role)) live.set(role, count + 1);
25383
- else live.delete(role);
25463
+ if (tookTicket && count + 1 < roleCap(role)) live.set(cand, count + 1);
25464
+ else live.delete(cand);
25384
25465
  }
25385
25466
  }
25386
- await publishShipAttention(o);
25387
- return { pending: decision.selection.pending, started, skipped };
25467
+ return { started, skipped };
25388
25468
  }
25389
- var lastPublishedAttention;
25390
- async function publishShipAttention(o) {
25391
- const key = JSON.stringify(openShipAttention(o.state).map((i) => i.key));
25392
- if (key === lastPublishedAttention) return;
25469
+ var lastPublishedAttention = /* @__PURE__ */ new Map();
25470
+ async function publishShipAttention(state, route2, ship) {
25471
+ const key = JSON.stringify(openShipAttention(state).map((i) => i.key));
25472
+ if (key === lastPublishedAttention.get(route2.route)) return;
25393
25473
  try {
25394
- await new Tracker(o.route, o.ship).publishShipAttention(o.ship.name);
25395
- lastPublishedAttention = key;
25474
+ await new Tracker(route2, ship).publishShipAttention(ship.name);
25475
+ lastPublishedAttention.set(route2.route, key);
25396
25476
  } catch {
25397
25477
  }
25398
25478
  }
@@ -27644,7 +27724,7 @@ if (command === "passenger-sync-daemon") {
27644
27724
  await hydrateApiKeys(cfg.routes);
27645
27725
  for (const w of cfg.warnings) process.stderr.write(`crew: warning: ${w}
27646
27726
  `);
27647
- const FLEET_CAPABLE = /* @__PURE__ */ new Set(["poll", "run", "passengers"]);
27727
+ const FLEET_CAPABLE = /* @__PURE__ */ new Set(["poll", "run", "passengers", "daemon"]);
27648
27728
  const releaseFleetWide = ["merge", "deploy", "release"].includes(command) && flag("fleet");
27649
27729
  const DAEMON_SUBCOMMANDS = /* @__PURE__ */ new Set(["start", "stop", "status", "restart"]);
27650
27730
  const worktreeArgs = command === "worktree" ? splitWorktreeArgs(positional, cfg.routes.map((r) => r.route)) : void 0;
@@ -29340,21 +29420,29 @@ ${cu.tail.trimEnd()}
29340
29420
  process.exit(2);
29341
29421
  }
29342
29422
  requireArmed("run the daemon loop");
29343
- const sandboxCachePass = cfg.ship.runner === "sandbox" ? buildSandboxCachePass(route2, cfg.ship, state, emit) : void 0;
29344
- if (sandboxCachePass && (await unmirroredTargets(route2)).size > 0) {
29345
- emit.emit("sandbox cache: some served repositories have no mirror yet; refreshing before reading their contracts");
29346
- try {
29347
- await sandboxCachePass();
29348
- } catch (e) {
29349
- emit.warn(`sandbox cache refresh failed: ${e instanceof Error ? e.message : String(e)}`);
29350
- }
29351
- }
29352
- if (!await anyRepoServable(route2, true)) {
29353
- emit.error(
29354
- `refusing this route \u2014 this ship is ${cfg.ship.platform}, but ${await explainUnservable(route2)}`
29355
- );
29423
+ const daemonRoutes = fleetWide ? cfg.routes.filter((r) => r.enabled) : [route2];
29424
+ if (!daemonRoutes.length) {
29425
+ emit.error("no enabled routes \u2014 nothing for the daemon to serve");
29356
29426
  process.exit(1);
29357
29427
  }
29428
+ const primary = daemonRoutes[0];
29429
+ const sandboxCachePasses = /* @__PURE__ */ new Map();
29430
+ const servable = [];
29431
+ for (const r of daemonRoutes) {
29432
+ const pass = cfg.ship.runner === "sandbox" ? buildSandboxCachePass(r, cfg.ship, state, emit.forRoute(r.route)) : void 0;
29433
+ if (pass) sandboxCachePasses.set(r.route, pass);
29434
+ if (pass && (await unmirroredTargets(r)).size > 0) {
29435
+ emit.emit("sandbox cache: some served repositories have no mirror yet; refreshing before reading their contracts");
29436
+ try {
29437
+ await pass();
29438
+ } catch (e) {
29439
+ emit.warn(`sandbox cache refresh failed: ${e instanceof Error ? e.message : String(e)}`);
29440
+ }
29441
+ }
29442
+ if (await anyRepoServable(r, true)) servable.push(r);
29443
+ else emit.forRoute(r.route).error(`refusing route ${r.route} \u2014 this ship is ${cfg.ship.platform}, but ${await explainUnservable(r)}`);
29444
+ }
29445
+ if (!servable.length) process.exit(1);
29358
29446
  const watchPaths = isCompiledBinary(import.meta.url) ? [process.execPath] : [join57(CREW_HOME, "src"), join57(CREW_HOME, "dist"), join57(CREW_HOME, "bin")];
29359
29447
  const configPaths = daemonConfigPaths(cfg);
29360
29448
  watchPaths.push(...configPaths);
@@ -29415,15 +29503,15 @@ ${cu.tail.trimEnd()}
29415
29503
  }
29416
29504
  },
29417
29505
  periscopeMcp: controlRoutes.some((r) => r.enabled && r.hostPeriscopes) ? (req, res, ticket) => handlePeriscopeMcp(periscopeMcpDeps(), req, res, ticket) : void 0,
29418
- status: () => crewJson(["status", route2.route, "--json"]),
29419
- doctor: () => crewJson(["doctor", route2.route, "--json", "--offline"]),
29506
+ status: () => crewJson(["status", primary.route, "--json"]),
29507
+ doctor: () => crewJson(["doctor", primary.route, "--json", "--offline"]),
29420
29508
  diagnostics: () => collectDiagnostics({
29421
29509
  stateDir: cfg.ship.stateDir,
29422
29510
  workspaceIds: [...new Set(controlRoutes.map((r) => r.resolved.workspaceId))],
29423
29511
  runner: cfg.ship.runner ?? "host",
29424
29512
  unitStems: detectSystemd() ? ["run", "release", "passengers"].map((j) => labelFor(CREW_HOME, j)) : [],
29425
29513
  userScope: process.getuid?.() !== 0,
29426
- doctor: () => crewJson(["doctor", route2.route, "--json", "--offline"])
29514
+ doctor: () => crewJson(["doctor", primary.route, "--json", "--offline"])
29427
29515
  }),
29428
29516
  scheduler: schedulerHandler(planDaemonControl(CREW_HOME, hostPlatform(), detectSystemd())),
29429
29517
  log: (m) => emit.warn(m)
@@ -29437,19 +29525,19 @@ ${cu.tail.trimEnd()}
29437
29525
  onStaleDeferred: ({ runs, waitedMs }) => emit.warn(
29438
29526
  `reload or update pending for ${Math.round(waitedMs / 1e3)}s \u2014 waiting for ${runs} agent run(s) to end before relaunching (\`crew reload --now\` forces it)`
29439
29527
  ),
29440
- runPass: () => runOnePass({
29528
+ runPass: () => runFleetPass({
29441
29529
  inFlight,
29442
- sandboxCache: sandboxCachePass,
29530
+ sandboxCache: (r) => sandboxCachePasses.get(r.route)?.() ?? Promise.resolve(),
29443
29531
  sandboxHygiene: sandboxHygienePass,
29444
- route: route2,
29532
+ routes: servable,
29445
29533
  ship: cfg.ship,
29446
29534
  state,
29447
29535
  maxConcurrentAgents: cfg.ship.maxConcurrentAgents,
29448
29536
  roleConcurrency: cfg.ship.roleConcurrency,
29449
29537
  spawnBreaker,
29450
29538
  configFile: cfg.configFile,
29451
- newEmitter: () => new Emitter({
29452
- route: route2.route,
29539
+ newEmitter: (r) => new Emitter({
29540
+ route: r.route,
29453
29541
  eventFile: eventFileFor(cfg.ship.stateDir),
29454
29542
  rotateBytes: cfg.ship.eventsRotateBytes,
29455
29543
  logFile: cfg.ship.logFile,
@@ -29481,7 +29569,7 @@ ${cu.tail.trimEnd()}
29481
29569
  onPass: (result) => {
29482
29570
  if (!sandboxBuilding && !diskFullStop(state)) {
29483
29571
  sandboxBuilding = true;
29484
- void sandboxReposOf(cfg.routes.filter((r) => r.enabled)).then(withShipSandbox).then((repos) => repos.length ? sandboxBuildTick(repos, sandboxTickDeps(emit, route2)) : null).catch((err3) => emit.warn(`sandbox image build tick failed: ${err3 instanceof Error ? err3.message : String(err3)}`)).finally(() => {
29572
+ void sandboxReposOf(cfg.routes.filter((r) => r.enabled)).then(withShipSandbox).then((repos) => repos.length ? sandboxBuildTick(repos, sandboxTickDeps(emit, primary)) : null).catch((err3) => emit.warn(`sandbox image build tick failed: ${err3 instanceof Error ? err3.message : String(err3)}`)).finally(() => {
29485
29573
  sandboxBuilding = false;
29486
29574
  });
29487
29575
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tablation/crew",
3
- "version": "0.137.1",
3
+ "version": "0.137.2",
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",