wherdr 1.3.3 → 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/{CP8o925U.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/{DT8qZ0Wv.js → Cl45J6_Q.js} +1 -1
- package/.output/public/_nuxt/CndPDbMI.js +2 -0
- package/.output/public/_nuxt/Ctbx58Um.js +23 -0
- package/.output/public/_nuxt/{CKhgznq4.js → DMLmW6JM.js} +43 -39
- package/.output/public/_nuxt/Dl1PHLOB.js +1 -0
- package/.output/public/_nuxt/{DaaJIRB3.js → Nhex3_iH.js} +1 -1
- 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/{Cr3SrGky.js → kwSoIiM7.js} +1 -1
- 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/_/files.mjs +19 -6
- package/.output/server/chunks/_/machineOrder.mjs +1 -1
- package/.output/server/chunks/_/onboarding.mjs +1 -1
- package/.output/server/chunks/_/package.mjs +3 -1
- package/.output/server/chunks/_/plugins.mjs +6 -3
- package/.output/server/chunks/_/projectBoard.mjs +4 -7
- 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 +1 -1
- package/.output/server/chunks/_/reveal.mjs +1 -1
- package/.output/server/chunks/_/selfupdate.mjs +1 -1
- package/.output/server/chunks/_/settingstabs.mjs +36 -0
- package/.output/server/chunks/_/updates.mjs +1 -1
- package/.output/server/chunks/_/worktrees.mjs +1 -1
- package/.output/server/chunks/_/ws.mjs +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +840 -367
- package/.output/server/chunks/routes/api/board.get.mjs +1 -0
- package/.output/server/chunks/routes/api/chat/image.get.mjs +1 -1
- package/.output/server/chunks/routes/api/chat.get.mjs +25 -5
- package/.output/server/chunks/routes/api/choose.post.mjs +14 -14
- package/.output/server/chunks/routes/api/claude-statusline.post.mjs +1 -1
- package/.output/server/chunks/routes/api/codex-update.post.mjs +1 -1
- package/.output/server/chunks/routes/api/commands.get.mjs +3 -2
- package/.output/server/chunks/routes/api/config.get.mjs +1 -1
- package/.output/server/chunks/routes/api/dirs.get.mjs +1 -1
- package/.output/server/chunks/routes/api/dismiss-stopped.post.mjs +1 -1
- package/.output/server/chunks/routes/api/dismiss.post.mjs +1 -1
- package/.output/server/chunks/routes/api/effort.post.mjs +1 -1
- package/.output/server/chunks/routes/api/efforts.get.mjs +1 -1
- package/.output/server/chunks/routes/api/file.post.mjs +1 -1
- package/.output/server/chunks/routes/api/files/download.get.mjs +10 -3
- package/.output/server/chunks/routes/api/gitroot.get.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get.mjs +1 -0
- package/.output/server/chunks/routes/api/input.post.mjs +27 -10
- package/.output/server/chunks/routes/api/interrupt.post.mjs +1 -1
- package/.output/server/chunks/routes/api/isgit.get.mjs +1 -1
- package/.output/server/chunks/routes/api/machine/awake.get.mjs +1 -1
- package/.output/server/chunks/routes/api/machine/awake.post.mjs +1 -1
- package/.output/server/chunks/routes/api/machine/rename.post.mjs +1 -1
- package/.output/server/chunks/routes/api/menu.post.mjs +4 -1
- package/.output/server/chunks/routes/api/model.post.mjs +1 -1
- package/.output/server/chunks/routes/api/models.get.mjs +1 -1
- package/.output/server/chunks/routes/api/nav.post.mjs +34 -21
- package/.output/server/chunks/routes/api/phone.get.mjs +1 -1
- package/.output/server/chunks/routes/api/phone.post.mjs +1 -1
- package/.output/server/chunks/routes/api/plugins/actions.get.mjs +2 -0
- package/.output/server/chunks/routes/api/plugins/invoke.post.mjs +2 -0
- package/.output/server/chunks/routes/api/plugins/profiles.get.mjs +2 -0
- package/.output/server/chunks/routes/api/plugins/projects.get.mjs +3 -2
- package/.output/server/chunks/routes/api/plugins/projects.post.mjs +3 -2
- package/.output/server/chunks/routes/api/plugins/thread-limits.post.mjs +1 -1
- package/.output/server/chunks/routes/api/project/inbox.get.mjs +1 -0
- package/.output/server/chunks/routes/api/project/inbox.post.mjs +1 -0
- package/.output/server/chunks/routes/api/project/memory.get.mjs +1 -0
- package/.output/server/chunks/routes/api/project/report.get.mjs +1 -0
- package/.output/server/chunks/routes/api/project/routines.get.mjs +1 -0
- package/.output/server/chunks/routes/api/project/settings.get.mjs +1 -0
- package/.output/server/chunks/routes/api/project/thread.get.mjs +1 -0
- package/.output/server/chunks/routes/api/project/thread.post.mjs +2 -0
- package/.output/server/chunks/routes/api/prompt.post.mjs +1 -1
- package/.output/server/chunks/routes/api/push/quiet.post.mjs +1 -1
- package/.output/server/chunks/routes/api/push/subscribe.post.mjs +1 -1
- package/.output/server/chunks/routes/api/push/test.post.mjs +1 -1
- package/.output/server/chunks/routes/api/push/unsubscribe.post.mjs +1 -1
- package/.output/server/chunks/routes/api/quotas.get.mjs +1 -1
- package/.output/server/chunks/routes/api/requeue.post.mjs +1 -1
- package/.output/server/chunks/routes/api/screen-key.post.mjs +13 -10
- package/.output/server/chunks/routes/api/screen.get.mjs +2 -35
- package/.output/server/chunks/routes/api/search.get.mjs +1 -1
- package/.output/server/chunks/routes/api/seen.post.mjs +1 -1
- package/.output/server/chunks/routes/api/sessions.get.mjs +1 -1
- package/.output/server/chunks/routes/api/sessions.post.mjs +1 -1
- package/.output/server/chunks/routes/api/settings-tab.post.mjs +89 -0
- package/.output/server/chunks/routes/api/space.post.mjs +1 -1
- package/.output/server/chunks/routes/api/unqueue.post.mjs +1 -1
- package/.output/server/chunks/routes/api/update.get.mjs +1 -1
- package/.output/server/chunks/routes/api/update.post.mjs +1 -1
- package/.output/server/chunks/routes/api/upload.post.mjs +1 -1
- package/.output/server/chunks/routes/icons/_name_.get.mjs +1 -1
- package/.output/server/chunks/routes/renderer.mjs +2 -2
- package/.output/server/chunks/routes/uploads/_...name_.get.mjs +1 -1
- package/.output/server/chunks/routes/ws/_..._.mjs +1 -1
- package/.output/server/chunks/routes/ws/events.mjs +1 -1
- package/.output/server/chunks/routes/ws/term.mjs +1 -1
- package/.output/server/chunks/virtual/precomputed.mjs +1 -1
- package/.output/server/index.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/README.md +44 -23
- package/package.json +3 -1
- package/skills/wherdr/SKILL.md +9 -3
- package/.output/public/_nuxt/B4Yk2tB1.js +0 -23
- package/.output/public/_nuxt/BBw_0a4M.js +0 -6
- package/.output/public/_nuxt/BSy6OCIY.js +0 -1
- package/.output/public/_nuxt/BX5PM2JQ.js +0 -1
- package/.output/public/_nuxt/BgPDnf2S.js +0 -1
- package/.output/public/_nuxt/BkOxQzbS.js +0 -2
- package/.output/public/_nuxt/CWwyK2XK.js +0 -2
- package/.output/public/_nuxt/CkbmecwS.js +0 -1
- package/.output/public/_nuxt/DAg9fiVh.js +0 -89
- package/.output/public/_nuxt/DcJi16XA.js +0 -1
- package/.output/public/_nuxt/SiL1FJ5s.js +0 -3
- package/.output/public/_nuxt/VpjCgSXu.js +0 -36
- package/.output/public/_nuxt/builds/meta/c735b6c0-1bd0-47d7-a208-d310f0a06287.json +0 -1
- package/.output/public/_nuxt/dPxB2L94.js +0 -89
- package/.output/public/_nuxt/entry.CGWKmYU3.css +0 -2
- package/.output/public/_nuxt/xYX85SPI.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,Hn as t,M as n,Ot as r,U as i}from"./C25ROUa9.js";import{f as a}from"./CXJnLmWv.js";import{t as o}from"./DMLmW6JM.js";var s=i({__name:`[pane]`,setup(i){let s=a(),c=e(()=>String(s.params.pane||``));return(e,i)=>{let a=o;return r(),n(a,{key:t(c),"pane-id":t(c)},null,8,[`pane-id`])}}});export{s as default};
|
package/.output/public/sw.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
var sw = self;
|
|
16
16
|
var CACHE = "wherdr-v1";
|
|
17
17
|
var NETWORK_WAIT_MS = 3e3;
|
|
18
|
-
var PRECACHE = ["/", ...[{"revision":"e6a852ba6e2a724d2255af526cb04083","url":"manifest.webmanifest"},{"revision":"b1a14fab8c06784649bf26c636747a86","url":"manifest-en.webmanifest"},{"revision":null,"url":"_nuxt/
|
|
18
|
+
var PRECACHE = ["/", ...[{"revision":"e6a852ba6e2a724d2255af526cb04083","url":"manifest.webmanifest"},{"revision":"b1a14fab8c06784649bf26c636747a86","url":"manifest-en.webmanifest"},{"revision":null,"url":"_nuxt/wherdr-symbols.C1LsPKmg.woff2"},{"revision":null,"url":"_nuxt/wherdr-nerd-powerline.B_kAMxXr.woff2"},{"revision":null,"url":"_nuxt/wherdr-nerd-octicons.Hl4VEx8m.woff2"},{"revision":null,"url":"_nuxt/wherdr-nerd-material-4.CO_PudDR.woff2"},{"revision":null,"url":"_nuxt/wherdr-nerd-material-3.8xz7iX-Y.woff2"},{"revision":null,"url":"_nuxt/wherdr-nerd-material-2.C_flbBWO.woff2"},{"revision":null,"url":"_nuxt/wherdr-nerd-material-1.BdvqkCqW.woff2"},{"revision":null,"url":"_nuxt/wherdr-nerd-extension.Dai_ky39.woff2"},{"revision":null,"url":"_nuxt/wherdr-nerd-devicons.ZMSFX1sW.woff2"},{"revision":null,"url":"_nuxt/wherdr-nerd-codicons.CtEsfSAf.woff2"},{"revision":null,"url":"_nuxt/wherdr-nerd-awesome.DQ3_iAfa.woff2"},{"revision":null,"url":"_nuxt/w7Rm7unj.js"},{"revision":null,"url":"_nuxt/mkEwYka4.js"},{"revision":null,"url":"_nuxt/kwSoIiM7.js"},{"revision":null,"url":"_nuxt/jetbrains-mono-vietnamese-wght-normal.Bt-aOZkq.woff2"},{"revision":null,"url":"_nuxt/jetbrains-mono-latin-wght-normal.B9CIFXIH.woff2"},{"revision":null,"url":"_nuxt/jetbrains-mono-latin-ext-wght-normal.DBQx-q_a.woff2"},{"revision":null,"url":"_nuxt/jetbrains-mono-greek-wght-normal.Bw9x6K1M.woff2"},{"revision":null,"url":"_nuxt/jetbrains-mono-cyrillic-wght-normal.D73BlboJ.woff2"},{"revision":null,"url":"_nuxt/inter-vietnamese-wght-normal.CBcvBZtf.woff2"},{"revision":null,"url":"_nuxt/inter-latin-wght-normal.Dx4kXJAl.woff2"},{"revision":null,"url":"_nuxt/inter-latin-ext-wght-normal.DO1Apj_S.woff2"},{"revision":null,"url":"_nuxt/inter-greek-wght-normal.CkhJZR-_.woff2"},{"revision":null,"url":"_nuxt/inter-greek-ext-wght-normal.DlzME5K_.woff2"},{"revision":null,"url":"_nuxt/inter-cyrillic-wght-normal.DqGufNeO.woff2"},{"revision":null,"url":"_nuxt/inter-cyrillic-ext-wght-normal.BOeWTOD4.woff2"},{"revision":null,"url":"_nuxt/hePW80VL.js"},{"revision":null,"url":"_nuxt/error-500.Bwd7zAaE.css"},{"revision":null,"url":"_nuxt/error-404.Bb87HomL.css"},{"revision":null,"url":"_nuxt/entry.BohTWE-n.css"},{"revision":null,"url":"_nuxt/dTj21DMs.js"},{"revision":null,"url":"_nuxt/archivo-vietnamese-wght-normal.XAtsl5Q_.woff2"},{"revision":null,"url":"_nuxt/archivo-latin-wght-normal.E0tuGl4L.woff2"},{"revision":null,"url":"_nuxt/archivo-latin-ext-wght-normal.C4zznr8T.woff2"},{"revision":null,"url":"_nuxt/OpWX45i7.js"},{"revision":null,"url":"_nuxt/Nhex3_iH.js"},{"revision":null,"url":"_nuxt/Dl1PHLOB.js"},{"revision":null,"url":"_nuxt/DMLmW6JM.js"},{"revision":null,"url":"_nuxt/Ctbx58Um.js"},{"revision":null,"url":"_nuxt/CndPDbMI.js"},{"revision":null,"url":"_nuxt/Cl45J6_Q.js"},{"revision":null,"url":"_nuxt/CXJnLmWv.js"},{"revision":null,"url":"_nuxt/COCvtdHN.js"},{"revision":null,"url":"_nuxt/CJNhn9sA.js"},{"revision":null,"url":"_nuxt/CJKsMzIp.js"},{"revision":null,"url":"_nuxt/CDWjMk9C.js"},{"revision":null,"url":"_nuxt/C25ROUa9.js"},{"revision":null,"url":"_nuxt/Bpoxvzh6.js"},{"revision":null,"url":"_nuxt/Bd17z0YL.js"},{"revision":null,"url":"_nuxt/BUaYhQ2r.js"},{"revision":null,"url":"_nuxt/BOtcEDnA.js"},{"revision":null,"url":"_nuxt/BEJHMUrj.js"},{"revision":null,"url":"_nuxt/AgentView.DzFWBd2A.css"},{"revision":"d1c26c8c001b83b0e7cbd1084ff810f1","url":"_nuxt/builds/latest.json"},{"revision":null,"url":"_nuxt/builds/meta/4994f3a4-4126-4f57-a9e5-c7ebb25850bc.json"}].map((e) => "/" + (typeof e === "string" ? e : e.url).replace(/^\//, ""))];
|
|
19
19
|
sw.addEventListener("install", (e) => {
|
|
20
20
|
e.waitUntil((async () => {
|
|
21
21
|
const c = await caches.open(CACHE);
|
|
@@ -19,6 +19,8 @@ const IMAGE_TYPES = {
|
|
|
19
19
|
ico: "image/x-icon",
|
|
20
20
|
svg: "image/svg+xml"
|
|
21
21
|
};
|
|
22
|
+
const PDF_HEAD = 1024;
|
|
23
|
+
const isPdf = (name, head) => path.posix.extname(name).toLowerCase() === ".pdf" && head.subarray(0, PDF_HEAD).includes("%PDF-");
|
|
22
24
|
const RESOLVE = `root=$(cd "$1" 2>/dev/null && pwd -P) || { echo "folder not found" >&2; exit 3; }
|
|
23
25
|
under() { case "$1/" in "\${root%/}/"*) return 0 ;; esac; return 1; }`;
|
|
24
26
|
const LIST_SCRIPT = `${RESOLVE}
|
|
@@ -29,7 +31,10 @@ else
|
|
|
29
31
|
under "$dir" || { echo "outside" >&2; exit 5; }
|
|
30
32
|
fi
|
|
31
33
|
cd "$dir" || exit 4
|
|
32
|
-
|
|
34
|
+
e=$(LC_ALL=C ls -A 2>&1 >/dev/null) || {
|
|
35
|
+
case "$e" in *"not permitted"*) [ "$(uname -s)" = Darwin ] && exit 8 ;; esac
|
|
36
|
+
echo "permission denied" >&2; exit 7
|
|
37
|
+
}
|
|
33
38
|
printf '%s\\0%s\\0' "$root" "$dir"
|
|
34
39
|
max=$3; n=0
|
|
35
40
|
set --
|
|
@@ -68,6 +73,8 @@ s=$(wc -c < "$f") || exit 4
|
|
|
68
73
|
echo $s
|
|
69
74
|
[ -n "$4" ] && [ $(($s)) -ge "$3" ] && exit 0
|
|
70
75
|
head -c "$3" < "$f"`;
|
|
76
|
+
const MACOS_SSH_DENIED = "macOS blocks access to this folder. On the Mac: System Settings \u203A General \u203A Sharing \u203A Remote Login \u24D8 \u203A \u201CAllow full disk access for remote users\u201D.";
|
|
77
|
+
const MACOS_LOCAL_DENIED = "macOS blocks access to this folder. Allow the app that runs wherdr in System Settings \u203A Privacy & Security \u203A Full Disk Access.";
|
|
71
78
|
function executor(m, { timeoutMs = 15e3, maxBytes = IMAGE_BYTES } = {}) {
|
|
72
79
|
const remote = m.exec;
|
|
73
80
|
if (remote) return (script, args) => remote(script, args, { timeoutMs });
|
|
@@ -87,6 +94,7 @@ async function run(m, script, args, opts) {
|
|
|
87
94
|
if (r.code === 5) throw new HerdrError("outside", "Outside the project folder");
|
|
88
95
|
if (r.code === 6) throw new HerdrError("not_file", "Not a file");
|
|
89
96
|
if (r.code === 7) throw new HerdrError("denied", "Permission denied");
|
|
97
|
+
if (r.code === 8) throw new HerdrError("denied", m.exec ? MACOS_SSH_DENIED : MACOS_LOCAL_DENIED);
|
|
90
98
|
if (r.code === 124) throw new HerdrError("timeout", "The folder took too long to read");
|
|
91
99
|
if (r.code === 255 || r.code === null) throw new HerdrError("unreachable", "Machine unreachable");
|
|
92
100
|
throw new HerdrError("remote", r.stderr.trim().split("\n").pop() || `code ${r.code}`);
|
|
@@ -160,8 +168,13 @@ async function readHead(m, root, rel, max, opts) {
|
|
|
160
168
|
return { size: Number(out.subarray(0, nl).toString("utf8")) || 0, body: out.subarray(nl + 1) };
|
|
161
169
|
}
|
|
162
170
|
async function previewAt(m, root, rel, shown) {
|
|
163
|
-
const
|
|
164
|
-
const
|
|
171
|
+
const ext = path.posix.extname(rel).slice(1).toLowerCase();
|
|
172
|
+
const mime = IMAGE_TYPES[ext];
|
|
173
|
+
const { size, body } = await readHead(m, root, rel, mime ? IMAGE_BYTES + 1 : ext === "pdf" ? PDF_HEAD : TEXT_BYTES + 1);
|
|
174
|
+
if (ext === "pdf") {
|
|
175
|
+
if (!isPdf(rel, body)) return { path: shown, size, kind: "binary", truncated: false };
|
|
176
|
+
return { path: shown, size, kind: size > DOWNLOAD_BYTES ? "large" : "pdf", truncated: false };
|
|
177
|
+
}
|
|
165
178
|
if (mime) {
|
|
166
179
|
if (size > IMAGE_BYTES) return { path: shown, size, kind: "large", truncated: true };
|
|
167
180
|
return { path: shown, size, kind: "image", dataUrl: `data:${mime};base64,${body.toString("base64")}`, truncated: false };
|
|
@@ -194,11 +207,11 @@ async function readWrittenBytes(m, cwd, written) {
|
|
|
194
207
|
const t = writtenTarget(m, cwd, written);
|
|
195
208
|
return bytesAt(m, t.root, t.rel);
|
|
196
209
|
}
|
|
197
|
-
function attachmentHeader(name) {
|
|
210
|
+
function attachmentHeader(name, type = "attachment") {
|
|
198
211
|
const ascii = name.replace(/[^\x20-\x7e]|["\\]/g, "_") || "download";
|
|
199
212
|
const utf8 = encodeURIComponent(name).replace(/['()*]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
200
|
-
return
|
|
213
|
+
return `${type}; filename="${ascii}"; filename*=UTF-8''${utf8}`;
|
|
201
214
|
}
|
|
202
215
|
|
|
203
|
-
export { readFileBytes as a, attachmentHeader as b, readWrittenPreview as c, readFilePreview as d, listFiles as l, readWrittenBytes as r };
|
|
216
|
+
export { readFileBytes as a, attachmentHeader as b, readWrittenPreview as c, readFilePreview as d, isPdf as i, listFiles as l, readWrittenBytes as r };
|
|
204
217
|
//# sourceMappingURL=files.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
|
-
import {
|
|
4
|
+
import { aQ as baseMachines, aR as DATA_DIR } from '../nitro/nitro.mjs';
|
|
5
5
|
|
|
6
6
|
function cleanMachineOrder(value, known) {
|
|
7
7
|
if (!Array.isArray(value)) return [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import {
|
|
3
|
+
import { b1 as HOST_LABEL, aR as DATA_DIR } from '../nitro/nitro.mjs';
|
|
4
4
|
|
|
5
5
|
const ONBOARDING_FILE = path.join(DATA_DIR, "onboarding.json");
|
|
6
6
|
function readOnboarding(file = ONBOARDING_FILE, host = HOST_LABEL) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var name = "wherdr";
|
|
2
|
-
var version = "1.3.
|
|
2
|
+
var version = "1.3.4";
|
|
3
3
|
var license = "MIT";
|
|
4
4
|
var type = "module";
|
|
5
5
|
var description = "Unofficial mobile web client (PWA) to drive the coding agents running in Herdr";
|
|
@@ -59,6 +59,7 @@ var devDependencies = {
|
|
|
59
59
|
"@types/node": "^22.0.0",
|
|
60
60
|
"@types/web-push": "^3.6.4",
|
|
61
61
|
"@vite-pwa/nuxt": "^1.1.1",
|
|
62
|
+
"@vue/reactivity": "^3.5.43",
|
|
62
63
|
"@vue/test-utils": "^2.5.1",
|
|
63
64
|
"@xterm/addon-fit": "^0.10.0",
|
|
64
65
|
"@xterm/addon-webgl": "^0.18.0",
|
|
@@ -67,6 +68,7 @@ var devDependencies = {
|
|
|
67
68
|
"happy-dom": "^20.14.5",
|
|
68
69
|
marked: "^15.0.12",
|
|
69
70
|
nuxt: "^4.5.2",
|
|
71
|
+
"pdfjs-dist": "5.4.624",
|
|
70
72
|
tailwindcss: "^4.3.3",
|
|
71
73
|
typescript: "~5.9.3",
|
|
72
74
|
vitest: "^4.1.11",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { v as machineFor, x as herdrOn, H as HerdrError, f as findPane,
|
|
1
|
+
import { v as machineFor, x as herdrOn, H as HerdrError, f as findPane, ay as splitId, ag as log, aI as underHome, aO as isGitRepo, G as fmt, m as getState, a4 as sleep, au as IN_DOCKER, y as HERDR_CHILD_ENV, am as HOME, z as HERDR_BIN } from '../nitro/nitro.mjs';
|
|
2
2
|
import { execFile } from 'node:child_process';
|
|
3
3
|
import { b as binaryOn } from './projectBoard.mjs';
|
|
4
|
+
import { p as projectsPluginState } from './projectsPlugin2.mjs';
|
|
4
5
|
import { n as normalizeActions, P as PLUGIN_ID_RE, A as ACTION_ID_RE, a as actionContext, l as logResult, s as stripAnsi, o as outputTail, R as REMOTE_PROJECTS_SCRIPT } from './pluginPolicy.mjs';
|
|
5
6
|
import { c as cleanProjectInput, r as repoArgument, a as projectCommandArgs, b as parseProfileList, t as tickerRunning, s as setupHeader, P as PROJECT_INPUTS, d as readOnlyMessage } from './projectsActions.mjs';
|
|
6
7
|
|
|
@@ -40,9 +41,11 @@ async function runProjects(m, bin, args, timeoutMs = 6e4) {
|
|
|
40
41
|
})));
|
|
41
42
|
}
|
|
42
43
|
async function projectsBin(m) {
|
|
44
|
+
var _a;
|
|
43
45
|
const bin = await binaryOn(m);
|
|
44
|
-
if (
|
|
45
|
-
|
|
46
|
+
if (bin) return bin;
|
|
47
|
+
if ((_a = await projectsPluginState(m).catch(() => null)) == null ? void 0 : _a.unsupported) throw new HerdrError("plugin_unsupported", "herdr-projects 1.x is not supported by wherdr yet: install the 0.2 line (Settings \u203A Plugins \u203A herdr-projects)");
|
|
48
|
+
throw new HerdrError("plugin_unavailable", "Projects binary not found");
|
|
46
49
|
}
|
|
47
50
|
async function projectsCommand(m, args, lang = "en") {
|
|
48
51
|
const r = await runProjects(m, await projectsBin(m), args);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { execFile } from 'node:child_process';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { u as currentMachineSlots, q as paneBaseMachine, H as HerdrError, v as machineFor, x as herdrOn, y as HERDR_CHILD_ENV, z as HERDR_BIN, n as projectOf, B as isProjectThread } from '../nitro/nitro.mjs';
|
|
4
|
+
import { m as manifestBinary } from './projectsPlugin.mjs';
|
|
4
5
|
|
|
5
6
|
const ESCAPES = { b: "\b", t: " ", n: "\n", f: "\f", r: "\r", e: "\x1B", '"': '"', "\\": "\\" };
|
|
6
7
|
function unescapeBasic(s) {
|
|
@@ -256,13 +257,9 @@ const PLUGIN_ID = "herdr-projects";
|
|
|
256
257
|
function pluginBinary(plugins) {
|
|
257
258
|
const p = (plugins || []).find((x) => x && x.plugin_id === PLUGIN_ID && x.enabled !== false);
|
|
258
259
|
if (!p || typeof p.plugin_root !== "string" || !path.posix.isAbsolute(p.plugin_root)) return null;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
if (!/(^|\/)herdr-projects$/.test(bin) || bin.split("/").includes("..")) continue;
|
|
263
|
-
return path.posix.isAbsolute(bin) ? bin : path.posix.join(p.plugin_root, bin);
|
|
264
|
-
}
|
|
265
|
-
return null;
|
|
260
|
+
const bin = manifestBinary(p);
|
|
261
|
+
if (!bin) return null;
|
|
262
|
+
return path.posix.isAbsolute(bin) ? bin : path.posix.join(p.plugin_root, bin);
|
|
266
263
|
}
|
|
267
264
|
const bins = /* @__PURE__ */ new Map();
|
|
268
265
|
function binaryOn(m) {
|
|
@@ -1,56 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
installed: Boolean(plugin),
|
|
12
|
-
enabled: Boolean(plugin && plugin.enabled !== false),
|
|
13
|
-
version: plugin && typeof plugin.version === "string" && /^\d[\w.+-]{0,39}$/.test(plugin.version) ? plugin.version : null
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
async function canInstall(m) {
|
|
17
|
-
if (!m.local) return m.status === "online";
|
|
18
|
-
try {
|
|
19
|
-
await promises.access(path.join(m.home, ".config/herdr"), constants.W_OK);
|
|
20
|
-
return true;
|
|
21
|
-
} catch {
|
|
22
|
-
return false;
|
|
1
|
+
const PROJECTS_REPO = "afloury/herdr-projects";
|
|
2
|
+
const PROJECTS_UPSTREAM = "eliasstravik/herdr-projects";
|
|
3
|
+
const PROJECTS_REF = "v0.2.36";
|
|
4
|
+
const PROJECTS_INSTALL_ARGS = ["plugin", "install", PROJECTS_REPO, "--ref", PROJECTS_REF, "--yes"];
|
|
5
|
+
function manifestBinary(p) {
|
|
6
|
+
for (const c of [...p.startup || [], ...p.actions || [], ...p.panes || []]) {
|
|
7
|
+
const argv = Array.isArray(c == null ? void 0 : c.command) ? c.command : [];
|
|
8
|
+
const bin = typeof argv[0] === "string" ? argv[0] : "";
|
|
9
|
+
if (/(^|\/)herdr-projects$/.test(bin) && !bin.split("/").includes("..")) return bin;
|
|
23
10
|
}
|
|
11
|
+
return null;
|
|
24
12
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
const major = (version) => {
|
|
14
|
+
const m = /^(\d+)\./.exec(version || "");
|
|
15
|
+
return m ? Number(m[1]) : null;
|
|
16
|
+
};
|
|
17
|
+
function isUnsupportedProjects(p) {
|
|
18
|
+
const v = major(p.version);
|
|
19
|
+
if (v !== null) return v >= 1;
|
|
20
|
+
const hasCommands = [...p.startup || [], ...p.actions || [], ...p.panes || []].length > 0;
|
|
21
|
+
return hasCommands && !manifestBinary(p);
|
|
29
22
|
}
|
|
30
|
-
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const child = m.spawnHerdr([...PROJECTS_INSTALL_ARGS]);
|
|
35
|
-
return await new Promise((resolve, reject) => {
|
|
36
|
-
let output = "";
|
|
37
|
-
const append = (b) => {
|
|
38
|
-
output = (output + b.toString("utf8")).slice(-4e3);
|
|
39
|
-
};
|
|
40
|
-
child.stdout.on("data", append);
|
|
41
|
-
child.stderr.on("data", append);
|
|
42
|
-
const timer = setTimeout(() => child.kill("SIGKILL"), 12e4);
|
|
43
|
-
child.on("error", (e) => {
|
|
44
|
-
clearTimeout(timer);
|
|
45
|
-
reject(new HerdrError("install_failed", e.message));
|
|
46
|
-
});
|
|
47
|
-
child.on("close", (code) => {
|
|
48
|
-
clearTimeout(timer);
|
|
49
|
-
if (code !== 0) reject(new HerdrError("install_failed", output.trim().slice(-300) || fmt("Install failed (code {code})", { code })));
|
|
50
|
-
else resolve(output.trim().slice(-300));
|
|
51
|
-
});
|
|
52
|
-
});
|
|
23
|
+
function updatesToUnsupported(p) {
|
|
24
|
+
if (isUnsupportedProjects(p)) return false;
|
|
25
|
+
const s = p.source;
|
|
26
|
+
return Boolean(s && s.kind === "github" && `${s.owner}/${s.repo}`.toLowerCase() === PROJECTS_UPSTREAM);
|
|
53
27
|
}
|
|
54
28
|
|
|
55
|
-
export {
|
|
29
|
+
export { PROJECTS_INSTALL_ARGS as P, isUnsupportedProjects as i, manifestBinary as m, updatesToUnsupported as u };
|
|
56
30
|
//# sourceMappingURL=projectsPlugin.mjs.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { promises, constants } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { H as HerdrError, G as fmt, x as herdrOn } from '../nitro/nitro.mjs';
|
|
4
|
+
import { P as PROJECTS_INSTALL_ARGS, u as updatesToUnsupported, i as isUnsupportedProjects } from './projectsPlugin.mjs';
|
|
5
|
+
|
|
6
|
+
function projectsPluginFromList(plugins) {
|
|
7
|
+
const plugin = plugins.find((p) => p && p.plugin_id === "herdr-projects");
|
|
8
|
+
return {
|
|
9
|
+
installed: Boolean(plugin),
|
|
10
|
+
enabled: Boolean(plugin && plugin.enabled !== false),
|
|
11
|
+
version: plugin && typeof plugin.version === "string" && /^\d[\w.+-]{0,39}$/.test(plugin.version) ? plugin.version : null,
|
|
12
|
+
unsupported: Boolean(plugin && isUnsupportedProjects(plugin)),
|
|
13
|
+
upstream: Boolean(plugin && updatesToUnsupported(plugin))
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
const INSTALL_TIMEOUT_MS = 2 * 60 * 1e3;
|
|
17
|
+
async function canInstall(m) {
|
|
18
|
+
if (!m.local) return m.status === "online";
|
|
19
|
+
try {
|
|
20
|
+
await promises.access(path.join(m.home, ".config/herdr"), constants.W_OK);
|
|
21
|
+
return true;
|
|
22
|
+
} catch {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
async function projectsPluginState(m) {
|
|
27
|
+
if (m.status !== "online") throw new HerdrError("unreachable", fmt("{machine} is unreachable", { machine: m.label }));
|
|
28
|
+
const r = await herdrOn(m.key, "plugin.list", {}, 8e3);
|
|
29
|
+
return { ...projectsPluginFromList(r.plugins || []), installable: await canInstall(m) };
|
|
30
|
+
}
|
|
31
|
+
async function installProjectsPlugin(m) {
|
|
32
|
+
if (m.status !== "online") throw new HerdrError("unreachable", fmt("{machine} is unreachable", { machine: m.label }));
|
|
33
|
+
if ((await projectsPluginState(m)).installed) throw new HerdrError("already_installed", "herdr-projects is already installed");
|
|
34
|
+
if (!await canInstall(m)) throw new HerdrError("read_only", fmt("Herdr folder is read-only on {machine}", { machine: m.label }));
|
|
35
|
+
const child = m.spawnHerdr([...PROJECTS_INSTALL_ARGS]);
|
|
36
|
+
return await new Promise((resolve, reject) => {
|
|
37
|
+
let output = "";
|
|
38
|
+
const append = (b) => {
|
|
39
|
+
output = (output + b.toString("utf8")).slice(-4e3);
|
|
40
|
+
};
|
|
41
|
+
child.stdout.on("data", append);
|
|
42
|
+
child.stderr.on("data", append);
|
|
43
|
+
const timer = setTimeout(() => child.kill("SIGKILL"), INSTALL_TIMEOUT_MS);
|
|
44
|
+
child.on("error", (e) => {
|
|
45
|
+
clearTimeout(timer);
|
|
46
|
+
reject(new HerdrError("install_failed", e.message));
|
|
47
|
+
});
|
|
48
|
+
child.on("close", (code) => {
|
|
49
|
+
clearTimeout(timer);
|
|
50
|
+
if (code !== 0) reject(new HerdrError("install_failed", output.trim().slice(-300) || fmt("Install failed (code {code})", { code })));
|
|
51
|
+
else resolve(output.trim().slice(-300));
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { installProjectsPlugin as i, projectsPluginState as p };
|
|
57
|
+
//# sourceMappingURL=projectsPlugin2.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HerdrError,
|
|
1
|
+
import { H as HerdrError, a9 as paneForeground, aa as codexMenuOpen, ab as stopAgent, ac as terminalUpdateLine, ad as waitFor, ae as terminalUpdateDone, af as startAgent, a4 as sleep, f as findPane, a1 as restarts, ag as log, X as withPaneLock, ah as RESTARTABLE, J as transcripts, ai as claudeFooterMode, aj as planRestart, h as herdr, p as poll } from '../nitro/nitro.mjs';
|
|
2
2
|
import crypto from 'node:crypto';
|
|
3
3
|
|
|
4
4
|
const TERM_UPDATE_MS = 10 * 6e4;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { execFile } from 'node:child_process';
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
|
-
import {
|
|
3
|
+
import { au as IN_DOCKER, av as HOST_OPEN_TARGET, aw as HOST_OPEN_KEY, H as HerdrError, ax as PANE_RE, f as findPane, a6 as getMachine, ay as splitId, G as fmt, ag as log, az as HOST_OPEN_USER } from '../nitro/nitro.mjs';
|
|
4
4
|
import { r as resolveAgentPath, a as runnablePath } from './filePaths.mjs';
|
|
5
5
|
|
|
6
6
|
const REVEAL_CHECKS = `p=$2
|
|
@@ -3,7 +3,7 @@ import fs from 'node:fs';
|
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { p as pkg } from './package.mjs';
|
|
6
|
-
import {
|
|
6
|
+
import { bK as installMode, H as HerdrError, ag as log, bL as oneTapMode, bO as updateRunning } from '../nitro/nitro.mjs';
|
|
7
7
|
import { c as checkUpdate, R as REPO } from './updates.mjs';
|
|
8
8
|
|
|
9
9
|
function wherdrDir(env = process.env) {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const SGR = /\x1b\[([\d;]*)m/g;
|
|
2
|
+
function highlight(params, state) {
|
|
3
|
+
const codes = params === "" ? [0] : params.split(";").map(Number);
|
|
4
|
+
for (let i = 0; i < codes.length; i++) {
|
|
5
|
+
const c = codes[i];
|
|
6
|
+
if (c === 38 || c === 48 || c === 58) {
|
|
7
|
+
if (c === 48) state.bg = true;
|
|
8
|
+
i += codes[i + 1] === 5 ? 2 : codes[i + 1] === 2 ? 4 : 0;
|
|
9
|
+
} else if (c === 0) {
|
|
10
|
+
state.bg = false;
|
|
11
|
+
state.inverse = false;
|
|
12
|
+
} else if (c === 7) state.inverse = true;
|
|
13
|
+
else if (c === 27) state.inverse = false;
|
|
14
|
+
else if (c === 49) state.bg = false;
|
|
15
|
+
else if (c >= 40 && c <= 47) state.bg = true;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function activeTab(line) {
|
|
19
|
+
const state = { bg: false, inverse: false };
|
|
20
|
+
let last = 0;
|
|
21
|
+
const words = [];
|
|
22
|
+
const push = (s) => {
|
|
23
|
+
for (const w of s.split(/\s+/)) if (w) words.push({ text: w, bg: state.bg || state.inverse });
|
|
24
|
+
};
|
|
25
|
+
for (const m of line.matchAll(SGR)) {
|
|
26
|
+
push(line.slice(last, m.index));
|
|
27
|
+
highlight(m[1], state);
|
|
28
|
+
last = m.index + m[0].length;
|
|
29
|
+
}
|
|
30
|
+
push(line.slice(last));
|
|
31
|
+
const hit = words.find((w) => w.bg && w.text !== "Settings");
|
|
32
|
+
return hit ? hit.text.replace(/[^\w]/g, "") : null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { activeTab as a };
|
|
36
|
+
//# sourceMappingURL=settingstabs.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as pkg } from './package.mjs';
|
|
2
|
-
import {
|
|
2
|
+
import { bK as installMode, bL as oneTapMode, bM as updateCommand, bN as compareVersions } from '../nitro/nitro.mjs';
|
|
3
3
|
|
|
4
4
|
const REPO = "afloury/wherdr";
|
|
5
5
|
const RELEASES_URL = `https://api.github.com/repos/${REPO}/releases?per_page=100`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bP as allMachines, a6 as getMachine, H as HerdrError, ay as splitId, x as herdrOn, p as poll, bQ as recentDirs, bR as joinId, m as getState } from '../nitro/nitro.mjs';
|
|
2
2
|
|
|
3
3
|
const opts = { trust_repository: true };
|
|
4
4
|
async function machineWorktrees(m) {
|