elanous 0.2.0 → 0.2.5
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/.env.example +6 -0
- package/README.md +17 -15
- package/apps/pwa/out/404/index.html +1 -1
- package/apps/pwa/out/404.html +1 -1
- package/apps/pwa/out/_next/static/chunks/06ef2eba-d1b99ac6d2ea663c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1413-7179a49332db5a80.js +1 -0
- package/apps/pwa/out/_next/static/chunks/150-25c277137a9638ab.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1640-bc99ec23bbe29d12.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1751.50b96ea9c37b49b6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2300-de059d0ab2a16630.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2684-05b0a81e75298c16.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3026-2ed7e317d9b02102.js +25 -0
- package/apps/pwa/out/_next/static/chunks/3611-77496ada38cd6358.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3717-68957c4dc9ceec90.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3929-46ba9af6f9d895cc.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4015-62c5a3744698a8da.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4217-3c4317a7905f9eeb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4240-3230f230fae2d7d5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4271-e53e075ebd48593b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4377.3b125fef79576dfd.js +5 -0
- package/apps/pwa/out/_next/static/chunks/4440-18bb160d95819f4e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4853-35fdbe6bdbcdc0fc.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{2a79f15a-2013e4d421d6df88.js → 4daa2798-1363d725c79f3593.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/5007-6a3b30e23ff68a6e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5244-12b424c42070f5ff.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5348-bbf838e119661eee.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5391-8793f88b03b30161.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5611-df00af3e4e4a61bb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5890-dca2321773be829a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6123-37c9dc57ddaa7ab0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6588-b7975304a302ab91.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6604-c03961962b6273b6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7109-cf8c87e968e83a65.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7178-30f77877525a2efb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7262-871563fc9663730b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7294-f0eeebb92aa93459.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7429-881af44deed6958f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{5927.8378481a12cc8044.js → 7527.943753b6ed829f09.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/764-a01e858525a190c0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7868-e35d5f7985ecd3f1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8320-51484af7b01fdfa5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{6804.8ed6ab492bc5fc0a.js → 8617.465ca22a319c95b3.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{320-d7013ec072863e5e.js → 8918-482b30ce2a8ebf4c.js} +4 -4
- package/apps/pwa/out/_next/static/chunks/9131-52f5fad51cceca04.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{2598.814f64e3268634e7.js → 9238.2cd5f47f4bf7a2c3.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/9704-3221c102623c8d73.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/_not-found/page-70c404c7bb6d7f0f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/approvals/page-3ffd80166b1050aa.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-f89e9a303515a033.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/board/page-4f403cd060442c95.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/botlab/page-0ac5d053f0444d21.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/bots/page-4bcc63e272ae8205.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/chat/page-880734bd07d62882.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/control/page-72bd384898d88955.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-1018bbc9586ecae5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/editor/page-de86f8c38076dd7b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/healthz/route-70c404c7bb6d7f0f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/intake/page-cd6447196d8bafe6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/layout-e733630c47fa102b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/live/page-d1c1a8357b161875.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/market/page-60c514128e81d787.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-8b637b7e325e13c1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/morning/page-bccce0babceae30f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/not-found-63301d11dbe73836.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-a8cf0dc472060db2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/page-02fba54881ccfa49.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/reflection/page-d5e8e90f0038f8de.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/scheduler/page-b1ef6824f494466a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/sessions/page-d589bb0f233b1009.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-c9bbaebef4cda059.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/settings/page-3639ce7916b92fed.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-7450ae7478955653.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/layout-70c404c7bb6d7f0f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/page-b41ca4abfd618452.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/share/page-b333dd79ebee3fa9.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-8be1227492793655.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/tasks/page-6e03e9371b552e0d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/term/page-911411e9fca18d03.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/trace/page-792170e649b37088.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/vault/page-c40463466937bc91.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-509c798b80384536.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-1cac2aa21d77c417.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-9626799d9b4a2cd1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-84cd419494e16b0f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/f6f3850d-7f324c6566002113.js +1 -0
- package/apps/pwa/out/_next/static/chunks/framework-361487d2da603917.js +1 -0
- package/apps/pwa/out/_next/static/chunks/main-app-607f5beb94cb2e07.js +1 -0
- package/apps/pwa/out/_next/static/chunks/main-d0222d219e29dddf.js +1 -0
- package/apps/pwa/out/_next/static/chunks/pages/_app-a26980a31126decc.js +1 -0
- package/apps/pwa/out/_next/static/chunks/pages/_error-edb2b37decf23e4d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/webpack-2bf59c720fe9542c.js +1 -0
- package/apps/pwa/out/_next/static/css/eaa74e8bb2f62269.css +1 -0
- package/apps/pwa/out/_next/static/ktMqfrBbf8BMGac0jqLrb/_buildManifest.js +1 -0
- package/apps/pwa/out/approvals/index.html +1 -0
- package/apps/pwa/out/approvals/index.txt +32 -0
- package/apps/pwa/out/autopilot/index.html +1 -1
- package/apps/pwa/out/autopilot/index.txt +29 -26
- package/apps/pwa/out/board/index.html +1 -0
- package/apps/pwa/out/board/index.txt +32 -0
- package/apps/pwa/out/botlab/index.html +1 -1
- package/apps/pwa/out/botlab/index.txt +26 -23
- package/apps/pwa/out/bots/index.html +1 -1
- package/apps/pwa/out/bots/index.txt +26 -23
- package/apps/pwa/out/chat/index.html +1 -2
- package/apps/pwa/out/chat/index.txt +26 -23
- package/apps/pwa/out/control/index.html +1 -1
- package/apps/pwa/out/control/index.txt +29 -26
- package/apps/pwa/out/design-check/index.html +1 -1
- package/apps/pwa/out/design-check/index.txt +29 -26
- package/apps/pwa/out/editor/index.html +1 -0
- package/apps/pwa/out/editor/index.txt +33 -0
- package/apps/pwa/out/healthz +1 -1
- package/apps/pwa/out/icons/elanous-16.png +0 -0
- package/apps/pwa/out/icons/elanous-180.png +0 -0
- package/apps/pwa/out/icons/elanous-192.png +0 -0
- package/apps/pwa/out/icons/elanous-32.png +0 -0
- package/apps/pwa/out/icons/elanous-512.png +0 -0
- package/apps/pwa/out/index.html +1 -1
- package/apps/pwa/out/index.txt +26 -23
- package/apps/pwa/out/intake/index.html +1 -1
- package/apps/pwa/out/intake/index.txt +29 -26
- package/apps/pwa/out/live/index.html +1 -0
- package/apps/pwa/out/live/index.txt +32 -0
- package/apps/pwa/out/manifest.webmanifest +5 -2
- package/apps/pwa/out/market/index.html +1 -0
- package/apps/pwa/out/market/index.txt +29 -0
- package/apps/pwa/out/missions/placeholder/index.html +1 -1
- package/apps/pwa/out/missions/placeholder/index.txt +26 -23
- package/apps/pwa/out/morning/index.html +1 -1
- package/apps/pwa/out/morning/index.txt +29 -26
- package/apps/pwa/out/observatory/index.html +1 -1
- package/apps/pwa/out/observatory/index.txt +29 -26
- package/apps/pwa/out/reflection/index.html +1 -1
- package/apps/pwa/out/reflection/index.txt +27 -24
- package/apps/pwa/out/scheduler/index.html +1 -1
- package/apps/pwa/out/scheduler/index.txt +29 -26
- package/apps/pwa/out/sessions/index.html +1 -1
- package/apps/pwa/out/sessions/index.txt +26 -23
- package/apps/pwa/out/settings/devices/index.html +1 -1
- package/apps/pwa/out/settings/devices/index.txt +29 -26
- package/apps/pwa/out/settings/index.html +1 -1
- package/apps/pwa/out/settings/index.txt +29 -26
- package/apps/pwa/out/setup/done/index.html +1 -1
- package/apps/pwa/out/setup/done/index.txt +29 -26
- package/apps/pwa/out/setup/index.html +1 -1
- package/apps/pwa/out/setup/index.txt +29 -26
- package/apps/pwa/out/share/index.html +1 -1
- package/apps/pwa/out/share/index.txt +29 -26
- package/apps/pwa/out/showroom/index.html +1 -1
- package/apps/pwa/out/showroom/index.txt +26 -23
- package/apps/pwa/out/sw-strategies.js +44 -0
- package/apps/pwa/out/sw.js +6 -44
- package/apps/pwa/out/tasks/index.html +1 -1
- package/apps/pwa/out/tasks/index.txt +29 -26
- package/apps/pwa/out/term/index.html +1 -1
- package/apps/pwa/out/term/index.txt +29 -26
- package/apps/pwa/out/trace/index.html +1 -0
- package/apps/pwa/out/trace/index.txt +32 -0
- package/apps/pwa/out/vault/index.html +1 -1
- package/apps/pwa/out/vault/index.txt +29 -26
- package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
- package/apps/pwa/out/workflows/chat-ui/index.txt +29 -26
- package/apps/pwa/out/workflows/index.html +1 -1
- package/apps/pwa/out/workflows/index.txt +29 -27
- package/apps/pwa/out/workspace/index.html +1 -1
- package/apps/pwa/out/workspace/index.txt +29 -26
- package/apps/pwa/out/worktrees/index.html +1 -1
- package/apps/pwa/out/worktrees/index.txt +29 -26
- package/catalog/resources.yaml +14 -17
- package/docs/design/systems/LICENSE +201 -0
- package/docs/design/systems/NOTICE.md +29 -0
- package/docs/design/systems/SOURCE.json +291 -0
- package/docs/design/systems/application/DESIGN.md +71 -0
- package/docs/design/systems/application/manifest.json +54 -0
- package/docs/design/systems/application/tokens.css +63 -0
- package/docs/design/systems/artistic/DESIGN.md +71 -0
- package/docs/design/systems/artistic/manifest.json +54 -0
- package/docs/design/systems/artistic/tokens.css +63 -0
- package/docs/design/systems/bento/DESIGN.md +71 -0
- package/docs/design/systems/bento/manifest.json +54 -0
- package/docs/design/systems/bento/tokens.css +63 -0
- package/docs/design/systems/bold/DESIGN.md +71 -0
- package/docs/design/systems/bold/manifest.json +54 -0
- package/docs/design/systems/bold/tokens.css +63 -0
- package/docs/design/systems/brutalism/DESIGN.md +71 -0
- package/docs/design/systems/brutalism/manifest.json +54 -0
- package/docs/design/systems/brutalism/tokens.css +63 -0
- package/docs/design/systems/cafe/DESIGN.md +71 -0
- package/docs/design/systems/cafe/manifest.json +54 -0
- package/docs/design/systems/cafe/tokens.css +63 -0
- package/docs/design/systems/claymorphism/DESIGN.md +71 -0
- package/docs/design/systems/claymorphism/manifest.json +54 -0
- package/docs/design/systems/claymorphism/tokens.css +63 -0
- package/docs/design/systems/clean/DESIGN.md +71 -0
- package/docs/design/systems/clean/manifest.json +54 -0
- package/docs/design/systems/clean/tokens.css +63 -0
- package/docs/design/systems/colorful/DESIGN.md +71 -0
- package/docs/design/systems/colorful/manifest.json +54 -0
- package/docs/design/systems/colorful/tokens.css +63 -0
- package/docs/design/systems/contemporary/DESIGN.md +71 -0
- package/docs/design/systems/contemporary/manifest.json +54 -0
- package/docs/design/systems/contemporary/tokens.css +63 -0
- package/docs/design/systems/corporate/DESIGN.md +71 -0
- package/docs/design/systems/corporate/manifest.json +54 -0
- package/docs/design/systems/corporate/tokens.css +63 -0
- package/docs/design/systems/cosmic/DESIGN.md +71 -0
- package/docs/design/systems/cosmic/manifest.json +54 -0
- package/docs/design/systems/cosmic/tokens.css +63 -0
- package/docs/design/systems/creative/DESIGN.md +71 -0
- package/docs/design/systems/creative/manifest.json +54 -0
- package/docs/design/systems/creative/tokens.css +63 -0
- package/docs/design/systems/dashboard/DESIGN.md +71 -0
- package/docs/design/systems/dashboard/manifest.json +54 -0
- package/docs/design/systems/dashboard/tokens.css +63 -0
- package/docs/design/systems/default/DESIGN.md +62 -0
- package/docs/design/systems/default/manifest.json +69 -0
- package/docs/design/systems/default/tokens.css +200 -0
- package/docs/design/systems/dithered/DESIGN.md +71 -0
- package/docs/design/systems/dithered/manifest.json +54 -0
- package/docs/design/systems/dithered/tokens.css +63 -0
- package/docs/design/systems/doodle/DESIGN.md +71 -0
- package/docs/design/systems/doodle/manifest.json +54 -0
- package/docs/design/systems/doodle/tokens.css +63 -0
- package/docs/design/systems/dramatic/DESIGN.md +71 -0
- package/docs/design/systems/dramatic/manifest.json +54 -0
- package/docs/design/systems/dramatic/tokens.css +63 -0
- package/docs/design/systems/editorial/DESIGN.md +71 -0
- package/docs/design/systems/editorial/manifest.json +54 -0
- package/docs/design/systems/editorial/tokens.css +63 -0
- package/docs/design/systems/elegant/DESIGN.md +71 -0
- package/docs/design/systems/elegant/manifest.json +54 -0
- package/docs/design/systems/elegant/tokens.css +63 -0
- package/docs/design/systems/energetic/DESIGN.md +72 -0
- package/docs/design/systems/energetic/manifest.json +54 -0
- package/docs/design/systems/energetic/tokens.css +63 -0
- package/docs/design/systems/enterprise/DESIGN.md +71 -0
- package/docs/design/systems/enterprise/manifest.json +54 -0
- package/docs/design/systems/enterprise/tokens.css +63 -0
- package/docs/design/systems/expressive/DESIGN.md +71 -0
- package/docs/design/systems/expressive/manifest.json +54 -0
- package/docs/design/systems/expressive/tokens.css +63 -0
- package/docs/design/systems/fantasy/DESIGN.md +71 -0
- package/docs/design/systems/fantasy/manifest.json +54 -0
- package/docs/design/systems/fantasy/tokens.css +63 -0
- package/docs/design/systems/flat/DESIGN.md +71 -0
- package/docs/design/systems/flat/manifest.json +54 -0
- package/docs/design/systems/flat/tokens.css +63 -0
- package/docs/design/systems/friendly/DESIGN.md +71 -0
- package/docs/design/systems/friendly/manifest.json +54 -0
- package/docs/design/systems/friendly/tokens.css +63 -0
- package/docs/design/systems/glassmorphism/DESIGN.md +71 -0
- package/docs/design/systems/glassmorphism/manifest.json +54 -0
- package/docs/design/systems/glassmorphism/tokens.css +63 -0
- package/docs/design/systems/gradient/DESIGN.md +71 -0
- package/docs/design/systems/gradient/manifest.json +54 -0
- package/docs/design/systems/gradient/tokens.css +63 -0
- package/docs/design/systems/luxury/DESIGN.md +71 -0
- package/docs/design/systems/luxury/manifest.json +54 -0
- package/docs/design/systems/luxury/tokens.css +63 -0
- package/docs/design/systems/minimal/DESIGN.md +71 -0
- package/docs/design/systems/minimal/manifest.json +54 -0
- package/docs/design/systems/minimal/tokens.css +63 -0
- package/docs/design/systems/modern/DESIGN.md +71 -0
- package/docs/design/systems/modern/manifest.json +54 -0
- package/docs/design/systems/modern/tokens.css +63 -0
- package/docs/design/systems/mono/DESIGN.md +71 -0
- package/docs/design/systems/mono/manifest.json +54 -0
- package/docs/design/systems/mono/tokens.css +63 -0
- package/docs/design/systems/neobrutalism/DESIGN.md +71 -0
- package/docs/design/systems/neobrutalism/manifest.json +54 -0
- package/docs/design/systems/neobrutalism/tokens.css +63 -0
- package/docs/design/systems/neon/DESIGN.md +71 -0
- package/docs/design/systems/neon/manifest.json +54 -0
- package/docs/design/systems/neon/tokens.css +63 -0
- package/docs/design/systems/neumorphism/DESIGN.md +71 -0
- package/docs/design/systems/neumorphism/manifest.json +54 -0
- package/docs/design/systems/neumorphism/tokens.css +63 -0
- package/docs/design/systems/paper/DESIGN.md +71 -0
- package/docs/design/systems/paper/manifest.json +54 -0
- package/docs/design/systems/paper/tokens.css +63 -0
- package/docs/design/systems/perspective/DESIGN.md +71 -0
- package/docs/design/systems/perspective/manifest.json +54 -0
- package/docs/design/systems/perspective/tokens.css +63 -0
- package/docs/design/systems/premium/DESIGN.md +71 -0
- package/docs/design/systems/premium/manifest.json +54 -0
- package/docs/design/systems/premium/tokens.css +63 -0
- package/docs/design/systems/professional/DESIGN.md +71 -0
- package/docs/design/systems/professional/manifest.json +54 -0
- package/docs/design/systems/professional/tokens.css +63 -0
- package/docs/design/systems/publication/DESIGN.md +71 -0
- package/docs/design/systems/publication/manifest.json +54 -0
- package/docs/design/systems/publication/tokens.css +63 -0
- package/docs/design/systems/refined/DESIGN.md +71 -0
- package/docs/design/systems/refined/manifest.json +54 -0
- package/docs/design/systems/refined/tokens.css +63 -0
- package/docs/design/systems/retro/DESIGN.md +71 -0
- package/docs/design/systems/retro/manifest.json +54 -0
- package/docs/design/systems/retro/tokens.css +63 -0
- package/docs/design/systems/shadcn/DESIGN.md +71 -0
- package/docs/design/systems/shadcn/manifest.json +54 -0
- package/docs/design/systems/shadcn/tokens.css +255 -0
- package/docs/design/systems/simple/DESIGN.md +71 -0
- package/docs/design/systems/simple/manifest.json +54 -0
- package/docs/design/systems/simple/tokens.css +63 -0
- package/docs/design/systems/skeumorphism/DESIGN.md +71 -0
- package/docs/design/systems/skeumorphism/manifest.json +54 -0
- package/docs/design/systems/skeumorphism/tokens.css +63 -0
- package/docs/design/systems/sleek/DESIGN.md +71 -0
- package/docs/design/systems/sleek/manifest.json +54 -0
- package/docs/design/systems/sleek/tokens.css +63 -0
- package/docs/design/systems/spacious/DESIGN.md +71 -0
- package/docs/design/systems/spacious/manifest.json +54 -0
- package/docs/design/systems/spacious/tokens.css +63 -0
- package/docs/design/systems/storytelling/DESIGN.md +71 -0
- package/docs/design/systems/storytelling/manifest.json +54 -0
- package/docs/design/systems/storytelling/tokens.css +63 -0
- package/docs/design/systems/tom-modern/DESIGN.md +361 -0
- package/docs/design/systems/tom-modern/manifest.json +16 -0
- package/docs/design/systems/tom-modern/tokens.css +99 -0
- package/docs/design/systems/vibrant/DESIGN.md +71 -0
- package/docs/design/systems/vibrant/manifest.json +54 -0
- package/docs/design/systems/vibrant/tokens.css +63 -0
- package/docs/design/systems/vintage/DESIGN.md +71 -0
- package/docs/design/systems/vintage/manifest.json +54 -0
- package/docs/design/systems/vintage/tokens.css +63 -0
- package/docs/design/systems/warm-editorial/DESIGN.md +65 -0
- package/docs/design/systems/warm-editorial/manifest.json +54 -0
- package/docs/design/systems/warm-editorial/tokens.css +63 -0
- package/docs/goal-context/01-goal-authoring-checks.md +18 -0
- package/docs/goal-context/steward-directives-2026-09-28.md +42 -0
- package/graphs/catalog/catalog.yaml +615 -0
- package/graphs/default-loop.yaml +1 -1
- package/graphs/document-loop.yaml +1 -1
- package/graphs/examples/stale-draft-digest/digest.ts +26 -0
- package/graphs/examples/stale-draft-digest/recipes.yaml +8 -0
- package/graphs/examples/stale-draft-digest/stale-draft-digest.yaml +22 -0
- package/graphs/heal/heal-loop.yaml +155 -0
- package/graphs/heal/recipes.yaml +19 -0
- package/graphs/implement-loop.yaml +2 -2
- package/graphs/intake/intake-daily.yaml +55 -0
- package/graphs/intake/recipes.yaml +16 -0
- package/graphs/landing/landing-heal.yaml +22 -0
- package/graphs/landing/recipes.yaml +8 -0
- package/graphs/launch/launch-head.yaml +66 -0
- package/graphs/launch/recipes.yaml +8 -0
- package/graphs/operate-loop.yaml +1 -1
- package/graphs/ops/docs-publish.yaml +31 -0
- package/graphs/ops/recipes.yaml +8 -0
- package/graphs/release/recipes.yaml +45 -0
- package/graphs/release/release-loop.yaml +45 -0
- package/graphs/research-loop.yaml +1 -1
- package/graphs/steward/recipes.yaml +12 -0
- package/graphs/steward/steward.yaml +45 -0
- package/graphs/video/README.md +1 -0
- package/graphs/video/broll-line.yaml +54 -0
- package/graphs/video/explainer-line.yaml +58 -0
- package/package.json +9 -5
- package/plugins/job-coach/.agents/plugins/marketplace.json +12 -0
- package/plugins/job-coach/.codex-plugin/plugin.json +23 -0
- package/plugins/job-coach/.mcp.json +9 -0
- package/plugins/job-coach/README.md +32 -0
- package/plugins/job-coach/connectors/ncs/server.ts +90 -0
- package/plugins/job-coach/examples/interview-sample.md +11 -0
- package/plugins/job-coach/graphs/course-links.ts +46 -0
- package/plugins/job-coach/graphs/gap-judge.ts +44 -0
- package/plugins/job-coach/graphs/recipes.yaml +45 -0
- package/plugins/job-coach/graphs/report-enterprise.yaml +28 -0
- package/plugins/job-coach/graphs/report.yaml +20 -0
- package/plugins/job-coach/graphs/run-step.ts +302 -0
- package/plugins/job-coach/plugin.json +26 -0
- package/plugins/job-coach/plugin.ts +6 -0
- package/plugins/job-coach/skills/career-report/SKILL.md +6 -0
- package/plugins/job-coach/skills/enterprise-ai-fit/SKILL.md +8 -0
- package/plugins/job-coach/skills/enterprise-competency/SKILL.md +8 -0
- package/plugins/job-coach/skills/enterprise-needs/SKILL.md +8 -0
- package/plugins/job-coach/skills/enterprise-roadmap/SKILL.md +8 -0
- package/plugins/job-coach/skills/enterprise-task-analysis/SKILL.md +8 -0
- package/plugins/job-coach/skills/interview-to-profile/SKILL.md +23 -0
- package/plugins/job-coach/skills/run-report/SKILL.md +15 -0
- package/scripts/backup/elanous-backup.sh +143 -14
- package/scripts/backup/elanous-restore.sh +122 -0
- package/scripts/build-docs-site.ts +4 -3
- package/scripts/ci-daemon-port-gate.ts +164 -0
- package/scripts/ci-typecheck-changed.ts +15 -1
- package/scripts/cli-json-exit-scan.ts +126 -0
- package/scripts/codex-quota-alert-format.ts +52 -0
- package/scripts/codex-quota-alert.ts +63 -13
- package/scripts/continuation-dogfood.ts +2 -1
- package/scripts/coord-channel-watch.sh +28 -9
- package/scripts/coord-post.sh +49 -12
- package/scripts/coord-tracks.json +6 -5
- package/scripts/cron-run.ts +37 -16
- package/scripts/daemon-port-baseline.txt +9 -0
- package/scripts/design/extract-corpus-bench.ts +469 -0
- package/scripts/design/extract-corpus-score.ts +510 -0
- package/scripts/design/vendor-open-design-systems.ts +100 -0
- package/scripts/docs-lint.ts +1 -1
- package/scripts/eval-bot-vs-grok.ts +79 -0
- package/scripts/eval-grok-live-baseline.ts +36 -0
- package/scripts/fixtures/front-route-corpus.sample.json +17 -0
- package/scripts/fleet/node-setup.sh +80 -7
- package/scripts/heal/run-role.ts +328 -0
- package/scripts/install-role-watch.sh +95 -0
- package/scripts/install.ps1 +11 -1
- package/scripts/install.sh +81 -9
- package/scripts/isolation-hardcode-baseline.txt +1 -1
- package/scripts/landing-heal/must-fix-match.ts +63 -0
- package/scripts/landing-heal/run-mission.ts +195 -0
- package/scripts/lib/front-route-measurement.ts +131 -0
- package/scripts/lib/pwa-scenarios/acp-replay.ts +79 -0
- package/scripts/lib/pwa-scenarios/cdp-driver.ts +67 -0
- package/scripts/lib/pwa-scenarios/runner.ts +200 -0
- package/scripts/lib/pwa-scenarios/scenarios.ts +202 -0
- package/scripts/lib/tui-sim-keys.ts +42 -0
- package/scripts/market/db-check.ts +212 -0
- package/scripts/market-posture-cycle.ts +63 -4
- package/scripts/measure-front-route-classifier.ts +56 -0
- package/scripts/media/ocr-leak-scan.sh +21 -0
- package/scripts/nightly-docops.ts +1 -1
- package/scripts/ops/channel-bot-token-migrate.ts +146 -0
- package/scripts/ops-health-check.ts +15 -3
- package/scripts/pty-scenarios/run.ts +272 -0
- package/scripts/public-export.ts +2 -3
- package/scripts/public-import-pr.ts +80 -6
- package/scripts/public-leak-baseline.txt +0 -7
- package/scripts/publish-internal-dist.ts +118 -0
- package/scripts/pwa-scenarios.ts +106 -0
- package/scripts/rebrand-elanous.ts +1 -1
- package/scripts/red-sweep-diff.ts +1 -1
- package/scripts/release-loop/auto-approve-node.ts +72 -0
- package/scripts/release-loop/cutoff.ts +139 -0
- package/scripts/release-loop/docs-land-node.ts +65 -0
- package/scripts/release-loop/docs-node.ts +172 -0
- package/scripts/release-loop/gate-diff.ts +29 -0
- package/scripts/release-loop/gate-node.ts +641 -0
- package/scripts/release-loop/node-verdict.ts +85 -0
- package/scripts/release-loop/prepare-node.ts +31 -0
- package/scripts/release-loop/publish-node.ts +61 -0
- package/scripts/release-loop/pwa-node-verdict.ts +45 -0
- package/scripts/release-loop/pwa-scenarios-node.ts +140 -0
- package/scripts/release-loop/release-docs.ts +109 -0
- package/scripts/release-loop/test-durations.ts +63 -0
- package/scripts/release-loop/tui-node-checks.ts +29 -0
- package/scripts/release-loop/tui-sim-node.ts +113 -0
- package/scripts/release-loop/upgrade-node.ts +26 -0
- package/scripts/release-loop/verify-node.ts +21 -0
- package/scripts/release-loop/version-node.ts +147 -0
- package/scripts/release-upgrade-check.sh +53 -0
- package/scripts/se-mission-prepare.ts +9 -15
- package/scripts/test-audit-coverage-per-file.sh +16 -0
- package/scripts/test-audit-meaningless.ts +88 -0
- package/scripts/test-audit-overlap-and-weak.ts +73 -0
- package/scripts/test-deterministic.ts +29 -6
- package/scripts/tui-sim.ts +59 -14
- package/scripts/uninstall.sh +10 -3
- package/scripts/ux/bump-installed.sh +20 -0
- package/scripts/ux/lib/cdp.ts +72 -0
- package/scripts/ux/record-page.ts +50 -0
- package/scripts/video-broll-line.ts +89 -0
- package/scripts/waitlist-daily-digest.ts +108 -0
- package/scripts/window-landings.sh +1 -1
- package/skills/explainer-video/SKILL.md +99 -0
- package/skills/explainer-video/engine/brand/elanous-mark-on-dark.svg +1 -0
- package/skills/explainer-video/engine/build.mjs +431 -0
- package/skills/explainer-video/engine/vo.ts +37 -0
- package/skills/explainer-video/examples/elanous-0.2.5/script.json +155 -0
- package/skills/motion-broll/LICENSE +25 -0
- package/skills/motion-broll/SKILL.md +150 -0
- package/skills/motion-broll/SOURCE.md +6 -0
- package/skills/motion-broll/engine/base.css +19 -0
- package/skills/motion-broll/engine/beats.js +11 -0
- package/skills/motion-broll/engine/build.py +21 -0
- package/skills/motion-broll/engine/fonts/Geist-Variable.woff2 +0 -0
- package/skills/motion-broll/engine/fonts/GeistMono-Medium.woff2 +0 -0
- package/skills/motion-broll/engine/fonts/OFL-Geist.txt +92 -0
- package/skills/motion-broll/engine/motion.js +146 -0
- package/skills/motion-broll/engine/render.js +22 -0
- package/skills/motion-broll/examples/opus-aoe2/01-opus-drop.html +41 -0
- package/skills/motion-broll/examples/opus-aoe2/02-pip-builds.html +110 -0
- package/skills/motion-broll/examples/opus-aoe2/03-effort-slider.html +38 -0
- package/skills/motion-broll/examples/opus-aoe2/04-master-prompt.html +56 -0
- package/skills/motion-broll/examples/opus-aoe2/05-low-vs-max.html +49 -0
- package/skills/motion-broll/examples/opus-aoe2/06-chapter.html +18 -0
- package/skills/motion-broll/examples/opus-aoe2/plan.json +14 -0
- package/skills/motion-broll/reference/engine-api.md +106 -0
- package/skills/motion-broll/scripts/composite.py +14 -0
- package/skills/motion-broll/scripts/inspect_video.py +34 -0
- package/skills/motion-broll/scripts/make_pages.py +34 -0
- package/skills/motion-broll/scripts/setup.sh +16 -0
- package/skills/motion-broll/scripts/words.py +13 -0
- package/skills/motion-broll/templates/compare.html +135 -0
- package/skills/motion-broll/templates/viewer.html +97 -0
- package/skills/omni-digest/SKILL.md +260 -0
- package/skills/omni-digest/digest.md +197 -0
- package/skills/omni-digest/docs/diagrams/noncode-terminal-promotion-path-2026-08-13.mmd +32 -0
- package/skills/omni-digest/package-lock.json +558 -0
- package/skills/omni-digest/package.json +13 -0
- package/skills/omni-digest/scripts/main.ts +404 -0
- package/skills/omni-digest/src/delegate.ts +34 -0
- package/skills/omni-digest/src/detect.ts +46 -0
- package/skills/omni-digest/src/diagram.ts +72 -0
- package/skills/omni-digest/src/domain-staging.ts +50 -0
- package/skills/omni-digest/src/env.ts +38 -0
- package/skills/omni-digest/src/fetch.ts +237 -0
- package/skills/omni-digest/src/media.ts +180 -0
- package/skills/omni-digest/src/obsidian.ts +69 -0
- package/skills/omni-digest/src/ocr.ts +149 -0
- package/skills/omni-digest/src/router.ts +60 -0
- package/skills/omni-digest/src/summarize.ts +87 -0
- package/skills/omni-digest/src/types.ts +124 -0
- package/skills/omni-digest/src/util.ts +34 -0
- package/skills/omni-digest/src/visual.ts +129 -0
- package/skills/omni-digest/src/x-api.ts +151 -0
- package/skills/omni-digest/tsconfig.json +13 -0
- package/src/a2a/agent-card.ts +29 -0
- package/src/a2a/server.ts +173 -0
- package/src/acp/auto-persist.ts +3 -6
- package/src/acp/backend-registry.ts +6 -10
- package/src/acp/channel-browser-shell.ts +1 -535
- package/src/acp/client.ts +106 -36
- package/src/acp/fs-roots.ts +20 -4
- package/src/acp/obsidian-tags.ts +6 -3
- package/src/acp/server.ts +189 -32
- package/src/agent/nested-agent-env.ts +1 -0
- package/src/agent/pty-binding.ts +1 -1
- package/src/agent/spawn-embodied-agent-in-vw.ts +5 -336
- package/src/agent/subagent-callable.ts +39 -1
- package/src/agent-mission/browser-login.ts +241 -0
- package/src/agent-mission/capabilities-cli.ts +33 -0
- package/src/agent-mission/capability-matrix.ts +31 -0
- package/src/agent-mission/capability-readers.ts +79 -0
- package/src/agent-mission/capability-types.ts +15 -0
- package/src/agent-mission/claude-headless.ts +131 -0
- package/src/agent-mission/claude-subscription.ts +57 -0
- package/src/agent-mission/doc-guided-install.ts +185 -0
- package/src/agent-mission/driver.ts +900 -69
- package/src/agent-mission/env-profile.ts +68 -0
- package/src/agent-mission/handoff.ts +128 -0
- package/src/agent-mission/in-agent-plugin.ts +311 -0
- package/src/agent-mission/mission-cli.ts +25 -1
- package/src/agent-mission/parse.ts +9 -4
- package/src/agent-mission/pr-review-watch.ts +62 -13
- package/src/agent-mission/resource-ladder.ts +235 -0
- package/src/agent-mission/tool-install.ts +249 -0
- package/src/agent-mission/tool-ladder.ts +37 -0
- package/src/agent-room/room-builder.ts +6 -600
- package/src/agent-substrate/review-intent.ts +43 -1
- package/src/auth/acp-token.ts +16 -0
- package/src/auth/github-app-token.ts +112 -0
- package/src/auth/scope.ts +8 -4
- package/src/auth/temp-tokens.ts +131 -0
- package/src/auto-research/obsidian-bridge.ts +2 -0
- package/src/autopilot/build/integrity-gate.ts +27 -4
- package/src/autopilot/build/isolated-instance.ts +2 -1
- package/src/autopilot/build/llm-conflict-merge.ts +27 -0
- package/src/autopilot/gh-rest-fallback.ts +177 -0
- package/src/autopilot/llm-control-brain.ts +54 -12
- package/src/autopilot/mission-engine.ts +15 -1
- package/src/autopilot/mission-notify.ts +4 -2
- package/src/autopilot/mission-origin.ts +5 -5
- package/src/autopilot/mission-phase-track.ts +52 -0
- package/src/autopilot/mission-tool.ts +1 -1
- package/src/autopilot/pr-manager.ts +51 -4
- package/src/autopilot/pty-control-loop.ts +94 -2
- package/src/autopilot/track-agent.ts +138 -0
- package/src/autopilot/track-courier.ts +153 -0
- package/src/boot/acp-server.ts +18 -18
- package/src/boot/check-same-origin.ts +19 -5
- package/src/boot/daemon-multi-llm-runtime.ts +14 -8
- package/src/boot/daemon-prompt-turn.ts +2 -0
- package/src/boot/daemon-runtime.ts +36 -14
- package/src/boot/daemon-tools/index.ts +16 -0
- package/src/boot/daemon-tools/self-implement.ts +4 -0
- package/src/boot/daemon-tools/types.ts +3 -0
- package/src/boot/daemon-tools/web-search.ts +2 -1
- package/src/boot/ws-bridge.ts +11 -0
- package/src/browser-cdp/chrome-flags.ts +7 -0
- package/src/browser-cdp/client.ts +2 -0
- package/src/browser-pane/mount.ts +1 -246
- package/src/budget/codex-reset-credit-state.ts +15 -0
- package/src/budget/fetchers/codex.ts +2 -1
- package/src/budget/run-usage-rollup.ts +11 -4
- package/src/budget/unified-usage.ts +2 -1
- package/src/capture/tui-self-report.ts +10 -0
- package/src/channel-bot-token.ts +126 -0
- package/src/chat/index.ts +57 -52
- package/src/chat/input-text-key.ts +2 -2
- package/src/chat/log-scroll-key.ts +12 -0
- package/src/chat/mode/manual.ts +2 -4
- package/src/chat/pickers/state.ts +10 -27
- package/src/chat/search/modal.ts +14 -2
- package/src/chat/submit-trace.ts +30 -0
- package/src/chat/tool-render/types.ts +1 -1
- package/src/chat/turn-typeahead.ts +2 -1
- package/src/chat/wrap.ts +6 -8
- package/src/cli/__fixtures__/agent-help-before/agent.txt +18 -0
- package/src/cli/__fixtures__/agent-help-before/registry.txt +13 -0
- package/src/cli/__fixtures__/agent-help-before/root.txt +100 -0
- package/src/cli/__fixtures__/agent-help-before/tier.txt +15 -0
- package/src/cli/a2a-cli.ts +52 -0
- package/src/cli/agent-cli.ts +726 -0
- package/src/cli/autopilot-cli.ts +739 -0
- package/src/cli/bg-launch.ts +20 -4
- package/src/cli/claude-plugin-setup.ts +199 -0
- package/src/cli/config-test-sync.ts +94 -10
- package/src/cli/connector-cli.ts +204 -0
- package/src/cli/control-cli.ts +220 -0
- package/src/cli/control-join-cli.ts +142 -0
- package/src/cli/decisions-cli.ts +94 -0
- package/src/cli/docs-cli.ts +38 -0
- package/src/cli/doctor-cli.ts +262 -77
- package/src/cli/doctor-distro.ts +17 -1
- package/src/cli/doctor-fix.ts +145 -17
- package/src/cli/doctor-llm-assist.ts +71 -0
- package/src/cli/doctor-private-files.ts +66 -0
- package/src/cli/doctor-readiness.ts +23 -28
- package/src/cli/fleet-cli.ts +63 -0
- package/src/cli/g6a-registration-probe.ts +16 -0
- package/src/cli/git-install-plan.ts +51 -0
- package/src/cli/hooks-cli.ts +44 -0
- package/src/cli/ingest-token-cli.ts +21 -0
- package/src/cli/intake-cli.ts +416 -0
- package/src/cli/labels-cli.ts +74 -0
- package/src/cli/leader-cli.ts +10 -159
- package/src/cli/live-cli.ts +48 -0
- package/src/cli/llm-detect-cli.ts +130 -0
- package/src/cli/logs-cli.ts +231 -7
- package/src/cli/machine-cli.ts +38 -0
- package/src/cli/mcp-call.ts +52 -13
- package/src/cli/mcp-gateway-cli.ts +94 -0
- package/src/cli/mcp-login.ts +116 -8
- package/src/cli/mcp-reload.ts +20 -3
- package/src/cli/nexus-dist.ts +18 -13
- package/src/cli/nexus-ios-bind.ts +20 -7
- package/src/cli/ops-cli.ts +225 -0
- package/src/cli/plugin-cli.ts +201 -0
- package/src/cli/pod-cli.ts +83 -0
- package/src/cli/port-lease-local.ts +124 -0
- package/src/cli/pr-cli.ts +12 -1
- package/src/cli/pr-lineage.ts +2 -1
- package/src/cli/provider-cli.ts +720 -0
- package/src/cli/pty-record-cli.ts +63 -0
- package/src/cli/pty-takeover-cli.ts +57 -40
- package/src/cli/pty-web-address.ts +52 -0
- package/src/cli/publish-cli.ts +44 -0
- package/src/cli/pwa-build.ts +18 -12
- package/src/cli/pwa-dev.ts +13 -8
- package/src/cli/pwa-registry.ts +6 -0
- package/src/cli/pwa-share.ts +65 -22
- package/src/cli/pwa-show.ts +20 -4
- package/src/cli/pwa-start.ts +102 -27
- package/src/cli/pwa-test.ts +201 -96
- package/src/cli/release-cli.ts +177 -7
- package/src/cli/remotes-cli.ts +20 -1
- package/src/cli/remotes.ts +2 -1
- package/src/cli/repo-cli.ts +315 -36
- package/src/cli/research-cli.ts +66 -0
- package/src/cli/role-cli.ts +320 -0
- package/src/cli/schedule-cli.ts +246 -0
- package/src/cli/self-update.ts +103 -12
- package/src/cli/setup-cli.ts +64 -2
- package/src/cli/shadow-cli.ts +188 -0
- package/src/cli/share-auto-mount.ts +12 -8
- package/src/cli/start-cli.ts +240 -0
- package/src/cli/stdout-flush.ts +8 -0
- package/src/cli/storage-cli.ts +334 -0
- package/src/cli/tailscale-serve.ts +34 -19
- package/src/cli/tasks-cli.ts +176 -0
- package/src/cli/test-state-dir-flag.ts +1 -1
- package/src/cli/usage-cli.ts +15 -4
- package/src/cli/where-cli.ts +22 -55
- package/src/code-edit/diff-render.ts +6 -32
- package/src/code-edit/source-delta-browser.ts +0 -1
- package/src/codex/models.ts +1 -1
- package/src/config.ts +8 -13
- package/src/connectors/event-ledger.ts +41 -0
- package/src/connectors/linear-projector.ts +88 -0
- package/src/connectors/linear.ts +143 -0
- package/src/connectors/types.ts +19 -0
- package/src/control-plane/lease-holder.ts +41 -0
- package/src/control-plane/ledger.ts +146 -0
- package/src/control-plane/light-member.ts +164 -0
- package/src/control-plane/member-tokens.ts +88 -0
- package/src/control-plane/member.ts +159 -0
- package/src/control-plane/port-lease-heartbeat.ts +101 -0
- package/src/control-plane/ports.ts +40 -0
- package/src/control-plane/primary.ts +169 -0
- package/src/control-plane/server.ts +216 -0
- package/src/dashboard/acp-boot.ts +14 -38
- package/src/dashboard/assistant-render-state-runtime.ts +2 -2
- package/src/dashboard/assistant-sample-runtime.ts +2 -2
- package/src/dashboard/auto-compact-runtime.ts +11 -16
- package/src/dashboard/browser-help-runtime.ts +2 -3
- package/src/dashboard/chat/acp-chat.ts +2 -5
- package/src/dashboard/code-edit-post-turn-runtime.ts +1 -2
- package/src/dashboard/compact-surface-assembly.ts +0 -14
- package/src/dashboard/compact-surface-dispatch.ts +1 -38
- package/src/dashboard/compact-surface-inventory.ts +0 -8
- package/src/dashboard/compact-surface-runtime.ts +0 -14
- package/src/dashboard/context-menu-provider-boot.ts +0 -9
- package/src/dashboard/context-window-runtime-boot.ts +0 -37
- package/src/dashboard/index.ts +331 -2562
- package/src/dashboard/input/chat-main-plain-turn-runtime.ts +0 -6
- package/src/dashboard/input/chat-main-slash-command.ts +2 -2
- package/src/dashboard/input/dashboard-priority-key-route.ts +1 -43
- package/src/dashboard/input/mouse-modal-surface-runtime.ts +1 -5
- package/src/dashboard/input/mouse-wiring.ts +2 -3
- package/src/dashboard/input/no-provider-reply.ts +13 -0
- package/src/dashboard/layout-display-runtime-registration.ts +0 -10
- package/src/dashboard/modals/pane-multi.ts +1 -1
- package/src/dashboard/replay-preview.ts +1 -1
- package/src/dashboard/runtime/approvers.ts +0 -1
- package/src/dashboard/runtime/state-snapshot.ts +0 -90
- package/src/dashboard/scenario-runtime-boot.ts +16 -16
- package/src/dashboard/slash-runtime/dashboard-handlers.ts +134 -1456
- package/src/dashboard/slash-runtime/design-pick.ts +96 -0
- package/src/dashboard/slash-runtime/help-from-registry.ts +77 -0
- package/src/dashboard/slash-runtime/unknown-slash-reply.ts +78 -0
- package/src/dashboard/stale-install-check.ts +77 -0
- package/src/dashboard/surface-registry-wiring.ts +2 -15
- package/src/dashboard/turn-message-runtime.ts +0 -4
- package/src/dashboard/turn-preamble.ts +1 -1
- package/src/dashboard/turn-stream-formatter.ts +2 -2
- package/src/dashboard/turn-stream-runtime.ts +2 -2
- package/src/dashboard-pane-context-menu.ts +0 -14
- package/src/debug/log.ts +7 -0
- package/src/decide/boundary-shadow.ts +131 -0
- package/src/decisions/decision-ledger.ts +404 -0
- package/src/design/apply-direction.ts +209 -0
- package/src/design/css-root-tokens.ts +89 -0
- package/src/design/custom-system-create.ts +230 -0
- package/src/design/design-directions.ts +61 -41
- package/src/design/design-gate.ts +241 -0
- package/src/design/design-library.ts +57 -0
- package/src/design/design-previews.ts +138 -0
- package/src/design/design-systems.ts +61 -0
- package/src/design/lint-artifact-run.ts +46 -6
- package/src/design/lint-artifact.ts +5 -1
- package/src/design/open-design-client.ts +247 -0
- package/src/design/system-from-extract.ts +767 -0
- package/src/design/system-schema.ts +123 -0
- package/src/discord-slash-wire.ts +2 -1
- package/src/discord-test-runner.ts +2 -1
- package/src/discord-voice-wire.ts +2 -1
- package/src/discord.ts +1 -1
- package/src/dispatch/opportunistic-launcher.ts +24 -1
- package/src/domains/ops-status.ts +35 -2
- package/src/domains/outbound-alert.ts +24 -6
- package/src/domains/repeated-failure.ts +89 -0
- package/src/domains/schedule-manage-tool.ts +28 -8
- package/src/domains/schedule-migrate.ts +22 -4
- package/src/domains/schedule-registry.ts +88 -33
- package/src/domains/schedule-runs.ts +132 -0
- package/src/domains/schedule-state.ts +152 -0
- package/src/domains/telegram-kind-route.ts +21 -0
- package/src/element-registry/address.ts +1 -3
- package/src/execution-loop/dispatch-task.ts +139 -0
- package/src/execution-loop/gate-decision-summary.ts +29 -0
- package/src/execution-loop/gates.ts +197 -0
- package/src/git-fs/gh-cli.ts +47 -17
- package/src/git-fs/retry.ts +1 -0
- package/src/git-fs/runner.ts +1 -0
- package/src/git-fs/worktree.ts +6 -5
- package/src/github/pr-labels.ts +68 -0
- package/src/graph-kinds/installed-plugin-nodes.ts +95 -0
- package/src/graph-kinds/plugin-nodes.ts +68 -0
- package/src/graph-kinds/registry.ts +118 -0
- package/src/graph-runner/graph-cli.ts +103 -0
- package/src/graph-runner/graph-notify.ts +220 -0
- package/src/graph-runner/graph-tick.ts +119 -0
- package/src/graph-runner/release-manifest.ts +93 -0
- package/src/graph-runner/runner.ts +487 -0
- package/src/grok/credential.ts +158 -5
- package/src/grounding/ensure-grounding.ts +131 -0
- package/src/grounding/mirror-export.ts +89 -0
- package/src/grounding/mirror-manifest.ts +252 -0
- package/src/grounding/sources-cli.ts +209 -0
- package/src/grounding/sources.ts +333 -0
- package/src/grounding/token.ts +121 -0
- package/src/harness/harness-cli-command.ts +415 -23
- package/src/harness/harness-pod-dispatch.ts +116 -0
- package/src/harness/harness-stop.ts +260 -0
- package/src/harness/harness-substrate-default.ts +40 -0
- package/src/harness/harness-worktrees.ts +1 -1
- package/src/harness/harness-write-boundary.ts +2 -0
- package/src/harness/llm-decompose.ts +2 -1
- package/src/harness/self-send-decide.ts +233 -0
- package/src/harness/self-send-target.ts +22 -1
- package/src/harness/shell-relay.ts +5 -0
- package/src/harness/worktree-branch-prefix.ts +4 -3
- package/src/hooks/providers.ts +77 -0
- package/src/hooks/queue.ts +73 -0
- package/src/hooks/receiver.ts +133 -0
- package/src/index.ts +712 -3409
- package/src/input-core/dispatcher.ts +1 -1
- package/src/input-core/drag-esc-interceptor.ts +1 -1
- package/src/instance/current.ts +5 -5
- package/src/instance/leader.ts +10 -326
- package/src/instance/nexus-run-refusal.ts +27 -92
- package/src/instance/project-local-exclude.ts +27 -0
- package/src/instance/resolve.ts +46 -175
- package/src/intake-plane/capture.ts +14 -1
- package/src/intake-plane/check.ts +34 -14
- package/src/intake-plane/collect-github.ts +258 -0
- package/src/intake-plane/collect-pod.ts +100 -0
- package/src/intake-plane/collect-telegram-saved.ts +91 -0
- package/src/intake-plane/digest.ts +111 -0
- package/src/intake-plane/enrich-plugins.ts +1 -1
- package/src/intake-plane/front-classifier.ts +56 -0
- package/src/intake-plane/front-route-classifier.ts +80 -0
- package/src/intake-plane/front-route-rules.ts +152 -0
- package/src/intake-plane/grounding-docs.ts +185 -0
- package/src/intake-plane/harness-target.ts +20 -0
- package/src/intake-plane/intake-to-tasks.ts +303 -0
- package/src/intake-plane/items.ts +247 -0
- package/src/intake-plane/link-ledger.ts +27 -0
- package/src/intake-plane/route.ts +104 -0
- package/src/intake-plane/runtime-callables.ts +3 -1
- package/src/intake-plane/sketch-ledger.ts +34 -0
- package/src/intake-plane/slash.ts +30 -2
- package/src/intake-plane/submit-intake-work.ts +160 -0
- package/src/intake-plane/telegram-work.ts +56 -0
- package/src/iul/sidebar-shell.ts +0 -165
- package/src/launch-head/capability-check.ts +162 -0
- package/src/launch-head/launch-head-cli.ts +242 -0
- package/src/launch-head/load-balance.ts +81 -0
- package/src/live/detail-switch.ts +180 -0
- package/src/llm/provider-detect.ts +247 -0
- package/src/llm/provider-probe.ts +57 -0
- package/src/llm/usable-llm.ts +32 -0
- package/src/llm.ts +55 -23
- package/src/log-entry.ts +1 -1
- package/src/log-pane/attachment-popup.ts +1 -2
- package/src/loops/loop-cli.ts +37 -0
- package/src/loops/registry.ts +196 -0
- package/src/market/official-keys.ts +5 -0
- package/src/market/publish.ts +329 -0
- package/src/market/signed-index.ts +156 -0
- package/src/market/tgz.ts +121 -0
- package/src/mcp/client.ts +1 -1
- package/src/mcp/mcp-oauth.ts +40 -5
- package/src/mcp/server.ts +75 -7
- package/src/mcp-gateway/gateway.ts +128 -0
- package/src/mcp-gateway/pat-store.ts +124 -0
- package/src/mss/logging/log-store.ts +91 -2
- package/src/mss/logging/scoped-level.ts +5 -9
- package/src/native-tool-catalog.ts +66 -345
- package/src/nexus/api/connect-info.ts +23 -25
- package/src/nexus/api/context-url.ts +1 -1
- package/src/nexus/api/design-check.ts +90 -59
- package/src/nexus/api/design-previews-route.ts +182 -0
- package/src/nexus/api/design-system-create-route.ts +123 -0
- package/src/nexus/api/graph-approvals.ts +125 -0
- package/src/nexus/api/graph-kinds.ts +69 -0
- package/src/nexus/api/graphs-api.ts +221 -0
- package/src/nexus/api/harness-api.ts +31 -2
- package/src/nexus/api/health.ts +15 -0
- package/src/nexus/api/http-server.ts +328 -43
- package/src/nexus/api/image-generate.ts +3 -0
- package/src/nexus/api/ingest-token.ts +175 -0
- package/src/nexus/api/intake-ledger-api.ts +54 -0
- package/src/nexus/api/intake-route.ts +111 -0
- package/src/nexus/api/json-response.ts +33 -0
- package/src/nexus/api/live-detail.ts +47 -0
- package/src/nexus/api/live-shipped.ts +78 -0
- package/src/nexus/api/log-fabric.ts +42 -2
- package/src/nexus/api/markdown-publish.ts +3 -2
- package/src/nexus/api/mcp-http.ts +14 -9
- package/src/nexus/api/mcp-oauth-hint.ts +31 -0
- package/src/nexus/api/mcp-public-allowlist.ts +33 -0
- package/src/nexus/api/merge-approvals-gate.ts +79 -0
- package/src/nexus/api/merge-approvals.ts +307 -0
- package/src/nexus/api/meta-api.ts +18 -0
- package/src/nexus/api/next-fluent-wiring.ts +7 -9
- package/src/nexus/api/plugins-credentials-api.ts +47 -0
- package/src/nexus/api/plugins-market.ts +209 -0
- package/src/nexus/api/pod-credential-api.ts +187 -0
- package/src/nexus/api/public-routes.ts +87 -0
- package/src/nexus/api/rest-route-paths.ts +15 -0
- package/src/nexus/api/schedules-action.ts +12 -3
- package/src/nexus/api/schedules-read.ts +228 -0
- package/src/nexus/api/sessions-store.ts +8 -2
- package/src/nexus/api/setup-answer-priority.ts +130 -0
- package/src/nexus/api/setup-channel-bot.ts +56 -0
- package/src/nexus/api/setup-child-llm.ts +228 -0
- package/src/nexus/api/setup-obsidian-skills.ts +93 -0
- package/src/nexus/api/task-cards-api.ts +34 -0
- package/src/nexus/api/tasks-create.ts +136 -0
- package/src/nexus/api/telegram-trigger-bot.ts +3 -3
- package/src/nexus/api/terminals.ts +204 -18
- package/src/nexus/api/trace.ts +405 -0
- package/src/nexus/api/vault-api.ts +140 -7
- package/src/nexus/api/worktrees.ts +18 -2
- package/src/nexus/boot/register-mcp-clients.ts +135 -16
- package/src/nexus/daemon-endpoint.ts +85 -0
- package/src/nexus/default-port.ts +1 -0
- package/src/nexus/index.ts +362 -143
- package/src/nexus/onboarding/pwa-share-prompt.ts +31 -8
- package/src/nexus/onboarding/tailscale-probe.ts +9 -1
- package/src/nexus/outbound/router.ts +1 -1
- package/src/nexus/setup-status.ts +58 -0
- package/src/nexus/supervisor/lock.ts +8 -0
- package/src/nexus/webterm/pty.ts +15 -0
- package/src/oauth/codex-account-rotation.ts +122 -16
- package/src/oauth/codex-account-store.ts +88 -19
- package/src/oauth/codex-quota-policy.ts +55 -0
- package/src/oauth/store.ts +28 -25
- package/src/obsidian/default-vault.ts +17 -0
- package/src/obsidian/vault-write-guard.ts +46 -0
- package/src/onboarding/help/llm.md +2 -2
- package/src/onboarding.ts +27 -4
- package/src/panes/alt-skip-predicate.ts +4 -3
- package/src/panes/external-terminal-pane.ts +3 -4
- package/src/panes/factory.ts +1 -18
- package/src/panes/index.ts +1 -5
- package/src/panes/pane-cycle.ts +1 -1
- package/src/panes/types.ts +1 -1
- package/src/platform/env-literal.ts +4 -0
- package/src/plugin-hooks/dispatcher.ts +10 -4
- package/src/plugins/core/host.ts +108 -4
- package/src/plugins/core/manifest.ts +104 -7
- package/src/plugins/install/market-fetch.ts +250 -0
- package/src/plugins/install/plugin-credentials.ts +106 -0
- package/src/plugins/install/plugin-install.ts +518 -0
- package/src/policy/claude-subscription-guard.ts +25 -0
- package/src/preview/terminal.ts +24 -1
- package/src/preview-pane/mount.ts +1 -142
- package/src/prompt/references.ts +4 -51
- package/src/prompt-library/universal-preamble.ts +8 -2
- package/src/pty-shell/pty-control-ipc.ts +57 -3
- package/src/pty-shell/pty-mouse.ts +75 -0
- package/src/pty-shell/pty-recording.ts +108 -0
- package/src/pty-shell/registry.ts +53 -3
- package/src/python/resolve-python.ts +1 -1
- package/src/release-loop/checklist.ts +191 -0
- package/src/release-loop/manifest.ts +65 -0
- package/src/release-loop/release-note.ts +177 -0
- package/src/roles/lease-cas.ts +52 -0
- package/src/roles/machine-name.ts +48 -0
- package/src/roles/machine-profile.ts +65 -0
- package/src/roles/role-lease-read.ts +81 -0
- package/src/roles/role-lease.ts +63 -0
- package/src/roles/role-watch.ts +69 -0
- package/src/self-dev/ask-launch-flow.ts +39 -22
- package/src/self-dev/ask-launch-io.ts +1 -1
- package/src/self-dev/dev-cli.ts +290 -159
- package/src/self-dev/dev-pipeline.ts +157 -9
- package/src/self-dev/draft-sweep.ts +231 -0
- package/src/self-dev/draft-triage-rules.ts +42 -0
- package/src/self-dev/entrance-baseline.ts +156 -4
- package/src/self-dev/fabric-decompose-adapter.ts +10 -0
- package/src/self-dev/launch-preflight.ts +1 -1
- package/src/self-dev/orchestrate.ts +297 -20
- package/src/self-dev/repair-signals.ts +6 -0
- package/src/self-dev/run-store.ts +20 -5
- package/src/self-dev/run-supervisor.ts +43 -3
- package/src/self-implement/abandoned-classification.ts +15 -1
- package/src/self-implement/blocked-draft-policy.ts +6 -0
- package/src/self-implement/budget-gate.ts +236 -0
- package/src/self-implement/child-llm-preference.ts +84 -0
- package/src/self-implement/decision-events.ts +57 -0
- package/src/self-implement/decision-signal-press.ts +5 -2
- package/src/self-implement/dependency-change-gate.ts +90 -0
- package/src/self-implement/gate-baseline.ts +35 -2
- package/src/self-implement/gate-cli.ts +29 -7
- package/src/self-implement/gate-scope.ts +7 -1
- package/src/self-implement/goal-author-decompose.ts +22 -4
- package/src/self-implement/goal-author.ts +41 -3
- package/src/self-implement/goal-boundary.ts +65 -0
- package/src/self-implement/goal-clarification-escalation.ts +1 -0
- package/src/self-implement/goal-documents-dir.ts +6 -1
- package/src/self-implement/goal-execution-records.ts +58 -0
- package/src/self-implement/goal-run-store.ts +42 -24
- package/src/self-implement/graph-authority.ts +13 -28
- package/src/self-implement/graph-catalog.ts +48 -0
- package/src/self-implement/graph-run-contract.ts +127 -0
- package/src/self-implement/graph-templates.ts +14 -7
- package/src/self-implement/graph-yaml.ts +35 -6
- package/src/self-implement/harness-policy-gates.ts +42 -0
- package/src/self-implement/headless-elanous-driver.ts +30 -6
- package/src/self-implement/heal-triage.ts +229 -0
- package/src/self-implement/host-regate.ts +244 -0
- package/src/self-implement/non-git-consent.ts +23 -0
- package/src/self-implement/orchestrator.ts +488 -134
- package/src/self-implement/pipeline-shape.ts +1 -1
- package/src/self-implement/pr-evidence-artifact.ts +6 -19
- package/src/self-implement/prior-draft-findings.ts +128 -0
- package/src/self-implement/pwa-import-graph.ts +65 -0
- package/src/self-implement/repo-provision.ts +18 -21
- package/src/self-implement/report-origin.ts +39 -0
- package/src/self-implement/rework-policy.ts +21 -0
- package/src/self-implement/run-ledger-compact.ts +438 -0
- package/src/self-implement/run-ledger.ts +212 -29
- package/src/self-implement/run-report.ts +24 -0
- package/src/self-implement/run-status-mapping.ts +2 -0
- package/src/self-implement/running-runs.ts +112 -14
- package/src/self-implement/scoped-typecheck-config.ts +49 -0
- package/src/self-implement/seams.ts +207 -40
- package/src/self-implement/self-implement-cli.ts +17 -2
- package/src/self-implement/shadow-repo.ts +350 -0
- package/src/self-implement/supervision-vocabulary.ts +7 -0
- package/src/shell-runner/dispatch.ts +3 -0
- package/src/shell-runner/index.ts +0 -7
- package/src/skills/runner.ts +0 -69
- package/src/skills/tools/agent-room-slash.ts +2 -1
- package/src/skills/tools/agent-room.ts +8 -140
- package/src/skills/tools/agent.ts +5 -3
- package/src/skills/tools/context.ts +5 -140
- package/src/skills/tools/control.ts +4 -188
- package/src/skills/tools/dashboard-slash.ts +3 -11
- package/src/skills/tools/dashboard-state.ts +3 -5
- package/src/skills/tools/dev-harness.ts +45 -2
- package/src/skills/tools/omni-search.ts +29 -1
- package/src/skills/tools/shell.ts +11 -29
- package/src/skills/tools/spawn-coding-agent-headless.ts +6 -9
- package/src/ssh/ssh-picker-modal.ts +1 -1
- package/src/steward/directive.ts +99 -0
- package/src/steward/steward-cards.ts +45 -0
- package/src/steward/triage.ts +239 -0
- package/src/storage/cli-bin.ts +67 -0
- package/src/storage/object-store-visibility.ts +169 -0
- package/src/storage/object-store.ts +452 -0
- package/src/storage/s3.ts +53 -10
- package/src/storage/storage-detect.ts +337 -0
- package/src/surface/address.ts +3 -5
- package/src/surface/index.ts +0 -6
- package/src/surface/llm-tools.ts +1 -2
- package/src/surface/shell-runner-boot.ts +4 -89
- package/src/task-cards/card-cli.ts +64 -0
- package/src/task-cards/card-store.ts +241 -0
- package/src/task-orchestrator/boot.ts +27 -1
- package/src/task-orchestrator/dispatcher.ts +49 -7
- package/src/task-orchestrator/external-fingerprint.ts +10 -0
- package/src/task-orchestrator/external-policy.ts +86 -0
- package/src/task-orchestrator/feedback-loop.ts +4 -2
- package/src/task-orchestrator/graph.ts +18 -1
- package/src/task-orchestrator/runtimes/create.ts +128 -0
- package/src/task-orchestrator/store.ts +78 -18
- package/src/task-orchestrator/surface-registry.ts +5 -2
- package/src/task-orchestrator/surfaces/external-exec.ts +180 -0
- package/src/task-orchestrator/surfaces/idea-approval-pr.ts +118 -0
- package/src/task-orchestrator/surfaces/index.ts +4 -3
- package/src/task-orchestrator/surfaces/pod-account-broker.ts +60 -5
- package/src/task-orchestrator/surfaces/pod-artifact-return.ts +194 -0
- package/src/task-orchestrator/surfaces/pod-command-job.ts +369 -0
- package/src/task-orchestrator/surfaces/pod-ledger-collect.ts +207 -0
- package/src/task-orchestrator/surfaces/pod-pool.ts +128 -12
- package/src/task-orchestrator/surfaces/pod-skills.ts +11 -3
- package/src/task-orchestrator/surfaces/pod-source-bundle.ts +147 -0
- package/src/task-orchestrator/surfaces/pod-source-receive.ts +129 -0
- package/src/task-orchestrator/surfaces/pod-source-spec.ts +77 -0
- package/src/task-orchestrator/surfaces/self-implement-pod.ts +930 -45
- package/src/task-orchestrator/surfaces/self-implement.ts +8 -1
- package/src/task-orchestrator/tox-loop.ts +204 -0
- package/src/task-orchestrator/types.ts +21 -1
- package/src/telegram-commands.ts +8 -0
- package/src/telegram-report.ts +14 -7
- package/src/telegram-run.ts +18 -5
- package/src/telegram.ts +92 -22
- package/src/tool-runtime/acp-session-runtime.ts +28 -7
- package/src/tool-runtime/agent-runtime.ts +1 -0
- package/src/tool-runtime/context-runtime.ts +18 -35
- package/src/tool-runtime/control-runtime.ts +8 -21
- package/src/tool-runtime/dashboard-state-runtime.ts +1 -5
- package/src/tool-runtime/elanous-asana-runtimes.ts +205 -0
- package/src/tool-runtime/elanous-control-runtimes.ts +16 -2
- package/src/tool-runtime/elanous-task-submit-runtime.ts +124 -0
- package/src/tool-runtime/index.ts +4 -1
- package/src/tool-runtime/scenario-runtimes.ts +22 -21
- package/src/tool-runtime/scenario-target-mount.ts +6 -32
- package/src/tool-runtime/types.ts +8 -0
- package/src/tui/chat/attachment-summary.ts +4 -4
- package/src/tui-client/acp-transport-ws-client.ts +72 -5
- package/src/tui-client/headless-core-guard.ts +0 -1
- package/src/tui.ts +11 -7
- package/src/typecheck-ratchet.ts +15 -0
- package/src/ui/hover-presenter.ts +3 -7
- package/src/user-config.ts +453 -190
- package/src/util/spawn-sync-output.ts +15 -0
- package/src/version/code-revision.ts +34 -9
- package/src/version/packed-revision.json +1 -1
- package/src/video-pipeline/broll-agent.ts +102 -0
- package/src/video-pipeline/recipes/broll.ts +263 -0
- package/src/video-pipeline/walk-line.ts +2 -1
- package/src/views/scratch-image-size.ts +10 -0
- package/src/voice/channel-adapters/pwa-voice-adapter.ts +2 -18
- package/src/voice/channel-adapters/telegram-voice-adapter.ts +1 -6
- package/src/voice/voice-tts-singleton.ts +46 -8
- package/src/web-push/vapid-keys.ts +1 -1
- package/src/web-search/free.ts +77 -0
- package/src/web-search/index.ts +7 -5
- package/src/web-terminal/preview-tap-registry.ts +152 -43
- package/src/workflow-runtime/deps-bridge.ts +4 -3
- package/src/workflow-runtime/executor.ts +18 -22
- package/src/workflow-runtime/node-catalog.ts +20 -1
- package/src/workflow-runtime/nodes/bash.ts +1 -0
- package/src/workflow-runtime/nodes/task.ts +74 -0
- package/src/workflow-runtime/nodes/triggers.ts +24 -1
- package/src/workflow-runtime/plugin-kind-node.ts +166 -0
- package/src/workflow-runtime/schema.ts +98 -2
- package/src/workflow-runtime/triggers/webhook-router.ts +43 -3
- package/src/workflow-runtime/triggers/webhook-source.ts +19 -1
- package/src/workflow-runtime/types.ts +76 -5
- package/apps/pwa/out/_next/static/Ksn99fVf2HUWhSyV1-FC8/_buildManifest.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1176-4943bd83b00e53a2.js +0 -25
- package/apps/pwa/out/_next/static/chunks/1380-9c652e1002032c86.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1863-2ea170dfec26b88b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2091-2d6b7f4f16300f83.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2347-366617ec73babe3b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3089-e60cc8f5d35ee239.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3158-c77ed9ea34f9cc9f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3607-f0b5c5ee18fcf56a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3659-05b2d5d971b42dbc.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3736-b6a7bfdcb8f56ec6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3839-eebf298e89a7bb77.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4012.832a2824b978e7ee.js +0 -5
- package/apps/pwa/out/_next/static/chunks/4706-d85d7f3345f3ff91.js +0 -1
- package/apps/pwa/out/_next/static/chunks/526-17a6a2e0e6dc4498.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5508-676ac75f2757ad40.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5583-8a0317f4b8e68db9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6258-b58f722b10e8d31d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6820-32fd097e6186fdc9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6852-983db7ca958634b7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7235-e583e4a015e159b9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7482-7b417330b24a996a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7701-99b7d4dedb955bf8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/77f1928d-bd3777589042d3ea.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8366-36956cafc5e33614.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8370-23d0de995be666f8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8617-307421f3b0e8b2a2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8837-e45de46a9fedf1f5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9058-0e8055a5ea3ebdd6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/_not-found/page-84b84eca12acada4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-1f23568c29e88f7a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/botlab/page-bf6fc9aafd6135a7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/bots/page-3f8539ae4b719d2e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/chat/page-d2900febb74ecf32.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/control/page-e82dec647dd79c36.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/dashboard/page-096ec743a8ee955a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-255c2ceded4b3493.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/healthz/route-84b84eca12acada4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/intake/page-2db61b2f9efba61f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/layout-e11ee17f221aaa9b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-e075974e029ce4c4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/morning/page-ec5b68a9af3366a0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/not-found-986c177afb4adae6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-a72781461af2f2a3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/page-92781cbaafc487ad.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/reflection/page-2c14d2a1f2930f33.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/scheduler/page-22ee4bf8070b2b4d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/sessions/page-9c06e4a8297942a8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-d0cd32f6d373798f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/page-0c1642018d87ebb8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-93e5e97d614df487.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/layout-84b84eca12acada4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/page-b1ce871940d7393e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/share/page-ae154addf345febe.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-90af3aa813d2053c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/tasks/page-f3f962fda428a738.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/term/page-1c1f7cc1d5def06d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/vault/page-09d4cbdaaacf06c1.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-e877b8e8ca90b27f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-71d902f463dea526.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-40ea576cefa25fe6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-a56a3f178c3831f6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/bcc499d1-804a270d878e0842.js +0 -1
- package/apps/pwa/out/_next/static/chunks/framework-b25b7c5501c59b6d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/main-a9ec9da43387afff.js +0 -1
- package/apps/pwa/out/_next/static/chunks/main-app-aa2c05954aaa6754.js +0 -1
- package/apps/pwa/out/_next/static/chunks/pages/_app-bb3768fb4b84aebb.js +0 -1
- package/apps/pwa/out/_next/static/chunks/pages/_error-2820ba75b87b2f5e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/webpack-58c73b145f189b1c.js +0 -1
- package/apps/pwa/out/_next/static/css/effec8adf767aa75.css +0 -1
- package/apps/pwa/out/dashboard/index.html +0 -1
- package/apps/pwa/out/dashboard/index.txt +0 -26
- package/src/acp/resident-shell.ts +0 -244
- package/src/agent/spawn-local-llm-in-vw.ts +0 -240
- package/src/dashboard/agent-spawn-tools-boot.ts +0 -14
- package/src/dashboard/dock-picker-inventory.ts +0 -41
- package/src/dashboard/goal-plan-hud-bridge.ts +0 -112
- package/src/dashboard/hud-mirror.ts +0 -207
- package/src/dashboard/input/mouse-dock-runtime.ts +0 -156
- package/src/dashboard/input/mouse-hover-runtime.ts +0 -46
- package/src/dashboard/input/mouse-pill-context-runtime.ts +0 -74
- package/src/dashboard/input/mouse-workspace-restore-runtime.ts +0 -64
- package/src/dashboard/input/scratch-actions.ts +0 -36
- package/src/dashboard/input/virtual-window-key-router.ts +0 -24
- package/src/dashboard/rich-scratch-viewers.ts +0 -77
- package/src/dashboard/scratch-slash-runtime.ts +0 -36
- package/src/dashboard/scratch-state-runtime.ts +0 -42
- package/src/dashboard/scratch-widget-runtime.ts +0 -37
- package/src/dashboard/sim-shell.ts +0 -313
- package/src/dashboard/virtual-window-control-runtime.ts +0 -57
- package/src/dashboard/virtual-window-help-runtime.ts +0 -113
- package/src/dashboard/virtual-window-input-runtime.ts +0 -99
- package/src/dashboard/virtual-window-mutation-runtime.ts +0 -102
- package/src/dashboard/virtual-window-split-runtime.ts +0 -70
- package/src/dashboard/vw-popup-openers.ts +0 -126
- package/src/dashboard/window-picker-popup.ts +0 -74
- package/src/dashboard/window-slash-runtime.ts +0 -108
- package/src/dashboard/windowing/companion-slash.ts +0 -78
- package/src/dashboard/windowing/fast-switch.ts +0 -138
- package/src/dashboard/windowing/lifecycle.ts +0 -185
- package/src/dashboard/windowing/virtual-windows.ts +0 -259
- package/src/dashboard/windowing/visibility-chord.ts +0 -77
- package/src/iul/resident-vw.ts +0 -55
- package/src/panes/content-adapter.ts +0 -162
- package/src/prompt/vw-reference.ts +0 -153
- package/src/shell-runner/external-terminal-pane.ts +0 -157
- package/src/sim/resident-vw.ts +0 -48
- package/src/skills/tools/spawn-coding-agent-vw.ts +0 -181
- package/src/skills/tools/virtual-windows.ts +0 -632
- package/src/surface/adapters/window-surface-adapter.ts +0 -141
- package/src/tool-runtime/layout-runtimes.ts +0 -81
- package/src/tool-runtime/scenario-window-mount.ts +0 -207
- package/src/views/ui-mode.ts +0 -100
- package/src/virtual-window-context-menu.ts +0 -97
- package/src/virtual-windows/addressing.ts +0 -195
- package/src/virtual-windows/benchmark-preset.ts +0 -119
- package/src/virtual-windows/event-bus.ts +0 -202
- package/src/virtual-windows/layout/apply-planner.ts +0 -189
- package/src/virtual-windows/layout/index.ts +0 -68
- package/src/virtual-windows/layout/layout-commands.ts +0 -186
- package/src/virtual-windows/layout/layout-tools.ts +0 -262
- package/src/virtual-windows/layout/persistence.ts +0 -219
- package/src/virtual-windows/layout/presets.ts +0 -114
- package/src/virtual-windows/layout/restore-planner.ts +0 -223
- package/src/virtual-windows/layout/serializer.ts +0 -197
- package/src/virtual-windows/layout/tree.ts +0 -147
- package/src/virtual-windows/layout/types.ts +0 -63
- package/src/virtual-windows/layout-tree.ts +0 -389
- package/src/virtual-windows/navigation.ts +0 -251
- package/src/virtual-windows/pane-capture.ts +0 -142
- package/src/virtual-windows/pane-content.ts +0 -611
- package/src/virtual-windows/pane-spawner.ts +0 -278
- package/src/virtual-windows/pty-tail-content.ts +0 -291
- package/src/virtual-windows/resident-window.ts +0 -59
- package/src/virtual-windows/secondary-action.ts +0 -25
- package/src/virtual-windows/terminal-slot-content.ts +0 -165
- package/src/virtual-windows/virtual-window.ts +0 -1301
- package/src/virtual-windows/vw-local-input-target-popup.ts +0 -110
- package/src/virtual-windows/vw-rename-modal.ts +0 -77
- package/src/virtual-windows/vw-selector-popup.ts +0 -177
- package/src/virtual-windows/window-registry.ts +0 -519
- package/src/voice/channel-adapters/discord-voice-adapter.ts +0 -202
- package/src/voice/voice-pwa-dispatch.ts +0 -245
- package/src/window-picker-modal.ts +0 -135
- /package/apps/pwa/out/_next/static/{Ksn99fVf2HUWhSyV1-FC8 → ktMqfrBbf8BMGac0jqLrb}/_ssgManifest.js +0 -0
- /package/src/dashboard/{companion-slash-runtime.ts → companion-messages-runtime.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5244],{5244:(e,t,s)=>{s.d(t,{O:()=>e5});var a=s(58443),r=s(77947),n=s(34015),l=s(32736),i=s(19990),d=s(65534),o=s(89704);let c="pushcut-webhook",u="pushcut";async function m(e,t){return e.fetchJson("/v1/config/secrets",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:c,value:t})})}async function x(e){return e.fetchJson("/v1/registry/bindings?channel=".concat(u))}async function h(e,t){var s;let a=null!=(s=t.method)?s:"POST",r={};return void 0!==t.sessionId&&(r.sessionId=t.sessionId),void 0!==t.label&&(r.label=t.label),void 0!==t.meta&&(r.meta=t.meta),void 0!==t.mergeMeta&&(r.mergeMeta=t.mergeMeta),e.fetchJson("/v1/registry/bindings/".concat(u,"/").concat(encodeURIComponent(t.token)),{method:a,headers:{"content-type":"application/json"},body:JSON.stringify(r)})}async function p(e,t){return e.fetchJson("/v1/registry/bindings/".concat(u,"/").concat(encodeURIComponent(t)),{method:"DELETE"})}var b=s(23783);let f="elanous.pwa.pushSubscriptionId",g="elanous.pwa.pushSubscriptionLabel";function v(){let e="Notification"in window&&"serviceWorker"in navigator&&"PushManager"in window,t=null,s=null;try{t=window.localStorage.getItem(f),s=window.localStorage.getItem(g)}catch(e){}return{supported:e,permission:e?Notification.permission:"unknown",cachedId:t,cachedLabel:s}}async function j(e){var t,s;let a,r;if(!("Notification"in window)||!("serviceWorker"in navigator)||!("PushManager"in window))return{status:"unsupported",reason:"Notification/PushManager API absent"};if(!e.baseUrl)return{status:"error",reason:"daemon baseUrl not configured"};if("granted"!==await Notification.requestPermission())return(0,b.cY)("pwa.push.permission-denied"),{status:"permission-denied"};let n=e.baseUrl.replace(/\/$/,"");try{let e=await fetch("".concat(n,"/v1/push/vapid-public-key"));if(!e.ok)throw Error("HTTP ".concat(e.status));let t=await e.json();if(!t.publicKey)throw Error("missing publicKey in response");a=t.publicKey}catch(e){return{status:"error",reason:"vapid fetch: ".concat(e instanceof Error?e.message:String(e))}}let l=await navigator.serviceWorker.ready;try{r=await l.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:function(e){let t="=".repeat((4-e.length%4)%4),s=atob((e+t).replace(/-/g,"+").replace(/_/g,"/")),a=new Uint8Array(s.length);for(let e=0;e<s.length;e+=1)a[e]=s.charCodeAt(e);return a}(a)})}catch(e){return{status:"error",reason:"subscribe: ".concat(e instanceof Error?e.message:String(e))}}let i=r.toJSON(),d=null!=(s=e.label)?s:"".concat(null!=(t=navigator.userAgent.split(" ")[0])?t:"browser"," ").concat(new Date().toISOString().slice(0,10));try{let t=await fetch("".concat(n,"/v1/push/subscribe"),{method:"POST",headers:{"content-type":"application/json",...e.token?{authorization:"Bearer ".concat(e.token)}:{}},body:JSON.stringify({subscription:i,label:d})});if(!t.ok){let e=await t.text();try{await r.unsubscribe()}catch(e){}return{status:"error",reason:"subscribe POST: ".concat(t.status," ").concat(e.slice(0,200))}}let s=await t.json();if(!s.id){try{await r.unsubscribe()}catch(e){}return{status:"error",reason:"daemon did not return subscription id"}}try{window.localStorage.setItem(f,s.id),window.localStorage.setItem(g,d)}catch(e){}return(0,b.cY)("pwa.push.enabled",{id:s.id,label:d}),{status:"enabled",id:s.id}}catch(e){try{await r.unsubscribe()}catch(e){}return{status:"error",reason:e instanceof Error?e.message:String(e)}}}async function y(e){let t=null;try{t=window.localStorage.getItem(f)}catch(e){}if(!t)return{status:"not-subscribed"};try{if("serviceWorker"in navigator){let e=await navigator.serviceWorker.ready,t=await e.pushManager.getSubscription();t&&await t.unsubscribe()}}catch(e){}if(e.baseUrl)try{await fetch("".concat(e.baseUrl.replace(/\/$/,""),"/v1/push/subscribe/").concat(encodeURIComponent(t)),{method:"DELETE",...e.token?{headers:{authorization:"Bearer ".concat(e.token)}}:{}})}catch(e){(0,b.cY)("pwa.push.disable.daemon-failed",{reason:e instanceof Error?e.message:String(e)})}try{window.localStorage.removeItem(f),window.localStorage.removeItem(g)}catch(e){}return{status:"disabled"}}var N=s(62866);let k=[{value:"none",label:"none — auto-detect / Quick Setup 안내"},{value:"codex",label:"codex — OpenAI Codex (OAuth or OPENAI_API_KEY)"},{value:"claude-code",label:"claude-code — Anthropic (claude-code CLI 인증)"},{value:"gemini",label:"gemini — Google (GEMINI_API_KEY)"}];function w(){let e=(0,N.Qj)(),[t,s]=(0,r.useState)({status:"idle"}),[n,l]=(0,r.useState)({status:"idle"}),[d,o]=(0,r.useState)(!1);(0,r.useEffect)(()=>{o(!0)},[]);let c=(0,r.useCallback)(async()=>{if(e){s({status:"loading"});try{let t=await e.getChatBackendDetection();s({status:"ok",snapshot:t})}catch(e){s({status:"error",error:e.message})}}},[e]),u=(0,r.useCallback)(async t=>{if(e){l({status:"mutating",target:t});try{await e.putSwitch("global.chat.defaultBackend",{value:t}),await c(),l({status:"idle"})}catch(e){l({status:"error",error:e.message})}}},[e,c]);return((0,r.useEffect)(()=>{c()},[c]),d&&e)?(0,a.jsxs)("section",{"data-testid":"quick-setup-card",className:"rounded border border-border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"Quick Setup — chat 백엔드"}),(0,a.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"chat 탭이 사용할 LLM 백엔드 1개만 셋업하면 됩니다. 데스크탑 NEXUS TUI Settings 탭과 같은 안내."})]}),(0,a.jsx)(i.$,{"data-testid":"quick-setup-refresh",variant:"outline",size:"sm",disabled:"loading"===t.status,onClick:()=>void c(),"aria-label":"detection 재실행",title:"env / OAuth 재감지 (TUI 의 r 키 mirror)",children:"loading"===t.status?"…":"Refresh"})]}),"idle"===t.status&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"대기 중…"}),"loading"===t.status&&(0,a.jsx)("p",{"data-testid":"quick-setup-loading",className:"text-xs text-muted-foreground",children:"detection 진행 중…"}),"error"===t.status&&(0,a.jsx)("p",{"data-testid":"quick-setup-error",className:"text-xs text-destructive",children:t.error}),"ok"===t.status&&(0,a.jsx)(S,{snapshot:t.snapshot,swap:n,onSwap:u})]}):null}function S(e){let{snapshot:t,swap:s,onSwap:r}=e,n="none"!==t.detection.backend;return(0,a.jsxs)("div",{className:"space-y-3 text-xs",children:[(0,a.jsx)("div",{"data-testid":"quick-setup-status",children:n?(0,a.jsxs)("span",{children:["현재 wired \xb7"," ",(0,a.jsx)("code",{className:"rounded bg-muted px-1 font-mono",children:t.detection.backend})," ",(0,a.jsxs)("span",{className:"text-muted-foreground",children:["(",t.detection.source,")"]})]}):(0,a.jsx)("span",{className:"text-muted-foreground",children:"현재 wired \xb7 (없음 — 아래 3 provider 중 1개 셋업)"})}),(0,a.jsx)("ul",{className:"space-y-2","data-testid":"quick-setup-entries",children:t.entries.map(e=>(0,a.jsx)(C,{entry:e,wired:t.detection.backend===e.provider},e.provider))}),(0,a.jsxs)("div",{className:"space-y-1 border-t border-border/40 pt-2",children:[(0,a.jsx)("label",{className:"block text-[11px] text-muted-foreground",htmlFor:"quick-setup-swap",children:"Backend swap (`global.chat.defaultBackend` 변경)"}),(0,a.jsx)("select",{id:"quick-setup-swap","data-testid":"quick-setup-swap",value:t.detection.backend,disabled:"mutating"===s.status,onChange:e=>r(e.target.value),className:"flex h-8 w-full rounded-md border border-input bg-background px-2 py-1 text-xs shadow-xs focus:outline-none focus:ring-2 focus:ring-ring",children:k.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"mutating"===s.status&&(0,a.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["적용 중 (target: ",(0,a.jsx)("code",{children:s.target}),")…"]}),"error"===s.status&&(0,a.jsxs)("p",{"data-testid":"quick-setup-swap-error",className:"text-[11px] text-destructive",children:["swap 실패 \xb7 ",s.error]}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"새 chat 탭부터 적용 \xb7 기존 chat 인스턴스는 per-tab override 또는 재시작 시 반영. 변경은 즉시 NEXUS daemon 의 UserConfig 에 저장."})]}),(0,a.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["Grok \xb7 중국 4종 (kimi/qwen/glm/deepseek) 등은 NEXUS chat 우선순위 외 — daemon 탭 또는 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"elanous legacy"})," ","에서 사용."]})]})}function C(e){let{entry:t,wired:s}=e;return(0,a.jsxs)("li",{"data-testid":"quick-setup-provider-".concat(t.provider),"data-wired":s?"true":"false",className:"rounded border border-border/60 bg-background p-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 font-medium",children:[(0,a.jsx)("span",{"aria-hidden":"true",children:s?"▶":" "}),(0,a.jsx)("span",{children:t.label})]}),(0,a.jsx)("ul",{className:"mt-1 space-y-1",children:t.paths.map(e=>(0,a.jsxs)("li",{"data-testid":"quick-setup-path-".concat(t.provider,"-").concat(e.tag),"data-detected":e.detected?"true":"false",className:"flex gap-2",children:[(0,a.jsx)("span",{"aria-label":e.detected?"detected":"missing",children:e.detected?"✓":"◯"}),(0,a.jsx)("span",{className:"font-mono text-[11px] text-muted-foreground",children:e.tag}),(0,a.jsx)("span",{className:"text-[11px]",children:e.hint})]},e.tag))})]})}var U=s(88670),A=s(12135),M=s(41640);let E="global.nexus.firstBootGuideShown";function P(){let e=(0,N.Qj)(),[t,s]=(0,r.useState)({status:"idle"}),[n,l]=(0,r.useState)(!1),[d,o]=(0,r.useState)(!1);(0,r.useEffect)(()=>{o(!0)},[]);let c=(0,r.useCallback)(async()=>{if(e){s({status:"loading"});try{let t=await e.getSwitch(E),a=!0===t.switch.value;s({status:a?"hidden":"shown"})}catch(e){s({status:"error",error:e.message})}}},[e]),u=(0,r.useCallback)(async()=>{if(e){l(!0);try{await e.putSwitch(E,{value:!0}),s({status:"hidden"})}catch(e){s({status:"error",error:e.message})}finally{l(!1)}}},[e]);return((0,r.useEffect)(()=>{c()},[c]),d&&e&&"shown"===t.status)?(0,a.jsxs)("section",{"data-testid":"welcome-card",className:"rounded border border-primary/30 bg-primary/5 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"✦ Welcome to elanous NEXUS"}),(0,a.jsx)(i.$,{"data-testid":"welcome-card-dismiss",variant:"ghost",size:"sm",disabled:n,onClick:()=>void u(),"aria-label":"환영 카드 닫기",children:n?"…":"Got it"})]}),(0,a.jsxs)("div",{className:"space-y-2 text-xs text-muted-foreground",children:[(0,a.jsx)("p",{children:"모바일 / iOS / 원격에서도 같은 NEXUS 에 접속 — 데스크탑 TUI 와 이 PWA 는 같은 daemon 의 두 surface (UserConfig SSoT 공유)."}),(0,a.jsxs)("p",{children:["Chat 백엔드를 셋업하지 않았다면 위의 ",(0,a.jsx)("strong",{children:"Quick Setup"})," ","카드에서 1개만 선택하면 됩니다."]}),(0,a.jsxs)("p",{children:["Telegram \xb7 Discord allowlist \xb7 자동 부팅 (launchd / systemd) 등"," ",(0,a.jsx)("em",{children:"advanced 셋업"}),"은 데스크탑에서"," ",(0,a.jsx)("span",{className:"font-mono",children:"elanous legacy"})," →"," ",(0,a.jsx)("span",{className:"font-mono",children:"/setup"})," wizard 에서 셋업 (NEXUS 미mirror 영역)."]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"font-mono",children:"[Got it]"})," ","한 번 누르면 다음부터 안 보입니다 (TUI 와 동기화)."]})]})]}):null}let z=[{area:"Chat 백엔드",status:"✓ NEXUS native",location:"PWA Quick Setup card"},{area:"Telegram bot token",status:"✓ NEXUS native",location:"PWA Secret modal"},{area:"Discord bot token",status:"✓ NEXUS native",location:"PWA Secret modal"},{area:"Telegram allowlist",status:"◯ Wizard 전용",location:"desktop",cmd:"elanous legacy → /setup"},{area:"Discord guild \xb7 voice",status:"◯ Wizard 전용",location:"desktop",cmd:"elanous legacy → /setup"},{area:"OS 자동 부팅",status:"◯ NEXUS subcommand",location:"desktop",cmd:"elanous nexus install --launchd"}];function L(){return(0,a.jsxs)("section",{"data-testid":"advanced-setup-map",className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Advanced setup map"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:[(0,a.jsx)("p",{className:"mb-2 text-muted-foreground",children:"NEXUS native 셋업 영역은 PWA 에서 직접 \xb7 그 외 advanced 셋업은 desktop wizard 또는 NEXUS subcommand 에서."}),(0,a.jsxs)("table",{className:"w-full text-left text-[11px]",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border text-muted-foreground",children:[(0,a.jsx)("th",{className:"py-1 pr-2 font-medium",children:"영역"}),(0,a.jsx)("th",{className:"py-1 pr-2 font-medium",children:"상태"}),(0,a.jsx)("th",{className:"py-1 font-medium",children:"셋업 위치"})]})}),(0,a.jsx)("tbody",{children:z.map(e=>(0,a.jsxs)("tr",{"data-testid":"advanced-setup-row-".concat(e.area),className:"border-b border-border/50 last:border-0",children:[(0,a.jsx)("td",{className:"py-1.5 pr-2 font-medium",children:e.area}),(0,a.jsx)("td",{className:"py-1.5 pr-2 font-mono text-[10px]",children:e.status}),(0,a.jsxs)("td",{className:"py-1.5 text-muted-foreground",children:[e.location,e.cmd&&(0,a.jsxs)(a.Fragment,{children:[" \xb7 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[10px]",children:e.cmd})]})]})]},e.area))})]})]})]})}function I(){let e=(0,N.Qj)(),[t,s]=(0,r.useState)({status:"idle"}),[n,l]=(0,r.useState)(!1),[d,o]=(0,r.useState)(!1);(0,r.useEffect)(()=>{o(!0)},[]);let c=(0,r.useCallback)(async()=>{if(e){s({status:"minting"}),l(!1);try{let t=await e.mintConnectToken();s({status:"shown",token:t.token,hint:t.hint})}catch(e){s({status:"error",error:e.message})}}},[e]),u=(0,r.useCallback)(async()=>{if("shown"===t.status)try{await navigator.clipboard.writeText(t.token),l(!0),setTimeout(()=>l(!1),2e3)}catch(e){s({status:"error",error:"clipboard: ".concat(e.message)})}},[t]);return d&&e?(0,a.jsxs)("section",{"data-testid":"connect-token-card",className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Connect token (other devices)"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-2",children:[(0,a.jsxs)("p",{className:"text-muted-foreground",children:["다른 머신에서 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"elanous nexus connect <host>"})," 시 paste 할 bearer token 을 발급. 한 번 paste 하면 그 머신의 bookmark 에 영구 저장 — 매번 재발급할 필요 없음."]}),"idle"===t.status&&(0,a.jsx)(i.$,{size:"sm",onClick:()=>void c(),"data-testid":"connect-token-generate",children:"Generate connect token"}),"minting"===t.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Minting…"}),"shown"===t.status&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("code",{className:"block break-all rounded bg-muted p-2 font-mono text-[11px] select-all","data-testid":"connect-token-value",children:t.token}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(i.$,{size:"sm",onClick:()=>void u(),"data-testid":"connect-token-copy",children:n?"✓ Copied":"Copy to clipboard"}),(0,a.jsx)(i.$,{size:"sm",variant:"outline",onClick:()=>s({status:"idle"}),"data-testid":"connect-token-hide",children:"Hide"})]}),(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground",children:t.hint})]}),"error"===t.status&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("p",{className:"text-rose-500",children:["발급 실패: ",t.error]}),(0,a.jsx)(i.$,{size:"sm",variant:"outline",onClick:()=>s({status:"idle"}),children:"Reset"})]})]})]}):null}var R=s(31550),T=s(33919),D=s(1921),$=s(51719);let O=(0,$.A)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var Y=s(79998),B=s(8666);function Q(){return(0,N.Qj)()?(0,a.jsx)(W,{}):null}function W(){var e;let{data:t,isLoading:s,error:r,refetch:n,isFetching:l}=function(){let e=(0,N.M1)();return(0,Y.I)({queryKey:B.AF.platforms(),queryFn:()=>e.getPlatforms(),refetchInterval:3e4})}(),i=null!=(e=null==t?void 0:t.platforms)?e:[],d=i.filter(e=>"connected"===e.status).length;return(0,a.jsxs)("section",{className:"space-y-2","data-testid":"platform-connections-card",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Platform connections"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[(0,a.jsx)("span",{"data-testid":"platform-summary",children:t?"".concat(d," of ").concat(i.length," connected"):s?"loading…":""}),(0,a.jsx)("button",{type:"button",onClick:()=>n(),disabled:l,"aria-label":"Refresh platform connection status",className:"rounded p-1 hover:bg-surface-elevated disabled:opacity-50",children:(0,a.jsx)(R.A,{className:"h-3 w-3 ".concat(l?"animate-spin":"")})})]})]}),r&&(0,a.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-error",children:[(0,a.jsx)(T.A,{className:"h-3 w-3"}),r instanceof Error?r.message:"Failed to load platform list"]}),s&&!t&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Querying /v1/platforms…"}),t&&(0,a.jsx)("ul",{className:"space-y-1.5",role:"list",children:i.map(e=>(0,a.jsx)(_,{entry:e},e.id))})]})}function _(e){let{entry:t}=e,s="connected"===t.status;return(0,a.jsxs)("li",{"data-testid":"platform-row-".concat(t.id),"data-status":t.status,className:"flex items-start gap-3 rounded-md border border-border bg-surface px-3 py-2",children:[(0,a.jsx)("div",{className:"mt-0.5 flex-shrink-0",children:s?(0,a.jsx)(D.A,{className:"h-4 w-4 text-green-600","aria-label":"connected"}):(0,a.jsx)(O,{className:"h-4 w-4 text-muted-foreground","aria-label":"not configured"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,a.jsx)("span",{className:"text-[12px] font-medium",children:t.label}),(0,a.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-wider ".concat(s?"bg-green-600/10 text-green-700":"bg-muted text-muted-foreground"),children:s?"connected":"not configured"})]}),(0,a.jsx)("div",{className:"text-[11px] text-muted-foreground",children:t.detail}),!s&&t.hint&&(0,a.jsx)("div",{className:"text-[10px] italic text-muted-foreground/80",children:t.hint})]})]})}var F=s(26958);function V(){var e,t;let s=(0,N.Qj)(),[n,l]=(0,r.useState)({status:"idle"}),[d,o]=(0,r.useState)({status:"idle"}),[c,u]=(0,r.useState)(!1);(0,r.useEffect)(()=>{u(!0)},[]);let m=(0,r.useCallback)(async()=>{if(s){l({status:"loading"});try{var e,t,a;let r=await fetch("".concat(s.baseUrl,"/v1/hitl/audit/recent?channel=pushcut&limit=").concat(1),{credentials:"include"}),n=await r.json();if(!r.ok||!n.ok)return void l({status:"error",error:null!=(t=n.error)?t:"HTTP ".concat(r.status),fetchedAt:Date.now()});let i=null==(e=n.entries)?void 0:e[n.entries.length-1];l({status:"ok",count:null!=(a=n.count)?a:0,lastEntry:i,fetchedAt:Date.now()})}catch(e){l({status:"error",error:e.message,fetchedAt:Date.now()})}}},[s]),x=(0,r.useCallback)(async()=>{if(s){o({status:"sending"});try{var e,t;let a=await fetch("".concat(s.baseUrl,"/v1/hitl/test-pushcut"),{method:"POST",credentials:"include",headers:{"content-type":"application/json"},body:JSON.stringify({})}),r=await a.json();a.ok&&r.ok?(o({status:"ok",banner:"✓ sent → ".concat(null!=(e=r.notificationName)?e:"(unknown)")}),m()):o({status:"error",banner:"✗ ".concat(null!=(t=r.reason)?t:"HTTP ".concat(a.status)).concat(r.hint?" \xb7 ".concat(r.hint):"")})}catch(e){o({status:"error",banner:"✗ ".concat(e.message)})}}},[s,m]);if((0,r.useEffect)(()=>{m()},[m]),!c||!s)return null;let h=n.lastEntry,p=h?(t=Date.now()-h.ts)<0?"just now":t<6e4?"".concat(Math.floor(t/1e3),"s ago"):t<36e5?"".concat(Math.floor(t/6e4),"m ago"):t<864e5?"".concat(Math.floor(t/36e5),"h ago"):"".concat(Math.floor(t/864e5),"d ago"):"(no Pushcut deliveries recorded yet)";return(0,a.jsxs)("section",{"data-testid":"pushcut-settings-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDCF2 Pushcut HITL channel"}),(0,a.jsx)(i.$,{"data-testid":"pushcut-settings-refresh",variant:"ghost",size:"sm",onClick:()=>void m(),"aria-label":"Refresh Pushcut status",children:"↻"})]}),(0,a.jsxs)("dl",{className:"grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 text-xs",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Last delivery"}),(0,a.jsx)("dd",{"data-testid":"pushcut-last-delivery",className:"font-mono",children:"loading"===n.status?"…":p}),h?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Last answer"}),(0,a.jsxs)("dd",{className:"font-mono",children:[h.answer?"yes":"no"," \xb7 ",h.elapsedMs,"ms"]}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Last requestId"}),(0,a.jsx)("dd",{className:"font-mono break-all",children:h.requestId})]}):null,(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Total recorded"}),(0,a.jsx)("dd",{className:"font-mono",children:"ok"===n.status?null!=(e=n.count)?e:0:"—"})]}),"error"===n.status?(0,a.jsxs)("p",{className:"mt-2 text-xs text-destructive",children:["audit fetch failed: ",n.error]}):null,(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,a.jsx)(i.$,{"data-testid":"pushcut-test-button",variant:"outline",size:"sm",disabled:"sending"===d.status,onClick:()=>void x(),children:"sending"===d.status?"…":"Test notification"}),d.banner?(0,a.jsx)("span",{"data-testid":"pushcut-test-banner",className:"ok"===d.status?"text-xs text-emerald-600 font-mono":"text-xs text-destructive font-mono",children:d.banner}):null]}),(0,a.jsxs)("p",{className:"mt-2 text-[11px] text-muted-foreground",children:["Audit log: ",(0,a.jsx)("span",{className:"font-mono",children:"$ELANOUS_DIR/hitl-log.jsonl"})," ","(rotates at 100 MB \xb7 cv-3 β-4)"]})]})}var K=s(95512);let H=[{value:"fixed",label:"고정 (Fixed)",blurb:"입력 바 위에 항상 표시. 키보드 위주 dogfood 에 좋음."},{value:"popup",label:"팝업 (Popup)",blurb:"턴이 끝날 때마다 잠깐 (~6초) 나타나고 자동 dismiss. 모바일 화면 절약."},{value:"off",label:"끔 (Off)",blurb:"완전 숨김. 입력만으로 진행하고 싶을 때."}];function q(){let[e,t]=(0,r.useState)("fixed"),[s,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>(n(!0),t((0,K.sY)()),(0,K.u9)(t)),[]),(0,a.jsxs)("section",{"data-testid":"intent-panel-settings",className:"rounded-lg border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Intent Panel"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Showroom 의 intent 6-button 패널 표시 방식을 선택합니다."})]}),(0,a.jsx)("div",{role:"radiogroup","aria-label":"intent panel display mode",className:"mt-3 space-y-2",children:H.map(r=>{let n=s&&e===r.value;return(0,a.jsxs)("label",{"data-testid":"intent-panel-mode-".concat(r.value),className:"flex cursor-pointer items-start gap-3 rounded-md border border-border/60 p-3 hover:border-border","data-active":n?"true":"false",children:[(0,a.jsx)("input",{type:"radio",name:"intent-panel-display-mode",value:r.value,checked:n,onChange:()=>{var e;return e=r.value,void((0,K._n)(e),t(e))},className:"mt-0.5 h-4 w-4"}),(0,a.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:r.label}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:r.blurb})]})]},r.value)})})]})}var X=s(64385);function G(){let[e,t]=(0,r.useState)(X.kv),[s,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>(n(!0),t((0,X.Vm)()),(0,X.$L)(t)),[]),(0,a.jsxs)("section",{"data-testid":"chat-routing-settings",className:"rounded-lg border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Chat input classification"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"입력 중 자동 분류를 켜거나 끕니다. 전송은 기존 ACP 경로를 유지합니다."})]}),(0,a.jsx)("div",{className:"mt-3 space-y-2",children:(0,a.jsxs)("label",{"data-testid":"chat-routing-auto",className:"flex cursor-pointer items-start gap-3 rounded-md border border-border/60 p-3 hover:border-border","data-active":s&&e.autoRouting?"true":"false",children:[(0,a.jsx)("input",{type:"checkbox",checked:s?e.autoRouting:X.kv.autoRouting,onChange:e=>{var s;return s=e.target.checked,void((0,X.Kz)(s),t(e=>({...e,autoRouting:s})))},className:"mt-0.5 h-4 w-4"}),(0,a.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"Automatic routing"}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"입력 중 mission router 가 plan / build / review / research / quick / vision 으로 자동 분류합니다. OFF (default) 시 분류 요청을 보내지 않습니다."})]})]})})]})}function J(e){let t=Object.entries(e);return 0===t.length?"—":t.map(e=>{let[t,s]=e;return"".concat(t,":").concat(s)}).join(" \xb7 ")}function Z(){let{config:e}=(0,n.Q)(),[t,s]=(0,r.useState)({ocr:{total:0,failures:0,byProvider:{},byPolishMode:{}},save:{total:0,failures:0,byPolishMode:{}},client:{cancel:0,edit:0,discard:0},startedAt:"",ts:""}),[l,d]=(0,r.useState)(!1),[o,c]=(0,r.useState)(null),[u,m]=(0,r.useState)(!1),x=(0,r.useCallback)(async()=>{if(e.baseUrl){m(!0);try{let t=await fetch("".concat(e.baseUrl,"/v1/metrics/notes-from-image"),{...e.token?{headers:{authorization:"Bearer ".concat(e.token)}}:{}});if(!t.ok)return void c("HTTP ".concat(t.status));let a=await t.json();s(a.snapshot),d(a.wired),c(null),(0,b.cY)("notes-metrics.snapshot",{wired:a.wired,ocrTotal:a.snapshot.ocr.total,saveTotal:a.snapshot.save.total})}catch(e){c(String(e instanceof Error?e.message:e))}finally{m(!1)}}},[e.baseUrl,e.token]);(0,r.useEffect)(()=>{x();let e=setInterval(()=>{x()},1e4);return()=>clearInterval(e)},[x]);let h=t.ocr.total-t.ocr.failures,p=t.save.total-t.save.failures;return(0,a.jsxs)("section",{"data-testid":"notes-metrics-card",className:"rounded-lg border border-border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-3 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-heading text-sm font-medium",children:"카메라 노트 metric"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"카메라 → markdown 노트 파이프라인 사용량 (daemon 재시작 시 0 으로 리셋)."})]}),(0,a.jsx)(i.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>void x(),disabled:u,"aria-label":"refresh notes metrics",children:(0,a.jsx)(R.A,{className:u?"h-3.5 w-3.5 animate-spin":"h-3.5 w-3.5"})})]}),!l&&(0,a.jsx)("p",{"data-testid":"notes-metrics-not-wired",className:"mb-3 rounded bg-muted/50 px-2 py-1 text-xs text-muted-foreground",children:"collector 미wire — runNexus 재기동 후 측정 시작."}),o&&(0,a.jsxs)("p",{"data-testid":"notes-metrics-error",className:"mb-3 text-xs text-destructive",children:["metric fetch 실패: ",o]}),(0,a.jsxs)("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"OCR 총 / 성공 / 실패"}),(0,a.jsxs)("dd",{"data-testid":"notes-metrics-ocr",children:[t.ocr.total," / ",h," / ",t.ocr.failures]}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"OCR provider"}),(0,a.jsx)("dd",{"data-testid":"notes-metrics-ocr-providers",children:J(t.ocr.byProvider)}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"OCR polishMode"}),(0,a.jsx)("dd",{"data-testid":"notes-metrics-ocr-polish",children:J(t.ocr.byPolishMode)}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Save 총 / 성공 / 실패"}),(0,a.jsxs)("dd",{"data-testid":"notes-metrics-save",children:[t.save.total," / ",p," / ",t.save.failures]}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Save polishMode"}),(0,a.jsx)("dd",{"data-testid":"notes-metrics-save-polish",children:J(t.save.byPolishMode)}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Client cancel \xb7 edit \xb7 discard"}),(0,a.jsxs)("dd",{"data-testid":"notes-metrics-client",children:[t.client.cancel," \xb7 ",t.client.edit," \xb7 ",t.client.discard]})]}),t.startedAt&&l&&(0,a.jsxs)("p",{className:"mt-3 text-[10px] text-muted-foreground",children:["since ",t.startedAt]})]})}var ee=s(75355);function et(){let[e,t]=(0,r.useState)(ee.hn);(0,r.useEffect)(()=>{t((0,ee.hn)())},[]);let s=e=>{t((0,ee.qv)(e)),(0,b.cY)("settings.ocr-prefs.update",e)};return(0,a.jsxs)("section",{"data-testid":"ocr-prefs-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDCF7 OCR 기본 설정"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"사진 → 노트 모달의 초기 토글 상태. 매번 같은 옵션을 켜고 있다면 default 로 저장."})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"flex items-center justify-between gap-3 rounded-md border border-input bg-background px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{children:"LLM 비전 default"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:"\xb7 더 정확하지만 느림 + 비쌈"})]}),(0,a.jsx)("input",{type:"checkbox","data-testid":"ocr-prefs-llm-vision",checked:e.defaultUseLlmVision,onChange:e=>s({defaultUseLlmVision:e.target.checked}),"aria-label":"LLM 비전 default"})]}),(0,a.jsxs)("label",{className:"flex items-center justify-between gap-3 rounded-md border border-input bg-background px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{children:"손글씨 default"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:"\xb7 handwriting strength 자동 추가"})]}),(0,a.jsx)("input",{type:"checkbox","data-testid":"ocr-prefs-handwriting",checked:e.defaultPreferHandwriting,onChange:e=>s({defaultPreferHandwriting:e.target.checked}),"aria-label":"손글씨 default"})]})]}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)(i.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{t((0,ee.sg)()),(0,b.cY)("settings.ocr-prefs.reset")},className:"text-xs text-muted-foreground","data-testid":"ocr-prefs-reset",children:"기본값으로 리셋"})})]})}let es=["lm-studio","vllm","ollama","anthropic-openai-wrap"],ea={"lm-studio":"http://localhost:1234",vllm:"http://localhost:8000",ollama:"http://localhost:11434","anthropic-openai-wrap":"https://api.anthropic.com"};function er(){let{client:e,config:t}=(0,n.Q)(),[s,l]=(0,r.useState)({status:"idle"}),[c,u]=(0,r.useState)(0),[m,x]=(0,r.useState)(!1),[h,p]=(0,r.useState)(""),[b,f]=(0,r.useState)("anthropic-openai-wrap"),[g,v]=(0,r.useState)(ea["anthropic-openai-wrap"]),[j,y]=(0,r.useState)(""),[N,k]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(!t.baseUrl)return void l({status:"idle"});let s=!1;return l({status:"loading"}),(async()=>{try{let t=await e.getLlmHosts();s||l({status:"ok",data:t})}catch(e){s||l({status:"error",error:e instanceof Error?e.message:String(e)})}})(),()=>{s=!0}},[e,t.baseUrl,c]);let w=(0,r.useCallback)(()=>u(e=>e+1),[]),S=(0,r.useCallback)(e=>{f(e),v(ea[e])},[]),C=(0,r.useCallback)(async()=>{let t=h.trim(),a=g.trim(),r=j.trim();if(!t||!a)return void o.oR.error("name + endpoint 필수");if("anthropic-openai-wrap"===b&&!r)return void o.oR.error("Anthropic 은 apiKey 필수");k(!0);try{var n,l;let i=[...(null!=(l=null==(n=s.data)?void 0:n.hosts)?l:[]).filter(e=>e.name!==t).map(e=>{let t={name:e.name,kind:e.kind,endpoint:e.endpoint};return e.apiKey&&"[redacted]"!==e.apiKey&&(t.apiKey=e.apiKey),t}),{name:t,kind:b,endpoint:a,...r?{apiKey:r}:{}}];await e.setLlmHosts(i),o.oR.success("host '".concat(t,"' 추가됨")),p(""),y(""),x(!1),w()}catch(e){o.oR.error("추가 실패: ".concat(e instanceof Error?e.message:String(e)))}finally{k(!1)}},[e,h,b,g,j,s.data,w]),U=(0,r.useCallback)(async t=>{k(!0);try{var a,r;let n=(null!=(r=null==(a=s.data)?void 0:a.hosts)?r:[]).filter(e=>e.name!==t).map(e=>{let t={name:e.name,kind:e.kind,endpoint:e.endpoint};return e.apiKey&&"[redacted]"!==e.apiKey&&(t.apiKey=e.apiKey),t});await e.setLlmHosts(n),o.oR.success("host '".concat(t,"' 제거됨")),w()}catch(e){o.oR.error("제거 실패: ".concat(e instanceof Error?e.message:String(e)))}finally{k(!1)}},[e,s.data,w]),A=(0,r.useCallback)(async()=>{k(!0);try{await e.clearLlmHosts(),o.oR.success("env / legacy 로 환원"),w()}catch(e){o.oR.error("reset 실패: ".concat(e instanceof Error?e.message:String(e)))}finally{k(!1)}},[e,w]);if(!t.baseUrl)return null;let M=s.data,E=(null==M?void 0:M.source)==="override"?"bg-fuchsia-100 text-fuchsia-700 dark:bg-fuchsia-900 dark:text-fuchsia-200":(null==M?void 0:M.source)==="env"?"bg-amber-100 text-amber-700 dark:bg-amber-900 dark:text-amber-200":"bg-zinc-100 text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300";return(0,a.jsxs)("section",{className:"space-y-2","data-testid":"llm-hosts-card",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"LLM Hosts"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[M&&(0,a.jsx)("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium uppercase ".concat(E),"data-testid":"llm-hosts-source-badge",children:M.source}),(0,a.jsx)("span",{"data-testid":"llm-hosts-count",children:M?"".concat(M.count," host").concat(1===M.count?"":"s"):"loading"===s.status?"loading…":""}),(0,a.jsx)(i.$,{variant:"outline",size:"sm",onClick:w,disabled:"loading"===s.status||N,"data-testid":"llm-hosts-refresh",children:"Refresh"})]})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-2",children:[(null==M?void 0:M.deprecations)&&M.deprecations.length>0&&(0,a.jsxs)("div",{className:"rounded border border-amber-300 bg-amber-50 p-2 text-[11px] text-amber-800 dark:border-amber-700 dark:bg-amber-900/30 dark:text-amber-200","data-testid":"llm-hosts-deprecations",children:[(0,a.jsx)("p",{className:"font-medium",children:"호환성 경고 \xb7 다음 release 에서 제거 예정"}),(0,a.jsx)("ul",{className:"ml-4 list-disc",children:M.deprecations.map(e=>(0,a.jsx)("li",{className:"font-mono text-[10px]",children:e},e))})]}),"error"===s.status&&(0,a.jsxs)("p",{className:"text-rose-500","data-testid":"llm-hosts-error",children:["조회 실패 \xb7 ",s.error]}),"loading"===s.status&&!M&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing /v1/llm/hosts…"}),M&&0===M.hosts.length&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"No hosts configured. Add one below to enable a remote LLM provider (e.g. Anthropic / Gemini API direct)."}),M&&M.hosts.length>0&&(0,a.jsx)("ul",{className:"space-y-1","data-testid":"llm-hosts-list",children:M.hosts.map(e=>(0,a.jsxs)("li",{className:"flex items-center gap-2 rounded border border-border bg-muted/30 px-2 py-1","data-testid":"llm-host-row-".concat(e.name),children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 font-mono text-[11px] font-medium",children:[(0,a.jsx)("span",{children:e.name}),(0,a.jsx)("span",{className:"rounded bg-muted px-1 text-[9px] uppercase text-muted-foreground",children:e.kind}),"[redacted]"===e.apiKey&&(0,a.jsx)("span",{className:"rounded bg-emerald-100 px-1 text-[9px] uppercase text-emerald-700 dark:bg-emerald-900 dark:text-emerald-200",title:"apiKey configured (server-side, not echoed)","data-testid":"llm-host-key-badge-".concat(e.name),children:"key"})]}),(0,a.jsx)("div",{className:"truncate font-mono text-[10px] text-muted-foreground",children:e.endpoint})]}),"override"===M.source&&(0,a.jsx)(i.$,{size:"sm",variant:"outline",onClick:()=>{U(e.name)},disabled:N,"data-testid":"llm-host-remove-".concat(e.name),children:"Remove"})]},e.name))}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 pt-1",children:[(0,a.jsx)(i.$,{size:"sm",onClick:()=>x(e=>!e),disabled:N,"data-testid":"llm-hosts-add-toggle",children:m?"Cancel add":"Add host"}),(null==M?void 0:M.source)==="override"&&(0,a.jsx)(i.$,{size:"sm",variant:"outline",onClick:()=>{A()},disabled:N,"data-testid":"llm-hosts-reset",children:"Reset to env/legacy"})]}),m&&(0,a.jsxs)("div",{className:"mt-2 space-y-1.5 rounded border border-dashed border-border p-2","data-testid":"llm-hosts-add-form",children:[(0,a.jsx)(d.p,{value:h,placeholder:"name (e.g. anthropic-cloud)",onChange:e=>p(e.target.value),"data-testid":"llm-hosts-add-name",className:"text-[11px]"}),(0,a.jsx)("select",{value:b,onChange:e=>S(e.target.value),className:"flex h-8 w-full rounded-md border border-input bg-background px-2 text-xs","data-testid":"llm-hosts-add-kind",children:es.map(e=>(0,a.jsx)("option",{value:e,children:e},e))}),(0,a.jsx)(d.p,{value:g,placeholder:"endpoint URL",onChange:e=>v(e.target.value),"data-testid":"llm-hosts-add-endpoint",className:"text-[11px]"}),"anthropic-openai-wrap"===b&&(0,a.jsx)(d.p,{type:"password",value:j,placeholder:"apiKey (sk-ant-…)",onChange:e=>y(e.target.value),"data-testid":"llm-hosts-add-apikey",className:"text-[11px]"}),(0,a.jsx)(i.$,{size:"sm",onClick:()=>{C()},disabled:N||!h.trim()||!g.trim(),"data-testid":"llm-hosts-add-submit",children:N?"Saving…":"Save"})]})]}),(0,a.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["In-memory override \xb7 daemon restart reverts to ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"ELANOUS_LLM_HOSTS"})," env / legacy single host. Permanent change → set the env var in ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:".zshrc"})," or ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"launchctl setenv"}),". PUT replaces the full list, so re-add Anthropic/Gemini hosts in one go (existing apiKeys appear as ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"[redacted]"})," and aren’t round-trippable)."]})]})}var en=s(57113);function el(){var e,t;let[s,n]=(0,r.useState)(en.lu);(0,r.useEffect)(()=>{n((0,en.lu)())},[]);let l=s.speakingThresholdMultiplier===en.Qc.speakingThresholdMultiplier;return(0,a.jsxs)("section",{"data-testid":"voice-prefs-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83C\uDF99️ Voice barge-in 튜닝"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"BI-2 ducking 강도 — TTS 재생 중 자기-에코 false-fire 를 막는 RMS multiplier. 변경은 voice toggle off → on 또는 새로고침 시 적용."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsx)("span",{className:"font-medium",children:"speaking threshold multiplier"}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"voice-prefs-multiplier-value",children:(e=s.speakingThresholdMultiplier,"".concat(e.toFixed(1),"\xd7"))})]}),(0,a.jsx)("input",{type:"range",min:en.u4,max:en.M_,step:.1,value:s.speakingThresholdMultiplier,onChange:e=>{var t;return t={speakingThresholdMultiplier:Number(e.target.value)},void(n((0,en.ik)(t)),(0,b.cY)("settings.voice-prefs.update",t))},"data-testid":"voice-prefs-multiplier-slider","aria-label":"Speaking threshold multiplier","aria-valuemin":en.u4,"aria-valuemax":en.M_,"aria-valuenow":s.speakingThresholdMultiplier,className:"w-full"}),(0,a.jsx)("p",{className:"mt-1 text-[11px] text-muted-foreground","data-testid":"voice-prefs-hint",children:(t=s.speakingThresholdMultiplier)<=1.2?"거의 ducking 없음 — 자기-에코 false-fire 가능":t<=1.7?"약한 ducking — 강한 AEC 환경 + 빠른 cut-in":t<=2.5?"기본값 — 대부분 환경에서 균형":t<=3.5?"강한 ducking — 시끄러운 환경 / 민감한 마이크":"매우 강한 ducking — 자기-에코가 심한 환경"})]})}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(i.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{n((0,en.KS)()),(0,b.cY)("settings.voice-prefs.reset")},disabled:l,className:"text-xs text-muted-foreground","data-testid":"voice-prefs-reset",children:["기본값으로 리셋 (",en.Qc.speakingThresholdMultiplier.toFixed(1),"\xd7)"]})})]})}var ei=s(3844),ed=s(85364),eo=s(66271);function ec(e){let{currentTier:t,nextTier:s,currentTierMonthlyUsd:n,nextTierMonthlyUsd:l,monthSoFarUsd:d,onConfirm:o,onCancel:c}=e,u=(0,r.useRef)(null);(0,r.useEffect)(()=>{var e;null==(e=u.current)||e.focus()},[]);let m=ed.YS[t],x=ed.YS[s],h=l>n,p=h?'Switch to "'.concat(ed.LW[s],'" tier?'):'Switch to "'.concat(ed.LW[s],'" tier (cheaper)'),b=l-n,f=b>=0?"+".concat((0,ed.Bg)(Math.abs(b))):"-".concat((0,ed.Bg)(Math.abs(b)));return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"tier-confirm-title","aria-describedby":"tier-confirm-summary","data-testid":"tier-change-confirm-modal",onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),c())},children:(0,a.jsxs)("div",{className:"w-full max-w-md rounded-lg border bg-white p-4 shadow-xl dark:bg-zinc-900 ".concat(h?"border-amber-300 dark:border-amber-700":"border-emerald-300 dark:border-emerald-700"),children:[(0,a.jsxs)("h2",{id:"tier-confirm-title",className:"mb-2 text-sm font-medium ".concat(h?"text-amber-700 dark:text-amber-300":"text-emerald-700 dark:text-emerald-300"),children:[h?"⚠️":"✓"," ",p]}),(0,a.jsx)("p",{id:"tier-confirm-summary",className:"mb-3 text-xs text-zinc-700 dark:text-zinc-300",children:x.rationale}),(0,a.jsxs)("dl",{className:"mb-4 space-y-1.5 text-xs",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("dt",{className:"text-zinc-500 dark:text-zinc-400",children:"Month so far"}),(0,a.jsx)("dd",{className:"font-mono tabular-nums text-zinc-900 dark:text-zinc-100","data-testid":"tier-confirm-month-so-far",children:(0,ed.Bg)(d).replace("/mo","")})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("dt",{className:"text-zinc-500 dark:text-zinc-400",children:["At current tier (",ed.LW[t],")"]}),(0,a.jsx)("dd",{className:"font-mono tabular-nums text-zinc-900 dark:text-zinc-100","data-testid":"tier-confirm-current-projected",children:(0,ed.Bg)(n)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between rounded px-2 py-1 ".concat(h?"bg-amber-50 dark:bg-amber-950/40":"bg-emerald-50 dark:bg-emerald-950/40"),children:[(0,a.jsxs)("dt",{className:h?"text-amber-700 dark:text-amber-300":"text-emerald-700 dark:text-emerald-300",children:["At new tier (",ed.LW[s],")"]}),(0,a.jsxs)("dd",{className:"font-mono tabular-nums ".concat(h?"text-amber-900 dark:text-amber-100":"text-emerald-900 dark:text-emerald-100"),"data-testid":"tier-confirm-next-projected",children:[(0,ed.Bg)(l),(0,a.jsxs)("span",{className:"ml-1 text-[10px] opacity-70","data-testid":"tier-confirm-delta",children:["(",f,")"]})]})]})]}),(0,a.jsxs)("p",{className:"mb-3 text-[11px] text-zinc-500 dark:text-zinc-400","data-testid":"tier-confirm-rate-line",children:["Per-call: $",m.usdPerMinAudio.toFixed(3),"/min → $",(x.usdPerMinAudio+x.loadedExtraUsdPerMin).toFixed(3),"/min"]}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)(i.$,{type:"button",variant:"ghost",size:"sm",onClick:c,"data-testid":"tier-confirm-cancel",children:"Cancel"}),(0,a.jsx)(i.$,{ref:u,type:"button",size:"sm",onClick:o,"data-testid":"tier-confirm-confirm",className:h?"bg-amber-600 text-white hover:bg-amber-700":"bg-emerald-600 text-white hover:bg-emerald-700",children:h?"Confirm switch":"Switch"})]})]})})}let eu=ed.Ql.length;function em(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(eo.Ij),[d,o]=(0,r.useState)(null),[c,u]=(0,r.useState)("idle"),[m]=(0,r.useState)(0);(0,r.useEffect)(()=>{l((0,eo.Ij)());let e=!1;return(async()=>{let s=await (0,ei.ee)(t);!e&&s&&(l(s),u("synced"))})(),()=>{e=!0}},[t]);let x=(0,eo.gF)(s),h=ed.YS[x],p=void 0===s.stt,f=(0,ed.K0)(null!=d?d:x),g=(0,r.useMemo)(()=>{let e={};for(let t of ed.Ql)e[t]=(0,ed.nX)(t,s.audioMinPerDay);return e},[s.audioMinPerDay]),v=e=>{l((0,eo.Pz)({stt:e})),u("syncing"),(0,b.cY)("settings.model-tier.update",{stt:e}),(0,ei.ZB)(t,e).then(u)};return(0,a.jsxs)("section",{"data-testid":"voice-model-tier-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83C\uDF9A️ Voice transcription quality"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick how accurate vs. cheap the speech-to-text should be — elanous picks the model. Switching takes effect on the next voice call."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsxs)("span",{className:"font-medium",children:[ed.LW[x],p&&(0,a.jsx)("span",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground","data-testid":"voice-model-tier-default-badge",children:"Smart default"}),"syncing"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"voice-model-tier-sync-status",children:"Syncing…"}),"synced"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"voice-model-tier-sync-status",children:"Synced"}),"offline"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"voice-model-tier-sync-status",title:"Daemon unreachable — change saved locally \xb7 will sync when daemon comes back",children:"Offline"}),"error"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"voice-model-tier-sync-status",title:"Daemon refused the write — local copy still has your choice",children:"Sync error"})]}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"voice-model-tier-cost",children:s.audioMinPerDay>0?(0,ed.Bg)(g[x]):"".concat((h.usdPerMinAudio+h.loadedExtraUsdPerMin).toFixed(3),"/min")})]}),(0,a.jsx)("input",{type:"range",min:0,max:eu-1,step:1,value:f,onChange:e=>{let t=function(e){let t=Math.max(0,Math.min(eu-1,Math.round(e)));return ed.Ql[t]}(Number(e.target.value));if(t!==x){if(function(e){let{currentTier:t,nextTier:s,currentTierMonthlyUsd:a,nextTierMonthlyUsd:r,audioMinPerDay:n}=e;if(t===s)return!1;let l=r-a;if(l<0)return!1;if(n>0)return l>=1;let i=ed.YS[t].usdPerMinAudio+ed.YS[t].loadedExtraUsdPerMin,d=ed.YS[s].usdPerMinAudio+ed.YS[s].loadedExtraUsdPerMin;return 0===i?d>0:d>=5*i}({currentTier:x,nextTier:t,currentTierMonthlyUsd:g[x],nextTierMonthlyUsd:g[t],audioMinPerDay:s.audioMinPerDay}))return void o(t);v(t)}},"data-testid":"voice-model-tier-slider","aria-label":"Voice transcription tier","aria-valuemin":0,"aria-valuemax":eu-1,"aria-valuenow":f,"aria-valuetext":ed.LW[x],className:"w-full"}),(0,a.jsx)("div",{className:"mt-1 flex justify-between text-[10px] text-muted-foreground","data-testid":"voice-model-tier-tick-labels",children:ed.Ql.map(e=>(0,a.jsx)("span",{className:e===x?"font-semibold text-foreground":void 0,children:ed.LW[e]},e))}),(0,a.jsx)("p",{className:"mt-2 text-[11px] text-muted-foreground","data-testid":"voice-model-tier-rationale",children:h.rationale}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-muted-foreground/80","data-testid":"voice-model-tier-model-id",children:["Model: ",(0,a.jsx)("span",{className:"font-mono",children:h.model}),"wip"===h.status&&(0,a.jsx)("span",{className:"ml-1 rounded bg-amber-500/10 px-1 py-0.5 text-amber-600",children:"WIP \xb7 install local binary first"})]})]})}),(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,a.jsxs)(i.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{l((0,eo.Pv)()),o(null),u("syncing"),(0,b.cY)("settings.model-tier.reset"),(0,ei.ZB)(t,null).then(u)},disabled:p,className:"text-xs text-muted-foreground","data-testid":"voice-model-tier-reset",children:["Reset to default (",ed.LW[ed.j$],")"]}),s.audioMinPerDay>0&&(0,a.jsxs)("span",{className:"text-[10px] text-muted-foreground","data-testid":"voice-model-tier-usage-hint",children:["~",s.audioMinPerDay.toFixed(0)," min/day \xb7 14-day rolling avg"]})]}),d&&(0,a.jsx)(ec,{currentTier:x,nextTier:d,currentTierMonthlyUsd:g[x],nextTierMonthlyUsd:g[d],monthSoFarUsd:m,onConfirm:()=>{d&&v(d),o(null)},onCancel:()=>{o(null),(0,b.cY)("settings.model-tier.cancel",{from:x})}})]})}let ex=ed.Ql.length;function eh(e){return"string"==typeof e&&(0,ed.D9)(e)?e:"anthropic"}function ep(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(eo.Ij),[d,o]=(0,r.useState)(()=>eh(e.provider)),[c,u]=(0,r.useState)("idle");(0,r.useEffect)(()=>{l((0,eo.Ij)());let e=!1;return(async()=>{let s=await (0,ei.ee)(t);!e&&s&&(l(s),u("synced"))})(),()=>{e=!0}},[t]),(0,r.useEffect)(()=>{o(eh(e.provider))},[e.provider]);let m=(0,eo.oA)(s),x=void 0===s.llm,h=(0,ed.K0)(m),p=(0,ed.f7)(d,m);return(0,a.jsxs)("section",{"data-testid":"llm-model-tier-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83E\uDDE0 AI assistant quality"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick how careful vs. fast the model should think. elanous chooses the right model on your active provider \xb7 the slider stays the same across providers."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsxs)("span",{className:"font-medium",children:[ed.LW[m],x&&(0,a.jsx)("span",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground","data-testid":"llm-model-tier-default-badge",children:"Smart default"}),"syncing"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"llm-model-tier-sync-status",children:"Syncing…"}),"synced"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"llm-model-tier-sync-status",children:"Synced"}),"offline"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"llm-model-tier-sync-status",title:"Daemon unreachable",children:"Offline"}),"error"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"llm-model-tier-sync-status",title:"Daemon refused the write",children:"Sync error"})]}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"llm-model-tier-provider",children:ed.T0[d]})]}),(0,a.jsx)("input",{type:"range",min:0,max:ex-1,step:1,value:h,onChange:e=>{let s=function(e){let t=Math.max(0,Math.min(ex-1,Math.round(e)));return ed.Ql[t]}(Number(e.target.value));s!==m&&(l((0,eo.Pz)({llm:s})),u("syncing"),(0,b.cY)("settings.model-tier.llm.update",{llm:s}),(0,ei.tM)(t,s).then(u))},"data-testid":"llm-model-tier-slider","aria-label":"AI assistant tier","aria-valuemin":0,"aria-valuemax":ex-1,"aria-valuenow":h,"aria-valuetext":ed.LW[m],className:"w-full"}),(0,a.jsx)("div",{className:"mt-1 flex justify-between text-[10px] text-muted-foreground","data-testid":"llm-model-tier-tick-labels",children:ed.Ql.map(e=>(0,a.jsx)("span",{className:e===m?"font-semibold text-foreground":void 0,children:ed.LW[e]},e))}),(0,a.jsx)("p",{className:"mt-2 text-[11px] text-muted-foreground","data-testid":"llm-model-tier-rationale",children:p.rationale}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-muted-foreground/80","data-testid":"llm-model-tier-model-id",children:["Model: ",(0,a.jsx)("span",{className:"font-mono",children:p.model}),p.reasoningLevel&&(0,a.jsxs)("span",{className:"ml-1 text-muted-foreground",children:["\xb7 reasoning: ",(0,a.jsx)("span",{className:"font-mono",children:p.reasoningLevel})]}),"wip"===p.status&&(0,a.jsx)("span",{className:"ml-1 rounded bg-amber-500/10 px-1 py-0.5 text-amber-600",children:"WIP \xb7 install local runtime first"})]})]})}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(i.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{l((0,eo.Pz)({llm:void 0})),u("syncing"),(0,b.cY)("settings.model-tier.llm.reset"),(0,ei.tM)(t,null).then(u)},disabled:x,className:"text-xs text-muted-foreground","data-testid":"llm-model-tier-reset",children:["Reset to default (",ed.LW[ed.j$],")"]})})]})}let eb=ed.Ql.length;function ef(){var e;let{config:t}=(0,n.Q)(),s=(0,r.useMemo)(()=>({baseUrl:t.baseUrl,...t.token?{token:t.token}:{}}),[t.baseUrl,t.token]),[l,d]=(0,r.useState)(eo.Ij),[o,c]=(0,r.useState)("idle");(0,r.useEffect)(()=>{d((0,eo.Ij)());let e=!1;return(async()=>{let t=await (0,ei.ee)(s);!e&&t&&(d(t),c("synced"))})(),()=>{e=!0}},[s]);let u=(0,eo.Md)(l),m=ed.eP[u],x=void 0===l.tts,h=(0,ed.K0)(u),p=!Number.isFinite(e=m.usdPerCharacter)||e<=0?"free":"$".concat((1e6*e).toFixed(0),"/M chars");return(0,a.jsxs)("section",{"data-testid":"tts-model-tier-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDD0A Voice playback quality"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick text-to-speech quality vs. cost. Voice identity (Rachel \xb7 SoYoung \xb7 custom) lives in a separate picker (Phase 2 M2-2b)."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsxs)("span",{className:"font-medium",children:[ed.LW[u],x&&(0,a.jsx)("span",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground","data-testid":"tts-model-tier-default-badge",children:"Smart default"}),"syncing"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"tts-model-tier-sync-status",children:"Syncing…"}),"synced"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"tts-model-tier-sync-status",children:"Synced"}),"offline"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"tts-model-tier-sync-status",children:"Offline"}),"error"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"tts-model-tier-sync-status",children:"Sync error"})]}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"tts-model-tier-rate",children:p})]}),(0,a.jsx)("input",{type:"range",min:0,max:eb-1,step:1,value:h,onChange:e=>{let t=function(e){let t=Math.max(0,Math.min(eb-1,Math.round(e)));return ed.Ql[t]}(Number(e.target.value));t!==u&&(d((0,eo.Pz)({tts:t})),c("syncing"),(0,b.cY)("settings.model-tier.tts.update",{tts:t}),(0,ei.pP)(s,t).then(c))},"data-testid":"tts-model-tier-slider","aria-label":"Voice playback tier","aria-valuemin":0,"aria-valuemax":eb-1,"aria-valuenow":h,"aria-valuetext":ed.LW[u],className:"w-full"}),(0,a.jsx)("div",{className:"mt-1 flex justify-between text-[10px] text-muted-foreground","data-testid":"tts-model-tier-tick-labels",children:ed.Ql.map(e=>(0,a.jsx)("span",{className:e===u?"font-semibold text-foreground":void 0,children:ed.LW[e]},e))}),(0,a.jsx)("p",{className:"mt-2 text-[11px] text-muted-foreground","data-testid":"tts-model-tier-rationale",children:m.rationale}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-muted-foreground/80","data-testid":"tts-model-tier-model-id",children:["Provider: ",(0,a.jsx)("span",{className:"font-mono",children:m.provider}),(0,a.jsx)("span",{className:"ml-1",children:"\xb7"}),(0,a.jsxs)("span",{className:"ml-1",children:["Model: ",(0,a.jsx)("span",{className:"font-mono",children:m.model})]})]})]})}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(i.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{d((0,eo.Pz)({tts:void 0})),c("syncing"),(0,b.cY)("settings.model-tier.tts.reset"),(0,ei.pP)(s,null).then(c)},disabled:x,className:"text-xs text-muted-foreground","data-testid":"tts-model-tier-reset",children:["Reset to default (",ed.LW[ed.j$],")"]})})]})}let eg=null;async function ev(e){var t;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.baseUrl)return null;let a=null!=(t=s.now)?t:Date.now();if(!s.bypassMemo&&eg&&a-eg.fetchedAt<6e4)return eg.lib;try{let t=e.baseUrl.replace(/\/$/,"")+"/v1/elevenlabs/voices",s={};e.token&&(s.authorization="Bearer ".concat(e.token));let r=await fetch(t,{headers:s});if(!r.ok)return null;let n=await r.json(),l={voices:Array.isArray(n.voices)?n.voices:[],configured:!0===n.configured,fromCache:!0===n.fromCache};return eg={fetchedAt:a,lib:l},l}catch(e){return null}}let ej="elanous.tts-voice.recent";function ey(){if("undefined"==typeof localStorage)return[];try{let e=localStorage.getItem(ej);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(e=>"string"==typeof e&&e.length>0).slice(0,5)}catch(e){return[]}}let eN=[{key:"default",label:"Default",hint:"Fallback when a specific context isn't set"},{key:"chat",label:"Chat reply",hint:"Used by the PWA / TUI chat surface"},{key:"digest",label:"Morning digest",hint:"Daily summary read-back (P2-D7)"},{key:"alert",label:"Push alerts",hint:"Urgency-driven voice for push notifications"},{key:"discord",label:"Discord bot",hint:"X9 Discord voice channel + DM voice replies"}],ek="elanous.tts-voice-map";function ew(){if("undefined"==typeof localStorage)return{};try{let e=localStorage.getItem(ek);if(!e)return{};let t=JSON.parse(e),s={};for(let e of eN){let a=t[e.key];"string"==typeof a&&a.trim().length>0&&(s[e.key]=a.trim())}return s}catch(e){return{}}}function eS(e){return[e.gender,e.accent,e.category].filter(Boolean).join(" \xb7 ")||"voice"}function eC(){var e;let{config:t}=(0,n.Q)(),s=(0,r.useMemo)(()=>({baseUrl:t.baseUrl,...t.token?{token:t.token}:{}}),[t.baseUrl,t.token]),[l,o]=(0,r.useState)(ew),[c,u]=(0,r.useState)("idle"),[m,x]=(0,r.useState)(null),[h,p]=(0,r.useState)(""),[f,g]=(0,r.useState)(null),[v,j]=(0,r.useState)(ey),y=(0,r.useRef)(null),[N,k]=(0,r.useState)(null);(0,r.useEffect)(()=>{o(ew()),j(ey());let e=!1;return(async()=>{let t=await ev(s);e||(x(t),u(null===t?"offline":"synced"))})(),()=>{e=!0}},[s]);let w=(0,r.useMemo)(()=>{let e=new Map;if(m)for(let t of m.voices)e.set(t.id,t);return e},[m]),S=(0,r.useMemo)(()=>{if(!m)return[];var e=m.voices;let t=h.trim().toLowerCase();return t?e.filter(e=>[e.name,e.category,e.accent,e.gender,e.age,e.description,e.language,e.id].filter(Boolean).join(" ").toLowerCase().includes(t)):[...e]},[m,h]),C=async(e,t)=>{let a=(null!=t?t:"").trim(),r={...l};a?r[e]=a:delete r[e],o(r);if("undefined"!=typeof localStorage)try{localStorage.setItem(ek,JSON.stringify(r))}catch(e){}a&&(!function(e){if("undefined"==typeof localStorage||!e||"string"!=typeof e)return;let t=e.trim();if(!t)return;let s=ey().filter(e=>e!==t),a=[t,...s].slice(0,5);try{localStorage.setItem(ej,JSON.stringify(a))}catch(e){}}(a),j(ey())),u("syncing"),(0,b.cY)("settings.tts-voice.apply",{context:e,voiceId:a||null}),u(await (0,ei.D4)(s,{[e]:a||null}))},U=async()=>{if(o({}),"undefined"!=typeof localStorage)try{localStorage.removeItem(ek)}catch(e){}u("syncing"),(0,b.cY)("settings.tts-voice.reset-all"),u(await (0,ei.D4)(s,{default:null,chat:null,digest:null,alert:null,discord:null}))},A=e=>{if(!e.previewUrl)return;y.current&&(y.current.pause(),y.current.src="");let t=new Audio(e.previewUrl);y.current=t,k(e.id),t.addEventListener("ended",()=>k(t=>t===e.id?null:t)),t.addEventListener("error",()=>k(t=>t===e.id?null:t)),t.play().catch(()=>k(t=>t===e.id?null:t)),(0,b.cY)("settings.tts-voice.preview",{voiceId:e.id})},M=()=>{y.current&&(y.current.pause(),y.current.src="",y.current=null),k(null)},E=Object.keys(l).length>0,P=null!==m&&m.voices.length>0;return(0,a.jsxs)("section",{"data-testid":"tts-voice-id-picker-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDDE3️ Voice identity (per context)"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick a different voice per surface (chat / morning digest / alerts / Discord). Browse the ElevenLabs library or paste a voice id directly."})]}),"syncing"===c&&(0,a.jsx)("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"tts-voice-sync-status",children:"Syncing…"}),"synced"===c&&(0,a.jsx)("span",{className:"rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"tts-voice-sync-status",children:"Synced"}),"offline"===c&&(0,a.jsx)("span",{className:"rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"tts-voice-sync-status",title:"Daemon unreachable",children:"Offline"}),"error"===c&&(0,a.jsx)("span",{className:"rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"tts-voice-sync-status",children:"Sync error"})]}),m&&!m.configured&&(0,a.jsxs)("div",{className:"mb-3 rounded bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300","data-testid":"tts-voice-library-unconfigured",children:["ElevenLabs API key not set — set ",(0,a.jsx)("code",{className:"font-mono",children:"ELEVENLABS_API_KEY"})," in your env or store via ",(0,a.jsx)("code",{className:"font-mono",children:"elanous config set-secret elevenlabs.apiKey <key>"})," ","to browse the 10k+ voice library."]}),(0,a.jsx)("div",{className:"space-y-2","data-testid":"tts-voice-rows",children:eN.map(e=>{let t=l[e.key],s=t?w.get(t):void 0;return(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-baseline justify-between gap-2 text-xs",children:[(0,a.jsx)("span",{className:"font-medium","data-testid":"tts-voice-row-".concat(e.key,"-label"),children:e.label}),s&&(0,a.jsxs)("span",{className:"text-[11px] text-muted-foreground","data-testid":"tts-voice-row-".concat(e.key,"-current-name"),children:[s.name," ",(0,a.jsxs)("span",{className:"opacity-60",children:["\xb7 ",eS(s)]})]}),t&&!s&&(0,a.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground","data-testid":"tts-voice-row-".concat(e.key,"-current"),children:t})]}),(0,a.jsx)("p",{className:"mb-1 text-[10px] text-muted-foreground",children:e.hint}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.p,{defaultValue:null!=t?t:"",onBlur:s=>{let a=s.target.value.trim();a!==(null!=t?t:"")&&C(e.key,a||null)},placeholder:"Voice id (paste) or use Browse →",className:"text-xs","data-testid":"tts-voice-row-".concat(e.key,"-input")}),(0,a.jsx)(i.$,{type:"button",size:"sm",variant:f===e.key?"default":"outline",onClick:()=>g(f===e.key?null:e.key),disabled:!P,className:"text-xs","data-testid":"tts-voice-row-".concat(e.key,"-browse"),title:P?"Browse library":"Library not loaded yet",children:"Browse"}),(null==s?void 0:s.previewUrl)&&(0,a.jsx)(i.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>N===s.id?M():A(s),className:"text-xs","data-testid":"tts-voice-row-".concat(e.key,"-preview"),children:N===s.id?"⏸":"▶"}),(0,a.jsx)(i.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>C(e.key,null),disabled:!t,className:"text-xs text-muted-foreground","data-testid":"tts-voice-row-".concat(e.key,"-clear"),children:"Clear"})]})]},e.key)})}),null!==f&&P&&(0,a.jsxs)("div",{className:"mt-3 rounded-md border border-input bg-background p-2","data-testid":"tts-voice-library-catalog",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-2",children:[(0,a.jsx)(d.p,{value:h,onChange:e=>p(e.target.value),placeholder:"Search voices (name \xb7 accent \xb7 gender \xb7 description)",className:"text-xs","data-testid":"tts-voice-library-search"}),(0,a.jsx)(i.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>g(null),className:"text-xs text-muted-foreground","data-testid":"tts-voice-library-close",children:"Close"})]}),v.length>0&&!h&&(0,a.jsxs)("div",{className:"mb-2","data-testid":"tts-voice-recent-row",children:[(0,a.jsx)("p",{className:"mb-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:"Recently used"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:v.map(e=>{let t=w.get(e);return t?(0,a.jsx)("button",{type:"button",className:"rounded border border-border/40 bg-muted/30 px-2 py-1 text-[11px] hover:bg-muted",onClick:()=>f&&C(f,e),"data-testid":"tts-voice-recent-".concat(e),children:t.name},e):null})})]}),(0,a.jsxs)("p",{className:"mb-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:[S.length," voice",1===S.length?"":"s",h&&' matching "'.concat(h,'"')]}),(0,a.jsxs)("div",{className:"max-h-64 space-y-1 overflow-y-auto pr-1","data-testid":"tts-voice-library-list",children:[S.slice(0,50).map(e=>{let t=N===e.id;return(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded border border-border/40 bg-muted/20 px-2 py-1 text-xs","data-testid":"tts-voice-library-row-".concat(e.id),children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"truncate font-medium",children:e.name}),(0,a.jsxs)("div",{className:"truncate text-[10px] text-muted-foreground",children:[eS(e),e.description&&(0,a.jsxs)("span",{children:[" \xb7 ",e.description]})]})]}),e.previewUrl&&(0,a.jsx)(i.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>t?M():A(e),className:"text-xs","data-testid":"tts-voice-library-preview-".concat(e.id),children:t?"⏸":"▶"}),(0,a.jsx)(i.$,{type:"button",size:"sm",onClick:()=>f&&C(f,e.id),className:"text-xs","data-testid":"tts-voice-library-apply-".concat(e.id),children:"Apply"})]},e.id)}),S.length>50&&(0,a.jsxs)("p",{className:"text-center text-[10px] text-muted-foreground",children:["Showing first 50 of ",S.length," \xb7 refine the search to see more"]}),0===S.length&&(0,a.jsxs)("p",{className:"px-2 py-4 text-center text-[11px] text-muted-foreground",children:['No voices match "',h,'"']})]})]}),(0,a.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,a.jsx)(i.$,{type:"button",variant:"ghost",size:"sm",onClick:U,disabled:!E,className:"text-xs text-muted-foreground","data-testid":"tts-voice-reset-all",children:"Reset all"}),(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground/80",children:P?"".concat(null!=(e=null==m?void 0:m.voices.length)?e:0," voices \xb7 library cache via daemon"):"Paste voice id manually until daemon library is reachable"})]})]})}let eU={casual_chat:{id:"casual_chat",label:"Casual chat",icon:"\uD83D\uDCAC",description:"Day-to-day messaging \xb7 cheap STT / LLM \xb7 no read-back.",tiers:{stt:"budget",llm:"budget",tts:"budget"}},meeting:{id:"meeting",label:"Meeting notes",icon:"\uD83D\uDCCB",description:"Balanced accuracy for transcripts \xb7 standard LLM summarization.",tiers:{stt:"balanced",llm:"balanced",tts:"balanced"},monthlyUsdCap:5},medical_dictation:{id:"medical_dictation",label:"Medical / legal dictation",icon:"\uD83C\uDFE5",description:"Loaded STT (timestamps + jargon adaptation) \xb7 Best LLM \xb7 ElevenLabs voice.",tiers:{stt:"loaded",llm:"best",tts:"best"},monthlyUsdCap:20},live_caption:{id:"live_caption",label:"Live captioning",icon:"\uD83C\uDFAC",description:"Low-latency STT \xb7 LLM disabled \xb7 no read-back.",tiers:{stt:"balanced",llm:"budget",tts:"budget"}},sleep_mode:{id:"sleep_mode",label:"Sleep mode",icon:"\uD83C\uDF19",description:"Cost zero \xb7 local-only models \xb7 no API calls.",tiers:{stt:"budget",llm:"budget",tts:"budget"},monthlyUsdCap:0}},eA=["casual_chat","meeting","medical_dictation","live_caption","sleep_mode"],eM="elanous.active-preset";function eE(){if("undefined"!=typeof localStorage)try{let e=localStorage.getItem(eM);if(!e)return;return eA.includes(e)?e:void 0}catch(e){return}}function eP(e){if("undefined"!=typeof localStorage)try{null===e?localStorage.removeItem(eM):localStorage.setItem(eM,e)}catch(e){}}function ez(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(eE),[d,o]=(0,r.useState)("idle"),[c,u]=(0,r.useState)(null);(0,r.useEffect)(()=>{l(eE())},[]);let m=async e=>{u(e.id),o("syncing"),(0,b.cY)("settings.preset.apply",{id:e.id}),eP(e.id),l(e.id),o(await (0,ei.F$)(t,{id:e.id,tiers:e.tiers,...e.ttsVoice?{ttsVoice:e.ttsVoice}:{},...void 0!==e.monthlyUsdCap?{monthlyUsdCap:e.monthlyUsdCap}:{}})),u(null)},x=async()=>{o("syncing"),(0,b.cY)("settings.preset.clear"),eP(null),l(void 0),o(await (0,ei.F$)(t,null))};return(0,a.jsxs)("section",{"data-testid":"preset-card-grid",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"⚡ Quick presets"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"One-click bundles for common use cases — applies STT, LLM, TTS, voice id, and budget cap together. You can still fine-tune any slider after applying."})]}),"syncing"===d&&(0,a.jsx)("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"preset-sync-status",children:"Syncing…"}),"synced"===d&&(0,a.jsx)("span",{className:"rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"preset-sync-status",children:"Synced"}),"offline"===d&&(0,a.jsx)("span",{className:"rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"preset-sync-status",children:"Offline"}),"error"===d&&(0,a.jsx)("span",{className:"rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"preset-sync-status",children:"Sync error"})]}),s&&(0,a.jsxs)("div",{className:"mb-3 flex items-center justify-between rounded bg-emerald-500/5 px-3 py-2 text-xs","data-testid":"preset-active-banner",children:[(0,a.jsxs)("span",{className:"text-emerald-700 dark:text-emerald-300",children:["✓ Active preset: ",(0,a.jsx)("strong",{children:eU[s].label})]}),(0,a.jsx)(i.$,{type:"button",variant:"ghost",size:"sm",onClick:x,className:"text-[11px] text-muted-foreground","data-testid":"preset-clear-active",children:"Clear preset"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3","data-testid":"preset-card-list",children:eA.map(e=>{let t=eU[e],r=s===e,n=c===e;return(0,a.jsxs)("button",{type:"button",onClick:()=>m(t),disabled:n,className:"rounded-md border px-3 py-2 text-left transition-colors ".concat(r?"border-emerald-500 bg-emerald-500/5":"border-border/60 bg-background hover:bg-muted/40"),"data-testid":"preset-card-".concat(e),children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,a.jsxs)("span",{className:"text-sm font-semibold",children:[t.icon," ",t.label]}),r&&(0,a.jsx)("span",{className:"text-[10px] text-emerald-600",children:"active"}),n&&(0,a.jsx)("span",{className:"text-[10px] text-blue-600",children:"applying…"})]}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:t.description}),(0,a.jsxs)("div",{className:"mt-2 flex flex-wrap gap-1 text-[9px] text-muted-foreground",children:[t.tiers.stt&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["stt:",t.tiers.stt]}),t.tiers.llm&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["llm:",t.tiers.llm]}),t.tiers.tts&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["tts:",t.tiers.tts]}),void 0!==t.monthlyUsdCap&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["cap:$",t.monthlyUsdCap]})]})]},e)})})]})}var eL=s(73632);let eI=(0,$.A)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);var eR=s(66420);let eT=(0,$.A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var eD=s(19961);let e$={skills:"\uD83D\uDEE0️",toolRestrictions:"\uD83D\uDD12",structuredOutput:"\uD83D\uDCCB",thinkingControl:"\uD83D\uDCAD",effortControl:"⚙️",sessionResume:"↩️",mcp:"\uD83E\uDDE9",hooks:"\uD83E\uDE9D",agents:"\uD83E\uDD16",envInjection:"\uD83D\uDD11",costControl:"\uD83D\uDCB0",fallbackModel:"\uD83D\uDD01",sandbox:"\uD83E\uDDF1",multiHostFanout:"\uD83C\uDF10"};function eO(){let{client:e,config:t}=(0,n.Q)(),s=(0,eD.X)(e),[l,i]=(0,r.useState)({}),[d,o]=(0,r.useState)({state:"idle"}),[c,u]=(0,r.useState)("list"),m=(0,r.useMemo)(()=>{let e=s.providers[0];return e?Object.keys(e.capabilities).sort():[]},[s.providers]);(0,r.useEffect)(()=>{if(s.providers.length>0&&0===Object.keys(l).length){let e={};for(let t of s.providers)e[t.id]=!1;i(e)}},[s.providers,l]);let x=(0,r.useCallback)(e=>{i(t=>({...t,[e]:!t[e]}))},[]),h=(0,r.useCallback)(async()=>{o({state:"running"});try{var e,a;let r="".concat(null!=(a=null==(e=t.baseUrl)?void 0:e.replace(/\/$/,""))?a:"","/v1/registry/discovery"),n={};t.token&&(n.authorization="Bearer ".concat(t.token));let l=await fetch(r,{method:"POST",headers:n});if(!l.ok)return void o({state:"error",detail:"HTTP ".concat(l.status)});await s.reload(),o({state:"ok"})}catch(e){o({state:"error",detail:e instanceof Error?e.message:String(e)})}},[t.baseUrl,t.token,s]);return(0,a.jsxs)("section",{className:"space-y-2","data-testid":"llm-catalog-card",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"LLM Catalog"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[(0,a.jsx)("span",{"data-testid":"llm-catalog-summary",children:s.loading?"loading…":"".concat(s.providers.length," providers \xb7 ").concat(s.models.length," models")}),(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>"list"===e?"matrix":"list"),"aria-label":"Toggle view: list vs capability matrix","data-testid":"llm-catalog-view-toggle",className:"rounded px-1.5 py-0.5 text-[10px] uppercase font-medium hover:bg-surface-elevated",children:"list"===c?"matrix":"list"}),(0,a.jsx)("button",{type:"button",onClick:h,disabled:"running"===d.state||s.loading,"aria-label":"Run discovery refresh","data-testid":"llm-catalog-refresh",className:"rounded p-1 hover:bg-surface-elevated disabled:opacity-50",children:(0,a.jsx)(R.A,{className:"h-3 w-3 ".concat("running"===d.state?"animate-spin":"")})})]})]}),s.error&&(0,a.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-error","data-testid":"llm-catalog-error",children:[(0,a.jsx)(T.A,{className:"h-3 w-3"}),s.error]}),"error"===d.state&&(0,a.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-error",children:[(0,a.jsx)(T.A,{className:"h-3 w-3"}),"discovery failed \xb7 ",d.detail]}),"ok"===d.state&&(0,a.jsx)("p",{className:"text-[11px] text-emerald-600 dark:text-emerald-400",children:"discovery complete — catalog refreshed"}),s.loading&&0===s.providers.length&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Querying /v1/registry/catalog…"}),s.providers.length>0&&"matrix"===c&&(0,a.jsx)("div",{className:"overflow-x-auto rounded-md border border-border","data-testid":"llm-catalog-matrix",children:(0,a.jsxs)("table",{className:"min-w-full text-[10px]",children:[(0,a.jsx)("thead",{className:"bg-surface-elevated",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"sticky left-0 z-10 bg-surface-elevated px-2 py-1 text-left font-medium",children:"Provider"}),m.map(e=>{var t;return(0,a.jsx)("th",{className:"px-1.5 py-1 text-center font-medium uppercase text-muted-foreground",title:e,children:null!=(t=e$[e])?t:e.slice(0,3)},e)})]})}),(0,a.jsx)("tbody",{children:s.providers.map(e=>(0,a.jsxs)("tr",{className:"border-t border-border/40","data-testid":"llm-catalog-matrix-row-".concat(e.id),children:[(0,a.jsx)("td",{className:"sticky left-0 z-10 bg-card px-2 py-1 font-mono text-[10px]",children:e.id}),m.map(t=>{let s=e.capabilities[t];return(0,a.jsx)("td",{className:"px-1.5 py-1 text-center",title:"".concat(e.id," \xb7 ").concat(t,": ").concat(s?"yes":"no"),children:s?(0,a.jsx)(eL.A,{className:"mx-auto h-3 w-3 text-emerald-600 dark:text-emerald-400"}):(0,a.jsx)(eI,{className:"mx-auto h-3 w-3 text-muted-foreground/50"})},t)})]},e.id))})]})}),s.providers.length>0&&"list"===c&&(0,a.jsx)("ul",{className:"space-y-1 rounded-md border border-border","data-testid":"llm-catalog-provider-list",children:s.providers.map(e=>{var t;let r=s.modelsByProvider(e.id),n=null!=(t=l[e.id])&&t,i=Object.entries(e.capabilities).filter(e=>{let[,t]=e;return!0===t}).map(e=>{let[t]=e;return t});return(0,a.jsxs)("li",{className:"border-b border-border/40 last:border-0","data-testid":"llm-catalog-provider-".concat(e.id),children:[(0,a.jsxs)("button",{type:"button",onClick:()=>x(e.id),"aria-expanded":n,className:"flex w-full items-start justify-between gap-2 px-2 py-1.5 text-left hover:bg-surface-elevated","data-testid":"llm-catalog-provider-toggle-".concat(e.id),children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-[12px] font-medium",children:[n?(0,a.jsx)(eR.A,{className:"h-3 w-3"}):(0,a.jsx)(eT,{className:"h-3 w-3"}),(0,a.jsx)("span",{children:e.displayName}),(0,a.jsx)("span",{className:"rounded bg-muted px-1 font-mono text-[9px] uppercase text-muted-foreground",children:e.id})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-0.5 pl-4 text-[10px] text-muted-foreground",children:i.map(e=>{var t;return(0,a.jsxs)("span",{className:"rounded bg-surface-elevated px-1",title:e,children:[null!=(t=e$[e])?t:"\xb7"," ",e]},e)})})]}),(0,a.jsxs)("span",{className:"shrink-0 rounded bg-muted px-1 text-[10px] text-muted-foreground",children:[r.length," model",1===r.length?"":"s"]})]}),n&&(0,a.jsxs)("ul",{className:"border-t border-border/40 bg-surface-elevated/50 px-2 py-1","data-testid":"llm-catalog-models-".concat(e.id),children:[0===r.length&&(0,a.jsx)("li",{className:"py-1 text-[10px] text-muted-foreground",children:"no models registered for this provider"}),r.map(e=>(0,a.jsxs)("li",{className:"flex items-center justify-between gap-2 py-0.5 font-mono text-[10px]","data-testid":"llm-catalog-model-".concat(e.id),children:[(0,a.jsx)("span",{className:"truncate",title:e.id,children:e.id}),(0,a.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:[e.contextSize?"".concat(Math.round(e.contextSize/1e3),"k ctx"):"—",e.pricing?" \xb7 $".concat(e.pricing.inputPerMTok,"/$").concat(e.pricing.outputPerMTok):""]})]},e.id))]})]},e.id)})})]})}var eY=s(33158);function eB(e){let{status:t,percent:s,monthlyUsdCap:n,monthSoFarUsd:l,recommendedFallback:d,notifyAtPct:o,onApply:c,onAdjustCap:u,onDismiss:m}=e,[x,h]=(0,r.useState)("switch"),p=(0,r.useRef)(null);(0,r.useEffect)(()=>{var e;null==(e=p.current)||e.focus()},[]);let b="cap-exceeded"===t,f=ed.LW[d],g=(0,ed.Bg)(l).replace("/mo",""),v=(0,ed.Bg)(n).replace("/mo","");return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"budget-threshold-title","aria-describedby":"budget-threshold-summary","data-testid":"budget-threshold-modal","data-status":t,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),m())},children:(0,a.jsxs)("div",{className:"w-full max-w-md rounded-lg border bg-white p-4 shadow-xl dark:bg-zinc-900 ".concat(b?"border-rose-300 dark:border-rose-700":"border-amber-300 dark:border-amber-700"),children:[(0,a.jsxs)("h2",{id:"budget-threshold-title",className:"mb-2 text-sm font-medium ".concat(b?"text-rose-700 dark:text-rose-300":"text-amber-700 dark:text-amber-300"),children:["\uD83D\uDCB0 You've used ",g," of ",v," monthly cap (",Math.round(s),"%)"]}),(0,a.jsx)("p",{id:"budget-threshold-summary",className:"mb-3 text-xs text-zinc-600 dark:text-zinc-400","data-testid":"budget-threshold-summary",children:b?"You've passed the cap. elanous recommends falling back to ".concat(f," tier for the rest of this month."):"You're past the ".concat(o,"% threshold. elanous can switch to ").concat(f," tier to slow the burn.")}),(0,a.jsxs)("fieldset",{className:"mb-4 space-y-1.5 text-xs","data-testid":"budget-threshold-choices",children:[(0,a.jsx)("legend",{className:"sr-only",children:"Auto-fallback options"}),(0,a.jsx)(eQ,{id:"switch",label:"Switch to ".concat(f," tier for the rest of this month"),checked:"switch"===x,onSelect:()=>h("switch")}),(0,a.jsx)(eQ,{id:"continue",label:"Continue at current tier (may exceed cap)",checked:"continue"===x,onSelect:()=>h("continue")}),(0,a.jsx)(eQ,{id:"local-only",label:"Use local-only models (cost = $0)",checked:"local-only"===x,onSelect:()=>h("local-only")})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)(i.$,{type:"button",variant:"ghost",size:"sm",onClick:u,"data-testid":"budget-threshold-adjust-cap",children:"Adjust cap"}),(0,a.jsx)(i.$,{ref:p,type:"button",size:"sm",onClick:()=>c(x,d),"data-testid":"budget-threshold-apply",className:b?"bg-rose-600 text-white hover:bg-rose-700":"bg-amber-600 text-white hover:bg-amber-700",children:"Apply"})]})]})})}function eQ(e){let{id:t,label:s,checked:r,onSelect:n}=e;return(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded px-2 py-1 ".concat(r?"bg-zinc-100 dark:bg-zinc-800":"hover:bg-zinc-50 dark:hover:bg-zinc-800/50"),"data-testid":"budget-threshold-choice-".concat(t),children:[(0,a.jsx)("input",{type:"radio",name:"budget-threshold-choice",value:t,checked:r,onChange:n,className:"h-3 w-3"}),(0,a.jsx)("span",{className:"text-zinc-700 dark:text-zinc-200",children:s})]})}function eW(e){var t,s;let{pollMs:l=6e4,onAdjustCap:i}=e,{config:d}=(0,n.Q)(),[c,u]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(!d.baseUrl)return;let e=!1,t=async()=>{let t=await (0,eY.gh)({baseUrl:d.baseUrl,...d.token?{token:d.token}:{}});e||u(t)};if(t(),l<=0)return()=>{e=!0};let s=setInterval(()=>{t()},l);return()=>{e=!0,clearInterval(s)}},[d.baseUrl,d.token,l]);let m=(0,r.useCallback)(async(e,t)=>{if(!c)return;if("continue"===e){(0,eY.s0)(c.monthYYYYMM,"ok"===c.status?"warning":c.status),u({...c,status:"ok"}),o.oR.message("Continuing at current tier — elanous will nag again at next threshold.");return}let s=await (0,eY.iQ)({baseUrl:d.baseUrl,...d.token?{token:d.token}:{}},t);"synced"===s?o.oR.success("Switched STT/LLM/TTS to ".concat(t,".")):"offline"===s?o.oR.error("Daemon offline — change saved locally, will sync when online."):o.oR.error("Budget fallback failed: ".concat(s,".")),(0,eY.s0)(c.monthYYYYMM,"ok"===c.status?"warning":c.status),u({...c,status:"ok"})},[d.baseUrl,d.token,c]),x=(0,r.useCallback)(()=>{c&&((0,eY.s0)(c.monthYYYYMM,"ok"===c.status?"warning":c.status),u({...c,status:"ok"}))},[c]),h=(0,r.useCallback)(()=>{i&&i(),x()},[i,x]);return c&&(0,eY.Vl)(c)?(0,a.jsx)(eB,{status:c.status,percent:null!=(t=c.percent)?t:0,monthlyUsdCap:null!=(s=c.monthlyUsdCap)?s:0,monthSoFarUsd:c.monthSoFarUsd,recommendedFallback:c.recommendedFallback,notifyAtPct:c.notifyAtPct,onApply:(e,t)=>{m(e,t)},onAdjustCap:h,onDismiss:x}):null}let e_={embedding:"RAG retrieval \xb7 similarity. Most users never touch this.",vision:"OCR \xb7 screenshot analysis \xb7 note-from-image."};function eF(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(eo.Ij),[d,o]=(0,r.useState)("idle"),[c,u]=(0,r.useState)("idle");(0,r.useEffect)(()=>{l((0,eo.Ij)());let e=!1;return(async()=>{let s=await (0,ei.ee)(t);!e&&s&&l(s)})(),()=>{e=!0}},[t]);let m=async(e,s)=>{(0,b.cY)("pwa.settings.tier.embedding-vision","selected ".concat(e,"=").concat(s)),"embedding"===e?(o("syncing"),o(await (0,ei.zs)(t,s)),l(e=>({...e,embedding:s}))):(u("syncing"),u(await (0,ei.We)(t,s)),l(e=>({...e,vision:s})))},x=e=>{let t="embedding"===e?(0,eo.ew)(s):(0,eo.lH)(s),r="embedding"===e?!!s.embedding:!!s.vision,n="embedding"===e?d:c;return(0,a.jsxs)("div",{className:"space-y-1.5","data-testid":"embedding-vision-row-".concat(e),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-xs font-medium uppercase tracking-wide text-zinc-500 dark:text-zinc-400",children:"embedding"===e?"Embedding":"Vision"}),(0,a.jsx)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:r?"Saved \xb7 ".concat(n):"Smart default"})]}),(0,a.jsx)("p",{className:"text-[11px] text-zinc-500 dark:text-zinc-400",children:e_[e]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:ed.Ql.map(s=>(0,a.jsx)(i.$,{size:"sm",variant:s===t?"default":"outline",onClick:()=>{m(e,s)},"data-testid":"embedding-vision-".concat(e,"-").concat(s),className:"text-[11px]",children:ed.LW[s]},s))})]})};return(0,a.jsxs)("section",{className:"space-y-4 rounded-md border border-border bg-card p-4","data-testid":"embedding-vision-card",children:[(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Embedding \xb7 Vision tier"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Phase 3 scaffolding — model selection for RAG embedding + image vision. Resolvers wired; call-site integration follows as RAG / vision pipelines come online."})]}),x("embedding"),x("vision")]})}var eV=s(49413);function eK(){let e=(0,N.Qj)(),[t,s]=(0,r.useState)(!1),[n,l]=(0,r.useState)({status:"idle"}),[d,o]=(0,r.useState)({});(0,r.useEffect)(()=>{s(!0)},[]);let c=(0,r.useCallback)(async()=>{if(e){l({status:"loading"});try{let t=await e.getPersonas();l({status:"ok",personas:t.personas}),o({})}catch(e){l({status:"error",message:e.message})}}},[e]);(0,r.useEffect)(()=>{t&&e&&c()},[t,e,c]);let u=(0,r.useCallback)((e,t,s)=>{o(a=>{var r;return{...a,[e]:{personaId:e,draft:s,dirty:s!==(null!=t?t:""),saving:!1,...(null==(r=a[e])?void 0:r.error)?{error:void 0}:{}}}})},[]),m=(0,r.useCallback)(async t=>{if(!e)return;let s=d[t];if(s){o(e=>({...e,[t]:{...s,saving:!0,error:void 0}}));try{let a=await e.patchPersonaDescription(t,s.draft);l(e=>"ok"!==e.status?e:{status:"ok",personas:e.personas.map(e=>e.personaId===t?a.persona:e)}),o(e=>{let{[t]:s,...a}=e;return a})}catch(e){o(a=>({...a,[t]:{...s,saving:!1,error:e.message}}))}}},[e,d]);return t&&e?(0,a.jsxs)("section",{id:"personas","data-testid":"persona-card",className:"space-y-3 rounded border border-border bg-card p-4",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold",children:"Personas"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"4 인격 yaml file 의 description 편집. 빈 string 으로 저장하면 clear."})]}),(0,a.jsx)(i.$,{variant:"outline",size:"sm",onClick:c,disabled:"loading"===n.status,children:"Refresh"})]}),"idle"===n.status||"loading"===n.status?(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Loading personas…"}):null,"error"===n.status?(0,a.jsxs)("p",{className:"text-xs text-destructive",children:["persona 로드 실패: ",n.message]}):null,"ok"===n.status&&0===n.personas.length?(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["~/.elanous/personas/ 에 yaml file 이 없음. yaml seed:"," ",(0,a.jsx)("span",{className:"font-mono",children:"personas/*.yaml"})," 복사 후 refresh."]}):null,"ok"===n.status&&n.personas.length>0?(0,a.jsx)("ul",{className:"flex flex-col gap-3",children:n.personas.map(e=>(0,a.jsx)(eH,{persona:e,edit:d[e.personaId],onDraftChange:u,onSave:m},e.personaId))}):null,(0,a.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Note: ⚗ Auto describer 와 orchestrator routing 은"," ",(0,a.jsx)("a",{href:"https://github.com/ElanvitalAI/elanous/blob/main/내부 문서 `RESEARCH-hermes-pr27572-triage-orchestrator-deferred-2026-05-19`",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Hermes PR #27572 research"})," ","채택 시 활성화 예정."]})]}):null}function eH(e){var t,s,r,n;let{persona:l,edit:d,onDraftChange:o,onSave:c}=e,u=null!=(t=l.description)?t:"",m=null!=(s=null==d?void 0:d.draft)?s:u,x=null!=(r=null==d?void 0:d.dirty)&&r,h=null!=(n=null==d?void 0:d.saving)&&n,p=280-m.length<0;return(0,a.jsxs)("li",{className:"flex flex-col gap-2 rounded border border-border bg-background p-3","data-testid":"persona-row-".concat(l.personaId),children:[(0,a.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[l.brandColor?(0,a.jsx)("span",{className:"inline-block h-3 w-3 rounded",style:{backgroundColor:l.brandColor},"aria-hidden":!0}):null,(0,a.jsx)("span",{className:"text-sm font-medium",children:l.displayName}),(0,a.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground",children:l.personaId})]}),l.primaryModel?(0,a.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:l.primaryModel}):null]}),(0,a.jsx)("textarea",{value:m,onChange:e=>o(l.personaId,u,e.target.value),rows:2,maxLength:560,placeholder:"이 persona 가 무엇을 잘 하는지 1-2 문장으로 적어주세요.",disabled:h,"data-testid":"persona-description-".concat(l.personaId),className:(0,eV.cn)("w-full resize-none rounded border border-input bg-transparent px-2.5 py-1.5 text-xs","focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50",p&&"border-destructive")}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("span",{className:(0,eV.cn)("font-mono text-[10px]",p?"text-destructive":"text-muted-foreground"),children:[m.length," / ",280]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(null==d?void 0:d.error)?(0,a.jsx)("span",{className:"text-[10px] text-destructive",children:d.error}):null,(0,a.jsx)(i.$,{size:"sm",onClick:()=>c(l.personaId),disabled:!x||h||p,"data-testid":"persona-save-".concat(l.personaId),children:h?"저장중…":"저장"})]})]})]})}let eq="2026-09-30T11:24:29.919Z",eX="e491ebf";function eG(e){try{return new Date(e).toLocaleString("ko-KR",{timeZone:"Asia/Seoul",year:"2-digit",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}catch(t){return e}}function eJ(){let[e,t]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=!1;return fetch("/v1/health").then(e=>e.ok?e.json():null).then(s=>{!e&&s&&"number"==typeof s.startedAt&&t({startedAt:s.startedAt,sha:"string"==typeof s.daemonSha?s.daemonSha:""})}).catch(()=>{}),()=>{e=!0}},[]);let s=eX&&"unknown"!==eX?eX:"",n=(null==e?void 0:e.sha)&&"unknown"!==e.sha?e.sha:"",l=!!n&&!!s&&n!==s;return(0,a.jsxs)("section",{className:"space-y-3 rounded-2xl border border-border bg-card p-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-base font-semibold",children:"빌드 정보"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"배포 최신 여부 판별 — 새로고침 후 시각/SHA 가 안 바뀌면 옛 캐시."})]}),(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,a.jsxs)("div",{className:"rounded-xl bg-muted/40 p-3",children:[(0,a.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-muted-foreground",children:"PWA 프론트 빌드"}),(0,a.jsxs)("div",{className:"mt-1 font-mono text-sm",children:[eq?eG(eq):"—",s?" \xb7 ".concat(s):""]})]}),(0,a.jsxs)("div",{className:"rounded-xl bg-muted/40 p-3",children:[(0,a.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-muted-foreground",children:"데몬(백엔드) 시작"}),(0,a.jsxs)("div",{className:"mt-1 font-mono text-sm ".concat(l?"text-amber-500":""),children:[e?eG(new Date(e.startedAt).toISOString()):"…",n?" \xb7 ".concat(n):""]}),l&&(0,a.jsx)("div",{className:"mt-1 text-[11px] text-amber-500",children:"프론트/데몬 SHA 불일치 — 재빌드\xb7재시작 필요"})]})]})]})}var eZ=s(26253),e0=s(78413);function e1(){let{read:e=e0.fG,write:t=e0.MQ}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[s,n]=(0,r.useState)(!1),[l,i]=(0,r.useState)(!1);(0,r.useEffect)(()=>{n(e(eZ.f4)),i(e(eZ.vm))},[e]);let d=e=>eZ.Ue.filter(t=>t.visibility===e).map(e=>e.label).join(" \xb7 "),o=(e,s,a)=>{a(s),t(e,s)};return(0,a.jsxs)("section",{className:"space-y-3 rounded-2xl border border-border bg-card p-4","aria-label":"메뉴",children:[(0,a.jsx)("h2",{className:"text-base font-semibold",children:"메뉴"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"메뉴에는 주요 탭만 보입니다. Labs(베타)와 숨긴 탭은 이 기기에서만 켤 수 있고, 숨긴 탭도 주소로는 열립니다."}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-sm",children:[(0,a.jsx)("input",{type:"checkbox","data-elanous-action":"menu-show-labs",checked:s,onChange:e=>o(eZ.f4,e.target.checked,n)}),(0,a.jsxs)("span",{children:["Labs 탭 보기 ",(0,a.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",d("labs"),")"]})]})]}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-sm",children:[(0,a.jsx)("input",{type:"checkbox","data-elanous-action":"menu-show-hidden",checked:l,onChange:e=>o(eZ.vm,e.target.checked,i)}),(0,a.jsxs)("span",{children:["숨긴 탭 보기 ",(0,a.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",d("hidden"),")"]})]})]})]})}let e2=["","claude","gemini","grok","codex"];function e5(){var e,t,s,b,f,g;let{config:N,setConfig:k,client:S,sessionId:C}=(0,n.Q)();(0,r.useEffect)(()=>{if("#bearer-token"!==window.location.hash)return;let e=window.setTimeout(()=>{let e=document.getElementById("bearer-token");null==e||e.scrollIntoView({block:"center"}),null==e||e.focus()},50);return()=>window.clearTimeout(e)},[]);let{theme:E,setTheme:z}=(0,l.D)(),[R,T]=(0,r.useState)({status:"idle"}),[D,$]=(0,r.useState)({status:"idle"}),[O,Y]=(0,r.useState)({status:"idle"}),[B,W]=(0,r.useState)(0),[_,K]=(0,r.useState)({status:"idle"}),[H,X]=(0,r.useState)(0),[J,ee]=(0,r.useState)({status:"idle"}),[es,ea]=(0,r.useState)(0),[en,ei]=(0,r.useState)(()=>({supported:!1,permission:"unknown",cachedId:null,cachedLabel:null})),[ed,eo]=(0,r.useState)(!1),[ec,eu]=(0,r.useState)(null);(0,r.useEffect)(()=>{ei(v())},[]);let ex=(0,r.useCallback)(()=>{ei(v())},[]),eh=(0,r.useCallback)(async()=>{eo(!0),eu(null);try{let e=await j({baseUrl:N.baseUrl,...N.token?{token:N.token}:{}});"enabled"===e.status?o.oR.success("Notifications enabled"):"permission-denied"===e.status?o.oR.error("Permission denied — enable in browser/iOS settings"):"unsupported"===e.status?o.oR.error("Push not supported: ".concat(e.reason)):(eu(e.reason),o.oR.error("Enable failed: ".concat(e.reason)))}finally{eo(!1),ex()}},[N.baseUrl,N.token,ex]),eb=(0,r.useCallback)(async()=>{eo(!0);try{await y({baseUrl:N.baseUrl,...N.token?{token:N.token}:{}}),o.oR.success("Notifications disabled")}finally{eo(!1),ex()}},[N.baseUrl,N.token,ex]),eg=(0,r.useCallback)(async()=>{if(N.baseUrl)try{var e,t;let s=await fetch("".concat(N.baseUrl.replace(/\/$/,""),"/v1/push/test"),{method:"POST",...N.token?{headers:{authorization:"Bearer ".concat(N.token)}}:{}});if(!s.ok)return void o.oR.error("Test failed: HTTP ".concat(s.status));let a=await s.json();o.oR.success("Test sent: ".concat(null!=(e=a.delivered)?e:0," / ").concat(null!=(t=a.attempted)?t:0," delivered"))}catch(e){o.oR.error("Test failed: ".concat(e instanceof Error?e.message:String(e)))}},[N.baseUrl,N.token]),[ev,ej]=(0,r.useState)(""),[ey,eN]=(0,r.useState)(""),[ek,ew]=(0,r.useState)(""),[eS,eU]=(0,r.useState)(null),[eA,eM]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(!N.baseUrl)return void T({status:"idle"});let e=!1,t=new AbortController,s=Date.now();return T({status:"loading"}),(async()=>{try{let a=await fetch("".concat(N.baseUrl.replace(/\/$/,""),"/v1/health"),{signal:t.signal});if(e)return;let r=Date.now()-s;if(!a.ok)return void T({status:"error",error:"HTTP ".concat(a.status),latencyMs:r,checkedAt:Date.now()});let n=await a.json();T({status:n.ok?"ok":"error",..."number"==typeof n.sessions?{sessions:n.sessions}:{},latencyMs:r,checkedAt:Date.now(),...n.ok?{}:{error:"health.ok=false"}})}catch(t){if(e)return;T({status:"error",error:t instanceof Error?t.message:String(t),latencyMs:Date.now()-s,checkedAt:Date.now()})}})(),()=>{e=!0,t.abort()}},[N.baseUrl]),(0,r.useEffect)(()=>{if("ok"!==R.status||!N.baseUrl)return void $({status:"idle"});let e=!1,t=new AbortController;return $({status:"loading"}),(async()=>{try{var s,a;let r=await fetch("".concat(N.baseUrl.replace(/\/$/,""),"/v1/tools"),{signal:t.signal,credentials:"same-origin",mode:"same-origin",...N.token?{headers:{authorization:"Bearer ".concat(N.token)}}:{}});if(e)return;if(!r.ok)return void $({status:"error",error:"HTTP ".concat(r.status)});let n=await r.json(),l=(null!=(s=n.specs)?s:[]).map(e=>{var t;return"string"==typeof e?{name:e,description:""}:{name:e.name,description:null!=(t=e.description)?t:""}});$({status:"ok",kind:null!=(a=n.kind)?a:"none",specs:l})}catch(t){if(e)return;$({status:"error",error:t instanceof Error?t.message:String(t)})}})(),()=>{e=!0,t.abort()}},[R.status,R.checkedAt,N.baseUrl,N.token]),(0,r.useEffect)(()=>{if("ok"!==R.status||!N.baseUrl)return void Y({status:"idle"});let e=!1,t=new AbortController;return Y({status:"loading"}),(async()=>{try{var s;let a=await fetch("".concat(N.baseUrl.replace(/\/$/,""),"/v1/diag/auth-trace"),{signal:t.signal,credentials:"same-origin",mode:"same-origin",...N.token?{headers:{authorization:"Bearer ".concat(N.token)}}:{}});if(e)return;if(!a.ok)return void Y({status:"error",error:"HTTP ".concat(a.status)});let r=await a.json();Y({status:"ok",entries:null!=(s=r.entries)?s:[],fetchedAt:Date.now()})}catch(t){if(e)return;Y({status:"error",error:t instanceof Error?t.message:String(t)})}})(),()=>{e=!0,t.abort()}},[R.status,R.checkedAt,N.baseUrl,N.token,B]),(0,r.useEffect)(()=>{if("ok"!==R.status||!N.baseUrl||!C)return void K({status:"idle"});let e=!1,t=null,s=new AbortController;return K({status:"loading"}),(async()=>{try{let a="".concat(N.baseUrl.replace(/\/$/,""),"/v1/turns/last/screenshot?session=").concat(encodeURIComponent(C)),r=await fetch(a,{signal:s.signal,...N.token?{headers:{authorization:"Bearer ".concat(N.token)}}:{}});if(e)return;if(404===r.status)return void K({status:"none",fetchedAt:Date.now()});if(!r.ok)return void K({status:"error",error:"HTTP ".concat(r.status)});let n=await r.blob();if(e)return;t=URL.createObjectURL(n),K({status:"ok",objectUrl:t,fetchedAt:Date.now()})}catch(t){if(e)return;K({status:"error",error:t instanceof Error?t.message:String(t)})}})(),()=>{e=!0,s.abort(),t&&URL.revokeObjectURL(t)}},[R.status,N.baseUrl,N.token,C,H]),(0,r.useEffect)(()=>{if("ok"!==R.status||!N.baseUrl)return void ee({status:"idle"});let e=!1;return ee(e=>({...e,status:"loading"})),(async()=>{try{let t=await x(S);if(e)return;ee(e=>({status:"ok",bindings:t.bindings,...e.secretRef?{secretRef:e.secretRef}:{},...e.pendingSecretValue?{pendingSecretValue:e.pendingSecretValue}:{}}))}catch(s){if(e)return;let t=s instanceof Error?s.message:String(s);t.includes("404")||t.includes("Not Found")?ee({status:"nexus-missing"}):ee({status:"error",error:t})}})(),()=>{e=!0}},[S,R.status,N.baseUrl,es]);let eE=(0,r.useCallback)(()=>{ea(e=>e+1)},[]),eP=(0,r.useCallback)(async()=>{eM(!0);try{let e=function(){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}(),t=await m(S,e);ee(s=>({...s,secretRef:t.ref,pendingSecretValue:e})),o.oR.success("Pushcut secret rotated \xb7 copy + paste into iPhone Shortcut")}catch(t){let e=t instanceof Error?t.message:String(t);o.oR.error("secret rotate failed: ".concat(e))}finally{eM(!1)}},[S]),eL=(0,r.useCallback)(async()=>{if(!ev.trim())return void o.oR.error("token required");let e=ey.trim()||C;if(!e)return void o.oR.error("sessionId required (auto-fill: open this session in /term first)");eU("__new__");try{await h(S,{token:ev.trim(),sessionId:e,...ek.trim()?{label:ek.trim()}:{}}),o.oR.success("binding saved"),ej(""),eN(""),ew(""),eE()}catch(e){o.oR.error("binding save failed: ".concat(e instanceof Error?e.message:String(e)))}finally{eU(null)}},[S,ev,ey,ek,C,eE]),eI=(0,r.useCallback)(async e=>{eU(e);try{await p(S,e),o.oR.success("binding deleted: ".concat(e.slice(0,8),"…")),eE()}catch(e){o.oR.error("delete failed: ".concat(e instanceof Error?e.message:String(e)))}finally{eU(null)}},[S,eE]),eR=e=>"number"!=typeof e?"—":"".concat(e," ms"),eT=e=>{if(!e)return"";let t=Math.floor((Date.now()-e)/1e3);return t<5?"just now":t<60?"".concat(t,"s ago"):"".concat(Math.floor(t/60),"m ago")};return(0,a.jsxs)("div",{className:"mx-auto max-w-2xl space-y-8 p-6",children:[(0,a.jsx)(eW,{}),(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"Settings"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"Daemon connection, provider default, theme. Stored in localStorage."})]}),(0,a.jsx)(P,{}),(0,a.jsx)(w,{}),(0,a.jsx)(U.Q,{}),(0,a.jsx)(A.lN,{}),(0,a.jsx)(M.Q,{}),(0,a.jsx)("div",{id:"channels",className:"scroll-mt-8","aria-hidden":!0}),(0,a.jsx)(Q,{}),(0,a.jsx)(F.W,{}),(0,a.jsx)("div",{id:"advanced",className:"scroll-mt-8","aria-hidden":!0}),(0,a.jsx)(eO,{}),(0,a.jsx)(er,{}),(0,a.jsx)(V,{}),(0,a.jsx)(G,{}),(0,a.jsx)(q,{}),(0,a.jsx)(Z,{}),(0,a.jsx)(et,{}),(0,a.jsx)("div",{id:"voice",className:"scroll-mt-8","aria-hidden":!0}),(0,a.jsx)(el,{}),(0,a.jsx)(ez,{}),(0,a.jsx)(em,{}),(0,a.jsx)(ep,{}),(0,a.jsx)(ef,{}),(0,a.jsx)(eC,{}),(0,a.jsx)(eF,{}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Daemon"}),(0,a.jsxs)("label",{className:"block space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"Base URL"}),(0,a.jsx)(d.p,{value:N.baseUrl,placeholder:"http://localhost:31415",onChange:e=>k({baseUrl:e.target.value})})]}),(0,a.jsxs)("label",{className:"block space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"Bearer token"}),(0,a.jsx)(d.p,{id:"bearer-token",type:"password",value:N.token,placeholder:"(optional)",onChange:e=>k({token:e.target.value})})]}),(0,a.jsxs)("label",{className:"block space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"Default provider"}),(0,a.jsx)("select",{value:N.provider,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-xs focus:outline-none focus:ring-2 focus:ring-ring",onChange:e=>k({provider:e.target.value}),children:e2.map(e=>(0,a.jsx)("option",{value:e,children:e||"(none — server default)"},e))})]})]}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Daemon health"}),(0,a.jsx)(i.$,{variant:"outline",size:"sm",onClick:()=>{k({baseUrl:N.baseUrl})},disabled:!N.baseUrl,children:"Recheck"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["idle"===R.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Set Base URL above to probe."}),"loading"===R.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing…"}),"ok"===R.status&&(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full bg-emerald-500","aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium text-foreground",children:"Reachable"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:eR(R.latencyMs)}),(0,a.jsx)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:eT(R.checkedAt)})]}),"number"==typeof R.sessions&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:["Active sessions: ",(0,a.jsx)("span",{className:"font-mono text-foreground",children:R.sessions})]})]}),"error"===R.status&&(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full bg-rose-500","aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium text-rose-600 dark:text-rose-400",children:"Unreachable"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:eR(R.latencyMs)}),(0,a.jsx)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:eT(R.checkedAt)})]}),(0,a.jsx)("p",{className:"break-all font-mono text-[11px] text-muted-foreground",children:R.error}),(0,a.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["Verify Base URL \xb7 daemon running (",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"elanous serve --status"}),") \xb7 network reachable from this device."]})]})]})]}),(0,a.jsx)("div",{id:"tools",className:"scroll-mt-8","aria-hidden":!0}),("ok"===D.status||"error"===D.status)&&(0,a.jsxs)("section",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"LLM tool surface"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["ok"===D.status&&"none"===D.kind&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Tools 미설정 — `elanous serve --tools readonly` 또는 `webterm` 으로 활성화."}),"ok"===D.status&&D.kind&&"none"!==D.kind&&(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full ".concat("webterm"===D.kind?"bg-amber-500":"bg-emerald-500"),"aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium text-foreground",children:"kind:"}),(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono",children:D.kind}),"webterm"===D.kind&&(0,a.jsx)("span",{className:"text-[10px] text-amber-600 dark:text-amber-400",children:"(write-capable)"})]}),D.specs&&D.specs.length>0&&(0,a.jsx)("ul",{className:"flex flex-wrap gap-1",children:D.specs.map(e=>(0,a.jsx)("li",{title:e.description,className:"rounded border border-border bg-muted/50 px-1.5 py-0.5 font-mono text-[10px]",children:e.name},e.name))})]}),"error"===D.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"tool surface 조회 실패"})," \xb7 ",D.error]})]})]}),("ok"===O.status||"error"===O.status)&&(0,a.jsxs)("section",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Auth trace"}),(0,a.jsx)(i.$,{variant:"outline",size:"sm",onClick:()=>W(e=>e+1),children:"Refresh"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["error"===O.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"auth-trace 조회 실패"})," \xb7 ",O.error]}),"ok"===O.status&&(null!=(b=null==(e=O.entries)?void 0:e.length)?b:0)===0&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"아직 auth 결정 없음. /v1/* 호출이 한 번도 없었다는 뜻."}),"ok"===O.status&&O.entries&&O.entries.length>0&&(0,a.jsx)("div",{className:"max-h-64 overflow-auto font-mono text-[10px]",children:(0,a.jsxs)("table",{className:"w-full",children:[(0,a.jsx)("thead",{className:"sticky top-0 bg-card text-muted-foreground",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-1 text-left",children:"time"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"path"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"ok"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"reason"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"sfs"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"origin"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"host"})]})}),(0,a.jsx)("tbody",{children:O.entries.slice().reverse().slice(0,30).map((e,t)=>{var s,r,n;return(0,a.jsxs)("tr",{className:"border-t border-border/50",children:[(0,a.jsx)("td",{className:"px-1 whitespace-nowrap",children:new Date(e.ts).toLocaleTimeString()}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[120px]",children:e.path}),(0,a.jsx)("td",{className:"px-1 ".concat(e.ok?"text-emerald-500":"text-rose-500"),children:e.ok?"Y":"N"}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[140px]",children:e.reason}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[80px]",children:null!=(s=e.sfs)?s:"∅"}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[140px]",children:null!=(r=e.origin)?r:"∅"}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[140px]",children:null!=(n=e.host)?n:"∅"})]},"".concat(e.ts,"-").concat(t))})})]})})]})]}),C&&"webterm"===D.kind&&(0,a.jsxs)("section",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Last screenshot"}),(0,a.jsx)(i.$,{variant:"outline",size:"sm",onClick:()=>X(e=>e+1),disabled:"loading"===_.status||!N.baseUrl,children:"Refresh"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["loading"===_.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing…"}),"none"===_.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:["아직 agent 가 screenshot 을 호출한 적 없음. ",(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"WebTerminalScreenshot"})," tool 실행 후 Refresh."]}),"ok"===_.status&&_.objectUrl&&(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("p",{className:"text-muted-foreground",children:["Most recent ",(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"tool_result"})," image in this session."]}),(0,a.jsx)("img",{src:_.objectUrl,alt:"Last screenshot",className:"max-w-full rounded border border-border bg-black"})]}),"error"===_.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"screenshot 조회 실패"})," \xb7 ",_.error]})]})]}),("idle"!==J.status||"ok"===R.status)&&(0,a.jsxs)("section",{className:"space-y-3","data-testid":"pushcut-section",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Pushcut webhook"}),(0,a.jsx)(i.$,{variant:"outline",size:"sm",onClick:eE,disabled:"loading"===J.status||!N.baseUrl,"data-testid":"pushcut-refresh",children:"Refresh"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-3",children:["loading"===J.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing…"}),"nexus-missing"===J.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:["NEXUS endpoints not reachable. ",(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"elanous nexus"})," 로 띄우면 secret + binding 관리가 활성됩니다.",(0,a.jsxs)("span",{className:"block mt-1 text-[10px]",children:["(현재 daemon 만 단독 실행 중인 경우 — 본 섹션은 NEXUS HTTP 의 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"/v1/registry/bindings"})," + ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"/v1/config/secrets"})," 의존)"]})]}),"error"===J.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"조회 실패"})," \xb7 ",J.error]}),("ok"===J.status||J.secretRef)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"font-medium",children:"HMAC secret"}),(0,a.jsx)(i.$,{size:"sm",variant:"outline",onClick:()=>{eP()},disabled:eA||!N.baseUrl,"data-testid":"pushcut-rotate-secret",children:eA?"Rotating…":"Rotate"})]}),J.secretRef&&(0,a.jsxs)("p",{className:"font-mono text-[10px] text-muted-foreground",children:["ref: ",(0,a.jsx)("span",{className:"text-foreground",children:J.secretRef})," \xb7 id: ",(0,a.jsx)("span",{className:"text-foreground",children:c})]}),J.pendingSecretValue&&(0,a.jsxs)("div",{className:"rounded border border-amber-300 bg-amber-50 px-2 py-1.5 dark:border-amber-700 dark:bg-amber-950",children:[(0,a.jsx)("p",{className:"text-[10px] font-semibold text-amber-700 dark:text-amber-200",children:"Copy now — only shown once"}),(0,a.jsx)("code",{className:"block break-all font-mono text-[11px] text-amber-900 dark:text-amber-100 select-all","data-testid":"pushcut-secret-value",children:J.pendingSecretValue}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-amber-700 dark:text-amber-300",children:["Paste into iPhone “elanous-camera” Pushcut Shortcut Header ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"X-Pushcut-Sig"})," recipe."]})]})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"font-medium",children:"Bindings (token → session)"}),(0,a.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[null!=(f=null==(t=J.bindings)?void 0:t.length)?f:0," active"]})]}),(null!=(g=null==(s=J.bindings)?void 0:s.length)?g:0)===0&&"ok"===J.status&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"No bindings yet. Add one below — the daemon will route Pushcut webhooks for that token to the chosen session."}),J.bindings&&J.bindings.length>0&&(0,a.jsx)("ul",{className:"space-y-1","data-testid":"pushcut-bindings-list",children:J.bindings.map(e=>{var t,s;return(0,a.jsxs)("li",{className:"flex items-center gap-2 rounded border border-border bg-muted/30 px-2 py-1",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 space-y-0.5",children:[(0,a.jsx)("div",{className:"font-mono text-[11px] font-medium truncate",children:null!=(t=e.label)?t:"(no label)"}),(0,a.jsxs)("div",{className:"font-mono text-[10px] text-muted-foreground truncate",children:["token: ",e.key.length>16?"".concat(e.key.slice(0,8),"…").concat(e.key.slice(-4)):e.key]}),(0,a.jsxs)("div",{className:"font-mono text-[10px] text-muted-foreground truncate",children:["session: ",null!=(s=e.sessionId)?s:"(unset)"]})]}),(0,a.jsx)(i.$,{size:"sm",variant:"outline",onClick:()=>{eI(e.key)},disabled:eS===e.key,"data-testid":"pushcut-delete-".concat(e.key),children:eS===e.key?"Deleting…":"Delete"})]},e.key)})}),(0,a.jsxs)("div",{className:"space-y-1.5 rounded border border-dashed border-border p-2 mt-2",children:[(0,a.jsx)("p",{className:"text-[10px] font-medium text-muted-foreground",children:"Add binding"}),(0,a.jsx)(d.p,{value:ev,placeholder:"token (webhook URL key)",onChange:e=>ej(e.target.value),"data-testid":"pushcut-add-token",className:"text-[11px]"}),(0,a.jsx)(d.p,{value:ey,placeholder:C?"sessionId (default: ".concat(C.slice(0,12),"…)"):"sessionId",onChange:e=>eN(e.target.value),"data-testid":"pushcut-add-session",className:"text-[11px]"}),(0,a.jsx)(d.p,{value:ek,placeholder:"label (e.g. iPhone 15)",onChange:e=>ew(e.target.value),"data-testid":"pushcut-add-label",className:"text-[11px]"}),(0,a.jsx)(i.$,{size:"sm",onClick:()=>{eL()},disabled:"__new__"===eS||!ev.trim(),"data-testid":"pushcut-add-submit",children:"__new__"===eS?"Saving…":"Add"})]})]})]})]}),(0,a.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Channel: ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:u})," \xb7 powered by NEXUS subsystem registry (PR τ #1698) + secret backend (PR σ #1696). Webhook receiver lands in a follow-up daemon-side PR."]})]}),(0,a.jsx)("div",{id:"ios",className:"scroll-mt-8","aria-hidden":!0}),en.supported&&(0,a.jsxs)("section",{className:"space-y-3","data-testid":"webpush-section",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Notifications"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full ".concat(en.cachedId?"bg-emerald-500":"denied"===en.permission?"bg-rose-500":"bg-muted-foreground"),"aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium",children:en.cachedId?"Subscribed":"denied"===en.permission?"Permission denied":"Not subscribed"}),en.cachedLabel&&(0,a.jsx)("span",{className:"ml-auto font-mono text-[10px] text-muted-foreground",children:en.cachedLabel})]}),"denied"===en.permission&&(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground",children:"Browser/iOS denied notification permission. Enable in Settings → Safari → Notifications, then reload."}),ec&&(0,a.jsx)("p",{className:"text-[10px] text-rose-500 break-all","data-testid":"webpush-error",children:ec}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[!en.cachedId&&(0,a.jsx)(i.$,{size:"sm",onClick:()=>{eh()},disabled:ed||!N.baseUrl||"denied"===en.permission,"data-testid":"webpush-enable",children:ed?"Enabling…":"Enable notifications"}),en.cachedId&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.$,{size:"sm",variant:"outline",onClick:()=>{eb()},disabled:ed,"data-testid":"webpush-disable",children:ed?"Disabling…":"Disable"}),(0,a.jsx)(i.$,{size:"sm",variant:"outline",onClick:()=>{eg()},disabled:ed||!N.baseUrl,"data-testid":"webpush-test",children:"Send test"})]})]}),(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground",children:"Push 알림은 PWA 가 닫혀 있어도 도착합니다 — agent turn 완료 \xb7 녹화 종료 등. iOS 16.4+ home-screen installed PWA 만 작동 (Pushcut 가 fallback)."})]})]}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Session"}),(0,a.jsx)("div",{className:"rounded-md border border-border bg-card px-3 py-2 font-mono text-xs",children:C||"(no session yet)"}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["A new session id is allocated on first load. Use Chat’s",(0,a.jsx)("code",{className:"mx-1 rounded bg-muted px-1.5 py-0.5",children:":fork"}),"meta-command to start fresh once U-3 ships."]})]}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Theme"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:l.z.map(e=>(0,a.jsx)(i.$,{variant:e===E?"default":"outline",size:"sm",onClick:()=>z(e),children:e},e))})]}),(0,a.jsx)(eK,{}),(0,a.jsx)(L,{}),(0,a.jsx)(I,{}),(0,a.jsx)(e1,{}),(0,a.jsx)(eJ,{}),(0,a.jsx)(i.$,{onClick:()=>o.oR.success("Settings saved"),children:"Saved"})]})}},8666:(e,t,s)=>{s.d(t,{AF:()=>a});let a={all:["nexus"],health:()=>[...a.all,"health"],snapshot:()=>[...a.all,"snapshot"],tabs:e=>e?[...a.all,"tabs",{kind:e}]:[...a.all,"tabs"],tab:e=>[...a.all,"tab",e],templates:()=>[...a.all,"templates"],template:e=>[...a.all,"template",e],config:()=>[...a.all,"config"],switches:()=>[...a.all,"switches"],switch:e=>[...a.all,"switch",e],secrets:()=>[...a.all,"secrets"],bindingChannels:()=>[...a.all,"bindings","channels"],bindings:e=>[...a.all,"bindings",e],binding:(e,t)=>[...a.all,"binding",e,t],logsTail:(e,t)=>t?[...a.all,"logs",e,{lines:t}]:[...a.all,"logs",e],workflows:()=>[...a.all,"workflows"],workflow:e=>[...a.all,"workflow",e],workflowRun:e=>[...a.all,"workflow-run",e],workflowRuns:()=>[...a.all,"workflow-runs"],pendingApprovals:()=>[...a.all,"workflow-pending-approvals"],platforms:()=>[...a.all,"platforms"],providers:()=>[...a.all,"providers"],worktrees:()=>[...a.all,"worktrees"],designCheck:()=>[...a.all,"design-check"],designPreviews:()=>[...a.all,"design-previews"],designPreview:e=>[...a.all,"design-preview",e],registryCatalog:()=>[...a.all,"registry-catalog"],resolvedView:()=>[...a.all,"resolved-view"]};a.snapshot(),a.tabs(),a.health(),a.snapshot(),a.config(),a.switches()},19961:(e,t,s)=>{s.d(t,{X:()=>i});var a=s(77947);let r=null,n=[],l=[];function i(e){let[t,s]=(0,a.useState)(()=>r&&Date.now()-r.at<3e5?r.providers:n),[i,d]=(0,a.useState)(()=>r&&Date.now()-r.at<3e5?r.models:l),[o,c]=(0,a.useState)(!1),[u,m]=(0,a.useState)(null),x=(0,a.useCallback)(async()=>{c(!0),m(null);try{let t=await e.getRegistryCatalog(),a=t.providers.map(e=>({id:e.id,displayName:e.displayName,aliases:e.aliases,modelPrefixes:e.modelPrefixes,apiKeyEnv:e.apiKeyEnv,endpointPattern:e.endpointPattern,capabilities:e.capabilities,builtIn:e.builtIn})),n=t.models.map(e=>({id:e.id,provider:e.provider,displayName:e.displayName,...void 0!==e.family?{family:e.family}:{},...void 0!==e.familyShortcut?{familyShortcut:e.familyShortcut}:{},...void 0!==e.contextSize?{contextSize:e.contextSize}:{},...void 0!==e.outputMaxTokens?{outputMaxTokens:e.outputMaxTokens}:{},...void 0!==e.vision?{vision:e.vision}:{},...void 0!==e.reasoning?{reasoning:e.reasoning}:{},...void 0!==e.toolCalling?{toolCalling:e.toolCalling}:{},...void 0!==e.pricing?{pricing:e.pricing}:{},...void 0!==e.deprecated?{deprecated:e.deprecated}:{},...void 0!==e.releaseDate?{releaseDate:e.releaseDate}:{},...void 0!==e.kind?{kind:e.kind}:{}}));r={at:Date.now(),providers:a,models:n},s(a),d(n)}catch(e){m(e instanceof Error?e.message:String(e))}finally{c(!1)}},[e]);(0,a.useEffect)(()=>{if(r&&Date.now()-r.at<3e5){s(r.providers),d(r.models);return}x()},[x]);let h=(0,a.useCallback)(async()=>{r=null,await x()},[x]),p=(0,a.useMemo)(()=>t.map(e=>e.id),[t]),b=(0,a.useMemo)(()=>{let e=new Map;for(let t of i){let s=e.get(t.provider);s?s.push(t):e.set(t.provider,[t])}return t=>{var s;return t?null!=(s=e.get(t))?s:[]:i}},[i]);return{providers:t,providerIds:p,models:i,modelsByProvider:b,loading:o,error:u,reload:h}}},26253:(e,t,s)=>{s.d(t,{vm:()=>U,f4:()=>C,OE:()=>A,Ue:()=>M,Ye:()=>S});var a=s(58002),r=s(8917),n=s(55396),l=s(52978),i=s(32531),d=s(28817),o=s(99888),c=s(69495),u=s(69636),m=s(11284),x=s(85627),h=s(23321),p=s(83528),b=s(69427),f=s(21625),g=s(36501),v=s(46729),j=s(19875),y=s(95711),N=s(13581),k=s(73816),w=s(33499);function S(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"owner",a=e=>{var t;return null!=(t=e.visibility)?t:"public"},r=e.filter(e=>(0,w.EX)(s,e.href));return{main:r.filter(e=>"public"===a(e)),labs:t.showLabs?r.filter(e=>"labs"===a(e)):[],hidden:t.showHidden?r.filter(e=>"hidden"===a(e)):[]}}let C="elanous.nav.showLabs",U="elanous.nav.showHidden",A=[{href:"/share",category:"system-share-target",reason:"운영체제가 공유 동작으로 호출하는 Share Target 진입점."},{href:"/missions",category:"dynamic-route-parent",reason:"`[id]`를 받는 동적 주소이며 부모 경로 자체는 없다."},{href:"/setup",category:"provider-onboarding",reason:"LLM provider 온보딩 진입점."},{href:"/setup/done",category:"provider-onboarding-complete",reason:"LLM provider 온보딩 완료 화면."},{href:"/settings/devices",category:"settings-subpage",reason:"Settings 아래 Device fleet 하위 화면."},{href:"/workflows",category:"workflow-legacy-redirect",reason:"기존 워크플로 링크를 /editor?mode=workflow 로 전달한다."},{href:"/workflows/chat-ui",category:"workflow-subflow",reason:"Workflows에서 여는 hosted chat 하위 흐름."},{href:"/",category:"root-welcome",reason:"첫 방문자를 위한 루트 welcome 화면."},{href:"/404",category:"error-page",reason:"오류 페이지."},{href:"/morning",category:"unwired-screen",reason:"부르는 백엔드가 아직 없는 미배선 화면."},{href:"/botlab",category:"diagnostic-readonly",reason:"봇 화면 \xab벽\xbb을 한 자리에서 보는 읽기 진단 화면(#15390 \xb7 봇 운영자용)."}],M=[{href:"/term",label:"Terminal",hint:"터미널 + agent dock",icon:a.A,kind:"term"},{href:"/chat",label:"Chat",hint:"채팅 (스트리밍 \xb7 multimodal \xb7 mic)",icon:r.A,kind:"chat"},{href:"/intake",label:"Intake",hint:"넣으면 흡수 \xb7 작업 \xb7 그래프로 (URL \xb7 미션 \xb7 메모)",icon:n.A,kind:null},{href:"/approvals",label:"Approvals",hint:"아이디어 PR 요약 \xb7 승인하고 머지",icon:l.A,kind:null},{href:"/showroom",label:"Showroom",hint:"multi-agent 동시 비교 (broadcast \xb7 CV-3)",icon:i.A,kind:null,visibility:"labs"},{href:"/live",label:"Live",hint:"런이 판단\xb7기획하는 신호 (진짜 수 \xb7 쇼 모드)",icon:d.A,kind:null},{href:"/trace",label:"Trace",hint:"렌즈를 좁혀 런을 따라간다 (플릿 → 런 → 판단)",icon:o.A,kind:null},{href:"/bots",label:"Bots",hint:"봇 신원 + 공통 명령 카탈로그 (읽기 전용)",icon:c.A,kind:null,visibility:"hidden"},{href:"/observatory",label:"Observatory",hint:"subject 관측 (talk \xb7 screen \xb7 agent)",icon:u.A,kind:null,visibility:"hidden"},{href:"/autopilot",label:"Missions",hint:"미션 \xb7 작업 (미션 계보\xb7골 던지기\xb7작업 보드\xb7자율행동)",icon:m.A,kind:null,activeAlso:["/tasks","/missions"]},{href:"/tasks",label:"Tasks",hint:"작업 보드 (Missions 안 ② 작업)",icon:x.A,kind:"tasks",visibility:"hidden"},{href:"/board",label:"보드",hint:"태스크 카드 흐름 (스튜어드 → 실행 → 착지 → 릴리스)",icon:x.A,kind:null,visibility:"labs"},{href:"/design-check",label:"Design",hint:"디자인 시스템 고르기 \xb7 시안 \xb7 URL 로 내 시스템",icon:h.A,kind:null},{href:"/vault",label:"Vault",hint:"Obsidian 노트 (브라우저\xb7에디터\xb7검색\xb7그래프)",icon:p.A,kind:null},{href:"/market",label:"마켓",hint:"플러그인 찾아보기 \xb7 상세 \xb7 설치됨",icon:b.A,kind:null},{href:"/scheduler",label:"Schedules",hint:"예약 잡 종합 현황 (크론\xb7데몬\xb7launchd)",icon:f.A,kind:null},{href:"/sessions",label:"Sessions",hint:"세션 카드 데크 (스와이프 결정)",icon:g.A,kind:null,visibility:"hidden"},{href:"/reflection",label:"Reflection",hint:"오늘의 회고 (5분 갱신)",icon:v.A,kind:null,visibility:"hidden"},{href:"/editor",label:"편집기",hint:"워크플로 \xb7 실행 그래프 작성\xb7편집",icon:j.A,kind:null,visibility:"labs",activeAlso:["/workflows"]},{href:"/worktrees",label:"Worktrees",hint:"격리 작업 트리 목록\xb7상태",icon:j.A,kind:null,visibility:"hidden"},{href:"/control",label:"Control",hint:"데몬 제어 패널",icon:y.A,kind:"control",visibility:"hidden"},{href:"/settings",label:"Settings",hint:"환경 + provider + theme",icon:N.A,kind:"settings"},{href:"/workspace",label:"Workspace",hint:"여러 탭 동시 보기",icon:k.A,kind:null,visibility:"labs"}]},26958:(e,t,s)=>{s.d(t,{W:()=>o});var a=s(58443),r=s(77947),n=s(19990),l=s(65534),i=s(62866);let d=["telegram","discord"];function o(){let{client:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,i.Qj)(),s=null!=e?e:t,[o,c]=(0,r.useState)([]),[u,m]=(0,r.useState)({}),[x,h]=(0,r.useState)({}),[p,b]=(0,r.useState)({}),[f,g]=(0,r.useState)(null),[v,j]=(0,r.useState)({}),[y,N]=(0,r.useState)("");(0,r.useEffect)(()=>{if(!s)return;let e=!1;return s.getChannelBots().then(t=>{let{platforms:s}=t;e||(c(s),h(e=>{let t={...e};for(let e of s)Object.hasOwn(t,e.platform)||(t[e.platform]=e.allowedUsers.join(", "));return t}))}).catch(()=>{e||N("봇 상태를 불러오지 못했습니다.")}),()=>{e=!0}},[s]);let k=async e=>{var t;if(!s)return;g(e),N("");let a=null==(t=u[e])?void 0:t.trim(),r=Object.hasOwn(x,e)?x[e].split(",").map(e=>e.trim()).filter(Boolean):void 0;m(t=>({...t,[e]:""}));try{let t=await s.setChannelBot({platform:e,...a?{token:a}:{},...void 0!==r?{allowedUsers:r}:{}});t.botName&&b(s=>({...s,[e]:t.botName})),j(s=>({...s,[e]:t.restartNeeded}));try{let e=await s.getChannelBots();c(e.platforms)}catch(e){N("저장됐지만 봇 상태를 다시 불러오지 못했습니다.")}}catch(t){N("".concat(e," 저장에 실패했습니다. 토큰과 허용 사용자 ID를 확인하세요."))}finally{g(null)}};return s?(0,a.jsxs)("section",{className:"space-y-4 rounded border border-border bg-card p-4","data-testid":"channel-bot-setup-card",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold",children:"봇 연결"}),d.map(e=>{var t,s;let r=o.find(t=>t.platform===e);return(0,a.jsxs)("div",{className:"space-y-2 border-t border-border pt-3",children:[(0,a.jsx)("h3",{className:"text-sm font-medium capitalize",children:e}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:(null==r?void 0:r.configured)?"연결됨 (".concat(r.source,")"):"미연결"}),p[e]&&(0,a.jsxs)("p",{className:"text-xs",children:["봇 이름: ",p[e]]}),(0,a.jsx)("label",{htmlFor:"".concat(e,"-bot-token"),className:"block text-xs",children:"봇 토큰"}),(0,a.jsx)(l.p,{id:"".concat(e,"-bot-token"),type:"password",autoComplete:"off",value:null!=(t=u[e])?t:"",onChange:t=>m(s=>({...s,[e]:t.target.value}))}),(0,a.jsx)("label",{htmlFor:"".concat(e,"-allowed-users"),className:"block text-xs",children:"허용 사용자 ID (쉼표로 구분)"}),(0,a.jsx)(l.p,{id:"".concat(e,"-allowed-users"),value:null!=(s=x[e])?s:"",onChange:t=>h(s=>({...s,[e]:t.target.value}))}),(0,a.jsx)(n.$,{type:"button",size:"sm",disabled:null!==f,onClick:()=>void k(e),children:"확인하고 저장"}),v[e]&&(0,a.jsx)("p",{role:"status",className:"text-xs",children:"봇을 재시작해야 반영됩니다"})]},e)}),y&&(0,a.jsx)("p",{role:"alert",className:"text-xs text-destructive",children:y})]}):null}},31550:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(51719).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},32736:(e,t,s)=>{s.d(t,{D:()=>h,ThemeProvider:()=>x,z:()=>i});var a=s(58443),r=s(77947),n=s(23783),l=s(62866);let i=["catppuccin-mocha","mocha-pastel-accent","catppuccin-latte","rose-pine-dawn","nord-light","elanous-pastel-default"],d="elanous.pwa.theme",o="dashboard.theme.active",c="catppuccin-mocha";function u(e){return"string"==typeof e&&i.includes(e)}let m=(0,r.createContext)(null);function x(e){let{children:t}=e,s=(0,l.Qj)(),[x,h]=(0,r.useState)(c),p=(0,r.useRef)(0),b=(0,r.useCallback)(e=>{h(e),document.documentElement.dataset.theme=e},[]);(0,r.useEffect)(()=>{let e=localStorage.getItem(d),t=u(e)?e:c;b(t),(0,n.cY)("webterm.provider.theme.init",{theme:t})},[b]),(0,r.useEffect)(()=>{if(!s)return;let e=!0,t=p.current;return s.getSwitch(o).then(s=>{let{switch:a}=s;e&&t===p.current&&u(a.value)&&(b(a.value),localStorage.setItem(d,a.value))}).catch(()=>void 0),()=>{e=!1}},[b,s]);let f=(0,r.useCallback)(e=>{u(e)&&(p.current+=1,b(e),localStorage.setItem(d,e),(0,n.cY)("webterm.provider.theme.set",{theme:e}),null==s||s.putSwitch(o,{value:e}).catch(()=>void 0))},[b,s]);return(0,a.jsx)(m.Provider,{value:{theme:x,setTheme:f,themes:i},children:t})}function h(){let e=(0,r.useContext)(m);if(!e)throw Error("useTheme must be used inside <ThemeProvider>");return e}},33499:(e,t,s)=>{s.d(t,{EX:()=>n,dY:()=>r});let a={"/":"stable","/404":"stable","/setup":"stable","/setup/done":"stable","/chat":"stable","/term":"stable","/live":"stable","/market":"stable","/sessions":"stable","/settings":"beta","/editor":"beta","/intake":"beta","/trace":"beta","/board":"beta","/autopilot":"beta","/missions/[id]":"beta","/tasks":"beta","/workspace":"beta","/reflection":"beta","/vault":"beta","/observatory":"beta","/showroom":"beta","/workflows":"beta","/approvals":"tool","/worktrees":"tool","/design-check":"tool","/control":"tool","/scheduler":"ops","/dashboard":"ops","/bots":"ops","/botlab":"ops","/morning":"broken","/settings/devices":"broken","/workflows/chat-ui":"broken","/share":"system"};function r(e){var t;let s=(null==(t=e.split(/[?#]/,1)[0])?void 0:t.replace(/\/+$/,""))||"/";return Object.prototype.hasOwnProperty.call(a,s)?a[s]:s.startsWith("/missions/")&&-1===s.slice(10).indexOf("/")?a["/missions/[id]"]:void 0}function n(e,t){var s;let a=r(t);return!!a&&("owner"===e||"system"!==a&&((null==(s=t.split(/[?#]/,1)[0])?void 0:s.replace(/\/+$/,""))==="/settings"||"stable"===a||"contributor"===e&&("beta"===a||"tool"===a)))}},78413:(e,t,s)=>{s.d(t,{MQ:()=>n,OY:()=>a,fG:()=>r});let a="elanous:nav-prefs";function r(e){try{return"1"===window.localStorage.getItem(e)}catch(e){return!1}}function n(e,t){try{t?window.localStorage.setItem(e,"1"):window.localStorage.removeItem(e)}catch(e){}try{window.dispatchEvent(new Event(a))}catch(e){}}},88670:(e,t,s)=>{s.d(t,{Q:()=>c});var a=s(58443),r=s(77947),n=s(19990),l=s(65534),i=s(62866),d=s(75391);function o(e){if(e instanceof d.Iu&&e.body&&"object"==typeof e.body){var t;let s=e.body;return[null!=(t=s.reason)?t:s.error,s.path].filter(Boolean).join(": ")}return e instanceof Error?e.message:String(e)}function c(){let e=(0,i.Qj)(),[t,s]=(0,r.useState)(!1),[d,c]=(0,r.useState)(null),[u,m]=(0,r.useState)({vault:"",selection:"custom",dirs:""}),{vault:x,selection:h,dirs:p}=u,[b,f]=(0,r.useState)(!0),[g,v]=(0,r.useState)(!1),[j,y]=(0,r.useState)(""),[N,k]=(0,r.useState)(""),[w,S]=(0,r.useState)("");(0,r.useEffect)(()=>{s(!0)},[]);let C=(0,r.useCallback)(async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all";if(e){f(!0);try{let s=await e.getObsidianSkills();c(s),m(e=>({vault:"skills"===t?e.vault:s.obsidian.vault,selection:"vault"===t?e.selection:s.skills.activeSet,dirs:"vault"===t?e.dirs:s.skills.dirs.join("\n")})),y("")}catch(e){y(o(e))}finally{f(!1)}}},[e]);(0,r.useEffect)(()=>{t&&e&&C()},[t,e,C]);let U=async()=>{if(e){v(!0),k("");try{var t;let s=await e.setObsidian({vault:x.trim()});await C("vault"),k(null!=(t=s.warning)?t:"Vault saved.")}catch(e){k(o(e))}finally{v(!1)}}},A=async()=>{if(e){v(!0),S("");try{await e.setSkills("custom"===h?{dirs:p.split("\n").map(e=>e.trim()).filter(Boolean)}:{activeSet:h}),await C("skills"),S("Skills saved.")}catch(e){S(o(e))}finally{v(!1)}}};return t&&e?(0,a.jsxs)("section",{className:"space-y-4 rounded border border-border bg-card p-4","data-testid":"obsidian-skills-card",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold",children:"Obsidian & Skills"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Choose directories on the machine running NEXUS."})]}),(0,a.jsx)(n.$,{size:"sm",variant:"outline",onClick:()=>void C("all"),disabled:b||g,children:"Refresh"})]}),b&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Loading paths…"}),j&&(0,a.jsx)("p",{role:"alert",className:"text-xs text-destructive",children:j}),d&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:"obsidian-vault",className:"text-sm font-medium",children:"Obsidian vault path"}),(0,a.jsx)(l.p,{id:"obsidian-vault",value:x,onChange:e=>{m(t=>({...t,vault:e.target.value})),k("")},placeholder:"/absolute/path/to/vault"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"vault-validation",children:x===d.obsidian.vault?d.obsidian.looksLikeVault?"Vault found (.obsidian detected)":d.obsidian.exists?"Directory found; .obsidian not detected":"Directory not found":"Save to validate this path on the NEXUS host."}),(0,a.jsx)(n.$,{size:"sm",onClick:()=>void U(),disabled:g||!x.trim(),children:"Save vault"}),N&&(0,a.jsx)("p",{role:"status",className:"text-xs","data-testid":"vault-feedback",children:N})]}),(0,a.jsxs)("div",{className:"space-y-2 border-t border-border pt-3",children:[(0,a.jsx)("label",{htmlFor:"skills-preset",className:"text-sm font-medium",children:"Skills source"}),(0,a.jsxs)("select",{id:"skills-preset",value:h,onChange:e=>{m(t=>({...t,selection:e.target.value})),S("")},className:"flex h-9 w-full rounded-md border border-input bg-background px-3 text-sm",children:[d.skills.presets.map(e=>{var t;return(0,a.jsxs)("option",{value:e.key,children:[e.label," — ",null!=(t=e.dir)?t:"(no path)"," ",e.exists?"✓":"(missing)"]},e.key)}),(0,a.jsx)("option",{value:"custom",children:"Custom directories"})]}),"custom"===h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("label",{htmlFor:"skills-dirs",className:"block text-xs text-muted-foreground",children:"One absolute directory per line"}),(0,a.jsx)("textarea",{id:"skills-dirs",value:p,onChange:e=>{m(t=>({...t,dirs:e.target.value})),S("")},rows:3,className:"w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-xs",placeholder:"/absolute/path/to/skills"})]}),(0,a.jsx)(n.$,{size:"sm",onClick:()=>void A(),disabled:g,children:"Save skills"}),w&&(0,a.jsx)("p",{role:"status",className:"text-xs","data-testid":"skills-feedback",children:w})]})]})]}):null}},95512:(e,t,s)=>{s.d(t,{GZ:()=>i,_n:()=>u,gu:()=>o,mB:()=>d,sY:()=>c,u9:()=>m});let a="elanous.showroom.intentPanel.collapsed",r="elanous.showroom.intentPanel.displayMode",n="fixed",l=new Set(["fixed","popup","off"]);function i(){try{return"true"===window.localStorage.getItem(a)}catch(e){return!1}}function d(e){try{e?window.localStorage.setItem(a,"true"):window.localStorage.removeItem(a),window.dispatchEvent(new StorageEvent("storage",{key:a,newValue:e?"true":null}))}catch(e){}}function o(e){let t=t=>{(t.key===a||null===t.key)&&e(i())};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}function c(){try{let e=window.localStorage.getItem(r);if(e&&l.has(e))return e;return n}catch(e){return n}}function u(e){try{e===n?window.localStorage.removeItem(r):window.localStorage.setItem(r,e),window.dispatchEvent(new StorageEvent("storage",{key:r,newValue:e===n?null:e}))}catch(e){}}function m(e){let t=t=>{(t.key===r||null===t.key)&&e(c())};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5348],{38122:(e,r,n)=>{n.d(r,{BX:()=>o});let t=new Map;function o(e,r){var n,o;let l=t.get(e);if(!l){let o;try{o=new EventSource(e)}catch(e){return null==(n=r.onConstructError)||n.call(r,e),()=>{}}let u={source:o,subscribers:new Set};o.onmessage=e=>{var r,n;for(let t of[...u.subscribers])null==(r=(n=t.handlers).onMessage)||r.call(n,e)},o.onerror=e=>{var r,n;for(let t of[...u.subscribers])null==(r=(n=t.handlers).onError)||r.call(n,e)},t.set(e,u),l=u}let u=l,i=[];for(let[e,n]of Object.entries(null!=(o=r.events)?o:{})){let r=e=>{n(e)};u.source.addEventListener(e,r),i.push([e,r])}let a={handlers:r};u.subscribers.add(a);let s=!1;return()=>{if(!s){for(let[e,r]of(s=!0,i))try{u.source.removeEventListener(e,r)}catch(e){}if(u.subscribers.delete(a),0===u.subscribers.size){try{u.source.close()}catch(e){}t.get(e)===u&&t.delete(e)}}}}},72967:(e,r,n)=>{n.d(r,{Ck:()=>E,Ux:()=>h,XL:()=>k,Yk:()=>A,b_:()=>F,hM:()=>p,j3:()=>f,mP:()=>d,oE:()=>v,up:()=>y,uz:()=>b,xd:()=>w,yM:()=>c,zD:()=>g});var t=n(77947),o=n(66328),l=n(79998),u=n(98813),i=n(62866),a=n(8666),s=n(38122);function d(){let e=(0,i.M1)(),r=(0,o.jE)(),n=(0,l.I)({queryKey:a.AF.workflows(),queryFn:()=>e.getWorkflows(),refetchInterval:6e4});return(0,t.useEffect)(()=>{let n=e.workflowsEventsUrl();if(n)return(0,s.BX)(n,{events:{change:()=>{r.invalidateQueries({queryKey:a.AF.workflows()})}}})},[e,r]),n}function f(e){var r;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=(0,i.M1)();return(0,l.I)({queryKey:a.AF.workflow(e),queryFn:()=>t.getWorkflow(e),enabled:null!=(r=n.enabled)?r:e.length>0})}function c(){let e=(0,i.M1)(),r=(0,o.jE)();return(0,u.n)({mutationFn:r=>{let{name:n,body:t}=r;return e.saveWorkflow(n,t)},onSuccess:(e,n)=>{let{name:t}=n;r.invalidateQueries({queryKey:a.AF.workflows()}),r.invalidateQueries({queryKey:a.AF.workflow(t)})}})}function v(){let e=(0,i.M1)(),r=(0,o.jE)();return(0,u.n)({mutationFn:r=>{let{name:n,scope:t}=r;return e.deleteWorkflow(n,t?{scope:t}:void 0)},onSuccess:(e,n)=>{let{name:t}=n;r.invalidateQueries({queryKey:a.AF.workflows()}),r.invalidateQueries({queryKey:a.AF.workflow(t)})}})}function w(){let e=(0,i.M1)();return(0,u.n)({mutationFn:r=>{let{yaml:n,signal:t}=r;return e.validateWorkflow(n,t?{signal:t}:void 0)}})}function y(){let e=(0,i.M1)();return(0,u.n)({mutationFn:r=>e.generateWorkflow(r)})}function p(){let e=(0,i.M1)();return(0,u.n)({mutationFn:r=>e.synthesizeWorkflow(r)})}function k(){let e=(0,i.M1)();return(0,u.n)({mutationFn:r=>{let{name:n,args:t,dryRun:o}=r;return e.runWorkflow(n,t,o?{dryRun:!0}:void 0)}})}function F(){var e;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,i.M1)();return(0,l.I)({queryKey:a.AF.workflowRuns(),queryFn:()=>n.getWorkflowRuns(),enabled:null==(e=r.enabled)||e,refetchInterval:3e4})}function g(){var e;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,i.M1)();return(0,l.I)({queryKey:a.AF.pendingApprovals(),queryFn:()=>n.getPendingApprovals(),enabled:null==(e=r.enabled)||e,refetchInterval:1e3})}function A(){let e=(0,i.M1)(),r=(0,o.jE)();return(0,u.n)({mutationFn:r=>{let{runId:n,response:t}=r;return e.approveRun(n,t?{response:t}:{})},onSuccess:(e,n)=>{let{runId:t}=n;r.invalidateQueries({queryKey:a.AF.pendingApprovals()}),r.invalidateQueries({queryKey:a.AF.workflowRun(t)})}})}function h(){let e=(0,i.M1)(),r=(0,o.jE)();return(0,u.n)({mutationFn:r=>{let{runId:n,reason:t}=r;return e.rejectRun(n,t?{reason:t}:{})},onSuccess:(e,n)=>{let{runId:t}=n;r.invalidateQueries({queryKey:a.AF.pendingApprovals()}),r.invalidateQueries({queryKey:a.AF.workflowRun(t)})}})}function b(e){let r=(0,i.M1)();return(0,l.I)({queryKey:e?a.AF.workflowRun(e):["nexus","workflow-run","__none__"],queryFn:()=>{if(!e)throw Error("runId required");return r.getWorkflowRun(e)},enabled:!!e,refetchInterval:e=>{let r=e.state.data;return r?void 0===r.ok&&3e4:3e4}})}function E(){var e;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,i.M1)(),l=(0,o.jE)(),u=null==(e=r.enabled)||e,s=r.EventSourceImpl;(0,t.useEffect)(()=>{if(u)return function(e,r){var n;let t,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=null!=(n=o.EventSourceImpl)?n:globalThis.EventSource;if(!l)return()=>{};let u="".concat(e,"/v1/events?topics=").concat(encodeURIComponent("workflow."));try{t=new l(u)}catch(e){return()=>{}}let i=e=>{try{var r;let n=JSON.parse(e.data);if("string"==typeof(null==n||null==(r=n.detail)?void 0:r.runId)&&n.detail.runId.length>0)return n.detail.runId}catch(e){}};for(let e of(t.addEventListener("workflow.approval.pending",()=>r.onApprovalPending()),t.addEventListener("workflow.approval.resolved",e=>r.onApprovalResolved(i(e))),["workflow.run.started","workflow.run.node-started","workflow.run.node-skipped","workflow.run.node-done","workflow.run.completed","workflow.run.failed"]))t.addEventListener(e,e=>r.onRunEvent(i(e)));return()=>{try{t.close()}catch(e){}}}(n.baseUrl,{onApprovalPending:()=>l.invalidateQueries({queryKey:a.AF.pendingApprovals()}),onApprovalResolved:e=>{l.invalidateQueries({queryKey:a.AF.pendingApprovals()}),e&&l.invalidateQueries({queryKey:a.AF.workflowRun(e)})},onRunEvent:e=>{l.invalidateQueries({queryKey:a.AF.workflowRuns()}),e&&l.invalidateQueries({queryKey:a.AF.workflowRun(e)})}},s?{EventSourceImpl:s}:{})},[n.baseUrl,u,l,s])}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5391],{75391:(e,t,n)=>{n.d(t,{Iu:()=>s,xX:()=>l});var o=n(41604),r=n(23783);let a="/v1/task-cards";class s extends Error{constructor(e,t,n){super("nexus ".concat(e," on ").concat(t,": ").concat(function(e){try{return JSON.stringify(e)}catch(t){return String(e)}}(n))),this.status=e,this.path=t,this.body=n,this.name="NexusApiError"}}class c extends Error{constructor(e,t){super("NEXUS 가 ".concat(t/1e3,"초 안에 답하지 않았습니다 (").concat(e,") — 방금 켰다면 잠시 뒤 다시 시도하세요.")),this.path=e,this.timeoutMs=t,this.name="NexusTimeoutError"}}function l(e){var t,n;let l=e.baseUrl.replace(/\/$/,""),i=null!=(t=e.fetchImpl)?t:fetch,d=null!=(n=e.timeoutMs)?n:8e3,v=e.token;async function u(e,t,n,r){let a="".concat(l).concat(t);for(let l=0;;l++){let u=d>0||(null==r?void 0:r.signal)?new AbortController:null,p=!1,g=null;if(u&&(null==r?void 0:r.signal)){let e=r.signal;if(e.aborted)u.abort();else{let t=()=>u.abort();e.addEventListener("abort",t),g=()=>e.removeEventListener("abort",t)}}let T=u&&d>0?setTimeout(()=>{u.signal.aborted||(p=!0,u.abort())},d):null;try{let r=await i(a,{method:e,...u?{signal:u.signal}:{},...void 0!==n||v?{headers:{...void 0!==n?{"content-type":"application/json"}:{},...v?{authorization:"Bearer ".concat(v)}:{}}}:{},...void 0!==n?{body:JSON.stringify(n)}:{}});401===r.status&&(0,o.Qb)(t);let c=null;try{c=await r.json()}catch(e){if(!(e instanceof SyntaxError))throw e}if(!r.ok)throw new s(r.status,t,c);return c}catch(n){if(!p||!(n instanceof Error)||"AbortError"!==n.name)throw n;if("GET"!==e||l>0)throw new c(t,d)}finally{null!=T&&clearTimeout(T),null==g||g()}await new Promise((e,t)=>{let n=null==r?void 0:r.signal;if(null==n?void 0:n.aborted)return void t(new DOMException("aborted","AbortError"));let o=()=>{clearTimeout(a),null==n||n.removeEventListener("abort",o),t(new DOMException("aborted","AbortError"))},a=setTimeout(()=>{null==n||n.removeEventListener("abort",o),e()},100);null==n||n.addEventListener("abort",o,{once:!0})})}}async function p(e,t,n){let r="/v1/plugins/install",a=await i("".concat(l).concat(r),{method:"POST",headers:{"content-type":"application/json",...v?{authorization:"Bearer ".concat(v)}:{}},body:JSON.stringify({spec:e,acceptedCapabilities:t})});if(401===a.status&&(0,o.Qb)(r),!a.ok)throw new s(a.status,r,await a.json());if(!a.body)throw Error("설치 진행 정보를 읽을 수 없습니다.");let c=a.body.getReader(),d=new TextDecoder,u="";try{for(;;){let e,{done:t,value:o}=await c.read();if(t)break;for(u+=d.decode(o,{stream:!0});-1!==(e=u.indexOf("\n"));){let t=u.slice(0,e).trim();u=u.slice(e+1),t&&n(t)}}(u+=d.decode()).trim()&&n(u.trim())}finally{c.releaseLock()}}return{baseUrl:l,getHealth:()=>u("GET","/v1/health"),getNexus:()=>u("GET","/v1/nexus"),getTabs:e=>{let t=(null==e?void 0:e.kind)?"?kind=".concat(encodeURIComponent(e.kind)):"";return u("GET","/v1/nexus/tabs".concat(t))},getTab:e=>u("GET","/v1/nexus/tabs/".concat(encodeURIComponent(e))),getTaskCards:()=>u("GET",a),getTaskCard:e=>u("GET","".concat(a,"/").concat(encodeURIComponent(e))),getChatBackendDetection:()=>u("GET","/v1/nexus/chat-backend-detection"),mintConnectToken:()=>u("POST","/v1/nexus/connect-info/mint-token",{}),createTab:e=>u("POST","/v1/nexus/tabs",e),deleteTab:e=>u("DELETE","/v1/nexus/tabs/".concat(encodeURIComponent(e))),patchTab:(e,t)=>u("PATCH","/v1/nexus/tabs/".concat(encodeURIComponent(e)),t),startTab:e=>u("POST","/v1/nexus/tabs/".concat(encodeURIComponent(e),"/start")),stopTab:(e,t)=>{let n=(null==t?void 0:t.graceMs)!==void 0?"?graceMs=".concat(t.graceMs):"";return u("POST","/v1/nexus/tabs/".concat(encodeURIComponent(e),"/stop").concat(n))},restartTab:(e,t)=>{let n=(null==t?void 0:t.graceMs)!==void 0?"?graceMs=".concat(t.graceMs):"";return u("POST","/v1/nexus/tabs/".concat(encodeURIComponent(e),"/restart").concat(n))},getTemplates:()=>u("GET","/v1/nexus/templates"),getTemplate:e=>u("GET","/v1/nexus/templates/".concat(encodeURIComponent(e))),saveTemplate:e=>u("POST","/v1/nexus/templates",e),getPluginsIndex:()=>u("GET","/v1/plugins/index"),getInstalledPlugins:()=>u("GET","/v1/plugins"),refreshPluginMarket:e=>u("POST","/v1/plugins/markets/".concat(encodeURIComponent(e),"/refresh"),{}),installMarketPlugin:p,removeMarketPlugin:e=>u("DELETE","/v1/plugins/".concat(encodeURIComponent(e))),getPluginCredentials:e=>u("GET","/v1/plugins/".concat(encodeURIComponent(e),"/credentials")),putPluginCredentials:(e,t)=>u("PUT","/v1/plugins/".concat(encodeURIComponent(e),"/credentials"),{fields:t}),getRunGraphs:()=>u("GET","/v1/graphs"),getRunGraph:e=>u("GET","/v1/graphs/".concat(encodeURIComponent(e))),getRunGraphYaml:e=>u("GET","/v1/graphs/".concat(encodeURIComponent(e),"/yaml")),putRunGraphYaml:(e,t)=>u("PUT","/v1/graphs/".concat(encodeURIComponent(e),"/yaml"),{yaml:t}),cloneRunGraph:(e,t)=>u("POST","/v1/graphs/".concat(encodeURIComponent(e),"/clone"),{newId:t}),getGraphKinds:e=>u("GET","/v1/graph/kinds?graph=".concat(e)),validateGraph:async(e,t)=>{try{return await u("POST","/v1/graphs/validate",{graph:e,yaml:t})}catch(e){if(e instanceof s&&422===e.status&&e.body&&"object"==typeof e.body&&"ok"in e.body)return e.body;throw e}},getWorkflows:()=>u("GET","/v1/workflows"),getWorkflow:e=>u("GET","/v1/workflows/".concat(encodeURIComponent(e))),saveWorkflow:(e,t)=>u("PUT","/v1/workflows/".concat(encodeURIComponent(e)),t),deleteWorkflow:(e,t)=>{let n=(null==t?void 0:t.scope)?"?scope=".concat(encodeURIComponent(t.scope)):"";return u("DELETE","/v1/workflows/".concat(encodeURIComponent(e)).concat(n))},validateWorkflow:(e,t)=>u("POST","/v1/workflows/validate",{yaml:e},t),generateWorkflow:(e,t)=>u("POST","/v1/workflows/generate",e,t),synthesizeWorkflow:(e,t)=>u("POST","/v1/workflows/synth",e,t),getTriggersSnapshot:e=>u("GET","/v1/triggers",void 0,e),getWorkflowTemplates:e=>u("GET","/v1/workflows/templates",void 0,e),runWorkflow:(e,t,n)=>u("POST","/v1/workflows/".concat(encodeURIComponent(e),"/run"),{arguments:t,...(null==n?void 0:n.dryRun)?{dryRun:!0}:{}}),getWorkflowRun:e=>u("GET","/v1/workflows/runs/".concat(encodeURIComponent(e))),getWorkflowRuns:()=>u("GET","/v1/workflows/runs"),workflowsEventsUrl:()=>l?"".concat(l,"/v1/workflows/events"):null,getPendingApprovals:()=>u("GET","/v1/workflows/runs/pending"),approveRun:(e,t)=>u("POST","/v1/workflows/runs/".concat(encodeURIComponent(e),"/approve"),null!=t?t:{}),rejectRun:(e,t)=>u("POST","/v1/workflows/runs/".concat(encodeURIComponent(e),"/reject"),null!=t?t:{}),getConfig:()=>u("GET","/v1/config"),getSwitches:()=>u("GET","/v1/config/switches"),getSwitch:e=>u("GET","/v1/config/switches/".concat(encodeURIComponent(e))),putSwitch:(e,t)=>u("PUT","/v1/config/switches/".concat(encodeURIComponent(e)),t),postSecret:e=>u("POST","/v1/config/secrets",e),deleteSecret:e=>u("DELETE","/v1/config/secrets/".concat(encodeURIComponent(e))),getSecrets:()=>u("GET","/v1/config/secrets"),getModelTier:()=>u("GET","/v1/config/model-tier"),putModelTier:e=>u("PUT","/v1/config/model-tier",e),getPlatforms:()=>u("GET","/v1/platforms"),getLlmProviders:()=>u("GET","/v1/setup/llm-providers"),setLlmProvider:e=>u("POST","/v1/setup/llm-provider",e),getObsidianSkills:()=>u("GET","/v1/setup/obsidian-skills"),setObsidian:e=>u("POST","/v1/setup/obsidian",e),setSkills:e=>u("POST","/v1/setup/skills",e),getChannelBots:()=>u("GET","/v1/setup/channel-bots"),setChannelBot:e=>u("POST","/v1/setup/channel-bot",e),getChildLlmPreference:()=>u("GET","/v1/setup/child-llm"),setChildLlmPreference:e=>u("POST","/v1/setup/child-llm",e),getAnswerPriority:()=>u("GET","/v1/setup/answer-priority"),setAnswerPriority:e=>u("POST","/v1/setup/answer-priority",{value:e}),getPersonas:()=>u("GET","/v1/personas"),patchPersonaDescription:(e,t)=>u("PATCH","/v1/personas/".concat(encodeURIComponent(e)),{description:t}),getRegistryCatalog:()=>u("GET","/v1/registry/catalog"),getWorktrees:()=>u("GET","/v1/worktrees"),getDesignCheck:()=>u("GET","/v1/design-check"),getHarnessRuns:()=>u("GET","/v1/harness/runs"),getLogs:e=>{let t=new URLSearchParams;for(let[n,o]of Object.entries(e))void 0!==o&&""!==o&&t.set(n,String(o));return u("GET","/v1/logs?".concat(t.toString()))},getLogInstances:()=>u("GET","/v1/logs/instances"),getLiveDetail:()=>u("GET","/v1/live/detail"),getTrace:e=>{let t=new URLSearchParams({level:e.level});return e.runId&&t.set("runId",e.runId),e.store&&t.set("store",e.store),e.limit&&t.set("limit",String(e.limit)),e.kind&&t.set("kind",e.kind),e.q&&t.set("q",e.q),e.from&&t.set("from",new Date(e.from).toISOString()),u("GET","/v1/trace?".concat(t))},getTraceEvidence:e=>u("GET","/v1/trace/evidence/".concat(e)),getLiveShipped:e=>u("GET","/v1/live/shipped?since=".concat(encodeURIComponent(e))),getRunScreen:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60;return u("GET","/v1/harness/run-screen?runId=".concat(encodeURIComponent(e),"&lines=").concat(t))},stopHarness:e=>u("POST","/v1/harness/stop",{spaceId:e}),setLiveDetail:e=>u("POST","/v1/live/detail",e),setDesignDirection:e=>u("POST","/v1/design-direction",{id:e}),createDesignSystem:e=>u("POST","/v1/design-system",e),listDesignPreviews:()=>u("GET","/v1/design-previews"),getDesignPreview:e=>u("GET","/v1/design-previews/".concat(encodeURIComponent(e))),disposeWorktree:e=>u("POST","/v1/worktrees/dispose",e),getLogsTail:(e,t)=>{let n=(null==t?void 0:t.lines)!==void 0?"?lines=".concat(t.lines):"";return u("GET","/v1/nexus/tabs/".concat(encodeURIComponent(e),"/logs").concat(n))},subscribeEvents:e=>{var t,n;let o=null!=(t=e.EventSourceImpl)?t:globalThis.EventSource;if(!o)throw Error("EventSource not available \xb7 pass EventSourceImpl");let a=(null!=(n=e.topics)?n:[]).join(","),s="".concat(l,"/v1/events").concat(a?"?topics=".concat(encodeURIComponent(a)):""),c=new o(s),i=t=>{try{let n=JSON.parse(t.data);e.onEvent(n)}catch(t){var n;null==(n=e.onError)||n.call(e,t)}},d=["nexus.boot","nexus.shutdown","tab.created","tab.up","tab.down","tab.unhealthy","tab.restart","tab.halt","config.changed","workflow.approval.pending","workflow.approval.resolved","workflow.run.started","workflow.run.node-started","workflow.run.node-skipped","workflow.run.node-done","workflow.run.completed","workflow.run.failed","hitl.banner.show","hitl.banner.cancel","intent-prediction.ranking"],v=e.kinds?[...new Set([...d,...e.kinds])]:d;for(let e of(c.addEventListener("message",i),v))c.addEventListener(e,i);return c.addEventListener("error",()=>{var t;try{(0,r.cY)("nexus.sse.error",{url:s,readyState:c.readyState,connectionState:0===c.readyState?"reconnecting":2===c.readyState?"closed":"open"})}catch(e){}null==(t=e.onError)||t.call(e,Error("SSE error"))}),()=>{try{c.close()}catch(e){}}},subscribeLogs:(e,t)=>{var n;let o=null!=(n=t.EventSourceImpl)?n:globalThis.EventSource;if(!o)throw Error("EventSource not available \xb7 pass EventSourceImpl");let a="".concat(l,"/v1/nexus/tabs/").concat(encodeURIComponent(e),"/logs?stream=1"),s=new o(a),c=e=>{try{let n=JSON.parse(e.data);t.onLine(n)}catch(e){var n;null==(n=t.onError)||n.call(t,e)}};return s.addEventListener("message",c),s.addEventListener("log",c),s.addEventListener("error",()=>{var e;try{(0,r.cY)("nexus.sse.error",{url:a,readyState:s.readyState,connectionState:0===s.readyState?"reconnecting":2===s.readyState?"closed":"open"})}catch(e){}null==(e=t.onError)||e.call(t,Error("SSE error"))}),()=>{try{s.close()}catch(e){}}}}}}}]);
|