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,148 +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
- import '../../_/projectsPlugin.mjs';
33
-
34
- const RESOLVED_KEPT = 20;
35
-
36
- const READ_DEADLINE_MS = 4e3;
37
- const INFLIGHT_MAX_MS = 6e4;
38
- const REUSE_MS = 5e3;
39
- const cache = /* @__PURE__ */ new Map();
40
- const inflight = /* @__PURE__ */ new Map();
41
- function groupProjects(panes) {
42
- const groups = /* @__PURE__ */ new Map();
43
- for (const p of panes) {
44
- const cwd = (p.cwd || "").replace(/\/+$/, "");
45
- const slug = projectOf(p);
46
- if (!isCoordinator(p) || !slug || !path.posix.isAbsolute(cwd)) continue;
47
- const dirName = path.posix.basename(cwd);
48
- if (dirName.toLowerCase() !== slug.toLowerCase()) continue;
49
- const key = `${paneBaseMachine(p)}|${cwd}`;
50
- const g = groups.get(key);
51
- if (g) g.panes.push(p);
52
- else groups.set(key, { key, slug: dirName, panes: [p] });
53
- }
54
- return [...groups.values()];
55
- }
56
- function isOnline(machine) {
57
- var _a;
58
- if (!machine) return true;
59
- const info = (_a = getState().machines) == null ? void 0 : _a.find((m) => m.key === machine);
60
- return !info || info.status === "online";
61
- }
62
- function startRead(key, pane, since) {
63
- const running = inflight.get(key);
64
- if (running && Date.now() - running.since < INFLIGHT_MAX_MS) return running.read;
65
- const read = readProjectBoard(pane, since).then((r) => {
66
- const at = Date.now();
67
- if ("same" in r) {
68
- const kept = cache.get(key);
69
- if (kept) kept.at = at;
70
- return;
71
- }
72
- const board = "available" in r ? null : r;
73
- cache.set(key, { board, digest: createHash("sha1").update(JSON.stringify(board)).digest("hex"), at });
74
- }).finally(() => {
75
- var _a;
76
- if (((_a = inflight.get(key)) == null ? void 0 : _a.read) === read) inflight.delete(key);
77
- });
78
- inflight.set(key, { read, since: Date.now() });
79
- return read;
80
- }
81
- async function withDeadline(read) {
82
- const late = Promise.withResolvers();
83
- const timer = setTimeout(() => late.reject(new Error("Board read timed out")), READ_DEADLINE_MS);
84
- try {
85
- await Promise.race([read, late.promise]);
86
- } finally {
87
- clearTimeout(timer);
88
- }
89
- }
90
- async function readGroup(g, refresh) {
91
- var _a, _b, _c, _d;
92
- const pane = (_a = pickCoordinator(g.panes, g.slug)) != null ? _a : g.panes[0];
93
- const panes = [pane, ...g.panes.filter((p) => p !== pane)].map((p) => p.id);
94
- const project = { key: g.key, slug: g.slug, panes, board: null };
95
- let failure;
96
- const kept = cache.get(g.key);
97
- if (!isOnline(pane.machine)) {
98
- failure = "";
99
- } else if (refresh || !kept || Date.now() - kept.at >= REUSE_MS) {
100
- try {
101
- await withDeadline(startRead(g.key, pane, refresh ? void 0 : (_b = kept == null ? void 0 : kept.board) == null ? void 0 : _b.version));
102
- } catch (e) {
103
- failure = e.message || "Board read failed";
104
- }
105
- }
106
- const board = (_d = (_c = cache.get(g.key)) == null ? void 0 : _c.board) != null ? _d : null;
107
- if (board) {
108
- project.board = { ...board, resolved: board.resolved.slice(0, RESOLVED_KEPT) };
109
- project.resolvedTotal = board.resolved.length;
110
- }
111
- if (failure !== void 0) {
112
- project.stale = true;
113
- if (failure) project.error = failure;
114
- }
115
- return project;
116
- }
117
- function versionOf(projects) {
118
- const h = createHash("sha1");
119
- h.update(JSON.stringify(projects.map((p) => {
120
- var _a, _b, _c, _d;
121
- 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];
122
- })));
123
- return h.digest("hex").slice(0, 16);
124
- }
125
- async function readGlobalBoard(since, refresh = []) {
126
- const groups = groupProjects(getState().panes);
127
- const keys = new Set(groups.map((g) => g.key));
128
- for (const k of cache.keys()) if (!keys.has(k)) cache.delete(k);
129
- const again = new Set(refresh);
130
- const projects = await Promise.all(groups.map((g) => readGroup(g, again.has(g.key))));
131
- projects.sort((a, b) => a.slug.localeCompare(b.slug) || (a.key < b.key ? -1 : 1));
132
- const version = versionOf(projects);
133
- if (since === version) return { same: true, version };
134
- return { version, projects };
135
- }
136
-
137
- const REFRESH_KEYS = 50;
138
- const REFRESH_KEY_CHARS = 400;
139
- const board_get = defineApi(async (event) => {
140
- var _a;
141
- const q = getQuery(event);
142
- const raw = [(_a = q.refresh) != null ? _a : []].flat();
143
- const refresh = raw.filter((k) => typeof k === "string" && !!k && k.length <= REFRESH_KEY_CHARS).slice(0, REFRESH_KEYS);
144
- return readGlobalBoard(typeof q.since === "string" ? q.since.slice(0, 64) : void 0, refresh);
145
- });
146
-
147
- export { board_get as default };
148
- //# sourceMappingURL=board.get.mjs.map
@@ -1,45 +0,0 @@
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
- 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,44 +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 '../../../_/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
@@ -1,44 +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 '../../../_/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
@@ -1,43 +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
- 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,44 +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 '../../../_/projectsPlugin.mjs';
35
- import '../../../_/pluginPolicy.mjs';
36
-
37
- const routines_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 readRoutines(p);
41
- });
42
-
43
- export { routines_get as default };
44
- //# sourceMappingURL=routines.get.mjs.map
@@ -1,45 +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 '../../../_/projectsPlugin.mjs';
35
- import '../../../_/pluginPolicy.mjs';
36
-
37
- const thread_get = defineApi(async (event) => {
38
- const q = getQuery(event);
39
- const p = findPane(String(q.pane || ""));
40
- if (!p) throw new HerdrError("bad_pane", "Pane not found");
41
- return readThreadDetail(p, q.id);
42
- });
43
-
44
- export { thread_get as default };
45
- //# sourceMappingURL=thread.get.mjs.map
@@ -1,47 +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 '../../../_/projectsPlugin.mjs';
35
- import '../../../_/projectsPlugin2.mjs';
36
- import '../../../_/pluginPolicy.mjs';
37
- import '../../../_/projectsActions.mjs';
38
- import '../../../_/projectThreads.mjs';
39
-
40
- const thread_post = defineApi(async (_event, body) => {
41
- const p = findPane(String(body.pane_id || ""));
42
- if (!p) throw new HerdrError("bad_pane", "Pane not found");
43
- return runThreadAction(p, body.id, body.action, (t, run) => withoutContainerTicker(t.m, run));
44
- });
45
-
46
- export { thread_post as default };
47
- //# 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 "$@"