wherdr 1.3.4 → 2.0.1

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 (243) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/072bjdot.js +2 -0
  3. package/.output/public/_nuxt/8FAMamJX.js +1 -0
  4. package/.output/public/_nuxt/{AgentView.DzFWBd2A.css → AgentView.CfD2RWZY.css} +1 -1
  5. package/.output/public/_nuxt/BDNMzG2s.js +1 -0
  6. package/.output/public/_nuxt/BX8KVYfd.js +1 -0
  7. package/.output/public/_nuxt/{CJKsMzIp.js → BYZVrreW.js} +1 -1
  8. package/.output/public/_nuxt/C2aT0CgA.js +62 -0
  9. package/.output/public/_nuxt/CanLPS0U.js +105 -0
  10. package/.output/public/_nuxt/DGXKTg7D.js +31 -0
  11. package/.output/public/_nuxt/{DMLmW6JM.js → DOsw6KCR.js} +41 -42
  12. package/.output/public/_nuxt/DTiR5P9E.js +25 -0
  13. package/.output/public/_nuxt/{w7Rm7unj.js → DYKfeNM-.js} +1 -1
  14. package/.output/public/_nuxt/DZ7VvF3e.js +1 -0
  15. package/.output/public/_nuxt/DZGKxROq.js +6 -0
  16. package/.output/public/_nuxt/DeLLm2j1.js +23 -0
  17. package/.output/public/_nuxt/DumNBIyF.js +1 -0
  18. package/.output/public/_nuxt/ScQ9FtVj.js +1 -0
  19. package/.output/public/_nuxt/TS7GZUPU.js +9 -0
  20. package/.output/public/_nuxt/board.DK5EU4sL.css +1 -0
  21. package/.output/public/_nuxt/builds/latest.json +1 -1
  22. package/.output/public/_nuxt/builds/meta/b6ed1ddd-d6d6-4137-beab-2548b20dd998.json +1 -0
  23. package/.output/public/_nuxt/entry.BhiYrGAW.css +2 -0
  24. package/.output/public/_nuxt/settings.Cdb21nNw.css +1 -0
  25. package/.output/public/sw.js +1 -1
  26. package/.output/server/chunks/_/branding.mjs +1 -1
  27. package/.output/server/chunks/_/changes.mjs +4 -4
  28. package/.output/server/chunks/_/fileDownload.mjs +278 -0
  29. package/.output/server/chunks/_/files.mjs +44 -17
  30. package/.output/server/chunks/_/machineOrder.mjs +1 -1
  31. package/.output/server/chunks/_/onboarding.mjs +1 -1
  32. package/.output/server/chunks/_/package.mjs +9 -3
  33. package/.output/server/chunks/_/plugins.mjs +92 -125
  34. package/.output/server/chunks/_/restart.mjs +1 -1
  35. package/.output/server/chunks/_/selfupdate.mjs +1 -1
  36. package/.output/server/chunks/_/updates.mjs +1 -1
  37. package/.output/server/chunks/_/worktrees.mjs +1 -1
  38. package/.output/server/chunks/_/ws.mjs +43 -6
  39. package/.output/server/chunks/nitro/nitro.mjs +14073 -10658
  40. package/.output/server/chunks/raw/check-doc-links.mjs +5 -0
  41. package/.output/server/chunks/raw/check-leaks.mjs +1 -1
  42. package/.output/server/chunks/raw/check-release-notes.mjs +5 -0
  43. package/.output/server/chunks/raw/herdr-plugin.mjs +1 -1
  44. package/.output/server/chunks/raw/install-claude-statusline.mjs +1 -1
  45. package/.output/server/chunks/raw/prerelease-summary.mjs +5 -0
  46. package/.output/server/chunks/raw/prerelease.mjs +7 -0
  47. package/.output/server/chunks/raw/reveal.mjs +1 -1
  48. package/.output/server/chunks/raw/test-affected.mjs +5 -0
  49. package/.output/server/chunks/routes/api/_..._.mjs +6 -5
  50. package/.output/server/chunks/routes/api/agents.post.mjs +6 -5
  51. package/.output/server/chunks/routes/api/ask-tab.post.mjs +6 -5
  52. package/.output/server/chunks/routes/api/attach.post.mjs +6 -5
  53. package/.output/server/chunks/routes/api/auth/disable.post.mjs +6 -5
  54. package/.output/server/chunks/routes/api/auth/lock-all.post.mjs +6 -5
  55. package/.output/server/chunks/routes/api/auth/lock.post.mjs +6 -5
  56. package/.output/server/chunks/routes/api/auth/login/options.post.mjs +6 -5
  57. package/.output/server/chunks/routes/api/auth/login/verify.post.mjs +6 -5
  58. package/.output/server/chunks/routes/api/auth/max-session.post.mjs +6 -5
  59. package/.output/server/chunks/routes/api/auth/register/options.post.mjs +6 -5
  60. package/.output/server/chunks/routes/api/auth/register/verify.post.mjs +6 -5
  61. package/.output/server/chunks/routes/api/auth/status.get.mjs +6 -5
  62. package/.output/server/chunks/routes/api/changes.get.mjs +7 -6
  63. package/.output/server/chunks/routes/api/chat/image.get.mjs +7 -6
  64. package/.output/server/chunks/routes/api/chat.get.mjs +20 -7
  65. package/.output/server/chunks/routes/api/choose.post.mjs +31 -17
  66. package/.output/server/chunks/routes/api/claude-setup.post.mjs +42 -0
  67. package/.output/server/chunks/routes/api/claude-statusline.post.mjs +7 -6
  68. package/.output/server/chunks/routes/api/clear-queued-input.post.mjs +42 -0
  69. package/.output/server/chunks/routes/api/close/status.get.mjs +7 -6
  70. package/.output/server/chunks/routes/api/close.post.mjs +6 -5
  71. package/.output/server/chunks/routes/api/codex-update.post.mjs +7 -6
  72. package/.output/server/chunks/routes/api/commands.get.mjs +7 -6
  73. package/.output/server/chunks/routes/api/config.get.mjs +10 -13
  74. package/.output/server/chunks/routes/api/dirs.get.mjs +7 -6
  75. package/.output/server/chunks/routes/api/dismiss-stopped.post.mjs +7 -6
  76. package/.output/server/chunks/routes/api/dismiss.post.mjs +7 -6
  77. package/.output/server/chunks/routes/api/effort.post.mjs +7 -6
  78. package/.output/server/chunks/routes/api/efforts.get.mjs +7 -6
  79. package/.output/server/chunks/routes/api/file.post.mjs +7 -6
  80. package/.output/server/chunks/routes/api/files/download.get.mjs +12 -31
  81. package/.output/server/chunks/routes/api/files/download.head.mjs +41 -0
  82. package/.output/server/chunks/routes/api/files/read.get.mjs +8 -7
  83. package/.output/server/chunks/routes/api/files.get.mjs +7 -6
  84. package/.output/server/chunks/routes/api/health.get.mjs +6 -5
  85. package/.output/server/chunks/routes/api/input.post.mjs +7 -6
  86. package/.output/server/chunks/routes/api/interrupt.post.mjs +24 -21
  87. package/.output/server/chunks/routes/api/isgit.get.mjs +8 -8
  88. package/.output/server/chunks/routes/api/machine/awake.get.mjs +7 -6
  89. package/.output/server/chunks/routes/api/machine/awake.post.mjs +7 -6
  90. package/.output/server/chunks/routes/api/machine/order.get.mjs +6 -5
  91. package/.output/server/chunks/routes/api/machine/order.post.mjs +6 -5
  92. package/.output/server/chunks/routes/api/machine/reconnect.post.mjs +40 -0
  93. package/.output/server/chunks/routes/api/machine/rename.post.mjs +7 -6
  94. package/.output/server/chunks/routes/api/machine/status.post.mjs +39 -0
  95. package/.output/server/chunks/routes/api/menu-left.post.mjs +40 -0
  96. package/.output/server/chunks/routes/api/menu.post.mjs +7 -6
  97. package/.output/server/chunks/routes/api/model.post.mjs +7 -6
  98. package/.output/server/chunks/routes/api/models.get.mjs +7 -6
  99. package/.output/server/chunks/routes/api/nav.post.mjs +7 -6
  100. package/.output/server/chunks/routes/api/onboarding.get.mjs +6 -5
  101. package/.output/server/chunks/routes/api/onboarding.post.mjs +6 -5
  102. package/.output/server/chunks/routes/api/phone.get.mjs +8 -10
  103. package/.output/server/chunks/routes/api/phone.post.mjs +8 -10
  104. package/.output/server/chunks/routes/api/plugins/actions.get.mjs +6 -10
  105. package/.output/server/chunks/routes/api/plugins/invoke.post.mjs +6 -10
  106. package/.output/server/chunks/routes/api/plugins/projects.get.mjs +10 -9
  107. package/.output/server/chunks/routes/api/plugins/projects.post.mjs +11 -8
  108. package/.output/server/chunks/routes/api/prompt.post.mjs +22 -13
  109. package/.output/server/chunks/routes/api/push/quiet.post.mjs +7 -6
  110. package/.output/server/chunks/routes/api/push/subscribe.post.mjs +7 -7
  111. package/.output/server/chunks/routes/api/push/test.post.mjs +7 -6
  112. package/.output/server/chunks/routes/api/push/unsubscribe.post.mjs +7 -6
  113. package/.output/server/chunks/routes/api/quotas.get.mjs +7 -6
  114. package/.output/server/chunks/routes/api/rename.post.mjs +6 -5
  115. package/.output/server/chunks/routes/api/requeue.post.mjs +7 -6
  116. package/.output/server/chunks/routes/api/restart.get.mjs +6 -5
  117. package/.output/server/chunks/routes/api/restart.post.mjs +6 -5
  118. package/.output/server/chunks/routes/api/reveal.post.mjs +91 -8
  119. package/.output/server/chunks/routes/api/screen-key.post.mjs +7 -6
  120. package/.output/server/chunks/routes/api/screen.get.mjs +7 -6
  121. package/.output/server/chunks/routes/api/search.get.mjs +7 -6
  122. package/.output/server/chunks/routes/api/seen.post.mjs +7 -6
  123. package/.output/server/chunks/routes/api/sessions.get.mjs +7 -6
  124. package/.output/server/chunks/routes/api/sessions.post.mjs +7 -6
  125. package/.output/server/chunks/routes/api/settings-tab.post.mjs +7 -6
  126. package/.output/server/chunks/routes/api/{plugins/thread-limits.get.mjs → settings.get.mjs} +10 -9
  127. package/.output/server/chunks/routes/api/settings.post.mjs +40 -0
  128. package/.output/server/chunks/routes/api/space.post.mjs +34 -18
  129. package/.output/server/chunks/routes/api/state.get.mjs +7 -6
  130. package/.output/server/chunks/routes/api/tasks/action.post.mjs +39 -0
  131. package/.output/server/chunks/routes/api/{plugins/profiles.get.mjs → tasks/add.post.mjs} +12 -16
  132. package/.output/server/chunks/routes/api/tasks/after.post.mjs +39 -0
  133. package/.output/server/chunks/routes/api/tasks/approve.post.mjs +39 -0
  134. package/.output/server/chunks/routes/api/{project/report.get.mjs → tasks/archived.get.mjs} +12 -14
  135. package/.output/server/chunks/routes/api/{index.get.mjs → tasks/autopilot.get.mjs} +13 -14
  136. package/.output/server/chunks/routes/api/tasks/autopilot.post.mjs +39 -0
  137. package/.output/server/chunks/routes/api/{gitroot.get.mjs → tasks/board-settings.get.mjs} +12 -14
  138. package/.output/server/chunks/routes/api/tasks/board-settings.post.mjs +39 -0
  139. package/.output/server/chunks/routes/api/tasks/coordinator.get.mjs +40 -0
  140. package/.output/server/chunks/routes/api/tasks/coordinator.post.mjs +39 -0
  141. package/.output/server/chunks/routes/api/tasks/details.get.mjs +40 -0
  142. package/.output/server/chunks/routes/api/tasks/limit.post.mjs +39 -0
  143. package/.output/server/chunks/routes/api/tasks/links.get.mjs +39 -0
  144. package/.output/server/chunks/routes/api/tasks/models.get.mjs +40 -0
  145. package/.output/server/chunks/routes/api/tasks/pick.post.mjs +39 -0
  146. package/.output/server/chunks/routes/api/tasks/question.post.mjs +39 -0
  147. package/.output/server/chunks/routes/api/tasks/scheduled.get.mjs +40 -0
  148. package/.output/server/chunks/routes/api/{project → tasks}/settings.get.mjs +10 -12
  149. package/.output/server/chunks/routes/api/tasks/start.get.mjs +40 -0
  150. package/.output/server/chunks/routes/api/tasks/tell.post.mjs +39 -0
  151. package/.output/server/chunks/routes/api/tasks.get.mjs +39 -0
  152. package/.output/server/chunks/routes/api/unqueue.post.mjs +7 -6
  153. package/.output/server/chunks/routes/api/update/status.get.mjs +6 -5
  154. package/.output/server/chunks/routes/api/update.get.mjs +8 -10
  155. package/.output/server/chunks/routes/api/update.post.mjs +8 -10
  156. package/.output/server/chunks/routes/api/upload.post.mjs +7 -6
  157. package/.output/server/chunks/routes/api/worktrees/remove.post.mjs +6 -5
  158. package/.output/server/chunks/routes/api/worktrees.get.mjs +6 -5
  159. package/.output/server/chunks/routes/favicon.ico.get.mjs +6 -5
  160. package/.output/server/chunks/routes/icons/_name_.get.mjs +7 -6
  161. package/.output/server/chunks/routes/renderer.mjs +8 -7
  162. package/.output/server/chunks/routes/uploads/_...name_.get.mjs +7 -6
  163. package/.output/server/chunks/routes/ws/_..._.mjs +7 -6
  164. package/.output/server/chunks/routes/ws/events.mjs +9 -7
  165. package/.output/server/chunks/routes/ws/term.mjs +7 -6
  166. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  167. package/.output/server/index.mjs +7 -6
  168. package/.output/server/package.json +1 -1
  169. package/README.md +44 -1445
  170. package/bin/lib/commands.mjs +44 -9
  171. package/bin/lib/panel.mjs +3 -11
  172. package/bin/lib/service.mjs +41 -2
  173. package/bin/lib/skill.mjs +1 -1
  174. package/bin/lib/tailnet.d.mts +6 -3
  175. package/bin/lib/tailnet.mjs +70 -32
  176. package/bin/lib/userpath.d.mts +14 -0
  177. package/bin/lib/userpath.mjs +142 -0
  178. package/docs/README.md +58 -0
  179. package/docs/RELEASING.md +174 -0
  180. package/docs/board.md +169 -0
  181. package/docs/command.md +58 -0
  182. package/docs/configuration.md +39 -0
  183. package/docs/conversation.md +132 -0
  184. package/docs/development.md +38 -0
  185. package/docs/devices.md +58 -0
  186. package/docs/files.md +29 -0
  187. package/docs/herdr-projects-1x.md +278 -0
  188. package/docs/home.md +52 -0
  189. package/docs/installation.md +174 -0
  190. package/docs/machines.md +74 -0
  191. package/docs/migrate-from-1.x-docker.md +160 -0
  192. package/docs/networks.md +154 -0
  193. package/docs/notifications.md +83 -0
  194. package/docs/overview.md +71 -0
  195. package/docs/phone.md +26 -0
  196. package/docs/plugins.md +109 -0
  197. package/docs/quick-start.md +89 -0
  198. package/docs/quotas.md +65 -0
  199. package/docs/release-notes-2.0.0.md +84 -0
  200. package/docs/security.md +117 -0
  201. package/docs/terminal.md +15 -0
  202. package/docs/troubleshooting.md +45 -0
  203. package/package.json +9 -3
  204. package/skills/wherdr/SKILL.md +24 -173
  205. package/.output/public/_nuxt/BEJHMUrj.js +0 -1
  206. package/.output/public/_nuxt/BOtcEDnA.js +0 -1
  207. package/.output/public/_nuxt/BUaYhQ2r.js +0 -6
  208. package/.output/public/_nuxt/CJNhn9sA.js +0 -36
  209. package/.output/public/_nuxt/COCvtdHN.js +0 -89
  210. package/.output/public/_nuxt/Cl45J6_Q.js +0 -1
  211. package/.output/public/_nuxt/CndPDbMI.js +0 -2
  212. package/.output/public/_nuxt/Ctbx58Um.js +0 -23
  213. package/.output/public/_nuxt/Dl1PHLOB.js +0 -1
  214. package/.output/public/_nuxt/Nhex3_iH.js +0 -1
  215. package/.output/public/_nuxt/OpWX45i7.js +0 -89
  216. package/.output/public/_nuxt/builds/meta/4994f3a4-4126-4f57-a9e5-c7ebb25850bc.json +0 -1
  217. package/.output/public/_nuxt/dTj21DMs.js +0 -1
  218. package/.output/public/_nuxt/entry.BohTWE-n.css +0 -2
  219. package/.output/public/_nuxt/kwSoIiM7.js +0 -1
  220. package/.output/public/_nuxt/mkEwYka4.js +0 -1
  221. package/.output/server/chunks/_/pluginPolicy.mjs +0 -93
  222. package/.output/server/chunks/_/projectBoard.mjs +0 -363
  223. package/.output/server/chunks/_/projectDocs.mjs +0 -106
  224. package/.output/server/chunks/_/projectInbox.mjs +0 -135
  225. package/.output/server/chunks/_/projectThreads.mjs +0 -46
  226. package/.output/server/chunks/_/projectThreads2.mjs +0 -61
  227. package/.output/server/chunks/_/projectsActions.mjs +0 -143
  228. package/.output/server/chunks/_/projectsPlugin.mjs +0 -30
  229. package/.output/server/chunks/_/projectsPlugin2.mjs +0 -57
  230. package/.output/server/chunks/_/reveal.mjs +0 -115
  231. package/.output/server/chunks/raw/dev.wherdr.open.mjs +0 -7
  232. package/.output/server/chunks/raw/docker-entrypoint.mjs +0 -7
  233. package/.output/server/chunks/raw/install-host-open.mjs +0 -7
  234. package/.output/server/chunks/raw/wherdr-open.mjs +0 -7
  235. package/.output/server/chunks/routes/api/board.get.mjs +0 -148
  236. package/.output/server/chunks/routes/api/plugins/thread-limits.post.mjs +0 -45
  237. package/.output/server/chunks/routes/api/project/inbox.get.mjs +0 -44
  238. package/.output/server/chunks/routes/api/project/inbox.post.mjs +0 -44
  239. package/.output/server/chunks/routes/api/project/memory.get.mjs +0 -43
  240. package/.output/server/chunks/routes/api/project/routines.get.mjs +0 -44
  241. package/.output/server/chunks/routes/api/project/thread.get.mjs +0 -45
  242. package/.output/server/chunks/routes/api/project/thread.post.mjs +0 -47
  243. package/bin/install-docker-skill.sh +0 -20
@@ -1,4 +1,4 @@
1
- import { a as defineApi, P as PANE_RE, H as HerdrError, b9 as closeTrailingMention, aJ as isSlashCommand, ba as keepPastes, Z as restarting, aK as addQueued, p as poll, X as withPaneLock, f as findPane, aC as closePanel, ag as log, bb as hasHeld, bc as INPUT_STATES, h as herdr, bd as inputVisible, be as shouldHold, bf as sendPrompt, bg as agentPrompt, bh as isBusyError, bi as HOLD_AGENTS, bj as pendingPrompts, e as watchScreen } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, P as PANE_RE, b4 as promptOnce, H as HerdrError, b5 as closeTrailingMention, az as isSlashCommand, b6 as keepPastes, O as restarting, aA as addQueued, p as poll, M as withPaneLock, f as findPane, ar as closePanel, aa as log, b7 as hasHeld, b8 as INPUT_STATES, h as herdr, b9 as inputVisible, ba as shouldHold, bb as inTurn, bc as sendPrompt, bd as agentPrompt, be as isBusyError, bf as HOLD_AGENTS, bg as pendingPrompts, e as watchScreen } from '../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -16,20 +16,27 @@ import 'node:events';
16
16
  import 'node:buffer';
17
17
  import 'node:fs';
18
18
  import 'node:path';
19
- import 'web-push';
20
19
  import 'node:os';
21
- import 'node:child_process';
22
20
  import 'node:net';
23
- import 'node:fs/promises';
24
- import 'node:readline';
21
+ import 'node:child_process';
25
22
  import 'node:dns';
26
23
  import 'node:util';
24
+ import 'web-push';
25
+ import 'node:string_decoder';
26
+ import 'node:fs/promises';
27
+ import 'node:readline';
27
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
28
29
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
29
- import '@simplewebauthn/server';
30
30
  import 'node:url';
31
+ import '@simplewebauthn/server';
31
32
 
32
33
  const prompt_post = defineApi(async (event, b) => {
34
+ if (typeof b.client_id === "string" && /^w-[a-z0-9]{1,32}$/.test(b.client_id) && PANE_RE.test(b.pane_id || "")) {
35
+ return promptOnce(b.pane_id, b.client_id, String(b.text || ""), async () => await submitPrompt(event, b));
36
+ }
37
+ return submitPrompt(event, b);
38
+ });
39
+ const submitPrompt = async (event, b) => {
33
40
  if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
34
41
  const text = closeTrailingMention(String(b.text || ""));
35
42
  if (!text.trim()) throw new HerdrError("empty", "Empty message");
@@ -64,24 +71,26 @@ const prompt_post = defineApi(async (event, b) => {
64
71
  const earlier = hasHeld(b.pane_id);
65
72
  const input = earlier || !INPUT_STATES.has(p.status || "") ? true : await herdr("pane.read", { pane_id: b.pane_id, source: "detection" }, 4e3).then((r) => inputVisible(r.read && r.read.text), () => true);
66
73
  if (shouldHold(p.agent, p.status, input, earlier)) {
67
- const q2 = addQueued(b.pane_id, text, { held: true, id });
74
+ const q2 = addQueued(b.pane_id, text, { held: true, id, turn: inTurn(b.pane_id) });
68
75
  log(`prompt ${b.pane_id}: input field hidden, message held`);
69
76
  setTimeout(poll, 50);
70
77
  return { ok: true, queued: q2 };
71
78
  }
72
79
  }
80
+ const typedAt = Date.now();
73
81
  try {
74
82
  if (p) await sendPrompt(p, text);
75
83
  else await agentPrompt(b.pane_id, text);
76
84
  } catch (e) {
77
- if (isBusyError(e) && !isSlashCommand(text)) {
78
- const q2 = addQueued(b.pane_id, text, { held: true, busy: e.code === "input_busy", id });
85
+ const typed = e.typed ? typedAt : void 0;
86
+ if (isBusyError(e) && !e.typed && !isSlashCommand(text)) {
87
+ const q2 = addQueued(b.pane_id, text, { held: true, busy: e.code === "input_busy", id, typedAt: typed, turn: inTurn(b.pane_id) });
79
88
  log(`prompt ${b.pane_id}: input field not free, message held`);
80
89
  setTimeout(poll, 50);
81
90
  return { ok: true, queued: q2 };
82
91
  }
83
- if (e instanceof HerdrError && ["not_shown", "not_submitted", "clear_failed", "input_contended", "bash_mode"].includes(e.code) && !isSlashCommand(text)) {
84
- const q2 = addQueued(b.pane_id, text, { failed: true, id });
92
+ if (e instanceof HerdrError && ["not_shown", "not_submitted", "clear_failed", "input_contended", "bash_mode", "no_input", "input_busy"].includes(e.code) && !isSlashCommand(text)) {
93
+ const q2 = addQueued(b.pane_id, text, { failed: true, id, typedAt: typed });
85
94
  log(`prompt ${b.pane_id}: ${e.message}, message kept as not sent`);
86
95
  setTimeout(poll, 50);
87
96
  return { ok: true, queued: q2 };
@@ -101,10 +110,10 @@ const prompt_post = defineApi(async (event, b) => {
101
110
  setTimeout(poll, 1500);
102
111
  return { ok: true };
103
112
  }
104
- const q = addQueued(b.pane_id, text, { id });
113
+ const q = addQueued(b.pane_id, text, { id, typedAt });
105
114
  setTimeout(poll, 50);
106
115
  return { ok: true, queued: q };
107
- });
116
+ };
108
117
 
109
118
  export { prompt_post as default };
110
119
  //# sourceMappingURL=prompt.post.mjs.map
@@ -1,4 +1,4 @@
1
- import { a as defineApi, bk as parseQuiet, H as HerdrError, bl as writeGlobalQuiet, ao as readSubs, bm as writeSubs, ag as log, bn as quietActive, bo as readGlobalQuiet } from '../../../nitro/nitro.mjs';
1
+ import { a as defineApi, bh as parseQuiet, H as HerdrError, bi as writeGlobalQuiet, aj as readSubs, bj as writeSubs, aa as log, bk as quietActive, bl as readGlobalQuiet } from '../../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -16,18 +16,19 @@ import 'node:events';
16
16
  import 'node:buffer';
17
17
  import 'node:fs';
18
18
  import 'node:path';
19
- import 'web-push';
20
19
  import 'node:os';
21
- import 'node:child_process';
22
20
  import 'node:net';
23
- import 'node:fs/promises';
24
- import 'node:readline';
21
+ import 'node:child_process';
25
22
  import 'node:dns';
26
23
  import 'node:util';
24
+ import 'web-push';
25
+ import 'node:string_decoder';
26
+ import 'node:fs/promises';
27
+ import 'node:readline';
27
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
28
29
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
29
- import '@simplewebauthn/server';
30
30
  import 'node:url';
31
+ import '@simplewebauthn/server';
31
32
 
32
33
  const quiet_post = defineApi(async (event, b) => {
33
34
  var _a;
@@ -1,4 +1,4 @@
1
- import { a as defineApi, aq as pushReady, H as HerdrError, bp as validPushSubscription, ao as readSubs, bq as replaceSubscription, bn as quietActive, bm as writeSubs, ag as log } from '../../../nitro/nitro.mjs';
1
+ import { a as defineApi, al as pushReady, H as HerdrError, bm as validPushSubscription, aj as readSubs, bn as replaceSubscription, bk as quietActive, bj as writeSubs, aa as log } from '../../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -16,18 +16,19 @@ import 'node:events';
16
16
  import 'node:buffer';
17
17
  import 'node:fs';
18
18
  import 'node:path';
19
- import 'web-push';
20
19
  import 'node:os';
21
- import 'node:child_process';
22
20
  import 'node:net';
23
- import 'node:fs/promises';
24
- import 'node:readline';
21
+ import 'node:child_process';
25
22
  import 'node:dns';
26
23
  import 'node:util';
24
+ import 'web-push';
25
+ import 'node:string_decoder';
26
+ import 'node:fs/promises';
27
+ import 'node:readline';
27
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
28
29
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
29
- import '@simplewebauthn/server';
30
30
  import 'node:url';
31
+ import '@simplewebauthn/server';
31
32
 
32
33
  const subscribe_post = defineApi(async (event, b) => {
33
34
  if (!pushReady()) throw new HerdrError("push_off", "Web Push is not configured");
@@ -43,7 +44,6 @@ const subscribe_post = defineApi(async (event, b) => {
43
44
  endpoint: b.endpoint,
44
45
  keys: { p256dh: b.keys.p256dh, auth: b.keys.auth },
45
46
  lang: b.lang === "fr" ? "fr" : "en",
46
- notifyScope: b.notifyScope === "all" ? "all" : "project_leads",
47
47
  sessions,
48
48
  addedAt: (/* @__PURE__ */ new Date()).toISOString()
49
49
  }, b.previous, quietActive);
@@ -1,4 +1,4 @@
1
- import { a as defineApi, br as pushSend } from '../../../nitro/nitro.mjs';
1
+ import { a as defineApi, bo as pushSend } from '../../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -16,18 +16,19 @@ import 'node:events';
16
16
  import 'node:buffer';
17
17
  import 'node:fs';
18
18
  import 'node:path';
19
- import 'web-push';
20
19
  import 'node:os';
21
- import 'node:child_process';
22
20
  import 'node:net';
23
- import 'node:fs/promises';
24
- import 'node:readline';
21
+ import 'node:child_process';
25
22
  import 'node:dns';
26
23
  import 'node:util';
24
+ import 'web-push';
25
+ import 'node:string_decoder';
26
+ import 'node:fs/promises';
27
+ import 'node:readline';
27
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
28
29
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
29
- import '@simplewebauthn/server';
30
30
  import 'node:url';
31
+ import '@simplewebauthn/server';
31
32
 
32
33
  const test_post = defineApi(async () => ({
33
34
  sent: await pushSend({ title: "wherdr", body: "Notifications are working \u2713", bodyFr: "Les notifications fonctionnent \u2713", tag: "test", url: "/" }, void 0, true)
@@ -1,4 +1,4 @@
1
- import { a as defineApi, ao as readSubs, bm as writeSubs } from '../../../nitro/nitro.mjs';
1
+ import { a as defineApi, aj as readSubs, bj as writeSubs } from '../../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -16,18 +16,19 @@ import 'node:events';
16
16
  import 'node:buffer';
17
17
  import 'node:fs';
18
18
  import 'node:path';
19
- import 'web-push';
20
19
  import 'node:os';
21
- import 'node:child_process';
22
20
  import 'node:net';
23
- import 'node:fs/promises';
24
- import 'node:readline';
21
+ import 'node:child_process';
25
22
  import 'node:dns';
26
23
  import 'node:util';
24
+ import 'web-push';
25
+ import 'node:string_decoder';
26
+ import 'node:fs/promises';
27
+ import 'node:readline';
27
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
28
29
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
29
- import '@simplewebauthn/server';
30
30
  import 'node:url';
31
+ import '@simplewebauthn/server';
31
32
 
32
33
  const unsubscribe_post = defineApi(async (event, b) => {
33
34
  const subs = (await readSubs()).filter((s) => s.endpoint !== (b && b.endpoint));
@@ -1,4 +1,4 @@
1
- import { a as defineApi, bs as readQuotas } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, bp as readQuotas } from '../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -16,18 +16,19 @@ import 'node:events';
16
16
  import 'node:buffer';
17
17
  import 'node:fs';
18
18
  import 'node:path';
19
- import 'web-push';
20
19
  import 'node:os';
21
- import 'node:child_process';
22
20
  import 'node:net';
23
- import 'node:fs/promises';
24
- import 'node:readline';
21
+ import 'node:child_process';
25
22
  import 'node:dns';
26
23
  import 'node:util';
24
+ import 'web-push';
25
+ import 'node:string_decoder';
26
+ import 'node:fs/promises';
27
+ import 'node:readline';
27
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
28
29
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
29
- import '@simplewebauthn/server';
30
30
  import 'node:url';
31
+ import '@simplewebauthn/server';
31
32
 
32
33
  const quotas_get = defineApi(() => readQuotas());
33
34
 
@@ -16,18 +16,19 @@ import 'node:events';
16
16
  import 'node:buffer';
17
17
  import 'node:fs';
18
18
  import 'node:path';
19
- import 'web-push';
20
19
  import 'node:os';
21
- import 'node:child_process';
22
20
  import 'node:net';
23
- import 'node:fs/promises';
24
- import 'node:readline';
21
+ import 'node:child_process';
25
22
  import 'node:dns';
26
23
  import 'node:util';
24
+ import 'web-push';
25
+ import 'node:string_decoder';
26
+ import 'node:fs/promises';
27
+ import 'node:readline';
27
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
28
29
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
29
- import '@simplewebauthn/server';
30
30
  import 'node:url';
31
+ import '@simplewebauthn/server';
31
32
 
32
33
  const rename_post = defineApi(async (event, b) => {
33
34
  if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
@@ -1,4 +1,4 @@
1
- import { a as defineApi, P as PANE_RE, H as HerdrError, bt as retryQueued } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, P as PANE_RE, H as HerdrError, bq as retryQueued } from '../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -16,18 +16,19 @@ import 'node:events';
16
16
  import 'node:buffer';
17
17
  import 'node:fs';
18
18
  import 'node:path';
19
- import 'web-push';
20
19
  import 'node:os';
21
- import 'node:child_process';
22
20
  import 'node:net';
23
- import 'node:fs/promises';
24
- import 'node:readline';
21
+ import 'node:child_process';
25
22
  import 'node:dns';
26
23
  import 'node:util';
24
+ import 'web-push';
25
+ import 'node:string_decoder';
26
+ import 'node:fs/promises';
27
+ import 'node:readline';
27
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
28
29
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
29
- import '@simplewebauthn/server';
30
30
  import 'node:url';
31
+ import '@simplewebauthn/server';
31
32
 
32
33
  const requeue_post = defineApi(async (event, b) => {
33
34
  if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
@@ -17,18 +17,19 @@ import 'node:events';
17
17
  import 'node:buffer';
18
18
  import 'node:fs';
19
19
  import 'node:path';
20
- import 'web-push';
21
20
  import 'node:os';
22
- import 'node:child_process';
23
21
  import 'node:net';
24
- import 'node:fs/promises';
25
- import 'node:readline';
22
+ import 'node:child_process';
26
23
  import 'node:dns';
27
24
  import 'node:util';
25
+ import 'web-push';
26
+ import 'node:string_decoder';
27
+ import 'node:fs/promises';
28
+ import 'node:readline';
28
29
  import 'qrcode-terminal/vendor/QRCode/index.js';
29
30
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
30
- import '@simplewebauthn/server';
31
31
  import 'node:url';
32
+ import '@simplewebauthn/server';
32
33
 
33
34
  const restart_get = defineApi(async (event) => {
34
35
  const pane = String(getQuery(event).pane || "");
@@ -17,18 +17,19 @@ import 'node:events';
17
17
  import 'node:buffer';
18
18
  import 'node:fs';
19
19
  import 'node:path';
20
- import 'web-push';
21
20
  import 'node:os';
22
- import 'node:child_process';
23
21
  import 'node:net';
24
- import 'node:fs/promises';
25
- import 'node:readline';
22
+ import 'node:child_process';
26
23
  import 'node:dns';
27
24
  import 'node:util';
25
+ import 'web-push';
26
+ import 'node:string_decoder';
27
+ import 'node:fs/promises';
28
+ import 'node:readline';
28
29
  import 'qrcode-terminal/vendor/QRCode/index.js';
29
30
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
30
- import '@simplewebauthn/server';
31
31
  import 'node:url';
32
+ import '@simplewebauthn/server';
32
33
 
33
34
  const restart_post = defineApi(async (event, b) => {
34
35
  if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
@@ -1,5 +1,6 @@
1
- import { a as defineApi } from '../../nitro/nitro.mjs';
2
- import { r as revealPath } from '../../_/reveal.mjs';
1
+ import { H as HerdrError, br as PANE_RE, f as findPane, $ as getMachine, a_ as splitId, t as fmt, aa as log, a as defineApi } from '../../nitro/nitro.mjs';
2
+ import { execFile } from 'node:child_process';
3
+ import { r as resolveAgentPath, a as runnablePath } from '../../_/filePaths.mjs';
3
4
  import 'node:http';
4
5
  import 'node:https';
5
6
  import 'node:crypto';
@@ -17,19 +18,101 @@ import 'node:events';
17
18
  import 'node:buffer';
18
19
  import 'node:fs';
19
20
  import 'node:path';
20
- import 'web-push';
21
21
  import 'node:os';
22
- import 'node:child_process';
23
22
  import 'node:net';
24
- import 'node:fs/promises';
25
- import 'node:readline';
26
23
  import 'node:dns';
27
24
  import 'node:util';
25
+ import 'web-push';
26
+ import 'node:string_decoder';
27
+ import 'node:fs/promises';
28
+ import 'node:readline';
28
29
  import 'qrcode-terminal/vendor/QRCode/index.js';
29
30
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
30
- import '@simplewebauthn/server';
31
31
  import 'node:url';
32
- import '../../_/filePaths.mjs';
32
+ import '@simplewebauthn/server';
33
+
34
+ const REVEAL_CHECKS = `p=$2
35
+ [ -e "$p" ] || exit 3
36
+ if command -v realpath >/dev/null 2>&1; then
37
+ r=$(realpath "$p" 2>/dev/null) || exit 3
38
+ h=$(realpath "$HOME" 2>/dev/null) || exit 4
39
+ elif [ -d "$p" ]; then
40
+ r=$(cd -P "$p" 2>/dev/null && pwd -P) || exit 3
41
+ h=$(cd -P "$HOME" 2>/dev/null && pwd -P) || exit 4
42
+ else
43
+ d=$(cd -P "$(dirname "$p")" 2>/dev/null && pwd -P) || exit 3
44
+ r="$d/$(basename "$p")"
45
+ [ -L "$r" ] && [ "$1" = open ] && exit 4
46
+ h=$(cd -P "$HOME" 2>/dev/null && pwd -P) || exit 4
47
+ fi
48
+ case "$r/" in "$h"/*) ;; *) exit 4 ;; esac
49
+ [ "$(uname -s)" = Darwin ] || exit 5
50
+ if [ "$1" = open ]; then
51
+ case "$r" in *.app|*.app/*|*.command|*.tool|*.terminal|*.pkg|*.mpkg|*.workflow|*.scpt|*.applescript|*.jar|*.webloc|*.inetloc|*.fileloc|*.dmg) exit 7 ;; esac
52
+ if [ -f "$r" ] && [ -x "$r" ]; then exit 7; fi
53
+ # A folder opens in the configured editor (WH_OPEN_EDITOR, or the first line
54
+ # of ~/.local/share/wherdr/editor \u2014 an app name for open -a); plain open
55
+ # would give the file manager. Files: the LaunchServices default app.
56
+ ed=\${WH_OPEN_EDITOR:-}
57
+ if [ -z "$ed" ] && [ -f "$HOME/.local/share/wherdr/editor" ]; then
58
+ ed=$(head -n1 "$HOME/.local/share/wherdr/editor" | tr -d '[:space:]')
59
+ fi
60
+ if [ -d "$r" ] && [ -n "$ed" ]; then
61
+ open -a "$ed" "$r" || exit 6
62
+ else
63
+ open "$r" || exit 6
64
+ fi
65
+ else
66
+ open -R "$r" || exit 6
67
+ fi
68
+ echo "$r"`;
69
+ const REVEAL_SCRIPT = REVEAL_CHECKS;
70
+ const revealArgs = (mode, absPath) => [mode, absPath];
71
+ const isMac = (m) => m.os === "Darwin";
72
+ function runLocal(script, args) {
73
+ const { promise, resolve } = Promise.withResolvers();
74
+ execFile("/bin/sh", ["-c", script, "sh", ...args], { timeout: 15e3, encoding: "buffer" }, (err, stdout, stderr) => {
75
+ const raw = err ? typeof err === "object" && err !== null && "code" in err ? err.code : void 0 : 0;
76
+ resolve({ code: typeof raw === "number" ? raw : err ? 1 : 0, stdout, stderr: String(stderr || "") });
77
+ });
78
+ return promise;
79
+ }
80
+ function revealError(code, p, m, stderr = "") {
81
+ switch (code) {
82
+ case 3:
83
+ return new HerdrError("not_found", fmt("Not found on {machine}: {path}", { machine: m.label, path: p }));
84
+ case 4:
85
+ return new HerdrError("outside_home", "Only files in your home folder can be shown");
86
+ case 5:
87
+ return new HerdrError("not_mac", fmt("{machine} is not a Mac", { machine: m.label }));
88
+ case 7:
89
+ return new HerdrError("runnable", "Apps and scripts are not opened from wherdr: use Reveal in Finder");
90
+ default:
91
+ return new HerdrError("open_failed", fmt("Could not open on {machine}: {reason}", { machine: m.label, reason: stderr.trim().split("\n").pop() || `code ${code}` }));
92
+ }
93
+ }
94
+ async function revealPath(body) {
95
+ const paneId = String(body.pane_id || "");
96
+ const written = String(body.path || "");
97
+ const mode = body.mode === "open" ? "open" : body.mode === "reveal" ? "reveal" : null;
98
+ if (!mode) throw new HerdrError("bad_mode", "Invalid action");
99
+ if (!PANE_RE.test(paneId)) throw new HerdrError("bad_pane", "Invalid pane");
100
+ const pane = findPane(paneId);
101
+ if (!pane) throw new HerdrError("bad_pane", "Pane not found");
102
+ if (!written || written.length > 1024) throw new HerdrError("bad_path", "Invalid path");
103
+ const m = getMachine(splitId(paneId).machine);
104
+ if (!m) throw new HerdrError("bad_machine", "unknown machine");
105
+ if (!m.local && (m.status !== "online" || !m.home)) throw new HerdrError("unreachable", fmt("{machine} is unreachable", { machine: m.label }));
106
+ if (!isMac(m)) throw new HerdrError("not_mac", fmt("{machine} is not a Mac", { machine: m.label }));
107
+ const abs = resolveAgentPath(written, pane.cwd, m.home);
108
+ if (!abs) throw new HerdrError("outside_home", "Only files in your home folder can be shown");
109
+ if (mode === "open" && runnablePath(abs)) throw revealError(7, abs, m);
110
+ const args = revealArgs(mode, abs);
111
+ const r = m.local ? await runLocal(REVEAL_SCRIPT, args) : await m.exec(REVEAL_SCRIPT, args, { timeoutMs: 15e3 });
112
+ log(`reveal: ${mode} on ${m.label} for ${paneId}: ${r.code === 0 ? "ok" : `refused (code ${r.code})`}`);
113
+ if (r.code !== 0) throw revealError(r.code, abs, m, r.stderr);
114
+ return { ok: true, mode, path: r.stdout.toString("utf8").trim() || abs, machine: m.label };
115
+ }
33
116
 
34
117
  const reveal_post = defineApi((event, b) => revealPath(b));
35
118
 
@@ -1,4 +1,4 @@
1
- import { a as defineApi, P as PANE_RE, H as HerdrError, h as herdr, bu as parseWaitScreen, V as parseChoices, bv as waitIdentity, g as choicesCache, p as poll } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, P as PANE_RE, H as HerdrError, h as herdr, bs as parseWaitScreen, K as parseChoices, bt as waitIdentity, g as choicesCache, p as poll } from '../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -16,18 +16,19 @@ import 'node:events';
16
16
  import 'node:buffer';
17
17
  import 'node:fs';
18
18
  import 'node:path';
19
- import 'web-push';
20
19
  import 'node:os';
21
- import 'node:child_process';
22
20
  import 'node:net';
23
- import 'node:fs/promises';
24
- import 'node:readline';
21
+ import 'node:child_process';
25
22
  import 'node:dns';
26
23
  import 'node:util';
24
+ import 'web-push';
25
+ import 'node:string_decoder';
26
+ import 'node:fs/promises';
27
+ import 'node:readline';
27
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
28
29
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
29
- import '@simplewebauthn/server';
30
30
  import 'node:url';
31
+ import '@simplewebauthn/server';
31
32
 
32
33
  const screenKey_post = defineApi(async (event, b) => {
33
34
  if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
@@ -1,4 +1,4 @@
1
- import { a as defineApi, i as getQuery, P as PANE_RE, H as HerdrError, h as herdr, bw as settingsTabs, bx as tabsOfRow, f as findPane, by as classifyScreen, bu as parseWaitScreen, bz as parseMenu, b as screenChoices } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, i as getQuery, P as PANE_RE, H as HerdrError, h as herdr, bu as settingsTabs, bv as tabsOfRow, f as findPane, bw as classifyScreen, bs as parseWaitScreen, bx as parseMenu, b as screenChoices } from '../../nitro/nitro.mjs';
2
2
  import { a as activeTab } from '../../_/settingstabs.mjs';
3
3
  import 'node:http';
4
4
  import 'node:https';
@@ -17,18 +17,19 @@ import 'node:events';
17
17
  import 'node:buffer';
18
18
  import 'node:fs';
19
19
  import 'node:path';
20
- import 'web-push';
21
20
  import 'node:os';
22
- import 'node:child_process';
23
21
  import 'node:net';
24
- import 'node:fs/promises';
25
- import 'node:readline';
22
+ import 'node:child_process';
26
23
  import 'node:dns';
27
24
  import 'node:util';
25
+ import 'web-push';
26
+ import 'node:string_decoder';
27
+ import 'node:fs/promises';
28
+ import 'node:readline';
28
29
  import 'qrcode-terminal/vendor/QRCode/index.js';
29
30
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
30
- import '@simplewebauthn/server';
31
31
  import 'node:url';
32
+ import '@simplewebauthn/server';
32
33
 
33
34
  const screen_get = defineApi(async (event) => {
34
35
  const pane = String(getQuery(event).pane || "");
@@ -1,4 +1,4 @@
1
- import { a as defineApi, i as getQuery, m as getState, bA as hasTranscript, F as machineOfPane, bB as SEARCH_DEADLINE_MS, bC as SEARCH_MAX_RESULTS, bD as spaceTitle } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, i as getQuery, a$ as getState, by as hasTranscript, q as machineOfPane, bz as SEARCH_DEADLINE_MS, bA as SEARCH_MAX_RESULTS, bB as spaceTitle } from '../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -16,18 +16,19 @@ import 'node:events';
16
16
  import 'node:buffer';
17
17
  import 'node:fs';
18
18
  import 'node:path';
19
- import 'web-push';
20
19
  import 'node:os';
21
- import 'node:child_process';
22
20
  import 'node:net';
23
- import 'node:fs/promises';
24
- import 'node:readline';
21
+ import 'node:child_process';
25
22
  import 'node:dns';
26
23
  import 'node:util';
24
+ import 'web-push';
25
+ import 'node:string_decoder';
26
+ import 'node:fs/promises';
27
+ import 'node:readline';
27
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
28
29
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
29
- import '@simplewebauthn/server';
30
30
  import 'node:url';
31
+ import '@simplewebauthn/server';
31
32
 
32
33
  const search_get = defineApi(async (event) => {
33
34
  const query = String(getQuery(event).q || "").trim().slice(0, 100);
@@ -1,4 +1,4 @@
1
- import { a as defineApi, P as PANE_RE, H as HerdrError, bE as markSeen } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, P as PANE_RE, H as HerdrError, bC as markSeen } from '../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -16,18 +16,19 @@ import 'node:events';
16
16
  import 'node:buffer';
17
17
  import 'node:fs';
18
18
  import 'node:path';
19
- import 'web-push';
20
19
  import 'node:os';
21
- import 'node:child_process';
22
20
  import 'node:net';
23
- import 'node:fs/promises';
24
- import 'node:readline';
21
+ import 'node:child_process';
25
22
  import 'node:dns';
26
23
  import 'node:util';
24
+ import 'web-push';
25
+ import 'node:string_decoder';
26
+ import 'node:fs/promises';
27
+ import 'node:readline';
27
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
28
29
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
29
- import '@simplewebauthn/server';
30
30
  import 'node:url';
31
+ import '@simplewebauthn/server';
31
32
 
32
33
  const seen_post = defineApi(async (event, b) => {
33
34
  if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
@@ -1,4 +1,4 @@
1
- import { a as defineApi, i as getQuery, bF as listSessions } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, i as getQuery, bD as listSessions } from '../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -16,18 +16,19 @@ import 'node:events';
16
16
  import 'node:buffer';
17
17
  import 'node:fs';
18
18
  import 'node:path';
19
- import 'web-push';
20
19
  import 'node:os';
21
- import 'node:child_process';
22
20
  import 'node:net';
23
- import 'node:fs/promises';
24
- import 'node:readline';
21
+ import 'node:child_process';
25
22
  import 'node:dns';
26
23
  import 'node:util';
24
+ import 'web-push';
25
+ import 'node:string_decoder';
26
+ import 'node:fs/promises';
27
+ import 'node:readline';
27
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
28
29
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
29
- import '@simplewebauthn/server';
30
30
  import 'node:url';
31
+ import '@simplewebauthn/server';
31
32
 
32
33
  const sessions_get = defineApi(async (event) => {
33
34
  const key = String(getQuery(event).machine || "");