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 close_post = defineApi(async (event, b) => {
|
|
33
34
|
if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi, P as PANE_RE, H as HerdrError, f as findPane,
|
|
1
|
+
import { a as defineApi, P as PANE_RE, H as HerdrError, f as findPane, a2 as codexStatus } from '../../nitro/nitro.mjs';
|
|
2
2
|
import { u as updateCodexInPane } from '../../_/restart.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 codexUpdate_post = defineApi(async (event, b) => {
|
|
34
35
|
if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
|
|
@@ -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, q as machineOfPane, ae as builtinCommands, af as slashCommands, aa as log } 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 commands_get = defineApi(async (event) => {
|
|
33
34
|
const p = findPane(String(getQuery(event).pane || ""));
|
|
@@ -36,7 +37,8 @@ const commands_get = defineApi(async (event) => {
|
|
|
36
37
|
if (!p.agent || !m || !m.home) return { commands: [] };
|
|
37
38
|
if (!m.local && m.status !== "online") return { commands: builtinCommands(p.agent), partial: true };
|
|
38
39
|
try {
|
|
39
|
-
|
|
40
|
+
const r = await slashCommands({ key: m.key, fs: m.fs, exec: m.exec, home: m.home, kind: p.agent, cwd: p.cwd });
|
|
41
|
+
return r.denied ? { ...r, remote: !m.local } : r;
|
|
40
42
|
} catch (e) {
|
|
41
43
|
log(`commands ${p.id}: ${e.message}`);
|
|
42
44
|
return { commands: builtinCommands(p.agent), partial: true };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ag as HOME, a as defineApi, ah as localMachine, ai as openNetworkMode, aj as readSubs, ak as vapidPublicKey, al as pushReady, am as machineConfigs, an as recentDirs, ao as installedAgentKinds, l as localMachineLabel } from '../../nitro/nitro.mjs';
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
import { h as hostOpenReady } from '../../_/reveal.mjs';
|
|
5
4
|
import 'node:http';
|
|
6
5
|
import 'node:https';
|
|
7
6
|
import 'node:crypto';
|
|
@@ -17,19 +16,19 @@ import 'tls';
|
|
|
17
16
|
import 'url';
|
|
18
17
|
import 'node:events';
|
|
19
18
|
import 'node:buffer';
|
|
20
|
-
import 'web-push';
|
|
21
19
|
import 'node:os';
|
|
22
|
-
import 'node:child_process';
|
|
23
20
|
import 'node:net';
|
|
24
|
-
import 'node:
|
|
25
|
-
import 'node:readline';
|
|
21
|
+
import 'node:child_process';
|
|
26
22
|
import 'node:dns';
|
|
27
23
|
import 'node:util';
|
|
24
|
+
import 'web-push';
|
|
25
|
+
import 'node:string_decoder';
|
|
26
|
+
import 'node:fs/promises';
|
|
27
|
+
import 'node:readline';
|
|
28
28
|
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
29
29
|
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
30
|
-
import '@simplewebauthn/server';
|
|
31
30
|
import 'node:url';
|
|
32
|
-
import '
|
|
31
|
+
import '@simplewebauthn/server';
|
|
33
32
|
|
|
34
33
|
const COLOR = /^(#[0-9a-f]{3,8}|[a-z]{3,20}|rgb\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*\))$/i;
|
|
35
34
|
const NAME = /^[a-z0-9][a-z0-9-]{0,39}$/i;
|
|
@@ -77,15 +76,13 @@ const config_get = defineApi(async () => ({
|
|
|
77
76
|
kinds: await installedAgentKinds(localMachine),
|
|
78
77
|
home: HOME,
|
|
79
78
|
os: localMachine.os,
|
|
80
|
-
|
|
81
|
-
// local panes behave as Mac panes for Reveal in Finder / Open / Mod+Alt+O.
|
|
82
|
-
hostOpen: hostOpenReady(),
|
|
83
|
-
...await recentDirsWithKinds(),
|
|
79
|
+
dirs: await recentDirs(),
|
|
84
80
|
// Several machines: each with its home folder and recent folders.
|
|
85
81
|
machines: await machineConfigs(),
|
|
86
82
|
push: { enabled: pushReady(), key: vapidPublicKey(), devices: (await readSubs()).length },
|
|
87
83
|
// Herdr theme (read-only), for "Follow Herdr".
|
|
88
|
-
herdrTheme: await readHerdrTheme()
|
|
84
|
+
herdrTheme: await readHerdrTheme(),
|
|
85
|
+
openNetwork: openNetworkMode()
|
|
89
86
|
}));
|
|
90
87
|
|
|
91
88
|
export { config_get as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi, i as getQuery,
|
|
1
|
+
import { a as defineApi, i as getQuery, ap as listDirs } 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 dirs_get = defineApi((event) => {
|
|
33
34
|
const q = getQuery(event);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi, P as PANE_RE, H as HerdrError,
|
|
1
|
+
import { a as defineApi, P as PANE_RE, H as HerdrError, M as withPaneLock, f as findPane, O as restarting, aq as dismissStopped, p as poll } 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 dismissStopped_post = defineApi(async (event, b) => {
|
|
33
34
|
if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi, P as PANE_RE, H as HerdrError,
|
|
1
|
+
import { a as defineApi, P as PANE_RE, H as HerdrError, ar as closePanel } 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 dismiss_post = defineApi(async (event, b) => {
|
|
33
34
|
if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi, P as PANE_RE, H as HerdrError,
|
|
1
|
+
import { a as defineApi, P as PANE_RE, H as HerdrError, as as setEffort, f as findPane, at as refreshModel } 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 effort_post = defineApi(async (event, b) => {
|
|
33
34
|
if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi, i as getQuery, P as PANE_RE, H as HerdrError,
|
|
1
|
+
import { a as defineApi, i as getQuery, P as PANE_RE, H as HerdrError, au as listEfforts, f as findPane, at as refreshModel } 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 efforts_get = defineApi(async (event) => {
|
|
33
34
|
const pane = String(getQuery(event).pane || "");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi, i as getQuery,
|
|
1
|
+
import { a as defineApi, i as getQuery, av as saveUpload, P as PANE_RE } 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 file_post = defineApi((event, b) => {
|
|
33
34
|
const pane = String(getQuery(event).pane || "");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { f as fileDownload } from '../../../_/fileDownload.mjs';
|
|
2
|
+
import '../../../nitro/nitro.mjs';
|
|
3
3
|
import 'node:http';
|
|
4
4
|
import 'node:https';
|
|
5
5
|
import 'node:crypto';
|
|
@@ -17,37 +17,25 @@ 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';
|
|
33
|
+
import '../../../_/files.mjs';
|
|
32
34
|
import '../../../_/filePaths.mjs';
|
|
33
35
|
import '../../../_/changes.mjs';
|
|
36
|
+
import 'node:stream';
|
|
37
|
+
|
|
34
38
|
|
|
35
|
-
const download_get = defineApi(async (event) => {
|
|
36
|
-
const q = getQuery(event);
|
|
37
|
-
const p = findPane(String(q.pane || ""));
|
|
38
|
-
if (!p) throw new HerdrError("bad_pane", "Pane not found");
|
|
39
|
-
let f;
|
|
40
|
-
if (q.from === "chat") f = await readWrittenBytes(machineFor(p.machine), p.cwd, q.path);
|
|
41
|
-
else {
|
|
42
|
-
if (!p.cwd) throw new HerdrError("bad_cwd", "This agent\u2019s folder is unknown");
|
|
43
|
-
f = await readFileBytes(machineFor(p.machine), p.cwd, q.path);
|
|
44
|
-
}
|
|
45
|
-
setResponseHeader(event, "content-type", "application/octet-stream");
|
|
46
|
-
setResponseHeader(event, "content-disposition", attachmentHeader(f.name));
|
|
47
|
-
setResponseHeader(event, "x-content-type-options", "nosniff");
|
|
48
|
-
setResponseHeader(event, "content-security-policy", "default-src 'none'; sandbox");
|
|
49
|
-
return f.body;
|
|
50
|
-
});
|
|
51
39
|
|
|
52
|
-
export {
|
|
40
|
+
export { fileDownload as default };
|
|
53
41
|
//# sourceMappingURL=download.get.mjs.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { f as fileDownload } from '../../../_/fileDownload.mjs';
|
|
2
|
+
import '../../../nitro/nitro.mjs';
|
|
3
|
+
import 'node:http';
|
|
4
|
+
import 'node:https';
|
|
5
|
+
import 'node:crypto';
|
|
6
|
+
import 'stream';
|
|
7
|
+
import 'events';
|
|
8
|
+
import 'http';
|
|
9
|
+
import 'crypto';
|
|
10
|
+
import 'buffer';
|
|
11
|
+
import 'zlib';
|
|
12
|
+
import 'https';
|
|
13
|
+
import 'net';
|
|
14
|
+
import 'tls';
|
|
15
|
+
import 'url';
|
|
16
|
+
import 'node:events';
|
|
17
|
+
import 'node:buffer';
|
|
18
|
+
import 'node:fs';
|
|
19
|
+
import 'node:path';
|
|
20
|
+
import 'node:os';
|
|
21
|
+
import 'node:net';
|
|
22
|
+
import 'node:child_process';
|
|
23
|
+
import 'node:dns';
|
|
24
|
+
import 'node:util';
|
|
25
|
+
import 'web-push';
|
|
26
|
+
import 'node:string_decoder';
|
|
27
|
+
import 'node:fs/promises';
|
|
28
|
+
import 'node:readline';
|
|
29
|
+
import 'qrcode-terminal/vendor/QRCode/index.js';
|
|
30
|
+
import 'qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js';
|
|
31
|
+
import 'node:url';
|
|
32
|
+
import '@simplewebauthn/server';
|
|
33
|
+
import '../../../_/files.mjs';
|
|
34
|
+
import '../../../_/filePaths.mjs';
|
|
35
|
+
import '../../../_/changes.mjs';
|
|
36
|
+
import 'node:stream';
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
export { fileDownload as default };
|
|
41
|
+
//# sourceMappingURL=download.head.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as defineApi, i as getQuery, f as findPane, H as HerdrError,
|
|
2
|
-
import {
|
|
1
|
+
import { a as defineApi, i as getQuery, f as findPane, H as HerdrError, m as machineFor } from '../../../nitro/nitro.mjs';
|
|
2
|
+
import { f as readWrittenPreview, g as readFilePreview } from '../../../_/files.mjs';
|
|
3
3
|
import 'node:http';
|
|
4
4
|
import 'node:https';
|
|
5
5
|
import 'node:crypto';
|
|
@@ -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
|
import '../../../_/filePaths.mjs';
|
|
33
34
|
import '../../../_/changes.mjs';
|
|
34
35
|
|
|
@@ -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 { l as listFiles } from '../../_/files.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
|
import '../../_/filePaths.mjs';
|
|
33
34
|
import '../../_/changes.mjs';
|
|
34
35
|
|
|
@@ -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 health_get = defineEventHandler(() => ({ ok: true, name: "wherdr", version: pkg.version }));
|
|
34
35
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineApi, P as PANE_RE, H as HerdrError,
|
|
1
|
+
import { a as defineApi, P as PANE_RE, H as HerdrError, M as withPaneLock, f as findPane, y as transcripts, h as herdr, b as screenChoices, V as usesTerminalException, az as isSlashCommand, aA as addQueued, p as poll, g as choicesCache } from '../../nitro/nitro.mjs';
|
|
2
2
|
import 'node:http';
|
|
3
3
|
import 'node:https';
|
|
4
4
|
import 'node:crypto';
|
|
@@ -16,33 +16,51 @@ 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 input_post = defineApi(async (event, b) => {
|
|
33
34
|
if (!PANE_RE.test(b.pane_id || "")) throw new HerdrError("bad_pane", "Invalid pane");
|
|
34
35
|
const held = await withPaneLock(b.pane_id, async () => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
var _a;
|
|
37
|
+
try {
|
|
38
|
+
const now = findPane(b.pane_id);
|
|
39
|
+
if (b.native) {
|
|
40
|
+
const asked = (now == null ? void 0 : now.agent) === "claude" ? await transcripts.pendingClaudeQuestions(now).catch(() => []) : [];
|
|
41
|
+
const r = await herdr("pane.read", { pane_id: b.pane_id, source: "detection" }, 4e3);
|
|
42
|
+
const text = (_a = r.read) == null ? void 0 : _a.text;
|
|
43
|
+
const choices = screenChoices(text, now == null ? void 0 : now.agent, asked);
|
|
44
|
+
if ((now == null ? void 0 : now.stopped) || (now == null ? void 0 : now.leaving) || !b.identity || (choices == null ? void 0 : choices.identity) !== b.identity || usesTerminalException({ text: String(text || ""), agent: now == null ? void 0 : now.agent, status: now == null ? void 0 : now.status })) {
|
|
45
|
+
throw new HerdrError("stale", "The question has changed \u2014 check the current screen.");
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if ((now == null ? void 0 : now.stopped) || (now == null ? void 0 : now.leaving)) {
|
|
49
|
+
if (typeof b.text !== "string" || !b.text.trim() || isSlashCommand(b.text) || !Array.isArray(b.keys) || b.keys.length !== 1 || b.keys[0] !== "enter") {
|
|
50
|
+
throw new HerdrError("stale", now.stopped ? "Restart Codex before sending a command." : "Codex just stopped. Try again in a few seconds.");
|
|
51
|
+
}
|
|
52
|
+
const q = addQueued(b.pane_id, b.text, { held: true });
|
|
53
|
+
setTimeout(poll, 50);
|
|
54
|
+
return q;
|
|
55
|
+
}
|
|
56
|
+
if (typeof b.text === "string" && b.text) await herdr("pane.send_input", { pane_id: b.pane_id, text: b.text });
|
|
57
|
+
if (Array.isArray(b.keys) && b.keys.length) await herdr("pane.send_input", { pane_id: b.pane_id, keys: b.keys.map(String) });
|
|
58
|
+
} finally {
|
|
59
|
+
if (b.native) {
|
|
60
|
+
choicesCache.delete(b.pane_id);
|
|
61
|
+
setTimeout(poll, 0);
|
|
39
62
|
}
|
|
40
|
-
const q = addQueued(b.pane_id, b.text, { held: true });
|
|
41
|
-
setTimeout(poll, 50);
|
|
42
|
-
return q;
|
|
43
63
|
}
|
|
44
|
-
if (typeof b.text === "string" && b.text) await herdr("pane.send_input", { pane_id: b.pane_id, text: b.text });
|
|
45
|
-
if (Array.isArray(b.keys) && b.keys.length) await herdr("pane.send_input", { pane_id: b.pane_id, keys: b.keys.map(String) });
|
|
46
64
|
});
|
|
47
65
|
if (held) return { ok: true, queued: held };
|
|
48
66
|
const p = findPane(b.pane_id);
|