@tablation/crew 0.128.2 → 0.128.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 +26 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -4937,7 +4937,7 @@ WorkingDirectory=${crewHome}
4937
4937
  ${systemdEnvLines(ship)}
4938
4938
  StandardOutput=append:${schedulerLog}
4939
4939
  StandardError=append:${schedulerLog}
4940
- Restart=on-failure
4940
+ Restart=always
4941
4941
  RestartSec=5
4942
4942
  # CREW-1775: a restart stops only the daemon; agent runs it started live in
4943
4943
  # their own process groups and the next daemon reattaches to them.
@@ -15441,6 +15441,10 @@ function applyManagedDefaultsToDoc(doc) {
15441
15441
  doc.setIn(["ship", "sandbox", "cacheVolume"], MANAGED_CACHE_VOLUME);
15442
15442
  wrote.push("ship.sandbox.cacheVolume");
15443
15443
  }
15444
+ if (doc.getIn(["ship", "cloneScheme"]) === void 0) {
15445
+ doc.setIn(["ship", "cloneScheme"], "https");
15446
+ wrote.push("ship.cloneScheme");
15447
+ }
15444
15448
  const existing = doc.getIn(["ship", "toolchains"]);
15445
15449
  const hasClaude = isMap2(existing) && existing.items.some((i) => (isScalar(i.key) ? i.key.value : i.key) === "claude");
15446
15450
  if (!hasClaude) {
@@ -30224,6 +30228,17 @@ ${where.join("\n")}`);
30224
30228
  const control = host === "windows" ? null : planDaemonControl(CREW_HOME, host, detectSystemd());
30225
30229
  const unitStatus = control?.statusCommand ? spawnSync12(control.statusCommand[0], control.statusCommand.slice(1), { cwd: CREW_HOME, encoding: "utf8" }) : null;
30226
30230
  const unitRunning = unitStatus !== null && !unitStatus.error && unitStatus.status === 0;
30231
+ if (!unitRunning && control?.mechanism === "systemd" && control.startCommand) {
30232
+ const res = spawnSync12(control.startCommand[0], control.startCommand.slice(1), { cwd: CREW_HOME, encoding: "utf8" });
30233
+ if (res.error || res.status !== 0) {
30234
+ process.stderr.write(`crew reload: ${control.startCommand.join(" ")} exited ${res.status ?? "error"}
30235
+ `);
30236
+ process.exitCode = 1;
30237
+ } else {
30238
+ process.stdout.write("crew reload: the daemon unit was not running \u2014 started it, so it reads crew.yaml fresh\n");
30239
+ }
30240
+ break;
30241
+ }
30227
30242
  if (!unitRunning) {
30228
30243
  process.stdout.write("crew reload: no daemon unit is running \u2014 nothing to reload (the next run reads crew.yaml fresh)\n");
30229
30244
  break;
@@ -30895,6 +30910,16 @@ routes: ${cfg.routes.map((c) => c.route).join(", ")}
30895
30910
  );
30896
30911
  }
30897
30912
  }
30913
+ if (host === "linux" && detectSystemd()) {
30914
+ const ctl = planDaemonControl(CREW_HOME, host, true);
30915
+ const unitPlan = planInstall(cfg.ship, CREW_HOME, host, true, "run", installContext());
30916
+ if (ctl.statusCommand && unitPlan.unitPaths.some((p) => existsSync52(p))) {
30917
+ const st = spawnSync12(ctl.statusCommand[0], ctl.statusCommand.slice(1), { cwd: CREW_HOME, encoding: "utf8" });
30918
+ if (!st.error && st.status !== 0) {
30919
+ process.stdout.write("daemon unit: WARN installed but not running \u2014 no work is picked up; run `crew reload` (or `crew daemon start`), and `crew install` if the unit still says Restart=on-failure\n");
30920
+ }
30921
+ }
30922
+ }
30898
30923
  const reloadAt = readReloadRequestedAt(cfg.ship.stateDir);
30899
30924
  if (reloadAt !== null) {
30900
30925
  process.stdout.write(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tablation/crew",
3
- "version": "0.128.2",
3
+ "version": "0.128.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",