@madarco/agentbox 0.22.1 → 0.22.2

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 (122) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/{_cloud-attach-YH2SU75S.js → _cloud-attach-Y5WZ7F53.js} +5 -5
  3. package/dist/{chunk-KBVD2UUQ.js → chunk-3KAWXDQ4.js} +3 -3
  4. package/dist/{chunk-YZXXBHWG.js → chunk-5DZTXHLQ.js} +3 -3
  5. package/dist/{chunk-O2NDZQHN.js → chunk-7HAGPF4X.js} +2 -2
  6. package/dist/{chunk-O67ZESNL.js → chunk-AYNGC4Z5.js} +4 -4
  7. package/dist/{chunk-GGWVTWJM.js → chunk-BMCT3LBE.js} +16 -13
  8. package/dist/chunk-BMCT3LBE.js.map +1 -0
  9. package/dist/{chunk-ALEYDWAO.js → chunk-ES2DDCAC.js} +303 -87
  10. package/dist/chunk-ES2DDCAC.js.map +1 -0
  11. package/dist/{chunk-VBSRJG53.js → chunk-QT3SHMLY.js} +9 -1
  12. package/dist/chunk-QT3SHMLY.js.map +1 -0
  13. package/dist/{chunk-CDEJ2GQK.js → chunk-S4OWE3UD.js} +4 -4
  14. package/dist/{chunk-W2FLHB54.js → chunk-V2NCCC2B.js} +2 -2
  15. package/dist/{dist-QBXEP4VY.js → dist-2BTJQUJS.js} +2 -2
  16. package/dist/{dist-LJHS4PTC.js → dist-AN5NUXA5.js} +6 -6
  17. package/dist/{dist-EJXUKIR7.js → dist-FNAGMTUI.js} +4 -4
  18. package/dist/{dist-YECTRVGD.js → dist-K5GASNBV.js} +6 -6
  19. package/dist/{dist-UR2DB2HT.js → dist-SJRMFVRV.js} +6 -6
  20. package/dist/{dist-QNV4H6NN.js → dist-VOVN64Y2.js} +6 -6
  21. package/dist/index.js +1108 -727
  22. package/dist/index.js.map +1 -1
  23. package/dist/{prepared-state-5FIGV4BE-BMUK63FD.js → prepared-state-5FIGV4BE-WPHOEDA6.js} +2 -2
  24. package/package.json +5 -5
  25. package/runtime/_shared/ctl.cjs +10 -0
  26. package/runtime/docker/packages/ctl/dist/bin.cjs +10 -0
  27. package/runtime/e2b/ctl.cjs +10 -0
  28. package/runtime/hetzner/ctl.cjs +10 -0
  29. package/runtime/hub/apps/hub/.next/BUILD_ID +1 -1
  30. package/runtime/hub/apps/hub/.next/app-path-routes-manifest.json +1 -0
  31. package/runtime/hub/apps/hub/.next/build-manifest.json +3 -3
  32. package/runtime/hub/apps/hub/.next/routes-manifest.json +8 -0
  33. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route/app-paths-manifest.json +3 -0
  34. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route/build-manifest.json +9 -0
  35. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route/server-reference-manifest.json +4 -0
  36. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js +9 -0
  37. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js.map +5 -0
  38. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route.js.nft.json +1 -0
  39. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/api/v1/boxes/[id]/rename/route_client-reference-manifest.js +3 -0
  40. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
  41. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page/server-reference-manifest.json +12 -0
  42. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/boxes/[id]/page_client-reference-manifest.js +1 -1
  43. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page/server-reference-manifest.json +12 -0
  44. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  45. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page/server-reference-manifest.json +12 -0
  46. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/projects/[id]/page_client-reference-manifest.js +1 -1
  47. package/runtime/hub/apps/hub/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  48. package/runtime/hub/apps/hub/.next/server/app/_global-error.html +1 -1
  49. package/runtime/hub/apps/hub/.next/server/app/_global-error.rsc +1 -1
  50. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  51. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  52. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  53. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  54. package/runtime/hub/apps/hub/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  55. package/runtime/hub/apps/hub/.next/server/app-paths-manifest.json +1 -0
  56. package/runtime/hub/apps/hub/.next/server/chunks/0m4a_kysely_dist_095p8vu._.js +1 -1
  57. package/runtime/hub/apps/hub/.next/server/chunks/1jcg_server_app_(dashboard)_api_v1_boxes_[id]_rename_route_actions_0mf3a9p.js +3 -0
  58. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0d1lmiq._.js +1 -1
  59. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0keu6we._.js +1 -1
  60. package/runtime/hub/apps/hub/.next/server/chunks/[root-of-the-server]__0szd4sh._.js +3 -0
  61. package/runtime/hub/apps/hub/.next/server/chunks/_0760z6y._.js +14 -14
  62. package/runtime/hub/apps/hub/.next/server/chunks/_0lgs9kd._.js +3 -0
  63. package/runtime/hub/apps/hub/.next/server/chunks/ssr/044u_hub__next-internal_server_app_(dashboard)_projects_[id]_page_actions_15f56np.js +1 -1
  64. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_09gdzmo._.js +1 -1
  65. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ozyjt1._.js +1 -1
  66. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0ro6vh6._.js +1 -1
  67. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_0tgpglr._.js +1 -1
  68. package/runtime/hub/apps/hub/.next/server/chunks/ssr/_1laion6._.js +1 -1
  69. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_boxes_[id]_page_actions_0k7kgn2.js +1 -1
  70. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub__next-internal_server_app_(dashboard)_page_actions_1t3u0xy.js +1 -1
  71. package/runtime/hub/apps/hub/.next/server/chunks/ssr/apps_hub_components_1z1p98f._.js +1 -1
  72. package/runtime/hub/apps/hub/.next/server/functions-config-manifest.json +1 -0
  73. package/runtime/hub/apps/hub/.next/server/middleware-build-manifest.js +3 -3
  74. package/runtime/hub/apps/hub/.next/server/pages/500.html +1 -1
  75. package/runtime/hub/apps/hub/.next/server/server-reference-manifest.js +1 -1
  76. package/runtime/hub/apps/hub/.next/server/server-reference-manifest.json +24 -0
  77. package/runtime/hub/apps/hub/.next/static/chunks/2xc1sm79a6tsb.js +1 -0
  78. package/runtime/hub/apps/hub/.next/static/chunks/332lo0ac7l2wv.js +1 -0
  79. package/runtime/hub/apps/hub/.next/static/chunks/3gdqmzzl34ilu.js +1 -0
  80. package/runtime/hub/apps/hub/.next/static/chunks/44exu5uemf-ev.js +1 -0
  81. package/runtime/hub/apps/hub/{auth-YBXDRLHG.js → auth-675P3LQS.js} +2 -2
  82. package/runtime/hub/apps/hub/{auth-config-LJGI76HI.js → auth-config-AOBEKRZQ.js} +2 -2
  83. package/runtime/hub/apps/hub/{chunk-OBKLTPIR.js → chunk-56YQBVN2.js} +1 -1
  84. package/runtime/hub/apps/hub/{chunk-LJG4CEGS.js → chunk-5XQ3T3W2.js} +274 -84
  85. package/runtime/hub/apps/hub/{chunk-JDA7BPPN.js → chunk-673QOHSR.js} +3 -3
  86. package/runtime/hub/apps/hub/{chunk-V5KGFHCF.js → chunk-7J6ZFTT4.js} +2 -2
  87. package/runtime/hub/apps/hub/{chunk-AKLBSCSZ.js → chunk-EXQCBM5Q.js} +8 -0
  88. package/runtime/hub/apps/hub/{dist-GGM4BUKM.js → dist-EI54M5DP.js} +4 -4
  89. package/runtime/hub/apps/hub/{dist-ELOY2IUE.js → dist-GCALYJN7.js} +3 -3
  90. package/runtime/hub/apps/hub/{dist-FDBOJ74K.js → dist-K7WHNDZB.js} +4 -4
  91. package/runtime/hub/apps/hub/{dist-CM4YAQLI.js → dist-LYTWBTUL.js} +4 -4
  92. package/runtime/hub/apps/hub/{dist-BF54UNHK.js → dist-MOCUH2OC.js} +4 -4
  93. package/runtime/hub/apps/hub/{dist-IENF7YOD.js → dist-STQK5XM6.js} +1 -1
  94. package/runtime/hub/apps/hub/{hub-token-EW32VDIU.js → hub-token-2BZFBBW3.js} +2 -2
  95. package/runtime/hub/apps/hub/{prepared-state-5FIGV4BE-FIXKBF5A.js → prepared-state-5FIGV4BE-D2HJEY2L.js} +1 -1
  96. package/runtime/hub/apps/hub/server.js +57 -16
  97. package/runtime/relay/bin.cjs +10 -0
  98. package/runtime/vercel/ctl.cjs +10 -0
  99. package/dist/chunk-ALEYDWAO.js.map +0 -1
  100. package/dist/chunk-GGWVTWJM.js.map +0 -1
  101. package/dist/chunk-VBSRJG53.js.map +0 -1
  102. package/runtime/hub/apps/hub/.next/static/chunks/0lq354ziiwxxl.js +0 -1
  103. package/runtime/hub/apps/hub/.next/static/chunks/11vmjdy3390ik.js +0 -1
  104. package/runtime/hub/apps/hub/.next/static/chunks/1svigjdfotduh.js +0 -1
  105. package/runtime/hub/apps/hub/.next/static/chunks/2d5e6t-5j4etp.js +0 -1
  106. /package/dist/{_cloud-attach-YH2SU75S.js.map → _cloud-attach-Y5WZ7F53.js.map} +0 -0
  107. /package/dist/{chunk-KBVD2UUQ.js.map → chunk-3KAWXDQ4.js.map} +0 -0
  108. /package/dist/{chunk-YZXXBHWG.js.map → chunk-5DZTXHLQ.js.map} +0 -0
  109. /package/dist/{chunk-O2NDZQHN.js.map → chunk-7HAGPF4X.js.map} +0 -0
  110. /package/dist/{chunk-O67ZESNL.js.map → chunk-AYNGC4Z5.js.map} +0 -0
  111. /package/dist/{chunk-CDEJ2GQK.js.map → chunk-S4OWE3UD.js.map} +0 -0
  112. /package/dist/{chunk-W2FLHB54.js.map → chunk-V2NCCC2B.js.map} +0 -0
  113. /package/dist/{dist-EJXUKIR7.js.map → dist-2BTJQUJS.js.map} +0 -0
  114. /package/dist/{dist-LJHS4PTC.js.map → dist-AN5NUXA5.js.map} +0 -0
  115. /package/dist/{dist-QBXEP4VY.js.map → dist-FNAGMTUI.js.map} +0 -0
  116. /package/dist/{dist-QNV4H6NN.js.map → dist-K5GASNBV.js.map} +0 -0
  117. /package/dist/{dist-UR2DB2HT.js.map → dist-SJRMFVRV.js.map} +0 -0
  118. /package/dist/{dist-YECTRVGD.js.map → dist-VOVN64Y2.js.map} +0 -0
  119. /package/dist/{prepared-state-5FIGV4BE-BMUK63FD.js.map → prepared-state-5FIGV4BE-WPHOEDA6.js.map} +0 -0
  120. /package/runtime/hub/apps/hub/.next/static/{TpPTWVdZDxqrPlONtJcR5 → zT1paOSXMJpAPsZ1dFK2V}/_buildManifest.js +0 -0
  121. /package/runtime/hub/apps/hub/.next/static/{TpPTWVdZDxqrPlONtJcR5 → zT1paOSXMJpAPsZ1dFK2V}/_clientMiddlewareManifest.js +0 -0
  122. /package/runtime/hub/apps/hub/.next/static/{TpPTWVdZDxqrPlONtJcR5 → zT1paOSXMJpAPsZ1dFK2V}/_ssgManifest.js +0 -0
package/CHANGELOG.md CHANGED
@@ -9,6 +9,43 @@ Entries are generated from the commit history with `/release-notes` and then
9
9
  hand-reviewed — they describe what changed for someone using the `agentbox`
10
10
  CLI, not the raw commits.
11
11
 
12
+ ## [0.22.2] - 2026-07-08
13
+
14
+ ### Added
15
+
16
+ - **Open a box in a host app: `agentbox open <box> --in codex|herdr|cmux|vscode|iterm2`.**
17
+ `codex` writes the box's SSH alias and auto-opens Codex's add-SSH-connection
18
+ form via its `codex://` deep link (persistent-SSH boxes, i.e. Hetzner — the
19
+ same link `shell --ssh-config` prints, now launched for you); `herdr`, `cmux`,
20
+ and `iterm2` open a new workspace/window in that terminal app running the box
21
+ attach (the box is auto-started, and a failed attach leaves a live shell);
22
+ `vscode` is equivalent to `agentbox code`. Plain `agentbox open` still opens
23
+ the workspace in Finder. `agentbox open --targets [--json]` reports which of
24
+ these apps are installed. cmux blocks external control by default — enable
25
+ `socketControlMode: automation` (or a socket password) in its settings.
26
+ - **Menu-bar app: per-box "Open In…" submenu** listing only the apps installed
27
+ on your machine (probed once at launch) and eligible for that box's provider;
28
+ "Copy Web URL" moved into it, keeping Open Web / Open VNC at the top level.
29
+ - **Rename a box** with `agentbox status <box> --set-name <name>` (or
30
+ `--clear-name`) — a cosmetic display label; the container, git branch, and
31
+ URLs are untouched, and box lookups accept the label. Shown in `list`, with a
32
+ Rename button in the hub (`POST /api/v1/boxes/:id/rename`) and a "Rename…"
33
+ item in the menu-bar app.
34
+ - **Update detection.** After you update the package yourself (`npm update -g`),
35
+ the next interactive command offers the post-update refresh (host skills, box
36
+ image, relay, menu-bar app). At most once a day a background probe checks for
37
+ a newer release and prints a nudge — disable with the new `update.check`
38
+ config key. `agentbox self-update` now also updates the menu-bar app (only
39
+ when the published build actually changed) and reports current vs latest.
40
+
41
+ ### Fixed
42
+
43
+ - Boxes created or resumed **through the hub** now get their `~/.agentbox/ssh/config`
44
+ entry too — hub-created Hetzner boxes were missing their `ssh <box>` alias.
45
+ - Non-interactive box creates (menu-bar app / hub queue, `--yes`, CI) now adopt
46
+ an already-running Portless proxy instead of silently skipping Portless on a
47
+ machine that never opted in from a terminal.
48
+
12
49
  ## [0.22.1] - 2026-07-07
13
50
 
14
51
  ### Added
@@ -4,10 +4,10 @@ import {
4
4
  cloudAgentAttach,
5
5
  cloudAgentStartDetached,
6
6
  verifyDetachedSession
7
- } from "./chunk-GGWVTWJM.js";
8
- import "./chunk-YZXXBHWG.js";
9
- import "./chunk-VBSRJG53.js";
10
- import "./chunk-ALEYDWAO.js";
7
+ } from "./chunk-BMCT3LBE.js";
8
+ import "./chunk-5DZTXHLQ.js";
9
+ import "./chunk-QT3SHMLY.js";
10
+ import "./chunk-ES2DDCAC.js";
11
11
  import "./chunk-G3H2L3O2.js";
12
12
  import "./chunk-WJFZJZIM.js";
13
13
  export {
@@ -16,4 +16,4 @@ export {
16
16
  cloudAgentStartDetached,
17
17
  verifyDetachedSession
18
18
  };
19
- //# sourceMappingURL=_cloud-attach-YH2SU75S.js.map
19
+ //# sourceMappingURL=_cloud-attach-Y5WZ7F53.js.map
@@ -8,7 +8,7 @@ import {
8
8
  renderInnerCommand,
9
9
  resolveCloudCheckpoint,
10
10
  writeCloudCheckpointManifest
11
- } from "./chunk-CDEJ2GQK.js";
11
+ } from "./chunk-S4OWE3UD.js";
12
12
  import {
13
13
  UserFacingError,
14
14
  claudeInstallFingerprint,
@@ -24,7 +24,7 @@ import {
24
24
  stageOpencodeStaticForUpload,
25
25
  writeManagedSecrets,
26
26
  writePreparedStateRaw
27
- } from "./chunk-ALEYDWAO.js";
27
+ } from "./chunk-ES2DDCAC.js";
28
28
 
29
29
  // ../../packages/sandbox-vercel/dist/chunk-6SDDZRAG.js
30
30
  import { existsSync, readFileSync } from "fs";
@@ -1651,4 +1651,4 @@ export {
1651
1651
  vercelProvider,
1652
1652
  providerModule
1653
1653
  };
1654
- //# sourceMappingURL=chunk-KBVD2UUQ.js.map
1654
+ //# sourceMappingURL=chunk-3KAWXDQ4.js.map
@@ -8,7 +8,7 @@ import {
8
8
  projectDirSegment,
9
9
  sanitizeMnemonic,
10
10
  setConfigValue
11
- } from "./chunk-VBSRJG53.js";
11
+ } from "./chunk-QT3SHMLY.js";
12
12
  import {
13
13
  AmbiguousBoxError,
14
14
  BOX_HOME,
@@ -58,7 +58,7 @@ import {
58
58
  seedAgentsVolume,
59
59
  setInstallMethodNative,
60
60
  trustWorkspace
61
- } from "./chunk-ALEYDWAO.js";
61
+ } from "./chunk-ES2DDCAC.js";
62
62
 
63
63
  // ../../packages/sandbox-docker/dist/index.js
64
64
  import { spawnSync } from "child_process";
@@ -9235,4 +9235,4 @@ export {
9235
9235
  browserSessionActive,
9236
9236
  ensureBoxBrowser
9237
9237
  };
9238
- //# sourceMappingURL=chunk-YZXXBHWG.js.map
9238
+ //# sourceMappingURL=chunk-5DZTXHLQ.js.map
@@ -9,7 +9,7 @@ import {
9
9
  resolveContextFilesFrom,
10
10
  writeManagedSecrets,
11
11
  writePreparedStateRaw
12
- } from "./chunk-ALEYDWAO.js";
12
+ } from "./chunk-ES2DDCAC.js";
13
13
 
14
14
  // ../../packages/sandbox-daytona/dist/chunk-6WHCUMQO.js
15
15
  import { existsSync } from "fs";
@@ -839,4 +839,4 @@ export {
839
839
  writePreparedDaytonaState,
840
840
  preparedMatches
841
841
  };
842
- //# sourceMappingURL=chunk-O2NDZQHN.js.map
842
+ //# sourceMappingURL=chunk-7HAGPF4X.js.map
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createCloudProvider
4
- } from "./chunk-CDEJ2GQK.js";
4
+ } from "./chunk-S4OWE3UD.js";
5
5
  import {
6
6
  detectPortless,
7
7
  portlessDoctorRow
8
- } from "./chunk-YZXXBHWG.js";
8
+ } from "./chunk-5DZTXHLQ.js";
9
9
  import {
10
10
  UserFacingError,
11
11
  claudeInstallFingerprint,
@@ -21,7 +21,7 @@ import {
21
21
  stageOpencodeStaticForUpload,
22
22
  writeManagedSecrets,
23
23
  writePreparedStateRaw
24
- } from "./chunk-ALEYDWAO.js";
24
+ } from "./chunk-ES2DDCAC.js";
25
25
 
26
26
  // ../../packages/sandbox-hetzner/dist/chunk-3ZWBEZND.js
27
27
  import { existsSync, readFileSync } from "fs";
@@ -2278,4 +2278,4 @@ export {
2278
2278
  hetznerProvider,
2279
2279
  providerModule
2280
2280
  };
2281
- //# sourceMappingURL=chunk-O67ZESNL.js.map
2281
+ //# sourceMappingURL=chunk-AYNGC4Z5.js.map
@@ -5,17 +5,17 @@ import {
5
5
  startClaudeSession,
6
6
  startCodexSession,
7
7
  startOpencodeSession
8
- } from "./chunk-YZXXBHWG.js";
8
+ } from "./chunk-5DZTXHLQ.js";
9
9
  import {
10
10
  PROVIDER_NAMES,
11
11
  isProviderKind,
12
12
  loadEffectiveConfig
13
- } from "./chunk-VBSRJG53.js";
13
+ } from "./chunk-QT3SHMLY.js";
14
14
  import {
15
15
  isSupportedApiVersion,
16
16
  pluginForProvider,
17
17
  pluginProviderNames
18
- } from "./chunk-ALEYDWAO.js";
18
+ } from "./chunk-ES2DDCAC.js";
19
19
 
20
20
  // src/commands/_cloud-attach.ts
21
21
  import { spawn as spawn4 } from "child_process";
@@ -153,11 +153,11 @@ async function withFirewallRepair(provider, box, opts, attempt) {
153
153
  // src/provider/loaders.ts
154
154
  import { pathToFileURL } from "url";
155
155
  var IMPORTERS = {
156
- docker: () => import("./dist-EJXUKIR7.js"),
157
- daytona: () => import("./dist-LJHS4PTC.js"),
158
- hetzner: () => import("./dist-YECTRVGD.js"),
159
- vercel: () => import("./dist-QNV4H6NN.js"),
160
- e2b: () => import("./dist-UR2DB2HT.js")
156
+ docker: () => import("./dist-FNAGMTUI.js"),
157
+ daytona: () => import("./dist-AN5NUXA5.js"),
158
+ hetzner: () => import("./dist-K5GASNBV.js"),
159
+ vercel: () => import("./dist-VOVN64Y2.js"),
160
+ e2b: () => import("./dist-SJRMFVRV.js")
161
161
  };
162
162
  function pickProviderModule(mod, name) {
163
163
  const m = mod;
@@ -385,6 +385,10 @@ function appleScriptEscape(s) {
385
385
  function shellJoin(argv) {
386
386
  return argv.map(shellQuote).join(" ");
387
387
  }
388
+ function composePaneCommand(argv, cwd, keepShell) {
389
+ const inner = shellJoin(argv);
390
+ return keepShell ? `cd ${shellQuote(cwd)} && ${inner}` : `cd ${shellQuote(cwd)} && exec ${inner}`;
391
+ }
388
392
  async function spawnInNewTerminal(args) {
389
393
  if (args.host === "tmux") return spawnInTmux(args);
390
394
  if (args.host === "cmux") return spawnInCmux(args);
@@ -431,7 +435,7 @@ async function spawnInCmux(args) {
431
435
  if (!args.cmuxWorkspaceFallback) {
432
436
  attempts.push([...base, "--focus", "true"]);
433
437
  }
434
- const cmdLine = `cd ${shellQuote(args.cwd)} && exec ${shellJoin(args.argv)}`;
438
+ const cmdLine = composePaneCommand(args.argv, args.cwd, args.keepShell);
435
439
  let lastError = "";
436
440
  for (const createArgv of attempts) {
437
441
  const created = await runQuiet(bin, createArgv, args.env);
@@ -537,7 +541,7 @@ async function spawnInHerdr(args) {
537
541
  if (!paneId) {
538
542
  return { launched: false, note: "", error: `herdr ${args.mode} gave no pane id` };
539
543
  }
540
- const text = `cd ${shellQuote(args.cwd)} && exec ${shellJoin(args.argv)}
544
+ const text = `${composePaneCommand(args.argv, args.cwd, args.keepShell)}
541
545
  `;
542
546
  const sent = await herdrRequest("pane.send_text", { pane_id: paneId, text }, env);
543
547
  if (sent === null) {
@@ -553,8 +557,7 @@ async function spawnInHerdr(args) {
553
557
  return { launched: true, note: `Attached in new ${noteKind}.` };
554
558
  }
555
559
  async function spawnInITerm2(args) {
556
- const inner = shellJoin(args.argv);
557
- const cmdLine = `cd ${shellQuote(args.cwd)} && exec ${inner}`;
560
+ const cmdLine = composePaneCommand(args.argv, args.cwd, args.keepShell);
558
561
  const cmdLit = `"${appleScriptEscape(cmdLine)}"`;
559
562
  let lines;
560
563
  let noteKind;
@@ -2752,4 +2755,4 @@ export {
2752
2755
  agentResumeArgs,
2753
2756
  restoreAgentSessions
2754
2757
  };
2755
- //# sourceMappingURL=chunk-GGWVTWJM.js.map
2758
+ //# sourceMappingURL=chunk-BMCT3LBE.js.map