@madarco/agentbox 0.26.1 → 0.27.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 (151) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +1 -1
  3. package/dist/{_cloud-attach-7WRQH6XZ.js → _cloud-attach-WDGM6FL5.js} +4 -4
  4. package/dist/{chunk-UIFL7F2G.js → chunk-26IKZRTT.js} +2 -2
  5. package/dist/{chunk-DJQMK4RN.js → chunk-HR7NHH5J.js} +14 -9
  6. package/dist/chunk-HR7NHH5J.js.map +1 -0
  7. package/dist/{chunk-K5KOLYIL.js → chunk-IDH5A4RR.js} +2 -2
  8. package/dist/{chunk-ZY7M7MXH.js → chunk-JE6UI5YR.js} +10 -10
  9. package/dist/{chunk-7ZZAZPYX.js → chunk-KWOEUFVA.js} +2 -2
  10. package/dist/{chunk-BA2VLJVU.js → chunk-LL7NCMUU.js} +3 -3
  11. package/dist/{chunk-I2OAJS3L.js → chunk-NEF6MDJO.js} +4 -4
  12. package/dist/{chunk-I2OAJS3L.js.map → chunk-NEF6MDJO.js.map} +1 -1
  13. package/dist/{dist-YA7EXBGG.js → chunk-SJ75AIA2.js} +486 -92
  14. package/dist/chunk-SJ75AIA2.js.map +1 -0
  15. package/dist/{chunk-PK2QF4IR.js → chunk-UJEH2NJT.js} +27 -14
  16. package/dist/chunk-UJEH2NJT.js.map +1 -0
  17. package/dist/{chunk-DQHMDDAT.js → chunk-V5XXJH63.js} +2 -2
  18. package/dist/{dist-DTNYMBQ5.js → dist-FTKS2GI4.js} +5 -5
  19. package/dist/{dist-5IICYSR6.js → dist-KQTMCVME.js} +5 -5
  20. package/dist/{dist-5IICYSR6.js.map → dist-KQTMCVME.js.map} +1 -1
  21. package/dist/{dist-AR5CHRSV.js → dist-O3LKOIE7.js} +5 -5
  22. package/dist/{dist-POVRY7HO.js → dist-OO52HARR.js} +3 -3
  23. package/dist/{dist-K4LNH3EC.js → dist-TSFVB7AI.js} +5 -5
  24. package/dist/{dist-XYY6SIKG.js → dist-WVYAURMF.js} +5 -5
  25. package/dist/dist-Z6L5MM5D.js +46 -0
  26. package/dist/index.js +392 -211
  27. package/dist/index.js.map +1 -1
  28. package/dist/{prepared-state-75DIZ55S-W6NU3S3B.js → prepared-state-75DIZ55S-TNJXWMXV.js} +2 -2
  29. package/dist/prepared-state-75DIZ55S-TNJXWMXV.js.map +1 -0
  30. package/package.json +7 -7
  31. package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
  32. package/runtime/hub/apps/hub/.next/app-path-routes-manifest.json +3 -0
  33. package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
  34. package/runtime/hub/apps/hub/.next/routes-manifest.json +22 -0
  35. package/runtime/hub/apps/hub/.next/server/app/(auth)/signin/page_client-reference-manifest.js +1 -1
  36. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/docs/route.js +2 -1
  37. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/docs/route.js.nft.json +1 -1
  38. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route/app-paths-manifest.json +3 -0
  39. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route/build-manifest.json +9 -0
  40. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route/server-reference-manifest.json +4 -0
  41. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route.js +8 -0
  42. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route.js.map +5 -0
  43. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route.js.nft.json +1 -0
  44. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/bake/route_client-reference-manifest.js +3 -0
  45. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route/app-paths-manifest.json +3 -0
  46. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route/build-manifest.json +9 -0
  47. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route/server-reference-manifest.json +4 -0
  48. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route.js +8 -0
  49. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route.js.map +5 -0
  50. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route.js.nft.json +1 -0
  51. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/[alias]/route_client-reference-manifest.js +3 -0
  52. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route/app-paths-manifest.json +3 -0
  53. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route/build-manifest.json +9 -0
  54. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route/server-reference-manifest.json +4 -0
  55. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route.js +9 -0
  56. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route.js.map +5 -0
  57. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route.js.nft.json +1 -0
  58. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/hosts/route_client-reference-manifest.js +3 -0
  59. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/openapi.json/route.js +2 -1
  60. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/openapi.json/route.js.nft.json +1 -1
  61. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
  62. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page.js.nft.json +1 -1
  63. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page_client-reference-manifest.js +1 -1
  64. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  65. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  66. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page.js.nft.json +1 -1
  67. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page_client-reference-manifest.js +1 -1
  68. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
  69. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  70. package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
  71. package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
  72. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  73. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  74. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  75. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  76. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  77. package/runtime/hub/apps/hub/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  78. package/runtime/hub/apps/hub/.next/server/app-paths-manifest.json +3 -0
  79. package/runtime/hub/apps/hub/.next/server/chunks/044u_hub__next-internal_server_app_(dashboard)_api_v1_hosts_route_actions_0b_404_.js +3 -0
  80. package/runtime/hub/apps/hub/.next/server/chunks/0web_next-internal_server_app_(dashboard)_api_v1_hosts_[alias]_route_actions_0swypy5.js +3 -0
  81. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_hosts_[alias]_bake_route_actions_1-_pu3n.js +3 -0
  82. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0a7djvw._.js +3 -0
  83. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0bmro0b._.js +3 -0
  84. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0keu6we._.js +1 -1
  85. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0t4qmv-._.js +3 -0
  86. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0xh14bo._.js +3 -0
  87. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__13ioh5z._.js +3 -0
  88. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1h4xycg._.js +3 -0
  89. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1hqla7-._.js +1 -1
  90. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1md9kdw._.js +3 -0
  91. package/runtime/hub/apps/hub/.next/server/chunks/_1bng7w9._.js +3 -0
  92. package/runtime/hub/apps/hub/.next/server/chunks/apps_hub_app_(dashboard)_api_v1_lib_openapi_ts_1yokmzt._.js +14 -0
  93. package/runtime/hub/apps/hub/.next/server/chunks/ssr/09xn_next_dist_1uccfbf._.js +1 -1
  94. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_03s-ah2._.js +3 -0
  95. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0r4px38._.js +3 -0
  96. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_18w2zeh._.js +3 -0
  97. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_0od97-d._.js +3 -0
  98. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_boxes_components_box-table_tsx_0a9pyn_._.js +1 -1
  99. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_app_(dashboard)_settings_page_tsx_0hv6n82._.js +3 -0
  100. package/runtime/hub/apps/hub/.next/server/functions-config-manifest.json +3 -0
  101. package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
  102. package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
  103. package/runtime/hub/apps/hub/.next/static/chunks/0xdtiy_m2ygv8.js +1 -0
  104. package/runtime/hub/apps/hub/.next/static/chunks/1_ur0im1g7_s9.js +1 -0
  105. package/runtime/hub/apps/hub/.next/static/chunks/26rwu1f2gzemi.js +1 -0
  106. package/runtime/hub/apps/hub/.next/static/chunks/3v6kx35_lwjs8.js +1 -0
  107. package/runtime/hub/apps/hub/.next/static/chunks/{3dfjrxx-dy644.css → 42uysd_max-yq.css} +1 -1
  108. package/runtime/hub/apps/hub/.next/static/chunks/44j61g8lm9nvw.js +1 -0
  109. package/runtime/hub/apps/hub/{chunk-BARD2DI6.js → chunk-EHBJKZCL.js} +13 -8
  110. package/runtime/hub/apps/hub/{chunk-4QY2VZCF.js → chunk-RXYOWSSN.js} +19 -13
  111. package/runtime/hub/apps/hub/{chunk-XZZXPEVV.js → chunk-YJ5MJOXK.js} +1 -1
  112. package/runtime/hub/apps/hub/{dist-3ENKQN5G.js → dist-3I7KUI6W.js} +3 -3
  113. package/runtime/hub/apps/hub/{dist-WAZKGVYL.js → dist-6FPPUSWZ.js} +2 -2
  114. package/runtime/hub/apps/hub/{dist-NNBELNA7.js → dist-DX6IYMAH.js} +300 -109
  115. package/runtime/hub/apps/hub/{dist-RJJ2SDYO.js → dist-G6TXUSPZ.js} +3 -3
  116. package/runtime/hub/apps/hub/{dist-AE6IV4FV.js → dist-GTVVXCBP.js} +3 -3
  117. package/runtime/hub/apps/hub/{dist-6VGJOQYK.js → dist-JG45OFT2.js} +3 -3
  118. package/runtime/hub/apps/hub/{dist-TU7D6UTB.js → dist-LYDHYTP2.js} +3 -3
  119. package/runtime/hub/apps/hub/{prepared-state-75DIZ55S-NYEDSU2U.js → prepared-state-75DIZ55S-2IFNUHHM.js} +1 -1
  120. package/runtime/hub/apps/hub/server.js +136 -19
  121. package/dist/chunk-DJQMK4RN.js.map +0 -1
  122. package/dist/chunk-PK2QF4IR.js.map +0 -1
  123. package/dist/chunk-ZYKNSHOH.js +0 -259
  124. package/dist/chunk-ZYKNSHOH.js.map +0 -1
  125. package/dist/dist-YA7EXBGG.js.map +0 -1
  126. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1bqbkd5._.js +0 -14
  127. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__1qa4a0v._.js +0 -14
  128. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_09gdzmo._.js +0 -3
  129. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0tgpglr._.js +0 -3
  130. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_1laion6._.js +0 -3
  131. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_0b_hsjl._.js +0 -3
  132. package/runtime/hub/apps/hub/.next/static/chunks/1c5w3kqosumog.js +0 -1
  133. package/runtime/hub/apps/hub/.next/static/chunks/1o3ot_9-8jgzc.js +0 -1
  134. package/runtime/hub/apps/hub/.next/static/chunks/1z4elhg8gyq98.js +0 -1
  135. package/runtime/hub/apps/hub/.next/static/chunks/3uq9hf-roasav.js +0 -1
  136. /package/dist/{_cloud-attach-7WRQH6XZ.js.map → _cloud-attach-WDGM6FL5.js.map} +0 -0
  137. /package/dist/{chunk-UIFL7F2G.js.map → chunk-26IKZRTT.js.map} +0 -0
  138. /package/dist/{chunk-K5KOLYIL.js.map → chunk-IDH5A4RR.js.map} +0 -0
  139. /package/dist/{chunk-ZY7M7MXH.js.map → chunk-JE6UI5YR.js.map} +0 -0
  140. /package/dist/{chunk-7ZZAZPYX.js.map → chunk-KWOEUFVA.js.map} +0 -0
  141. /package/dist/{chunk-BA2VLJVU.js.map → chunk-LL7NCMUU.js.map} +0 -0
  142. /package/dist/{chunk-DQHMDDAT.js.map → chunk-V5XXJH63.js.map} +0 -0
  143. /package/dist/{dist-DTNYMBQ5.js.map → dist-FTKS2GI4.js.map} +0 -0
  144. /package/dist/{dist-AR5CHRSV.js.map → dist-O3LKOIE7.js.map} +0 -0
  145. /package/dist/{dist-POVRY7HO.js.map → dist-OO52HARR.js.map} +0 -0
  146. /package/dist/{dist-K4LNH3EC.js.map → dist-TSFVB7AI.js.map} +0 -0
  147. /package/dist/{dist-XYY6SIKG.js.map → dist-WVYAURMF.js.map} +0 -0
  148. /package/dist/{prepared-state-75DIZ55S-W6NU3S3B.js.map → dist-Z6L5MM5D.js.map} +0 -0
  149. /package/runtime/hub/apps/hub/.next/static/{mJYh9UHTsLaGGyRjBSvme → S-yw9-SVffiEHRGm85NzP}/_buildManifest.js +0 -0
  150. /package/runtime/hub/apps/hub/.next/static/{mJYh9UHTsLaGGyRjBSvme → S-yw9-SVffiEHRGm85NzP}/_clientMiddlewareManifest.js +0 -0
  151. /package/runtime/hub/apps/hub/.next/static/{mJYh9UHTsLaGGyRjBSvme → S-yw9-SVffiEHRGm85NzP}/_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-DQHMDDAT.js";
8
+ } from "./chunk-V5XXJH63.js";
9
9
  import {
10
10
  detectEgressIp as detectEgressIp2,
11
11
  ensureDigitalOceanCredentials,
@@ -17,11 +17,19 @@ import {
17
17
  readPreparedState as readPreparedState4,
18
18
  secretsPath as secretsPath5,
19
19
  syncFirewallSource as syncFirewallSource2
20
- } from "./chunk-7ZZAZPYX.js";
20
+ } from "./chunk-KWOEUFVA.js";
21
21
  import {
22
+ assertValidAlias,
23
+ getHostAlias,
24
+ interactiveRegisterHost,
25
+ listHostAliases,
26
+ prepareRemoteDocker,
22
27
  probeRemoteEngine,
23
- readPreparedState as readPreparedState5
24
- } from "./chunk-ZYKNSHOH.js";
28
+ readPreparedState as readPreparedState5,
29
+ removeHostAlias,
30
+ removePreparedHost,
31
+ upsertHostAlias
32
+ } from "./chunk-SJ75AIA2.js";
25
33
  import {
26
34
  ADVANCED_HINT_GROUPS,
27
35
  ALERT_BAND_ROWS,
@@ -66,7 +74,7 @@ import {
66
74
  subscribePrompts,
67
75
  uploadImageFileToBox,
68
76
  withFirewallRepair
69
- } from "./chunk-ZY7M7MXH.js";
77
+ } from "./chunk-JE6UI5YR.js";
70
78
  import {
71
79
  daytonaBackend,
72
80
  ensureDaytonaCredentials,
@@ -74,7 +82,7 @@ import {
74
82
  readDaytonaCredStatus,
75
83
  readPreparedDaytonaState,
76
84
  secretsPath
77
- } from "./chunk-K5KOLYIL.js";
85
+ } from "./chunk-IDH5A4RR.js";
78
86
  import {
79
87
  deployControlPlaneToHetzner,
80
88
  detectEgressIp,
@@ -86,7 +94,7 @@ import {
86
94
  readPreparedState,
87
95
  secretsPath as secretsPath2,
88
96
  syncFirewallSource
89
- } from "./chunk-I2OAJS3L.js";
97
+ } from "./chunk-NEF6MDJO.js";
90
98
  import {
91
99
  createGitDeployment,
92
100
  createGitProject,
@@ -105,7 +113,7 @@ import {
105
113
  resolveVercelApiAuth,
106
114
  secretsPath as secretsPath3,
107
115
  upsertProjectEnv
108
- } from "./chunk-BA2VLJVU.js";
116
+ } from "./chunk-LL7NCMUU.js";
109
117
  import {
110
118
  agentSpecsForCloud,
111
119
  baseFreshnessFromFingerprints,
@@ -118,7 +126,7 @@ import {
118
126
  probeCloudCheckpoint,
119
127
  resolveCloudCheckpoint,
120
128
  seedAgentVolumesIfFresh
121
- } from "./chunk-DJQMK4RN.js";
129
+ } from "./chunk-HR7NHH5J.js";
122
130
  import {
123
131
  ALL_CONNECTORS,
124
132
  BOX_STATUS_EVENT,
@@ -268,7 +276,7 @@ import {
268
276
  waitForTmuxPaneContent,
269
277
  warmUpClaudeCredentials,
270
278
  writeJob
271
- } from "./chunk-UIFL7F2G.js";
279
+ } from "./chunk-26IKZRTT.js";
272
280
  import {
273
281
  BUILT_IN_DEFAULTS,
274
282
  CLOUD_PROVIDER_NAMES,
@@ -370,12 +378,13 @@ import {
370
378
  scratchBranchName,
371
379
  setBoxDisplayName,
372
380
  stageItemsViaTransport,
381
+ statusBadge,
373
382
  syncAgentboxSshConfig,
374
383
  toQueueKind,
375
384
  toSyncKind,
376
385
  transportSettingsTarget,
377
386
  upsertClaudeSshConfig
378
- } from "./chunk-PK2QF4IR.js";
387
+ } from "./chunk-UJEH2NJT.js";
379
388
  import "./chunk-G3H2L3O2.js";
380
389
  import {
381
390
  __export,
@@ -383,8 +392,8 @@ import {
383
392
  } from "./chunk-WJFZJZIM.js";
384
393
 
385
394
  // src/version.ts
386
- var AGENTBOX_VERSION = true ? "0.26.1" : "0.0.0-dev";
387
- var AGENTBOX_COMMIT = true ? "7b5111bf" : "dev";
395
+ var AGENTBOX_VERSION = true ? "0.27.0" : "0.0.0-dev";
396
+ var AGENTBOX_COMMIT = true ? "cdb6d193" : "dev";
388
397
 
389
398
  // src/index.ts
390
399
  import { existsSync as _existsSync } from "fs";
@@ -586,11 +595,11 @@ var COMPACT_EXAMPLE = [
586
595
  "Example:",
587
596
  " agentbox claude # launch Claude, one box per task/branch",
588
597
  " agentbox hetzner|e2b|\u2026 codex # launch with other agents or providers",
589
- " ! agentbox fork hetzner|e2b|\u2026 # teleport the current session from the chat",
598
+ " > ! agentbox fork hetzner|e2b|\u2026 # teleport the current session from the chat",
590
599
  "",
591
600
  " agentbox attach 1 # detach with Ctrl+a d, then re-attach",
592
601
  "",
593
- " # Then ask your agent to push/pr or do it from your pc:",
602
+ " # Ask your agent to push/pr from the box, or do it from your pc:",
594
603
  " agentbox git push 1 # push to remote",
595
604
  " agentbox git push 1 --host-only # move back the branch to your pc",
596
605
  " agentbox git pr create 1 -f # create a PR from the box",
@@ -604,7 +613,7 @@ var COMPACT_MORE = [
604
613
  " dashboard, pause|stop|checkpoint, claude|codex|opencode,",
605
614
  " connect|download|services|inbound, drive|queue, config, \u2026"
606
615
  ];
607
- var COMPACT_FOOTER = ["Run `agentbox <command> --help` for command options."];
616
+ var COMPACT_FOOTER = ["Run `agentbox help` for the full list of commands."];
608
617
  function buildCompactHelp(program2) {
609
618
  const byName = new Map(program2.commands.map((c) => [c.name(), c]));
610
619
  const rowTerm = (row2) => {
@@ -617,7 +626,7 @@ function buildCompactHelp(program2) {
617
626
  };
618
627
  const allTerms = COMPACT_HELP.flatMap((g) => g.rows.map(rowTerm));
619
628
  const pad5 = Math.max(0, ...allTerms.map((t) => t.length)) + 3;
620
- const lines = ["Commands:"];
629
+ const lines = [...COMPACT_EXAMPLE, "", "Commands:"];
621
630
  for (const g of COMPACT_HELP) {
622
631
  lines.push("", ` ${g.title}`);
623
632
  for (const row2 of g.rows) {
@@ -626,7 +635,7 @@ function buildCompactHelp(program2) {
626
635
  lines.push(` ${rowTerm(row2).padEnd(pad5)}${description}`);
627
636
  }
628
637
  }
629
- lines.push("", ...COMPACT_MORE, "", ...COMPACT_EXAMPLE, "", ...COMPACT_FOOTER);
638
+ lines.push("", ...COMPACT_MORE, "", ...COMPACT_FOOTER);
630
639
  return lines.join("\n");
631
640
  }
632
641
 
@@ -4062,7 +4071,7 @@ async function evaluateCheckpoint(provider, projectRoot, ref) {
4062
4071
  }
4063
4072
  async function evaluateBaseFreshness(provider, claudeInstall) {
4064
4073
  if (provider === "docker") {
4065
- const { evaluateDockerBaseFreshness: evaluateDockerBaseFreshness2 } = await import("./dist-POVRY7HO.js");
4074
+ const { evaluateDockerBaseFreshness: evaluateDockerBaseFreshness2 } = await import("./dist-OO52HARR.js");
4066
4075
  return await evaluateDockerBaseFreshness2({ claudeInstall });
4067
4076
  }
4068
4077
  const stored = currentCloudBaseFingerprint(provider);
@@ -4323,7 +4332,7 @@ async function renderDocker(status) {
4323
4332
  }
4324
4333
  async function daytonaStatus() {
4325
4334
  try {
4326
- const mod = await import("./dist-AR5CHRSV.js");
4335
+ const mod = await import("./dist-O3LKOIE7.js");
4327
4336
  return await mod.getDaytonaStatus();
4328
4337
  } catch (err) {
4329
4338
  return {
@@ -4334,7 +4343,7 @@ async function daytonaStatus() {
4334
4343
  }
4335
4344
  async function e2bStatus() {
4336
4345
  try {
4337
- const mod = await import("./dist-K4LNH3EC.js");
4346
+ const mod = await import("./dist-TSFVB7AI.js");
4338
4347
  const cred = mod.readE2bCredStatus();
4339
4348
  if (cred.auth === "none") {
4340
4349
  return { configured: false, reason: "not configured \u2014 run `agentbox e2b login`" };
@@ -9413,24 +9422,22 @@ var createCommand = new Command14("create").description(
9413
9422
  }
9414
9423
  const checkpointRef = resolveCheckpointRef(
9415
9424
  opts,
9416
- resolveDefaultCheckpoint(
9417
- cfg.effective,
9418
- providerName
9419
- )
9425
+ resolveDefaultCheckpoint(cfg.effective, providerName)
9420
9426
  );
9421
9427
  if (opts.location && providerName !== "hetzner" && providerName !== "digitalocean") {
9422
- log22.warn(`--location applies to hetzner/digitalocean only; ignored for provider ${providerName}`);
9428
+ log22.warn(
9429
+ `--location applies to hetzner/digitalocean only; ignored for provider ${providerName}`
9430
+ );
9423
9431
  }
9424
9432
  if (opts.inbound && providerName !== "hetzner" && providerName !== "digitalocean") {
9425
- log22.warn(`--inbound applies to hetzner/digitalocean only; ignored for provider ${providerName}`);
9433
+ log22.warn(
9434
+ `--inbound applies to hetzner/digitalocean only; ignored for provider ${providerName}`
9435
+ );
9426
9436
  }
9427
9437
  if (opts.remoteHost && providerName !== "remote-docker") {
9428
9438
  log22.warn(`--remote-host applies to remote-docker only; ignored for provider ${providerName}`);
9429
9439
  }
9430
- const imageDefault = resolveBoxImage(
9431
- cfg.effective,
9432
- providerName
9433
- );
9440
+ const imageDefault = resolveBoxImage(cfg.effective, providerName);
9434
9441
  const effectiveImage = opts.image && opts.image.length > 0 ? opts.image : imageDefault;
9435
9442
  const isDocker = providerName === "docker";
9436
9443
  const isHetzner = providerName === "hetzner";
@@ -9476,10 +9483,7 @@ var createCommand = new Command14("create").description(
9476
9483
  onLog: (line) => cmdLog.write(line),
9477
9484
  onClose: () => cmdLog.close()
9478
9485
  });
9479
- const baseStatus = await evaluateBaseFreshness(
9480
- providerName,
9481
- cfg.effective.box.claudeInstall
9482
- );
9486
+ const baseStatus = await evaluateBaseFreshness(providerName, cfg.effective.box.claudeInstall);
9483
9487
  const wiz = await maybeRunSetupWizard({
9484
9488
  workspace: opts.workspace,
9485
9489
  yes: !!opts.yes,
@@ -9618,7 +9622,7 @@ var createCommand = new Command14("create").description(
9618
9622
  ` docker exec ${result.record.container} ls /workspace`
9619
9623
  ] : [
9620
9624
  ` agentbox shell ${result.record.name}`,
9621
- ` agentbox claude attach ${result.record.name}`,
9625
+ ` agentbox attach ${result.record.name}`,
9622
9626
  ` agentbox url ${result.record.name}`
9623
9627
  ];
9624
9628
  log22.message(
@@ -9650,7 +9654,7 @@ var createCommand = new Command14("create").description(
9650
9654
  }
9651
9655
  outro7("done");
9652
9656
  if (attachClaudeAfter) {
9653
- const { cloudAgentAttach: cloudAgentAttach2 } = await import("./_cloud-attach-7WRQH6XZ.js");
9657
+ const { cloudAgentAttach: cloudAgentAttach2 } = await import("./_cloud-attach-WDGM6FL5.js");
9654
9658
  await cloudAgentAttach2({
9655
9659
  box: result.record,
9656
9660
  binary: "claude",
@@ -12229,64 +12233,239 @@ var digitaloceanCommand = new Command21("digitalocean").description(
12229
12233
  ).addCommand(loginSub5, { isDefault: true }).addCommand(firewallSub2);
12230
12234
 
12231
12235
  // ../../packages/sandbox-remote-docker/dist/cli.js
12236
+ import { readFileSync as readFileSync6 } from "fs";
12237
+ import { homedir as homedir16 } from "os";
12238
+ import { join as join21 } from "path";
12232
12239
  import { Command as Command22 } from "commander";
12233
12240
  import * as p from "@clack/prompts";
12234
12241
  var remoteDockerCommand = new Command22("remote-docker").description("Remote Docker provider \u2014 run boxes on your own machine over SSH").addCommand(
12235
- new Command22("check").description("Verify an SSH destination can host boxes (ssh reachable + docker present)").argument("[host]", "SSH destination (default: box.remoteDockerHost)").action(async (host) => {
12236
- const target = (host ?? await configuredHost()).trim();
12237
- if (!target) {
12242
+ new Command22("add").description("Register a host alias (name \u2192 SSH connection) for `--provider docker:<alias>`").argument("<alias>", "a short name for the host (letters, digits, `.`, `_`, `-`)").argument("<ssh>", "the SSH connection: `~/.ssh/config` alias or `[user@]host[:port]`").option("-d, --default", "also set it as the default host (box.remoteDockerHost) for this project").option("-g, --global", "set it as the default host, written to global config (implies --default)").option("-n, --no-bake", "skip baking the box image on the host (it builds lazily on first create)").action(
12243
+ async (alias, ssh, opts) => {
12244
+ try {
12245
+ assertValidAlias(alias);
12246
+ } catch (err) {
12247
+ p.log.error(err instanceof Error ? err.message : String(err));
12248
+ process.exitCode = 1;
12249
+ return;
12250
+ }
12251
+ if (getHostAlias(alias)) {
12252
+ p.log.error(
12253
+ `host alias '${alias}' already exists \u2014 change its connection with \`agentbox remote-docker update ${alias} <ssh>\``
12254
+ );
12255
+ process.exitCode = 1;
12256
+ return;
12257
+ }
12258
+ const s = p.spinner();
12259
+ s.start(`probing ${ssh}`);
12260
+ const res = await probeRemoteEngine(ssh);
12261
+ if (!res.ok) {
12262
+ s.stop(`${ssh}: unusable`);
12263
+ p.log.error(res.error ?? "remote engine unusable");
12264
+ process.exitCode = 1;
12265
+ return;
12266
+ }
12267
+ s.stop(`${ssh}: docker ${res.version} (${res.os}/${res.arch})`);
12268
+ upsertHostAlias(alias, ssh);
12269
+ p.log.success(`registered '${alias}' \u2192 ${ssh}`);
12270
+ if (opts.default || opts.global) {
12271
+ const scope = opts.global ? "global" : "project";
12272
+ await setConfigValue(scope, "box.remoteDockerHost", alias, process.cwd(), {
12273
+ raw: true
12274
+ });
12275
+ p.log.success(`'${alias}' is now the default remote-docker host (${scope})`);
12276
+ } else {
12277
+ p.log.info(
12278
+ `use it with \`agentbox docker:${alias} claude\` (add \`--default\` to skip the prefix)`
12279
+ );
12280
+ }
12281
+ if (opts.bake !== false) {
12282
+ const cfg = await loadEffectiveConfig(process.cwd());
12283
+ const claudeInstall = cfg.effective.box.claudeInstall;
12284
+ const bs = p.spinner();
12285
+ bs.start(`baking the box image on ${alias} (first time can take a few minutes)`);
12286
+ try {
12287
+ await prepareRemoteDocker({
12288
+ host: alias,
12289
+ ...claudeInstall ? { claudeInstall } : {},
12290
+ onLog: (line) => bs.message(line.slice(0, 80))
12291
+ });
12292
+ bs.stop(`box image ready on ${alias}`);
12293
+ } catch (err) {
12294
+ bs.stop("box image bake failed");
12295
+ p.log.warn(
12296
+ `${err instanceof Error ? err.message : String(err)} \u2014 it will build on first create, or run \`agentbox prepare --provider docker:${alias}\``
12297
+ );
12298
+ }
12299
+ }
12300
+ const hostCount = listHostAliases().length;
12301
+ if (hostCount > 1) {
12302
+ p.log.info(
12303
+ `you have ${String(hostCount)} remote hosts \u2014 run \`agentbox docker:${alias} claude\` to use this one`
12304
+ );
12305
+ }
12306
+ }
12307
+ )
12308
+ ).addCommand(
12309
+ new Command22("update").description("Change the SSH connection string for an existing host alias").argument("<alias>", "the alias to retarget").argument("<ssh>", "the new SSH connection: `~/.ssh/config` alias or `[user@]host[:port]`").action(async (alias, ssh) => {
12310
+ if (!getHostAlias(alias)) {
12238
12311
  p.log.error(
12239
- "no SSH destination \u2014 pass one (`agentbox remote-docker check user@host`) or set `box.remoteDockerHost`"
12312
+ `no such host alias '${alias}' \u2014 register it with \`agentbox remote-docker add ${alias} ${ssh}\``
12240
12313
  );
12241
12314
  process.exitCode = 1;
12242
12315
  return;
12243
12316
  }
12244
12317
  const s = p.spinner();
12245
- s.start(`probing ${target}`);
12246
- const res = await probeRemoteEngine(target);
12318
+ s.start(`probing ${ssh}`);
12319
+ const res = await probeRemoteEngine(ssh);
12247
12320
  if (!res.ok) {
12248
- s.stop(`${target}: unusable`);
12249
- p.log.error(res.error);
12321
+ s.stop(`${ssh}: unusable`);
12322
+ p.log.error(res.error ?? "remote engine unusable");
12250
12323
  process.exitCode = 1;
12251
12324
  return;
12252
12325
  }
12253
- s.stop(`${target}: docker ${res.version} (${res.os}/${res.arch})`);
12254
- const baked = readPreparedState5()?.hosts[target];
12255
- p.log.info(
12256
- baked ? `box image baked: ${baked.imageRef}` : `box image not baked yet \u2014 the first create will do it, or run \`agentbox prepare --provider docker:${target}\``
12326
+ s.stop(`${ssh}: docker ${res.version} (${res.os}/${res.arch})`);
12327
+ upsertHostAlias(alias, ssh);
12328
+ p.log.success(`updated '${alias}' \u2192 ${ssh} (existing boxes now use this connection)`);
12329
+ })
12330
+ ).addCommand(
12331
+ new Command22("remove").alias("rm").description("Forget a host alias: drop it, clear the default, and its baked image record").argument("<alias>", "the alias to forget").option("-y, --yes", "skip the confirmation prompt").action(async (alias, opts) => {
12332
+ const cfg = await loadEffectiveConfig(process.cwd());
12333
+ const registeredEntry = getHostAlias(alias);
12334
+ const configuredScopes = ["project", "global"].filter(
12335
+ (scope) => cfg.layers[scope].values.box?.remoteDockerHost === alias
12257
12336
  );
12337
+ const inWorkspace = cfg.layers.workspace.values.box?.remoteDockerHost === alias;
12338
+ const isBaked = !!readPreparedState5()?.hosts[alias];
12339
+ if (!registeredEntry && configuredScopes.length === 0 && !inWorkspace && !isBaked) {
12340
+ p.log.info(`'${alias}' is not a registered, configured, or baked remote-docker host`);
12341
+ return;
12342
+ }
12343
+ const boxes = boxesUsingAlias(alias);
12344
+ if (!opts.yes) {
12345
+ if (!process.stdin.isTTY) {
12346
+ p.log.error(
12347
+ `refusing to remove '${alias}' without confirmation \u2014 re-run with \`--yes\` in a non-interactive shell`
12348
+ );
12349
+ process.exitCode = 1;
12350
+ return;
12351
+ }
12352
+ const detail = boxes.length ? ` ${String(boxes.length)} box(es) created against it become unreachable.` : "";
12353
+ const ok = await p.confirm({
12354
+ message: `Forget remote-docker host '${alias}'${registeredEntry ? ` (${registeredEntry.ssh})` : ""}?${detail} The remote machine is untouched.`,
12355
+ initialValue: false
12356
+ });
12357
+ if (p.isCancel(ok) || !ok) {
12358
+ p.cancel("aborted");
12359
+ return;
12360
+ }
12361
+ }
12362
+ const droppedAlias = removeHostAlias(alias);
12363
+ for (const scope of configuredScopes) {
12364
+ await unsetConfigValue(scope, "box.remoteDockerHost", process.cwd());
12365
+ }
12366
+ const forgotBake = removePreparedHost(alias);
12367
+ const cleared = [];
12368
+ if (droppedAlias) cleared.push("alias");
12369
+ if (configuredScopes.length > 0) cleared.push(`${configuredScopes.join(" + ")} default`);
12370
+ if (forgotBake) cleared.push("baked image record");
12371
+ p.log.success(`removed ${alias}${cleared.length ? ` (${cleared.join(", ")})` : ""}`);
12372
+ if (boxes.length > 0) {
12373
+ p.log.warn(
12374
+ `${String(boxes.length)} box(es) were created against '${alias}' and are now unreachable \u2014 re-add it with \`agentbox remote-docker add ${alias} <ssh>\`: ${boxes.join(", ")}`
12375
+ );
12376
+ }
12377
+ if (inWorkspace) {
12378
+ p.log.warn(
12379
+ `'${alias}' is also set as box.remoteDockerHost in this project's agentbox.yaml \u2014 remove it there too`
12380
+ );
12381
+ }
12258
12382
  })
12259
12383
  ).addCommand(
12260
- new Command22("use").description("Set the default SSH destination for `--provider remote-docker`").argument("<host>", "SSH destination (~/.ssh/config alias or [user@]host[:port])").option("-g, --global", "write to the global config instead of this project").action(async (host, opts) => {
12261
- const res = await probeRemoteEngine(host);
12262
- if (!res.ok) {
12263
- p.log.error(res.error);
12264
- process.exitCode = 1;
12384
+ new Command22("list").alias("ls").description("List your registered host aliases (and any baked-but-unregistered hosts)").action(async () => {
12385
+ const aliases = listHostAliases();
12386
+ const baked = readPreparedState5()?.hosts ?? {};
12387
+ const configured = (await configuredHost()).trim();
12388
+ if (aliases.length === 0 && Object.keys(baked).length === 0) {
12389
+ p.log.info(
12390
+ "no host aliases yet \u2014 add one with `agentbox remote-docker add <alias> <[user@]host[:port]>`"
12391
+ );
12265
12392
  return;
12266
12393
  }
12267
- await setConfigValue(
12268
- opts.global ? "global" : "project",
12269
- "box.remoteDockerHost",
12270
- host,
12271
- process.cwd()
12272
- );
12273
- p.log.success(
12274
- `box.remoteDockerHost = ${host} (${opts.global ? "global" : "project"}) \u2014 docker ${res.version}`
12275
- );
12394
+ for (const { alias, entry } of aliases) {
12395
+ const bakedInfo = baked[alias];
12396
+ const bakePart = bakedInfo ? ` [${bakedInfo.imageRef}]` : " (not baked yet)";
12397
+ const dflt = alias === configured ? " (default)" : "";
12398
+ p.log.info(`${alias} \u2192 ${entry.ssh}${bakePart}${dflt}`);
12399
+ }
12400
+ for (const [host, info] of Object.entries(baked)) {
12401
+ if (aliases.some((a) => a.alias === host)) continue;
12402
+ p.log.info(`${host} (unregistered) [${info.imageRef}]`);
12403
+ }
12276
12404
  })
12277
12405
  ).addCommand(
12278
- new Command22("hosts").description("List the remote engines this machine has baked a box image on").action(() => {
12279
- const state = readPreparedState5();
12280
- const hosts = Object.entries(state?.hosts ?? {});
12281
- if (hosts.length === 0) {
12282
- p.log.info("no remote engines prepared yet");
12406
+ new Command22("doctor").description("Check whether a host can run boxes (ssh reachable + docker present)").argument("[host]", "a registered alias OR a raw `[user@]host[:port]` (default: box.remoteDockerHost)").action(async (host) => {
12407
+ const name = (host ?? await configuredHost()).trim();
12408
+ if (!name) {
12409
+ p.log.error(
12410
+ "no host \u2014 pass one (`agentbox remote-docker doctor <alias|ssh>`) or set a default with `agentbox remote-docker add`"
12411
+ );
12412
+ process.exitCode = 1;
12283
12413
  return;
12284
12414
  }
12285
- for (const [host, info] of hosts) {
12286
- p.log.info(`${host} ${info.imageRef} (${info.cliVersion ?? "\u2014"}, ${info.createdAt})`);
12415
+ const entry = getHostAlias(name);
12416
+ const connection = entry ? entry.ssh : name;
12417
+ const probe = await probeRemoteEngine(connection);
12418
+ const rows = probe.steps.map((step) => ({
12419
+ label: step.label,
12420
+ status: step.ok ? "ok" : "fail",
12421
+ detail: step.detail,
12422
+ ...step.hint ? { hint: step.hint } : {}
12423
+ }));
12424
+ if (probe.ok) {
12425
+ const bakedInfo = readPreparedState5()?.hosts[name];
12426
+ rows.push(
12427
+ bakedInfo ? {
12428
+ label: "box image",
12429
+ status: "ok",
12430
+ detail: `${bakedInfo.imageRef} (${bakedInfo.cliVersion ?? "\u2014"})`
12431
+ } : {
12432
+ label: "box image",
12433
+ status: "info",
12434
+ detail: "not baked yet",
12435
+ hint: `first create bakes it, or \`agentbox prepare --provider docker:${name}\``
12436
+ }
12437
+ );
12438
+ }
12439
+ if (!entry) {
12440
+ rows.push({
12441
+ label: "alias",
12442
+ status: "warn",
12443
+ detail: "not registered",
12444
+ hint: `register to create boxes here: \`agentbox remote-docker add <alias> ${connection}\``
12445
+ });
12446
+ }
12447
+ const header = entry ? `${name} \u2192 ${entry.ssh}` : name;
12448
+ process.stdout.write(`remote-docker: ${header}
12449
+ `);
12450
+ for (const r of rows) {
12451
+ const label = r.label.padEnd(10);
12452
+ const tail = r.hint ? ` (${r.hint})` : "";
12453
+ process.stdout.write(` ${statusBadge(r.status)} ${label} ${r.detail}${tail}
12454
+ `);
12287
12455
  }
12456
+ if (!probe.ok) process.exitCode = 1;
12288
12457
  })
12289
12458
  );
12459
+ function boxesUsingAlias(alias) {
12460
+ try {
12461
+ const raw = JSON.parse(readFileSync6(join21(homedir16(), ".agentbox", "state.json"), "utf8"));
12462
+ return (raw.boxes ?? []).filter(
12463
+ (b) => b.provider === "remote-docker" && typeof b.cloud?.sandboxId === "string" && b.cloud.sandboxId.startsWith(`${alias}/`)
12464
+ ).map((b) => b.name ?? "(unnamed)");
12465
+ } catch {
12466
+ return [];
12467
+ }
12468
+ }
12290
12469
  async function configuredHost() {
12291
12470
  const cfg = await loadEffectiveConfig(process.cwd());
12292
12471
  return cfg.effective.box.remoteDockerHost || "";
@@ -13274,8 +13453,8 @@ function sleep4(ms) {
13274
13453
  import { log as log40 } from "@clack/prompts";
13275
13454
  import { Command as Command31 } from "commander";
13276
13455
  import { existsSync as existsSync10, readdirSync as readdirSync3, statSync as statSync2 } from "fs";
13277
- import { homedir as homedir16 } from "os";
13278
- import { join as join21 } from "path";
13456
+ import { homedir as homedir17 } from "os";
13457
+ import { join as join22 } from "path";
13279
13458
  var FORK_AGENTS = ["claude", "codex", "opencode"];
13280
13459
  var FORK_PROVIDERS = PROVIDER_NAMES;
13281
13460
  function resolveForkProvider(positional, flag) {
@@ -13315,12 +13494,12 @@ function resolveSessionArgs(agent, opts) {
13315
13494
  }
13316
13495
  if (opts.session) return ["--resume", opts.session];
13317
13496
  if (agent === "codex") return ["--continue"];
13318
- const dir = join21(homedir16(), ".claude", "projects", encodeClaudeProjectsDir(opts.workspace));
13497
+ const dir = join22(homedir17(), ".claude", "projects", encodeClaudeProjectsDir(opts.workspace));
13319
13498
  if (!existsSync10(dir)) return ["--continue"];
13320
13499
  const now = Date.now();
13321
13500
  const recent = readdirSync3(dir).filter((f) => f.endsWith(".jsonl")).map((f) => {
13322
13501
  try {
13323
- return statSync2(join21(dir, f)).mtimeMs;
13502
+ return statSync2(join22(dir, f)).mtimeMs;
13324
13503
  } catch {
13325
13504
  return 0;
13326
13505
  }
@@ -13406,13 +13585,13 @@ var forkCommand = new Command31("fork").description(
13406
13585
  if (agent === "claude") {
13407
13586
  const envId = (process.env.CLAUDE_CODE_SESSION_ID ?? process.env.CLAUDE_SESSION_ID ?? "").trim();
13408
13587
  if (envId) {
13409
- const dir = join21(
13410
- homedir16(),
13588
+ const dir = join22(
13589
+ homedir17(),
13411
13590
  ".claude",
13412
13591
  "projects",
13413
13592
  encodeClaudeProjectsDir(opts.workspace)
13414
13593
  );
13415
- if (existsSync10(join21(dir, `${envId}.jsonl`))) opts.session = envId;
13594
+ if (existsSync10(join22(dir, `${envId}.jsonl`))) opts.session = envId;
13416
13595
  }
13417
13596
  } else if (agent === "codex") {
13418
13597
  const envId = (process.env.CODEX_THREAD_ID ?? "").trim();
@@ -13451,17 +13630,17 @@ import {
13451
13630
  existsSync as existsSync18,
13452
13631
  lstatSync,
13453
13632
  mkdirSync as mkdirSync12,
13454
- readFileSync as readFileSync10,
13633
+ readFileSync as readFileSync11,
13455
13634
  rmSync as rmSync5,
13456
13635
  symlinkSync as symlinkSync3,
13457
13636
  writeFileSync as writeFileSync12
13458
13637
  } from "fs";
13459
- import { homedir as homedir23 } from "os";
13460
- import { dirname as dirname8, join as join29, resolve as resolve5 } from "path";
13638
+ import { homedir as homedir24 } from "os";
13639
+ import { dirname as dirname8, join as join30, resolve as resolve5 } from "path";
13461
13640
 
13462
13641
  // src/lib/source-checkout.ts
13463
13642
  import { existsSync as existsSync11 } from "fs";
13464
- import { dirname as dirname2, join as join22, resolve as resolve4, sep } from "path";
13643
+ import { dirname as dirname2, join as join23, resolve as resolve4, sep } from "path";
13465
13644
  import { fileURLToPath } from "url";
13466
13645
  function resolveHostSkillsDir() {
13467
13646
  const here = dirname2(fileURLToPath(import.meta.url));
@@ -13487,15 +13666,15 @@ function resolveDevRepoRoot() {
13487
13666
  }
13488
13667
  if (!isSourceCheckout(hostSkillsDir)) return null;
13489
13668
  const root = resolve4(hostSkillsDir, "..", "..", "..", "..");
13490
- const hasMarketplace = existsSync11(join22(root, ".agents", "plugins", "marketplace.json"));
13491
- const hasPlugin = existsSync11(join22(root, "plugins", "agentbox"));
13669
+ const hasMarketplace = existsSync11(join23(root, ".agents", "plugins", "marketplace.json"));
13670
+ const hasPlugin = existsSync11(join23(root, "plugins", "agentbox"));
13492
13671
  return hasMarketplace && hasPlugin ? root : null;
13493
13672
  }
13494
13673
 
13495
13674
  // src/lib/doctor-checks.ts
13496
13675
  import { accessSync, constants as fsConstants, existsSync as existsSync12, mkdirSync as mkdirSync6 } from "fs";
13497
- import { homedir as homedir17 } from "os";
13498
- import { join as join23 } from "path";
13676
+ import { homedir as homedir18 } from "os";
13677
+ import { join as join24 } from "path";
13499
13678
  import { execa as execa8 } from "execa";
13500
13679
  var NODE_MIN_MAJOR = 20;
13501
13680
  var NODE_MIN_MINOR = 10;
@@ -13535,7 +13714,7 @@ function checkPlatform() {
13535
13714
  };
13536
13715
  }
13537
13716
  function checkAgentboxHome() {
13538
- const dir = join23(homedir17(), ".agentbox");
13717
+ const dir = join24(homedir18(), ".agentbox");
13539
13718
  try {
13540
13719
  mkdirSync6(dir, { recursive: true });
13541
13720
  accessSync(dir, fsConstants.W_OK);
@@ -13821,12 +14000,6 @@ function formatCompact(groups) {
13821
14000
  function pad4(s, width) {
13822
14001
  return s.length >= width ? s : s + " ".repeat(width - s.length);
13823
14002
  }
13824
- function statusBadge(s) {
13825
- if (s === "ok") return "[ ok ]";
13826
- if (s === "info") return "[info]";
13827
- if (s === "warn") return "[warn]";
13828
- return "[FAIL]";
13829
- }
13830
14003
  function formatDetailed(groups) {
13831
14004
  const lines = [];
13832
14005
  for (const g of groups) {
@@ -13843,11 +14016,11 @@ function formatDetailed(groups) {
13843
14016
 
13844
14017
  // src/lib/first-run.ts
13845
14018
  import { existsSync as existsSync13, mkdirSync as mkdirSync7, writeFileSync as writeFileSync7 } from "fs";
13846
- import { homedir as homedir18 } from "os";
13847
- import { dirname as dirname3, join as join24 } from "path";
14019
+ import { homedir as homedir19 } from "os";
14020
+ import { dirname as dirname3, join as join25 } from "path";
13848
14021
  var MARKER_VERSION = 1;
13849
14022
  function setupMarkerPath() {
13850
- return join24(homedir18(), ".agentbox", "setup-complete.json");
14023
+ return join25(homedir19(), ".agentbox", "setup-complete.json");
13851
14024
  }
13852
14025
  function isFirstRun() {
13853
14026
  return !existsSync13(setupMarkerPath());
@@ -13865,9 +14038,9 @@ function markSetupComplete(provider) {
13865
14038
 
13866
14039
  // src/lib/star-prompt.ts
13867
14040
  import { spawnSync as spawnSync3 } from "child_process";
13868
- import { existsSync as existsSync14, mkdirSync as mkdirSync8, readFileSync as readFileSync6, writeFileSync as writeFileSync8 } from "fs";
13869
- import { homedir as homedir19 } from "os";
13870
- import { dirname as dirname4, join as join25 } from "path";
14041
+ import { existsSync as existsSync14, mkdirSync as mkdirSync8, readFileSync as readFileSync7, writeFileSync as writeFileSync8 } from "fs";
14042
+ import { homedir as homedir20 } from "os";
14043
+ import { dirname as dirname4, join as join26 } from "path";
13871
14044
  var STATE_VERSION2 = 1;
13872
14045
  var REPO = "madarco/agentbox";
13873
14046
  var REPO_URL = `https://github.com/${REPO}`;
@@ -13878,13 +14051,13 @@ var DEFAULT_STATE = {
13878
14051
  answered: false
13879
14052
  };
13880
14053
  function starStatePath() {
13881
- return join25(homedir19(), ".agentbox", "star-prompt.json");
14054
+ return join26(homedir20(), ".agentbox", "star-prompt.json");
13882
14055
  }
13883
14056
  function readStarState() {
13884
14057
  const path = starStatePath();
13885
14058
  if (!existsSync14(path)) return { ...DEFAULT_STATE };
13886
14059
  try {
13887
- const parsed = JSON.parse(readFileSync6(path, "utf8"));
14060
+ const parsed = JSON.parse(readFileSync7(path, "utf8"));
13888
14061
  return {
13889
14062
  version: STATE_VERSION2,
13890
14063
  installCount: typeof parsed.installCount === "number" ? parsed.installCount : 0,
@@ -13948,14 +14121,14 @@ async function maybePromptStar(opts) {
13948
14121
  // src/commands/install-cmux.ts
13949
14122
  import { intro as intro9, log as log42, note as note3, outro as outro8 } from "@clack/prompts";
13950
14123
  import { Command as Command32 } from "commander";
13951
- import { existsSync as existsSync15, mkdirSync as mkdirSync9, readFileSync as readFileSync7, renameSync as renameSync3, writeFileSync as writeFileSync9 } from "fs";
13952
- import { homedir as homedir20 } from "os";
13953
- import { dirname as dirname5, join as join26 } from "path";
14124
+ import { existsSync as existsSync15, mkdirSync as mkdirSync9, readFileSync as readFileSync8, renameSync as renameSync3, writeFileSync as writeFileSync9 } from "fs";
14125
+ import { homedir as homedir21 } from "os";
14126
+ import { dirname as dirname5, join as join27 } from "path";
13954
14127
  var CONTROL_ID = "agentbox";
13955
14128
  function cmuxDockPath(env = process.env) {
13956
14129
  const xdg = env["XDG_CONFIG_HOME"];
13957
- const base = xdg && xdg.length > 0 ? xdg : join26(homedir20(), ".config");
13958
- return join26(base, "cmux", "dock.json");
14130
+ const base = xdg && xdg.length > 0 ? xdg : join27(homedir21(), ".config");
14131
+ return join27(base, "cmux", "dock.json");
13959
14132
  }
13960
14133
  function upsertAgentboxControl(doc, opts) {
13961
14134
  const controls = Array.isArray(doc.controls) ? doc.controls : [];
@@ -13986,7 +14159,7 @@ var installCmuxCommand = new Command32("cmux").description(
13986
14159
  };
13987
14160
  let doc = { controls: [] };
13988
14161
  if (existsSync15(dockPath)) {
13989
- const raw = readFileSync7(dockPath, "utf8");
14162
+ const raw = readFileSync8(dockPath, "utf8");
13990
14163
  try {
13991
14164
  const parsed = JSON.parse(raw);
13992
14165
  if (parsed && typeof parsed === "object") doc = parsed;
@@ -14032,20 +14205,20 @@ To see it:
14032
14205
  import { intro as intro10, log as log43, note as note4, outro as outro9 } from "@clack/prompts";
14033
14206
  import { Command as Command33, Option } from "commander";
14034
14207
  import { spawnSync as spawnSync4 } from "child_process";
14035
- import { chmodSync, existsSync as existsSync16, mkdirSync as mkdirSync10, readFileSync as readFileSync8, writeFileSync as writeFileSync10 } from "fs";
14036
- import { homedir as homedir21 } from "os";
14037
- import { dirname as dirname6, join as join27 } from "path";
14208
+ import { chmodSync, existsSync as existsSync16, mkdirSync as mkdirSync10, readFileSync as readFileSync9, writeFileSync as writeFileSync10 } from "fs";
14209
+ import { homedir as homedir22 } from "os";
14210
+ import { dirname as dirname6, join as join28 } from "path";
14038
14211
  var PLUGIN_VERSION = "0.2.0";
14039
14212
  function herdrPluginDir(env = process.env) {
14040
- const home = env["AGENTBOX_HOME"] ?? join27(homedir21(), ".agentbox");
14041
- return join27(home, "herdr", "plugin");
14213
+ const home = env["AGENTBOX_HOME"] ?? join28(homedir22(), ".agentbox");
14214
+ return join28(home, "herdr", "plugin");
14042
14215
  }
14043
14216
  function herdrConfigPath(env = process.env) {
14044
14217
  const override = env["HERDR_CONFIG_PATH"];
14045
14218
  if (override && override.length > 0) return override;
14046
14219
  const xdg = env["XDG_CONFIG_HOME"];
14047
- const base = xdg && xdg.length > 0 ? xdg : join27(homedir21(), ".config");
14048
- return join27(base, "herdr", "config.toml");
14220
+ const base = xdg && xdg.length > 0 ? xdg : join28(homedir22(), ".config");
14221
+ return join28(base, "herdr", "config.toml");
14049
14222
  }
14050
14223
  function herdrBinary(env = process.env) {
14051
14224
  const b = env["HERDR_BIN_PATH"];
@@ -14161,13 +14334,13 @@ function escapeRe(s) {
14161
14334
  return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
14162
14335
  }
14163
14336
  function writeShim(dir) {
14164
- const p2 = join27(dir, "agentbox-shim.sh");
14337
+ const p2 = join28(dir, "agentbox-shim.sh");
14165
14338
  writeFileSync10(p2, herdrShimContent(process.execPath, process.argv[1] ?? "agentbox"));
14166
14339
  chmodSync(p2, 493);
14167
14340
  }
14168
14341
  function applyKeybindings() {
14169
14342
  const cfg = herdrConfigPath();
14170
- const existing = existsSync16(cfg) ? readFileSync8(cfg, "utf8") : "";
14343
+ const existing = existsSync16(cfg) ? readFileSync9(cfg, "utf8") : "";
14171
14344
  mkdirSync10(dirname6(cfg), { recursive: true });
14172
14345
  writeFileSync10(cfg, upsertHerdrKeybindings(existing, herdrKeybindingsBlock()));
14173
14346
  spawnSync4(herdrBinary(), ["server", "reload-config"], { stdio: "ignore" });
@@ -14186,18 +14359,18 @@ var installHerdrCommand = new Command33("herdr").description(
14186
14359
  return;
14187
14360
  }
14188
14361
  const dir = herdrPluginDir();
14189
- const file = join27(dir, "herdr-plugin.toml");
14362
+ const file = join28(dir, "herdr-plugin.toml");
14190
14363
  const cfgPath = herdrConfigPath();
14191
14364
  if (opts.dryRun) {
14192
14365
  intro10("agentbox install herdr (dry run)");
14193
14366
  process.stdout.write(`# --- ${file} ---
14194
14367
  ${buildHerdrManifest()}
14195
14368
  `);
14196
- process.stdout.write(`# --- ${join27(dir, "build.sh")} ---
14369
+ process.stdout.write(`# --- ${join28(dir, "build.sh")} ---
14197
14370
  ${herdrBuildScript()}
14198
14371
  `);
14199
14372
  process.stdout.write(
14200
- `# --- ${join27(dir, "agentbox-shim.sh")} ---
14373
+ `# --- ${join28(dir, "agentbox-shim.sh")} ---
14201
14374
  ${herdrShimContent(process.execPath, process.argv[1] ?? "agentbox")}
14202
14375
  `
14203
14376
  );
@@ -14209,7 +14382,7 @@ ${herdrKeybindingsBlock()}
14209
14382
  }
14210
14383
  mkdirSync10(dir, { recursive: true });
14211
14384
  writeFileSync10(file, buildHerdrManifest());
14212
- const buildPath = join27(dir, "build.sh");
14385
+ const buildPath = join28(dir, "build.sh");
14213
14386
  writeFileSync10(buildPath, herdrBuildScript());
14214
14387
  chmodSync(buildPath, 493);
14215
14388
  writeShim(dir);
@@ -14245,50 +14418,50 @@ import { spawnSync as spawnSync5 } from "child_process";
14245
14418
  import {
14246
14419
  existsSync as existsSync17,
14247
14420
  mkdirSync as mkdirSync11,
14248
- readFileSync as readFileSync9,
14421
+ readFileSync as readFileSync10,
14249
14422
  readdirSync as readdirSync4,
14250
14423
  rmSync as rmSync4,
14251
14424
  symlinkSync as symlinkSync2,
14252
14425
  writeFileSync as writeFileSync11
14253
14426
  } from "fs";
14254
- import { homedir as homedir22 } from "os";
14255
- import { dirname as dirname7, join as join28 } from "path";
14427
+ import { homedir as homedir23 } from "os";
14428
+ import { dirname as dirname7, join as join29 } from "path";
14256
14429
  import { parse as parseToml } from "smol-toml";
14257
14430
  var MARKETPLACE_SOURCE = "madarco/agentbox";
14258
14431
  var MARKETPLACE_NAME = "agentbox";
14259
14432
  var PLUGIN_NAME = "agentbox";
14260
14433
  var PLUGIN_ID = `${PLUGIN_NAME}@${MARKETPLACE_NAME}`;
14261
- var PLUGIN_BUNDLE_REL = join28("plugins", "agentbox");
14434
+ var PLUGIN_BUNDLE_REL = join29("plugins", "agentbox");
14262
14435
  function marketplaceSource(opts = {}) {
14263
14436
  const devRoot = opts.noDev ? null : resolveDevRepoRoot();
14264
14437
  return { source: devRoot ?? MARKETPLACE_SOURCE, devRoot };
14265
14438
  }
14266
14439
  function symlinkStagedSkills(devRoot, env = process.env) {
14267
14440
  try {
14268
- const pluginRoot = join28(codexHomeDir(env), "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME);
14269
- const bundle = join28(devRoot, PLUGIN_BUNDLE_REL);
14441
+ const pluginRoot = join29(codexHomeDir(env), "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME);
14442
+ const bundle = join29(devRoot, PLUGIN_BUNDLE_REL);
14270
14443
  let versionDir;
14271
14444
  try {
14272
14445
  const manifest = JSON.parse(
14273
- readFileSync9(join28(bundle, ".codex-plugin", "plugin.json"), "utf8")
14446
+ readFileSync10(join29(bundle, ".codex-plugin", "plugin.json"), "utf8")
14274
14447
  );
14275
- if (manifest.version) versionDir = join28(pluginRoot, manifest.version);
14448
+ if (manifest.version) versionDir = join29(pluginRoot, manifest.version);
14276
14449
  } catch {
14277
14450
  }
14278
14451
  if (!versionDir || !existsSync17(versionDir)) {
14279
14452
  const children = existsSync17(pluginRoot) ? readdirSync4(pluginRoot) : [];
14280
- versionDir = children.length === 1 ? join28(pluginRoot, children[0]) : void 0;
14453
+ versionDir = children.length === 1 ? join29(pluginRoot, children[0]) : void 0;
14281
14454
  }
14282
14455
  if (!versionDir || !existsSync17(versionDir)) {
14283
14456
  return { linked: 0, error: "staged plugin dir not found" };
14284
14457
  }
14285
- const skillsDir = join28(bundle, "skills");
14458
+ const skillsDir = join29(bundle, "skills");
14286
14459
  if (!existsSync17(skillsDir)) return { linked: 0 };
14287
14460
  let linked = 0;
14288
14461
  for (const name of readdirSync4(skillsDir)) {
14289
- const repoSkill = join28(skillsDir, name, "SKILL.md");
14462
+ const repoSkill = join29(skillsDir, name, "SKILL.md");
14290
14463
  if (!existsSync17(repoSkill)) continue;
14291
- const stagedSkill = join28(versionDir, "skills", name, "SKILL.md");
14464
+ const stagedSkill = join29(versionDir, "skills", name, "SKILL.md");
14292
14465
  mkdirSync11(dirname7(stagedSkill), { recursive: true });
14293
14466
  rmSync4(stagedSkill, { force: true });
14294
14467
  symlinkSync2(repoSkill, stagedSkill);
@@ -14300,18 +14473,18 @@ function symlinkStagedSkills(devRoot, env = process.env) {
14300
14473
  }
14301
14474
  }
14302
14475
  function syncBundleSkill(devRoot) {
14303
- spawnSync5("node", [join28(devRoot, "scripts", "check-plugin-skill-sync.mjs"), "--fix"], {
14476
+ spawnSync5("node", [join29(devRoot, "scripts", "check-plugin-skill-sync.mjs"), "--fix"], {
14304
14477
  cwd: devRoot,
14305
14478
  stdio: "ignore"
14306
14479
  });
14307
14480
  }
14308
14481
  function codexHomeDir(env = process.env) {
14309
14482
  const override = env["CODEX_HOME"];
14310
- return override && override.length > 0 ? override : join28(homedir22(), ".codex");
14483
+ return override && override.length > 0 ? override : join29(homedir23(), ".codex");
14311
14484
  }
14312
14485
  function currentMarketplaceType(env = process.env) {
14313
14486
  try {
14314
- const cfg = readFileSync9(codexConfigPath(env), "utf8");
14487
+ const cfg = readFileSync10(codexConfigPath(env), "utf8");
14315
14488
  const parsed = parseToml(cfg);
14316
14489
  const t = parsed.marketplaces?.[MARKETPLACE_NAME]?.source_type;
14317
14490
  return typeof t === "string" ? t : null;
@@ -14320,7 +14493,7 @@ function currentMarketplaceType(env = process.env) {
14320
14493
  }
14321
14494
  }
14322
14495
  function codexConfigPath(env = process.env) {
14323
- return join28(codexHomeDir(env), "config.toml");
14496
+ return join29(codexHomeDir(env), "config.toml");
14324
14497
  }
14325
14498
  function codexBinary(env = process.env) {
14326
14499
  const b = env["CODEX_BIN_PATH"];
@@ -14406,7 +14579,7 @@ async function installCodexPlugin(opts = {}) {
14406
14579
  process.stdout.write(
14407
14580
  `# would run: ${bin} plugin marketplace add ${source}
14408
14581
  # would run: ${bin} plugin add ${PLUGIN_ID}
14409
- ` + (devRoot ? `# would symlink the staged skills/*/SKILL.md -> ${join28(devRoot, PLUGIN_BUNDLE_REL, "skills")}/*
14582
+ ` + (devRoot ? `# would symlink the staged skills/*/SKILL.md -> ${join29(devRoot, PLUGIN_BUNDLE_REL, "skills")}/*
14410
14583
  ` : "") + `# --- appended to ${cfgPath} (only if not already configured) ---
14411
14584
  ${codexPluginEnableTable()}
14412
14585
  `
@@ -14447,7 +14620,7 @@ ${codexPluginEnableTable()}
14447
14620
  }
14448
14621
  }
14449
14622
  }
14450
- const existing = existsSync17(cfgPath) ? readFileSync9(cfgPath, "utf8") : "";
14623
+ const existing = existsSync17(cfgPath) ? readFileSync10(cfgPath, "utf8") : "";
14451
14624
  const { text: text4, status } = upsertCodexPluginEnable(existing, { force: opts.force });
14452
14625
  result.enableStatus = status;
14453
14626
  if (text4 !== existing) {
@@ -14567,22 +14740,22 @@ ${LOGO_L2}\x1B[0m` + SYNC_END2);
14567
14740
  }
14568
14741
  var LEGACY_INFO_MARKER = "Drive AgentBox from the host:";
14569
14742
  function installTargets() {
14570
- const home = homedir23();
14571
- const claudeSkills = join29(home, ".claude", "skills");
14743
+ const home = homedir24();
14744
+ const claudeSkills = join30(home, ".claude", "skills");
14572
14745
  return [
14573
14746
  {
14574
- src: join29("agentbox-info", "SKILL.md"),
14575
- dest: join29(claudeSkills, "agentbox-info", "SKILL.md")
14747
+ src: join30("agentbox-info", "SKILL.md"),
14748
+ dest: join30(claudeSkills, "agentbox-info", "SKILL.md")
14576
14749
  },
14577
14750
  {
14578
- src: join29("codex", "agentbox.md"),
14579
- dest: join29(home, ".codex", "prompts", "agentbox.md"),
14580
- gateDir: join29(home, ".codex")
14751
+ src: join30("codex", "agentbox.md"),
14752
+ dest: join30(home, ".codex", "prompts", "agentbox.md"),
14753
+ gateDir: join30(home, ".codex")
14581
14754
  },
14582
14755
  {
14583
- src: join29("opencode", "agentbox.md"),
14584
- dest: join29(home, ".config", "opencode", "commands", "agentbox.md"),
14585
- gateDir: join29(home, ".config", "opencode")
14756
+ src: join30("opencode", "agentbox.md"),
14757
+ dest: join30(home, ".config", "opencode", "commands", "agentbox.md"),
14758
+ gateDir: join30(home, ".config", "opencode")
14586
14759
  }
14587
14760
  ];
14588
14761
  }
@@ -14598,7 +14771,7 @@ function writableReason(target, force) {
14598
14771
  if (isSymlink(target)) return "managed";
14599
14772
  return "new";
14600
14773
  }
14601
- const existing = readFileSync10(target, "utf8");
14774
+ const existing = readFileSync11(target, "utf8");
14602
14775
  if (existing.includes(MANAGED_SENTINEL) || existing.includes(LEGACY_INFO_MARKER)) {
14603
14776
  return "managed";
14604
14777
  }
@@ -14606,7 +14779,7 @@ function writableReason(target, force) {
14606
14779
  }
14607
14780
  function sameContent(src, dest) {
14608
14781
  try {
14609
- return readFileSync10(dest, "utf8") === readFileSync10(src, "utf8");
14782
+ return readFileSync11(dest, "utf8") === readFileSync11(src, "utf8");
14610
14783
  } catch {
14611
14784
  return false;
14612
14785
  }
@@ -14621,7 +14794,7 @@ function installHostSkills(opts = {}) {
14621
14794
  const blocked = [];
14622
14795
  let skipped = 0;
14623
14796
  for (const t of installTargets()) {
14624
- const src = join29(srcDir, t.src);
14797
+ const src = join30(srcDir, t.src);
14625
14798
  if (!existsSync18(src)) {
14626
14799
  if (!quiet) prompt_exports.log.warn(`bundled file missing (skipped): ${src}`);
14627
14800
  skipped++;
@@ -14646,7 +14819,7 @@ function installHostSkills(opts = {}) {
14646
14819
  symlinkSync3(resolve5(srcDir, t.src), t.dest);
14647
14820
  } else {
14648
14821
  if (isSymlink(t.dest)) rmSync5(t.dest, { force: true });
14649
- writeFileSync12(t.dest, readFileSync10(src, "utf8"));
14822
+ writeFileSync12(t.dest, readFileSync11(src, "utf8"));
14650
14823
  }
14651
14824
  written.push(t.dest);
14652
14825
  }
@@ -14658,8 +14831,8 @@ async function installForkSkill(opts = {}) {
14658
14831
  const dryRun = opts.dryRun === true;
14659
14832
  const quiet = opts.quiet === true;
14660
14833
  const srcDir = resolveHostSkillsDir();
14661
- const src = join29(srcDir, "agentbox", "SKILL.md");
14662
- const dest = join29(homedir23(), ".claude", "skills", "agentbox", "SKILL.md");
14834
+ const src = join30(srcDir, "agentbox", "SKILL.md");
14835
+ const dest = join30(homedir24(), ".claude", "skills", "agentbox", "SKILL.md");
14663
14836
  if (!existsSync18(src)) {
14664
14837
  if (!quiet) prompt_exports.log.warn(`bundled file missing (skipped): ${src}`);
14665
14838
  return { written: [], skipped: 1, blocked: [], method: "skip" };
@@ -14711,7 +14884,7 @@ async function installForkSkill(opts = {}) {
14711
14884
  }
14712
14885
  mkdirSync12(dirname8(dest), { recursive: true });
14713
14886
  if (isSymlink(dest)) rmSync5(dest, { force: true });
14714
- writeFileSync12(dest, readFileSync10(src, "utf8"));
14887
+ writeFileSync12(dest, readFileSync11(src, "utf8"));
14715
14888
  return { written: [dest], skipped: 0, blocked: [], method: "copy" };
14716
14889
  }
14717
14890
  }
@@ -14744,18 +14917,16 @@ async function maybeSetDefaultProvider(name, autoYes) {
14744
14917
  initialValue: true
14745
14918
  });
14746
14919
  if (!wantDefault) {
14747
- prompt_exports.log.info(
14748
- `left the default as ${cfg.effective.box.provider} \u2014 start a ${name} box with \`agentbox ${name} claude\`, or set it later with \`agentbox config set box.provider ${name} --global\``
14749
- );
14920
+ prompt_exports.log.info(`kept ${cfg.effective.box.provider} as the default for new boxes`);
14750
14921
  return false;
14751
14922
  }
14752
14923
  try {
14753
- const r = await setConfigValue("global", "box.provider", name, process.cwd(), { raw: true });
14754
- prompt_exports.log.info(`box.provider = ${name} (wrote ${r.path})`);
14924
+ await setConfigValue("global", "box.provider", name, process.cwd(), { raw: true });
14925
+ prompt_exports.log.info(`${label} is now the default for new boxes`);
14755
14926
  return true;
14756
14927
  } catch (err) {
14757
14928
  prompt_exports.log.warn(
14758
- `could not write box.provider: ${err instanceof Error ? err.message : String(err)} \u2014 set it with \`agentbox config set box.provider ${name} --global\``
14929
+ `could not set ${label} as the default: ${err instanceof Error ? err.message : String(err)}`
14759
14930
  );
14760
14931
  return false;
14761
14932
  }
@@ -14766,7 +14937,7 @@ function tutorialBody(provider, isDefault) {
14766
14937
  ${startCmd} # for claude, codex, opencode
14767
14938
  -> Setup wizard? -> Yes # install dependencies and setup agentbox.yaml
14768
14939
  -> Ctrl+a d # to detach from the box and leave claude running
14769
- agentbox claude attach 1 # resume it later
14940
+ agentbox attach # resume it later
14770
14941
  agentbox install # to set up another provider`;
14771
14942
  }
14772
14943
  var KNOWN_PROVIDERS = PROVIDER_NAMES;
@@ -14818,8 +14989,18 @@ async function runInstallWizard(opts = {}) {
14818
14989
  return false;
14819
14990
  }
14820
14991
  }
14821
- const prepareMsg = providerName === "docker" ? "Build the box image now? (~1GB, a few minutes)" : `Create the ${providerName} base snapshot now? (a few minutes, uses cloud time)`;
14822
- const wantPrepare = opts.yes ? true : await confirm({ message: prepareMsg, initialValue: true });
14992
+ let remoteDockerHostReady = true;
14993
+ if (providerName === "remote-docker") {
14994
+ const alias = await interactiveRegisterHost();
14995
+ if (!alias) {
14996
+ remoteDockerHostReady = false;
14997
+ prompt_exports.log.info(
14998
+ "no host registered \u2014 add one later with `agentbox remote-docker add <alias> <ssh>`"
14999
+ );
15000
+ }
15001
+ }
15002
+ const prepareMsg = providerName === "docker" ? "Build the box image now? (~1GB, a few minutes)" : providerName === "remote-docker" ? "Bake the box image on the host now? (a few minutes; pulled from GHCR or built there)" : `Create the ${providerName} base snapshot now? (a few minutes, uses cloud time)`;
15003
+ const wantPrepare = remoteDockerHostReady && (opts.yes ? true : await confirm({ message: prepareMsg, initialValue: true }));
14823
15004
  if (wantPrepare) {
14824
15005
  try {
14825
15006
  await runPrepare(providerName, {
@@ -14832,6 +15013,8 @@ async function runInstallWizard(opts = {}) {
14832
15013
  `prepare failed: ${err instanceof Error ? err.message : String(err)} \u2014 you can rerun \`agentbox prepare --provider ${providerName}\` later`
14833
15014
  );
14834
15015
  }
15016
+ } else if (providerName === "remote-docker") {
15017
+ prompt_exports.log.info("skipped \u2014 the box image builds on the host on first create");
14835
15018
  } else {
14836
15019
  prompt_exports.log.info(
14837
15020
  `skipped \u2014 the ${providerName} base will build lazily on first \`agentbox ${providerName === "docker" ? "" : providerName + " "}create\``
@@ -14867,9 +15050,9 @@ pass \`agentbox install --skills-only --force\` to overwrite`
14867
15050
  dryRun: opts.dryRun,
14868
15051
  quiet: true
14869
15052
  });
14870
- if (codexRes.ran) {
15053
+ if (codexRes.ran && codexRes.enableStatus !== "user-enabled") {
14871
15054
  prompt_exports.log.info(
14872
- codexRes.enableStatus === "added" ? "Codex plugin: installed and enabled by default" : codexRes.enableStatus === "user-enabled" ? "Codex plugin: already enabled" : codexRes.enableStatus === "user-disabled" ? "Codex plugin: installed (left disabled per your config)" : "Codex plugin: installed (could not edit ~/.codex/config.toml)"
15055
+ codexRes.enableStatus === "added" ? "Codex plugin: installed and enabled by default" : codexRes.enableStatus === "user-disabled" ? "Codex plugin: installed (left disabled per your config)" : "Codex plugin: installed (could not edit ~/.codex/config.toml)"
14873
15056
  );
14874
15057
  }
14875
15058
  } catch (err) {
@@ -14887,11 +15070,7 @@ pass \`agentbox install --skills-only --force\` to overwrite`
14887
15070
  const behind = installedVersion !== void 0 && latestVersion !== void 0 && isNewer(latestVersion, installedVersion);
14888
15071
  let action = "install";
14889
15072
  if (trayInstalled()) action = behind ? "update" : "none";
14890
- if (action === "none") {
14891
- prompt_exports.log.info(
14892
- `Menu-bar app: already installed${installedVersion ? ` (${installedVersion})` : ""}`
14893
- );
14894
- } else {
15073
+ if (action !== "none") {
14895
15074
  const message = action === "update" ? `Update the AgentBox menu-bar app (${installedVersion ?? "?"} \u2192 ${latestVersion ?? "?"})?` : "Install the AgentBox menu-bar app?";
14896
15075
  const wantTray = opts.yes ? true : await confirm({ message, initialValue: true });
14897
15076
  if (wantTray === true) {
@@ -14976,7 +15155,7 @@ installCommand.addCommand(installAppCommand);
14976
15155
 
14977
15156
  // src/commands/plugin.ts
14978
15157
  import { execFileSync } from "child_process";
14979
- import { existsSync as existsSync19, readFileSync as readFileSync11, statSync as statSync3 } from "fs";
15158
+ import { existsSync as existsSync19, readFileSync as readFileSync12, statSync as statSync3 } from "fs";
14980
15159
  import { dirname as dirname9, isAbsolute as isAbsolute3, resolve as resolve6 } from "path";
14981
15160
  import { pathToFileURL } from "url";
14982
15161
  import { Command as Command36 } from "commander";
@@ -15016,7 +15195,7 @@ function resolvePackage(arg) {
15016
15195
  }
15017
15196
  pkgDir = dirname9(pkgJsonPath);
15018
15197
  }
15019
- const pkgJson = JSON.parse(readFileSync11(resolve6(pkgDir, "package.json"), "utf8"));
15198
+ const pkgJson = JSON.parse(readFileSync12(resolve6(pkgDir, "package.json"), "utf8"));
15020
15199
  const entryRel = pickEntry(pkgJson);
15021
15200
  return {
15022
15201
  packageName: pkgJson.name ?? arg,
@@ -15947,8 +16126,8 @@ var logsCommand = new Command40("logs").description("Print recent log lines from
15947
16126
  import { log as log49 } from "@clack/prompts";
15948
16127
  import { execa as execa10 } from "execa";
15949
16128
  import { existsSync as existsSync20, mkdirSync as mkdirSync13 } from "fs";
15950
- import { homedir as homedir24 } from "os";
15951
- import { join as join30 } from "path";
16129
+ import { homedir as homedir25 } from "os";
16130
+ import { join as join31 } from "path";
15952
16131
  import { Command as Command41, InvalidArgumentError as InvalidArgumentError3 } from "commander";
15953
16132
 
15954
16133
  // src/commands/path.ts
@@ -16003,7 +16182,7 @@ var openCommand = new Command41("open").description(
16003
16182
  }
16004
16183
  const box = await resolveBoxOrExit(idOrName);
16005
16184
  if (opts.unmount) {
16006
- const mountRoot = join30(homedir24(), ".agentbox", "mounts", box.name);
16185
+ const mountRoot = join31(homedir25(), ".agentbox", "mounts", box.name);
16007
16186
  const ok = await tryUnmount(mountRoot);
16008
16187
  process.stdout.write(ok ? `unmounted ${mountRoot}
16009
16188
  ` : `nothing mounted at ${mountRoot}
@@ -16178,7 +16357,7 @@ async function openInTerminalApp(box, host) {
16178
16357
  }
16179
16358
  env["CMUX_BUNDLED_CLI_PATH"] = bin;
16180
16359
  }
16181
- const cwd = box.workspacePath || box.projectRoot || homedir24();
16360
+ const cwd = box.workspacePath || box.projectRoot || homedir25();
16182
16361
  const r = await spawnInNewTerminal({
16183
16362
  host,
16184
16363
  mode: "window",
@@ -16217,7 +16396,7 @@ async function bringDockerBoxOnline(box) {
16217
16396
  return await refreshBoxSshd(box);
16218
16397
  }
16219
16398
  async function runSshfsMount(box, opts) {
16220
- const mountRoot = join30(homedir24(), ".agentbox", "mounts", box.name);
16399
+ const mountRoot = join31(homedir25(), ".agentbox", "mounts", box.name);
16221
16400
  if (opts.path || opts.print) {
16222
16401
  process.stdout.write(`${mountRoot}
16223
16402
  `);
@@ -16327,7 +16506,7 @@ var pauseCommand = new Command42("pause").description(
16327
16506
  });
16328
16507
 
16329
16508
  // src/commands/inbound.ts
16330
- import { confirm as confirm3, isCancel as isCancel5, log as log50 } from "@clack/prompts";
16509
+ import { confirm as confirm4, isCancel as isCancel6, log as log50 } from "@clack/prompts";
16331
16510
  import { Command as Command43 } from "commander";
16332
16511
  var inboundCommand = new Command43("inbound").description(
16333
16512
  "Set a VPS box's inbound-access policy (hetzner / digitalocean per-box firewall). `open` = SSH reachable from anywhere (0.0.0.0/0, key-only \u2014 reach the box from a phone with the laptop off); `lock` = host egress IP only; a CIDR list = host egress plus those. `--show` prints the current policy."
@@ -16365,8 +16544,8 @@ var inboundCommand = new Command43("inbound").description(
16365
16544
  log50.warn(
16366
16545
  `This opens SSH (port 22) on box '${box.name}' to the entire internet (0.0.0.0/0). Access stays key-only (password auth is disabled), but the port becomes publicly reachable.`
16367
16546
  );
16368
- const ok = await confirm3({ message: "Open the firewall to the world?", initialValue: false });
16369
- if (isCancel5(ok) || !ok) {
16547
+ const ok = await confirm4({ message: "Open the firewall to the world?", initialValue: false });
16548
+ if (isCancel6(ok) || !ok) {
16370
16549
  log50.info("cancelled");
16371
16550
  return;
16372
16551
  }
@@ -16381,7 +16560,7 @@ var inboundCommand = new Command43("inbound").description(
16381
16560
 
16382
16561
  // src/commands/connect.ts
16383
16562
  import { readFile as readFile6 } from "fs/promises";
16384
- import { confirm as confirm4, isCancel as isCancel6, log as log51 } from "@clack/prompts";
16563
+ import { confirm as confirm5, isCancel as isCancel7, log as log51 } from "@clack/prompts";
16385
16564
  import { Command as Command44 } from "commander";
16386
16565
  function looksLikePublicKey(s) {
16387
16566
  return /^(ssh-(ed25519|rsa|dss)|ecdsa-sha2-\S+|sk-ssh-\S+|sk-ecdsa-\S+)\s+\S+/.test(s.trim());
@@ -16443,11 +16622,11 @@ var connectCommand = new Command44("connect").description(
16443
16622
  );
16444
16623
  const lastAgent = box.lastAgent;
16445
16624
  if (lastAgent && process.stdin.isTTY && !opts.yes) {
16446
- const restart = await confirm4({
16625
+ const restart = await confirm5({
16447
16626
  message: `Restart the box's ${lastAgent} session now so it uses direct mode? (resumes your conversation; starts fresh if it can't)`,
16448
16627
  initialValue: true
16449
16628
  });
16450
- if (!isCancel6(restart) && restart) {
16629
+ if (!isCancel7(restart) && restart) {
16451
16630
  await restoreAgentSessions(box, provider, {
16452
16631
  restoreOnly: lastAgent,
16453
16632
  force: true,
@@ -16506,8 +16685,8 @@ var connectCommand = new Command44("connect").description(
16506
16685
  log51.warn(
16507
16686
  `This prints box '${box.name}''s PRIVATE key. Anyone with it can SSH in as ${conn.user}. Prefer \`--add-key <your-device.pub>\` (the box key then never leaves this host).`
16508
16687
  );
16509
- const ok = await confirm4({ message: "Export the private key?", initialValue: false });
16510
- if (isCancel6(ok) || !ok) {
16688
+ const ok = await confirm5({ message: "Export the private key?", initialValue: false });
16689
+ if (isCancel7(ok) || !ok) {
16511
16690
  log51.info("cancelled");
16512
16691
  return;
16513
16692
  }
@@ -17169,13 +17348,13 @@ var hubCommand = new Command48("hub").description(
17169
17348
  ).addCommand(startSub3, { isDefault: true }).addCommand(statusSub3).addCommand(stopSub3).addCommand(restartSub3);
17170
17349
 
17171
17350
  // src/commands/control-plane.ts
17172
- import { isCancel as isCancel8, log as log56, note as note7, select as select3, spinner as spinner14 } from "@clack/prompts";
17351
+ import { isCancel as isCancel9, log as log56, note as note7, select as select3, spinner as spinner14 } from "@clack/prompts";
17173
17352
  import { Command as Command49 } from "commander";
17174
17353
  import { spawn as spawn10 } from "child_process";
17175
- import { existsSync as existsSync21, readFileSync as readFileSync12 } from "fs";
17354
+ import { existsSync as existsSync21, readFileSync as readFileSync13 } from "fs";
17176
17355
  import { chmod as chmod2, mkdir as mkdir2, rm, writeFile as writeFile6 } from "fs/promises";
17177
- import { hostname, homedir as homedir26, tmpdir as tmpdir7 } from "os";
17178
- import { join as join33 } from "path";
17356
+ import { hostname, homedir as homedir27, tmpdir as tmpdir7 } from "os";
17357
+ import { join as join34 } from "path";
17179
17358
  import { setTimeout as delay3 } from "timers/promises";
17180
17359
  import { randomBytes as randomBytes3 } from "crypto";
17181
17360
 
@@ -17330,7 +17509,7 @@ async function runGitHubAppManifestFlow(opts) {
17330
17509
  import { spawn as spawn9 } from "child_process";
17331
17510
  import { mkdtempSync as mkdtempSync2, rmSync as rmSync6 } from "fs";
17332
17511
  import { tmpdir as tmpdir6 } from "os";
17333
- import { join as join31 } from "path";
17512
+ import { join as join32 } from "path";
17334
17513
 
17335
17514
  // src/control-plane/github-fork.ts
17336
17515
  import { spawn as spawn8 } from "child_process";
@@ -17394,7 +17573,7 @@ function isConnectError(msg) {
17394
17573
  }
17395
17574
  function provisionNeon(teamId, projectId, log69) {
17396
17575
  return new Promise((resolve7) => {
17397
- const work = mkdtempSync2(join31(tmpdir6(), "agentbox-neon-"));
17576
+ const work = mkdtempSync2(join32(tmpdir6(), "agentbox-neon-"));
17398
17577
  const env = { ...process.env, VERCEL_PROJECT_ID: projectId, ...teamId ? { VERCEL_ORG_ID: teamId } : {} };
17399
17578
  const child = spawn9("vercel", ["integration", "add", "neon", "--non-interactive"], {
17400
17579
  cwd: work,
@@ -17566,8 +17745,8 @@ async function deployControlPlaneToVercel(opts) {
17566
17745
 
17567
17746
  // src/control-plane/deploy-hetzner.ts
17568
17747
  import { readFile as readFile8, writeFile as writeFile5 } from "fs/promises";
17569
- import { homedir as homedir25 } from "os";
17570
- import { join as join32 } from "path";
17748
+ import { homedir as homedir26 } from "os";
17749
+ import { join as join33 } from "path";
17571
17750
  async function runHetznerDeploy(opts) {
17572
17751
  if (readHetznerCredStatus().source === "none") {
17573
17752
  throw new Error("no HCLOUD_TOKEN configured \u2014 run `agentbox hetzner login` first");
@@ -17578,7 +17757,7 @@ async function runHetznerDeploy(opts) {
17578
17757
  repoRef: opts.repoRef,
17579
17758
  onLog: opts.log
17580
17759
  });
17581
- const deployPath = join32(homedir25(), ".agentbox", "control-plane", "deploy.json");
17760
+ const deployPath = join33(homedir26(), ".agentbox", "control-plane", "deploy.json");
17582
17761
  await writeFile5(
17583
17762
  deployPath,
17584
17763
  JSON.stringify({ provider: "hetzner", ...result }, null, 2) + "\n",
@@ -17589,7 +17768,7 @@ async function runHetznerDeploy(opts) {
17589
17768
 
17590
17769
  // src/control-plane/hub-auth-env.ts
17591
17770
  import { randomBytes as randomBytes2 } from "crypto";
17592
- import { isCancel as isCancel7, password as password3, text as text3 } from "@clack/prompts";
17771
+ import { isCancel as isCancel8, password as password3, text as text3 } from "@clack/prompts";
17593
17772
  async function resolveHubAuthEnv() {
17594
17773
  let email = process.env.AGENTBOX_HUB_ADMIN_EMAIL;
17595
17774
  let pass = process.env.AGENTBOX_HUB_ADMIN_PASSWORD;
@@ -17599,7 +17778,7 @@ async function resolveHubAuthEnv() {
17599
17778
  message: "Hub admin email (used to log in to the deployed hub UI)",
17600
17779
  validate: (s) => /^.+@.+\..+$/.test(s.trim()) ? void 0 : "enter a valid email"
17601
17780
  });
17602
- if (isCancel7(v)) return null;
17781
+ if (isCancel8(v)) return null;
17603
17782
  email = v.trim();
17604
17783
  }
17605
17784
  if (!pass) {
@@ -17607,7 +17786,7 @@ async function resolveHubAuthEnv() {
17607
17786
  message: "Hub admin password (min 8 characters)",
17608
17787
  validate: (s) => s.length >= 8 ? void 0 : "at least 8 characters"
17609
17788
  });
17610
- if (isCancel7(v)) return null;
17789
+ if (isCancel8(v)) return null;
17611
17790
  pass = v;
17612
17791
  }
17613
17792
  return {
@@ -17619,10 +17798,10 @@ async function resolveHubAuthEnv() {
17619
17798
  }
17620
17799
 
17621
17800
  // src/commands/control-plane.ts
17622
- var CP_DIR2 = join33(homedir26(), ".agentbox", "control-plane");
17623
- var PEM_PATH = join33(CP_DIR2, "github-app.pem");
17624
- var ENV_PATH2 = join33(CP_DIR2, "control-plane.env");
17625
- var META_PATH2 = join33(CP_DIR2, "control-plane.json");
17801
+ var CP_DIR2 = join34(homedir27(), ".agentbox", "control-plane");
17802
+ var PEM_PATH = join34(CP_DIR2, "github-app.pem");
17803
+ var ENV_PATH2 = join34(CP_DIR2, "control-plane.env");
17804
+ var META_PATH2 = join34(CP_DIR2, "control-plane.json");
17626
17805
  var DEFAULT_DEPLOY_REPO = "madarco/agentbox";
17627
17806
  var DEFAULT_DEPLOY_REF = "main";
17628
17807
  async function applyControlPlaneUrl(url) {
@@ -17749,7 +17928,7 @@ async function resolveDeployTarget(flag) {
17749
17928
  ],
17750
17929
  initialValue: "vercel"
17751
17930
  });
17752
- if (isCancel8(choice)) return "none";
17931
+ if (isCancel9(choice)) return "none";
17753
17932
  return choice;
17754
17933
  }
17755
17934
  function printManualDeploy() {
@@ -17863,7 +18042,7 @@ var addSub = new Command49("add").description("Authorize the current project's g
17863
18042
  function loadControlPlaneEnv() {
17864
18043
  if (process.env.GITHUB_APP_ID && process.env.GITHUB_APP_PRIVATE_KEY) return;
17865
18044
  if (!existsSync21(ENV_PATH2)) return;
17866
- for (const line of readFileSync12(ENV_PATH2, "utf8").split("\n")) {
18045
+ for (const line of readFileSync13(ENV_PATH2, "utf8").split("\n")) {
17867
18046
  const m = /^([A-Z_]+)=(.*)$/.exec(line.trim());
17868
18047
  if (m && !process.env[m[1]]) process.env[m[1]] = m[2];
17869
18048
  }
@@ -17912,7 +18091,7 @@ var workerSub = new Command49("worker").description(
17912
18091
  const created = await p2.create({ workspacePath, name, projectRoot: workspacePath, onLog });
17913
18092
  return { id: created.record.id };
17914
18093
  },
17915
- tmpDir: (jobId) => join33(tmpdir7(), `agentbox-cp-worker-${jobId}`),
18094
+ tmpDir: (jobId) => join34(tmpdir7(), `agentbox-cp-worker-${jobId}`),
17916
18095
  cleanup: (dir) => rm(dir, { recursive: true, force: true }),
17917
18096
  log: (line) => process.stdout.write(`agentbox-cp-worker: ${line}
17918
18097
  `)
@@ -17944,7 +18123,7 @@ var controlPlaneCommand = new Command49("control-plane").description("EXPERIMENT
17944
18123
  // src/commands/_run-queued-job.ts
17945
18124
  import { Command as Command50 } from "commander";
17946
18125
  import { stat as stat8 } from "fs/promises";
17947
- import { join as join34 } from "path";
18126
+ import { join as join35 } from "path";
17948
18127
 
17949
18128
  // src/lib/claude-login-run.ts
17950
18129
  function asLoginPhase(phase) {
@@ -17984,7 +18163,7 @@ async function runClaudeLogin(opts) {
17984
18163
  // src/commands/_run-queued-job.ts
17985
18164
  async function applySetupWizardPrompt(job, workspace, basePrompt) {
17986
18165
  if (!job.setupWizard) return basePrompt;
17987
- const hasYaml = await stat8(join34(workspace, "agentbox.yaml")).then(() => true).catch(() => false);
18166
+ const hasYaml = await stat8(join35(workspace, "agentbox.yaml")).then(() => true).catch(() => false);
17988
18167
  const setup = buildSetupInitialPrompt(workspace, hasYaml);
17989
18168
  const rest = basePrompt.trim();
17990
18169
  return rest ? `${setup}
@@ -18401,12 +18580,14 @@ async function runPrepareJob(job, log69) {
18401
18580
  if (typeof provider.prepare !== "function") {
18402
18581
  throw new Error(`provider '${providerName}' does not implement prepare`);
18403
18582
  }
18583
+ const remoteHost = parseProviderSpec(providerName).remoteHost;
18404
18584
  log69.write(`baking ${providerName} (force=${String(job.prepare?.force ?? false)})`);
18405
18585
  const result = await provider.prepare({
18406
18586
  hostWorkspace: cwd,
18407
18587
  force: job.prepare?.force,
18408
18588
  registry,
18409
18589
  claudeInstall,
18590
+ ...remoteHost ? { host: remoteHost } : {},
18410
18591
  onLog: (line) => log69.write(line)
18411
18592
  });
18412
18593
  log69.write(
@@ -18746,13 +18927,13 @@ var linkCommand = new Command54("link").description("Handle a Ctrl+click on an a
18746
18927
  var herdrCommand = new Command54("herdr").description("Internal: Herdr plugin entry points (see `agentbox install herdr`)").addCommand(newCommand).addCommand(linkCommand);
18747
18928
 
18748
18929
  // src/commands/recover.ts
18749
- import { homedir as homedir27 } from "os";
18750
- import { join as join35 } from "path";
18930
+ import { homedir as homedir28 } from "os";
18931
+ import { join as join36 } from "path";
18751
18932
  import { access as access3 } from "fs/promises";
18752
- import { isCancel as isCancel9, log as log58, select as select4 } from "@clack/prompts";
18933
+ import { isCancel as isCancel10, log as log58, select as select4 } from "@clack/prompts";
18753
18934
  import { Command as Command55 } from "commander";
18754
18935
  function hetznerKeyPath(sandboxId) {
18755
- return join35(homedir27(), ".agentbox", "boxes", sandboxId, "ssh", "id_ed25519");
18936
+ return join36(homedir28(), ".agentbox", "boxes", sandboxId, "ssh", "id_ed25519");
18756
18937
  }
18757
18938
  async function fileExists3(path) {
18758
18939
  try {
@@ -18851,7 +19032,7 @@ async function adoptUnknownBox(provider, ref) {
18851
19032
  hint: [sb2.sandboxId, sb2.state, sb2.createdAt].filter(Boolean).join(" ")
18852
19033
  }))
18853
19034
  });
18854
- if (isCancel9(picked)) {
19035
+ if (isCancel10(picked)) {
18855
19036
  log58.info("cancelled");
18856
19037
  return null;
18857
19038
  }