wherdr 2.4.0 → 2.5.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 (256) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/1gzTzt3j.js +9 -0
  3. package/.output/public/_nuxt/1gzTzt3j.js.br +0 -0
  4. package/.output/public/_nuxt/1gzTzt3j.js.gz +0 -0
  5. package/.output/public/_nuxt/AgentView.B6zltno1.css +1 -0
  6. package/.output/public/_nuxt/AgentView.B6zltno1.css.br +0 -0
  7. package/.output/public/_nuxt/AgentView.B6zltno1.css.gz +0 -0
  8. package/.output/public/_nuxt/{CLf2i_DM.js → Bd0Z2zzq.js} +1 -1
  9. package/.output/public/_nuxt/BrxmYJEM.js +1 -0
  10. package/.output/public/_nuxt/BrxmYJEM.js.br +0 -0
  11. package/.output/public/_nuxt/BrxmYJEM.js.gz +0 -0
  12. package/.output/public/_nuxt/C6fXOTRV.js +3 -0
  13. package/.output/public/_nuxt/C6fXOTRV.js.br +0 -0
  14. package/.output/public/_nuxt/C6fXOTRV.js.gz +0 -0
  15. package/.output/public/_nuxt/{CPlkxpge.js → CXbAL3Yu.js} +43 -42
  16. package/.output/public/_nuxt/CXbAL3Yu.js.br +0 -0
  17. package/.output/public/_nuxt/CXbAL3Yu.js.gz +0 -0
  18. package/.output/public/_nuxt/Cf1C5Vkb.js +27 -0
  19. package/.output/public/_nuxt/Cf1C5Vkb.js.br +0 -0
  20. package/.output/public/_nuxt/Cf1C5Vkb.js.gz +0 -0
  21. package/.output/public/_nuxt/CmTpxyM2.js +62 -0
  22. package/.output/public/_nuxt/CmTpxyM2.js.br +0 -0
  23. package/.output/public/_nuxt/CmTpxyM2.js.gz +0 -0
  24. package/.output/public/_nuxt/{BDTOz37p.js → DMzjoyW_.js} +1 -1
  25. package/.output/public/_nuxt/DMzjoyW_.js.br +0 -0
  26. package/.output/public/_nuxt/DMzjoyW_.js.gz +0 -0
  27. package/.output/public/_nuxt/{B2KlcBQ-.js → DOVT2Tt8.js} +1 -1
  28. package/.output/public/_nuxt/DOVT2Tt8.js.br +0 -0
  29. package/.output/public/_nuxt/{B2KlcBQ-.js.gz → DOVT2Tt8.js.gz} +0 -0
  30. package/.output/public/_nuxt/PjGJWal8.js +23 -0
  31. package/.output/public/_nuxt/PjGJWal8.js.br +0 -0
  32. package/.output/public/_nuxt/PjGJWal8.js.gz +0 -0
  33. package/.output/public/_nuxt/WPcHpWhL.js +31 -0
  34. package/.output/public/_nuxt/WPcHpWhL.js.br +0 -0
  35. package/.output/public/_nuxt/WPcHpWhL.js.gz +0 -0
  36. package/.output/public/_nuxt/{board.fZYj3O-m.css → board.CpFnG_Ho.css} +1 -1
  37. package/.output/public/_nuxt/board.CpFnG_Ho.css.br +0 -0
  38. package/.output/public/_nuxt/board.CpFnG_Ho.css.gz +0 -0
  39. package/.output/public/_nuxt/builds/latest.json +1 -1
  40. package/.output/public/_nuxt/builds/meta/d4aab09d-c1c4-4743-b8aa-35541006e853.json +1 -0
  41. package/.output/public/_nuxt/entry.DosS87kQ.css +2 -0
  42. package/.output/public/_nuxt/entry.DosS87kQ.css.br +0 -0
  43. package/.output/public/_nuxt/entry.DosS87kQ.css.gz +0 -0
  44. package/.output/public/_nuxt/nfsDZG4P.js +123 -0
  45. package/.output/public/_nuxt/nfsDZG4P.js.br +0 -0
  46. package/.output/public/_nuxt/nfsDZG4P.js.gz +0 -0
  47. package/.output/public/_nuxt/{CV6ukk-M.js → qODuBH5E.js} +1 -1
  48. package/.output/public/_nuxt/{settings.Cdb21nNw.css → settings.ycbeituV.css} +1 -1
  49. package/.output/public/_nuxt/settings.ycbeituV.css.br +0 -0
  50. package/.output/public/_nuxt/settings.ycbeituV.css.gz +0 -0
  51. package/.output/public/_nuxt/tYQOxjM1.js +1 -0
  52. package/.output/public/_nuxt/tYQOxjM1.js.br +0 -0
  53. package/.output/public/_nuxt/tYQOxjM1.js.gz +0 -0
  54. package/.output/public/sw.js +1 -1
  55. package/.output/server/chunks/_/branding.mjs +1 -1
  56. package/.output/server/chunks/_/fileDownload.mjs +1 -1
  57. package/.output/server/chunks/_/machineOrder.mjs +1 -1
  58. package/.output/server/chunks/_/onboarding.mjs +1 -1
  59. package/.output/server/chunks/_/package.mjs +1 -1
  60. package/.output/server/chunks/_/plugins.mjs +1 -1
  61. package/.output/server/chunks/_/restart.mjs +1 -1
  62. package/.output/server/chunks/_/selfupdate.mjs +1 -1
  63. package/.output/server/chunks/_/splitShell.mjs +42 -0
  64. package/.output/server/chunks/_/updates.mjs +1 -1
  65. package/.output/server/chunks/_/worktrees.mjs +1 -1
  66. package/.output/server/chunks/_/ws.mjs +1 -1
  67. package/.output/server/chunks/nitro/nitro.mjs +14191 -13983
  68. package/.output/server/chunks/raw/check-leaks.mjs +1 -1
  69. package/.output/server/chunks/raw/ci-browser-plan.mjs +5 -0
  70. package/.output/server/chunks/raw/engine-changes.mjs +5 -0
  71. package/.output/server/chunks/raw/engine-result.mjs +7 -0
  72. package/.output/server/chunks/raw/prerelease.mjs +1 -1
  73. package/.output/server/chunks/raw/test-affected.mjs +1 -1
  74. package/.output/server/chunks/routes/api/_..._.mjs +3 -3
  75. package/.output/server/chunks/routes/api/agents.post.mjs +3 -3
  76. package/.output/server/chunks/routes/api/ask-tab.post.mjs +3 -3
  77. package/.output/server/chunks/routes/api/attach.post.mjs +3 -3
  78. package/.output/server/chunks/routes/api/auth/disable.post.mjs +3 -3
  79. package/.output/server/chunks/routes/api/auth/lock-all.post.mjs +3 -3
  80. package/.output/server/chunks/routes/api/auth/lock.post.mjs +3 -3
  81. package/.output/server/chunks/routes/api/auth/login/options.post.mjs +3 -3
  82. package/.output/server/chunks/routes/api/auth/login/verify.post.mjs +3 -3
  83. package/.output/server/chunks/routes/api/auth/max-session.post.mjs +3 -3
  84. package/.output/server/chunks/routes/api/auth/register/options.post.mjs +3 -3
  85. package/.output/server/chunks/routes/api/auth/register/verify.post.mjs +3 -3
  86. package/.output/server/chunks/routes/api/auth/status.get.mjs +3 -3
  87. package/.output/server/chunks/routes/api/changes.get.mjs +3 -3
  88. package/.output/server/chunks/routes/api/chat/image.get.mjs +3 -3
  89. package/.output/server/chunks/routes/api/chat.get.mjs +3 -3
  90. package/.output/server/chunks/routes/api/choose.post.mjs +3 -3
  91. package/.output/server/chunks/routes/api/claude-setup.post.mjs +3 -3
  92. package/.output/server/chunks/routes/api/claude-statusline.post.mjs +3 -3
  93. package/.output/server/chunks/routes/api/clear-queued-input.post.mjs +3 -3
  94. package/.output/server/chunks/routes/api/close/status.get.mjs +3 -3
  95. package/.output/server/chunks/routes/api/close-preview.get.mjs +62 -0
  96. package/.output/server/chunks/routes/api/close.post.mjs +3 -3
  97. package/.output/server/chunks/routes/api/codex-update.post.mjs +4 -4
  98. package/.output/server/chunks/routes/api/commands.get.mjs +4 -4
  99. package/.output/server/chunks/routes/api/config.get.mjs +4 -4
  100. package/.output/server/chunks/routes/api/dirs.get.mjs +4 -4
  101. package/.output/server/chunks/routes/api/dismiss-stopped.post.mjs +4 -4
  102. package/.output/server/chunks/routes/api/dismiss.post.mjs +4 -4
  103. package/.output/server/chunks/routes/api/effort.post.mjs +4 -4
  104. package/.output/server/chunks/routes/api/efforts.get.mjs +4 -4
  105. package/.output/server/chunks/routes/api/file.post.mjs +4 -4
  106. package/.output/server/chunks/routes/api/files/download.get.mjs +3 -3
  107. package/.output/server/chunks/routes/api/files/download.head.mjs +3 -3
  108. package/.output/server/chunks/routes/api/files/read.get.mjs +3 -3
  109. package/.output/server/chunks/routes/api/files.get.mjs +3 -3
  110. package/.output/server/chunks/routes/api/health.get.mjs +3 -3
  111. package/.output/server/chunks/routes/api/input.post.mjs +4 -4
  112. package/.output/server/chunks/routes/api/interrupt.post.mjs +4 -4
  113. package/.output/server/chunks/routes/api/isgit.get.mjs +4 -4
  114. package/.output/server/chunks/routes/api/machine/awake.get.mjs +3 -3
  115. package/.output/server/chunks/routes/api/machine/awake.post.mjs +3 -3
  116. package/.output/server/chunks/routes/api/machine/order.get.mjs +3 -3
  117. package/.output/server/chunks/routes/api/machine/order.post.mjs +3 -3
  118. package/.output/server/chunks/routes/api/machine/reconnect.post.mjs +4 -4
  119. package/.output/server/chunks/routes/api/machine/rename.post.mjs +4 -4
  120. package/.output/server/chunks/routes/api/machine/status.post.mjs +4 -4
  121. package/.output/server/chunks/routes/api/menu-left.post.mjs +4 -4
  122. package/.output/server/chunks/routes/api/menu.post.mjs +4 -4
  123. package/.output/server/chunks/routes/api/model.post.mjs +4 -4
  124. package/.output/server/chunks/routes/api/models.get.mjs +4 -4
  125. package/.output/server/chunks/routes/api/nav.post.mjs +4 -4
  126. package/.output/server/chunks/routes/api/onboarding.get.mjs +3 -3
  127. package/.output/server/chunks/routes/api/onboarding.post.mjs +3 -3
  128. package/.output/server/chunks/routes/api/phone.get.mjs +4 -4
  129. package/.output/server/chunks/routes/api/phone.post.mjs +4 -4
  130. package/.output/server/chunks/routes/api/plugins/actions.get.mjs +3 -3
  131. package/.output/server/chunks/routes/api/plugins/invoke.post.mjs +3 -3
  132. package/.output/server/chunks/routes/api/plugins/projects.get.mjs +4 -4
  133. package/.output/server/chunks/routes/api/plugins/projects.post.mjs +4 -4
  134. package/.output/server/chunks/routes/api/prompt.post.mjs +4 -4
  135. package/.output/server/chunks/routes/api/push/devices.post.mjs +49 -0
  136. package/.output/server/chunks/routes/api/push/quiet.post.mjs +4 -4
  137. package/.output/server/chunks/routes/api/push/subscribe.post.mjs +4 -4
  138. package/.output/server/chunks/routes/api/push/test.post.mjs +4 -4
  139. package/.output/server/chunks/routes/api/push/unsubscribe.post.mjs +4 -4
  140. package/.output/server/chunks/routes/api/quotas.get.mjs +4 -4
  141. package/.output/server/chunks/routes/api/rename.post.mjs +3 -3
  142. package/.output/server/chunks/routes/api/requeue.post.mjs +4 -4
  143. package/.output/server/chunks/routes/api/restart.get.mjs +3 -3
  144. package/.output/server/chunks/routes/api/restart.post.mjs +3 -3
  145. package/.output/server/chunks/routes/api/reveal.post.mjs +4 -4
  146. package/.output/server/chunks/routes/api/screen-key.post.mjs +4 -4
  147. package/.output/server/chunks/routes/api/screen.get.mjs +4 -4
  148. package/.output/server/chunks/routes/api/search.get.mjs +4 -4
  149. package/.output/server/chunks/routes/api/seen.post.mjs +4 -4
  150. package/.output/server/chunks/routes/api/send-now.post.mjs +4 -4
  151. package/.output/server/chunks/routes/api/sessions.get.mjs +4 -4
  152. package/.output/server/chunks/routes/api/sessions.post.mjs +4 -4
  153. package/.output/server/chunks/routes/api/settings-tab.post.mjs +4 -4
  154. package/.output/server/chunks/routes/api/settings.get.mjs +4 -4
  155. package/.output/server/chunks/routes/api/settings.post.mjs +4 -4
  156. package/.output/server/chunks/routes/api/space.post.mjs +4 -4
  157. package/.output/server/chunks/routes/api/split-command.post.mjs +7 -42
  158. package/.output/server/chunks/routes/api/state.get.mjs +4 -4
  159. package/.output/server/chunks/routes/api/tasks/action.post.mjs +4 -4
  160. package/.output/server/chunks/routes/api/tasks/add.post.mjs +4 -4
  161. package/.output/server/chunks/routes/api/tasks/after.post.mjs +4 -4
  162. package/.output/server/chunks/routes/api/tasks/approve.post.mjs +4 -4
  163. package/.output/server/chunks/routes/api/tasks/archive-done.post.mjs +4 -4
  164. package/.output/server/chunks/routes/api/tasks/archived.get.mjs +4 -4
  165. package/.output/server/chunks/routes/api/tasks/autopilot.get.mjs +4 -4
  166. package/.output/server/chunks/routes/api/tasks/autopilot.post.mjs +4 -4
  167. package/.output/server/chunks/routes/api/tasks/board-settings.get.mjs +4 -4
  168. package/.output/server/chunks/routes/api/tasks/board-settings.post.mjs +4 -4
  169. package/.output/server/chunks/routes/api/tasks/coordinator.get.mjs +4 -4
  170. package/.output/server/chunks/routes/api/tasks/coordinator.post.mjs +4 -4
  171. package/.output/server/chunks/routes/api/tasks/describe.post.mjs +4 -4
  172. package/.output/server/chunks/routes/api/tasks/details.get.mjs +4 -4
  173. package/.output/server/chunks/routes/api/tasks/limit.post.mjs +4 -4
  174. package/.output/server/chunks/routes/api/tasks/links.get.mjs +4 -4
  175. package/.output/server/chunks/routes/api/tasks/models.get.mjs +4 -4
  176. package/.output/server/chunks/routes/api/tasks/pick.post.mjs +4 -4
  177. package/.output/server/chunks/routes/api/tasks/project.get.mjs +4 -4
  178. package/.output/server/chunks/routes/api/tasks/project.post.mjs +4 -4
  179. package/.output/server/chunks/routes/api/tasks/question.post.mjs +4 -4
  180. package/.output/server/chunks/routes/api/tasks/scheduled.get.mjs +4 -4
  181. package/.output/server/chunks/routes/api/tasks/settings.get.mjs +4 -4
  182. package/.output/server/chunks/routes/api/tasks/start.get.mjs +4 -4
  183. package/.output/server/chunks/routes/api/tasks/tell.post.mjs +4 -4
  184. package/.output/server/chunks/routes/api/tasks.get.mjs +4 -4
  185. package/.output/server/chunks/routes/api/unqueue.post.mjs +4 -4
  186. package/.output/server/chunks/routes/api/update/status.get.mjs +3 -3
  187. package/.output/server/chunks/routes/api/update.get.mjs +3 -3
  188. package/.output/server/chunks/routes/api/update.post.mjs +3 -3
  189. package/.output/server/chunks/routes/api/upload.post.mjs +4 -4
  190. package/.output/server/chunks/routes/api/worktrees/remove.post.mjs +3 -3
  191. package/.output/server/chunks/routes/api/worktrees.get.mjs +3 -3
  192. package/.output/server/chunks/routes/favicon.ico.get.mjs +3 -3
  193. package/.output/server/chunks/routes/icons/_name_.get.mjs +4 -4
  194. package/.output/server/chunks/routes/renderer.mjs +5 -5
  195. package/.output/server/chunks/routes/uploads/_...name_.get.mjs +4 -4
  196. package/.output/server/chunks/routes/ws/_..._.mjs +4 -4
  197. package/.output/server/chunks/routes/ws/events.mjs +4 -4
  198. package/.output/server/chunks/routes/ws/term.mjs +4 -4
  199. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  200. package/.output/server/index.mjs +4 -4
  201. package/.output/server/package.json +1 -1
  202. package/docs/README.md +2 -0
  203. package/docs/RELEASING.md +27 -5
  204. package/docs/configuration.md +3 -4
  205. package/docs/conversation.md +2 -3
  206. package/docs/design.md +1 -1
  207. package/docs/devices.md +28 -0
  208. package/docs/notifications.md +7 -0
  209. package/docs/quotas.md +7 -1
  210. package/docs/release-notes-2.5.0.md +25 -0
  211. package/docs/security.md +7 -0
  212. package/package.json +1 -1
  213. package/skills/wherdr/SKILL.md +21 -0
  214. package/.output/public/_nuxt/AgentView.B12D6ccj.css +0 -1
  215. package/.output/public/_nuxt/AgentView.B12D6ccj.css.br +0 -0
  216. package/.output/public/_nuxt/AgentView.B12D6ccj.css.gz +0 -0
  217. package/.output/public/_nuxt/B2KlcBQ-.js.br +0 -0
  218. package/.output/public/_nuxt/BDTOz37p.js.br +0 -0
  219. package/.output/public/_nuxt/BDTOz37p.js.gz +0 -0
  220. package/.output/public/_nuxt/BGD5AamG.js +0 -25
  221. package/.output/public/_nuxt/BGD5AamG.js.br +0 -0
  222. package/.output/public/_nuxt/BGD5AamG.js.gz +0 -0
  223. package/.output/public/_nuxt/BxlzUs1i.js +0 -23
  224. package/.output/public/_nuxt/BxlzUs1i.js.br +0 -0
  225. package/.output/public/_nuxt/BxlzUs1i.js.gz +0 -0
  226. package/.output/public/_nuxt/C-BDzEtI.js +0 -3
  227. package/.output/public/_nuxt/C-BDzEtI.js.br +0 -0
  228. package/.output/public/_nuxt/C-BDzEtI.js.gz +0 -0
  229. package/.output/public/_nuxt/CO4sDeSt.js +0 -62
  230. package/.output/public/_nuxt/CO4sDeSt.js.br +0 -0
  231. package/.output/public/_nuxt/CO4sDeSt.js.gz +0 -0
  232. package/.output/public/_nuxt/CPlkxpge.js.br +0 -0
  233. package/.output/public/_nuxt/CPlkxpge.js.gz +0 -0
  234. package/.output/public/_nuxt/CTPNZj4T.js +0 -9
  235. package/.output/public/_nuxt/CTPNZj4T.js.br +0 -0
  236. package/.output/public/_nuxt/CTPNZj4T.js.gz +0 -0
  237. package/.output/public/_nuxt/CwurhZnh.js +0 -123
  238. package/.output/public/_nuxt/CwurhZnh.js.br +0 -0
  239. package/.output/public/_nuxt/CwurhZnh.js.gz +0 -0
  240. package/.output/public/_nuxt/D7fCPncR.js +0 -1
  241. package/.output/public/_nuxt/D7fCPncR.js.br +0 -0
  242. package/.output/public/_nuxt/D7fCPncR.js.gz +0 -0
  243. package/.output/public/_nuxt/DFe-cDm2.js +0 -1
  244. package/.output/public/_nuxt/DFe-cDm2.js.br +0 -0
  245. package/.output/public/_nuxt/DFe-cDm2.js.gz +0 -0
  246. package/.output/public/_nuxt/Dpe9TNcA.js +0 -31
  247. package/.output/public/_nuxt/Dpe9TNcA.js.br +0 -0
  248. package/.output/public/_nuxt/Dpe9TNcA.js.gz +0 -0
  249. package/.output/public/_nuxt/board.fZYj3O-m.css.br +0 -0
  250. package/.output/public/_nuxt/board.fZYj3O-m.css.gz +0 -0
  251. package/.output/public/_nuxt/builds/meta/75cc4ea7-3027-463a-aa3e-29e474ed7173.json +0 -1
  252. package/.output/public/_nuxt/entry.KNdllmoL.css +0 -2
  253. package/.output/public/_nuxt/entry.KNdllmoL.css.br +0 -0
  254. package/.output/public/_nuxt/entry.KNdllmoL.css.gz +0 -0
  255. package/.output/public/_nuxt/settings.Cdb21nNw.css.br +0 -0
  256. package/.output/public/_nuxt/settings.Cdb21nNw.css.gz +0 -0
@@ -1,6 +1,6 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
- import { aW as HOST_LABEL, aH as DATA_DIR } from '../nitro/nitro.mjs';
3
+ import { aY as HOST_LABEL, a2 as DATA_DIR } from '../nitro/nitro.mjs';
4
4
 
5
5
  const ONBOARDING_FILE = path.join(DATA_DIR, "onboarding.json");
6
6
  function readOnboarding(file = ONBOARDING_FILE, host = HOST_LABEL) {
@@ -1,5 +1,5 @@
1
1
  var name = "wherdr";
2
- var version = "2.4.0";
2
+ var version = "2.5.0";
3
3
  var license = "MIT";
4
4
  var type = "module";
5
5
  var description = "Unofficial mobile web client (PWA) to drive the coding agents running in Herdr";
@@ -1,4 +1,4 @@
1
- import { m as machineFor, aZ as herdrOn, H as HerdrError, f as findPane, a_ as splitId, a$ as getState, aa as log, X as sleep } from '../nitro/nitro.mjs';
1
+ import { m as machineFor, a$ as herdrOn, H as HerdrError, f as findPane, b0 as splitId, b1 as getState, ad as log, X as sleep } from '../nitro/nitro.mjs';
2
2
 
3
3
  const PLUGIN_ID_RE = /^[A-Za-z0-9.:_-]{1,100}$/;
4
4
  const ACTION_ID_RE = /^[A-Za-z0-9:_-]{1,100}$/;
@@ -1,4 +1,4 @@
1
- import { H as HerdrError, a3 as paneForeground, a4 as codexMenuOpen, a5 as stopAgent, a6 as terminalUpdateLine, a7 as waitFor, a8 as terminalUpdateDone, a9 as startAgent, X as sleep, f as findPane, T as restarts, aa as log, M as withPaneLock, ab as RESTARTABLE, y as transcripts, ac as claudeFooterMode, ad as planRestart, h as herdr, p as poll } from '../nitro/nitro.mjs';
1
+ import { H as HerdrError, a6 as paneForeground, a7 as codexMenuOpen, a8 as stopAgent, a9 as terminalUpdateLine, aa as waitFor, ab as terminalUpdateDone, ac as startAgent, X as sleep, f as findPane, T as restarts, ad as log, M as withPaneLock, ae as RESTARTABLE, y as transcripts, af as claudeFooterMode, ag as planRestart, h as herdr, p as poll } from '../nitro/nitro.mjs';
2
2
  import crypto from 'node:crypto';
3
3
 
4
4
  const TERM_UPDATE_MS = 10 * 6e4;
@@ -3,7 +3,7 @@ import fs from 'node:fs';
3
3
  import os from 'node:os';
4
4
  import path from 'node:path';
5
5
  import { p as pkg } from './package.mjs';
6
- import { cp as installMode, H as HerdrError, aa as log, cq as oneTapMode, ct as updateRunning } from '../nitro/nitro.mjs';
6
+ import { cr as installMode, H as HerdrError, ad as log, cs as oneTapMode, cv as updateRunning } from '../nitro/nitro.mjs';
7
7
  import { c as checkUpdate, R as REPO } from './updates.mjs';
8
8
 
9
9
  function wherdrDir(env = process.env) {
@@ -0,0 +1,42 @@
1
+ import fs from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ import { $ as getMachine, H as HerdrError, a2 as DATA_DIR, a3 as RemoteMachine, a4 as HERDR_BIN } from '../nitro/nitro.mjs';
4
+
5
+ const SPLIT_TERMINAL_TOKEN = "wherdr_split_terminal";
6
+ const SPLIT_PROMPT_TOKEN = "wherdr_split_prompt";
7
+ const quote = (s) => `'${s.replace(/'/g, `'\\''`)}'`;
8
+ function splitShellHooks(binary, session) {
9
+ const report = `${quote(binary)} --session ${quote(session)} pane report-metadata "$HERDR_PANE_ID" --source wherdr-split`;
10
+ const busy = `${report} --clear-token ${SPLIT_PROMPT_TOKEN} >/dev/null 2>&1`;
11
+ const ready = `${report} --token "${SPLIT_PROMPT_TOKEN}=$$" >/dev/null 2>&1`;
12
+ return {
13
+ bash: `if (( BASH_VERSINFO[0] > 4 || (BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] >= 4) )); then PS0=${quote(`$(${busy})`)}; ${ready}; fi`,
14
+ zsh: `_wherdr_split_busy() { ${busy}; }
15
+ _wherdr_split_ready() { ${ready}; }
16
+ preexec_functions+=(_wherdr_split_busy)
17
+ precmd_functions+=(_wherdr_split_ready)
18
+ `
19
+ };
20
+ }
21
+ async function prepareSplitShell(machine) {
22
+ const m = getMachine(machine);
23
+ if (!m) throw new HerdrError("bad_machine", "Unknown machine");
24
+ const dir = m.local ? path.join(DATA_DIR, "split-shell") : path.posix.join(m.home, ".cache/herdr-web/split-shell");
25
+ const hooks = splitShellHooks(m instanceof RemoteMachine ? m.bin : HERDR_BIN, m.session);
26
+ const zshenv = 'unset ZDOTDIR\n[[ -f "$HOME/.zshenv" ]] && source "$HOME/.zshenv"\nexport WHERDR_SPLIT_USER_ZDOTDIR=${ZDOTDIR:-$HOME}\nexport ZDOTDIR=$WHERDR_SPLIT_BOOTSTRAP\n';
27
+ const zprofile = 'ZDOTDIR=$WHERDR_SPLIT_USER_ZDOTDIR\n[[ -f "$ZDOTDIR/.zprofile" ]] && source "$ZDOTDIR/.zprofile"\nexport WHERDR_SPLIT_USER_ZDOTDIR=${ZDOTDIR:-$HOME}\nexport ZDOTDIR=$WHERDR_SPLIT_BOOTSTRAP\n';
28
+ const zshrc = 'ZDOTDIR=$WHERDR_SPLIT_USER_ZDOTDIR\n[[ -f "$ZDOTDIR/.zshrc" ]] && source "$ZDOTDIR/.zshrc"\n' + hooks.zsh;
29
+ if (m.exec) {
30
+ const r = await m.exec('umask 077; mkdir -p "$1" && printf %s "$2" > "$1/.zshenv" && printf %s "$3" > "$1/.zshrc" && printf %s "$4" > "$1/.zprofile"', [dir, zshenv, zshrc, zprofile], { timeoutMs: 5e3 });
31
+ if (r.code !== 0) throw new HerdrError("split_failed", "Could not prepare the split terminal. No command was sent.");
32
+ } else {
33
+ await fs.mkdir(dir, { recursive: true, mode: 448 });
34
+ await fs.writeFile(path.join(dir, ".zshenv"), zshenv, { mode: 384 });
35
+ await fs.writeFile(path.join(dir, ".zshrc"), zshrc, { mode: 384 });
36
+ await fs.writeFile(path.join(dir, ".zprofile"), zprofile, { mode: 384 });
37
+ }
38
+ return { PROMPT_COMMAND: hooks.bash, ZDOTDIR: dir, WHERDR_SPLIT_BOOTSTRAP: dir };
39
+ }
40
+
41
+ export { SPLIT_PROMPT_TOKEN as S, SPLIT_TERMINAL_TOKEN as a, prepareSplitShell as p };
42
+ //# sourceMappingURL=splitShell.mjs.map
@@ -1,5 +1,5 @@
1
1
  import { p as pkg } from './package.mjs';
2
- import { cp as installMode, cq as oneTapMode, cr as updateCommand, cs as compareVersions } from '../nitro/nitro.mjs';
2
+ import { cr as installMode, cs as oneTapMode, ct as updateCommand, cu as compareVersions } from '../nitro/nitro.mjs';
3
3
 
4
4
  const REPO = "afloury/wherdr";
5
5
  const RELEASES_URL = `https://api.github.com/repos/${REPO}/releases?per_page=100`;
@@ -1,4 +1,4 @@
1
- import { cu as allMachines, $ as getMachine, H as HerdrError, a_ as splitId, aZ as herdrOn, p as poll, an as recentDirs, bY as joinId, a$ as getState } from '../nitro/nitro.mjs';
1
+ import { cw as allMachines, $ as getMachine, H as HerdrError, b0 as splitId, a$ as herdrOn, p as poll, aq as recentDirs, b_ as joinId, b1 as getState } from '../nitro/nitro.mjs';
2
2
 
3
3
  const opts = { trust_repository: true };
4
4
  async function machineWorktrees(m) {
@@ -1,4 +1,4 @@
1
- import { cC as networkReady, cD as ensureFresh, cE as gateDecision, cF as sameOrigin, cG as hostAllowed, k as auth, cH as checkRequestClient, cI as onNetworkReading } from '../nitro/nitro.mjs';
1
+ import { cE as networkReady, cF as ensureFresh, cG as gateDecision, cH as sameOrigin, cI as hostAllowed, k as auth, cJ as checkRequestClient, cK as onNetworkReading } from '../nitro/nitro.mjs';
2
2
 
3
3
  var _a, _b;
4
4
  const WS_MAX = 256 * 1024;