wherdr 1.3.3 → 2.0.0
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/BDNMzG2s.js +1 -0
- package/.output/public/_nuxt/BETID3_E.js +1 -0
- package/.output/public/_nuxt/BHenDMeH.js +1 -0
- package/.output/public/_nuxt/BYZVrreW.js +1 -0
- package/.output/public/_nuxt/BhgehRdJ.js +1 -0
- package/.output/public/_nuxt/{yzABg5xl.js → Bpoxvzh6.js} +1 -1
- package/.output/public/_nuxt/BtH82ZuZ.js +9 -0
- package/.output/public/_nuxt/C25ROUa9.js +3 -0
- package/.output/public/_nuxt/C3Bkn4ac.js +62 -0
- package/.output/public/_nuxt/CDWjMk9C.js +2 -0
- package/.output/public/_nuxt/{Ci8N4mWR.js → CXJnLmWv.js} +1 -1
- package/.output/public/_nuxt/CuUQ4mEf.js +1 -0
- package/.output/public/_nuxt/DFGEl0v2.js +23 -0
- package/.output/public/_nuxt/{CKhgznq4.js → DFmgQVme.js} +42 -39
- package/.output/public/_nuxt/DZGKxROq.js +6 -0
- package/.output/public/_nuxt/DmkWvmnE.js +2 -0
- package/.output/public/_nuxt/DrKKeFFE.js +31 -0
- package/.output/public/_nuxt/DyfFwwGq.js +1 -0
- package/.output/public/_nuxt/FaNto0ga.js +105 -0
- package/.output/public/_nuxt/NIF0VwHk.js +25 -0
- package/.output/public/_nuxt/R0Y4VoeX.js +1 -0
- package/.output/public/_nuxt/board.CEEcFc6M.css +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/0b28b3e9-664e-4347-a35b-afb0a711d5c5.json +1 -0
- package/.output/public/_nuxt/entry.CKoXcwRa.css +2 -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/settings.Cdb21nNw.css +1 -0
- package/.output/public/sw.js +1 -1
- package/.output/server/chunks/_/branding.mjs +1 -1
- package/.output/server/chunks/_/changes.mjs +4 -4
- package/.output/server/chunks/_/fileDownload.mjs +278 -0
- package/.output/server/chunks/_/files.mjs +60 -20
- package/.output/server/chunks/_/machineOrder.mjs +1 -1
- package/.output/server/chunks/_/onboarding.mjs +1 -1
- package/.output/server/chunks/_/package.mjs +11 -3
- package/.output/server/chunks/_/plugins.mjs +92 -122
- package/.output/server/chunks/_/restart.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 +43 -6
- package/.output/server/chunks/nitro/nitro.mjs +14126 -10238
- package/.output/server/chunks/raw/check-doc-links.mjs +5 -0
- package/.output/server/chunks/raw/check-leaks.mjs +1 -1
- package/.output/server/chunks/raw/check-release-notes.mjs +5 -0
- package/.output/server/chunks/raw/herdr-plugin.mjs +1 -1
- package/.output/server/chunks/raw/install-claude-statusline.mjs +1 -1
- package/.output/server/chunks/raw/prerelease-summary.mjs +5 -0
- package/.output/server/chunks/raw/prerelease.mjs +7 -0
- package/.output/server/chunks/raw/reveal.mjs +1 -1
- package/.output/server/chunks/raw/test-affected.mjs +5 -0
- package/.output/server/chunks/routes/api/_..._.mjs +6 -5
- package/.output/server/chunks/routes/api/agents.post.mjs +6 -5
- package/.output/server/chunks/routes/api/ask-tab.post.mjs +6 -5
- package/.output/server/chunks/routes/api/attach.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/disable.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/lock-all.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/lock.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/login/options.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/login/verify.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/max-session.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/register/options.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/register/verify.post.mjs +6 -5
- package/.output/server/chunks/routes/api/auth/status.get.mjs +6 -5
- package/.output/server/chunks/routes/api/changes.get.mjs +7 -6
- package/.output/server/chunks/routes/api/chat/image.get.mjs +7 -6
- package/.output/server/chunks/routes/api/chat.get.mjs +44 -11
- package/.output/server/chunks/routes/api/choose.post.mjs +44 -30
- package/.output/server/chunks/routes/api/claude-setup.post.mjs +42 -0
- package/.output/server/chunks/routes/api/claude-statusline.post.mjs +7 -6
- package/.output/server/chunks/routes/api/clear-queued-input.post.mjs +42 -0
- package/.output/server/chunks/routes/api/close/status.get.mjs +7 -6
- package/.output/server/chunks/routes/api/close.post.mjs +6 -5
- package/.output/server/chunks/routes/api/codex-update.post.mjs +7 -6
- package/.output/server/chunks/routes/api/commands.get.mjs +9 -7
- package/.output/server/chunks/routes/api/config.get.mjs +10 -13
- package/.output/server/chunks/routes/api/dirs.get.mjs +7 -6
- package/.output/server/chunks/routes/api/dismiss-stopped.post.mjs +7 -6
- package/.output/server/chunks/routes/api/dismiss.post.mjs +7 -6
- package/.output/server/chunks/routes/api/effort.post.mjs +7 -6
- package/.output/server/chunks/routes/api/efforts.get.mjs +7 -6
- package/.output/server/chunks/routes/api/file.post.mjs +7 -6
- package/.output/server/chunks/routes/api/files/download.get.mjs +12 -24
- package/.output/server/chunks/routes/api/files/download.head.mjs +41 -0
- package/.output/server/chunks/routes/api/files/read.get.mjs +8 -7
- package/.output/server/chunks/routes/api/files.get.mjs +7 -6
- package/.output/server/chunks/routes/api/health.get.mjs +6 -5
- package/.output/server/chunks/routes/api/input.post.mjs +33 -15
- package/.output/server/chunks/routes/api/interrupt.post.mjs +24 -21
- package/.output/server/chunks/routes/api/isgit.get.mjs +8 -8
- package/.output/server/chunks/routes/api/machine/awake.get.mjs +7 -6
- package/.output/server/chunks/routes/api/machine/awake.post.mjs +7 -6
- package/.output/server/chunks/routes/api/machine/order.get.mjs +6 -5
- package/.output/server/chunks/routes/api/machine/order.post.mjs +6 -5
- package/.output/server/chunks/routes/api/machine/reconnect.post.mjs +40 -0
- package/.output/server/chunks/routes/api/machine/rename.post.mjs +7 -6
- package/.output/server/chunks/routes/api/machine/status.post.mjs +39 -0
- package/.output/server/chunks/routes/api/menu-left.post.mjs +40 -0
- package/.output/server/chunks/routes/api/menu.post.mjs +10 -6
- package/.output/server/chunks/routes/api/model.post.mjs +7 -6
- package/.output/server/chunks/routes/api/models.get.mjs +7 -6
- package/.output/server/chunks/routes/api/nav.post.mjs +40 -26
- package/.output/server/chunks/routes/api/onboarding.get.mjs +6 -5
- package/.output/server/chunks/routes/api/onboarding.post.mjs +6 -5
- package/.output/server/chunks/routes/api/phone.get.mjs +8 -10
- package/.output/server/chunks/routes/api/phone.post.mjs +8 -10
- package/.output/server/chunks/routes/api/plugins/actions.get.mjs +6 -8
- package/.output/server/chunks/routes/api/plugins/invoke.post.mjs +6 -8
- package/.output/server/chunks/routes/api/plugins/projects.get.mjs +10 -8
- package/.output/server/chunks/routes/api/plugins/projects.post.mjs +11 -7
- package/.output/server/chunks/routes/api/prompt.post.mjs +22 -13
- package/.output/server/chunks/routes/api/push/quiet.post.mjs +7 -6
- package/.output/server/chunks/routes/api/push/subscribe.post.mjs +7 -7
- package/.output/server/chunks/routes/api/push/test.post.mjs +7 -6
- package/.output/server/chunks/routes/api/push/unsubscribe.post.mjs +7 -6
- package/.output/server/chunks/routes/api/quotas.get.mjs +7 -6
- package/.output/server/chunks/routes/api/rename.post.mjs +6 -5
- package/.output/server/chunks/routes/api/requeue.post.mjs +7 -6
- package/.output/server/chunks/routes/api/restart.get.mjs +6 -5
- package/.output/server/chunks/routes/api/restart.post.mjs +6 -5
- package/.output/server/chunks/routes/api/reveal.post.mjs +91 -8
- package/.output/server/chunks/routes/api/screen-key.post.mjs +19 -15
- package/.output/server/chunks/routes/api/screen.get.mjs +8 -40
- package/.output/server/chunks/routes/api/search.get.mjs +7 -6
- package/.output/server/chunks/routes/api/seen.post.mjs +7 -6
- package/.output/server/chunks/routes/api/sessions.get.mjs +7 -6
- package/.output/server/chunks/routes/api/sessions.post.mjs +7 -6
- package/.output/server/chunks/routes/api/settings-tab.post.mjs +90 -0
- package/.output/server/chunks/routes/api/{plugins/thread-limits.get.mjs → settings.get.mjs} +10 -9
- package/.output/server/chunks/routes/api/settings.post.mjs +40 -0
- package/.output/server/chunks/routes/api/space.post.mjs +34 -18
- package/.output/server/chunks/routes/api/state.get.mjs +7 -6
- package/.output/server/chunks/routes/api/tasks/action.post.mjs +39 -0
- package/.output/server/chunks/routes/api/{plugins/profiles.get.mjs → tasks/add.post.mjs} +12 -14
- package/.output/server/chunks/routes/api/tasks/after.post.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks/approve.post.mjs +39 -0
- package/.output/server/chunks/routes/api/{project/report.get.mjs → tasks/archived.get.mjs} +12 -13
- package/.output/server/chunks/routes/api/{gitroot.get.mjs → tasks/autopilot.get.mjs} +13 -14
- package/.output/server/chunks/routes/api/tasks/autopilot.post.mjs +39 -0
- package/.output/server/chunks/routes/api/{index.get.mjs → tasks/board-settings.get.mjs} +12 -13
- package/.output/server/chunks/routes/api/tasks/board-settings.post.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks/coordinator.get.mjs +40 -0
- package/.output/server/chunks/routes/api/tasks/coordinator.post.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks/details.get.mjs +40 -0
- package/.output/server/chunks/routes/api/tasks/limit.post.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks/links.get.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks/models.get.mjs +40 -0
- package/.output/server/chunks/routes/api/tasks/pick.post.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks/question.post.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks/scheduled.get.mjs +40 -0
- package/.output/server/chunks/routes/api/{project → tasks}/settings.get.mjs +10 -11
- package/.output/server/chunks/routes/api/tasks/start.get.mjs +40 -0
- package/.output/server/chunks/routes/api/tasks/tell.post.mjs +39 -0
- package/.output/server/chunks/routes/api/tasks.get.mjs +39 -0
- package/.output/server/chunks/routes/api/unqueue.post.mjs +7 -6
- package/.output/server/chunks/routes/api/update/status.get.mjs +6 -5
- package/.output/server/chunks/routes/api/update.get.mjs +8 -10
- package/.output/server/chunks/routes/api/update.post.mjs +8 -10
- package/.output/server/chunks/routes/api/upload.post.mjs +7 -6
- package/.output/server/chunks/routes/api/worktrees/remove.post.mjs +6 -5
- package/.output/server/chunks/routes/api/worktrees.get.mjs +6 -5
- package/.output/server/chunks/routes/favicon.ico.get.mjs +6 -5
- package/.output/server/chunks/routes/icons/_name_.get.mjs +7 -6
- package/.output/server/chunks/routes/renderer.mjs +8 -7
- package/.output/server/chunks/routes/uploads/_...name_.get.mjs +7 -6
- package/.output/server/chunks/routes/ws/_..._.mjs +7 -6
- package/.output/server/chunks/routes/ws/events.mjs +9 -7
- package/.output/server/chunks/routes/ws/term.mjs +7 -6
- package/.output/server/chunks/virtual/precomputed.mjs +1 -1
- package/.output/server/index.mjs +7 -6
- package/.output/server/package.json +1 -1
- package/README.md +44 -1424
- package/bin/lib/commands.mjs +44 -9
- package/bin/lib/panel.mjs +3 -11
- package/bin/lib/service.mjs +41 -2
- package/bin/lib/skill.mjs +1 -1
- package/bin/lib/tailnet.d.mts +6 -3
- package/bin/lib/tailnet.mjs +70 -32
- package/bin/lib/userpath.d.mts +14 -0
- package/bin/lib/userpath.mjs +142 -0
- package/docs/README.md +58 -0
- package/docs/RELEASING.md +174 -0
- package/docs/board.md +164 -0
- package/docs/command.md +58 -0
- package/docs/configuration.md +39 -0
- package/docs/conversation.md +132 -0
- package/docs/development.md +38 -0
- package/docs/devices.md +58 -0
- package/docs/files.md +29 -0
- package/docs/herdr-projects-1x.md +278 -0
- package/docs/home.md +52 -0
- package/docs/installation.md +174 -0
- package/docs/machines.md +69 -0
- package/docs/migrate-from-1.x-docker.md +160 -0
- package/docs/networks.md +154 -0
- package/docs/notifications.md +83 -0
- package/docs/overview.md +71 -0
- package/docs/phone.md +26 -0
- package/docs/plugins.md +109 -0
- package/docs/quick-start.md +89 -0
- package/docs/quotas.md +65 -0
- package/docs/release-notes-2.0.0.md +84 -0
- package/docs/security.md +117 -0
- package/docs/terminal.md +15 -0
- package/docs/troubleshooting.md +45 -0
- package/package.json +11 -3
- package/skills/wherdr/SKILL.md +24 -167
- 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/CP8o925U.js +0 -1
- package/.output/public/_nuxt/CWwyK2XK.js +0 -2
- package/.output/public/_nuxt/CkbmecwS.js +0 -1
- package/.output/public/_nuxt/Cr3SrGky.js +0 -1
- package/.output/public/_nuxt/DAg9fiVh.js +0 -89
- package/.output/public/_nuxt/DT8qZ0Wv.js +0 -1
- package/.output/public/_nuxt/DaaJIRB3.js +0 -1
- 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
- package/.output/server/chunks/_/pluginPolicy.mjs +0 -93
- package/.output/server/chunks/_/projectBoard.mjs +0 -366
- package/.output/server/chunks/_/projectDocs.mjs +0 -106
- package/.output/server/chunks/_/projectInbox.mjs +0 -135
- package/.output/server/chunks/_/projectThreads.mjs +0 -46
- package/.output/server/chunks/_/projectThreads2.mjs +0 -61
- package/.output/server/chunks/_/projectsActions.mjs +0 -143
- package/.output/server/chunks/_/projectsPlugin.mjs +0 -56
- package/.output/server/chunks/_/reveal.mjs +0 -115
- package/.output/server/chunks/raw/dev.wherdr.open.mjs +0 -7
- package/.output/server/chunks/raw/docker-entrypoint.mjs +0 -7
- package/.output/server/chunks/raw/install-host-open.mjs +0 -7
- package/.output/server/chunks/raw/wherdr-open.mjs +0 -7
- package/.output/server/chunks/routes/api/board.get.mjs +0 -147
- package/.output/server/chunks/routes/api/plugins/thread-limits.post.mjs +0 -45
- package/.output/server/chunks/routes/api/project/inbox.get.mjs +0 -43
- package/.output/server/chunks/routes/api/project/inbox.post.mjs +0 -43
- package/.output/server/chunks/routes/api/project/memory.get.mjs +0 -42
- package/.output/server/chunks/routes/api/project/routines.get.mjs +0 -43
- package/.output/server/chunks/routes/api/project/thread.get.mjs +0 -44
- package/.output/server/chunks/routes/api/project/thread.post.mjs +0 -45
- package/bin/install-docker-skill.sh +0 -20
|
@@ -16,18 +16,19 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const lock_post = defineApi((event) => auth.lock(reqOf(event)));
|
|
33
34
|
|
|
@@ -16,18 +16,19 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const options_post = defineApi((event) => auth.loginOptions(reqOf(event)));
|
|
33
34
|
|
|
@@ -16,18 +16,19 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const verify_post = defineApi((event, body) => auth.loginVerify(reqOf(event), body));
|
|
33
34
|
|
|
@@ -16,18 +16,19 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const maxSession_post = defineApi((event, body) => auth.setMaxSession(reqOf(event), body == null ? void 0 : body.days));
|
|
33
34
|
|
|
@@ -16,18 +16,19 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const options_post = defineApi((event, body) => auth.registerOptions(reqOf(event), body));
|
|
33
34
|
|
|
@@ -16,18 +16,19 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const verify_post = defineApi((event, body) => auth.registerVerify(reqOf(event), body));
|
|
33
34
|
|
|
@@ -16,18 +16,19 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const status_get = defineApi((event) => ({
|
|
33
34
|
...auth.status(reqOf(event), { resume: getQuery(event).resume === "1" }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi, i as getQuery, f as findPane, H as HerdrError,
|
|
1
|
+
import { a as defineApi, i as getQuery, f as findPane, H as HerdrError, m as machineFor } from '../../nitro/nitro.mjs';
|
|
2
2
|
import { r as readChanges } from '../../_/changes.mjs';
|
|
3
3
|
import 'node:http';
|
|
4
4
|
import 'node:https';
|
|
@@ -17,18 +17,19 @@ import 'node:events';
|
|
|
17
17
|
import 'node:buffer';
|
|
18
18
|
import 'node:fs';
|
|
19
19
|
import 'node:path';
|
|
20
|
-
import 'web-push';
|
|
21
20
|
import 'node:os';
|
|
22
|
-
import 'node:child_process';
|
|
23
21
|
import 'node:net';
|
|
24
|
-
import 'node:
|
|
25
|
-
import 'node:readline';
|
|
22
|
+
import 'node:child_process';
|
|
26
23
|
import 'node:dns';
|
|
27
24
|
import 'node:util';
|
|
25
|
+
import 'web-push';
|
|
26
|
+
import 'node:string_decoder';
|
|
27
|
+
import 'node:fs/promises';
|
|
28
|
+
import 'node:readline';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
30
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
-
import '@simplewebauthn/server';
|
|
31
31
|
import 'node:url';
|
|
32
|
+
import '@simplewebauthn/server';
|
|
32
33
|
|
|
33
34
|
const changes_get = defineApi(async (event) => {
|
|
34
35
|
const q = getQuery(event);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as defineEventHandler, i as getQuery, f as findPane,
|
|
1
|
+
import { d as defineEventHandler, i as getQuery, f as findPane, y as transcripts, s as sendError, I as sendImage } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import 'node:http';
|
|
3
3
|
import 'node:https';
|
|
4
4
|
import 'node:crypto';
|
|
@@ -16,18 +16,19 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const image_get = defineEventHandler(async (event) => {
|
|
33
34
|
const q = getQuery(event);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as UPLOAD_DIR,
|
|
1
|
+
import { U as UPLOAD_DIR, u as uploadNames, n as runHerdrCli, o as parseIntegrationStatus, a as defineApi, i as getQuery, f as findPane, H as HerdrError, q as machineOfPane, t as fmt, v as takenBackOf, x as chatDelta, y as transcripts, z as missingIntegration, B as multiMachine, C as integrationCommand, D as chatPasted, E as withoutTakenBack, F as withSentText, G as currentModel } from '../../nitro/nitro.mjs';
|
|
2
2
|
import { createHash } from 'node:crypto';
|
|
3
3
|
import fs from 'node:fs/promises';
|
|
4
4
|
import path from 'node:path';
|
|
@@ -17,33 +17,34 @@ import 'url';
|
|
|
17
17
|
import 'node:events';
|
|
18
18
|
import 'node:buffer';
|
|
19
19
|
import 'node:fs';
|
|
20
|
-
import 'web-push';
|
|
21
20
|
import 'node:os';
|
|
22
|
-
import 'node:child_process';
|
|
23
21
|
import 'node:net';
|
|
24
|
-
import 'node:
|
|
22
|
+
import 'node:child_process';
|
|
25
23
|
import 'node:dns';
|
|
26
24
|
import 'node:util';
|
|
25
|
+
import 'web-push';
|
|
26
|
+
import 'node:string_decoder';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const UPLOAD_PATH = /\.cache\/herdr-web\/uploads\/([\w-]+\.[a-z]+)/g;
|
|
33
34
|
const CACHE_MAX = 500;
|
|
34
|
-
const cache = /* @__PURE__ */ new Map();
|
|
35
|
+
const cache$1 = /* @__PURE__ */ new Map();
|
|
35
36
|
async function uploadHash(dir, name) {
|
|
36
37
|
const key = `${dir}
|
|
37
38
|
${name}`;
|
|
38
|
-
if (cache.has(key)) return cache.get(key);
|
|
39
|
+
if (cache$1.has(key)) return cache$1.get(key);
|
|
39
40
|
let hash = null;
|
|
40
41
|
try {
|
|
41
42
|
hash = createHash("sha256").update(await fs.readFile(path.join(dir, path.basename(name)))).digest("hex");
|
|
42
43
|
} catch {
|
|
43
44
|
hash = null;
|
|
44
45
|
}
|
|
45
|
-
if (cache.size >= CACHE_MAX) cache.delete(cache.keys().next().value);
|
|
46
|
-
cache.set(key, hash);
|
|
46
|
+
if (cache$1.size >= CACHE_MAX) cache$1.delete(cache$1.keys().next().value);
|
|
47
|
+
cache$1.set(key, hash);
|
|
47
48
|
return hash;
|
|
48
49
|
}
|
|
49
50
|
async function addUploadHashes(items, dir = UPLOAD_DIR) {
|
|
@@ -68,6 +69,23 @@ ${((_a = it.omp) == null ? void 0 : _a.target) || ""}`.matchAll(UPLOAD_PATH)].ma
|
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
const ttl = Number(process.env.WHERDR_INTEGRATION_TTL_MS);
|
|
73
|
+
const TTL_MS = Number.isFinite(ttl) && ttl >= 0 ? ttl : 6e4;
|
|
74
|
+
const cache = /* @__PURE__ */ new Map();
|
|
75
|
+
const keyOf = (m) => m.local ? "" : `${m.target || m.key}`;
|
|
76
|
+
async function integrationStatus(m) {
|
|
77
|
+
const key = keyOf(m);
|
|
78
|
+
const hit = cache.get(key);
|
|
79
|
+
if (hit == null ? void 0 : hit.pending) return hit.pending;
|
|
80
|
+
if (hit && Date.now() - hit.at < TTL_MS) return hit.status;
|
|
81
|
+
const pending = runHerdrCli(m, ["integration", "status"], 8e3).then((r) => r.code === 0 ? parseIntegrationStatus(r.stdout.toString("utf8")) : null).catch(() => null).then((status) => {
|
|
82
|
+
cache.set(key, { at: Date.now(), status: status && Object.keys(status).length ? status : null });
|
|
83
|
+
return cache.get(key).status;
|
|
84
|
+
});
|
|
85
|
+
cache.set(key, { at: (hit == null ? void 0 : hit.at) || 0, status: (hit == null ? void 0 : hit.status) || null, pending });
|
|
86
|
+
return pending;
|
|
87
|
+
}
|
|
88
|
+
|
|
71
89
|
const chat_get = defineApi(async (event) => {
|
|
72
90
|
const q = getQuery(event);
|
|
73
91
|
const p = findPane(String(q.pane || ""));
|
|
@@ -77,18 +95,33 @@ const chat_get = defineApi(async (event) => {
|
|
|
77
95
|
const num = (k) => q[k] !== void 0 ? Math.max(0, Number(q[k]) || 0) : null;
|
|
78
96
|
const { hidden, seq } = takenBackOf(p.id);
|
|
79
97
|
const mark = hidden.length ? `~${seq}` : "";
|
|
80
|
-
const
|
|
98
|
+
const sent = String(q.since || "");
|
|
99
|
+
const count = num("n");
|
|
100
|
+
const since = chatDelta.sinceOf(p.id, sent, count);
|
|
101
|
+
const from = num("from");
|
|
81
102
|
const r = await transcripts.chat(p, {
|
|
82
103
|
since: mark ? since.endsWith(mark) ? since.slice(0, -mark.length) : "" : since,
|
|
83
|
-
from
|
|
104
|
+
from,
|
|
84
105
|
// re-read from this byte (bottom of the conversation already shown)
|
|
106
|
+
anchor: sent,
|
|
107
|
+
// join check above `from`, even for a list the server forgot
|
|
85
108
|
before: num("before")
|
|
86
109
|
// older slice, ending at this byte
|
|
87
110
|
});
|
|
111
|
+
if (!r.available && r.reason === "not_found" && m && p.agent && !p.agentSession && missingIntegration(p, await integrationStatus(m), m.transcripts.wasActive(p.id, p.agent))) {
|
|
112
|
+
return { ...r, reason: "no_integration", integration: { agent: p.agent, command: integrationCommand(p.agent), machine: multiMachine() ? m.label : null } };
|
|
113
|
+
}
|
|
88
114
|
if (r.token) r.token += mark;
|
|
115
|
+
if (r.unchanged) r.token = sent;
|
|
89
116
|
if (r.items) {
|
|
90
117
|
r.items = chatPasted(withoutTakenBack(r.items, hidden));
|
|
91
118
|
await addUploadHashes(r.items);
|
|
119
|
+
if (r.token && !r.older) {
|
|
120
|
+
const d = chatDelta.reply(p.id, r.token, r.items, sent, count, from !== null && r.start === from && !r.rewritten);
|
|
121
|
+
r.token = d.token;
|
|
122
|
+
r.items = d.items;
|
|
123
|
+
if (d.keep !== void 0) r.keep = d.keep;
|
|
124
|
+
}
|
|
92
125
|
}
|
|
93
126
|
if (r.queue && r.queue.length) r.queue = withSentText(p.id, r.queue);
|
|
94
127
|
return r.available ? { ...r, model: await currentModel(p).catch(() => null) } : r;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HerdrError,
|
|
1
|
+
import { H as HerdrError, J as keysFor, K as parseChoices, L as parseOmpField, a as defineApi, P as PANE_RE, f as findPane, M as withPaneLock, N as selfUpdates, O as restarting, Q as updateChoices, R as UPDATE_LABELS, S as updateRestartPlan, T as restarts, p as poll, h as herdr, y as transcripts, b as screenChoices, V as usesTerminalException, W as sameQuestion, X as sleep, g as choicesCache } from '../../nitro/nitro.mjs';
|
|
2
2
|
import 'node:http';
|
|
3
3
|
import 'node:https';
|
|
4
4
|
import 'node:crypto';
|
|
@@ -16,32 +16,33 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const OPEN_MS = 3e3;
|
|
33
34
|
const answering = /* @__PURE__ */ new Set();
|
|
34
|
-
async function answerFree(d, paneId, choices, index,
|
|
35
|
+
async function answerFree(d, paneId, choices, index, answer2, agent) {
|
|
35
36
|
if (answering.has(paneId)) throw new HerdrError("busy", "An answer is already being sent.");
|
|
36
37
|
answering.add(paneId);
|
|
37
38
|
try {
|
|
38
|
-
if (agent === "claude") await typeClaudeAnswer(d, paneId, choices, index,
|
|
39
|
-
else await typeAnswer(d, paneId, choices, index,
|
|
39
|
+
if (agent === "claude") await typeClaudeAnswer(d, paneId, choices, index, answer2);
|
|
40
|
+
else await typeAnswer(d, paneId, choices, index, answer2);
|
|
40
41
|
} finally {
|
|
41
42
|
answering.delete(paneId);
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
|
-
async function typeAnswer(d, paneId, choices, index,
|
|
45
|
+
async function typeAnswer(d, paneId, choices, index, answer2) {
|
|
45
46
|
const keys = (k) => d.call("pane.send_input", { pane_id: paneId, keys: k });
|
|
46
47
|
const field = async () => {
|
|
47
48
|
var _a, _b;
|
|
@@ -60,7 +61,7 @@ async function typeAnswer(d, paneId, choices, index, answer) {
|
|
|
60
61
|
f = await field();
|
|
61
62
|
}
|
|
62
63
|
if (!f) throw new HerdrError("stale", "omp\u2019s answer field did not open \u2014 check the current screen.");
|
|
63
|
-
const lines =
|
|
64
|
+
const lines = answer2.replace(/\u001b\[[0-?]*[ -/]*[@-~]/g, "").replace(/\t/g, " ").replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]/g, "").split(/\r\n|[\r\n\u2028\u2029]/);
|
|
64
65
|
const closed = new HerdrError("stale", "omp\u2019s answer field closed \u2014 answer not submitted, check the current screen.");
|
|
65
66
|
for (let i = 0; i < lines.length; i++) {
|
|
66
67
|
if (i) {
|
|
@@ -78,13 +79,13 @@ async function typeAnswer(d, paneId, choices, index, answer) {
|
|
|
78
79
|
await keys(["enter"]);
|
|
79
80
|
}
|
|
80
81
|
const squash = (s) => s.replace(/\s+/g, "");
|
|
81
|
-
async function typeClaudeAnswer(d, paneId, choices, index,
|
|
82
|
+
async function typeClaudeAnswer(d, paneId, choices, index, answer2) {
|
|
82
83
|
const keys = (k) => d.call("pane.send_input", { pane_id: paneId, keys: k });
|
|
83
84
|
const field = async () => {
|
|
84
85
|
var _a, _b;
|
|
85
86
|
const c = parseChoices((_b = (_a = await d.call("pane.read", { pane_id: paneId, source: "detection" }, 4e3)) == null ? void 0 : _a.read) == null ? void 0 : _b.text);
|
|
86
87
|
const o = c && c.options[c.cursor];
|
|
87
|
-
return o && o.free ? { value: o.hint || "", checked: o.checked } : null;
|
|
88
|
+
return o && o.free ? { value: o.hint || "", checked: o.checked, question: c.question } : null;
|
|
88
89
|
};
|
|
89
90
|
const moves = keysFor(choices, index).slice(0, -1);
|
|
90
91
|
if (moves.length) await keys(moves);
|
|
@@ -94,13 +95,14 @@ async function typeClaudeAnswer(d, paneId, choices, index, answer) {
|
|
|
94
95
|
f = await field();
|
|
95
96
|
}
|
|
96
97
|
if (!f) throw new HerdrError("stale", "Claude\u2019s answer field could not be reached \u2014 check the current screen.");
|
|
97
|
-
|
|
98
|
+
for (let round = 0; f && f.value; round++) {
|
|
99
|
+
if (round === 4) throw new HerdrError("stale", "Claude\u2019s answer field could not be cleared \u2014 check the current screen.");
|
|
98
100
|
await keys(["ctrl+u"]);
|
|
99
101
|
await d.sleep(150);
|
|
100
102
|
f = await field();
|
|
101
|
-
if (!f || f.value) throw new HerdrError("stale", "Claude\u2019s answer field could not be cleared \u2014 check the current screen.");
|
|
102
103
|
}
|
|
103
|
-
|
|
104
|
+
if (!f) throw new HerdrError("stale", "Claude\u2019s answer field could not be cleared \u2014 check the current screen.");
|
|
105
|
+
const text = answer2.replace(/\u001b\[[0-?]*[ -/]*[@-~]/g, "").replace(/[\u0000-\u001f\u007f-\u009f\u2028\u2029]+/g, " ").replace(/\s+/g, " ").trim();
|
|
104
106
|
await d.call("pane.send_input", { pane_id: paneId, text });
|
|
105
107
|
const want = squash(text).slice(0, 24);
|
|
106
108
|
f = await field();
|
|
@@ -109,7 +111,19 @@ async function typeClaudeAnswer(d, paneId, choices, index, answer) {
|
|
|
109
111
|
f = await field();
|
|
110
112
|
}
|
|
111
113
|
if (!f || !squash(f.value).startsWith(want)) throw new HerdrError("stale", "Claude\u2019s answer field closed \u2014 answer not submitted, check the current screen.");
|
|
112
|
-
if (f.checked
|
|
114
|
+
if (f.checked !== void 0 && f.checked !== false) return;
|
|
115
|
+
if (text.endsWith("\\")) {
|
|
116
|
+
await keys(["ctrl+a"]);
|
|
117
|
+
await d.sleep(50);
|
|
118
|
+
}
|
|
119
|
+
await keys(["enter"]);
|
|
120
|
+
const still = (g2) => Boolean(g2) && g2.question === f.question;
|
|
121
|
+
let g = await field();
|
|
122
|
+
for (const end = d.now() + OPEN_MS; still(g) && d.now() < end; ) {
|
|
123
|
+
await d.sleep(100);
|
|
124
|
+
g = await field();
|
|
125
|
+
}
|
|
126
|
+
if (still(g)) throw new HerdrError("stale", "Claude kept the answer in its field \u2014 answer not submitted, check the current screen.");
|
|
113
127
|
}
|
|
114
128
|
|
|
115
129
|
const choose_post = defineApi(async (event, b) => {
|
|
@@ -140,24 +154,24 @@ const choose_post = defineApi(async (event, b) => {
|
|
|
140
154
|
return { ok: true };
|
|
141
155
|
});
|
|
142
156
|
}
|
|
143
|
-
const r = await herdr("pane.read", { pane_id: b.pane_id, source: "detection" }, 4e3);
|
|
144
|
-
const text = r.read && r.read.text;
|
|
145
|
-
const pane = findPane(b.pane_id);
|
|
146
|
-
const asked = pane && pane.agent === "claude" ? await transcripts.pendingClaudeQuestions(pane).catch(() => []) : [];
|
|
147
|
-
const choices = screenChoices(text, pane == null ? void 0 : pane.agent, asked);
|
|
148
|
-
const i = Number(b.index);
|
|
149
|
-
const option = choices && choices.options[i];
|
|
150
|
-
const answer = typeof b.text === "string" ? b.text.trim() : "";
|
|
151
|
-
if (!choices || usesTerminalException({ text: String(text || ""), agent: pane == null ? void 0 : pane.agent, status: pane == null ? void 0 : pane.status }) || !option || option.label !== b.label || answer && !option.free || option.free && !sameQuestion(choices.question, typeof b.question === "string" ? b.question : null)) {
|
|
152
|
-
throw new HerdrError("stale", "The question has changed \u2014 check the current screen.");
|
|
153
|
-
}
|
|
154
|
-
if (option.free && !answer) throw new HerdrError("bad_text", "Write your answer before sending it.");
|
|
155
157
|
try {
|
|
158
|
+
const pane = findPane(b.pane_id);
|
|
159
|
+
const asked = pane && pane.agent === "claude" ? await transcripts.pendingClaudeQuestions(pane).catch(() => []) : [];
|
|
160
|
+
const r = await herdr("pane.read", { pane_id: b.pane_id, source: "detection" }, 4e3);
|
|
161
|
+
const text = r.read && r.read.text;
|
|
162
|
+
const choices = screenChoices(text, pane == null ? void 0 : pane.agent, asked);
|
|
163
|
+
const i = Number(b.index);
|
|
164
|
+
const option = choices && choices.options[i];
|
|
165
|
+
const answer = typeof b.text === "string" ? b.text.trim() : "";
|
|
166
|
+
if (!choices || !b.identity || choices.identity !== b.identity || usesTerminalException({ text: String(text || ""), agent: pane == null ? void 0 : pane.agent, status: pane == null ? void 0 : pane.status }) || !option || option.label !== b.label || answer && !option.free || option.free && !sameQuestion(choices.question, typeof b.question === "string" ? b.question : null)) {
|
|
167
|
+
throw new HerdrError("stale", "The question has changed \u2014 check the current screen.");
|
|
168
|
+
}
|
|
169
|
+
if (option.free && !answer) throw new HerdrError("bad_text", "Write your answer before sending it.");
|
|
156
170
|
if (option.free) await answerFree({ call: herdr, sleep, now: Date.now }, b.pane_id, choices, i, answer, pane == null ? void 0 : pane.agent);
|
|
157
171
|
else await herdr("pane.send_input", { pane_id: b.pane_id, keys: keysFor(choices, i) });
|
|
158
172
|
} finally {
|
|
159
173
|
choicesCache.delete(b.pane_id);
|
|
160
|
-
setTimeout(poll,
|
|
174
|
+
setTimeout(poll, 0);
|
|
161
175
|
}
|
|
162
176
|
return { ok: true };
|
|
163
177
|
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { a as defineApi, H as HerdrError, Y as writeDismissed, Z as forgetQuotas } 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 'node:os';
|
|
20
|
+
import 'node:net';
|
|
21
|
+
import 'node:child_process';
|
|
22
|
+
import 'node:dns';
|
|
23
|
+
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
28
|
+
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
|
+
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
+
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
32
|
+
|
|
33
|
+
const claudeSetup_post = defineApi((_event, body) => {
|
|
34
|
+
const keys = Array.isArray(body == null ? void 0 : body.keys) ? body.keys.filter((k) => typeof k === "string").slice(0, 64) : null;
|
|
35
|
+
if (!keys || typeof (body == null ? void 0 : body.dismissed) !== "boolean") throw new HerdrError("bad_request", "keys and dismissed are required");
|
|
36
|
+
const dismissed = writeDismissed(keys, body.dismissed);
|
|
37
|
+
forgetQuotas();
|
|
38
|
+
return { dismissed };
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export { claudeSetup_post as default };
|
|
42
|
+
//# sourceMappingURL=claude-setup.post.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi,
|
|
1
|
+
import { a as defineApi, _ as MACHINE_KEY_RE, $ as getMachine, H as HerdrError, a0 as installClaudeStatusline } from '../../nitro/nitro.mjs';
|
|
2
2
|
import 'node:http';
|
|
3
3
|
import 'node:https';
|
|
4
4
|
import 'node:crypto';
|
|
@@ -16,18 +16,19 @@ import 'node:events';
|
|
|
16
16
|
import 'node:buffer';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import 'node:path';
|
|
19
|
-
import 'web-push';
|
|
20
19
|
import 'node:os';
|
|
21
|
-
import 'node:child_process';
|
|
22
20
|
import 'node:net';
|
|
23
|
-
import 'node:
|
|
24
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
25
22
|
import 'node:dns';
|
|
26
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
27
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
29
|
-
import '@simplewebauthn/server';
|
|
30
30
|
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
31
32
|
|
|
32
33
|
const claudeStatusline_post = defineApi(async (_event, body) => {
|
|
33
34
|
const key = typeof body.key === "string" ? body.key : null;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { a as defineApi, P as PANE_RE, H as HerdrError, a1 as clearQueuedInput } 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 'node:os';
|
|
20
|
+
import 'node:net';
|
|
21
|
+
import 'node:child_process';
|
|
22
|
+
import 'node:dns';
|
|
23
|
+
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
28
|
+
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
|
+
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
+
import 'node:url';
|
|
31
|
+
import '@simplewebauthn/server';
|
|
32
|
+
|
|
33
|
+
const clearQueuedInput_post = defineApi(async (_event, b) => {
|
|
34
|
+
if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
|
|
35
|
+
if (typeof b.id !== "string" || !b.id) throw new HerdrError("bad_id", "Invalid message");
|
|
36
|
+
if (typeof b.input_text !== "string") throw new HerdrError("stale", "Agent input changed");
|
|
37
|
+
await clearQueuedInput(b.pane_id, b.id, b.input_text);
|
|
38
|
+
return { ok: true };
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export { clearQueuedInput_post as default };
|
|
42
|
+
//# sourceMappingURL=clear-queued-input.post.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi, f as findPane, i as getQuery, H as HerdrError,
|
|
1
|
+
import { a as defineApi, f as findPane, i as getQuery, H as HerdrError, m as machineFor } from '../../../nitro/nitro.mjs';
|
|
2
2
|
import { a as readChangeStatus } from '../../../_/changes.mjs';
|
|
3
3
|
import 'node:http';
|
|
4
4
|
import 'node:https';
|
|
@@ -17,18 +17,19 @@ import 'node:events';
|
|
|
17
17
|
import 'node:buffer';
|
|
18
18
|
import 'node:fs';
|
|
19
19
|
import 'node:path';
|
|
20
|
-
import 'web-push';
|
|
21
20
|
import 'node:os';
|
|
22
|
-
import 'node:child_process';
|
|
23
21
|
import 'node:net';
|
|
24
|
-
import 'node:
|
|
25
|
-
import 'node:readline';
|
|
22
|
+
import 'node:child_process';
|
|
26
23
|
import 'node:dns';
|
|
27
24
|
import 'node:util';
|
|
25
|
+
import 'web-push';
|
|
26
|
+
import 'node:string_decoder';
|
|
27
|
+
import 'node:fs/promises';
|
|
28
|
+
import 'node:readline';
|
|
28
29
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
30
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
-
import '@simplewebauthn/server';
|
|
31
31
|
import 'node:url';
|
|
32
|
+
import '@simplewebauthn/server';
|
|
32
33
|
|
|
33
34
|
const status_get = defineApi(async (event) => {
|
|
34
35
|
const p = findPane(String(getQuery(event).pane || ""));
|