wherdr 1.3.3 → 2.0.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 (252) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/BDNMzG2s.js +1 -0
  3. package/.output/public/_nuxt/BETID3_E.js +1 -0
  4. package/.output/public/_nuxt/BHenDMeH.js +1 -0
  5. package/.output/public/_nuxt/BYZVrreW.js +1 -0
  6. package/.output/public/_nuxt/BhgehRdJ.js +1 -0
  7. package/.output/public/_nuxt/{yzABg5xl.js → Bpoxvzh6.js} +1 -1
  8. package/.output/public/_nuxt/BtH82ZuZ.js +9 -0
  9. package/.output/public/_nuxt/C25ROUa9.js +3 -0
  10. package/.output/public/_nuxt/C3Bkn4ac.js +62 -0
  11. package/.output/public/_nuxt/CDWjMk9C.js +2 -0
  12. package/.output/public/_nuxt/{Ci8N4mWR.js → CXJnLmWv.js} +1 -1
  13. package/.output/public/_nuxt/CuUQ4mEf.js +1 -0
  14. package/.output/public/_nuxt/DFGEl0v2.js +23 -0
  15. package/.output/public/_nuxt/{CKhgznq4.js → DFmgQVme.js} +42 -39
  16. package/.output/public/_nuxt/DZGKxROq.js +6 -0
  17. package/.output/public/_nuxt/DmkWvmnE.js +2 -0
  18. package/.output/public/_nuxt/DrKKeFFE.js +31 -0
  19. package/.output/public/_nuxt/DyfFwwGq.js +1 -0
  20. package/.output/public/_nuxt/FaNto0ga.js +105 -0
  21. package/.output/public/_nuxt/NIF0VwHk.js +25 -0
  22. package/.output/public/_nuxt/R0Y4VoeX.js +1 -0
  23. package/.output/public/_nuxt/board.CEEcFc6M.css +1 -0
  24. package/.output/public/_nuxt/builds/latest.json +1 -1
  25. package/.output/public/_nuxt/builds/meta/0b28b3e9-664e-4347-a35b-afb0a711d5c5.json +1 -0
  26. package/.output/public/_nuxt/entry.CKoXcwRa.css +2 -0
  27. package/.output/public/_nuxt/pdf.min.t82Z80JU.mjs +28 -0
  28. package/.output/public/_nuxt/pdf.worker.min.wgc6bjNh.mjs +28 -0
  29. package/.output/public/_nuxt/settings.Cdb21nNw.css +1 -0
  30. package/.output/public/sw.js +1 -1
  31. package/.output/server/chunks/_/branding.mjs +1 -1
  32. package/.output/server/chunks/_/changes.mjs +4 -4
  33. package/.output/server/chunks/_/fileDownload.mjs +278 -0
  34. package/.output/server/chunks/_/files.mjs +60 -20
  35. package/.output/server/chunks/_/machineOrder.mjs +1 -1
  36. package/.output/server/chunks/_/onboarding.mjs +1 -1
  37. package/.output/server/chunks/_/package.mjs +11 -3
  38. package/.output/server/chunks/_/plugins.mjs +92 -122
  39. package/.output/server/chunks/_/restart.mjs +1 -1
  40. package/.output/server/chunks/_/selfupdate.mjs +1 -1
  41. package/.output/server/chunks/_/settingstabs.mjs +36 -0
  42. package/.output/server/chunks/_/updates.mjs +1 -1
  43. package/.output/server/chunks/_/worktrees.mjs +1 -1
  44. package/.output/server/chunks/_/ws.mjs +43 -6
  45. package/.output/server/chunks/nitro/nitro.mjs +14126 -10238
  46. package/.output/server/chunks/raw/check-doc-links.mjs +5 -0
  47. package/.output/server/chunks/raw/check-leaks.mjs +1 -1
  48. package/.output/server/chunks/raw/check-release-notes.mjs +5 -0
  49. package/.output/server/chunks/raw/herdr-plugin.mjs +1 -1
  50. package/.output/server/chunks/raw/install-claude-statusline.mjs +1 -1
  51. package/.output/server/chunks/raw/prerelease-summary.mjs +5 -0
  52. package/.output/server/chunks/raw/prerelease.mjs +7 -0
  53. package/.output/server/chunks/raw/reveal.mjs +1 -1
  54. package/.output/server/chunks/raw/test-affected.mjs +5 -0
  55. package/.output/server/chunks/routes/api/_..._.mjs +6 -5
  56. package/.output/server/chunks/routes/api/agents.post.mjs +6 -5
  57. package/.output/server/chunks/routes/api/ask-tab.post.mjs +6 -5
  58. package/.output/server/chunks/routes/api/attach.post.mjs +6 -5
  59. package/.output/server/chunks/routes/api/auth/disable.post.mjs +6 -5
  60. package/.output/server/chunks/routes/api/auth/lock-all.post.mjs +6 -5
  61. package/.output/server/chunks/routes/api/auth/lock.post.mjs +6 -5
  62. package/.output/server/chunks/routes/api/auth/login/options.post.mjs +6 -5
  63. package/.output/server/chunks/routes/api/auth/login/verify.post.mjs +6 -5
  64. package/.output/server/chunks/routes/api/auth/max-session.post.mjs +6 -5
  65. package/.output/server/chunks/routes/api/auth/register/options.post.mjs +6 -5
  66. package/.output/server/chunks/routes/api/auth/register/verify.post.mjs +6 -5
  67. package/.output/server/chunks/routes/api/auth/status.get.mjs +6 -5
  68. package/.output/server/chunks/routes/api/changes.get.mjs +7 -6
  69. package/.output/server/chunks/routes/api/chat/image.get.mjs +7 -6
  70. package/.output/server/chunks/routes/api/chat.get.mjs +44 -11
  71. package/.output/server/chunks/routes/api/choose.post.mjs +44 -30
  72. package/.output/server/chunks/routes/api/claude-setup.post.mjs +42 -0
  73. package/.output/server/chunks/routes/api/claude-statusline.post.mjs +7 -6
  74. package/.output/server/chunks/routes/api/clear-queued-input.post.mjs +42 -0
  75. package/.output/server/chunks/routes/api/close/status.get.mjs +7 -6
  76. package/.output/server/chunks/routes/api/close.post.mjs +6 -5
  77. package/.output/server/chunks/routes/api/codex-update.post.mjs +7 -6
  78. package/.output/server/chunks/routes/api/commands.get.mjs +9 -7
  79. package/.output/server/chunks/routes/api/config.get.mjs +10 -13
  80. package/.output/server/chunks/routes/api/dirs.get.mjs +7 -6
  81. package/.output/server/chunks/routes/api/dismiss-stopped.post.mjs +7 -6
  82. package/.output/server/chunks/routes/api/dismiss.post.mjs +7 -6
  83. package/.output/server/chunks/routes/api/effort.post.mjs +7 -6
  84. package/.output/server/chunks/routes/api/efforts.get.mjs +7 -6
  85. package/.output/server/chunks/routes/api/file.post.mjs +7 -6
  86. package/.output/server/chunks/routes/api/files/download.get.mjs +12 -24
  87. package/.output/server/chunks/routes/api/files/download.head.mjs +41 -0
  88. package/.output/server/chunks/routes/api/files/read.get.mjs +8 -7
  89. package/.output/server/chunks/routes/api/files.get.mjs +7 -6
  90. package/.output/server/chunks/routes/api/health.get.mjs +6 -5
  91. package/.output/server/chunks/routes/api/input.post.mjs +33 -15
  92. package/.output/server/chunks/routes/api/interrupt.post.mjs +24 -21
  93. package/.output/server/chunks/routes/api/isgit.get.mjs +8 -8
  94. package/.output/server/chunks/routes/api/machine/awake.get.mjs +7 -6
  95. package/.output/server/chunks/routes/api/machine/awake.post.mjs +7 -6
  96. package/.output/server/chunks/routes/api/machine/order.get.mjs +6 -5
  97. package/.output/server/chunks/routes/api/machine/order.post.mjs +6 -5
  98. package/.output/server/chunks/routes/api/machine/reconnect.post.mjs +40 -0
  99. package/.output/server/chunks/routes/api/machine/rename.post.mjs +7 -6
  100. package/.output/server/chunks/routes/api/machine/status.post.mjs +39 -0
  101. package/.output/server/chunks/routes/api/menu-left.post.mjs +40 -0
  102. package/.output/server/chunks/routes/api/menu.post.mjs +10 -6
  103. package/.output/server/chunks/routes/api/model.post.mjs +7 -6
  104. package/.output/server/chunks/routes/api/models.get.mjs +7 -6
  105. package/.output/server/chunks/routes/api/nav.post.mjs +40 -26
  106. package/.output/server/chunks/routes/api/onboarding.get.mjs +6 -5
  107. package/.output/server/chunks/routes/api/onboarding.post.mjs +6 -5
  108. package/.output/server/chunks/routes/api/phone.get.mjs +8 -10
  109. package/.output/server/chunks/routes/api/phone.post.mjs +8 -10
  110. package/.output/server/chunks/routes/api/plugins/actions.get.mjs +6 -8
  111. package/.output/server/chunks/routes/api/plugins/invoke.post.mjs +6 -8
  112. package/.output/server/chunks/routes/api/plugins/projects.get.mjs +10 -8
  113. package/.output/server/chunks/routes/api/plugins/projects.post.mjs +11 -7
  114. package/.output/server/chunks/routes/api/prompt.post.mjs +22 -13
  115. package/.output/server/chunks/routes/api/push/quiet.post.mjs +7 -6
  116. package/.output/server/chunks/routes/api/push/subscribe.post.mjs +7 -7
  117. package/.output/server/chunks/routes/api/push/test.post.mjs +7 -6
  118. package/.output/server/chunks/routes/api/push/unsubscribe.post.mjs +7 -6
  119. package/.output/server/chunks/routes/api/quotas.get.mjs +7 -6
  120. package/.output/server/chunks/routes/api/rename.post.mjs +6 -5
  121. package/.output/server/chunks/routes/api/requeue.post.mjs +7 -6
  122. package/.output/server/chunks/routes/api/restart.get.mjs +6 -5
  123. package/.output/server/chunks/routes/api/restart.post.mjs +6 -5
  124. package/.output/server/chunks/routes/api/reveal.post.mjs +91 -8
  125. package/.output/server/chunks/routes/api/screen-key.post.mjs +19 -15
  126. package/.output/server/chunks/routes/api/screen.get.mjs +8 -40
  127. package/.output/server/chunks/routes/api/search.get.mjs +7 -6
  128. package/.output/server/chunks/routes/api/seen.post.mjs +7 -6
  129. package/.output/server/chunks/routes/api/sessions.get.mjs +7 -6
  130. package/.output/server/chunks/routes/api/sessions.post.mjs +7 -6
  131. package/.output/server/chunks/routes/api/settings-tab.post.mjs +90 -0
  132. package/.output/server/chunks/routes/api/{plugins/thread-limits.get.mjs → settings.get.mjs} +10 -9
  133. package/.output/server/chunks/routes/api/settings.post.mjs +40 -0
  134. package/.output/server/chunks/routes/api/space.post.mjs +34 -18
  135. package/.output/server/chunks/routes/api/state.get.mjs +7 -6
  136. package/.output/server/chunks/routes/api/tasks/action.post.mjs +39 -0
  137. package/.output/server/chunks/routes/api/{plugins/profiles.get.mjs → tasks/add.post.mjs} +12 -14
  138. package/.output/server/chunks/routes/api/tasks/after.post.mjs +39 -0
  139. package/.output/server/chunks/routes/api/tasks/approve.post.mjs +39 -0
  140. package/.output/server/chunks/routes/api/{project/report.get.mjs → tasks/archived.get.mjs} +12 -13
  141. package/.output/server/chunks/routes/api/{gitroot.get.mjs → tasks/autopilot.get.mjs} +13 -14
  142. package/.output/server/chunks/routes/api/tasks/autopilot.post.mjs +39 -0
  143. package/.output/server/chunks/routes/api/{index.get.mjs → tasks/board-settings.get.mjs} +12 -13
  144. package/.output/server/chunks/routes/api/tasks/board-settings.post.mjs +39 -0
  145. package/.output/server/chunks/routes/api/tasks/coordinator.get.mjs +40 -0
  146. package/.output/server/chunks/routes/api/tasks/coordinator.post.mjs +39 -0
  147. package/.output/server/chunks/routes/api/tasks/details.get.mjs +40 -0
  148. package/.output/server/chunks/routes/api/tasks/limit.post.mjs +39 -0
  149. package/.output/server/chunks/routes/api/tasks/links.get.mjs +39 -0
  150. package/.output/server/chunks/routes/api/tasks/models.get.mjs +40 -0
  151. package/.output/server/chunks/routes/api/tasks/pick.post.mjs +39 -0
  152. package/.output/server/chunks/routes/api/tasks/question.post.mjs +39 -0
  153. package/.output/server/chunks/routes/api/tasks/scheduled.get.mjs +40 -0
  154. package/.output/server/chunks/routes/api/{project → tasks}/settings.get.mjs +10 -11
  155. package/.output/server/chunks/routes/api/tasks/start.get.mjs +40 -0
  156. package/.output/server/chunks/routes/api/tasks/tell.post.mjs +39 -0
  157. package/.output/server/chunks/routes/api/tasks.get.mjs +39 -0
  158. package/.output/server/chunks/routes/api/unqueue.post.mjs +7 -6
  159. package/.output/server/chunks/routes/api/update/status.get.mjs +6 -5
  160. package/.output/server/chunks/routes/api/update.get.mjs +8 -10
  161. package/.output/server/chunks/routes/api/update.post.mjs +8 -10
  162. package/.output/server/chunks/routes/api/upload.post.mjs +7 -6
  163. package/.output/server/chunks/routes/api/worktrees/remove.post.mjs +6 -5
  164. package/.output/server/chunks/routes/api/worktrees.get.mjs +6 -5
  165. package/.output/server/chunks/routes/favicon.ico.get.mjs +6 -5
  166. package/.output/server/chunks/routes/icons/_name_.get.mjs +7 -6
  167. package/.output/server/chunks/routes/renderer.mjs +8 -7
  168. package/.output/server/chunks/routes/uploads/_...name_.get.mjs +7 -6
  169. package/.output/server/chunks/routes/ws/_..._.mjs +7 -6
  170. package/.output/server/chunks/routes/ws/events.mjs +9 -7
  171. package/.output/server/chunks/routes/ws/term.mjs +7 -6
  172. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  173. package/.output/server/index.mjs +7 -6
  174. package/.output/server/package.json +1 -1
  175. package/README.md +44 -1424
  176. package/bin/lib/commands.mjs +44 -9
  177. package/bin/lib/panel.mjs +3 -11
  178. package/bin/lib/service.mjs +41 -2
  179. package/bin/lib/skill.mjs +1 -1
  180. package/bin/lib/tailnet.d.mts +6 -3
  181. package/bin/lib/tailnet.mjs +70 -32
  182. package/bin/lib/userpath.d.mts +14 -0
  183. package/bin/lib/userpath.mjs +142 -0
  184. package/docs/README.md +58 -0
  185. package/docs/RELEASING.md +174 -0
  186. package/docs/board.md +164 -0
  187. package/docs/command.md +58 -0
  188. package/docs/configuration.md +39 -0
  189. package/docs/conversation.md +132 -0
  190. package/docs/development.md +38 -0
  191. package/docs/devices.md +58 -0
  192. package/docs/files.md +29 -0
  193. package/docs/herdr-projects-1x.md +278 -0
  194. package/docs/home.md +52 -0
  195. package/docs/installation.md +174 -0
  196. package/docs/machines.md +69 -0
  197. package/docs/migrate-from-1.x-docker.md +160 -0
  198. package/docs/networks.md +154 -0
  199. package/docs/notifications.md +83 -0
  200. package/docs/overview.md +71 -0
  201. package/docs/phone.md +26 -0
  202. package/docs/plugins.md +109 -0
  203. package/docs/quick-start.md +89 -0
  204. package/docs/quotas.md +65 -0
  205. package/docs/release-notes-2.0.0.md +84 -0
  206. package/docs/security.md +117 -0
  207. package/docs/terminal.md +15 -0
  208. package/docs/troubleshooting.md +45 -0
  209. package/package.json +11 -3
  210. package/skills/wherdr/SKILL.md +24 -167
  211. package/.output/public/_nuxt/B4Yk2tB1.js +0 -23
  212. package/.output/public/_nuxt/BBw_0a4M.js +0 -6
  213. package/.output/public/_nuxt/BSy6OCIY.js +0 -1
  214. package/.output/public/_nuxt/BX5PM2JQ.js +0 -1
  215. package/.output/public/_nuxt/BgPDnf2S.js +0 -1
  216. package/.output/public/_nuxt/BkOxQzbS.js +0 -2
  217. package/.output/public/_nuxt/CP8o925U.js +0 -1
  218. package/.output/public/_nuxt/CWwyK2XK.js +0 -2
  219. package/.output/public/_nuxt/CkbmecwS.js +0 -1
  220. package/.output/public/_nuxt/Cr3SrGky.js +0 -1
  221. package/.output/public/_nuxt/DAg9fiVh.js +0 -89
  222. package/.output/public/_nuxt/DT8qZ0Wv.js +0 -1
  223. package/.output/public/_nuxt/DaaJIRB3.js +0 -1
  224. package/.output/public/_nuxt/DcJi16XA.js +0 -1
  225. package/.output/public/_nuxt/SiL1FJ5s.js +0 -3
  226. package/.output/public/_nuxt/VpjCgSXu.js +0 -36
  227. package/.output/public/_nuxt/builds/meta/c735b6c0-1bd0-47d7-a208-d310f0a06287.json +0 -1
  228. package/.output/public/_nuxt/dPxB2L94.js +0 -89
  229. package/.output/public/_nuxt/entry.CGWKmYU3.css +0 -2
  230. package/.output/public/_nuxt/xYX85SPI.js +0 -1
  231. package/.output/server/chunks/_/pluginPolicy.mjs +0 -93
  232. package/.output/server/chunks/_/projectBoard.mjs +0 -366
  233. package/.output/server/chunks/_/projectDocs.mjs +0 -106
  234. package/.output/server/chunks/_/projectInbox.mjs +0 -135
  235. package/.output/server/chunks/_/projectThreads.mjs +0 -46
  236. package/.output/server/chunks/_/projectThreads2.mjs +0 -61
  237. package/.output/server/chunks/_/projectsActions.mjs +0 -143
  238. package/.output/server/chunks/_/projectsPlugin.mjs +0 -56
  239. package/.output/server/chunks/_/reveal.mjs +0 -115
  240. package/.output/server/chunks/raw/dev.wherdr.open.mjs +0 -7
  241. package/.output/server/chunks/raw/docker-entrypoint.mjs +0 -7
  242. package/.output/server/chunks/raw/install-host-open.mjs +0 -7
  243. package/.output/server/chunks/raw/wherdr-open.mjs +0 -7
  244. package/.output/server/chunks/routes/api/board.get.mjs +0 -147
  245. package/.output/server/chunks/routes/api/plugins/thread-limits.post.mjs +0 -45
  246. package/.output/server/chunks/routes/api/project/inbox.get.mjs +0 -43
  247. package/.output/server/chunks/routes/api/project/inbox.post.mjs +0 -43
  248. package/.output/server/chunks/routes/api/project/memory.get.mjs +0 -42
  249. package/.output/server/chunks/routes/api/project/routines.get.mjs +0 -43
  250. package/.output/server/chunks/routes/api/project/thread.get.mjs +0 -44
  251. package/.output/server/chunks/routes/api/project/thread.post.mjs +0 -45
  252. package/bin/install-docker-skill.sh +0 -20
@@ -1,147 +0,0 @@
1
- import { m as getState, n as projectOf, o as isCoordinator, q as paneBaseMachine, t as pickCoordinator, a as defineApi, i as getQuery } from '../../nitro/nitro.mjs';
2
- import { createHash } from 'node:crypto';
3
- import path from 'node:path';
4
- import { r as readProjectBoard } from '../../_/projectBoard.mjs';
5
- import 'node:http';
6
- import 'node:https';
7
- import 'stream';
8
- import 'events';
9
- import 'http';
10
- import 'crypto';
11
- import 'buffer';
12
- import 'zlib';
13
- import 'https';
14
- import 'net';
15
- import 'tls';
16
- import 'url';
17
- import 'node:events';
18
- import 'node:buffer';
19
- import 'node:fs';
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
-
33
- const RESOLVED_KEPT = 20;
34
-
35
- const READ_DEADLINE_MS = 4e3;
36
- const INFLIGHT_MAX_MS = 6e4;
37
- const REUSE_MS = 5e3;
38
- const cache = /* @__PURE__ */ new Map();
39
- const inflight = /* @__PURE__ */ new Map();
40
- function groupProjects(panes) {
41
- const groups = /* @__PURE__ */ new Map();
42
- for (const p of panes) {
43
- const cwd = (p.cwd || "").replace(/\/+$/, "");
44
- const slug = projectOf(p);
45
- if (!isCoordinator(p) || !slug || !path.posix.isAbsolute(cwd)) continue;
46
- const dirName = path.posix.basename(cwd);
47
- if (dirName.toLowerCase() !== slug.toLowerCase()) continue;
48
- const key = `${paneBaseMachine(p)}|${cwd}`;
49
- const g = groups.get(key);
50
- if (g) g.panes.push(p);
51
- else groups.set(key, { key, slug: dirName, panes: [p] });
52
- }
53
- return [...groups.values()];
54
- }
55
- function isOnline(machine) {
56
- var _a;
57
- if (!machine) return true;
58
- const info = (_a = getState().machines) == null ? void 0 : _a.find((m) => m.key === machine);
59
- return !info || info.status === "online";
60
- }
61
- function startRead(key, pane, since) {
62
- const running = inflight.get(key);
63
- if (running && Date.now() - running.since < INFLIGHT_MAX_MS) return running.read;
64
- const read = readProjectBoard(pane, since).then((r) => {
65
- const at = Date.now();
66
- if ("same" in r) {
67
- const kept = cache.get(key);
68
- if (kept) kept.at = at;
69
- return;
70
- }
71
- const board = "available" in r ? null : r;
72
- cache.set(key, { board, digest: createHash("sha1").update(JSON.stringify(board)).digest("hex"), at });
73
- }).finally(() => {
74
- var _a;
75
- if (((_a = inflight.get(key)) == null ? void 0 : _a.read) === read) inflight.delete(key);
76
- });
77
- inflight.set(key, { read, since: Date.now() });
78
- return read;
79
- }
80
- async function withDeadline(read) {
81
- const late = Promise.withResolvers();
82
- const timer = setTimeout(() => late.reject(new Error("Board read timed out")), READ_DEADLINE_MS);
83
- try {
84
- await Promise.race([read, late.promise]);
85
- } finally {
86
- clearTimeout(timer);
87
- }
88
- }
89
- async function readGroup(g, refresh) {
90
- var _a, _b, _c, _d;
91
- const pane = (_a = pickCoordinator(g.panes, g.slug)) != null ? _a : g.panes[0];
92
- const panes = [pane, ...g.panes.filter((p) => p !== pane)].map((p) => p.id);
93
- const project = { key: g.key, slug: g.slug, panes, board: null };
94
- let failure;
95
- const kept = cache.get(g.key);
96
- if (!isOnline(pane.machine)) {
97
- failure = "";
98
- } else if (refresh || !kept || Date.now() - kept.at >= REUSE_MS) {
99
- try {
100
- await withDeadline(startRead(g.key, pane, refresh ? void 0 : (_b = kept == null ? void 0 : kept.board) == null ? void 0 : _b.version));
101
- } catch (e) {
102
- failure = e.message || "Board read failed";
103
- }
104
- }
105
- const board = (_d = (_c = cache.get(g.key)) == null ? void 0 : _c.board) != null ? _d : null;
106
- if (board) {
107
- project.board = { ...board, resolved: board.resolved.slice(0, RESOLVED_KEPT) };
108
- project.resolvedTotal = board.resolved.length;
109
- }
110
- if (failure !== void 0) {
111
- project.stale = true;
112
- if (failure) project.error = failure;
113
- }
114
- return project;
115
- }
116
- function versionOf(projects) {
117
- const h = createHash("sha1");
118
- h.update(JSON.stringify(projects.map((p) => {
119
- var _a, _b, _c, _d;
120
- return [p.key, p.panes, (_b = (_a = cache.get(p.key)) == null ? void 0 : _a.digest) != null ? _b : null, (_c = p.stale) != null ? _c : false, (_d = p.error) != null ? _d : null];
121
- })));
122
- return h.digest("hex").slice(0, 16);
123
- }
124
- async function readGlobalBoard(since, refresh = []) {
125
- const groups = groupProjects(getState().panes);
126
- const keys = new Set(groups.map((g) => g.key));
127
- for (const k of cache.keys()) if (!keys.has(k)) cache.delete(k);
128
- const again = new Set(refresh);
129
- const projects = await Promise.all(groups.map((g) => readGroup(g, again.has(g.key))));
130
- projects.sort((a, b) => a.slug.localeCompare(b.slug) || (a.key < b.key ? -1 : 1));
131
- const version = versionOf(projects);
132
- if (since === version) return { same: true, version };
133
- return { version, projects };
134
- }
135
-
136
- const REFRESH_KEYS = 50;
137
- const REFRESH_KEY_CHARS = 400;
138
- const board_get = defineApi(async (event) => {
139
- var _a;
140
- const q = getQuery(event);
141
- const raw = [(_a = q.refresh) != null ? _a : []].flat();
142
- const refresh = raw.filter((k) => typeof k === "string" && !!k && k.length <= REFRESH_KEY_CHARS).slice(0, REFRESH_KEYS);
143
- return readGlobalBoard(typeof q.since === "string" ? q.since.slice(0, 64) : void 0, refresh);
144
- });
145
-
146
- export { board_get as default };
147
- //# sourceMappingURL=board.get.mjs.map
@@ -1,45 +0,0 @@
1
- import { a as defineApi, a_ as limitMachineKeys, H as HerdrError, a$ as validLimit, b0 as readThreadLimits, b1 as writeThreadLimits, u as currentMachineSlots } from '../../../nitro/nitro.mjs';
2
- import 'node:http';
3
- import 'node:https';
4
- import 'node:crypto';
5
- import 'stream';
6
- import 'events';
7
- import 'http';
8
- import 'crypto';
9
- import 'buffer';
10
- import 'zlib';
11
- import 'https';
12
- import 'net';
13
- import 'tls';
14
- import 'url';
15
- import 'node:events';
16
- import 'node:buffer';
17
- import 'node:fs';
18
- import 'node:path';
19
- import 'web-push';
20
- import 'node:os';
21
- import 'node:child_process';
22
- import 'node:net';
23
- import 'node:fs/promises';
24
- import 'node:readline';
25
- import 'node:dns';
26
- import 'node:util';
27
- import 'qrcode-terminal/vendor/QRCode/index.js';
28
- import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
29
- import '@simplewebauthn/server';
30
- import 'node:url';
31
-
32
- const threadLimits_post = defineApi(async (_event, body) => {
33
- const key = body.machine;
34
- const max = body.max;
35
- if (typeof key !== "string" || !limitMachineKeys().includes(key)) throw new HerdrError("bad_machine", "Unknown machine");
36
- if (max !== null && !validLimit(max)) throw new HerdrError("bad_limit", "Invalid thread limit");
37
- const limits = await readThreadLimits();
38
- if (max === null) delete limits[key];
39
- else limits[key] = max;
40
- await writeThreadLimits(limits);
41
- return { machines: await currentMachineSlots() };
42
- });
43
-
44
- export { threadLimits_post as default };
45
- //# sourceMappingURL=thread-limits.post.mjs.map
@@ -1,43 +0,0 @@
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 '../../../_/pluginPolicy.mjs';
35
-
36
- const inbox_get = defineApi(async (event) => {
37
- const p = findPane(String(getQuery(event).pane || ""));
38
- if (!p) throw new HerdrError("bad_pane", "Pane not found");
39
- return readInbox(p);
40
- });
41
-
42
- export { inbox_get as default };
43
- //# sourceMappingURL=inbox.get.mjs.map
@@ -1,43 +0,0 @@
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 '../../../_/pluginPolicy.mjs';
35
-
36
- const inbox_post = defineApi(async (_event, body) => {
37
- const p = findPane(String(body.pane_id || ""));
38
- if (!p) throw new HerdrError("bad_pane", "Pane not found");
39
- return markInboxDone(p, body.id);
40
- });
41
-
42
- export { inbox_post as default };
43
- //# sourceMappingURL=inbox.post.mjs.map
@@ -1,42 +0,0 @@
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
-
34
- const memory_get = defineApi(async (event) => {
35
- const q = getQuery(event);
36
- const p = findPane(String(q.pane || ""));
37
- if (!p) throw new HerdrError("bad_pane", "Pane not found");
38
- return q.name === void 0 ? readProjectMemory(p) : readMemoryFile(p, q.name);
39
- });
40
-
41
- export { memory_get as default };
42
- //# sourceMappingURL=memory.get.mjs.map
@@ -1,43 +0,0 @@
1
- import { a as defineApi, f as findPane, i as getQuery, H as HerdrError } from '../../../nitro/nitro.mjs';
2
- import { a as readRoutines } 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 '../../../_/pluginPolicy.mjs';
35
-
36
- const routines_get = defineApi(async (event) => {
37
- const p = findPane(String(getQuery(event).pane || ""));
38
- if (!p) throw new HerdrError("bad_pane", "Pane not found");
39
- return readRoutines(p);
40
- });
41
-
42
- export { routines_get as default };
43
- //# sourceMappingURL=routines.get.mjs.map
@@ -1,44 +0,0 @@
1
- import { a as defineApi, i as getQuery, f as findPane, H as HerdrError } from '../../../nitro/nitro.mjs';
2
- import { r as readThreadDetail } from '../../../_/projectThreads2.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 '../../../_/pluginPolicy.mjs';
35
-
36
- const thread_get = defineApi(async (event) => {
37
- const q = getQuery(event);
38
- const p = findPane(String(q.pane || ""));
39
- if (!p) throw new HerdrError("bad_pane", "Pane not found");
40
- return readThreadDetail(p, q.id);
41
- });
42
-
43
- export { thread_get as default };
44
- //# sourceMappingURL=thread.get.mjs.map
@@ -1,45 +0,0 @@
1
- import { a as defineApi, f as findPane, H as HerdrError } from '../../../nitro/nitro.mjs';
2
- import { w as withoutContainerTicker } from '../../../_/plugins.mjs';
3
- import { a as runThreadAction } from '../../../_/projectThreads2.mjs';
4
- import 'node:http';
5
- import 'node:https';
6
- import 'node:crypto';
7
- import 'stream';
8
- import 'events';
9
- import 'http';
10
- import 'crypto';
11
- import 'buffer';
12
- import 'zlib';
13
- import 'https';
14
- import 'net';
15
- import 'tls';
16
- import 'url';
17
- import 'node:events';
18
- import 'node:buffer';
19
- import 'node:fs';
20
- import 'node:path';
21
- import 'web-push';
22
- import 'node:os';
23
- import 'node:child_process';
24
- import 'node:net';
25
- import 'node:fs/promises';
26
- import 'node:readline';
27
- import 'node:dns';
28
- import 'node:util';
29
- import 'qrcode-terminal/vendor/QRCode/index.js';
30
- import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
31
- import '@simplewebauthn/server';
32
- import 'node:url';
33
- import '../../../_/projectBoard.mjs';
34
- import '../../../_/pluginPolicy.mjs';
35
- import '../../../_/projectsActions.mjs';
36
- import '../../../_/projectThreads.mjs';
37
-
38
- const thread_post = defineApi(async (_event, body) => {
39
- const p = findPane(String(body.pane_id || ""));
40
- if (!p) throw new HerdrError("bad_pane", "Pane not found");
41
- return runThreadAction(p, body.id, body.action, (t, run) => withoutContainerTicker(t.m, run));
42
- });
43
-
44
- export { thread_post as default };
45
- //# sourceMappingURL=thread.post.mjs.map
@@ -1,20 +0,0 @@
1
- #!/bin/sh
2
- # Run on the HOST after pulling an image; no container is started, no home mounted.
3
- # Usage: sh bin/install-docker-skill.sh <image> [refresh|install]
4
- extract_skill() (
5
- set -eu
6
- [ -n "${1:-}" ] || { echo 'usage: install-docker-skill.sh <image> [refresh|install]' >&2; exit 1; }
7
- [ "${WHERDR_SKILL:-}" != off ] || { echo 'wherdr skill: disabled by WHERDR_SKILL=off'; exit 0; }
8
- if [ "${2:-install}" != install ] && [ -e "${HOME:-}/.local/state/wherdr/skill-disabled" ]; then exit 0; fi
9
- helper=$(CDPATH= cd -- "$(dirname "$0")" && pwd -P)/lib/install-skill.sh
10
- tmp=$(mktemp -d)
11
- container=
12
- trap '[ -z "$container" ] || docker rm "$container" >/dev/null 2>&1; rm -rf "$tmp"' EXIT HUP INT TERM
13
- container=$(docker create -- "$1")
14
- mkdir -p "$tmp/skills/wherdr"
15
- # Only data crosses the image boundary. The executed helper is local.
16
- docker cp "$container:/app/skills/wherdr/SKILL.md" "$tmp/skills/wherdr/SKILL.md"
17
- sh "$helper" "${2:-install}" "$tmp"
18
- )
19
- # Unlike startup, manual and plugin callers see failures and useful diagnostics.
20
- extract_skill "$@"