wherdr 1.3.2 → 1.3.4

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 (188) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{AgentView.C4YOwvZG.css → AgentView.DzFWBd2A.css} +1 -1
  3. package/.output/public/_nuxt/{Cd8j9O5w.js → BEJHMUrj.js} +1 -1
  4. package/.output/public/_nuxt/BOtcEDnA.js +1 -0
  5. package/.output/public/_nuxt/BUaYhQ2r.js +6 -0
  6. package/.output/public/_nuxt/{yzABg5xl.js → Bpoxvzh6.js} +1 -1
  7. package/.output/public/_nuxt/C25ROUa9.js +3 -0
  8. package/.output/public/_nuxt/CDWjMk9C.js +2 -0
  9. package/.output/public/_nuxt/CJKsMzIp.js +1 -0
  10. package/.output/public/_nuxt/CJNhn9sA.js +36 -0
  11. package/.output/public/_nuxt/COCvtdHN.js +89 -0
  12. package/.output/public/_nuxt/{Ci8N4mWR.js → CXJnLmWv.js} +1 -1
  13. package/.output/public/_nuxt/Cl45J6_Q.js +1 -0
  14. package/.output/public/_nuxt/CndPDbMI.js +2 -0
  15. package/.output/public/_nuxt/Ctbx58Um.js +23 -0
  16. package/.output/public/_nuxt/{8ksjcuDu.js → DMLmW6JM.js} +49 -56
  17. package/.output/public/_nuxt/Dl1PHLOB.js +1 -0
  18. package/.output/public/_nuxt/Nhex3_iH.js +1 -0
  19. package/.output/public/_nuxt/OpWX45i7.js +89 -0
  20. package/.output/public/_nuxt/builds/latest.json +1 -1
  21. package/.output/public/_nuxt/builds/meta/4994f3a4-4126-4f57-a9e5-c7ebb25850bc.json +1 -0
  22. package/.output/public/_nuxt/dTj21DMs.js +1 -0
  23. package/.output/public/_nuxt/entry.BohTWE-n.css +2 -0
  24. package/.output/public/_nuxt/kwSoIiM7.js +1 -0
  25. package/.output/public/_nuxt/mkEwYka4.js +1 -0
  26. package/.output/public/_nuxt/pdf.min.t82Z80JU.mjs +28 -0
  27. package/.output/public/_nuxt/pdf.worker.min.wgc6bjNh.mjs +28 -0
  28. package/.output/public/_nuxt/w7Rm7unj.js +1 -0
  29. package/.output/public/sw.js +1 -1
  30. package/.output/server/chunks/_/branding.mjs +1 -1
  31. package/.output/server/chunks/_/filePaths.mjs +25 -0
  32. package/.output/server/chunks/_/files.mjs +217 -0
  33. package/.output/server/chunks/_/machineOrder.mjs +1 -1
  34. package/.output/server/chunks/_/onboarding.mjs +1 -1
  35. package/.output/server/chunks/_/package.mjs +5 -2
  36. package/.output/server/chunks/_/pluginPolicy.mjs +93 -0
  37. package/.output/server/chunks/_/plugins.mjs +9 -96
  38. package/.output/server/chunks/_/projectBoard.mjs +124 -36
  39. package/.output/server/chunks/_/projectDocs.mjs +106 -0
  40. package/.output/server/chunks/_/projectInbox.mjs +135 -0
  41. package/.output/server/chunks/_/projectThreads.mjs +46 -0
  42. package/.output/server/chunks/_/projectThreads2.mjs +61 -0
  43. package/.output/server/chunks/_/projectsActions.mjs +1 -1
  44. package/.output/server/chunks/_/projectsPlugin.mjs +24 -50
  45. package/.output/server/chunks/_/projectsPlugin2.mjs +57 -0
  46. package/.output/server/chunks/_/restart.mjs +2 -312
  47. package/.output/server/chunks/_/reveal.mjs +2 -24
  48. package/.output/server/chunks/_/selfupdate.mjs +3 -2
  49. package/.output/server/chunks/_/settingstabs.mjs +36 -0
  50. package/.output/server/chunks/_/updates.mjs +51 -10
  51. package/.output/server/chunks/_/worktrees.mjs +1 -1
  52. package/.output/server/chunks/_/ws.mjs +1 -1
  53. package/.output/server/chunks/nitro/nitro.mjs +1718 -417
  54. package/.output/server/chunks/raw/bump-homebrew.mjs +1 -1
  55. package/.output/server/chunks/raw/herdr-plugin.mjs +1 -1
  56. package/.output/server/chunks/raw/release-ready.mjs +5 -0
  57. package/.output/server/chunks/routes/api/_..._.mjs +1 -1
  58. package/.output/server/chunks/routes/api/agents.post.mjs +1 -1
  59. package/.output/server/chunks/routes/api/ask-tab.post.mjs +1 -1
  60. package/.output/server/chunks/routes/api/attach.post.mjs +1 -1
  61. package/.output/server/chunks/routes/api/auth/disable.post.mjs +1 -1
  62. package/.output/server/chunks/routes/api/auth/lock-all.post.mjs +1 -1
  63. package/.output/server/chunks/routes/api/auth/lock.post.mjs +1 -1
  64. package/.output/server/chunks/routes/api/auth/login/options.post.mjs +1 -1
  65. package/.output/server/chunks/routes/api/auth/login/verify.post.mjs +1 -1
  66. package/.output/server/chunks/routes/api/auth/max-session.post.mjs +1 -1
  67. package/.output/server/chunks/routes/api/auth/register/options.post.mjs +1 -1
  68. package/.output/server/chunks/routes/api/auth/register/verify.post.mjs +1 -1
  69. package/.output/server/chunks/routes/api/auth/status.get.mjs +1 -1
  70. package/.output/server/chunks/routes/api/board.get.mjs +148 -0
  71. package/.output/server/chunks/routes/api/changes.get.mjs +2 -2
  72. package/.output/server/chunks/routes/api/chat/image.get.mjs +2 -2
  73. package/.output/server/chunks/routes/api/chat.get.mjs +26 -6
  74. package/.output/server/chunks/routes/api/choose.post.mjs +40 -14
  75. package/.output/server/chunks/routes/api/claude-statusline.post.mjs +2 -2
  76. package/.output/server/chunks/routes/api/close/status.get.mjs +2 -2
  77. package/.output/server/chunks/routes/api/close.post.mjs +1 -1
  78. package/.output/server/chunks/routes/api/codex-update.post.mjs +2 -2
  79. package/.output/server/chunks/routes/api/commands.get.mjs +4 -3
  80. package/.output/server/chunks/routes/api/config.get.mjs +3 -2
  81. package/.output/server/chunks/routes/api/dirs.get.mjs +2 -2
  82. package/.output/server/chunks/routes/api/dismiss-stopped.post.mjs +43 -0
  83. package/.output/server/chunks/routes/api/dismiss.post.mjs +2 -2
  84. package/.output/server/chunks/routes/api/effort.post.mjs +2 -2
  85. package/.output/server/chunks/routes/api/efforts.get.mjs +2 -2
  86. package/.output/server/chunks/routes/api/file.post.mjs +2 -2
  87. package/.output/server/chunks/routes/api/files/download.get.mjs +60 -0
  88. package/.output/server/chunks/routes/api/files/read.get.mjs +45 -0
  89. package/.output/server/chunks/routes/api/files.get.mjs +44 -0
  90. package/.output/server/chunks/routes/api/gitroot.get.mjs +2 -2
  91. package/.output/server/chunks/routes/api/health.get.mjs +1 -1
  92. package/.output/server/chunks/routes/api/index.get.mjs +2 -1
  93. package/.output/server/chunks/routes/api/input.post.mjs +32 -5
  94. package/.output/server/chunks/routes/api/interrupt.post.mjs +2 -2
  95. package/.output/server/chunks/routes/api/isgit.get.mjs +2 -2
  96. package/.output/server/chunks/routes/api/machine/awake.get.mjs +2 -2
  97. package/.output/server/chunks/routes/api/machine/awake.post.mjs +2 -2
  98. package/.output/server/chunks/routes/api/machine/order.get.mjs +1 -1
  99. package/.output/server/chunks/routes/api/machine/order.post.mjs +1 -1
  100. package/.output/server/chunks/routes/api/machine/rename.post.mjs +2 -2
  101. package/.output/server/chunks/routes/api/menu.post.mjs +5 -2
  102. package/.output/server/chunks/routes/api/model.post.mjs +2 -2
  103. package/.output/server/chunks/routes/api/models.get.mjs +2 -2
  104. package/.output/server/chunks/routes/api/nav.post.mjs +36 -22
  105. package/.output/server/chunks/routes/api/onboarding.get.mjs +1 -1
  106. package/.output/server/chunks/routes/api/onboarding.post.mjs +1 -1
  107. package/.output/server/chunks/routes/api/phone.get.mjs +2 -2
  108. package/.output/server/chunks/routes/api/phone.post.mjs +2 -2
  109. package/.output/server/chunks/routes/api/plugins/actions.get.mjs +4 -1
  110. package/.output/server/chunks/routes/api/plugins/invoke.post.mjs +4 -1
  111. package/.output/server/chunks/routes/api/plugins/profiles.get.mjs +4 -1
  112. package/.output/server/chunks/routes/api/plugins/projects.get.mjs +4 -3
  113. package/.output/server/chunks/routes/api/plugins/projects.post.mjs +4 -3
  114. package/.output/server/chunks/routes/api/plugins/thread-limits.get.mjs +2 -2
  115. package/.output/server/chunks/routes/api/plugins/thread-limits.post.mjs +2 -2
  116. package/.output/server/chunks/routes/api/project/inbox.get.mjs +44 -0
  117. package/.output/server/chunks/routes/api/project/inbox.post.mjs +44 -0
  118. package/.output/server/chunks/routes/api/project/memory.get.mjs +43 -0
  119. package/.output/server/chunks/routes/api/project/report.get.mjs +3 -2
  120. package/.output/server/chunks/routes/api/project/routines.get.mjs +44 -0
  121. package/.output/server/chunks/routes/api/project/settings.get.mjs +42 -0
  122. package/.output/server/chunks/routes/api/project/thread.get.mjs +45 -0
  123. package/.output/server/chunks/routes/api/project/thread.post.mjs +47 -0
  124. package/.output/server/chunks/routes/api/prompt.post.mjs +21 -3
  125. package/.output/server/chunks/routes/api/push/quiet.post.mjs +2 -2
  126. package/.output/server/chunks/routes/api/push/subscribe.post.mjs +2 -2
  127. package/.output/server/chunks/routes/api/push/test.post.mjs +2 -2
  128. package/.output/server/chunks/routes/api/push/unsubscribe.post.mjs +2 -2
  129. package/.output/server/chunks/routes/api/quotas.get.mjs +2 -2
  130. package/.output/server/chunks/routes/api/rename.post.mjs +1 -1
  131. package/.output/server/chunks/routes/api/requeue.post.mjs +2 -2
  132. package/.output/server/chunks/routes/api/restart.get.mjs +1 -1
  133. package/.output/server/chunks/routes/api/restart.post.mjs +1 -1
  134. package/.output/server/chunks/routes/api/reveal.post.mjs +2 -1
  135. package/.output/server/chunks/routes/api/screen-key.post.mjs +14 -11
  136. package/.output/server/chunks/routes/api/screen.get.mjs +6 -37
  137. package/.output/server/chunks/routes/api/search.get.mjs +2 -2
  138. package/.output/server/chunks/routes/api/seen.post.mjs +2 -2
  139. package/.output/server/chunks/routes/api/sessions.get.mjs +2 -2
  140. package/.output/server/chunks/routes/api/sessions.post.mjs +2 -2
  141. package/.output/server/chunks/routes/api/settings-tab.post.mjs +89 -0
  142. package/.output/server/chunks/routes/api/space.post.mjs +14 -14
  143. package/.output/server/chunks/routes/api/state.get.mjs +2 -2
  144. package/.output/server/chunks/routes/api/unqueue.post.mjs +2 -2
  145. package/.output/server/chunks/routes/api/update/status.get.mjs +1 -1
  146. package/.output/server/chunks/routes/api/update.get.mjs +2 -2
  147. package/.output/server/chunks/routes/api/update.post.mjs +2 -2
  148. package/.output/server/chunks/routes/api/upload.post.mjs +2 -2
  149. package/.output/server/chunks/routes/api/worktrees/remove.post.mjs +1 -1
  150. package/.output/server/chunks/routes/api/worktrees.get.mjs +1 -1
  151. package/.output/server/chunks/routes/favicon.ico.get.mjs +1 -1
  152. package/.output/server/chunks/routes/icons/_name_.get.mjs +2 -2
  153. package/.output/server/chunks/routes/renderer.mjs +3 -3
  154. package/.output/server/chunks/routes/uploads/_...name_.get.mjs +2 -2
  155. package/.output/server/chunks/routes/ws/_..._.mjs +2 -2
  156. package/.output/server/chunks/routes/ws/events.mjs +2 -2
  157. package/.output/server/chunks/routes/ws/term.mjs +2 -2
  158. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  159. package/.output/server/index.mjs +2 -2
  160. package/.output/server/package.json +1 -1
  161. package/README.md +368 -40
  162. package/bin/install-docker-skill.sh +20 -0
  163. package/bin/lib/commands.mjs +5 -1
  164. package/bin/lib/core.mjs +1 -0
  165. package/bin/lib/install-skill.sh +100 -0
  166. package/bin/lib/skill.mjs +16 -0
  167. package/bin/lib/updater.mjs +65 -12
  168. package/bin/lib/verify-release.mjs +20 -0
  169. package/package.json +5 -2
  170. package/skills/wherdr/SKILL.md +186 -0
  171. package/.output/public/_nuxt/B7QP1TFs.js +0 -23
  172. package/.output/public/_nuxt/BDNMzG2s.js +0 -1
  173. package/.output/public/_nuxt/BOpBIziZ.js +0 -6
  174. package/.output/public/_nuxt/BWXdFfeg.js +0 -17
  175. package/.output/public/_nuxt/COFCNFpG.js +0 -83
  176. package/.output/public/_nuxt/CWwyK2XK.js +0 -2
  177. package/.output/public/_nuxt/CXG-cOdh.js +0 -1
  178. package/.output/public/_nuxt/CkZ8t6uB.js +0 -1
  179. package/.output/public/_nuxt/D4Yz4rat.js +0 -65
  180. package/.output/public/_nuxt/D7sxNXx1.js +0 -1
  181. package/.output/public/_nuxt/DViwOclv.js +0 -1
  182. package/.output/public/_nuxt/DoD7Qb5P.js +0 -30
  183. package/.output/public/_nuxt/DyBZDSCV.js +0 -2
  184. package/.output/public/_nuxt/SiL1FJ5s.js +0 -3
  185. package/.output/public/_nuxt/bLP7Jj-b.js +0 -1
  186. package/.output/public/_nuxt/builds/meta/7afbf062-5369-4002-b20d-7a582ff6e0f1.json +0 -1
  187. package/.output/public/_nuxt/entry.Crt1r4l3.css +0 -2
  188. package/.output/server/chunks/routes/ws/mirror.mjs +0 -161
@@ -1,4 +1,4 @@
1
- import { a as defineApi, P as PANE_RE, H as HerdrError, f as findPane, ag as interruptAgent, F as sleep, h as herdr, ah as takeBackFromClaude, ai as takeBack, Q as log, p as poll } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, P as PANE_RE, H as HerdrError, f as findPane, aL as interruptAgent, a4 as sleep, h as herdr, aM as takeBackFromClaude, aN as takeBack, ag as log, p as poll } from '../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -20,8 +20,8 @@ import 'web-push';
20
20
  import 'node:os';
21
21
  import 'node:child_process';
22
22
  import 'node:net';
23
- import 'node:readline';
24
23
  import 'node:fs/promises';
24
+ import 'node:readline';
25
25
  import 'node:dns';
26
26
  import 'node:util';
27
27
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -1,4 +1,4 @@
1
- import { a as defineApi, i as getQuery, m as machineFor, ad as underHome, aj as isGitRepo, ak as projectFolderKinds } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, i as getQuery, v as machineFor, aI as underHome, aO as isGitRepo, aP as projectFolderKinds } from '../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -20,8 +20,8 @@ import 'web-push';
20
20
  import 'node:os';
21
21
  import 'node:child_process';
22
22
  import 'node:net';
23
- import 'node:readline';
24
23
  import 'node:fs/promises';
24
+ import 'node:readline';
25
25
  import 'node:dns';
26
26
  import 'node:util';
27
27
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -1,4 +1,4 @@
1
- import { a as defineApi, i as getQuery, M as MACHINE_KEY_RE, H as HerdrError, G as getMachine } from '../../../nitro/nitro.mjs';
1
+ import { a as defineApi, i as getQuery, a5 as MACHINE_KEY_RE, H as HerdrError, a6 as getMachine } from '../../../nitro/nitro.mjs';
2
2
  import { a as awakeStatus, s as sleepAssertions } from '../../../_/awake.mjs';
3
3
  import 'node:http';
4
4
  import 'node:https';
@@ -21,8 +21,8 @@ import 'web-push';
21
21
  import 'node:os';
22
22
  import 'node:child_process';
23
23
  import 'node:net';
24
- import 'node:readline';
25
24
  import 'node:fs/promises';
25
+ import 'node:readline';
26
26
  import 'node:dns';
27
27
  import 'node:util';
28
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -1,4 +1,4 @@
1
- import { a as defineApi, M as MACHINE_KEY_RE, H as HerdrError, G as getMachine } from '../../../nitro/nitro.mjs';
1
+ import { a as defineApi, a5 as MACHINE_KEY_RE, H as HerdrError, a6 as getMachine } from '../../../nitro/nitro.mjs';
2
2
  import { b as setAwake } from '../../../_/awake.mjs';
3
3
  import 'node:http';
4
4
  import 'node:https';
@@ -21,8 +21,8 @@ import 'web-push';
21
21
  import 'node:os';
22
22
  import 'node:child_process';
23
23
  import 'node:net';
24
- import 'node:readline';
25
24
  import 'node:fs/promises';
25
+ import 'node:readline';
26
26
  import 'node:dns';
27
27
  import 'node:util';
28
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -21,8 +21,8 @@ import 'web-push';
21
21
  import 'node:os';
22
22
  import 'node:child_process';
23
23
  import 'node:net';
24
- import 'node:readline';
25
24
  import 'node:fs/promises';
25
+ import 'node:readline';
26
26
  import 'node:dns';
27
27
  import 'node:util';
28
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -21,8 +21,8 @@ import 'web-push';
21
21
  import 'node:os';
22
22
  import 'node:child_process';
23
23
  import 'node:net';
24
- import 'node:readline';
25
24
  import 'node:fs/promises';
25
+ import 'node:readline';
26
26
  import 'node:dns';
27
27
  import 'node:util';
28
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -1,4 +1,4 @@
1
- import { a as defineApi, M as MACHINE_KEY_RE, G as getMachine, H as HerdrError, an as renameMachine } from '../../../nitro/nitro.mjs';
1
+ import { a as defineApi, a5 as MACHINE_KEY_RE, a6 as getMachine, H as HerdrError, aS as renameMachine } from '../../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -20,8 +20,8 @@ import 'web-push';
20
20
  import 'node:os';
21
21
  import 'node:child_process';
22
22
  import 'node:net';
23
- import 'node:readline';
24
23
  import 'node:fs/promises';
24
+ import 'node:readline';
25
25
  import 'node:dns';
26
26
  import 'node:util';
27
27
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -1,4 +1,4 @@
1
- import { a as defineApi, P as PANE_RE, H as HerdrError, ao as readMenu, ap as searchKeys, F as sleep, aq as findEntry, ar as stepToward, as as clickMovesOnly, e as watchScreen, q as transcripts, p as poll, h as herdr } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, P as PANE_RE, H as HerdrError, aT as readMenu, aU as findEntry, aV as menuIdentity, aW as searchKeys, a4 as sleep, aX as stepToward, aY as clickMovesOnly, e as watchScreen, J as transcripts, p as poll, h as herdr } from '../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -20,8 +20,8 @@ import 'web-push';
20
20
  import 'node:os';
21
21
  import 'node:child_process';
22
22
  import 'node:net';
23
- import 'node:readline';
24
23
  import 'node:fs/promises';
24
+ import 'node:readline';
25
25
  import 'node:dns';
26
26
  import 'node:util';
27
27
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -38,6 +38,8 @@ const menu_post = defineApi(async (event, b) => {
38
38
  const pane = b.pane_id;
39
39
  let menu = await readMenu(pane);
40
40
  if (!menu) throw new HerdrError("stale", STALE);
41
+ const targetEntry = b.op === "select" ? menu.items[findEntry(menu, Number(b.index), String(b.label || ""))] : void 0;
42
+ if (!b.identity || menuIdentity(menu, targetEntry) !== b.identity) throw new HerdrError("stale", STALE);
41
43
  if (b.op === "key") {
42
44
  const a = menu.actions.find((x) => x.key === b.key && x.label === b.label);
43
45
  if (!a) throw new HerdrError("stale", STALE);
@@ -69,6 +71,7 @@ const menu_post = defineApi(async (event, b) => {
69
71
  }
70
72
  if (!menu || at(menu) === before) throw new HerdrError("stale", "The cursor doesn\u2019t move \u2014 finish in the terminal.");
71
73
  target = findEntry(menu, -1, label);
74
+ if (target < 0 || menuIdentity(menu, menu.items[target]) !== b.identity) throw new HerdrError("stale", STALE);
72
75
  }
73
76
  } else throw new HerdrError("bad_request", "Invalid operation");
74
77
  watchScreen(pane, 3e4);
@@ -1,4 +1,4 @@
1
- import { a as defineApi, P as PANE_RE, H as HerdrError, at as setModel, f as findPane, aa as refreshModel } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, P as PANE_RE, H as HerdrError, aZ as setModel, f as findPane, aE as refreshModel } from '../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -20,8 +20,8 @@ import 'web-push';
20
20
  import 'node:os';
21
21
  import 'node:child_process';
22
22
  import 'node:net';
23
- import 'node:readline';
24
23
  import 'node:fs/promises';
24
+ import 'node:readline';
25
25
  import 'node:dns';
26
26
  import 'node:util';
27
27
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -1,4 +1,4 @@
1
- import { a as defineApi, i as getQuery, P as PANE_RE, H as HerdrError, au as listModels } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, i as getQuery, P as PANE_RE, H as HerdrError, a_ as listModels } from '../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -20,8 +20,8 @@ import 'web-push';
20
20
  import 'node:os';
21
21
  import 'node:child_process';
22
22
  import 'node:net';
23
- import 'node:readline';
24
23
  import 'node:fs/promises';
24
+ import 'node:readline';
25
25
  import 'node:dns';
26
26
  import 'node:util';
27
27
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -1,4 +1,4 @@
1
- import { a as defineApi, P as PANE_RE, H as HerdrError, h as herdr, f as findPane, av as TOP, ao as readMenu, as as clickMovesOnly, b as screenChoices, e as watchScreen, g as choicesCache, p as poll } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, P as PANE_RE, H as HerdrError, f as findPane, h as herdr, e as watchScreen, a$ as refreshNativeScreen, b0 as TOP, aT as readMenu, aV as menuIdentity, b as screenChoices, aY as clickMovesOnly, 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';
@@ -20,8 +20,8 @@ import 'web-push';
20
20
  import 'node:os';
21
21
  import 'node:child_process';
22
22
  import 'node:net';
23
- import 'node:readline';
24
23
  import 'node:fs/promises';
24
+ import 'node:readline';
25
25
  import 'node:dns';
26
26
  import 'node:util';
27
27
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -31,32 +31,46 @@ import 'node:url';
31
31
 
32
32
  const KEYS = /* @__PURE__ */ new Set(["up", "down", "enter", "esc", "left", "right"]);
33
33
  const nav_post = defineApi(async (event, b) => {
34
- var _a;
34
+ var _a, _b, _c, _d, _e;
35
35
  if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
36
36
  const pane = b.pane_id;
37
+ if ((_a = findPane(pane)) == null ? void 0 : _a.stopped) throw new HerdrError("stale", "Use the restart buttons for this stopped agent.");
37
38
  const key = String(b.key || "");
38
39
  if (!KEYS.has(key)) throw new HerdrError("bad_request", "Invalid key");
39
- const r = await herdr("pane.read", { pane_id: pane, source: "detection" }, 4e3);
40
- const text = r.read && r.read.text;
41
- const agent = (_a = findPane(pane)) == null ? void 0 : _a.agent;
42
- const framed = agent !== "omp" && String(text || "").split("\n").some((l) => TOP.test(l));
43
- const menu = framed ? await readMenu(pane) : null;
44
- if (menu) {
45
- if (key === "enter" && clickMovesOnly(menu)) throw new HerdrError("stale", "Enter doesn\u2019t confirm from here \u2014 use the buttons.");
46
- if (key === "left" || key === "right") throw new HerdrError("stale", "The screen has changed \u2014 check the current screen.");
47
- } else {
48
- const choices = screenChoices(text, agent);
49
- if (!choices || (key === "left" || key === "right") && !(choices.tabs && !choices.typing)) {
50
- throw new HerdrError("stale", "The screen has changed \u2014 check the current screen.");
40
+ try {
41
+ const shown = findPane(pane);
42
+ if ((key === "up" || key === "down") && shown && !shown.leaving && shown.status !== "working" && !((_b = shown.menu) == null ? void 0 : _b.unavailable) && !((_c = shown.prompt) == null ? void 0 : _c.unavailable) && (shown.menu || shown.prompt)) {
43
+ await herdr("pane.send_input", { pane_id: pane, keys: [key] });
44
+ watchScreen(pane, 3e4);
45
+ setTimeout(() => refreshNativeScreen(pane), 50);
46
+ return { ok: true };
51
47
  }
52
- }
53
- await herdr("pane.send_input", { pane_id: pane, keys: [key] });
54
- watchScreen(pane, 3e4);
55
- for (const ms of [50, 150, 400]) setTimeout(() => {
48
+ const r = await herdr("pane.read", { pane_id: pane, source: "detection" }, 4e3);
49
+ const text = r.read && r.read.text;
50
+ const agent = (_d = findPane(pane)) == null ? void 0 : _d.agent;
51
+ const framed = agent !== "omp" && String(text || "").split("\n").some((l) => TOP.test(l));
52
+ const menu = framed ? await readMenu(pane) : null;
53
+ if (key === "enter") {
54
+ const current = menu ? menuIdentity(menu) : (_e = screenChoices(text, agent)) == null ? void 0 : _e.identity;
55
+ if (!b.identity || current !== b.identity) throw new HerdrError("stale", "The question has changed \u2014 check the current screen.");
56
+ }
57
+ if (menu) {
58
+ if (key === "enter" && clickMovesOnly(menu)) throw new HerdrError("stale", "Enter doesn\u2019t confirm from here \u2014 use the buttons.");
59
+ if (key === "left" || key === "right") throw new HerdrError("stale", "The screen has changed \u2014 check the current screen.");
60
+ } else {
61
+ const choices = screenChoices(text, agent);
62
+ if (!choices || (key === "left" || key === "right") && !(choices.tabs && !choices.typing)) {
63
+ throw new HerdrError("stale", "The screen has changed \u2014 check the current screen.");
64
+ }
65
+ }
66
+ await herdr("pane.send_input", { pane_id: pane, keys: [key] });
67
+ watchScreen(pane, 3e4);
68
+ setTimeout(() => refreshNativeScreen(pane), 50);
69
+ return { ok: true };
70
+ } finally {
56
71
  choicesCache.delete(pane);
57
- poll();
58
- }, ms);
59
- return { ok: true };
72
+ setTimeout(poll, 0);
73
+ }
60
74
  });
61
75
 
62
76
  export { nav_post as default };
@@ -21,8 +21,8 @@ import 'web-push';
21
21
  import 'node:os';
22
22
  import 'node:child_process';
23
23
  import 'node:net';
24
- import 'node:readline';
25
24
  import 'node:fs/promises';
25
+ import 'node:readline';
26
26
  import 'node:dns';
27
27
  import 'node:util';
28
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -21,8 +21,8 @@ import 'web-push';
21
21
  import 'node:os';
22
22
  import 'node:child_process';
23
23
  import 'node:net';
24
- import 'node:readline';
25
24
  import 'node:fs/promises';
25
+ import 'node:readline';
26
26
  import 'node:dns';
27
27
  import 'node:util';
28
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -1,4 +1,4 @@
1
- import { a as defineApi, ax as phoneAccess, s as sendError, ay as phoneStatus } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, b2 as phoneAccess, s as sendError, b3 as phoneStatus } from '../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -20,8 +20,8 @@ import 'web-push';
20
20
  import 'node:os';
21
21
  import 'node:child_process';
22
22
  import 'node:net';
23
- import 'node:readline';
24
23
  import 'node:fs/promises';
24
+ import 'node:readline';
25
25
  import 'node:dns';
26
26
  import 'node:util';
27
27
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -1,4 +1,4 @@
1
- import { a as defineApi, ax as phoneAccess, s as sendError, az as phoneAction } from '../../nitro/nitro.mjs';
1
+ import { a as defineApi, b2 as phoneAccess, s as sendError, b4 as phoneAction } from '../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -20,8 +20,8 @@ import 'web-push';
20
20
  import 'node:os';
21
21
  import 'node:child_process';
22
22
  import 'node:net';
23
- import 'node:readline';
24
23
  import 'node:fs/promises';
24
+ import 'node:readline';
25
25
  import 'node:dns';
26
26
  import 'node:util';
27
27
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -21,8 +21,8 @@ import 'web-push';
21
21
  import 'node:os';
22
22
  import 'node:child_process';
23
23
  import 'node:net';
24
- import 'node:readline';
25
24
  import 'node:fs/promises';
25
+ import 'node:readline';
26
26
  import 'node:dns';
27
27
  import 'node:util';
28
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -30,6 +30,9 @@ import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
30
30
  import '@simplewebauthn/server';
31
31
  import 'node:url';
32
32
  import '../../../_/projectBoard.mjs';
33
+ import '../../../_/projectsPlugin.mjs';
34
+ import '../../../_/projectsPlugin2.mjs';
35
+ import '../../../_/pluginPolicy.mjs';
33
36
  import '../../../_/projectsActions.mjs';
34
37
 
35
38
  const actions_get = defineApi(async (event) => {
@@ -21,8 +21,8 @@ import 'web-push';
21
21
  import 'node:os';
22
22
  import 'node:child_process';
23
23
  import 'node:net';
24
- import 'node:readline';
25
24
  import 'node:fs/promises';
25
+ import 'node:readline';
26
26
  import 'node:dns';
27
27
  import 'node:util';
28
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -30,6 +30,9 @@ import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
30
30
  import '@simplewebauthn/server';
31
31
  import 'node:url';
32
32
  import '../../../_/projectBoard.mjs';
33
+ import '../../../_/projectsPlugin.mjs';
34
+ import '../../../_/projectsPlugin2.mjs';
35
+ import '../../../_/pluginPolicy.mjs';
33
36
  import '../../../_/projectsActions.mjs';
34
37
 
35
38
  const invoke_post = defineApi((_event, b) => invokePluginAction(b));
@@ -21,8 +21,8 @@ import 'web-push';
21
21
  import 'node:os';
22
22
  import 'node:child_process';
23
23
  import 'node:net';
24
- import 'node:readline';
25
24
  import 'node:fs/promises';
25
+ import 'node:readline';
26
26
  import 'node:dns';
27
27
  import 'node:util';
28
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -30,6 +30,9 @@ import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
30
30
  import '@simplewebauthn/server';
31
31
  import 'node:url';
32
32
  import '../../../_/projectBoard.mjs';
33
+ import '../../../_/projectsPlugin.mjs';
34
+ import '../../../_/projectsPlugin2.mjs';
35
+ import '../../../_/pluginPolicy.mjs';
33
36
  import '../../../_/projectsActions.mjs';
34
37
 
35
38
  const profiles_get = defineApi(async (event) => {
@@ -1,5 +1,5 @@
1
- import { a as defineApi, i as getQuery, M as MACHINE_KEY_RE, H as HerdrError, G as getMachine } from '../../../nitro/nitro.mjs';
2
- import { p as projectsPluginState } from '../../../_/projectsPlugin.mjs';
1
+ import { a as defineApi, i as getQuery, a5 as MACHINE_KEY_RE, H as HerdrError, a6 as getMachine } from '../../../nitro/nitro.mjs';
2
+ import { p as projectsPluginState } from '../../../_/projectsPlugin2.mjs';
3
3
  import 'node:http';
4
4
  import 'node:https';
5
5
  import 'node:crypto';
@@ -21,14 +21,15 @@ import 'web-push';
21
21
  import 'node:os';
22
22
  import 'node:child_process';
23
23
  import 'node:net';
24
- import 'node:readline';
25
24
  import 'node:fs/promises';
25
+ import 'node:readline';
26
26
  import 'node:dns';
27
27
  import 'node:util';
28
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
29
29
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
30
30
  import '@simplewebauthn/server';
31
31
  import 'node:url';
32
+ import '../../../_/projectsPlugin.mjs';
32
33
 
33
34
  const projects_get = defineApi(async (event) => {
34
35
  const key = getQuery(event).machine;
@@ -1,5 +1,5 @@
1
- import { a as defineApi, M as MACHINE_KEY_RE, H as HerdrError, G as getMachine } from '../../../nitro/nitro.mjs';
2
- import { i as installProjectsPlugin } from '../../../_/projectsPlugin.mjs';
1
+ import { a as defineApi, a5 as MACHINE_KEY_RE, H as HerdrError, a6 as getMachine } from '../../../nitro/nitro.mjs';
2
+ import { i as installProjectsPlugin } from '../../../_/projectsPlugin2.mjs';
3
3
  import 'node:http';
4
4
  import 'node:https';
5
5
  import 'node:crypto';
@@ -21,14 +21,15 @@ import 'web-push';
21
21
  import 'node:os';
22
22
  import 'node:child_process';
23
23
  import 'node:net';
24
- import 'node:readline';
25
24
  import 'node:fs/promises';
25
+ import 'node:readline';
26
26
  import 'node:dns';
27
27
  import 'node:util';
28
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
29
29
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
30
30
  import '@simplewebauthn/server';
31
31
  import 'node:url';
32
+ import '../../../_/projectsPlugin.mjs';
32
33
 
33
34
  const projects_post = defineApi(async (_event, body) => {
34
35
  const key = body.machine;
@@ -1,4 +1,4 @@
1
- import { a as defineApi, aE as currentMachineSlots } from '../../../nitro/nitro.mjs';
1
+ import { a as defineApi, u as currentMachineSlots } from '../../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -20,8 +20,8 @@ import 'web-push';
20
20
  import 'node:os';
21
21
  import 'node:child_process';
22
22
  import 'node:net';
23
- import 'node:readline';
24
23
  import 'node:fs/promises';
24
+ import 'node:readline';
25
25
  import 'node:dns';
26
26
  import 'node:util';
27
27
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -1,4 +1,4 @@
1
- import { a as defineApi, aI as limitMachineKeys, H as HerdrError, aJ as validLimit, aK as readThreadLimits, aL as writeThreadLimits, aE as currentMachineSlots } from '../../../nitro/nitro.mjs';
1
+ import { a as defineApi, b5 as limitMachineKeys, H as HerdrError, b6 as validLimit, b7 as readThreadLimits, b8 as writeThreadLimits, u as currentMachineSlots } from '../../../nitro/nitro.mjs';
2
2
  import 'node:http';
3
3
  import 'node:https';
4
4
  import 'node:crypto';
@@ -20,8 +20,8 @@ import 'web-push';
20
20
  import 'node:os';
21
21
  import 'node:child_process';
22
22
  import 'node:net';
23
- import 'node:readline';
24
23
  import 'node:fs/promises';
24
+ import 'node:readline';
25
25
  import 'node:dns';
26
26
  import 'node:util';
27
27
  import 'qrcode-terminal/vendor/QRCode/index.js';
@@ -0,0 +1,44 @@
1
+ import { a as defineApi, f as findPane, i as getQuery, H as HerdrError } from '../../../nitro/nitro.mjs';
2
+ import { r as readInbox } from '../../../_/projectInbox.mjs';
3
+ import 'node:http';
4
+ import 'node:https';
5
+ import 'node:crypto';
6
+ import 'stream';
7
+ import 'events';
8
+ import 'http';
9
+ import 'crypto';
10
+ import 'buffer';
11
+ import 'zlib';
12
+ import 'https';
13
+ import 'net';
14
+ import 'tls';
15
+ import 'url';
16
+ import 'node:events';
17
+ import 'node:buffer';
18
+ import 'node:fs';
19
+ import 'node:path';
20
+ import 'web-push';
21
+ import 'node:os';
22
+ import 'node:child_process';
23
+ import 'node:net';
24
+ import 'node:fs/promises';
25
+ import 'node:readline';
26
+ import 'node:dns';
27
+ import 'node:util';
28
+ import 'qrcode-terminal/vendor/QRCode/index.js';
29
+ import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
30
+ import '@simplewebauthn/server';
31
+ import 'node:url';
32
+ import '../../../_/projectThreads.mjs';
33
+ import '../../../_/projectBoard.mjs';
34
+ import '../../../_/projectsPlugin.mjs';
35
+ import '../../../_/pluginPolicy.mjs';
36
+
37
+ const inbox_get = defineApi(async (event) => {
38
+ const p = findPane(String(getQuery(event).pane || ""));
39
+ if (!p) throw new HerdrError("bad_pane", "Pane not found");
40
+ return readInbox(p);
41
+ });
42
+
43
+ export { inbox_get as default };
44
+ //# sourceMappingURL=inbox.get.mjs.map
@@ -0,0 +1,44 @@
1
+ import { a as defineApi, f as findPane, H as HerdrError } from '../../../nitro/nitro.mjs';
2
+ import { m as markInboxDone } from '../../../_/projectInbox.mjs';
3
+ import 'node:http';
4
+ import 'node:https';
5
+ import 'node:crypto';
6
+ import 'stream';
7
+ import 'events';
8
+ import 'http';
9
+ import 'crypto';
10
+ import 'buffer';
11
+ import 'zlib';
12
+ import 'https';
13
+ import 'net';
14
+ import 'tls';
15
+ import 'url';
16
+ import 'node:events';
17
+ import 'node:buffer';
18
+ import 'node:fs';
19
+ import 'node:path';
20
+ import 'web-push';
21
+ import 'node:os';
22
+ import 'node:child_process';
23
+ import 'node:net';
24
+ import 'node:fs/promises';
25
+ import 'node:readline';
26
+ import 'node:dns';
27
+ import 'node:util';
28
+ import 'qrcode-terminal/vendor/QRCode/index.js';
29
+ import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
30
+ import '@simplewebauthn/server';
31
+ import 'node:url';
32
+ import '../../../_/projectThreads.mjs';
33
+ import '../../../_/projectBoard.mjs';
34
+ import '../../../_/projectsPlugin.mjs';
35
+ import '../../../_/pluginPolicy.mjs';
36
+
37
+ const inbox_post = defineApi(async (_event, body) => {
38
+ const p = findPane(String(body.pane_id || ""));
39
+ if (!p) throw new HerdrError("bad_pane", "Pane not found");
40
+ return markInboxDone(p, body.id);
41
+ });
42
+
43
+ export { inbox_post as default };
44
+ //# sourceMappingURL=inbox.post.mjs.map
@@ -0,0 +1,43 @@
1
+ import { a as defineApi, i as getQuery, f as findPane, H as HerdrError } from '../../../nitro/nitro.mjs';
2
+ import { r as readProjectMemory, a as readMemoryFile } from '../../../_/projectDocs.mjs';
3
+ import 'node:http';
4
+ import 'node:https';
5
+ import 'node:crypto';
6
+ import 'stream';
7
+ import 'events';
8
+ import 'http';
9
+ import 'crypto';
10
+ import 'buffer';
11
+ import 'zlib';
12
+ import 'https';
13
+ import 'net';
14
+ import 'tls';
15
+ import 'url';
16
+ import 'node:events';
17
+ import 'node:buffer';
18
+ import 'node:fs';
19
+ import 'node:path';
20
+ import 'web-push';
21
+ import 'node:os';
22
+ import 'node:child_process';
23
+ import 'node:net';
24
+ import 'node:fs/promises';
25
+ import 'node:readline';
26
+ import 'node:dns';
27
+ import 'node:util';
28
+ import 'qrcode-terminal/vendor/QRCode/index.js';
29
+ import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
30
+ import '@simplewebauthn/server';
31
+ import 'node:url';
32
+ import '../../../_/projectBoard.mjs';
33
+ import '../../../_/projectsPlugin.mjs';
34
+
35
+ const memory_get = defineApi(async (event) => {
36
+ const q = getQuery(event);
37
+ const p = findPane(String(q.pane || ""));
38
+ if (!p) throw new HerdrError("bad_pane", "Pane not found");
39
+ return q.name === void 0 ? readProjectMemory(p) : readMemoryFile(p, q.name);
40
+ });
41
+
42
+ export { memory_get as default };
43
+ //# sourceMappingURL=memory.get.mjs.map
@@ -1,5 +1,5 @@
1
1
  import { a as defineApi, i as getQuery, f as findPane, H as HerdrError } from '../../../nitro/nitro.mjs';
2
- import { a as readThreadReport } from '../../../_/projectBoard.mjs';
2
+ import { e as readThreadReport } from '../../../_/projectBoard.mjs';
3
3
  import 'node:http';
4
4
  import 'node:https';
5
5
  import 'node:crypto';
@@ -21,14 +21,15 @@ import 'web-push';
21
21
  import 'node:os';
22
22
  import 'node:child_process';
23
23
  import 'node:net';
24
- import 'node:readline';
25
24
  import 'node:fs/promises';
25
+ import 'node:readline';
26
26
  import 'node:dns';
27
27
  import 'node:util';
28
28
  import 'qrcode-terminal/vendor/QRCode/index.js';
29
29
  import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
30
30
  import '@simplewebauthn/server';
31
31
  import 'node:url';
32
+ import '../../../_/projectsPlugin.mjs';
32
33
 
33
34
  const report_get = defineApi(async (event) => {
34
35
  const q = getQuery(event);