@madarco/agentbox 0.24.4 → 0.24.6

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 (106) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/_cloud-attach-ESCPOKG5.js +0 -0
  3. package/dist/chunk-3MDYQROX.js +0 -0
  4. package/dist/chunk-4HPLS5HJ.js +0 -0
  5. package/dist/chunk-5JDOTQTM.js +0 -0
  6. package/dist/chunk-7DPDUZ7L.js +0 -0
  7. package/dist/chunk-CE3S7UDQ.js +0 -0
  8. package/dist/chunk-G3H2L3O2.js +0 -0
  9. package/dist/chunk-H6A4BQMG.js +0 -0
  10. package/dist/chunk-LJMGHFLZ.js +0 -0
  11. package/dist/chunk-OSPM4Q5V.js +0 -0
  12. package/dist/chunk-QHISF6O6.js +0 -0
  13. package/dist/chunk-RFRWS5CD.js +0 -0
  14. package/dist/chunk-WJFZJZIM.js +0 -0
  15. package/dist/cloud-poller-SUNA6ZQC-7M5LJHHE.js +0 -0
  16. package/dist/dist-2N3XHMBQ.js +0 -0
  17. package/dist/dist-3M53BF4E.js +0 -0
  18. package/dist/dist-FGXCG4JY.js +0 -0
  19. package/dist/dist-HPPHBZTO.js +0 -0
  20. package/dist/dist-NOUPH5E6.js +0 -0
  21. package/dist/dist-TRKHS6I7.js +0 -0
  22. package/dist/dist-VFPT5TDH.js +0 -0
  23. package/dist/index.js +129 -91
  24. package/dist/index.js.map +1 -1
  25. package/dist/prepared-state-BUO75YLZ-46W2PAHH.js +0 -0
  26. package/package.json +29 -28
  27. package/runtime/_shared/agentbox-checkpoint-cleanup +0 -0
  28. package/runtime/_shared/agentbox-dockerd-start +0 -0
  29. package/runtime/_shared/agentbox-open +0 -0
  30. package/runtime/_shared/agentbox-portless-trust +0 -0
  31. package/runtime/_shared/agentbox-vnc-start +0 -0
  32. package/runtime/_shared/ctl.cjs +0 -0
  33. package/runtime/_shared/gh-shim +0 -0
  34. package/runtime/_shared/git-shim +0 -0
  35. package/runtime/_shared/linear-shim +0 -0
  36. package/runtime/_shared/ntn-shim +0 -0
  37. package/runtime/digitalocean/agentbox-checkpoint-cleanup +0 -0
  38. package/runtime/digitalocean/agentbox-dockerd-start +0 -0
  39. package/runtime/digitalocean/agentbox-open +0 -0
  40. package/runtime/digitalocean/agentbox-portless-trust +0 -0
  41. package/runtime/digitalocean/agentbox-vnc-start +0 -0
  42. package/runtime/digitalocean/ctl.cjs +0 -0
  43. package/runtime/digitalocean/gh-shim +0 -0
  44. package/runtime/digitalocean/git-shim +0 -0
  45. package/runtime/digitalocean/linear-shim +0 -0
  46. package/runtime/digitalocean/ntn-shim +0 -0
  47. package/runtime/digitalocean/scripts/install-box.sh +0 -0
  48. package/runtime/docker/packages/ctl/dist/bin.cjs +0 -0
  49. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-checkpoint-cleanup +0 -0
  50. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-dockerd-start +0 -0
  51. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-open +0 -0
  52. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-portless-trust +0 -0
  53. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-sshd-start +0 -0
  54. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-vnc-start +0 -0
  55. package/runtime/docker/packages/sandbox-docker/scripts/chromium-resolver +0 -0
  56. package/runtime/docker/packages/sandbox-docker/scripts/gh-shim +0 -0
  57. package/runtime/docker/packages/sandbox-docker/scripts/git-shim +0 -0
  58. package/runtime/docker/packages/sandbox-docker/scripts/linear-shim +0 -0
  59. package/runtime/docker/packages/sandbox-docker/scripts/ntn-shim +0 -0
  60. package/runtime/e2b/agentbox-checkpoint-cleanup +0 -0
  61. package/runtime/e2b/agentbox-dockerd-start +0 -0
  62. package/runtime/e2b/agentbox-open +0 -0
  63. package/runtime/e2b/agentbox-vnc-start +0 -0
  64. package/runtime/e2b/ctl.cjs +0 -0
  65. package/runtime/e2b/gh-shim +0 -0
  66. package/runtime/e2b/git-shim +0 -0
  67. package/runtime/e2b/linear-shim +0 -0
  68. package/runtime/e2b/ntn-shim +0 -0
  69. package/runtime/e2b/scripts/build-template.sh +0 -0
  70. package/runtime/hetzner/agentbox-checkpoint-cleanup +0 -0
  71. package/runtime/hetzner/agentbox-dockerd-start +0 -0
  72. package/runtime/hetzner/agentbox-open +0 -0
  73. package/runtime/hetzner/agentbox-portless-trust +0 -0
  74. package/runtime/hetzner/agentbox-vnc-start +0 -0
  75. package/runtime/hetzner/ctl.cjs +0 -0
  76. package/runtime/hetzner/gh-shim +0 -0
  77. package/runtime/hetzner/git-shim +0 -0
  78. package/runtime/hetzner/linear-shim +0 -0
  79. package/runtime/hetzner/ntn-shim +0 -0
  80. package/runtime/hetzner/scripts/install-box.sh +0 -0
  81. package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
  82. package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
  83. package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
  84. package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
  85. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  86. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  87. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  88. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  89. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  90. package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
  91. package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
  92. package/runtime/relay/bin.cjs +0 -0
  93. package/runtime/vercel/agentbox-checkpoint-cleanup +0 -0
  94. package/runtime/vercel/agentbox-dockerd-start +0 -0
  95. package/runtime/vercel/agentbox-open +0 -0
  96. package/runtime/vercel/agentbox-vnc-start +0 -0
  97. package/runtime/vercel/ctl.cjs +0 -0
  98. package/runtime/vercel/gh-shim +0 -0
  99. package/runtime/vercel/git-shim +0 -0
  100. package/runtime/vercel/linear-shim +0 -0
  101. package/runtime/vercel/ntn-shim +0 -0
  102. package/runtime/vercel/scripts/provision.sh +0 -0
  103. package/LICENSE +0 -21
  104. /package/runtime/hub/apps/hub/.next/static/{bwxNg9k-GQFyi2ouG8Aeh → 2LDXStEUVHS2oK1ID_Uvo}/_buildManifest.js +0 -0
  105. /package/runtime/hub/apps/hub/.next/static/{bwxNg9k-GQFyi2ouG8Aeh → 2LDXStEUVHS2oK1ID_Uvo}/_clientMiddlewareManifest.js +0 -0
  106. /package/runtime/hub/apps/hub/.next/static/{bwxNg9k-GQFyi2ouG8Aeh → 2LDXStEUVHS2oK1ID_Uvo}/_ssgManifest.js +0 -0
package/CHANGELOG.md CHANGED
@@ -9,6 +9,28 @@ Entries are generated from the commit history with `/release-notes` and then
9
9
  hand-reviewed — they describe what changed for someone using the `agentbox`
10
10
  CLI, not the raw commits.
11
11
 
12
+ ## [0.24.6] - 2026-07-12
13
+
14
+ ### Fixed
15
+
16
+ - `self-update` no longer deletes the box image. It's content-addressed, so an
17
+ update that doesn't change the build context now costs nothing — and when the
18
+ context *has* changed, `doctor` and the app both flag it as stale (fix with
19
+ `agentbox prepare --provider docker`) instead of it surfacing at create.
20
+ - `agentbox install` no longer offers to install the menu-bar app when it's
21
+ already installed; it offers an update only when one is actually available.
22
+
23
+ ## [0.24.5] - 2026-07-12
24
+
25
+ ### Fixed
26
+
27
+ - Update checks no longer interrupt `create` / `claude` / `codex` and the other
28
+ box commands — they say nothing about updates at all, and a newer menu-bar app
29
+ is now a one-line note after a quiet command instead of a prompt.
30
+ - The menu-bar app no longer reports a phantom update when it is already current
31
+ (it was comparing an install stamp rather than the app's actual version, so an
32
+ app installed from the DMG always looked stale).
33
+
12
34
  ## [0.24.4] - 2026-07-12
13
35
 
14
36
  ### Added
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/index.js CHANGED
@@ -221,7 +221,6 @@ import {
221
221
  registerBoxWithRelay,
222
222
  rehydrateRelayRegistry,
223
223
  removeCheckpoint,
224
- removeImage,
225
224
  renderPortsTable,
226
225
  renderStatusTable,
227
226
  renderTaskTable,
@@ -321,6 +320,7 @@ import {
321
320
  ensureCloudSshAlias,
322
321
  ensureImage,
323
322
  errSummary,
323
+ evaluateDockerBaseFreshness,
324
324
  firstLine,
325
325
  generateBoxId,
326
326
  hasUnmanagedHostConflict,
@@ -376,8 +376,8 @@ import {
376
376
  } from "./chunk-WJFZJZIM.js";
377
377
 
378
378
  // src/version.ts
379
- var AGENTBOX_VERSION = true ? "0.24.4" : "0.0.0-dev";
380
- var AGENTBOX_COMMIT = true ? "a31f13870" : "dev";
379
+ var AGENTBOX_VERSION = true ? "0.24.6" : "0.0.0-dev";
380
+ var AGENTBOX_COMMIT = true ? "59e7ce5e4" : "dev";
381
381
 
382
382
  // src/index.ts
383
383
  import { existsSync as _existsSync } from "fs";
@@ -1156,6 +1156,30 @@ import { tmpdir } from "os";
1156
1156
  import { join as join2 } from "path";
1157
1157
  import { setTimeout as delay } from "timers/promises";
1158
1158
 
1159
+ // src/lib/semver-lite.ts
1160
+ var TRIPLET = /^(\d+)\.(\d+)\.(\d+)$/;
1161
+ function parseTriplet(v) {
1162
+ const m = TRIPLET.exec(v.trim());
1163
+ if (!m) return null;
1164
+ return [Number(m[1]), Number(m[2]), Number(m[3])];
1165
+ }
1166
+ function compareSemver(a, b) {
1167
+ const pa = parseTriplet(a);
1168
+ const pb = parseTriplet(b);
1169
+ if (!pa || !pb) return null;
1170
+ for (let i = 0; i < 3; i++) {
1171
+ const ai = pa[i];
1172
+ const bi = pb[i];
1173
+ if (ai < bi) return -1;
1174
+ if (ai > bi) return 1;
1175
+ }
1176
+ return 0;
1177
+ }
1178
+ function isNewer(latest, current) {
1179
+ if (latest === void 0) return false;
1180
+ return compareSemver(latest, current) === 1;
1181
+ }
1182
+
1159
1183
  // src/lib/update-state.ts
1160
1184
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
1161
1185
  import { homedir } from "os";
@@ -1172,7 +1196,6 @@ function readUpdateState() {
1172
1196
  const state = { version: STATE_VERSION };
1173
1197
  if (typeof parsed.lastRunVersion === "string") state.lastRunVersion = parsed.lastRunVersion;
1174
1198
  if (typeof parsed.traySha === "string") state.traySha = parsed.traySha;
1175
- if (typeof parsed.trayDeclinedSha === "string") state.trayDeclinedSha = parsed.trayDeclinedSha;
1176
1199
  if (parsed.remoteCheck !== void 0 && typeof parsed.remoteCheck === "object" && typeof parsed.remoteCheck.checkedAt === "string") {
1177
1200
  state.remoteCheck = {
1178
1201
  checkedAt: parsed.remoteCheck.checkedAt,
@@ -1307,18 +1330,36 @@ function parseVersionManifest(body) {
1307
1330
  }
1308
1331
  function decideTrayUpdate(input) {
1309
1332
  if (!input.installed) return { update: false, reason: "not-installed" };
1333
+ const { installedVersion, latestVersion } = input;
1334
+ if (installedVersion !== void 0 && latestVersion !== void 0 && isReleaseVersion(installedVersion) && isReleaseVersion(latestVersion)) {
1335
+ return isNewer(latestVersion, installedVersion) ? { update: true, reason: "older-version" } : { update: false, reason: "up-to-date" };
1336
+ }
1310
1337
  if (input.latestSha === void 0) return { update: false, reason: "no-latest-sha" };
1311
1338
  if (input.stampedSha === void 0) return { update: true, reason: "no-stamp" };
1312
1339
  if (input.stampedSha !== input.latestSha) return { update: true, reason: "mismatch" };
1313
1340
  return { update: false, reason: "up-to-date" };
1314
1341
  }
1315
- function shouldPromptTrayUpdate(input) {
1316
- if (input.declinedSha !== void 0 && input.declinedSha === input.latestSha) return false;
1317
- return decideTrayUpdate({
1318
- installed: input.installed,
1319
- stampedSha: input.stampedSha,
1320
- latestSha: input.latestSha
1321
- }).update;
1342
+ function isReleaseVersion(v) {
1343
+ const core = v.split("-", 1)[0] ?? v;
1344
+ const parts = core.split(".");
1345
+ return parts.length === 3 && parts.every((p) => /^\d+$/.test(p)) && core !== "0.0.0";
1346
+ }
1347
+ async function readInstalledTrayVersion() {
1348
+ if (!trayInstalled()) return void 0;
1349
+ try {
1350
+ const { stdout } = await execa("plutil", [
1351
+ "-extract",
1352
+ "CFBundleShortVersionString",
1353
+ "raw",
1354
+ "-o",
1355
+ "-",
1356
+ join2(APP_PATH, "Contents", "Info.plist")
1357
+ ]);
1358
+ const v = stdout.trim();
1359
+ return v.length > 0 ? v : void 0;
1360
+ } catch {
1361
+ return void 0;
1362
+ }
1322
1363
  }
1323
1364
  async function trayRunning() {
1324
1365
  return await execa("pgrep", ["-x", APP_NAME]).catch(() => null) !== null;
@@ -3838,7 +3879,10 @@ async function evaluateCheckpoint(provider, projectRoot, ref) {
3838
3879
  return evaluateCloudCheckpoint(provider, projectRoot, ref);
3839
3880
  }
3840
3881
  async function evaluateBaseFreshness(provider, claudeInstall) {
3841
- if (provider === "docker") return { state: "fresh" };
3882
+ if (provider === "docker") {
3883
+ const { evaluateDockerBaseFreshness: evaluateDockerBaseFreshness2 } = await import("./dist-NOUPH5E6.js");
3884
+ return await evaluateDockerBaseFreshness2({ claudeInstall });
3885
+ }
3842
3886
  const stored = currentCloudBaseFingerprint(provider);
3843
3887
  if (!stored) return { state: "unprepared" };
3844
3888
  const current = await currentCloudBaseFingerprintLive(provider, claudeInstall).catch(() => void 0);
@@ -13312,7 +13356,6 @@ function resolveClaudeInstall() {
13312
13356
  return claudeInstallOnce;
13313
13357
  }
13314
13358
  async function baseFreshnessRow(name) {
13315
- if (name === "docker") return null;
13316
13359
  const status = await evaluateBaseFreshness(name, await resolveClaudeInstall()).catch(() => null);
13317
13360
  if (!status) return null;
13318
13361
  switch (status.state) {
@@ -14436,16 +14479,30 @@ pass \`agentbox install --skills-only --force\` to overwrite`
14436
14479
  const providerGroup = await runProviderChecks(providerName);
14437
14480
  process.stdout.write(" " + formatCompact([sysGroup, providerGroup]) + "\n");
14438
14481
  if (process.platform === "darwin") {
14439
- const wantTray = opts.yes ? true : await confirm({ message: "Install the AgentBox menu-bar app?", initialValue: true });
14440
- if (wantTray === true) {
14441
- const sp2 = (0, prompt_exports.spinner)();
14442
- sp2.start("Downloading menu-bar app");
14443
- try {
14444
- const res = await installTray({ quiet: true });
14445
- sp2.stop(res.ran ? "Menu-bar app: installed" : `Menu-bar app: skipped (${res.reason ?? ""})`);
14446
- } catch (err) {
14447
- sp2.stop("Menu-bar app: failed");
14448
- prompt_exports.log.warn(err instanceof Error ? err.message : String(err));
14482
+ const installedVersion = trayInstalled() ? await readInstalledTrayVersion() : void 0;
14483
+ const latestVersion = trayInstalled() ? readUpdateState().remoteCheck?.trayLatestVersion ?? await fetchTrayLatestVersion() : void 0;
14484
+ const behind = installedVersion !== void 0 && latestVersion !== void 0 && isNewer(latestVersion, installedVersion);
14485
+ let action = "install";
14486
+ if (trayInstalled()) action = behind ? "update" : "none";
14487
+ if (action === "none") {
14488
+ prompt_exports.log.info(
14489
+ `Menu-bar app: already installed${installedVersion ? ` (${installedVersion})` : ""}`
14490
+ );
14491
+ } else {
14492
+ const message = action === "update" ? `Update the AgentBox menu-bar app (${installedVersion ?? "?"} \u2192 ${latestVersion ?? "?"})?` : "Install the AgentBox menu-bar app?";
14493
+ const wantTray = opts.yes ? true : await confirm({ message, initialValue: true });
14494
+ if (wantTray === true) {
14495
+ const sp2 = (0, prompt_exports.spinner)();
14496
+ sp2.start(action === "update" ? "Updating menu-bar app" : "Downloading menu-bar app");
14497
+ try {
14498
+ const res = await installTray({ quiet: true });
14499
+ sp2.stop(
14500
+ res.ran ? `Menu-bar app: ${action === "update" ? "updated" : "installed"}` : `Menu-bar app: skipped (${res.reason ?? ""})`
14501
+ );
14502
+ } catch (err) {
14503
+ sp2.stop(`Menu-bar app: failed`);
14504
+ prompt_exports.log.warn(err instanceof Error ? err.message : String(err));
14505
+ }
14449
14506
  }
14450
14507
  }
14451
14508
  }
@@ -18002,7 +18059,9 @@ async function maybeUpdateTray(say) {
18002
18059
  const decision = decideTrayUpdate({
18003
18060
  installed: true,
18004
18061
  stampedSha: state.traySha,
18005
- latestSha
18062
+ latestSha,
18063
+ installedVersion: await readInstalledTrayVersion(),
18064
+ latestVersion: state.remoteCheck?.trayLatestVersion
18006
18065
  });
18007
18066
  if (!decision.update) {
18008
18067
  say(
@@ -18038,12 +18097,12 @@ async function runPostUpdateRefresh(opts = {}) {
18038
18097
  }
18039
18098
  }
18040
18099
  try {
18041
- const removed = await removeImage(DEFAULT_BOX_IMAGE);
18100
+ const freshness = await evaluateDockerBaseFreshness();
18042
18101
  say(
18043
- removed ? `removed image ${DEFAULT_BOX_IMAGE} (rebuilds on next create/claude)` : `image ${DEFAULT_BOX_IMAGE} not present (nothing to remove)`
18102
+ freshness.state === "fresh" ? `box image ${DEFAULT_BOX_IMAGE} already current (build context unchanged)` : freshness.state === "stale" ? `box image ${DEFAULT_BOX_IMAGE}: build context changed \u2014 rebuilds on next create` : freshness.state === "unprepared" ? `box image ${DEFAULT_BOX_IMAGE} not present \u2014 pulled on next create` : `box image ${DEFAULT_BOX_IMAGE}: freshness unknown \u2014 left alone`
18044
18103
  );
18045
18104
  } catch (err) {
18046
- warn("box image removal", err);
18105
+ warn("box image check", err);
18047
18106
  }
18048
18107
  try {
18049
18108
  const hub = await getHubStatus();
@@ -18109,30 +18168,6 @@ function detectExecutionMethod(input) {
18109
18168
  return "direct";
18110
18169
  }
18111
18170
 
18112
- // src/lib/semver-lite.ts
18113
- var TRIPLET = /^(\d+)\.(\d+)\.(\d+)$/;
18114
- function parseTriplet(v) {
18115
- const m = TRIPLET.exec(v.trim());
18116
- if (!m) return null;
18117
- return [Number(m[1]), Number(m[2]), Number(m[3])];
18118
- }
18119
- function compareSemver(a, b) {
18120
- const pa = parseTriplet(a);
18121
- const pb = parseTriplet(b);
18122
- if (!pa || !pb) return null;
18123
- for (let i = 0; i < 3; i++) {
18124
- const ai = pa[i];
18125
- const bi = pb[i];
18126
- if (ai < bi) return -1;
18127
- if (ai > bi) return 1;
18128
- }
18129
- return 0;
18130
- }
18131
- function isNewer(latest, current) {
18132
- if (latest === void 0) return false;
18133
- return compareSemver(latest, current) === 1;
18134
- }
18135
-
18136
18171
  // src/lib/update-check.ts
18137
18172
  var PKG = "@madarco/agentbox";
18138
18173
  var REGISTRY_URL = `https://registry.npmjs.org/${PKG}/latest`;
@@ -18203,6 +18238,12 @@ function maybeStartRemoteCheck() {
18203
18238
  };
18204
18239
  return run().catch(() => void 0);
18205
18240
  }
18241
+ function trayNudgeMessage(state, installedVersion) {
18242
+ const latest = state.remoteCheck?.trayLatestVersion;
18243
+ if (!latest || !installedVersion) return null;
18244
+ if (!isNewer(latest, installedVersion)) return null;
18245
+ return `a newer AgentBox app (${latest}, you have ${installedVersion}) is available \u2014 run \`agentbox install app\``;
18246
+ }
18206
18247
  function nudgeMessage(state, method, version = AGENTBOX_VERSION) {
18207
18248
  if (!nudgeEligible(method, version)) return null;
18208
18249
  const latest = state.remoteCheck?.npmLatest;
@@ -19764,7 +19805,7 @@ async function reportLatest() {
19764
19805
  }
19765
19806
  }
19766
19807
  var updateCommand = new Command63("self-update").description(
19767
- "Update agentbox: self-update via npm/pnpm (unless run via npx), refresh the host skills, wipe the box image so it rebuilds, reload the relay, and update the menu-bar app"
19808
+ "Update agentbox: self-update via npm/pnpm (unless run via npx), refresh the host skills, re-check the box image (rebuilt on the next create only if its build context changed), reload the relay/hub, and update the menu-bar app"
19768
19809
  ).option("-y, --yes", "skip the confirmation prompt").option("--dry-run", "show what would happen, don't change anything").option("--skip-self", "skip the package self-update; only refresh the skills + image + relay + app").option("--skip-skills", "skip refreshing the host skill files in ~/.claude, ~/.codex, ~/.config/opencode").action(async (opts) => {
19769
19810
  try {
19770
19811
  const method = detectExecutionMethod({
@@ -20071,6 +20112,27 @@ var FIRST_RUN_EXEMPT = /* @__PURE__ */ new Set([
20071
20112
  "drive",
20072
20113
  "screen"
20073
20114
  ]);
20115
+ var UPDATE_PROMPT_EXEMPT = /* @__PURE__ */ new Set([
20116
+ "create",
20117
+ "claude",
20118
+ "codex",
20119
+ "opencode",
20120
+ "shell",
20121
+ "sh",
20122
+ "attach",
20123
+ "exec",
20124
+ "run",
20125
+ "open",
20126
+ "fork",
20127
+ "url",
20128
+ "connect"
20129
+ ]);
20130
+ function isUpdatePromptEligible(args) {
20131
+ if (!isFirstRunHookEligible(args)) return false;
20132
+ const cmd = args[2];
20133
+ if (typeof cmd !== "string") return false;
20134
+ return !UPDATE_PROMPT_EXEMPT.has(cmd) && cmd !== "self-update";
20135
+ }
20074
20136
  function isFirstRunHookEligible(args) {
20075
20137
  if (!process.stdin.isTTY || !process.stdout.isTTY) return false;
20076
20138
  const rest = args.slice(2);
@@ -20098,7 +20160,7 @@ if (AGENTBOX_VERSION !== "0.0.0-dev") {
20098
20160
  const state = readUpdateState();
20099
20161
  if (state.lastRunVersion === void 0) {
20100
20162
  writeUpdateState({ lastRunVersion: AGENTBOX_VERSION });
20101
- } else if (state.lastRunVersion !== AGENTBOX_VERSION && isFirstRunHookEligible(argv) && argv[2] !== "self-update") {
20163
+ } else if (state.lastRunVersion !== AGENTBOX_VERSION && isUpdatePromptEligible(argv)) {
20102
20164
  versionPromptShown = true;
20103
20165
  try {
20104
20166
  const yes = await confirm({
@@ -20113,34 +20175,6 @@ if (AGENTBOX_VERSION !== "0.0.0-dev") {
20113
20175
  } catch (err) {
20114
20176
  process.stderr.write(
20115
20177
  `post-update refresh failed: ${err instanceof Error ? err.message : String(err)}
20116
- `
20117
- );
20118
- }
20119
- } else if (isFirstRunHookEligible(argv) && argv[2] !== "self-update" && shouldPromptTrayUpdate({
20120
- installed: trayInstalled(),
20121
- stampedSha: state.traySha,
20122
- latestSha: state.remoteCheck?.trayLatestSha,
20123
- declinedSha: state.trayDeclinedSha
20124
- })) {
20125
- const latestSha = state.remoteCheck?.trayLatestSha;
20126
- const latestVersion = state.remoteCheck?.trayLatestVersion;
20127
- versionPromptShown = true;
20128
- try {
20129
- const yes = await confirm({
20130
- message: latestVersion ? `the AgentBox menu-bar app has an update (${latestVersion}) \u2014 install it now?` : "the AgentBox menu-bar app has an update \u2014 install it now?",
20131
- initialValue: true
20132
- });
20133
- if (yes) {
20134
- await maybeUpdateTray((msg) => {
20135
- process.stdout.write(`${msg}
20136
- `);
20137
- });
20138
- } else {
20139
- writeUpdateState({ trayDeclinedSha: latestSha });
20140
- }
20141
- } catch (err) {
20142
- process.stderr.write(
20143
- `menu-bar app update failed: ${err instanceof Error ? err.message : String(err)}
20144
20178
  `
20145
20179
  );
20146
20180
  }
@@ -20151,17 +20185,21 @@ if (isFirstRunHookEligible(argv)) {
20151
20185
  }
20152
20186
  program.parseAsync(argv).then(
20153
20187
  async () => {
20154
- if (versionPromptShown || !isFirstRunHookEligible(argv)) return;
20155
- const msg = nudgeMessage(
20156
- readUpdateState(),
20157
- detectExecutionMethod({
20158
- userAgent: process.env.npm_config_user_agent,
20159
- argv1: process.argv[1]
20160
- })
20161
- );
20162
- if (msg !== null && await updateCheckEnabled()) {
20188
+ if (versionPromptShown || !isUpdatePromptEligible(argv)) return;
20189
+ const state = readUpdateState();
20190
+ const lines = [
20191
+ nudgeMessage(
20192
+ state,
20193
+ detectExecutionMethod({
20194
+ userAgent: process.env.npm_config_user_agent,
20195
+ argv1: process.argv[1]
20196
+ })
20197
+ ),
20198
+ trayNudgeMessage(state, await readInstalledTrayVersion())
20199
+ ].filter((l) => l !== null);
20200
+ if (lines.length > 0 && await updateCheckEnabled()) {
20163
20201
  process.stderr.write(`
20164
- ${msg}
20202
+ ${lines.join("\n")}
20165
20203
  `);
20166
20204
  }
20167
20205
  },