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.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{AgentView.C4YOwvZG.css → AgentView.DzFWBd2A.css} +1 -1
- package/.output/public/_nuxt/{Cd8j9O5w.js → BEJHMUrj.js} +1 -1
- package/.output/public/_nuxt/BOtcEDnA.js +1 -0
- package/.output/public/_nuxt/BUaYhQ2r.js +6 -0
- package/.output/public/_nuxt/{yzABg5xl.js → Bpoxvzh6.js} +1 -1
- package/.output/public/_nuxt/C25ROUa9.js +3 -0
- package/.output/public/_nuxt/CDWjMk9C.js +2 -0
- package/.output/public/_nuxt/CJKsMzIp.js +1 -0
- package/.output/public/_nuxt/CJNhn9sA.js +36 -0
- package/.output/public/_nuxt/COCvtdHN.js +89 -0
- package/.output/public/_nuxt/{Ci8N4mWR.js → CXJnLmWv.js} +1 -1
- package/.output/public/_nuxt/Cl45J6_Q.js +1 -0
- package/.output/public/_nuxt/CndPDbMI.js +2 -0
- package/.output/public/_nuxt/Ctbx58Um.js +23 -0
- package/.output/public/_nuxt/{8ksjcuDu.js → DMLmW6JM.js} +49 -56
- package/.output/public/_nuxt/Dl1PHLOB.js +1 -0
- package/.output/public/_nuxt/Nhex3_iH.js +1 -0
- package/.output/public/_nuxt/OpWX45i7.js +89 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/4994f3a4-4126-4f57-a9e5-c7ebb25850bc.json +1 -0
- package/.output/public/_nuxt/dTj21DMs.js +1 -0
- package/.output/public/_nuxt/entry.BohTWE-n.css +2 -0
- package/.output/public/_nuxt/kwSoIiM7.js +1 -0
- package/.output/public/_nuxt/mkEwYka4.js +1 -0
- package/.output/public/_nuxt/pdf.min.t82Z80JU.mjs +28 -0
- package/.output/public/_nuxt/pdf.worker.min.wgc6bjNh.mjs +28 -0
- package/.output/public/_nuxt/w7Rm7unj.js +1 -0
- package/.output/public/sw.js +1 -1
- package/.output/server/chunks/_/branding.mjs +1 -1
- package/.output/server/chunks/_/filePaths.mjs +25 -0
- package/.output/server/chunks/_/files.mjs +217 -0
- package/.output/server/chunks/_/machineOrder.mjs +1 -1
- package/.output/server/chunks/_/onboarding.mjs +1 -1
- package/.output/server/chunks/_/package.mjs +5 -2
- package/.output/server/chunks/_/pluginPolicy.mjs +93 -0
- package/.output/server/chunks/_/plugins.mjs +9 -96
- package/.output/server/chunks/_/projectBoard.mjs +124 -36
- package/.output/server/chunks/_/projectDocs.mjs +106 -0
- package/.output/server/chunks/_/projectInbox.mjs +135 -0
- package/.output/server/chunks/_/projectThreads.mjs +46 -0
- package/.output/server/chunks/_/projectThreads2.mjs +61 -0
- package/.output/server/chunks/_/projectsActions.mjs +1 -1
- package/.output/server/chunks/_/projectsPlugin.mjs +24 -50
- package/.output/server/chunks/_/projectsPlugin2.mjs +57 -0
- package/.output/server/chunks/_/restart.mjs +2 -312
- package/.output/server/chunks/_/reveal.mjs +2 -24
- package/.output/server/chunks/_/selfupdate.mjs +3 -2
- package/.output/server/chunks/_/settingstabs.mjs +36 -0
- package/.output/server/chunks/_/updates.mjs +51 -10
- package/.output/server/chunks/_/worktrees.mjs +1 -1
- package/.output/server/chunks/_/ws.mjs +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +1718 -417
- package/.output/server/chunks/raw/bump-homebrew.mjs +1 -1
- package/.output/server/chunks/raw/herdr-plugin.mjs +1 -1
- package/.output/server/chunks/raw/release-ready.mjs +5 -0
- package/.output/server/chunks/routes/api/_..._.mjs +1 -1
- package/.output/server/chunks/routes/api/agents.post.mjs +1 -1
- package/.output/server/chunks/routes/api/ask-tab.post.mjs +1 -1
- package/.output/server/chunks/routes/api/attach.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/disable.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/lock-all.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/lock.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/login/options.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/login/verify.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/max-session.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/register/options.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/register/verify.post.mjs +1 -1
- package/.output/server/chunks/routes/api/auth/status.get.mjs +1 -1
- package/.output/server/chunks/routes/api/board.get.mjs +148 -0
- package/.output/server/chunks/routes/api/changes.get.mjs +2 -2
- package/.output/server/chunks/routes/api/chat/image.get.mjs +2 -2
- package/.output/server/chunks/routes/api/chat.get.mjs +26 -6
- package/.output/server/chunks/routes/api/choose.post.mjs +40 -14
- package/.output/server/chunks/routes/api/claude-statusline.post.mjs +2 -2
- package/.output/server/chunks/routes/api/close/status.get.mjs +2 -2
- package/.output/server/chunks/routes/api/close.post.mjs +1 -1
- package/.output/server/chunks/routes/api/codex-update.post.mjs +2 -2
- package/.output/server/chunks/routes/api/commands.get.mjs +4 -3
- package/.output/server/chunks/routes/api/config.get.mjs +3 -2
- package/.output/server/chunks/routes/api/dirs.get.mjs +2 -2
- package/.output/server/chunks/routes/api/dismiss-stopped.post.mjs +43 -0
- package/.output/server/chunks/routes/api/dismiss.post.mjs +2 -2
- package/.output/server/chunks/routes/api/effort.post.mjs +2 -2
- package/.output/server/chunks/routes/api/efforts.get.mjs +2 -2
- package/.output/server/chunks/routes/api/file.post.mjs +2 -2
- package/.output/server/chunks/routes/api/files/download.get.mjs +60 -0
- package/.output/server/chunks/routes/api/files/read.get.mjs +45 -0
- package/.output/server/chunks/routes/api/files.get.mjs +44 -0
- package/.output/server/chunks/routes/api/gitroot.get.mjs +2 -2
- package/.output/server/chunks/routes/api/health.get.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get.mjs +2 -1
- package/.output/server/chunks/routes/api/input.post.mjs +32 -5
- package/.output/server/chunks/routes/api/interrupt.post.mjs +2 -2
- package/.output/server/chunks/routes/api/isgit.get.mjs +2 -2
- package/.output/server/chunks/routes/api/machine/awake.get.mjs +2 -2
- package/.output/server/chunks/routes/api/machine/awake.post.mjs +2 -2
- package/.output/server/chunks/routes/api/machine/order.get.mjs +1 -1
- package/.output/server/chunks/routes/api/machine/order.post.mjs +1 -1
- package/.output/server/chunks/routes/api/machine/rename.post.mjs +2 -2
- package/.output/server/chunks/routes/api/menu.post.mjs +5 -2
- package/.output/server/chunks/routes/api/model.post.mjs +2 -2
- package/.output/server/chunks/routes/api/models.get.mjs +2 -2
- package/.output/server/chunks/routes/api/nav.post.mjs +36 -22
- package/.output/server/chunks/routes/api/onboarding.get.mjs +1 -1
- package/.output/server/chunks/routes/api/onboarding.post.mjs +1 -1
- package/.output/server/chunks/routes/api/phone.get.mjs +2 -2
- package/.output/server/chunks/routes/api/phone.post.mjs +2 -2
- package/.output/server/chunks/routes/api/plugins/actions.get.mjs +4 -1
- package/.output/server/chunks/routes/api/plugins/invoke.post.mjs +4 -1
- package/.output/server/chunks/routes/api/plugins/profiles.get.mjs +4 -1
- package/.output/server/chunks/routes/api/plugins/projects.get.mjs +4 -3
- package/.output/server/chunks/routes/api/plugins/projects.post.mjs +4 -3
- package/.output/server/chunks/routes/api/plugins/thread-limits.get.mjs +2 -2
- package/.output/server/chunks/routes/api/plugins/thread-limits.post.mjs +2 -2
- package/.output/server/chunks/routes/api/project/inbox.get.mjs +44 -0
- package/.output/server/chunks/routes/api/project/inbox.post.mjs +44 -0
- package/.output/server/chunks/routes/api/project/memory.get.mjs +43 -0
- package/.output/server/chunks/routes/api/project/report.get.mjs +3 -2
- package/.output/server/chunks/routes/api/project/routines.get.mjs +44 -0
- package/.output/server/chunks/routes/api/project/settings.get.mjs +42 -0
- package/.output/server/chunks/routes/api/project/thread.get.mjs +45 -0
- package/.output/server/chunks/routes/api/project/thread.post.mjs +47 -0
- package/.output/server/chunks/routes/api/prompt.post.mjs +21 -3
- package/.output/server/chunks/routes/api/push/quiet.post.mjs +2 -2
- package/.output/server/chunks/routes/api/push/subscribe.post.mjs +2 -2
- package/.output/server/chunks/routes/api/push/test.post.mjs +2 -2
- package/.output/server/chunks/routes/api/push/unsubscribe.post.mjs +2 -2
- package/.output/server/chunks/routes/api/quotas.get.mjs +2 -2
- package/.output/server/chunks/routes/api/rename.post.mjs +1 -1
- package/.output/server/chunks/routes/api/requeue.post.mjs +2 -2
- package/.output/server/chunks/routes/api/restart.get.mjs +1 -1
- package/.output/server/chunks/routes/api/restart.post.mjs +1 -1
- package/.output/server/chunks/routes/api/reveal.post.mjs +2 -1
- package/.output/server/chunks/routes/api/screen-key.post.mjs +14 -11
- package/.output/server/chunks/routes/api/screen.get.mjs +6 -37
- package/.output/server/chunks/routes/api/search.get.mjs +2 -2
- package/.output/server/chunks/routes/api/seen.post.mjs +2 -2
- package/.output/server/chunks/routes/api/sessions.get.mjs +2 -2
- package/.output/server/chunks/routes/api/sessions.post.mjs +2 -2
- package/.output/server/chunks/routes/api/settings-tab.post.mjs +89 -0
- package/.output/server/chunks/routes/api/space.post.mjs +14 -14
- package/.output/server/chunks/routes/api/state.get.mjs +2 -2
- package/.output/server/chunks/routes/api/unqueue.post.mjs +2 -2
- package/.output/server/chunks/routes/api/update/status.get.mjs +1 -1
- package/.output/server/chunks/routes/api/update.get.mjs +2 -2
- package/.output/server/chunks/routes/api/update.post.mjs +2 -2
- package/.output/server/chunks/routes/api/upload.post.mjs +2 -2
- package/.output/server/chunks/routes/api/worktrees/remove.post.mjs +1 -1
- package/.output/server/chunks/routes/api/worktrees.get.mjs +1 -1
- package/.output/server/chunks/routes/favicon.ico.get.mjs +1 -1
- package/.output/server/chunks/routes/icons/_name_.get.mjs +2 -2
- package/.output/server/chunks/routes/renderer.mjs +3 -3
- package/.output/server/chunks/routes/uploads/_...name_.get.mjs +2 -2
- package/.output/server/chunks/routes/ws/_..._.mjs +2 -2
- package/.output/server/chunks/routes/ws/events.mjs +2 -2
- package/.output/server/chunks/routes/ws/term.mjs +2 -2
- package/.output/server/chunks/virtual/precomputed.mjs +1 -1
- package/.output/server/index.mjs +2 -2
- package/.output/server/package.json +1 -1
- package/README.md +368 -40
- package/bin/install-docker-skill.sh +20 -0
- package/bin/lib/commands.mjs +5 -1
- package/bin/lib/core.mjs +1 -0
- package/bin/lib/install-skill.sh +100 -0
- package/bin/lib/skill.mjs +16 -0
- package/bin/lib/updater.mjs +65 -12
- package/bin/lib/verify-release.mjs +20 -0
- package/package.json +5 -2
- package/skills/wherdr/SKILL.md +186 -0
- package/.output/public/_nuxt/B7QP1TFs.js +0 -23
- package/.output/public/_nuxt/BDNMzG2s.js +0 -1
- package/.output/public/_nuxt/BOpBIziZ.js +0 -6
- package/.output/public/_nuxt/BWXdFfeg.js +0 -17
- package/.output/public/_nuxt/COFCNFpG.js +0 -83
- package/.output/public/_nuxt/CWwyK2XK.js +0 -2
- package/.output/public/_nuxt/CXG-cOdh.js +0 -1
- package/.output/public/_nuxt/CkZ8t6uB.js +0 -1
- package/.output/public/_nuxt/D4Yz4rat.js +0 -65
- package/.output/public/_nuxt/D7sxNXx1.js +0 -1
- package/.output/public/_nuxt/DViwOclv.js +0 -1
- package/.output/public/_nuxt/DoD7Qb5P.js +0 -30
- package/.output/public/_nuxt/DyBZDSCV.js +0 -2
- package/.output/public/_nuxt/SiL1FJ5s.js +0 -3
- package/.output/public/_nuxt/bLP7Jj-b.js +0 -1
- package/.output/public/_nuxt/builds/meta/7afbf062-5369-4002-b20d-7a582ff6e0f1.json +0 -1
- package/.output/public/_nuxt/entry.Crt1r4l3.css +0 -2
- 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
|