@madarco/agentbox 0.24.3 → 0.24.5

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 (153) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/{_cloud-attach-D5OC7DCC.js → _cloud-attach-ESCPOKG5.js} +5 -5
  3. package/dist/{chunk-DEDTPG2D.js → chunk-3MDYQROX.js} +5 -5
  4. package/dist/{chunk-SS6ZEKLL.js → chunk-4HPLS5HJ.js} +7 -4
  5. package/dist/chunk-4HPLS5HJ.js.map +1 -0
  6. package/dist/{chunk-3253DDXI.js → chunk-5JDOTQTM.js} +4 -4
  7. package/dist/{chunk-5KHEH47T.js → chunk-7DPDUZ7L.js} +2 -2
  8. package/dist/{chunk-24PXPJI3.js → chunk-CE3S7UDQ.js} +10 -10
  9. package/dist/chunk-G3H2L3O2.js +0 -0
  10. package/dist/{chunk-UIRBYL4G.js → chunk-H6A4BQMG.js} +9 -1
  11. package/dist/chunk-H6A4BQMG.js.map +1 -0
  12. package/dist/{chunk-WLHJZPFJ.js → chunk-LJMGHFLZ.js} +152 -3
  13. package/dist/chunk-LJMGHFLZ.js.map +1 -0
  14. package/dist/{chunk-5WF7PAH2.js → chunk-OSPM4Q5V.js} +3 -3
  15. package/dist/{chunk-QMA3DB5L.js → chunk-QHISF6O6.js} +3 -3
  16. package/dist/{chunk-LC4E2EIZ.js → chunk-RFRWS5CD.js} +2 -2
  17. package/dist/chunk-WJFZJZIM.js +0 -0
  18. package/dist/cloud-poller-SUNA6ZQC-7M5LJHHE.js +0 -0
  19. package/dist/{dist-UWUTNRCK.js → dist-2N3XHMBQ.js} +6 -6
  20. package/dist/{dist-FWB3MIQ5.js → dist-3M53BF4E.js} +39 -58
  21. package/dist/dist-3M53BF4E.js.map +1 -0
  22. package/dist/{dist-TK3STVUP.js → dist-FGXCG4JY.js} +6 -6
  23. package/dist/{dist-T5MXBZGP.js → dist-HPPHBZTO.js} +2 -2
  24. package/dist/{dist-2JWYYJZR.js → dist-NOUPH5E6.js} +4 -4
  25. package/dist/{dist-3NFY6M53.js → dist-TRKHS6I7.js} +6 -6
  26. package/dist/{dist-72EYR5DW.js → dist-VFPT5TDH.js} +6 -6
  27. package/dist/index.js +116 -90
  28. package/dist/index.js.map +1 -1
  29. package/dist/{prepared-state-BUO75YLZ-RQRFFBJW.js → prepared-state-BUO75YLZ-46W2PAHH.js} +2 -2
  30. package/package.json +29 -28
  31. package/runtime/_shared/agentbox-checkpoint-cleanup +0 -0
  32. package/runtime/_shared/agentbox-dockerd-start +0 -0
  33. package/runtime/_shared/agentbox-open +0 -0
  34. package/runtime/_shared/agentbox-portless-trust +0 -0
  35. package/runtime/_shared/agentbox-vnc-start +0 -0
  36. package/runtime/_shared/ctl.cjs +8 -0
  37. package/runtime/_shared/gh-shim +0 -0
  38. package/runtime/_shared/git-shim +0 -0
  39. package/runtime/_shared/linear-shim +0 -0
  40. package/runtime/_shared/ntn-shim +0 -0
  41. package/runtime/digitalocean/agentbox-checkpoint-cleanup +0 -0
  42. package/runtime/digitalocean/agentbox-dockerd-start +0 -0
  43. package/runtime/digitalocean/agentbox-open +0 -0
  44. package/runtime/digitalocean/agentbox-portless-trust +0 -0
  45. package/runtime/digitalocean/agentbox-vnc-start +0 -0
  46. package/runtime/digitalocean/ctl.cjs +8 -0
  47. package/runtime/digitalocean/gh-shim +0 -0
  48. package/runtime/digitalocean/git-shim +0 -0
  49. package/runtime/digitalocean/linear-shim +0 -0
  50. package/runtime/digitalocean/ntn-shim +0 -0
  51. package/runtime/digitalocean/scripts/install-box.sh +0 -0
  52. package/runtime/docker/packages/ctl/dist/bin.cjs +8 -0
  53. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-checkpoint-cleanup +0 -0
  54. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-dockerd-start +0 -0
  55. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-open +0 -0
  56. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-portless-trust +0 -0
  57. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-sshd-start +0 -0
  58. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-vnc-start +0 -0
  59. package/runtime/docker/packages/sandbox-docker/scripts/chromium-resolver +0 -0
  60. package/runtime/docker/packages/sandbox-docker/scripts/gh-shim +0 -0
  61. package/runtime/docker/packages/sandbox-docker/scripts/git-shim +0 -0
  62. package/runtime/docker/packages/sandbox-docker/scripts/linear-shim +0 -0
  63. package/runtime/docker/packages/sandbox-docker/scripts/ntn-shim +0 -0
  64. package/runtime/e2b/agentbox-checkpoint-cleanup +0 -0
  65. package/runtime/e2b/agentbox-dockerd-start +0 -0
  66. package/runtime/e2b/agentbox-open +0 -0
  67. package/runtime/e2b/agentbox-vnc-start +0 -0
  68. package/runtime/e2b/ctl.cjs +8 -0
  69. package/runtime/e2b/gh-shim +0 -0
  70. package/runtime/e2b/git-shim +0 -0
  71. package/runtime/e2b/linear-shim +0 -0
  72. package/runtime/e2b/ntn-shim +0 -0
  73. package/runtime/e2b/scripts/build-template.sh +0 -0
  74. package/runtime/hetzner/agentbox-checkpoint-cleanup +0 -0
  75. package/runtime/hetzner/agentbox-dockerd-start +0 -0
  76. package/runtime/hetzner/agentbox-open +0 -0
  77. package/runtime/hetzner/agentbox-portless-trust +0 -0
  78. package/runtime/hetzner/agentbox-vnc-start +0 -0
  79. package/runtime/hetzner/ctl.cjs +8 -0
  80. package/runtime/hetzner/gh-shim +0 -0
  81. package/runtime/hetzner/git-shim +0 -0
  82. package/runtime/hetzner/linear-shim +0 -0
  83. package/runtime/hetzner/ntn-shim +0 -0
  84. package/runtime/hetzner/scripts/install-box.sh +0 -0
  85. package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
  86. package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
  87. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  88. package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
  89. package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
  90. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  91. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  92. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  93. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  94. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  95. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1lmiq._.js +1 -1
  96. package/runtime/hub/apps/hub/.next/server/chunks/_0760z6y._.js +1 -1
  97. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ro6vh6._.js +1 -1
  98. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_0b_hsjl._.js +1 -1
  99. package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
  100. package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
  101. package/runtime/hub/apps/hub/.next/static/chunks/1z4elhg8gyq98.js +1 -0
  102. package/runtime/hub/apps/hub/{auth-Q447765C.js → auth-HY5K55Y5.js} +2 -2
  103. package/runtime/hub/apps/hub/{auth-config-SIL635ZD.js → auth-config-MNW2XGKK.js} +2 -2
  104. package/runtime/hub/apps/hub/{chunk-OJAHNFNV.js → chunk-5KMJIVZC.js} +6 -3
  105. package/runtime/hub/apps/hub/{chunk-IRIK4DQF.js → chunk-DNR2YM2G.js} +2 -2
  106. package/runtime/hub/apps/hub/{chunk-3VE7AYVK.js → chunk-EY6HEDTK.js} +4 -4
  107. package/runtime/hub/apps/hub/{chunk-DZPQB2JZ.js → chunk-PROXBLRJ.js} +1 -1
  108. package/runtime/hub/apps/hub/{chunk-64WEKO34.js → chunk-TRUQCO4U.js} +8 -0
  109. package/runtime/hub/apps/hub/{dist-PWBKGUDG.js → dist-3DCKZYID.js} +4 -4
  110. package/runtime/hub/apps/hub/{dist-6AEQJL7W.js → dist-KV5ESR24.js} +4 -4
  111. package/runtime/hub/apps/hub/{dist-PRUR2E5L.js → dist-M73U3ZDH.js} +4 -4
  112. package/runtime/hub/apps/hub/{dist-GF5EBRNG.js → dist-NTKPAYA3.js} +1 -1
  113. package/runtime/hub/apps/hub/{dist-7GTRUGLC.js → dist-RSWTJWRN.js} +3 -3
  114. package/runtime/hub/apps/hub/{dist-HHHK5LRX.js → dist-SX2NXGI6.js} +177 -57
  115. package/runtime/hub/apps/hub/{dist-DLPVQMKD.js → dist-YCRESLWD.js} +4 -4
  116. package/runtime/hub/apps/hub/{hub-token-UITZEWVP.js → hub-token-QKQWV2I6.js} +2 -2
  117. package/runtime/hub/apps/hub/{prepared-state-BUO75YLZ-O4GZMDRF.js → prepared-state-BUO75YLZ-KR4YLKDC.js} +1 -1
  118. package/runtime/hub/apps/hub/server.js +15 -15
  119. package/runtime/relay/bin.cjs +8 -0
  120. package/runtime/vercel/agentbox-checkpoint-cleanup +0 -0
  121. package/runtime/vercel/agentbox-dockerd-start +0 -0
  122. package/runtime/vercel/agentbox-open +0 -0
  123. package/runtime/vercel/agentbox-vnc-start +0 -0
  124. package/runtime/vercel/ctl.cjs +8 -0
  125. package/runtime/vercel/gh-shim +0 -0
  126. package/runtime/vercel/git-shim +0 -0
  127. package/runtime/vercel/linear-shim +0 -0
  128. package/runtime/vercel/ntn-shim +0 -0
  129. package/runtime/vercel/scripts/provision.sh +0 -0
  130. package/LICENSE +0 -21
  131. package/dist/chunk-SS6ZEKLL.js.map +0 -1
  132. package/dist/chunk-UIRBYL4G.js.map +0 -1
  133. package/dist/chunk-WLHJZPFJ.js.map +0 -1
  134. package/dist/dist-FWB3MIQ5.js.map +0 -1
  135. package/runtime/hub/apps/hub/.next/static/chunks/380qcmusmigzz.js +0 -1
  136. /package/dist/{_cloud-attach-D5OC7DCC.js.map → _cloud-attach-ESCPOKG5.js.map} +0 -0
  137. /package/dist/{chunk-DEDTPG2D.js.map → chunk-3MDYQROX.js.map} +0 -0
  138. /package/dist/{chunk-3253DDXI.js.map → chunk-5JDOTQTM.js.map} +0 -0
  139. /package/dist/{chunk-5KHEH47T.js.map → chunk-7DPDUZ7L.js.map} +0 -0
  140. /package/dist/{chunk-24PXPJI3.js.map → chunk-CE3S7UDQ.js.map} +0 -0
  141. /package/dist/{chunk-5WF7PAH2.js.map → chunk-OSPM4Q5V.js.map} +0 -0
  142. /package/dist/{chunk-QMA3DB5L.js.map → chunk-QHISF6O6.js.map} +0 -0
  143. /package/dist/{chunk-LC4E2EIZ.js.map → chunk-RFRWS5CD.js.map} +0 -0
  144. /package/dist/{dist-UWUTNRCK.js.map → dist-2N3XHMBQ.js.map} +0 -0
  145. /package/dist/{dist-TK3STVUP.js.map → dist-FGXCG4JY.js.map} +0 -0
  146. /package/dist/{dist-2JWYYJZR.js.map → dist-HPPHBZTO.js.map} +0 -0
  147. /package/dist/{dist-3NFY6M53.js.map → dist-NOUPH5E6.js.map} +0 -0
  148. /package/dist/{dist-72EYR5DW.js.map → dist-TRKHS6I7.js.map} +0 -0
  149. /package/dist/{dist-T5MXBZGP.js.map → dist-VFPT5TDH.js.map} +0 -0
  150. /package/dist/{prepared-state-BUO75YLZ-RQRFFBJW.js.map → prepared-state-BUO75YLZ-46W2PAHH.js.map} +0 -0
  151. /package/runtime/hub/apps/hub/.next/static/{4CStLAgdl_oxCRh8votRw → 43_nml7FKErUxJXpspAhb}/_buildManifest.js +0 -0
  152. /package/runtime/hub/apps/hub/.next/static/{4CStLAgdl_oxCRh8votRw → 43_nml7FKErUxJXpspAhb}/_clientMiddlewareManifest.js +0 -0
  153. /package/runtime/hub/apps/hub/.next/static/{4CStLAgdl_oxCRh8votRw → 43_nml7FKErUxJXpspAhb}/_ssgManifest.js +0 -0
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  readE2bCredStatus,
6
6
  readPreparedState as readPreparedState3,
7
7
  secretsPath as secretsPath4
8
- } from "./chunk-LC4E2EIZ.js";
8
+ } from "./chunk-RFRWS5CD.js";
9
9
  import {
10
10
  detectEgressIp as detectEgressIp2,
11
11
  ensureDigitalOceanCredentials,
@@ -17,7 +17,7 @@ import {
17
17
  readPreparedState as readPreparedState4,
18
18
  secretsPath as secretsPath5,
19
19
  syncFirewallSource as syncFirewallSource2
20
- } from "./chunk-WLHJZPFJ.js";
20
+ } from "./chunk-LJMGHFLZ.js";
21
21
  import {
22
22
  ADVANCED_HINT_GROUPS,
23
23
  ALERT_BAND_ROWS,
@@ -61,7 +61,7 @@ import {
61
61
  subscribePrompts,
62
62
  uploadImageFileToBox,
63
63
  withFirewallRepair
64
- } from "./chunk-24PXPJI3.js";
64
+ } from "./chunk-CE3S7UDQ.js";
65
65
  import {
66
66
  daytonaBackend,
67
67
  ensureDaytonaCredentials,
@@ -69,7 +69,7 @@ import {
69
69
  readDaytonaCredStatus,
70
70
  readPreparedDaytonaState,
71
71
  secretsPath
72
- } from "./chunk-5KHEH47T.js";
72
+ } from "./chunk-7DPDUZ7L.js";
73
73
  import {
74
74
  deployControlPlaneToHetzner,
75
75
  detectEgressIp,
@@ -81,7 +81,7 @@ import {
81
81
  readPreparedState,
82
82
  secretsPath as secretsPath2,
83
83
  syncFirewallSource
84
- } from "./chunk-3253DDXI.js";
84
+ } from "./chunk-5JDOTQTM.js";
85
85
  import {
86
86
  createGitDeployment,
87
87
  createGitProject,
@@ -100,7 +100,7 @@ import {
100
100
  resolveVercelApiAuth,
101
101
  secretsPath as secretsPath3,
102
102
  upsertProjectEnv
103
- } from "./chunk-QMA3DB5L.js";
103
+ } from "./chunk-QHISF6O6.js";
104
104
  import {
105
105
  agentSpecsForCloud,
106
106
  baseFreshnessFromFingerprints,
@@ -113,7 +113,7 @@ import {
113
113
  probeCloudCheckpoint,
114
114
  resolveCloudCheckpoint,
115
115
  seedAgentVolumesIfFresh
116
- } from "./chunk-SS6ZEKLL.js";
116
+ } from "./chunk-4HPLS5HJ.js";
117
117
  import {
118
118
  ALL_CONNECTORS,
119
119
  BOX_STATUS_EVENT,
@@ -264,7 +264,7 @@ import {
264
264
  waitForTmuxPaneContent,
265
265
  warmUpClaudeCredentials,
266
266
  writeJob
267
- } from "./chunk-5WF7PAH2.js";
267
+ } from "./chunk-OSPM4Q5V.js";
268
268
  import {
269
269
  BUILT_IN_DEFAULTS,
270
270
  CLOUD_PROVIDER_NAMES,
@@ -290,7 +290,7 @@ import {
290
290
  resolveDefaultCheckpoint,
291
291
  setConfigValue,
292
292
  unsetConfigValue
293
- } from "./chunk-UIRBYL4G.js";
293
+ } from "./chunk-H6A4BQMG.js";
294
294
  import {
295
295
  AmbiguousBoxError,
296
296
  BoxNotFoundError,
@@ -368,7 +368,7 @@ import {
368
368
  toSyncKind,
369
369
  transportSettingsTarget,
370
370
  upsertClaudeSshConfig
371
- } from "./chunk-DEDTPG2D.js";
371
+ } from "./chunk-3MDYQROX.js";
372
372
  import "./chunk-G3H2L3O2.js";
373
373
  import {
374
374
  __export,
@@ -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.3" : "0.0.0-dev";
380
- var AGENTBOX_COMMIT = true ? "6c0233af9" : "dev";
379
+ var AGENTBOX_VERSION = true ? "0.24.5" : "0.0.0-dev";
380
+ var AGENTBOX_COMMIT = true ? "050a9c036" : "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;
@@ -1847,6 +1888,8 @@ function cloudSizingProviderOptions(providerName, cfg, flags = {}) {
1847
1888
  if (providerName === "digitalocean") {
1848
1889
  const location = (flags.location?.trim() || cfg.box.digitaloceanRegion || "").trim();
1849
1890
  if (location.length > 0) out.location = location;
1891
+ const project = (cfg.box.digitaloceanProject || "").trim();
1892
+ if (project.length > 0) out.project = project;
1850
1893
  }
1851
1894
  if (providerName === "hetzner" || providerName === "digitalocean") {
1852
1895
  const inbound = (flags.inbound?.trim() || cfg.box.inbound || "").trim();
@@ -4095,7 +4138,7 @@ async function renderDocker(status) {
4095
4138
  }
4096
4139
  async function daytonaStatus() {
4097
4140
  try {
4098
- const mod = await import("./dist-UWUTNRCK.js");
4141
+ const mod = await import("./dist-2N3XHMBQ.js");
4099
4142
  return await mod.getDaytonaStatus();
4100
4143
  } catch (err) {
4101
4144
  return {
@@ -4106,7 +4149,7 @@ async function daytonaStatus() {
4106
4149
  }
4107
4150
  async function e2bStatus() {
4108
4151
  try {
4109
- const mod = await import("./dist-TK3STVUP.js");
4152
+ const mod = await import("./dist-FGXCG4JY.js");
4110
4153
  const cred = mod.readE2bCredStatus();
4111
4154
  if (cred.auth === "none") {
4112
4155
  return { configured: false, reason: "not configured \u2014 run `agentbox e2b login`" };
@@ -9367,7 +9410,7 @@ var createCommand = new Command14("create").description(
9367
9410
  }
9368
9411
  outro7("done");
9369
9412
  if (attachClaudeAfter) {
9370
- const { cloudAgentAttach: cloudAgentAttach2 } = await import("./_cloud-attach-D5OC7DCC.js");
9413
+ const { cloudAgentAttach: cloudAgentAttach2 } = await import("./_cloud-attach-ESCPOKG5.js");
9371
9414
  await cloudAgentAttach2({
9372
9415
  box: result.record,
9373
9416
  binary: "claude",
@@ -11769,7 +11812,7 @@ function reportError5(err) {
11769
11812
  var loginSub5 = new Command21("login").description("Set up (or rotate) DigitalOcean credentials for Droplet boxes").option("--status", "show what is currently configured (masked) and exit").action(async (opts) => {
11770
11813
  try {
11771
11814
  if (opts.status) {
11772
- printStatus5();
11815
+ await printStatus5();
11773
11816
  return;
11774
11817
  }
11775
11818
  if (!process.stdin.isTTY) {
@@ -11789,7 +11832,7 @@ var loginSub5 = new Command21("login").description("Set up (or rotate) DigitalOc
11789
11832
  reportError5(err);
11790
11833
  }
11791
11834
  });
11792
- function printStatus5() {
11835
+ async function printStatus5() {
11793
11836
  const s = readDigitalOceanCredStatus();
11794
11837
  if (s.source === "none") {
11795
11838
  process.stdout.write(
@@ -11801,6 +11844,8 @@ function printStatus5() {
11801
11844
  if (s.source === "secrets.env") lines.push(` file: ${secretsPath5()}`);
11802
11845
  if (s.token) lines.push(` token: ${maskKey5(s.token)}`);
11803
11846
  if (s.endpoint) lines.push(` api: ${s.endpoint}`);
11847
+ const project = (await loadEffectiveConfig(process.cwd())).effective.box.digitaloceanProject;
11848
+ lines.push(` project: ${project || "(account default)"}`);
11804
11849
  process.stdout.write(lines.join("\n") + "\n");
11805
11850
  }
11806
11851
  var firewallSyncSub2 = new Command21("sync").description("Re-detect the host egress IP and update the box firewall (no reboot)").argument("<box>", "box name or id").option(
@@ -17320,7 +17365,7 @@ var unsetUrlSub = new Command48("unset-url").description("Stop using a control p
17320
17365
  });
17321
17366
  var statusSub4 = new Command48("status").description("Check whether the configured control plane is reachable").option("--url <url>", "override the control-plane URL (default: relay.controlPlaneUrl)").option("--json", "emit JSON").action(async (opts) => {
17322
17367
  try {
17323
- const { loadEffectiveConfig: loadEffectiveConfig2 } = await import("./dist-T5MXBZGP.js");
17368
+ const { loadEffectiveConfig: loadEffectiveConfig2 } = await import("./dist-HPPHBZTO.js");
17324
17369
  const cfg = await loadEffectiveConfig2(process.cwd());
17325
17370
  const url = (opts.url ?? cfg.effective.relay.controlPlaneUrl ?? "").replace(/\/$/, "");
17326
17371
  if (!url) {
@@ -17998,7 +18043,9 @@ async function maybeUpdateTray(say) {
17998
18043
  const decision = decideTrayUpdate({
17999
18044
  installed: true,
18000
18045
  stampedSha: state.traySha,
18001
- latestSha
18046
+ latestSha,
18047
+ installedVersion: await readInstalledTrayVersion(),
18048
+ latestVersion: state.remoteCheck?.trayLatestVersion
18002
18049
  });
18003
18050
  if (!decision.update) {
18004
18051
  say(
@@ -18105,30 +18152,6 @@ function detectExecutionMethod(input) {
18105
18152
  return "direct";
18106
18153
  }
18107
18154
 
18108
- // src/lib/semver-lite.ts
18109
- var TRIPLET = /^(\d+)\.(\d+)\.(\d+)$/;
18110
- function parseTriplet(v) {
18111
- const m = TRIPLET.exec(v.trim());
18112
- if (!m) return null;
18113
- return [Number(m[1]), Number(m[2]), Number(m[3])];
18114
- }
18115
- function compareSemver(a, b) {
18116
- const pa = parseTriplet(a);
18117
- const pb = parseTriplet(b);
18118
- if (!pa || !pb) return null;
18119
- for (let i = 0; i < 3; i++) {
18120
- const ai = pa[i];
18121
- const bi = pb[i];
18122
- if (ai < bi) return -1;
18123
- if (ai > bi) return 1;
18124
- }
18125
- return 0;
18126
- }
18127
- function isNewer(latest, current) {
18128
- if (latest === void 0) return false;
18129
- return compareSemver(latest, current) === 1;
18130
- }
18131
-
18132
18155
  // src/lib/update-check.ts
18133
18156
  var PKG = "@madarco/agentbox";
18134
18157
  var REGISTRY_URL = `https://registry.npmjs.org/${PKG}/latest`;
@@ -18199,6 +18222,12 @@ function maybeStartRemoteCheck() {
18199
18222
  };
18200
18223
  return run().catch(() => void 0);
18201
18224
  }
18225
+ function trayNudgeMessage(state, installedVersion) {
18226
+ const latest = state.remoteCheck?.trayLatestVersion;
18227
+ if (!latest || !installedVersion) return null;
18228
+ if (!isNewer(latest, installedVersion)) return null;
18229
+ return `a newer AgentBox app (${latest}, you have ${installedVersion}) is available \u2014 run \`agentbox install app\``;
18230
+ }
18202
18231
  function nudgeMessage(state, method, version = AGENTBOX_VERSION) {
18203
18232
  if (!nudgeEligible(method, version)) return null;
18204
18233
  const latest = state.remoteCheck?.npmLatest;
@@ -20067,6 +20096,27 @@ var FIRST_RUN_EXEMPT = /* @__PURE__ */ new Set([
20067
20096
  "drive",
20068
20097
  "screen"
20069
20098
  ]);
20099
+ var UPDATE_PROMPT_EXEMPT = /* @__PURE__ */ new Set([
20100
+ "create",
20101
+ "claude",
20102
+ "codex",
20103
+ "opencode",
20104
+ "shell",
20105
+ "sh",
20106
+ "attach",
20107
+ "exec",
20108
+ "run",
20109
+ "open",
20110
+ "fork",
20111
+ "url",
20112
+ "connect"
20113
+ ]);
20114
+ function isUpdatePromptEligible(args) {
20115
+ if (!isFirstRunHookEligible(args)) return false;
20116
+ const cmd = args[2];
20117
+ if (typeof cmd !== "string") return false;
20118
+ return !UPDATE_PROMPT_EXEMPT.has(cmd) && cmd !== "self-update";
20119
+ }
20070
20120
  function isFirstRunHookEligible(args) {
20071
20121
  if (!process.stdin.isTTY || !process.stdout.isTTY) return false;
20072
20122
  const rest = args.slice(2);
@@ -20094,7 +20144,7 @@ if (AGENTBOX_VERSION !== "0.0.0-dev") {
20094
20144
  const state = readUpdateState();
20095
20145
  if (state.lastRunVersion === void 0) {
20096
20146
  writeUpdateState({ lastRunVersion: AGENTBOX_VERSION });
20097
- } else if (state.lastRunVersion !== AGENTBOX_VERSION && isFirstRunHookEligible(argv) && argv[2] !== "self-update") {
20147
+ } else if (state.lastRunVersion !== AGENTBOX_VERSION && isUpdatePromptEligible(argv)) {
20098
20148
  versionPromptShown = true;
20099
20149
  try {
20100
20150
  const yes = await confirm({
@@ -20109,34 +20159,6 @@ if (AGENTBOX_VERSION !== "0.0.0-dev") {
20109
20159
  } catch (err) {
20110
20160
  process.stderr.write(
20111
20161
  `post-update refresh failed: ${err instanceof Error ? err.message : String(err)}
20112
- `
20113
- );
20114
- }
20115
- } else if (isFirstRunHookEligible(argv) && argv[2] !== "self-update" && shouldPromptTrayUpdate({
20116
- installed: trayInstalled(),
20117
- stampedSha: state.traySha,
20118
- latestSha: state.remoteCheck?.trayLatestSha,
20119
- declinedSha: state.trayDeclinedSha
20120
- })) {
20121
- const latestSha = state.remoteCheck?.trayLatestSha;
20122
- const latestVersion = state.remoteCheck?.trayLatestVersion;
20123
- versionPromptShown = true;
20124
- try {
20125
- const yes = await confirm({
20126
- 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?",
20127
- initialValue: true
20128
- });
20129
- if (yes) {
20130
- await maybeUpdateTray((msg) => {
20131
- process.stdout.write(`${msg}
20132
- `);
20133
- });
20134
- } else {
20135
- writeUpdateState({ trayDeclinedSha: latestSha });
20136
- }
20137
- } catch (err) {
20138
- process.stderr.write(
20139
- `menu-bar app update failed: ${err instanceof Error ? err.message : String(err)}
20140
20162
  `
20141
20163
  );
20142
20164
  }
@@ -20147,17 +20169,21 @@ if (isFirstRunHookEligible(argv)) {
20147
20169
  }
20148
20170
  program.parseAsync(argv).then(
20149
20171
  async () => {
20150
- if (versionPromptShown || !isFirstRunHookEligible(argv)) return;
20151
- const msg = nudgeMessage(
20152
- readUpdateState(),
20153
- detectExecutionMethod({
20154
- userAgent: process.env.npm_config_user_agent,
20155
- argv1: process.argv[1]
20156
- })
20157
- );
20158
- if (msg !== null && await updateCheckEnabled()) {
20172
+ if (versionPromptShown || !isUpdatePromptEligible(argv)) return;
20173
+ const state = readUpdateState();
20174
+ const lines = [
20175
+ nudgeMessage(
20176
+ state,
20177
+ detectExecutionMethod({
20178
+ userAgent: process.env.npm_config_user_agent,
20179
+ argv1: process.argv[1]
20180
+ })
20181
+ ),
20182
+ trayNudgeMessage(state, await readInstalledTrayVersion())
20183
+ ].filter((l) => l !== null);
20184
+ if (lines.length > 0 && await updateCheckEnabled()) {
20159
20185
  process.stderr.write(`
20160
- ${msg}
20186
+ ${lines.join("\n")}
20161
20187
  `);
20162
20188
  }
20163
20189
  },