wherdr 1.3.1 → 1.3.3

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 (180) 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/B4Yk2tB1.js +23 -0
  4. package/.output/public/_nuxt/BBw_0a4M.js +6 -0
  5. package/.output/public/_nuxt/{B6qBWHWB.js → BSy6OCIY.js} +1 -1
  6. package/.output/public/_nuxt/BX5PM2JQ.js +1 -0
  7. package/.output/public/_nuxt/BgPDnf2S.js +1 -0
  8. package/.output/public/_nuxt/BkOxQzbS.js +2 -0
  9. package/.output/public/_nuxt/{WLQjK8uJ.js → CKhgznq4.js} +45 -46
  10. package/.output/public/_nuxt/{C2T9fQ4f.js → CP8o925U.js} +1 -1
  11. package/.output/public/_nuxt/CkbmecwS.js +1 -0
  12. package/.output/public/_nuxt/Cr3SrGky.js +1 -0
  13. package/.output/public/_nuxt/DAg9fiVh.js +89 -0
  14. package/.output/public/_nuxt/DT8qZ0Wv.js +1 -0
  15. package/.output/public/_nuxt/DaaJIRB3.js +1 -0
  16. package/.output/public/_nuxt/DcJi16XA.js +1 -0
  17. package/.output/public/_nuxt/VpjCgSXu.js +36 -0
  18. package/.output/public/_nuxt/builds/latest.json +1 -1
  19. package/.output/public/_nuxt/builds/meta/c735b6c0-1bd0-47d7-a208-d310f0a06287.json +1 -0
  20. package/.output/public/_nuxt/dPxB2L94.js +89 -0
  21. package/.output/public/_nuxt/{entry.cKR16VqG.css → entry.CGWKmYU3.css} +1 -1
  22. package/.output/public/_nuxt/hePW80VL.js +1 -0
  23. package/.output/public/_nuxt/xYX85SPI.js +1 -0
  24. package/.output/public/sw.js +1 -1
  25. package/.output/server/chunks/_/branding.mjs +1 -1
  26. package/.output/server/chunks/_/filePaths.mjs +25 -0
  27. package/.output/server/chunks/_/files.mjs +204 -0
  28. package/.output/server/chunks/_/machineOrder.mjs +1 -1
  29. package/.output/server/chunks/_/onboarding.mjs +1 -1
  30. package/.output/server/chunks/_/package.mjs +97 -0
  31. package/.output/server/chunks/_/pluginPolicy.mjs +93 -0
  32. package/.output/server/chunks/_/plugins.mjs +4 -94
  33. package/.output/server/chunks/_/projectBoard.mjs +120 -29
  34. package/.output/server/chunks/_/projectDocs.mjs +106 -0
  35. package/.output/server/chunks/_/projectInbox.mjs +135 -0
  36. package/.output/server/chunks/_/projectThreads.mjs +46 -0
  37. package/.output/server/chunks/_/projectThreads2.mjs +61 -0
  38. package/.output/server/chunks/_/projectsActions.mjs +1 -1
  39. package/.output/server/chunks/_/projectsPlugin.mjs +1 -1
  40. package/.output/server/chunks/_/restart.mjs +2 -312
  41. package/.output/server/chunks/_/reveal.mjs +2 -24
  42. package/.output/server/chunks/_/selfupdate.mjs +83 -0
  43. package/.output/server/chunks/_/updates.mjs +91 -0
  44. package/.output/server/chunks/_/worktrees.mjs +1 -1
  45. package/.output/server/chunks/_/ws.mjs +1 -1
  46. package/.output/server/chunks/nitro/nitro.mjs +2660 -1061
  47. package/.output/server/chunks/raw/bump-homebrew.mjs +1 -1
  48. package/.output/server/chunks/raw/herdr-plugin.mjs +1 -1
  49. package/.output/server/chunks/raw/release-ready.mjs +5 -0
  50. package/.output/server/chunks/routes/api/_..._.mjs +6 -2
  51. package/.output/server/chunks/routes/api/agents.post.mjs +6 -2
  52. package/.output/server/chunks/routes/api/ask-tab.post.mjs +6 -2
  53. package/.output/server/chunks/routes/api/attach.post.mjs +6 -2
  54. package/.output/server/chunks/routes/api/auth/disable.post.mjs +6 -2
  55. package/.output/server/chunks/routes/api/auth/lock-all.post.mjs +6 -2
  56. package/.output/server/chunks/routes/api/auth/lock.post.mjs +6 -2
  57. package/.output/server/chunks/routes/api/auth/login/options.post.mjs +6 -2
  58. package/.output/server/chunks/routes/api/auth/login/verify.post.mjs +6 -2
  59. package/.output/server/chunks/routes/api/auth/max-session.post.mjs +6 -2
  60. package/.output/server/chunks/routes/api/auth/register/options.post.mjs +6 -2
  61. package/.output/server/chunks/routes/api/auth/register/verify.post.mjs +6 -2
  62. package/.output/server/chunks/routes/api/auth/status.get.mjs +6 -2
  63. package/.output/server/chunks/routes/api/board.get.mjs +147 -0
  64. package/.output/server/chunks/routes/api/changes.get.mjs +7 -3
  65. package/.output/server/chunks/routes/api/chat/image.get.mjs +7 -3
  66. package/.output/server/chunks/routes/api/chat.get.mjs +7 -3
  67. package/.output/server/chunks/routes/api/choose.post.mjs +34 -4
  68. package/.output/server/chunks/routes/api/claude-statusline.post.mjs +7 -3
  69. package/.output/server/chunks/routes/api/close/status.get.mjs +7 -3
  70. package/.output/server/chunks/routes/api/close.post.mjs +6 -2
  71. package/.output/server/chunks/routes/api/codex-update.post.mjs +7 -3
  72. package/.output/server/chunks/routes/api/commands.get.mjs +7 -3
  73. package/.output/server/chunks/routes/api/config.get.mjs +8 -3
  74. package/.output/server/chunks/routes/api/dirs.get.mjs +7 -3
  75. package/.output/server/chunks/routes/api/dismiss-stopped.post.mjs +43 -0
  76. package/.output/server/chunks/routes/api/dismiss.post.mjs +7 -3
  77. package/.output/server/chunks/routes/api/effort.post.mjs +7 -3
  78. package/.output/server/chunks/routes/api/efforts.get.mjs +7 -3
  79. package/.output/server/chunks/routes/api/file.post.mjs +7 -3
  80. package/.output/server/chunks/routes/api/files/download.get.mjs +53 -0
  81. package/.output/server/chunks/routes/api/files/read.get.mjs +45 -0
  82. package/.output/server/chunks/routes/api/files.get.mjs +44 -0
  83. package/.output/server/chunks/routes/api/gitroot.get.mjs +7 -3
  84. package/.output/server/chunks/routes/api/health.get.mjs +36 -0
  85. package/.output/server/chunks/routes/api/index.get.mjs +6 -2
  86. package/.output/server/chunks/routes/api/input.post.mjs +18 -4
  87. package/.output/server/chunks/routes/api/interrupt.post.mjs +7 -3
  88. package/.output/server/chunks/routes/api/isgit.get.mjs +7 -3
  89. package/.output/server/chunks/routes/api/machine/awake.get.mjs +7 -3
  90. package/.output/server/chunks/routes/api/machine/awake.post.mjs +7 -3
  91. package/.output/server/chunks/routes/api/machine/order.get.mjs +6 -2
  92. package/.output/server/chunks/routes/api/machine/order.post.mjs +6 -2
  93. package/.output/server/chunks/routes/api/machine/rename.post.mjs +7 -3
  94. package/.output/server/chunks/routes/api/menu.post.mjs +7 -3
  95. package/.output/server/chunks/routes/api/model.post.mjs +7 -3
  96. package/.output/server/chunks/routes/api/models.get.mjs +7 -3
  97. package/.output/server/chunks/routes/api/nav.post.mjs +10 -5
  98. package/.output/server/chunks/routes/api/onboarding.get.mjs +6 -2
  99. package/.output/server/chunks/routes/api/onboarding.post.mjs +6 -2
  100. package/.output/server/chunks/routes/api/phone.get.mjs +6 -7
  101. package/.output/server/chunks/routes/api/phone.post.mjs +6 -7
  102. package/.output/server/chunks/routes/api/plugins/actions.get.mjs +7 -2
  103. package/.output/server/chunks/routes/api/plugins/invoke.post.mjs +7 -2
  104. package/.output/server/chunks/routes/api/plugins/profiles.get.mjs +7 -2
  105. package/.output/server/chunks/routes/api/plugins/projects.get.mjs +7 -3
  106. package/.output/server/chunks/routes/api/plugins/projects.post.mjs +7 -3
  107. package/.output/server/chunks/routes/api/plugins/thread-limits.get.mjs +7 -3
  108. package/.output/server/chunks/routes/api/plugins/thread-limits.post.mjs +7 -3
  109. package/.output/server/chunks/routes/api/project/inbox.get.mjs +43 -0
  110. package/.output/server/chunks/routes/api/project/inbox.post.mjs +43 -0
  111. package/.output/server/chunks/routes/api/project/memory.get.mjs +42 -0
  112. package/.output/server/chunks/routes/api/project/report.get.mjs +7 -3
  113. package/.output/server/chunks/routes/api/project/routines.get.mjs +43 -0
  114. package/.output/server/chunks/routes/api/project/settings.get.mjs +41 -0
  115. package/.output/server/chunks/routes/api/project/thread.get.mjs +44 -0
  116. package/.output/server/chunks/routes/api/project/thread.post.mjs +45 -0
  117. package/.output/server/chunks/routes/api/prompt.post.mjs +26 -4
  118. package/.output/server/chunks/routes/api/push/quiet.post.mjs +7 -3
  119. package/.output/server/chunks/routes/api/push/subscribe.post.mjs +7 -3
  120. package/.output/server/chunks/routes/api/push/test.post.mjs +7 -3
  121. package/.output/server/chunks/routes/api/push/unsubscribe.post.mjs +7 -3
  122. package/.output/server/chunks/routes/api/quotas.get.mjs +7 -3
  123. package/.output/server/chunks/routes/api/rename.post.mjs +6 -2
  124. package/.output/server/chunks/routes/api/requeue.post.mjs +7 -3
  125. package/.output/server/chunks/routes/api/restart.get.mjs +6 -2
  126. package/.output/server/chunks/routes/api/restart.post.mjs +6 -2
  127. package/.output/server/chunks/routes/api/reveal.post.mjs +7 -2
  128. package/.output/server/chunks/routes/api/screen-key.post.mjs +7 -3
  129. package/.output/server/chunks/routes/api/screen.get.mjs +10 -4
  130. package/.output/server/chunks/routes/api/search.get.mjs +7 -3
  131. package/.output/server/chunks/routes/api/seen.post.mjs +7 -3
  132. package/.output/server/chunks/routes/api/sessions.get.mjs +7 -3
  133. package/.output/server/chunks/routes/api/sessions.post.mjs +7 -3
  134. package/.output/server/chunks/routes/api/space.post.mjs +19 -15
  135. package/.output/server/chunks/routes/api/state.get.mjs +7 -3
  136. package/.output/server/chunks/routes/api/unqueue.post.mjs +7 -3
  137. package/.output/server/chunks/routes/api/update/status.get.mjs +38 -0
  138. package/.output/server/chunks/routes/api/update.get.mjs +12 -51
  139. package/.output/server/chunks/routes/api/update.post.mjs +41 -0
  140. package/.output/server/chunks/routes/api/upload.post.mjs +7 -3
  141. package/.output/server/chunks/routes/api/worktrees/remove.post.mjs +6 -2
  142. package/.output/server/chunks/routes/api/worktrees.get.mjs +6 -2
  143. package/.output/server/chunks/routes/favicon.ico.get.mjs +6 -2
  144. package/.output/server/chunks/routes/icons/_name_.get.mjs +7 -3
  145. package/.output/server/chunks/routes/renderer.mjs +8 -4
  146. package/.output/server/chunks/routes/uploads/_...name_.get.mjs +7 -3
  147. package/.output/server/chunks/routes/ws/_..._.mjs +7 -3
  148. package/.output/server/chunks/routes/ws/events.mjs +7 -3
  149. package/.output/server/chunks/routes/ws/term.mjs +9 -5
  150. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  151. package/.output/server/index.mjs +7 -3
  152. package/.output/server/package.json +1 -1
  153. package/README.md +440 -46
  154. package/bin/install-docker-skill.sh +20 -0
  155. package/bin/lib/commands.mjs +47 -9
  156. package/bin/lib/core.mjs +18 -2
  157. package/bin/lib/install-skill.sh +100 -0
  158. package/bin/lib/skill.mjs +16 -0
  159. package/bin/lib/tailnet.d.mts +12 -3
  160. package/bin/lib/tailnet.mjs +103 -25
  161. package/bin/lib/updater.mjs +320 -0
  162. package/bin/lib/verify-release.mjs +20 -0
  163. package/package.json +4 -2
  164. package/skills/wherdr/SKILL.md +180 -0
  165. package/.output/public/_nuxt/BDNMzG2s.js +0 -1
  166. package/.output/public/_nuxt/BMIe8p_3.js +0 -2
  167. package/.output/public/_nuxt/BpQH8Ho1.js +0 -1
  168. package/.output/public/_nuxt/BrAeJIZR.js +0 -30
  169. package/.output/public/_nuxt/C12eXl5z.js +0 -1
  170. package/.output/public/_nuxt/CXG-cOdh.js +0 -1
  171. package/.output/public/_nuxt/CYxHnMNH.js +0 -83
  172. package/.output/public/_nuxt/CctS2Xn6.js +0 -65
  173. package/.output/public/_nuxt/CiYar6hg.js +0 -6
  174. package/.output/public/_nuxt/DLLQgP0d.js +0 -1
  175. package/.output/public/_nuxt/Dwh-l2rQ.js +0 -17
  176. package/.output/public/_nuxt/bLP7Jj-b.js +0 -1
  177. package/.output/public/_nuxt/builds/meta/6466b0ab-7935-460c-abdf-2ea632dae6d0.json +0 -1
  178. package/.output/public/_nuxt/whFLy_Ne.js +0 -23
  179. package/.output/server/chunks/_/phone.mjs +0 -343
  180. package/.output/server/chunks/routes/ws/mirror.mjs +0 -157
@@ -1,157 +0,0 @@
1
- import { P as PANE_RE, n as machineOfPane, o as fmt, h as herdr, aC as getState, bx as mirrorSize, a5 as splitId, Q as log, bs as defineWebSocketHandler } from '../../nitro/nitro.mjs';
2
- import { u as unwatchPeer, m as messageText, w as watchPeer, c as checkUpgrade, i as isOpen } from '../../_/ws.mjs';
3
- import readline from 'node:readline';
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:url';
27
- import '@simplewebauthn/server';
28
-
29
- const RECHECK_MS = 8e3;
30
- const MAX_MIRRORS = 24;
31
- let open = 0;
32
- async function probe(pane) {
33
- var _a, _b, _c, _d, _e;
34
- const [info, read] = await Promise.all([
35
- herdr("pane.get", { pane_id: pane }, 4e3).catch(() => null),
36
- herdr("pane.read", { pane_id: pane, source: "visible" }, 4e3).catch(() => null)
37
- ]);
38
- const tab = (getState().tabs || []).find((t) => {
39
- var _a2;
40
- return (_a2 = t.layout) == null ? void 0 : _a2.panes.some((x) => x.pane === pane);
41
- });
42
- const rect = ((_b = (_a = tab == null ? void 0 : tab.layout) == null ? void 0 : _a.panes.find((x) => x.pane === pane)) == null ? void 0 : _b.rect) || null;
43
- return mirrorSize({ rows: (_d = (_c = info == null ? void 0 : info.pane) == null ? void 0 : _c.scroll) == null ? void 0 : _d.viewport_rows, text: (_e = read == null ? void 0 : read.read) == null ? void 0 : _e.text, rect });
44
- }
45
- function openMirror(ws, url) {
46
- const pane = url.searchParams.get("pane") || "";
47
- if (!PANE_RE.test(pane)) {
48
- ws.close(4400, "Invalid pane");
49
- return null;
50
- }
51
- const machine = machineOfPane(pane);
52
- if (!machine || !machine.sock()) {
53
- ws.send(JSON.stringify({ type: "terminal.closed", reason: machine ? fmt("{machine} is unreachable", { machine: machine.label }) : "unknown machine", code: machine ? "unreachable" : "unknown_machine", machine: machine == null ? void 0 : machine.label }));
54
- ws.close(4503, "machine unreachable");
55
- return null;
56
- }
57
- if (open >= MAX_MIRRORS) {
58
- ws.close(4429, "trop de miroirs");
59
- return null;
60
- }
61
- open++;
62
- let child = null;
63
- let size = { cols: 0, rows: 0 };
64
- let closed = false;
65
- let timer;
66
- function stopChild() {
67
- const c = child;
68
- child = null;
69
- if (c && c.exitCode === null) c.kill("SIGTERM");
70
- }
71
- function start(next) {
72
- stopChild();
73
- size = next;
74
- if (ws.isOpen()) ws.send(JSON.stringify({ type: "mirror.size", ...size }));
75
- const c = machine.spawnHerdr(["terminal", "session", "observe", splitId(pane).local, "--cols", String(size.cols), "--rows", String(size.rows)]);
76
- child = c;
77
- readline.createInterface({ input: c.stdout }).on("line", (line) => {
78
- if (child === c && ws.isOpen()) ws.send(line);
79
- });
80
- readline.createInterface({ input: c.stderr }).on("line", (line) => log(`mirror ${pane} stderr: ${line}`));
81
- c.on("error", () => {
82
- });
83
- c.on("exit", () => {
84
- if (child === c && !closed) ws.close(4e3, "observe ended");
85
- });
86
- c.stdin.on("error", () => {
87
- });
88
- }
89
- async function recheck() {
90
- if (closed) return;
91
- const next = await probe(pane).catch(() => null);
92
- if (closed) return;
93
- if (next && (next.cols !== size.cols || next.rows !== size.rows)) {
94
- log(`mirror ${pane}: ${size.cols}x${size.rows} -> ${next.cols}x${next.rows}`);
95
- start(next);
96
- }
97
- timer = setTimeout(recheck, RECHECK_MS);
98
- }
99
- probe(pane).then((s) => {
100
- if (closed) return;
101
- start(s);
102
- timer = setTimeout(recheck, RECHECK_MS);
103
- }).catch(() => ws.close(4500, "pane illisible"));
104
- return {
105
- onMessage(raw) {
106
- let m;
107
- try {
108
- m = JSON.parse(raw);
109
- } catch {
110
- return;
111
- }
112
- if (!m || m.type !== "input") return;
113
- let params = null;
114
- if (typeof m.text === "string" && m.text && m.text.length <= 65536) params = { pane_id: pane, text: m.text };
115
- else if (Array.isArray(m.keys) && m.keys.length && m.keys.length <= 32 && m.keys.every((k) => typeof k === "string" && k.length <= 24)) params = { pane_id: pane, keys: m.keys };
116
- if (!params) return;
117
- herdr("pane.send_input", params).catch((e) => ws.isOpen() && ws.send(JSON.stringify({ type: "web.error", code: e.code, message: e.message })));
118
- },
119
- onClose() {
120
- if (closed) return;
121
- closed = true;
122
- open--;
123
- clearTimeout(timer);
124
- stopChild();
125
- }
126
- };
127
- }
128
-
129
- const sessions = /* @__PURE__ */ new Map();
130
- const mirror = defineWebSocketHandler({
131
- upgrade: (request) => checkUpgrade(request),
132
- open(peer) {
133
- var _a;
134
- watchPeer(peer);
135
- const url = new URL(((_a = peer.request) == null ? void 0 : _a.url) || "/", "http://x");
136
- const sess = openMirror({
137
- send: (d) => peer.send(d),
138
- close: (code, reason) => peer.close(code, reason),
139
- isOpen: () => isOpen(peer)
140
- }, url);
141
- if (sess) sessions.set(peer.id, sess);
142
- },
143
- message(peer, message) {
144
- var _a;
145
- const raw = messageText(message);
146
- if (raw) (_a = sessions.get(peer.id)) == null ? void 0 : _a.onMessage(raw);
147
- },
148
- close(peer) {
149
- unwatchPeer(peer);
150
- const s = sessions.get(peer.id);
151
- sessions.delete(peer.id);
152
- s == null ? void 0 : s.onClose();
153
- }
154
- });
155
-
156
- export { mirror as default };
157
- //# sourceMappingURL=mirror.mjs.map