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,161 +0,0 @@
1
- import { P as PANE_RE, n as machineOfPane, o as fmt, h as herdr, aB as getState, by as mirrorSize, a5 as splitId, Q as log, bt 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: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 RECHECK_MS = 8e3;
34
- const MAX_MIRRORS = 24;
35
- let open = 0;
36
- async function probe(pane) {
37
- var _a, _b, _c, _d, _e;
38
- const [info, read] = await Promise.all([
39
- herdr("pane.get", { pane_id: pane }, 4e3).catch(() => null),
40
- herdr("pane.read", { pane_id: pane, source: "visible" }, 4e3).catch(() => null)
41
- ]);
42
- const tab = (getState().tabs || []).find((t) => {
43
- var _a2;
44
- return (_a2 = t.layout) == null ? void 0 : _a2.panes.some((x) => x.pane === pane);
45
- });
46
- 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;
47
- 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 });
48
- }
49
- function openMirror(ws, url) {
50
- const pane = url.searchParams.get("pane") || "";
51
- if (!PANE_RE.test(pane)) {
52
- ws.close(4400, "Invalid pane");
53
- return null;
54
- }
55
- const machine = machineOfPane(pane);
56
- if (!machine || !machine.sock()) {
57
- 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 }));
58
- ws.close(4503, "machine unreachable");
59
- return null;
60
- }
61
- if (open >= MAX_MIRRORS) {
62
- ws.close(4429, "trop de miroirs");
63
- return null;
64
- }
65
- open++;
66
- let child = null;
67
- let size = { cols: 0, rows: 0 };
68
- let closed = false;
69
- let timer;
70
- function stopChild() {
71
- const c = child;
72
- child = null;
73
- if (c && c.exitCode === null) c.kill("SIGTERM");
74
- }
75
- function start(next) {
76
- stopChild();
77
- size = next;
78
- if (ws.isOpen()) ws.send(JSON.stringify({ type: "mirror.size", ...size }));
79
- const c = machine.spawnHerdr(["terminal", "session", "observe", splitId(pane).local, "--cols", String(size.cols), "--rows", String(size.rows)]);
80
- child = c;
81
- readline.createInterface({ input: c.stdout }).on("line", (line) => {
82
- if (child === c && ws.isOpen()) ws.send(line);
83
- });
84
- readline.createInterface({ input: c.stderr }).on("line", (line) => log(`mirror ${pane} stderr: ${line}`));
85
- c.on("error", () => {
86
- });
87
- c.on("exit", () => {
88
- if (child === c && !closed) ws.close(4e3, "observe ended");
89
- });
90
- c.stdin.on("error", () => {
91
- });
92
- }
93
- async function recheck() {
94
- if (closed) return;
95
- const next = await probe(pane).catch(() => null);
96
- if (closed) return;
97
- if (next && (next.cols !== size.cols || next.rows !== size.rows)) {
98
- log(`mirror ${pane}: ${size.cols}x${size.rows} -> ${next.cols}x${next.rows}`);
99
- start(next);
100
- }
101
- timer = setTimeout(recheck, RECHECK_MS);
102
- }
103
- probe(pane).then((s) => {
104
- if (closed) return;
105
- start(s);
106
- timer = setTimeout(recheck, RECHECK_MS);
107
- }).catch(() => ws.close(4500, "pane illisible"));
108
- return {
109
- onMessage(raw) {
110
- let m;
111
- try {
112
- m = JSON.parse(raw);
113
- } catch {
114
- return;
115
- }
116
- if (!m || m.type !== "input") return;
117
- let params = null;
118
- if (typeof m.text === "string" && m.text && m.text.length <= 65536) params = { pane_id: pane, text: m.text };
119
- 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 };
120
- if (!params) return;
121
- herdr("pane.send_input", params).catch((e) => ws.isOpen() && ws.send(JSON.stringify({ type: "web.error", code: e.code, message: e.message })));
122
- },
123
- onClose() {
124
- if (closed) return;
125
- closed = true;
126
- open--;
127
- clearTimeout(timer);
128
- stopChild();
129
- }
130
- };
131
- }
132
-
133
- const sessions = /* @__PURE__ */ new Map();
134
- const mirror = defineWebSocketHandler({
135
- upgrade: (request) => checkUpgrade(request),
136
- open(peer) {
137
- var _a;
138
- watchPeer(peer);
139
- const url = new URL(((_a = peer.request) == null ? void 0 : _a.url) || "/", "http://x");
140
- const sess = openMirror({
141
- send: (d) => peer.send(d),
142
- close: (code, reason) => peer.close(code, reason),
143
- isOpen: () => isOpen(peer)
144
- }, url);
145
- if (sess) sessions.set(peer.id, sess);
146
- },
147
- message(peer, message) {
148
- var _a;
149
- const raw = messageText(message);
150
- if (raw) (_a = sessions.get(peer.id)) == null ? void 0 : _a.onMessage(raw);
151
- },
152
- close(peer) {
153
- unwatchPeer(peer);
154
- const s = sessions.get(peer.id);
155
- sessions.delete(peer.id);
156
- s == null ? void 0 : s.onClose();
157
- }
158
- });
159
-
160
- export { mirror as default };
161
- //# sourceMappingURL=mirror.mjs.map