@band-app/server 0.55.0 → 0.57.0

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 (73) hide show
  1. package/dist/client/_shell.html +0 -0
  2. package/dist/client/assets/{TerminalPanel-DyFsMnFK.js → TerminalPanel-BQ7jJvVY.js} +1 -1
  3. package/dist/client/assets/{_basePickBy-C1Ui1wUI.js → _basePickBy-CWJhZ7PD.js} +1 -1
  4. package/dist/client/assets/{_baseUniq-TZ0JUUYF.js → _baseUniq-CT0jJrWu.js} +1 -1
  5. package/dist/client/assets/{arc-BKZRD7Jr.js → arc-CWIqvrD4.js} +1 -1
  6. package/dist/client/assets/{architectureDiagram-VXUJARFQ-C6U3vX0O.js → architectureDiagram-VXUJARFQ-DU_1irNi.js} +1 -1
  7. package/dist/client/assets/{blockDiagram-VD42YOAC-CMKfJSCq.js → blockDiagram-VD42YOAC-CZ6uMShZ.js} +1 -1
  8. package/dist/client/assets/{c4Diagram-YG6GDRKO-BxBYCPCn.js → c4Diagram-YG6GDRKO-DII3gdbS.js} +1 -1
  9. package/dist/client/assets/channel-26GHUpO9.js +1 -0
  10. package/dist/client/assets/{chunk-4BX2VUAB-bw9X6kAI.js → chunk-4BX2VUAB-CW4TSJub.js} +1 -1
  11. package/dist/client/assets/{chunk-55IACEB6-ClHgx4bC.js → chunk-55IACEB6-Cdu6EJZT.js} +1 -1
  12. package/dist/client/assets/{chunk-B4BG7PRW-Db1XzP6B.js → chunk-B4BG7PRW-B1x_SAjR.js} +1 -1
  13. package/dist/client/assets/{chunk-DI55MBZ5-C8HzWkcQ.js → chunk-DI55MBZ5-D4Ap-nF_.js} +1 -1
  14. package/dist/client/assets/{chunk-FMBD7UC4-54B6Y5YM.js → chunk-FMBD7UC4-DNgzxeD7.js} +1 -1
  15. package/dist/client/assets/{chunk-QN33PNHL-BttimAfW.js → chunk-QN33PNHL-DE9GCyLi.js} +1 -1
  16. package/dist/client/assets/{chunk-QZHKN3VN-BoejelHz.js → chunk-QZHKN3VN-BS7uTEeT.js} +1 -1
  17. package/dist/client/assets/{chunk-TZMSLE5B-CDFjN9wj.js → chunk-TZMSLE5B-DNZIw0Ke.js} +1 -1
  18. package/dist/client/assets/classDiagram-2ON5EDUG-CXw_6Q71.js +1 -0
  19. package/dist/client/assets/classDiagram-v2-WZHVMYZB-CXw_6Q71.js +1 -0
  20. package/dist/client/assets/clone-X9pt_2az.js +1 -0
  21. package/dist/client/assets/{cose-bilkent-S5V4N54A-VQAtNwQc.js → cose-bilkent-S5V4N54A-CCgQ5TY-.js} +1 -1
  22. package/dist/client/assets/{dagre-6UL2VRFP-BbY85-fg.js → dagre-6UL2VRFP-DrhLtS4C.js} +1 -1
  23. package/dist/client/assets/{diagram-PSM6KHXK-ILb8cZAw.js → diagram-PSM6KHXK-DQSaKLXK.js} +1 -1
  24. package/dist/client/assets/{diagram-QEK2KX5R-BGiFNVyl.js → diagram-QEK2KX5R-DbUXqE8i.js} +1 -1
  25. package/dist/client/assets/{diagram-S2PKOQOG-CccJTBEx.js → diagram-S2PKOQOG-DJejbOW1.js} +1 -1
  26. package/dist/client/assets/{erDiagram-Q2GNP2WA-CkfZ33hi.js → erDiagram-Q2GNP2WA-DEeEW3Kd.js} +1 -1
  27. package/dist/client/assets/{flowDiagram-NV44I4VS-Mh9EcV52.js → flowDiagram-NV44I4VS-BrKPt2KY.js} +1 -1
  28. package/dist/client/assets/{ganttDiagram-JELNMOA3-Cyw35fle.js → ganttDiagram-JELNMOA3-NxtYANPR.js} +1 -1
  29. package/dist/client/assets/{gitGraphDiagram-V2S2FVAM-B_pqKxKc.js → gitGraphDiagram-V2S2FVAM-0qQVaZpT.js} +1 -1
  30. package/dist/client/assets/{graph-9t0DxPCF.js → graph-D-vRi72k.js} +1 -1
  31. package/dist/client/assets/{highlighted-body-B3W2YXNL-BoRk8xol.js → highlighted-body-B3W2YXNL-vjxbNAd7.js} +1 -1
  32. package/dist/client/assets/{index-q1D5zrY_.js → index-59DRJg8o.js} +1 -1
  33. package/dist/client/assets/{index-DicOq_Sf.js → index-6vsAmyuh.js} +1 -1
  34. package/dist/client/assets/{index-DyQAzRmj.js → index-BHMWFIFp.js} +1 -1
  35. package/dist/client/assets/{index-EhAKhw5f.js → index-BZ43NplR.js} +1 -1
  36. package/dist/client/assets/{index-BwCTnd17.js → index-BZoUdjXh.js} +1 -1
  37. package/dist/client/assets/{index-Ddtx5YHI.js → index-C1z37ULd.js} +1 -1
  38. package/dist/client/assets/{index-D8L39ca2.js → index-C93xaF2D.js} +1 -1
  39. package/dist/client/assets/{index-B4gaIFLM.js → index-CU3l0cqI.js} +1 -1
  40. package/dist/client/assets/{index-0OIfn_16.js → index-CUWHOWHZ.js} +1 -1
  41. package/dist/client/assets/{index-CtGnlQ-q.js → index-D7ZIaN5W.js} +1 -1
  42. package/dist/client/assets/{index-Bq4KlIgZ.js → index-DCFHhI43.js} +1 -1
  43. package/dist/client/assets/{index-BHbtQqNn.js → index-DxA2gLxH.js} +1 -1
  44. package/dist/client/assets/{index-B9OAdTCy.js → index-Kn6ZarbI.js} +1 -1
  45. package/dist/client/assets/{infoDiagram-HS3SLOUP-BpXpceBS.js → infoDiagram-HS3SLOUP-DVvA2Rdm.js} +1 -1
  46. package/dist/client/assets/{journeyDiagram-XKPGCS4Q-CUzBsDC2.js → journeyDiagram-XKPGCS4Q-CozouUkd.js} +1 -1
  47. package/dist/client/assets/{kanban-definition-3W4ZIXB7-d7CaBEND.js → kanban-definition-3W4ZIXB7-DdqQIj8J.js} +1 -1
  48. package/dist/client/assets/{layout-D8LvZDRj.js → layout-Si_SwcDU.js} +1 -1
  49. package/dist/client/assets/main-B3ss88Hs.css +1 -0
  50. package/dist/client/assets/{main-BIldwfya.js → main-DOFdCOPt.js} +345 -345
  51. package/dist/client/assets/{mindmap-definition-VGOIOE7T-CkyVVJ9w.js → mindmap-definition-VGOIOE7T-C5aQiwY1.js} +1 -1
  52. package/dist/client/assets/{pieDiagram-ADFJNKIX-UGEIX01f.js → pieDiagram-ADFJNKIX-C_OndLWU.js} +1 -1
  53. package/dist/client/assets/{quadrantDiagram-AYHSOK5B-C9PM1qGp.js → quadrantDiagram-AYHSOK5B-2j7ury0K.js} +1 -1
  54. package/dist/client/assets/{requirementDiagram-UZGBJVZJ-BmJorjE0.js → requirementDiagram-UZGBJVZJ-BUPmH6ij.js} +1 -1
  55. package/dist/client/assets/{sankeyDiagram-TZEHDZUN-DK1YkHOf.js → sankeyDiagram-TZEHDZUN-CVrjDWIQ.js} +1 -1
  56. package/dist/client/assets/{sequenceDiagram-WL72ISMW-CMalVkVp.js → sequenceDiagram-WL72ISMW-Dz_Etmjx.js} +1 -1
  57. package/dist/client/assets/{stateDiagram-FKZM4ZOC-CtDoLljP.js → stateDiagram-FKZM4ZOC-DKxAJWnz.js} +1 -1
  58. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-8yPLqakb.js +1 -0
  59. package/dist/client/assets/{timeline-definition-IT6M3QCI-Vy5fVSzE.js → timeline-definition-IT6M3QCI-DDqd2wFA.js} +1 -1
  60. package/dist/client/assets/{treemap-GDKQZRPO-DN8hAqbn.js → treemap-GDKQZRPO-B-4nXAG1.js} +1 -1
  61. package/dist/client/assets/{worktree._worktreeId-enSNl8Hs.js → worktree._worktreeId-1wxOo9iN.js} +1 -1
  62. package/dist/client/assets/{worktree._worktreeId-BjqfB2FM.js → worktree._worktreeId-GQhsr6UA.js} +1 -1
  63. package/dist/client/assets/{xychartDiagram-PRI3JC2R-Dl5pLjgP.js → xychartDiagram-PRI3JC2R-BIeX7Ci-.js} +1 -1
  64. package/dist/openapi.json +725 -80
  65. package/dist/start-server.mjs +2335 -1427
  66. package/dist/terminal-daemon.mjs +79 -56
  67. package/package.json +10 -10
  68. package/dist/client/assets/channel-BJXLlcqp.js +0 -1
  69. package/dist/client/assets/classDiagram-2ON5EDUG-27E8Epaa.js +0 -1
  70. package/dist/client/assets/classDiagram-v2-WZHVMYZB-27E8Epaa.js +0 -1
  71. package/dist/client/assets/clone-DTRMs_1C.js +0 -1
  72. package/dist/client/assets/main-BxvTwvKU.css +0 -1
  73. package/dist/client/assets/stateDiagram-v2-4FDKWEC3-Bu9w4Lt2.js +0 -1
@@ -2877,11 +2877,11 @@ var require_tools = __commonJS({
2877
2877
  }
2878
2878
  }
2879
2879
  }
2880
- function buildFormatters(level, bindings, log5) {
2880
+ function buildFormatters(level, bindings, log6) {
2881
2881
  return {
2882
2882
  level,
2883
2883
  bindings,
2884
- log: log5
2884
+ log: log6
2885
2885
  };
2886
2886
  }
2887
2887
  function normalizeDestFileDescriptor(destination) {
@@ -3264,11 +3264,11 @@ var require_proto = __commonJS({
3264
3264
  }
3265
3265
  } else instance[serializersSym] = serializers;
3266
3266
  if (options.hasOwnProperty("formatters")) {
3267
- const { level, bindings: chindings, log: log5 } = options.formatters;
3267
+ const { level, bindings: chindings, log: log6 } = options.formatters;
3268
3268
  instance[formattersSym] = buildFormatters(
3269
3269
  level || formatters.level,
3270
3270
  chindings || resetChildingsFormatter,
3271
- log5 || formatters.log
3271
+ log6 || formatters.log
3272
3272
  );
3273
3273
  } else {
3274
3274
  instance[formattersSym] = buildFormatters(
@@ -9208,6 +9208,7 @@ import { join as join5, sep } from "node:path";
9208
9208
  import { execFile } from "node:child_process";
9209
9209
  import { existsSync as existsSync2 } from "node:fs";
9210
9210
  import { delimiter } from "node:path";
9211
+ var log = createLogger("shell-path");
9211
9212
  function defaultShell() {
9212
9213
  if (process.env.SHELL) return process.env.SHELL;
9213
9214
  if (process.platform === "win32") return process.env.ComSpec || "cmd.exe";
@@ -9236,32 +9237,54 @@ function prependBinDirs(path) {
9236
9237
  return [...extraBinDirs(), ...path ? [path] : []].join(delimiter);
9237
9238
  }
9238
9239
  var cachedShellPath = null;
9239
- async function shellPath() {
9240
- if (cachedShellPath) return cachedShellPath;
9241
- if (process.platform === "win32") {
9242
- cachedShellPath = prependBinDirs(process.env.PATH);
9243
- return cachedShellPath;
9244
- }
9240
+ var fallbackPath = null;
9241
+ var inFlight = null;
9242
+ var RETRY_AFTER_FAILURE_MS = 3e4;
9243
+ function probeLoginShell(shell) {
9244
+ return new Promise((resolve, reject) => {
9245
+ execFile(shell, ["-li", "-c", "echo $PATH"], { timeout: 5e3 }, (err, stdout) => {
9246
+ if (err) {
9247
+ reject(err);
9248
+ return;
9249
+ }
9250
+ resolve(stdout.trim());
9251
+ });
9252
+ });
9253
+ }
9254
+ async function resolveShellPath() {
9245
9255
  const shell = defaultShell();
9256
+ let failure;
9246
9257
  try {
9247
- const result = await new Promise((resolve, reject) => {
9248
- execFile(shell, ["-li", "-c", "echo $PATH"], { timeout: 5e3 }, (err, stdout) => {
9249
- if (err) {
9250
- reject(err);
9251
- return;
9252
- }
9253
- resolve(stdout.trim());
9254
- });
9255
- });
9258
+ const result = await probeLoginShell(shell);
9256
9259
  if (result) {
9257
9260
  cachedShellPath = result;
9261
+ fallbackPath = null;
9258
9262
  return result;
9259
9263
  }
9260
- } catch {
9264
+ failure = "the shell printed an empty PATH";
9265
+ } catch (err) {
9266
+ failure = err instanceof Error ? err.message : String(err);
9261
9267
  }
9262
- const fallback = prependBinDirs(process.env.PATH);
9263
- cachedShellPath = fallback;
9264
- return fallback;
9268
+ const value = prependBinDirs(process.env.PATH);
9269
+ fallbackPath = { value, at: Date.now() };
9270
+ log.warn(
9271
+ `Could not read PATH from login shell ${shell}: ${failure}. Using ${value} and retrying in ${RETRY_AFTER_FAILURE_MS / 1e3}s`
9272
+ );
9273
+ return value;
9274
+ }
9275
+ async function shellPath() {
9276
+ if (cachedShellPath) return cachedShellPath;
9277
+ if (process.platform === "win32") {
9278
+ cachedShellPath = prependBinDirs(process.env.PATH);
9279
+ return cachedShellPath;
9280
+ }
9281
+ if (fallbackPath && Date.now() - fallbackPath.at < RETRY_AFTER_FAILURE_MS) {
9282
+ return fallbackPath.value;
9283
+ }
9284
+ inFlight ??= resolveShellPath().finally(() => {
9285
+ inFlight = null;
9286
+ });
9287
+ return inFlight;
9265
9288
  }
9266
9289
 
9267
9290
  // ../../packages/host-local/src/terminals/claude-resume.ts
@@ -9331,7 +9354,7 @@ function hintForPtySpawnError(err) {
9331
9354
  import { readdirSync as readdirSync2, readFileSync as readFileSync2, rmSync as rmSync2 } from "node:fs";
9332
9355
  import { mkdir, rename, writeFile } from "node:fs/promises";
9333
9356
  import { join as join4 } from "node:path";
9334
- var log = createLogger("terminal-history");
9357
+ var log2 = createLogger("terminal-history");
9335
9358
  var CHECKPOINT_MAX_BYTES = 5 * 1024 * 1024;
9336
9359
  var TerminalHistoryManager = class {
9337
9360
  constructor(historyDir) {
@@ -9363,7 +9386,7 @@ var TerminalHistoryManager = class {
9363
9386
  const serialized = JSON.stringify(checkpoint);
9364
9387
  const bytes = Buffer.byteLength(serialized);
9365
9388
  if (bytes > CHECKPOINT_MAX_BYTES) {
9366
- log.warn({ terminalId, bytes }, "terminal history checkpoint too large; skipping this write");
9389
+ log2.warn({ terminalId, bytes }, "terminal history checkpoint too large; skipping this write");
9367
9390
  return;
9368
9391
  }
9369
9392
  await writeJson(this.sessionDir(terminalId), "checkpoint.json", checkpoint, serialized);
@@ -9373,7 +9396,7 @@ var TerminalHistoryManager = class {
9373
9396
  try {
9374
9397
  rmSync2(this.sessionDir(terminalId), { recursive: true, force: true });
9375
9398
  } catch (err) {
9376
- log.warn({ err, terminalId }, "failed to remove terminal history directory");
9399
+ log2.warn({ err, terminalId }, "failed to remove terminal history directory");
9377
9400
  }
9378
9401
  }
9379
9402
  /**
@@ -9397,7 +9420,7 @@ var TerminalHistoryManager = class {
9397
9420
  try {
9398
9421
  rmSync2(dir, { recursive: true, force: true });
9399
9422
  } catch (err) {
9400
- log.warn({ err, dir }, "failed to remove terminal history directory");
9423
+ log2.warn({ err, dir }, "failed to remove terminal history directory");
9401
9424
  }
9402
9425
  }
9403
9426
  }
@@ -9417,12 +9440,12 @@ async function writeJson(dir, name, value, serialized) {
9417
9440
  await writeFile(tmp, serialized ?? JSON.stringify(value), { mode: 384 });
9418
9441
  await rename(tmp, path);
9419
9442
  } catch (err) {
9420
- log.warn({ err, dir, name }, "failed to write terminal history file");
9443
+ log2.warn({ err, dir, name }, "failed to write terminal history file");
9421
9444
  }
9422
9445
  }
9423
9446
 
9424
9447
  // ../../packages/host-local/src/terminals/terminal-pool.ts
9425
- var log2 = createLogger("terminal-pool");
9448
+ var log3 = createLogger("terminal-pool");
9426
9449
  var MAX_SCROLLBACK_SIZE = 1e5;
9427
9450
  var HEADLESS_SCROLLBACK_LINES = 1e4;
9428
9451
  var MAX_COLS = 1e3;
@@ -9575,7 +9598,7 @@ var TerminalPool = class {
9575
9598
  if (!existsSync3(shell)) {
9576
9599
  throw new Error(`Shell not found: ${shell}`);
9577
9600
  }
9578
- log2.debug(
9601
+ log3.debug(
9579
9602
  "Spawning shell %s in %s for terminal %s (PATH=%s)",
9580
9603
  shell,
9581
9604
  cwd,
@@ -9594,7 +9617,7 @@ var TerminalPool = class {
9594
9617
  });
9595
9618
  } catch (err) {
9596
9619
  const msg = err instanceof Error ? err.message : String(err);
9597
- log2.error("pty.spawn failed: %s (shell=%s, cwd=%s)", msg, shell, cwd);
9620
+ log3.error("pty.spawn failed: %s (shell=%s, cwd=%s)", msg, shell, cwd);
9598
9621
  throw new Error(hintForPtySpawnError(err));
9599
9622
  }
9600
9623
  let headless;
@@ -9621,7 +9644,7 @@ var TerminalPool = class {
9621
9644
  } catch (err) {
9622
9645
  ptyProcess.kill();
9623
9646
  const msg = err instanceof Error ? err.message : String(err);
9624
- log2.error("headless mirror setup failed for terminal %s: %s", terminalId, msg);
9647
+ log3.error("headless mirror setup failed for terminal %s: %s", terminalId, msg);
9625
9648
  throw err;
9626
9649
  }
9627
9650
  const session = {
@@ -9675,7 +9698,7 @@ var TerminalPool = class {
9675
9698
  this.maybeCheckpointHistory(terminalId, session);
9676
9699
  });
9677
9700
  ptyProcess.onExit(({ exitCode }) => {
9678
- log2.debug("Terminal exited: %s (worktree %s)", terminalId, worktreeId);
9701
+ log3.debug("Terminal exited: %s (worktree %s)", terminalId, worktreeId);
9679
9702
  const killTimer = this.killTimers.get(session);
9680
9703
  if (killTimer) clearTimeout(killTimer);
9681
9704
  this.killTimers.delete(session);
@@ -9714,7 +9737,7 @@ var TerminalPool = class {
9714
9737
  try {
9715
9738
  listener(event);
9716
9739
  } catch (err) {
9717
- log2.warn("exit listener threw for terminal %s: %s", terminalId, err);
9740
+ log3.warn("exit listener threw for terminal %s: %s", terminalId, err);
9718
9741
  }
9719
9742
  }
9720
9743
  });
@@ -9830,7 +9853,7 @@ var TerminalPool = class {
9830
9853
  `, { encoding: "utf-8", mode: 384, flag: "wx" });
9831
9854
  session.autoRunFile = cmdFile;
9832
9855
  } catch (err) {
9833
- log2.warn(
9856
+ log3.warn(
9834
9857
  "autoRunCommand: temp-file staging failed (%s); writing command directly",
9835
9858
  err instanceof Error ? err.message : String(err)
9836
9859
  );
@@ -9848,7 +9871,7 @@ var TerminalPool = class {
9848
9871
  try {
9849
9872
  pty.write(sourceLine);
9850
9873
  } catch (err) {
9851
- log2.warn("autoRunCommand: failed to inject command line (%s)", err);
9874
+ log3.warn("autoRunCommand: failed to inject command line (%s)", err);
9852
9875
  }
9853
9876
  };
9854
9877
  let dataDisposed = false;
@@ -10101,7 +10124,7 @@ var TerminalPool = class {
10101
10124
  try {
10102
10125
  snapshot = await this.serialize(terminalId);
10103
10126
  } catch (err) {
10104
- log2.error("Failed to serialize terminal %s for replay: %s", terminalId, err);
10127
+ log3.error("Failed to serialize terminal %s for replay: %s", terminalId, err);
10105
10128
  snapshot = { data: "", seq: 0 };
10106
10129
  }
10107
10130
  if (!snapshot) {
@@ -10219,11 +10242,11 @@ var TerminalPool = class {
10219
10242
  };
10220
10243
  function resolveSafeCwd(candidate, worktreeRoot, label, original) {
10221
10244
  if (candidate !== worktreeRoot && !candidate.startsWith(worktreeRoot + sep)) {
10222
- log2.warn("Ignoring %s %s \u2014 resolves outside worktree root %s", label, original, worktreeRoot);
10245
+ log3.warn("Ignoring %s %s \u2014 resolves outside worktree root %s", label, original, worktreeRoot);
10223
10246
  return null;
10224
10247
  }
10225
10248
  if (!existsSync3(candidate)) {
10226
- log2.warn("Ignoring %s %s \u2014 directory does not exist", label, original);
10249
+ log3.warn("Ignoring %s %s \u2014 directory does not exist", label, original);
10227
10250
  return null;
10228
10251
  }
10229
10252
  return candidate;
@@ -10266,7 +10289,7 @@ function daemonPaths(runDir, version = PROTOCOL_VERSION) {
10266
10289
  }
10267
10290
 
10268
10291
  // ../../packages/host-local/src/terminals/daemon/daemon-server.ts
10269
- var log3 = createLogger("terminal-daemon");
10292
+ var log4 = createLogger("terminal-daemon");
10270
10293
  var HELLO_TIMEOUT_MS = 5e3;
10271
10294
  var WATCHDOG_INTERVAL_MS = 2e3;
10272
10295
  var SHUTDOWN_GRACE_MS = 2e3;
@@ -10279,7 +10302,7 @@ async function runDaemon(options) {
10279
10302
  try {
10280
10303
  await preloadNodePty();
10281
10304
  } catch (err) {
10282
- log3.error({ err }, "terminal daemon could not load its native module (node-pty); exiting");
10305
+ log4.error({ err }, "terminal daemon could not load its native module (node-pty); exiting");
10283
10306
  return EXIT_NODE_PTY_UNAVAILABLE;
10284
10307
  }
10285
10308
  ensurePrivateDir(paths.runDir);
@@ -10317,13 +10340,13 @@ async function runDaemon(options) {
10317
10340
  retired = null;
10318
10341
  }
10319
10342
  if (outcome.status !== "published") {
10320
- log3.warn({ outcome: outcome.status }, "terminal daemon could not publish its endpoint");
10343
+ log4.warn({ outcome: outcome.status }, "terminal daemon could not publish its endpoint");
10321
10344
  await closeServer(server);
10322
10345
  return outcome.status === "occupied" ? EXIT_ENDPOINT_OCCUPIED : EXIT_ENDPOINT_UNAVAILABLE;
10323
10346
  }
10324
10347
  const identity = outcome.identity;
10325
10348
  if (retired) {
10326
- log3.info({ retired: retired.socket }, "terminal daemon superseded a daemon of another build");
10349
+ log4.info({ retired: retired.socket }, "terminal daemon superseded a daemon of another build");
10327
10350
  }
10328
10351
  let probingRetired = false;
10329
10352
  writePrivateFile(paths.token, token);
@@ -10336,13 +10359,13 @@ async function runDaemon(options) {
10336
10359
  entry: options.entry
10337
10360
  };
10338
10361
  writePrivateFile(paths.pid, JSON.stringify(pidRecord));
10339
- log3.info({ pid: process.pid, socket: paths.socket, buildId }, "terminal daemon ready");
10362
+ log4.info({ pid: process.pid, socket: paths.socket, buildId }, "terminal daemon ready");
10340
10363
  pool.onExit((event) => {
10341
10364
  if (options.recordExits && !event.killed && clients.size === 0) {
10342
10365
  try {
10343
10366
  writeExitRecord2(paths.runDir, event);
10344
10367
  } catch (err) {
10345
- log3.warn({ err, terminalId: event.terminalId }, "could not record a terminal exit");
10368
+ log4.warn({ err, terminalId: event.terminalId }, "could not record a terminal exit");
10346
10369
  }
10347
10370
  }
10348
10371
  for (const client of clients.values()) {
@@ -10360,7 +10383,7 @@ async function runDaemon(options) {
10360
10383
  }
10361
10384
  if (!endpointLost && endpointOwnership(paths.socket, identity) === "lost") {
10362
10385
  endpointLost = true;
10363
- log3.warn({ sessions: pool.size }, "terminal daemon lost its endpoint; draining");
10386
+ log4.warn({ sessions: pool.size }, "terminal daemon lost its endpoint; draining");
10364
10387
  reevaluateIdle();
10365
10388
  }
10366
10389
  if (retired && !probingRetired) {
@@ -10371,7 +10394,7 @@ async function runDaemon(options) {
10371
10394
  if (!isProvenDead(probe) || retired !== target) return;
10372
10395
  removeRetiredFiles(target);
10373
10396
  retired = null;
10374
- log3.info({ retired: target.socket }, "superseded terminal daemon exited");
10397
+ log4.info({ retired: target.socket }, "superseded terminal daemon exited");
10375
10398
  reevaluateIdle();
10376
10399
  });
10377
10400
  }
@@ -10404,9 +10427,9 @@ async function runDaemon(options) {
10404
10427
  if (shuttingDown) return;
10405
10428
  shuttingDown = true;
10406
10429
  if (retired) {
10407
- log3.warn({ retired: retired.socket }, "exiting while a superseded daemon is still running");
10430
+ log4.warn({ retired: retired.socket }, "exiting while a superseded daemon is still running");
10408
10431
  }
10409
- log3.info({ reason, sessions: pool.size }, "terminal daemon shutting down");
10432
+ log4.info({ reason, sessions: pool.size }, "terminal daemon shutting down");
10410
10433
  clearInterval(watchdog);
10411
10434
  if (adoptionTimer) clearTimeout(adoptionTimer);
10412
10435
  const shells = pool.listAll().map((entry) => entry.pid);
@@ -10455,7 +10478,7 @@ async function runDaemon(options) {
10455
10478
  return;
10456
10479
  }
10457
10480
  if (hello.buildId !== buildId) {
10458
- log3.info({ daemon: buildId, server: hello.buildId }, "server build differs from daemon");
10481
+ log4.info({ daemon: buildId, server: hello.buildId }, "server build differs from daemon");
10459
10482
  }
10460
10483
  role = hello.role;
10461
10484
  client = registerClient(hello.clientId, role, socket);
@@ -10518,7 +10541,7 @@ async function runDaemon(options) {
10518
10541
  const socket = client[role];
10519
10542
  if (!socket || socket.destroyed) return;
10520
10543
  if (socket.writableLength > MAX_STREAM_BACKLOG_BYTES) {
10521
- log3.warn({ clientId: client.id }, "server stopped reading; dropping its connection");
10544
+ log4.warn({ clientId: client.id }, "server stopped reading; dropping its connection");
10522
10545
  dropClient(client);
10523
10546
  return;
10524
10547
  }
@@ -10700,13 +10723,13 @@ function closeServer(server) {
10700
10723
  }
10701
10724
 
10702
10725
  // ../../packages/host-local/src/terminals/daemon/main.ts
10703
- var log4 = createLogger("terminal-daemon");
10726
+ var log5 = createLogger("terminal-daemon");
10704
10727
  async function runDaemonMain(entryUrl) {
10705
10728
  process.on("uncaughtException", (err) => {
10706
- log4.error({ err }, "uncaught exception in terminal daemon");
10729
+ log5.error({ err }, "uncaught exception in terminal daemon");
10707
10730
  });
10708
10731
  process.on("unhandledRejection", (err) => {
10709
- log4.error({ err }, "unhandled rejection in terminal daemon");
10732
+ log5.error({ err }, "unhandled rejection in terminal daemon");
10710
10733
  });
10711
10734
  const { values } = parseArgs({
10712
10735
  options: {
@@ -10718,12 +10741,12 @@ async function runDaemonMain(entryUrl) {
10718
10741
  });
10719
10742
  const runDir = values["run-dir"];
10720
10743
  if (!runDir) {
10721
- log4.error("terminal daemon needs --run-dir");
10744
+ log5.error("terminal daemon needs --run-dir");
10722
10745
  process.exit(2);
10723
10746
  }
10724
10747
  const supersede = values.supersede?.match(/^(\d+):(\d+)$/);
10725
10748
  if (values.supersede !== void 0 && !supersede) {
10726
- log4.error({ supersede: values.supersede }, "terminal daemon got a malformed --supersede");
10749
+ log5.error({ supersede: values.supersede }, "terminal daemon got a malformed --supersede");
10727
10750
  process.exit(2);
10728
10751
  }
10729
10752
  const exitCode = await runDaemon({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@band-app/server",
3
- "version": "0.55.0",
3
+ "version": "0.57.0",
4
4
  "type": "module",
5
5
  "types": "src/index.ts",
6
6
  "exports": {
@@ -58,24 +58,24 @@
58
58
  "vitest": "^4.0.18",
59
59
  "ws": "^8.18.0",
60
60
  "zod": "^3.25.67",
61
- "@band-app/host-api": "^0.1.0",
61
+ "@band-app/coding-agent": "^0.57.0",
62
62
  "@band-app/environment": "^0.1.0",
63
+ "@band-app/host-api": "^0.1.0",
63
64
  "@band-app/chat-runtime": "^0.1.0",
64
- "@band-app/coding-agent": "^0.55.0",
65
65
  "@band-app/host-local": "^0.1.0",
66
66
  "@band-app/host-remote": "^0.1.0",
67
- "@band-app/logger": "^0.55.0",
68
- "@band-app/plugin-api": "^0.1.0",
67
+ "@band-app/logger": "^0.57.0",
69
68
  "@band-app/link": "^0.1.0",
70
69
  "@band-app/plugin-github": "^0.1.0",
70
+ "@band-app/plugin-api": "^0.1.0",
71
71
  "@band-app/plugin-simulator": "^0.1.0",
72
- "@band-app/shared": "^0.1.0",
73
- "@band-app/worktree-ops": "^0.1.0"
72
+ "@band-app/worktree-ops": "^0.1.0",
73
+ "@band-app/shared": "^0.1.0"
74
74
  },
75
75
  "optionalDependencies": {
76
- "@band-app/worker-cli-darwin-arm64": "0.55.0",
77
- "@band-app/worker-cli-linux-x64": "0.55.0",
78
- "@band-app/worker-cli-linux-arm64": "0.55.0"
76
+ "@band-app/worker-cli-darwin-arm64": "0.57.0",
77
+ "@band-app/worker-cli-linux-x64": "0.57.0",
78
+ "@band-app/worker-cli-linux-arm64": "0.57.0"
79
79
  },
80
80
  "scripts": {
81
81
  "dev": "NODE_ENV=development tsx watch --exclude '../web/**' start-server.ts",
@@ -1 +0,0 @@
1
- import{Y as a,Z as n}from"./main-BIldwfya.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-B4BG7PRW-Db1XzP6B.js";import{_ as i}from"./main-BIldwfya.js";import"./chunk-FMBD7UC4-54B6Y5YM.js";import"./chunk-55IACEB6-ClHgx4bC.js";import"./chunk-QN33PNHL-BttimAfW.js";var p={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{p as diagram};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-B4BG7PRW-Db1XzP6B.js";import{_ as i}from"./main-BIldwfya.js";import"./chunk-FMBD7UC4-54B6Y5YM.js";import"./chunk-55IACEB6-ClHgx4bC.js";import"./chunk-QN33PNHL-BttimAfW.js";var p={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{p as diagram};
@@ -1 +0,0 @@
1
- import{b as r}from"./_baseUniq-TZ0JUUYF.js";var e=4;function a(o){return r(o,e)}export{a as c};