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
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8677],{19990:(e,t,r)=>{"use strict";r.d(t,{$:()=>i});var n=r(58443),l=r(63326),a=r(69426),s=r(49413);let o=(0,a.F)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function i(e){let{className:t,variant:r="default",size:a="default",...i}=e;return(0,n.jsx)(l.$,{"data-slot":"button",className:(0,s.cn)(o({variant:r,size:a,className:t})),...i})}},49413:(e,t,r)=>{"use strict";r.d(t,{cn:()=>a});var n=r(24477),l=r(80313);function a(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,l.QP)((0,n.$)(t))}},60870:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>w});var n=r(58443),l=r(77947),a=r(34015),s=r(19990),o=r(23744),i=r(87451),c=r(48046),d=r(5082);let u="wikilink:",x={aliasDivider:"|",pageResolver:e=>[e],hrefTemplate:e=>"".concat(u).concat(encodeURIComponent(e))};function m(e){let{markdown:t,onWikilink:r}=e;return(0,n.jsx)("div",{className:"text-sm text-foreground/90",children:(0,n.jsx)(o.oz,{remarkPlugins:[i.A,d.A,[c.A,x]],components:{h1:e=>{let{children:t}=e;return(0,n.jsx)("h1",{className:"mb-3 mt-5 border-b border-border pb-1 text-2xl font-bold",children:t})},h2:e=>{let{children:t}=e;return(0,n.jsx)("h2",{className:"mb-2 mt-5 text-xl font-bold",children:t})},h3:e=>{let{children:t}=e;return(0,n.jsx)("h3",{className:"mb-2 mt-4 text-lg font-semibold",children:t})},h4:e=>{let{children:t}=e;return(0,n.jsx)("h4",{className:"mb-1 mt-3 text-base font-semibold",children:t})},h5:e=>{let{children:t}=e;return(0,n.jsx)("h5",{className:"mb-1 mt-2 text-sm font-semibold text-muted-foreground",children:t})},h6:e=>{let{children:t}=e;return(0,n.jsx)("h6",{className:"mb-1 mt-2 text-xs font-semibold uppercase text-muted-foreground",children:t})},p:e=>{let{children:t}=e;return(0,n.jsx)("p",{className:"my-2 leading-relaxed",children:t})},ul:e=>{let{children:t}=e;return(0,n.jsx)("ul",{className:"my-2 list-disc space-y-1 pl-6",children:t})},ol:e=>{let{children:t}=e;return(0,n.jsx)("ol",{className:"my-2 list-decimal space-y-1 pl-6",children:t})},li:e=>{let{children:t}=e;return(0,n.jsx)("li",{className:"leading-relaxed",children:t})},blockquote:e=>{let{children:t}=e;return(0,n.jsx)("blockquote",{className:"my-3 border-l-4 border-primary/40 bg-muted/40 py-1 pl-3 text-muted-foreground",children:t})},hr:()=>(0,n.jsx)("hr",{className:"my-4 border-border"}),table:e=>{let{children:t}=e;return(0,n.jsx)("div",{className:"my-3 overflow-x-auto",children:(0,n.jsx)("table",{className:"w-full border-collapse text-sm",children:t})})},thead:e=>{let{children:t}=e;return(0,n.jsx)("thead",{className:"bg-muted/60",children:t})},th:e=>{let{children:t}=e;return(0,n.jsx)("th",{className:"border border-border px-3 py-1.5 text-left font-semibold",children:t})},td:e=>{let{children:t}=e;return(0,n.jsx)("td",{className:"border border-border px-3 py-1.5",children:t})},code:e=>{let{className:t,children:r}=e;return t?(0,n.jsx)("code",{className:"".concat(t," font-mono"),children:r}):(0,n.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[0.85em]",children:r})},pre:e=>{let{children:t}=e;return(0,n.jsx)("pre",{className:"my-3 overflow-x-auto rounded-lg border border-border bg-muted/40 p-3 text-xs",children:t})},img:e=>{let{src:t,alt:r}=e;return(0,n.jsx)("img",{src:"string"==typeof t?t:"",alt:null!=r?r:"",className:"my-2 max-w-full rounded"})},a:e=>{let{href:t,children:l}=e,a=null!=t?t:"";if(a.startsWith(u)){let e=decodeURIComponent(a.slice(u.length));return(0,n.jsx)("button",{type:"button",onClick:()=>null==r?void 0:r(e),className:"text-primary underline decoration-dotted underline-offset-2 hover:decoration-solid",children:l})}return(0,n.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",className:"text-primary underline underline-offset-2",children:l})}},children:t})})}class h{get(e){return this.client.fetchJson(e)}info(){return this.get("/v1/vault/info")}list(e){return this.get("/v1/vault/list".concat(e?"?cwd=".concat(encodeURIComponent(e)):""))}read(e,t){let r=new URLSearchParams({path:e,...t?{maxBytes:String(t)}:{}});return this.get("/v1/vault/read?".concat(r.toString()))}search(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return this.get("/v1/vault/search?q=".concat(encodeURIComponent(e),"&limit=").concat(t))}notes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return this.get("/v1/vault/notes?".concat(e?"query=".concat(encodeURIComponent(e),"&"):"","limit=").concat(t))}backlinks(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return this.get("/v1/vault/backlinks?target=".concat(encodeURIComponent(e),"&limit=").concat(t))}tags(){return this.get("/v1/vault/tags")}templates(){return this.get("/v1/vault/templates")}graph(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:500,n=new URLSearchParams({limit:String(r),...e?{focus:e,hops:String(t)}:{}});return this.get("/v1/vault/graph?".concat(n.toString()))}pollChanges(e){return this.get("/v1/vault/poll-changes?sinceMs=".concat(e))}orphans(){return this.get("/v1/vault/orphans")}templateExpand(e,t){return this.client.fetchJson("/v1/vault/template-expand",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({templatePath:e,...t?{title:t}:{}})})}async writeNote(e){var t,r,n,l;let a=await this.client.fetchResponse("/v1/vault/file",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),s=(null!=(t=a.headers.get("content-type"))?t:"").includes("application/json")?await a.json():await a.text();if(!a.ok&&409!==a.status)throw Error(String("string"==typeof s?s:null!=(l=null!=(n=null!=(r=null==s?void 0:s.message)?r:null==s?void 0:s.reason)?n:null==s?void 0:s.error)?l:"".concat(a.status)));return s}async saveNote(e){var t,r,n;let l=await this.client.fetchResponse("/v1/notes/save",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)}),a=(null!=(t=l.headers.get("content-type"))?t:"").includes("application/json")?await l.json():await l.text();if(!l.ok&&409!==l.status)throw Error(String("string"==typeof a?a:null!=(n=null!=(r=null==a?void 0:a.reason)?r:null==a?void 0:a.error)?n:"".concat(l.status)));return a}constructor(e){this.client=e}}function p(e){let t=/^---\n([\s\S]*?)\n---\n?/.exec(e);return t?{frontmatter:t[1],body:e.slice(t[0].length)}:{frontmatter:null,body:e}}function g(e){let t=e.toLowerCase();return t.endsWith(".md")||t.endsWith(".markdown")?"markdown":/\.(png|jpe?g|gif|webp|svg)$/.test(t)?"image":t.endsWith(".pdf")?"pdf":/\.(txt|json|ya?ml|csv|log)$/.test(t)?"text":"other"}function f(e){let{onPickTag:t}=e,{client:r}=(0,a.Q)(),s=(0,l.useMemo)(()=>new h(r),[r]),[o,i]=(0,l.useState)([]),[c,d]=(0,l.useState)(""),[u,x]=(0,l.useState)(!0),m=(0,l.useCallback)(async()=>{x(!0);try{var e;let t=await s.tags();i((null!=(e=t.tags)?e:[]).sort((e,t)=>t.count-e.count))}catch(e){}finally{x(!1)}},[s]);(0,l.useEffect)(()=>{m()},[m]);let p=c?o.filter(e=>e.tag.toLowerCase().includes(c.toLowerCase())):o;return(0,n.jsxs)("div",{className:"flex h-full flex-col",children:[(0,n.jsx)("div",{className:"border-b border-border p-2",children:(0,n.jsx)("input",{value:c,onChange:e=>d(e.target.value),placeholder:"태그 필터…",className:"w-full rounded border border-border bg-background px-2 py-1 text-xs"})}),(0,n.jsx)("div",{className:"flex-1 overflow-auto p-1",children:u?(0,n.jsx)("p",{className:"p-2 text-xs text-muted-foreground",children:"불러오는 중…"}):0===p.length?(0,n.jsx)("p",{className:"p-2 text-xs text-muted-foreground",children:"태그 없음"}):(0,n.jsx)("ul",{className:"space-y-0.5",children:p.map(e=>(0,n.jsx)("li",{children:(0,n.jsxs)("button",{onClick:()=>t(e.tag),className:"flex w-full items-center justify-between rounded px-2 py-1 text-left text-xs hover:bg-muted",children:[(0,n.jsxs)("span",{className:"truncate",children:["#",e.tag]}),(0,n.jsx)("span",{className:"ml-2 shrink-0 rounded bg-muted px-1.5 text-[10px] text-muted-foreground",children:e.count})]})},e.tag))})})]})}function v(e){var t,r;let{onOpen:o}=e,{client:i}=(0,a.Q)(),c=(0,l.useMemo)(()=>new h(i),[i]),[d,u]=(0,l.useState)(null),[x,m]=(0,l.useState)(null),[p,g]=(0,l.useState)(!0),f=(0,l.useCallback)(async e=>{g(!0);try{u(await c.graph(null!=e?e:void 0,1,e?60:400))}catch(e){}finally{g(!1)}},[c]);(0,l.useEffect)(()=>{f(x)},[f,x]);let v=(0,l.useMemo)(()=>{if(!d)return{nodes:[],edges:[]};let e=d.nodes.map(e=>e.id),t=d.edges.map(e=>({source:e.from,target:e.to}));return{nodes:function(e,t){var r,n,l;let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{width:800,height:600},{width:s,height:o}=a,i=null!=(r=a.iterations)?r:120,c=e.length,d=new Map;for(let e of t)d.set(e.source,(null!=(n=d.get(e.source))?n:0)+1),d.set(e.target,(null!=(l=d.get(e.target))?l:0)+1);let u=s/2,x=o/2,m=.4*Math.min(s,o),h=e.map((e,t)=>{var r;return{id:e,deg:null!=(r=d.get(e))?r:0,x:u+m*Math.cos(2*Math.PI*t/Math.max(1,c)),y:x+m*Math.sin(2*Math.PI*t/Math.max(1,c))}}),p=new Map(h.map((e,t)=>[e.id,t])),g=Math.sqrt(s*o/Math.max(1,c));for(let e=0;e<i;e++){let r=h.map(()=>({x:0,y:0}));for(let e=0;e<c;e++)for(let t=e+1;t<c;t++){let n=h[e].x-h[t].x,l=h[e].y-h[t].y,a=Math.hypot(n,l)||.01,s=g*g/a;n/=a,l/=a,r[e].x+=n*s,r[e].y+=l*s,r[t].x-=n*s,r[t].y-=l*s}for(let e of t){let t=p.get(e.source),n=p.get(e.target);if(null==t||null==n)continue;let l=h[t].x-h[n].x,a=h[t].y-h[n].y,s=Math.hypot(l,a)||.01,o=s*s/g;l/=s,a/=s,r[t].x-=l*o,r[t].y-=a*o,r[n].x+=l*o,r[n].y+=a*o}let n=1-e/i;for(let e=0;e<c;e++){let t=Math.hypot(r[e].x,r[e].y)||.01,l=Math.min(t,30*n);h[e].x=Math.max(20,Math.min(s-20,h[e].x+r[e].x/t*l)),h[e].y=Math.max(20,Math.min(o-20,h[e].y+r[e].y/t*l))}}return h}(e,t,{width:900,height:640,iterations:140}),edges:t}},[d]),b=(0,l.useMemo)(()=>new Map(v.nodes.map(e=>[e.id,e])),[v]),j=Math.max(1,...v.nodes.map(e=>e.deg));return(0,n.jsxs)("div",{className:"flex h-full flex-col",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-3 py-2 text-sm",children:[(0,n.jsx)("span",{className:"font-medium",children:"노트 그래프"}),x?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("span",{className:"text-xs text-muted-foreground",children:["focus: ",x," (1-hop)"]}),(0,n.jsx)(s.$,{size:"sm",variant:"outline",className:"ml-auto h-6 px-2 text-xs",onClick:()=>m(null),children:"전체 그래프"})]}):(0,n.jsxs)("span",{className:"ml-auto text-xs text-muted-foreground",children:[null!=(t=null==d?void 0:d.nodes.length)?t:0," 노드 \xb7 ",null!=(r=null==d?void 0:d.edges.length)?r:0," 링크",(null==d?void 0:d.truncated)?" (일부)":""]})]}),(0,n.jsx)("div",{className:"flex-1 overflow-auto p-2",children:p?(0,n.jsx)("p",{className:"p-4 text-sm text-muted-foreground",children:"그래프 계산 중…"}):d&&0!==d.nodes.length?(0,n.jsxs)("svg",{viewBox:"0 0 ".concat(900," ").concat(640),className:"h-auto w-full",style:{maxHeight:"78vh"},children:[v.edges.map((e,t)=>{let r=b.get(e.source),l=b.get(e.target);return r&&l?(0,n.jsx)("line",{x1:r.x,y1:r.y,x2:l.x,y2:l.y,stroke:"currentColor",className:"text-border",strokeWidth:.6,opacity:.5},t):null}),v.nodes.map(e=>{let t=3+e.deg/j*9;return(0,n.jsxs)("g",{className:"cursor-pointer",onClick:()=>null==o?void 0:o(e.id),onDoubleClick:()=>m(e.id),children:[(0,n.jsx)("circle",{cx:e.x,cy:e.y,r:t,className:"fill-primary/70 hover:fill-primary"}),(e.deg>=.3*j||x)&&(0,n.jsx)("text",{x:e.x+t+2,y:e.y+3,className:"fill-foreground/70 text-[9px]",children:e.id.split("/").pop()})]},e.id)})]}):(0,n.jsx)("p",{className:"p-4 text-sm text-muted-foreground",children:"그래프가 비어있습니다."})}),(0,n.jsx)("p",{className:"border-t border-border px-3 py-1 text-[11px] text-muted-foreground",children:"클릭=노트 열기 \xb7 더블클릭=로컬 그래프(focus)"})]})}function b(e){let{onClose:t,onCreated:r}=e,{client:o}=(0,a.Q)(),i=(0,l.useMemo)(()=>new h(o),[o]),[c,d]=(0,l.useState)(""),[u,x]=(0,l.useState)([]),[m,p]=(0,l.useState)(""),[g,f]=(0,l.useState)(!1),[v,b]=(0,l.useState)(null);(0,l.useEffect)(()=>{i.templates().then(e=>{var t;return x(null!=(t=e.templates)?t:[])}).catch(()=>{})},[i]);let j=(0,l.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(!0),b(null);try{let t=e.daily?function(){let e=new Date;return"".concat(e.getFullYear(),"-").concat(String(e.getMonth()+1).padStart(2,"0"),"-").concat(String(e.getDate()).padStart(2,"0"))}():c.trim();if(!t){b("제목을 입력하세요"),f(!1);return}let n="# ".concat(t,"\n\n");if(m){let e=await i.templateExpand(m,t);e.content&&(n=e.content)}else e.daily&&(n="# ".concat(t,"\n\n## 오늘\n\n- \n"));let l=e.daily?"Daily/".concat(t,".md"):"".concat(t,".md"),a=await i.writeNote({path:l,content:n,createOnly:!0});if(a.error){b("file_exists"===a.error?"이미 존재하는 노트입니다":a.error),f(!1);return}r(l)}catch(e){b(e instanceof Error?e.message:String(e)),f(!1)}},[i,c,m,r]);return(0,n.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:t,children:(0,n.jsxs)("div",{className:"w-[420px] rounded-lg border border-border bg-card p-4 shadow-xl",onClick:e=>e.stopPropagation(),children:[(0,n.jsx)("h2",{className:"mb-3 text-sm font-semibold",children:"새 노트"}),(0,n.jsx)("input",{value:c,onChange:e=>d(e.target.value),onKeyDown:e=>{"Enter"===e.key&&j()},placeholder:"노트 제목…",autoFocus:!0,className:"mb-2 w-full rounded border border-border bg-background px-3 py-2 text-sm"}),u.length>0&&(0,n.jsxs)("select",{value:m,onChange:e=>p(e.target.value),className:"mb-2 w-full rounded border border-border bg-background px-2 py-1.5 text-sm",children:[(0,n.jsx)("option",{value:"",children:"템플릿 없음"}),u.map(e=>(0,n.jsx)("option",{value:e.relPath,children:e.name},e.relPath))]}),v&&(0,n.jsx)("p",{className:"mb-2 text-xs text-rose-400",children:v}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(s.$,{size:"sm",onClick:()=>void j(),disabled:g||!c.trim(),children:"생성"}),(0,n.jsx)(s.$,{size:"sm",variant:"outline",onClick:()=>void j({daily:!0}),disabled:g,children:"오늘 데일리노트"}),(0,n.jsx)(s.$,{size:"sm",variant:"ghost",className:"ml-auto",onClick:t,children:"취소"})]})]})})}function j(e){let{onEdit:t}=e,{client:r}=(0,a.Q)(),o=(0,l.useMemo)(()=>new h(r),[r]),[i,c]=(0,l.useState)(null),[d,u]=(0,l.useState)(""),[x,m]=(0,l.useState)([]),[p,j]=(0,l.useState)(null),[N,w]=(0,l.useState)(null),[k,C]=(0,l.useState)(""),[S,M]=(0,l.useState)(null),[z,E]=(0,l.useState)(!1),[D,$]=(0,l.useState)("view"),[P,R]=(0,l.useState)("files"),[_,q]=(0,l.useState)(!1),[I,O]=(0,l.useState)(0);(0,l.useEffect)(()=>{let e=Date.now(),t=setInterval(()=>{o.pollChanges(e).then(e=>{var t;return O(null!=(t=e.count)?t:0)}).catch(()=>{})},3e4);return()=>clearInterval(t)},[o]);let U=(0,l.useCallback)(e=>{C("#".concat(e)),R("files"),(async()=>{E(!0);try{var t;let r=await o.search("#".concat(e),50);M(null!=(t=r.matches)?t:[])}catch(e){M([])}finally{E(!1)}})()},[o]),T=(0,l.useCallback)(async e=>{E(!0),M(null);try{let t=await o.list(e||void 0);t.error||(m(t.entries),u(t.cwd))}catch(e){}finally{E(!1)}},[o]);(0,l.useEffect)(()=>{let e=!0;return o.info().then(t=>{e&&(c(t),t.available&&T(""))}).catch(()=>{}),()=>{e=!1}},[o,T]);let K=(0,l.useCallback)(async e=>{j(e),w(null);try{w(await o.read(e))}catch(e){}},[o]),A=(0,l.useCallback)(async()=>{let e=k.trim();if(!e)return void M(null);E(!0);try{var t;let r=await o.search(e,50);M(null!=(t=r.matches)?t:[])}catch(e){M([])}finally{E(!1)}},[o,k]),F=d&&(null==i?void 0:i.root)?d.replace(i.root,"").split("/").filter(Boolean):[],W=(null==i?void 0:i.root)?d.replace(i.root,"").replace(/^\//,""):"";return i&&!i.available?(0,n.jsxs)("div",{className:"p-6 text-sm text-muted-foreground",children:["Obsidian vault를 찾을 수 없습니다 (source: ",i.source,"). ~/.elanous/config.json 의 obsidian.vault 를 확인하세요."]}):(0,n.jsxs)("div",{className:"mx-auto flex h-[calc(100vh-3rem)] max-w-[1500px] gap-3 px-3 py-3",children:[_&&(0,n.jsx)(b,{onClose:()=>q(!1),onCreated:e=>{q(!1),T(""),null==t||t(e)}}),(0,n.jsxs)("div",{className:"flex w-[38%] min-w-[280px] flex-col rounded-lg border border-border bg-card/40",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1 border-b border-border px-2 py-1.5",children:[["files","tags","graph"].map(e=>(0,n.jsx)("button",{onClick:()=>R(e),className:["rounded px-2 py-0.5 text-xs",P===e?"bg-primary/20 text-foreground":"text-muted-foreground"].join(" "),children:{files:"파일",tags:"태그",graph:"그래프"}[e]},e)),I>0&&(0,n.jsxs)("span",{className:"rounded bg-amber-500/15 px-1.5 py-0.5 text-[10px] text-amber-300",title:"외부 변경 감지",children:["↻ ",I]}),(0,n.jsx)(s.$,{size:"sm",variant:"outline",className:"ml-auto h-6 px-2 text-xs",onClick:()=>q(!0),children:"+ 새 노트"})]}),"graph"===P?(0,n.jsx)(v,{onOpen:e=>{R("files"),K("".concat(e,".md"))}}):"tags"===P?(0,n.jsx)(f,{onPickTag:U}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"border-b border-border p-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("input",{value:k,onChange:e=>C(e.target.value),onKeyDown:e=>{"Enter"===e.key&&A()},placeholder:"vault 전문검색…",className:"min-w-0 flex-1 rounded border border-border bg-background px-2 py-1 text-sm"}),(0,n.jsx)(s.$,{size:"sm",variant:"outline",onClick:()=>void A(),children:"검색"})]}),!S&&(0,n.jsxs)("div",{className:"mt-1.5 flex flex-wrap items-center gap-1 text-xs text-muted-foreground",children:[(0,n.jsx)("button",{className:"hover:text-foreground",onClick:()=>void T(""),children:"vault"}),F.map((e,t)=>(0,n.jsxs)("span",{children:["/ ",(0,n.jsx)("button",{className:"hover:text-foreground",onClick:()=>void T("".concat(i.root,"/").concat(F.slice(0,t+1).join("/"))),children:e})]},t))]})]}),(0,n.jsxs)("div",{className:"flex-1 overflow-auto p-1",children:[z&&(0,n.jsx)("p",{className:"p-2 text-xs text-muted-foreground",children:"불러오는 중…"}),S?0===S.length?(0,n.jsx)("p",{className:"p-2 text-xs text-muted-foreground",children:"검색 결과 없음"}):(0,n.jsx)("ul",{className:"space-y-1",children:S.map((e,t)=>(0,n.jsx)("li",{children:(0,n.jsxs)("button",{className:"w-full rounded px-2 py-1.5 text-left text-xs hover:bg-muted",onClick:()=>void K(e.path),children:[(0,n.jsx)("span",{className:"font-medium",children:e.path.split("/").pop()})," ",(0,n.jsxs)("span",{className:"text-muted-foreground",children:[":",e.lineNumber]}),(0,n.jsx)("div",{className:"truncate text-muted-foreground",children:e.snippet})]})},t))}):(0,n.jsxs)("ul",{children:[W&&(0,n.jsx)("li",{children:(0,n.jsx)("button",{className:"w-full rounded px-2 py-1.5 text-left text-sm text-muted-foreground hover:bg-muted",onClick:()=>void T("".concat(i.root,"/").concat(function(e){let t=e.split("/").filter(Boolean);return t.pop(),t.join("/")}(W))),children:"\uD83D\uDCC1 .."})}),x.map(e=>(0,n.jsx)("li",{children:(0,n.jsxs)("button",{className:["flex w-full items-center gap-1.5 rounded px-2 py-1.5 text-left text-sm hover:bg-muted",p==="".concat(W?W+"/":"").concat(e.name)?"bg-muted":""].join(" "),onClick:()=>e.isDir?void T("".concat(d,"/").concat(e.name)):void K("".concat(W?W+"/":"").concat(e.name)),children:[(0,n.jsx)("span",{children:e.isDir?"\uD83D\uDCC1":"markdown"===g(e.name)?"\uD83D\uDCDD":"image"===g(e.name)?"\uD83D\uDDBC️":"\uD83D\uDCC4"}),(0,n.jsx)("span",{className:"truncate",children:e.name})]})},e.relPath))]})]})]})]}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col rounded-lg border border-border bg-card/40",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-3 py-2",children:[(0,n.jsx)("span",{className:"truncate text-sm font-medium",children:null!=p?p:"파일을 선택하세요"}),(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[p&&"markdown"===g(p)&&(0,n.jsx)("div",{className:"flex items-center gap-0.5 rounded ring-1 ring-border",children:["view","raw"].map(e=>(0,n.jsx)("button",{onClick:()=>$(e),className:["px-2 py-0.5 text-xs",D===e?"bg-primary/20 text-foreground":"text-muted-foreground"].join(" "),children:"view"===e?"View":"Raw"},e))}),p&&"markdown"===g(p)&&t&&(0,n.jsx)(s.$,{size:"sm",variant:"outline",onClick:()=>t(p),children:"편집"})]})]}),(0,n.jsx)("div",{className:"flex-1 overflow-auto p-4",children:N?(0,n.jsx)(y,{preview:N,selected:p,mode:D,onWikilink:e=>{K("".concat(W?W+"/":"").concat(e,".md"))}}):(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:p?"로딩…":"좌측에서 노트를 선택하면 여기에 표시됩니다."})})]})]})}function y(e){let{preview:t,selected:r,mode:l,onWikilink:a}=e;if(t.error)return(0,n.jsx)("p",{className:"text-sm text-rose-400",children:t.error});let s=g(r);if("image"===s&&t.bytes)return(0,n.jsx)("img",{src:"data:".concat(t.mime,";base64,").concat(t.bytes),alt:r,className:"max-w-full rounded"});if("markdown"===s&&null!=t.content){let{frontmatter:e,body:r}=p(t.content);return"raw"===l?(0,n.jsx)("pre",{className:"whitespace-pre-wrap font-mono text-xs leading-relaxed",children:t.content}):(0,n.jsxs)("div",{children:[e&&(0,n.jsx)("pre",{className:"mb-3 rounded bg-muted/40 p-2 text-[11px] text-muted-foreground",children:e}),(0,n.jsx)(m,{markdown:r,onWikilink:a}),t.truncated&&(0,n.jsxs)("p",{className:"mt-2 text-xs text-amber-400",children:["⚠ 일부만 표시됨(",(t.size/1024).toFixed(0),"KB)"]})]})}return null!=t.content?(0,n.jsx)("pre",{className:"whitespace-pre-wrap text-sm",children:t.content}):(0,n.jsxs)("p",{className:"text-sm text-muted-foreground",children:["미리보기 불가(",t.mime,")"]})}function N(e){let{path:t,onClose:r}=e,{client:o}=(0,a.Q)(),i=(0,l.useMemo)(()=>new h(o),[o]),[c,d]=(0,l.useState)(""),[u,x]=(0,l.useState)(!1),[g,f]=(0,l.useState)("split"),[v,b]=(0,l.useState)("clean"),[j,y]=(0,l.useState)(null),N=(0,l.useRef)(void 0),w=(0,l.useRef)(null),k=(0,l.useRef)(null),[C,S]=(0,l.useState)("outline"),[M,z]=(0,l.useState)([]),[E,D]=(0,l.useState)(null),$=(0,l.useMemo)(()=>(function(e){let t=[],r=!1;return e.split("\n").forEach((e,n)=>{let l=e.trimEnd();if(/^```/.test(l.trim())){r=!r;return}if(r)return;let a=/^(#{1,6})\s+(.+)$/.exec(l);a&&t.push({level:a[1].length,text:a[2].trim(),line:n})}),t})(p(c).body),[c]);(0,l.useEffect)(()=>{let e=!0;return i.read(t,8388608).then(t=>{var r;e&&(d(null!=(r=t.content)?r:""),N.current=t.mtimeMs,x(!0),b("clean"))}).catch(()=>{e&&(y("노트를 불러오지 못했습니다"),x(!0))}),()=>{e=!1,w.current&&clearTimeout(w.current)}},[i,t]);let P=(0,l.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;b("saving"),y(null);try{let n=await i.writeNote({path:t,content:r,...e?{}:null!=N.current?{lastKnownMtime:N.current}:{}});if("mtime_conflict"===n.error||n.error&&null!=n.currentMtime)return void b("conflict");if(n.error){b("error"),y(n.error);return}null!=n.mtimeMs&&(N.current=n.mtimeMs),b("saved")}catch(e){b("error"),y(e instanceof Error?e.message:String(e))}},[i,t,c]);(0,l.useEffect)(()=>{var e;let r=!0;return i.backlinks((null!=(e=t.split("/").pop())?e:t).replace(/\.md$/i,""),100).then(e=>{var t;r&&z(null!=(t=e.matches)?t:[])}).catch(()=>{}),()=>{r=!1}},[i,t]);let R=(0,l.useCallback)((e,t)=>{let r=function(e,t){let r=e.slice(0,t),n=r.lastIndexOf("[[");if(n<0)return null;let l=r.slice(n+2);return l.includes("]]")||l.includes("\n")?null:{query:l,start:n+2}}(e,t);if(!r)return void D(null);i.notes(r.query||void 0,8).then(e=>{var n;D({query:r.query,start:r.start,caret:t,items:(null!=(n=e.notes)?n:[]).slice(0,8)})}).catch(()=>D(null))},[i]),_=(0,l.useCallback)((e,t)=>{d(e),b("dirty"),R(e,t),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{P(!1,e)},2500)},[P,R]),q=(0,l.useCallback)(e=>{if(!E)return;let t=function(e,t,r,n){let l=e.slice(0,t),a=e.slice(r),s="".concat(n,"]]");return{text:l+s+a,caret:l.length+s.length}}(c,E.start,E.caret,e.name);d(t.text),b("dirty"),D(null),requestAnimationFrame(()=>{k.current&&(k.current.focus(),k.current.setSelectionRange(t.caret,t.caret))})},[E,c]),I=(0,l.useCallback)(e=>{let t=k.current;if(!t)return;let r=c.split("\n").slice(0,e).join("\n").length;t.focus(),t.setSelectionRange(r,r),t.scrollTop=Math.max(0,20*e-100)},[c]),O=p(c).body;return u?(0,n.jsxs)("div",{className:"mx-auto flex h-[calc(100vh-3rem)] max-w-[1500px] flex-col px-3 py-3",children:[(0,n.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,n.jsx)(s.$,{size:"sm",variant:"ghost",onClick:r,children:"← 목록"}),(0,n.jsx)("span",{className:"truncate text-sm font-medium",children:t}),(0,n.jsx)("span",{className:["ml-2 rounded px-2 py-0.5 text-xs",{clean:"text-muted-foreground",dirty:"text-amber-400",saving:"text-sky-400",saved:"text-emerald-400",conflict:"text-rose-400",error:"text-rose-400"}[v]].join(" "),children:{clean:"저장됨",dirty:"● 편집 중",saving:"저장 중…",saved:"✓ 저장됨",conflict:"⚠ 충돌",error:"✗ 오류"}[v]}),(0,n.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[["edit","split","preview"].map(e=>(0,n.jsx)("button",{onClick:()=>f(e),className:["rounded px-2 py-1 text-xs ring-1",g===e?"bg-primary/20 ring-primary/40":"bg-muted text-muted-foreground ring-border"].join(" "),children:{edit:"편집",split:"분할",preview:"미리보기"}[e]},e)),(0,n.jsx)(s.$,{size:"sm",variant:"outline",onClick:()=>void P(!1),children:"저장"})]})]}),"conflict"===v&&(0,n.jsxs)("div",{className:"mb-2 flex items-center gap-2 rounded border border-rose-500/40 bg-rose-500/10 px-3 py-2 text-xs text-rose-200",children:[(0,n.jsx)("span",{children:"디스크의 노트가 외부에서 변경됐습니다."}),(0,n.jsx)(s.$,{size:"sm",variant:"outline",onClick:()=>void P(!0),children:"강제 덮어쓰기"}),(0,n.jsx)(s.$,{size:"sm",variant:"ghost",onClick:()=>void i.read(t,8388608).then(e=>{var t;d(null!=(t=e.content)?t:""),N.current=e.mtimeMs,b("clean")}),children:"디스크 버전 로드"})]}),j&&(0,n.jsx)("div",{className:"mb-2 text-xs text-rose-400",children:j}),(0,n.jsxs)("div",{className:"flex min-h-0 flex-1 gap-3",children:["preview"!==g&&(0,n.jsxs)("div",{className:"relative min-h-0 flex-1",children:[(0,n.jsx)("textarea",{ref:k,value:c,onChange:e=>_(e.target.value,e.target.selectionStart),onKeyUp:e=>R(c,e.target.selectionStart),onClick:e=>R(c,e.target.selectionStart),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"s"===e.key&&(e.preventDefault(),P(!1)),"Escape"===e.key&&E&&(e.preventDefault(),D(null)),"Enter"===e.key&&E&&E.items.length&&(e.preventDefault(),q(E.items[0]))},className:"h-full min-h-0 w-full resize-none rounded-lg border border-border bg-background p-3 font-mono text-sm leading-relaxed focus:outline-none focus:ring-1 focus:ring-ring",spellCheck:!1}),E&&E.items.length>0&&(0,n.jsxs)("div",{className:"absolute left-3 top-3 z-20 max-h-56 w-72 overflow-auto rounded-md border border-border bg-popover shadow-lg",children:[(0,n.jsxs)("div",{className:"border-b border-border px-2 py-1 text-[11px] text-muted-foreground",children:["[[wikilink: ",E.query||"…"]}),E.items.map(e=>(0,n.jsxs)("button",{className:"block w-full truncate px-2 py-1.5 text-left text-xs hover:bg-muted",onMouseDown:t=>{t.preventDefault(),q(e)},children:[(0,n.jsx)("span",{className:"font-medium",children:e.name})," ",(0,n.jsx)("span",{className:"text-muted-foreground",children:e.relPath})]},e.relPath))]})]}),"edit"!==g&&(0,n.jsx)("div",{className:"min-h-0 flex-1 overflow-auto rounded-lg border border-border bg-card/40 p-4",children:(0,n.jsx)(m,{markdown:O})}),(0,n.jsxs)("div",{className:"flex w-[220px] min-w-[180px] flex-col rounded-lg border border-border bg-card/40",children:[(0,n.jsx)("div",{className:"flex border-b border-border text-xs",children:["outline","backlinks"].map(e=>(0,n.jsx)("button",{onClick:()=>S(e),className:["flex-1 px-2 py-1.5",C===e?"border-b-2 border-primary text-foreground":"text-muted-foreground"].join(" "),children:"outline"===e?"개요":"역참조 ".concat(M.length?"(".concat(M.length,")"):"")},e))}),(0,n.jsx)("div",{className:"flex-1 overflow-auto p-1 text-xs",children:"outline"===C?0===$.length?(0,n.jsx)("p",{className:"p-2 text-muted-foreground",children:"heading 없음"}):$.map((e,t)=>(0,n.jsx)("button",{onClick:()=>I(e.line),className:"block w-full truncate rounded px-2 py-1 text-left hover:bg-muted",style:{paddingLeft:"".concat(8*e.level,"px")},children:e.text},t)):0===M.length?(0,n.jsx)("p",{className:"p-2 text-muted-foreground",children:"역참조 없음"}):M.map((e,t)=>(0,n.jsxs)("div",{className:"truncate rounded px-2 py-1",title:e.snippet,children:["\uD83D\uDCCE ",e.path.split("/").pop(),e.headingAnchor?" #".concat(e.headingAnchor):""]},t))})]})]})]}):(0,n.jsx)("div",{className:"p-6 text-sm text-muted-foreground",children:"노트 로딩…"})}function w(){let[e,t]=(0,l.useState)(null);return e?(0,n.jsx)(N,{path:e,onClose:()=>t(null)}):(0,n.jsx)(j,{onEdit:e=>t(e)})}},70920:(e,t,r)=>{Promise.resolve().then(r.bind(r,60870))}},e=>{e.O(0,[4853,7294,6588,9131,4015,9243,7429,7358],()=>e(e.s=70920)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4191],{11660:(e,t,s)=>{Promise.resolve().then(s.bind(s,70548))},49036:(e,t,s)=>{"use strict";var n=s(6620);s.o(n,"useParams")&&s.d(t,{useParams:function(){return n.useParams}}),s.o(n,"usePathname")&&s.d(t,{usePathname:function(){return n.usePathname}}),s.o(n,"useRouter")&&s.d(t,{useRouter:function(){return n.useRouter}}),s.o(n,"useSearchParams")&&s.d(t,{useSearchParams:function(){return n.useSearchParams}})},70548:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>u});var n=s(58443),a=s(77947),r=s(49036);async function o(e){var t,s;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=null!=(t=n.fetchImpl)?t:fetch,r="".concat(null!=(s=n.origin)?s:"","/v1/workflows/").concat(encodeURIComponent(e),"/chat-config"),o=await a(r);if(404===o.status)return null;if(!o.ok)throw Error("chat-config ".concat(o.status));return await o.json()}async function i(e){var t,s,n,a,r;let o=null!=(t=e.fetchImpl)?t:fetch,i="".concat(null!=(s=e.origin)?s:"","/v1/workflows/chat").concat(e.chatPath),c={"content-type":"application/json"};e.bearer&&e.bearer.length>0&&(c.authorization="Bearer ".concat(e.bearer));let d={message:e.message};e.sessionId&&(d.sessionId=e.sessionId);let u=await o(i,{method:"POST",headers:c,body:JSON.stringify(d),...e.signal?{signal:e.signal}:{}});if(!u.ok){let e=await u.text().catch(()=>"");throw Error("chat ".concat(u.status).concat(e?": "+e:""))}if((null!=(n=u.headers.get("content-type"))?n:"").includes("text/event-stream")&&u.body)return{kind:"streaming",frames:l(u.body)};let h=await u.json();return{kind:"buffered",response:null!=(a=h.response)?a:"",runId:null!=(r=h.runId)?r:""}}async function*l(e){let t=e.getReader(),s=new TextDecoder,n="";try{for(;;){let{value:e,done:a}=await t.read();if(a)break;let r=(n+=s.decode(e,{stream:!0})).indexOf("\n\n");for(;-1!==r;){let e=n.slice(0,r);n=n.slice(r+2);let t=c(e);t&&(yield t),r=n.indexOf("\n\n")}}if(n.trim().length>0){let e=c(n);e&&(yield e)}}finally{t.releaseLock()}}function c(e){let t="message",s=[];for(let n of e.split("\n")){let e=n.endsWith("\r")?n.slice(0,-1):n;if(e.startsWith(":"))continue;let a=e.indexOf(":");if(-1===a)continue;let r=e.slice(0,a),o=e.slice(a+1).replace(/^ /,"");"event"===r?t=o:"data"===r&&s.push(o)}return 0===s.length?null:{event:t,data:s.join("\n")}}function d(){var e,t;let s=(0,r.useSearchParams)(),l=null!=(e=s.get("workflow"))?e:"",c=null!=(t=s.get("token"))?t:"",[d,u]=(0,a.useState)({kind:"loading"}),[h,f]=(0,a.useState)([]),[m,x]=(0,a.useState)(""),[g,p]=(0,a.useState)(!1),[w]=(0,a.useState)(()=>"hosted-".concat(Date.now().toString(36),"-").concat(Math.random().toString(16).slice(2,6))),b=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=!1;return 0===l.length?void u({kind:"error",reason:"missing ?workflow= query param"}):(o(l).then(t=>{e||(t?u({kind:"ready",config:t}):u({kind:"not-found"}))}).catch(t=>{e||u({kind:"error",reason:t instanceof Error?t.message:String(t)})}),()=>{e=!0})},[l]),(0,a.useEffect)(()=>{b.current&&(b.current.scrollTop=b.current.scrollHeight)},[h]);let k=async()=>{if("ready"!==d.kind||g)return;let e=m.trim();if(0===e.length)return;let t={id:"u-".concat(Date.now()),role:"user",text:e},s="a-".concat(Date.now());f(e=>[...e,t,{id:s,role:"assistant",text:"",pending:!0}]),x(""),p(!0);try{let t=await i({chatPath:d.config.path,message:e,sessionId:"per-session"===d.config.sessionMode?w:void 0,bearer:c.length>0?c:void 0,streaming:d.config.streaming});if("buffered"===t.kind)f(e=>e.map(e=>e.id===s?{...e,text:t.response,pending:!1}:e));else for await(let e of t.frames)if("token"===e.event)f(t=>t.map(t=>t.id===s?{...t,text:t.text+e.data}:t));else if("done"===e.event){let t;try{t=JSON.parse(e.data).response}catch(e){}f(e=>e.map(e=>e.id===s?{...e,text:null!=t?t:e.text,pending:!1}:e))}else"error"===e.event&&f(t=>t.map(t=>t.id===s?{...t,text:t.text+"\n[error: ".concat(e.data,"]"),pending:!1,role:"system"}:t))}catch(t){let e=t instanceof Error?t.message:String(t);f(t=>t.map(t=>t.id===s?{...t,text:"[error: ".concat(e,"]"),pending:!1,role:"system"}:t))}finally{p(!1)}};return"loading"===d.kind?(0,n.jsx)("div",{className:"p-6 text-sm text-slate-500",children:"Loading workflow chat…"}):"not-found"===d.kind?(0,n.jsxs)("div",{className:"p-6 text-sm",children:[(0,n.jsx)("h1",{className:"text-lg font-medium mb-2",children:"Workflow not found"}),(0,n.jsxs)("p",{className:"text-slate-600",children:["The workflow ",(0,n.jsx)("code",{className:"px-1 bg-slate-100 rounded",children:l})," is not available for hosted chat. The workflow author needs to add",(0,n.jsxs)("code",{className:"px-1 bg-slate-100 rounded ml-1",children:["hostedUi: ","{"," enabled: true ","}"]}),"to the chat trigger node."]})]}):"error"===d.kind?(0,n.jsxs)("div",{className:"p-6 text-sm",children:[(0,n.jsx)("h1",{className:"text-lg font-medium mb-2 text-red-600",children:"Connection error"}),(0,n.jsx)("p",{className:"text-slate-600",children:d.reason})]}):(0,n.jsxs)("div",{className:"flex flex-col h-screen max-w-2xl mx-auto px-4",children:[(0,n.jsxs)("header",{className:"py-3 border-b",children:[(0,n.jsx)("h1",{className:"text-base font-medium",children:d.config.workflowName}),(0,n.jsxs)("p",{className:"text-xs text-slate-500",children:[d.config.streaming?"streaming":"buffered"," \xb7 ",d.config.sessionMode,d.config.hostedUi.requiresBearer?" \xb7 bearer required":""]})]}),d.config.hostedUi.requiresBearer&&c.length>0?(0,n.jsx)("div",{className:"text-xs px-3 py-2 bg-amber-50 border-b border-amber-200 text-amber-800",children:"⚠ The bearer token is embedded in this URL. Treat this link as a secret — sharing the URL gives anyone full access to the workflow."}):null,(0,n.jsxs)("div",{ref:b,className:"flex-1 overflow-y-auto py-4 space-y-3",children:[0===h.length?(0,n.jsx)("p",{className:"text-sm text-slate-400 italic",children:"Type a message to start the conversation."}):null,h.map(e=>(0,n.jsxs)("div",{className:"text-sm",children:[(0,n.jsxs)("div",{className:"font-medium text-xs uppercase text-slate-500",children:[e.role,e.pending?" \xb7 typing…":null]}),(0,n.jsx)("pre",{className:"whitespace-pre-wrap font-sans text-slate-800",children:e.text})]},e.id))]}),(0,n.jsxs)("div",{className:"py-3 border-t flex gap-2",children:[(0,n.jsx)("input",{className:"flex-1 px-3 py-2 border rounded text-sm",value:m,onChange:e=>x(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),k())},placeholder:"Message…",disabled:g}),(0,n.jsx)("button",{type:"button",onClick:()=>void k(),disabled:g||0===m.trim().length,className:"px-4 py-2 bg-slate-900 text-white rounded text-sm disabled:opacity-50",children:"Send"})]})]})}function u(){return(0,n.jsx)(a.Suspense,{fallback:(0,n.jsx)("div",{className:"p-6 text-sm text-slate-500",children:"Loading workflow chat…"}),children:(0,n.jsx)(d,{})})}}},e=>{e.O(0,[9243,7429,7358],()=>e(e.s=11660)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7143],{67866:(e,o,r)=>{"use strict";r.r(o),r.d(o,{default:()=>t});var n=r(58443),s=r(77947);function t(){return(0,s.useEffect)(()=>{window.location.replace("/app/editor/?mode=workflow")},[]),(0,n.jsx)("a",{href:"/app/editor/?mode=workflow",children:"편집기로 이동"})}},70210:(e,o,r)=>{Promise.resolve().then(r.bind(r,67866))}},e=>{e.O(0,[9243,7429,7358],()=>e(e.s=70210)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6364],{3753:(e,t,r)=>{"use strict";r.d(t,{U:()=>x});var s=r(58443),n=r(77947),a=r(34015),l=r(19990),i=r(65534);function o(e){let{items:t}=e;return 0===t.length?(0,s.jsx)("div",{className:"rounded-lg border border-dashed border-border p-6 text-center text-sm text-muted-foreground",children:"No control signals matched the current filter."}):(0,s.jsx)("ul",{className:"space-y-2",children:t.map((e,t)=>{var r,n,a,l,i;let o=[(null==(r=e.scope)?void 0:r.surface)&&"surface=".concat(e.scope.surface),(null==(n=e.scope)?void 0:n.channel)&&"channel=".concat(e.scope.channel),(null==(a=e.scope)?void 0:a.sessionId)&&"session=".concat(e.scope.sessionId)].filter(Boolean).join(" \xb7 ")||"unscoped";return(0,s.jsxs)("li",{className:"rounded-lg border border-border bg-card p-3 shadow-sm",children:[(0,s.jsxs)("div",{className:"text-sm font-medium",children:[e.kind," \xb7 ",e.urgency]}),(0,s.jsxs)("div",{className:"mt-0.5 font-mono text-[10px] text-muted-foreground",children:[function(e){let t=Date.now()-new Date(e).getTime();return t<6e4?"just now":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")}(e.createdAt)," \xb7 ",null!=(l=e.source)?l:"unknown"," \xb7 ",o]}),(0,s.jsx)("pre",{className:"mt-2 overflow-x-auto rounded-md bg-muted p-2 text-[11px]",children:JSON.stringify(null!=(i=e.payload)?i:{},null,2)})]},t)})})}let d=["background","quick-pass","normal","priority","critical"];class c{async list(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new URLSearchParams;Object.entries(e).forEach(e=>{let[r,s]=e;s&&t.set(r,s)});let r=t.toString();return this.client.fetchJson("/v1/control-signals".concat(r?"?".concat(r):""))}emit(e){return this.client.fetchJson("/v1/control-signals",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}constructor(e){this.client=e}}var u=r(89704),m=r(23783);function x(){var e,t,r,x;let{client:h}=(0,a.Q)(),p=(0,n.useMemo)(()=>new c(h),[h]),[f,g]=(0,n.useState)({items:[]}),[b,v]=(0,n.useState)(!1),[y,j]=(0,n.useState)(""),[k,N]=(0,n.useState)(""),[w,C]=(0,n.useState)(""),[S,I]=(0,n.useState)(""),[E,M]=(0,n.useState)(""),[T,D]=(0,n.useState)(""),[P,L]=(0,n.useState)("normal"),[A,R]=(0,n.useState)("operator"),[O,K]=(0,n.useState)(""),[z,J]=(0,n.useState)(""),[U,_]=(0,n.useState)(""),[B,F]=(0,n.useState)(""),[q,Y]=(0,n.useState)(!1),$=(0,n.useCallback)(async()=>{(0,m.cY)("webterm.control.list.refresh",{kind:y,surface:k,minUrgency:w,sessionId:S,limit:E}),v(!0);try{let e=await p.list({kind:y||void 0,surface:k||void 0,minUrgency:w||void 0,sessionId:S||void 0,limit:E||void 0});g(e)}catch(e){u.oR.error("signals list failed: ".concat(e instanceof Error?e.message:e))}finally{v(!1)}},[p,y,k,w,S,E]);(0,n.useEffect)(()=>{$()},[$]);let H=async e=>{if(e.preventDefault(),!T.trim())return void u.oR.error("kind required");let t={};if(B.trim())try{t=JSON.parse(B)}catch(e){u.oR.error("payload must be valid JSON");return}let r={kind:T.trim(),urgency:P,source:A.trim()||"operator",mayPreempt:q,payload:t,scope:{...O?{surface:O}:{},...z?{channel:z}:{},...U?{sessionId:U}:{}}};(0,m.cY)("webterm.control.emit",{kind:r.kind,urgency:r.urgency});try{v(!0),await p.emit(r),u.oR.success("signal emitted"),F(""),await $()}catch(e){u.oR.error("emit failed: ".concat(e instanceof Error?e.message:e))}finally{v(!1)}},Q=null!=(e=f.countsByKind)?e:{};return(0,s.jsxs)("div",{className:"mx-auto max-w-5xl space-y-4 p-4",children:[(0,s.jsxs)("header",{className:"space-y-2",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"Control signals"}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 text-[11px] text-muted-foreground",children:[(0,s.jsxs)("span",{className:"rounded-full border border-border px-2 py-0.5",children:["total ",null!=(t=f.total)?t:0]}),(0,s.jsxs)("span",{className:"rounded-full border border-border px-2 py-0.5",children:["latest ",null!=(r=f.latest)?r:"-"]}),Object.entries(Q).map(e=>{let[t,r]=e;return(0,s.jsxs)("span",{className:"rounded-full border border-border px-2 py-0.5",children:[t," ",r]},t)})]})]}),(0,s.jsxs)("form",{onSubmit:e=>{e.preventDefault(),$()},className:"flex flex-wrap items-center gap-2 rounded-lg border border-border bg-card p-3 shadow-sm",children:[(0,s.jsx)(i.p,{value:y,onChange:e=>j(e.target.value),placeholder:"kind",className:"flex-1 min-w-[140px]"}),(0,s.jsx)(i.p,{value:k,onChange:e=>N(e.target.value),placeholder:"surface",className:"flex-1 min-w-[140px]"}),(0,s.jsxs)("select",{value:w,onChange:e=>C(e.target.value),className:"h-9 flex-1 min-w-[170px] rounded-md border border-input bg-background px-2 text-sm",children:[(0,s.jsx)("option",{value:"",children:"min urgency (any)"}),d.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]}),(0,s.jsx)(i.p,{value:S,onChange:e=>I(e.target.value),placeholder:"session id",className:"flex-1 min-w-[140px]"}),(0,s.jsx)(i.p,{value:E,onChange:e=>M(e.target.value),placeholder:"limit",type:"number",className:"w-[100px]"}),(0,s.jsx)(l.$,{type:"submit",size:"sm",disabled:b,children:"Filter"})]}),(0,s.jsxs)("form",{onSubmit:H,className:"space-y-2 rounded-lg border border-border bg-card p-3 shadow-sm",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold",children:"Emit a signal"}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)(i.p,{value:T,onChange:e=>D(e.target.value),placeholder:"kind (required)",className:"flex-1 min-w-[140px]"}),(0,s.jsx)("select",{value:P,onChange:e=>{let t=e.target.value;"string"==typeof t&&d.includes(t)&&L(t)},className:"h-9 rounded-md border border-input bg-background px-2 text-sm",children:d.map(e=>(0,s.jsx)("option",{value:e,children:e},e))}),(0,s.jsx)(i.p,{value:A,onChange:e=>R(e.target.value),placeholder:"source",className:"flex-1 min-w-[120px]"}),(0,s.jsx)(i.p,{value:O,onChange:e=>K(e.target.value),placeholder:"scope.surface",className:"flex-1 min-w-[120px]"}),(0,s.jsx)(i.p,{value:z,onChange:e=>J(e.target.value),placeholder:"scope.channel",className:"flex-1 min-w-[120px]"}),(0,s.jsx)(i.p,{value:U,onChange:e=>_(e.target.value),placeholder:"scope.session",className:"flex-1 min-w-[120px]"}),(0,s.jsxs)("label",{className:"flex items-center gap-1.5 text-xs",children:[(0,s.jsx)("input",{type:"checkbox",checked:q,onChange:e=>Y(e.target.checked)}),"mayPreempt"]})]}),(0,s.jsx)("textarea",{value:B,onChange:e=>F(e.target.value),placeholder:'payload JSON (optional, e.g. {"reason":"manual"})',rows:3,className:"w-full resize-y rounded-md border border-input bg-background px-3 py-2 font-mono text-xs"}),(0,s.jsx)(l.$,{type:"submit",size:"sm",disabled:b,children:"Emit"})]}),(0,s.jsx)(o,{items:null!=(x=f.items)?x:[]})]})}},11410:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(51719).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},22817:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var s=r(58443),n=r(77947),a=r(49036),l=r(68320),i=r(49413);function o(e){let{id:t,active:r,children:n}=e;return(0,s.jsx)("div",{role:"tabpanel","data-tab-id":t,"data-active":r?"true":"false",className:(0,i.cn)("h-full min-h-0",r?"block":"hidden"),children:n})}var d=r(64440),c=r(47868),u=r(41200),m=r(2684),x=r(3753),h=r(5244),p=r(71151),f=r(92364);function g(e){let{tab:t}=e;switch(t.kind){case"chat":return(0,s.jsx)(d.ChatPanel,{sessionId:t.sessionId,tabId:t.id});case"term":return(0,s.jsx)(c.zV,{});case"intake":return(0,s.jsx)(u.SY,{});case"tasks":return(0,s.jsx)(m.B,{});case"control":return(0,s.jsx)(x.U,{});case"settings":return(0,s.jsx)(h.O,{})}}function b(){return(0,s.jsx)("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",children:(0,s.jsx)("span",{children:"(이 탭은 절약 모드 — 클릭 시 복원)"})})}function v(){let{state:e,addTab:t,activateTab:r}=(0,l.hA)(),a=(0,p.ub)(e),i=(0,n.useRef)(null);if((0,n.useEffect)(()=>{if(i.current&&!(a.length<=1))return(0,f.gI)(i.current,{shouldIgnore:e=>{if(!(e instanceof HTMLElement))return!1;let t=e.tagName;return!!("INPUT"===t||"TEXTAREA"===t||"SELECT"===t||e.closest(".xterm"))||!!e.isContentEditable},onSwipe:t=>{let s=e.activeId?a.findIndex(t=>t.id===e.activeId):-1;if(s<0)return;let n="left"===t?Math.min(a.length-1,s+1):Math.max(0,s-1);n!==s&&r(a[n].id)}})},[a,e.activeId,r]),0===a.length)return(0,s.jsx)("div",{className:"flex h-full flex-col items-center justify-center gap-4 px-6 text-center",children:(0,s.jsxs)("div",{className:"rounded-lg border border-dashed border-border bg-card px-6 py-8 max-w-md",children:[(0,s.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:"워크스페이스 시작"}),(0,s.jsxs)("p",{className:"mt-2 text-sm text-muted-foreground",children:["상단 strip 의"," ",(0,s.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-xs",children:"+"})," ","또는 아래 버튼으로 첫 탭을 추가하세요. 비활성 탭은 닫기 전까지 unmount 되지 않아 입력 중 텍스트가 보존됩니다."]}),(0,s.jsxs)("div",{className:"mt-4 flex flex-wrap justify-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>t({kind:"chat"}),className:"rounded-md border border-border bg-background px-3 py-1.5 text-sm hover:bg-secondary",children:"+ chat"}),(0,s.jsx)("button",{type:"button",onClick:()=>t({kind:"term"}),className:"rounded-md border border-border bg-background px-3 py-1.5 text-sm hover:bg-secondary",children:"+ terminal"})]})]})});let d=new Set(e.frozenIds);return(0,s.jsx)("div",{ref:i,className:"relative h-full min-h-0 touch-pan-y",children:a.map(t=>(0,s.jsx)(o,{id:t.id,active:e.activeId===t.id,children:d.has(t.id)?(0,s.jsx)(b,{}):(0,s.jsx)(g,{tab:t})},t.id))})}function y(){let e=(0,l.hA)();return(0,n.useEffect)(()=>{let t=t=>{if(!(t.metaKey||t.ctrlKey))return;let r=(0,p.ub)(e.state),s=e.state.activeId?r.findIndex(t=>t.id===e.state.activeId):-1;if(!t.shiftKey&&"t"===t.key.toLowerCase()){t.preventDefault(),e.openPicker({kind:"addNewChat"});return}if(!t.shiftKey&&"w"===t.key.toLowerCase()){t.preventDefault(),e.state.activeId&&r.length>0&&e.closeTab(e.state.activeId);return}if(t.shiftKey&&("]"===t.key||"["===t.key)){if(t.preventDefault(),r.length<=1||s<0)return;let n="]"===t.key?(s+1)%r.length:(s-1+r.length)%r.length;e.activateTab(r[n].id);return}if(!t.shiftKey&&/^[1-9]$/.test(t.key)){t.preventDefault();let s=parseInt(t.key,10)-1;if(s>=r.length)return;e.activateTab(r[s].id);return}};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e]),null}var j=r(22444),k=r(11410);let N=(0,r(51719).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var w=r(48683),C=r(34015),S=r(861),I=r(87139),E=r(8476),M=r(58703);function T(e){var t;let{open:r,session:a,onCancel:l,onConfirm:i,busy:o}=e;if((0,n.useEffect)(()=>{if(!r)return;let e=e=>{"Escape"===e.key&&l()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r,l]),!r||!a)return null;let d=null!=(t=a.lastMsgPreview)?t:"(empty session)";return(0,s.jsx)("div",{role:"alertdialog","aria-modal":"true",className:"fixed inset-0 z-[60] flex items-center justify-center bg-black/40",onClick:l,children:(0,s.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"w-[min(420px,calc(100vw-2rem))] rounded-lg border border-border bg-card p-5 shadow-lg",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)(w.A,{className:"mt-0.5 h-5 w-5 shrink-0 text-rose-500","aria-hidden":!0}),(0,s.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,s.jsx)("h2",{className:"text-base font-semibold",children:"세션 잊기"}),(0,s.jsxs)("p",{className:"truncate font-mono text-xs text-muted-foreground",children:['"',d,'"']}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:[a.origin&&(0,s.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono uppercase mr-1.5",children:a.origin}),a.msgCount," 메시지"]}),(0,s.jsx)("p",{className:"text-sm",children:"이 세션을 daemon 에서 영구 삭제합니다. 다른 디바이스 (cli/tg/dc) 에서 이 세션을 보고 있으면 unknown_session 으로 빠집니다."})]})]}),(0,s.jsxs)("div",{className:"mt-4 flex justify-end gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:l,disabled:o,className:"rounded-md border border-border bg-background px-3 py-1.5 text-sm hover:bg-secondary disabled:opacity-50",children:"취소"}),(0,s.jsx)("button",{type:"button",onClick:i,disabled:o,className:"rounded-md bg-rose-500 px-3 py-1.5 text-sm font-medium text-white hover:bg-rose-600 disabled:opacity-50",children:o?"잊는 중…":"잊기"})]})]})})}var D=r(79935);let P={cli:"cli",pwa:"pwa",tg:"tg",dc:"dc"};function L(e){let{open:t,onClose:r,onPick:a,attachedSessions:l}=e,{client:o}=(0,C.Q)(),d=(0,I.hG)(o),c=(0,n.useMemo)(()=>new E.jU(o),[o]),u=(0,M.h)(),[m,x]=(0,n.useState)(""),[h,p]=(0,n.useState)(0),[f,g]=(0,n.useState)(null),[b,v]=(0,n.useState)(!1),[y,L]=(0,n.useState)(!1),[A,R]=(0,n.useState)(null),O=(0,n.useRef)(null),K=(0,n.useRef)(null);(0,n.useEffect)(()=>{t&&(x(""),p(0),R(null),d.forceRefresh())},[t,d]),(0,n.useEffect)(()=>{R(null)},[m]);let z=(0,n.useMemo)(()=>{if(!m.trim())return[...u];let e=m.trim().toLowerCase();return u.filter(t=>!!(t.id.toLowerCase().startsWith(e)||t.lastMsgPreview&&t.lastMsgPreview.toLowerCase().includes(e))||!!t.origin&&e==="[".concat(t.origin,"]")||!!t.origin&&e===t.origin)},[u,m]);if((0,n.useEffect)(()=>{h>=z.length&&p(Math.max(0,z.length-1))},[z.length,h]),(0,n.useEffect)(()=>{var e;if(!t)return;null==(e=O.current)||e.focus();let s=e=>{if("Escape"===e.key){e.preventDefault(),r();return}if((e.metaKey||e.ctrlKey)&&"n"===e.key.toLowerCase()){e.preventDefault(),J();return}if((e.metaKey||e.ctrlKey)&&"f"===e.key.toLowerCase()){var t;e.preventDefault(),null==(t=O.current)||t.focus();return}if("ArrowDown"===e.key)e.preventDefault(),p(e=>Math.min(z.length-1,e+1));else if("ArrowUp"===e.key)e.preventDefault(),p(e=>Math.max(0,e-1));else if("Enter"===e.key){let t=z[h];if(!t){m.trim().length>=4&&(e.preventDefault(),_());return}e.preventDefault(),U(t)}else if("Delete"===e.key||"Backspace"===e.key){if(e.target instanceof HTMLInputElement)return;let t=z[h];t&&(e.preventDefault(),g(t))}};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[t,z,h,r,m,y]),!t)return null;let J=()=>{a({kind:"new",sessionId:(0,S.f6)()})},U=e=>{let t=l.get(e.id);if(t)return void a({kind:"jumpToTab",tabId:t.tabId});a({kind:"existing",sessionId:e.id})},_=async()=>{let e=m.trim().toLowerCase();if(!(e.length<4)&&!y){L(!0);try{var t;let r=await c.list(!0),s=(0,E.nj)(null!=(t=r.sessions)?t:[],e);if("one"===s.kind){let e=l.get(s.id);e?a({kind:"jumpToTab",tabId:e.tabId}):a({kind:"existing",sessionId:s.id})}else"none"===s.kind?R("'".concat(e,"' 로 시작하는 세션이 없습니다.")):R("prefix 모호 — ".concat(s.count,"개 일치. 더 길게 입력하세요."))}catch(e){R("resolve 실패: ".concat(e instanceof Error?e.message:String(e)))}finally{L(!1)}}},B=async()=>{if(f){v(!0);try{await d.forget(f.id),g(null)}finally{v(!1)}}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":"채팅 세션 선택",className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",onClick:r,children:(0,s.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"flex max-h-[min(640px,90vh)] w-[min(640px,calc(100vw-2rem))] flex-col rounded-lg border border-border bg-card shadow-lg",children:[(0,s.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-4 py-3",children:[(0,s.jsx)("h2",{className:"text-base font-semibold",children:"채팅 세션"}),(0,s.jsx)("button",{type:"button","aria-label":"close",onClick:r,className:"rounded-md p-1 text-muted-foreground hover:bg-secondary hover:text-foreground",children:(0,s.jsx)(j.A,{className:"h-4 w-4"})})]}),(0,s.jsx)("div",{className:"shrink-0 px-4 py-3",children:(0,s.jsxs)("button",{type:"button",onClick:J,className:"flex w-full items-center gap-3 rounded-lg border border-primary/40 bg-primary/10 px-3 py-2.5 text-left hover:bg-primary/15",children:[(0,s.jsx)(k.A,{className:"h-5 w-5 text-primary"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:"새 세션 시작"}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"비어있는 새 채팅을 엽니다 (⌘N)"})]})]})}),(0,s.jsx)("div",{className:"shrink-0 border-y border-border bg-muted/30 px-4 py-2",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(N,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,s.jsx)("input",{ref:O,value:m,onChange:e=>x(e.target.value),placeholder:"검색 — preview text \xb7 id \xb7 [pwa]/[cli]/[tg]/[dc]",className:"flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),m&&(0,s.jsx)("button",{type:"button","aria-label":"clear search",onClick:()=>x(""),className:"rounded p-0.5 text-muted-foreground hover:bg-background",children:(0,s.jsx)(j.A,{className:"h-3 w-3"})})]})}),(0,s.jsx)("div",{ref:K,className:"min-h-0 flex-1 overflow-y-auto",children:0===z.length?(0,s.jsxs)("div",{className:"px-4 py-12 text-center",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:0!==u.length||m.trim()?"검색과 일치하는 세션 없음.":'아직 채팅 세션이 없습니다. 위 "+ 새 세션 시작" 으로 첫 채팅을 시작하세요.'}),m.trim().length>=4&&(0,s.jsx)("button",{type:"button",disabled:y,onClick:()=>void _(),className:"mt-3 rounded-md border border-violet-500/40 bg-violet-500/10 px-3 py-1.5 text-xs text-violet-300 hover:bg-violet-500/15 disabled:opacity-50",children:y?"resolve 중…":"⑂ id prefix '".concat(m.trim(),"' 로 이어가기 (Enter)")}),A&&(0,s.jsx)("p",{className:"mt-2 text-xs text-amber-400",children:A}),0===u.length&&!m.trim()&&(0,s.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:"다른 디바이스 (cli / telegram / discord) 에서 세션을 시작하면 여기에 자동으로 나타납니다."})]}):(0,s.jsx)("ul",{className:"divide-y divide-border",children:z.map((e,t)=>{var r;let n=l.get(e.id),a=t===h;return(0,s.jsx)("li",{children:(0,s.jsxs)("div",{className:(0,i.cn)("group flex items-center gap-3 px-4 py-2.5 transition-colors",a?"bg-primary/10 ring-1 ring-inset ring-primary/30":"hover:bg-secondary/50"),onMouseEnter:()=>p(t),children:[(0,s.jsxs)("button",{type:"button",onClick:()=>U(e),className:"flex min-w-0 flex-1 flex-col items-start text-left",children:[(0,s.jsxs)("div",{className:"flex w-full items-center gap-2",children:[(0,s.jsx)("span",{className:"truncate text-sm font-medium",children:null!=(r=e.lastMsgPreview)?r:(0,s.jsx)("span",{className:"text-muted-foreground italic",children:"(empty session)"})}),n&&(0,s.jsxs)("span",{className:"ml-auto shrink-0 rounded-full bg-primary/15 px-2 py-0.5 text-[10px] font-medium text-primary",children:["✓ open in ",n.label]})]}),(0,s.jsxs)("div",{className:"mt-0.5 flex items-center gap-2 text-[11px] text-muted-foreground",children:[e.origin&&(0,s.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono",children:P[e.origin]}),(0,s.jsx)("span",{children:function(e){try{let t=new Date(e).getTime();if(!Number.isFinite(t))return"";let r=Date.now()-t,s=Math.floor(r/6e4);if(s<1)return"방금 전";if(s<60)return"".concat(s,"분 전");let n=Math.floor(s/60);if(n<24)return"".concat(n,"시간 전");let a=Math.floor(n/24);if(a<7)return"".concat(a,"일 전");return new Date(t).toLocaleDateString()}catch(e){return""}}(e.lastTurnAt)}),(0,s.jsxs)("span",{children:["\xb7 ",e.msgCount," 메시지"]}),(0,s.jsx)(D.S,{sessionId:e.id,source:"picker",variant:"subtle",showCopyIcon:!1})]})]}),(0,s.jsx)("button",{type:"button","aria-label":"forget ".concat(e.id),onClick:t=>{t.stopPropagation(),g(e)},className:(0,i.cn)("shrink-0 rounded p-1.5 text-muted-foreground transition-colors hover:bg-rose-500/10 hover:text-rose-500",a?"opacity-100":"opacity-0 group-hover:opacity-100"),children:(0,s.jsx)(w.A,{className:"h-4 w-4"})})]})},e.id)})})}),(0,s.jsxs)("div",{className:"shrink-0 border-t border-border bg-muted/30 px-4 py-2 text-[10px] text-muted-foreground",children:[(0,s.jsx)("span",{className:"mr-3",children:"↑↓ 이동"}),(0,s.jsx)("span",{className:"mr-3",children:"Enter 선택"}),(0,s.jsx)("span",{className:"mr-3",children:"⌘N 새 세션"}),(0,s.jsx)("span",{className:"mr-3",children:"⌘F 검색"}),(0,s.jsx)("span",{children:"Del 잊기"})]})]})}),(0,s.jsx)(T,{open:null!==f,session:f,busy:b,onCancel:()=>g(null),onConfirm:B})]})}let A=new Set(["chat","term","intake","tasks","control","settings"]);function R(){var e;let t=(0,l.hA)(),r=(0,a.useRouter)(),i=(0,a.useSearchParams)(),o=null!=(e=null==i?void 0:i.get("intent"))?e:null,d=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(o&&d.current!==o){if(!A.has(o))return void r.replace("/workspace");if(d.current=o,"chat"===o){let e=(0,p.ub)(t.state).find(e=>"chat"===e.kind);e?t.activateTab(e.id):t.openPicker({kind:"addNewChat"})}else t.activateOrAdd(o);r.replace("/workspace")}},[o,t,r]);let c=(0,n.useMemo)(()=>{let e=new Map,r=0;for(let s of t.state.order){let n=t.state.tabs.find(e=>e.id===s);n&&"chat"===n.kind&&(r+=1,e.set(n.sessionId,{tabId:n.id,label:"chat#".concat(r)}))}return e},[t.state.order,t.state.tabs]);return(0,s.jsxs)("div",{className:"flex h-full flex-col",children:[(0,s.jsx)(y,{}),(0,s.jsx)("div",{className:"flex-1 min-h-0",children:(0,s.jsx)(v,{})}),(0,s.jsx)(L,{open:null!==t.pickerMode,onClose:t.closePicker,onPick:e=>{let r=t.pickerMode;r&&("jumpToTab"===e.kind?t.activateTab(e.tabId):"addNewChat"===r.kind?t.addTab({kind:"chat",sessionId:e.sessionId}):"attachToTab"===r.kind&&(t.updateChatTab(r.tabId,{sessionId:e.sessionId}),t.activateTab(r.tabId)),t.closePicker())},attachedSessions:c})]})}function O(){return(0,s.jsx)(n.Suspense,{fallback:(0,s.jsx)("div",{className:"h-full"}),children:(0,s.jsx)(R,{})})}},33015:(e,t,r)=>{Promise.resolve().then(r.bind(r,22817))}},e=>{e.O(0,[8112,4419,4853,7294,764,9704,6123,2300,4240,6588,5007,4217,8918,4015,5391,3717,3929,3611,7262,5890,8320,5244,7868,4440,6604,2684,9243,7429,7358],()=>e(e.s=33015)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2975],{8666:(e,t,s)=>{"use strict";s.d(t,{AF:()=>r});let r={all:["nexus"],health:()=>[...r.all,"health"],snapshot:()=>[...r.all,"snapshot"],tabs:e=>e?[...r.all,"tabs",{kind:e}]:[...r.all,"tabs"],tab:e=>[...r.all,"tab",e],templates:()=>[...r.all,"templates"],template:e=>[...r.all,"template",e],config:()=>[...r.all,"config"],switches:()=>[...r.all,"switches"],switch:e=>[...r.all,"switch",e],secrets:()=>[...r.all,"secrets"],bindingChannels:()=>[...r.all,"bindings","channels"],bindings:e=>[...r.all,"bindings",e],binding:(e,t)=>[...r.all,"binding",e,t],logsTail:(e,t)=>t?[...r.all,"logs",e,{lines:t}]:[...r.all,"logs",e],workflows:()=>[...r.all,"workflows"],workflow:e=>[...r.all,"workflow",e],workflowRun:e=>[...r.all,"workflow-run",e],workflowRuns:()=>[...r.all,"workflow-runs"],pendingApprovals:()=>[...r.all,"workflow-pending-approvals"],platforms:()=>[...r.all,"platforms"],providers:()=>[...r.all,"providers"],worktrees:()=>[...r.all,"worktrees"],designCheck:()=>[...r.all,"design-check"],designPreviews:()=>[...r.all,"design-previews"],designPreview:e=>[...r.all,"design-preview",e],registryCatalog:()=>[...r.all,"registry-catalog"],resolvedView:()=>[...r.all,"resolved-view"]};r.snapshot(),r.tabs(),r.health(),r.snapshot(),r.config(),r.switches()},19875:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(51719).A)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]])},23783:(e,t,s)=>{"use strict";let r;s.d(t,{cY:()=>d,x8:()=>l});let a={debug:0,info:1,warn:2,error:3},i="/v1/debug-logs/batch",n=null;function l(e){n=e}class o{health(){return{pending:this.queue.length,consecutiveFailures:this.consecutiveFailures,lastOkAt:this.lastOkAt,droppedByCap:this.droppedByCap,fallbackBatches:this.fallbackBatches}}push(e){if(!(a[function(e){let t=e.slice(e.lastIndexOf(".")+1).toLowerCase();return/^(error|exception|crash|fail|failed)$/.test(t)?"error":/^(warn|degraded|timeout)$/.test(t)?"warn":/^(boot|ready|start|begin|open|ok|done|resolve|end|stop|close)$/.test(t)?"info":"debug"}(e.category)]<a[this.minLevel])){if(this.queue.push(e),this.queue.length>500){let e=this.queue.length-500;this.droppedByCap+=e,this.queue.splice(0,e)}null===this.timer&&(this.timer=setTimeout(()=>{this.flush()},100))}}async flush(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.inFlight||0===this.queue.length)return;let e=this.queue.slice(0,100);this.inFlight=!0;let t=!1,s=JSON.stringify({records:e});try{var r,a;t=await (r=this.fetchFn(s),a=this.postTimeoutMs,new Promise((e,t)=>{let s=setTimeout(()=>t(Error("debug-forward timeout after ".concat(a,"ms"))),a);r.then(t=>{clearTimeout(s),e(t)},e=>{clearTimeout(s),t(e)})}))}catch(e){t=!1}finally{this.inFlight=!1}if(!t){if(this.consecutiveFailures+=1,this.consecutiveFailures>=2&&n)try{await n(JSON.stringify({records:[...e,this.blockedNotice()]}))&&(this.fallbackBatches+=1)}catch(e){}this.wasFailing=!0,this.scheduleRetry();return}let i=this.lastOkAt;this.lastOkAt=Date.now();let l=this.consecutiveFailures;this.consecutiveFailures=0,this.queue.splice(0,e.length),this.wasFailing&&(this.wasFailing=!1,this.queue.push({ts:new Date().toISOString(),category:"pwa.debug-forwarder.recovered",event:"recovered",data:{consecutiveFailures:l,droppedByCap:this.droppedByCap,fallbackBatches:this.fallbackBatches,pending:this.queue.length,previousOkAt:i},source:{platform:"pwa"}})),this.queue.length>0&&null===this.timer&&(this.timer=setTimeout(()=>{this.flush()},100))}scheduleRetry(){if(null!==this.timer||0===this.queue.length)return;let e=Math.min(100*2**this.consecutiveFailures,3e4);this.timer=setTimeout(()=>{this.flush()},e)}blockedNotice(){return{ts:new Date().toISOString(),category:"pwa.debug-forwarder.http-blocked",event:"http-blocked",data:{consecutiveFailures:this.consecutiveFailures,pending:this.queue.length,droppedByCap:this.droppedByCap,lastOkAt:this.lastOkAt,via:"acp-fallback"},source:{platform:"pwa"}}}beaconFlush(){if(0!==this.queue.length)try{if("undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon){let e=this.queue.slice(0,100),t=new Blob([JSON.stringify({records:e})],{type:"application/json"});navigator.sendBeacon(i,t)&&this.queue.splice(0,e.length)}}catch(e){}}get pending(){return this.queue.length}constructor(e=c,t="debug",s=1e4){this.fetchFn=e,this.minLevel=t,this.postTimeoutMs=s,this.queue=[],this.timer=null,this.inFlight=!1,this.consecutiveFailures=0,this.lastOkAt=null,this.droppedByCap=0,this.fallbackBatches=0,this.wasFailing=!1}}async function c(e){return(await fetch(i,{method:"POST",headers:{"content-type":"application/json"},body:e,keepalive:!0,..."undefined"!=typeof AbortSignal&&"function"==typeof AbortSignal.timeout?{signal:AbortSignal.timeout(1e4)}:{}})).ok}function d(e,t){if("undefined"==typeof console)return;let s=new Date().toISOString();if(void 0!==t){let r="";try{let e=new WeakSet;r=JSON.stringify(t,(t,s)=>{if("bigint"==typeof s)return"".concat(s.toString(),"n");if("function"==typeof s)return"[fn ".concat(s.name||"anon","]");if(s&&"object"==typeof s){if(e.has(s))return"[circular]";e.add(s)}return s})}catch(e){r="[unserializable: ".concat(String(e),"]")}r&&r.length>800&&(r=r.slice(0,797)+"..."),console.debug("[".concat(s,"] ").concat(e," ").concat(r),t),u(s,e,r)}else console.debug("[".concat(s,"] ").concat(e)),u(s,e,void 0)}function u(e,t,s){let a,i=function(){if(void 0!==r)return r;let e=function(){try{let e="off"!==window.localStorage.getItem("elanous.pwa.debug.forward"),t=window.localStorage.getItem("elanous.pwa.debug.forwardLevel");return{forward:e,level:"info"===t||"warn"===t||"error"===t?t:"debug"}}catch(e){return{forward:!0,level:"debug"}}}();if(!e.forward)return r=null,null;let t=new o(c,e.level);try{window.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&t.beaconFlush()})}catch(e){}return r=t,t}();if(!i)return;let n=t.slice(t.lastIndexOf(".")+1)||t;if(void 0!==s&&""!==s)try{a=JSON.parse(s)}catch(e){a=s}i.push({ts:e,category:t,event:n,...void 0!==a?{data:a}:{},source:{platform:"pwa"}})}},28817:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(51719).A)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},31550:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(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"}]])},33919:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(51719).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},41604:(e,t,s)=>{"use strict";s.d(t,{Qb:()=>n,SI:()=>o,dJ:()=>l});let r="elanous:auth-required",a=null,i=!1;function n(e){null===a&&(a=e,window.dispatchEvent(new CustomEvent(r,{detail:{path:e}})))}function l(e){let t=window,s=t=>e(t.detail);return t.addEventListener(r,s),null===a||i||e({path:a}),()=>t.removeEventListener(r,s)}function o(){i=!0}},44098:(e,t,s)=>{Promise.resolve().then(s.bind(s,81343))},48683:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(51719).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},62866:(e,t,s)=>{"use strict";s.d(t,{M1:()=>c,Qj:()=>d,tI:()=>o});var r=s(58443),a=s(77947),i=s(93741),n=s(66328);let l=(0,a.createContext)(null);function o(e){let{client:t,queryClient:s,defaultStaleTimeMs:o,children:c}=e,d=(0,a.useMemo)(()=>null!=s?s:new i.E({defaultOptions:{queries:{staleTime:null!=o?o:2e3,refetchOnWindowFocus:!1}}}),[s,o]);return(0,r.jsx)(l.Provider,{value:t,children:(0,r.jsx)(n.Ht,{client:d,children:c})})}function c(){let e=(0,a.useContext)(l);if(!e)throw Error("useNexusClient must be used within <NexusProvider>");return e}function d(){return(0,a.useContext)(l)}},81343:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>O});var r=s(58443),a=s(77947),i=s(97923),n=s(28817),l=s(19875),o=s(51719);let c=(0,o.A)("folder-tree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);var d=s(31550),u=s(33919);let h=(0,o.A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);var p=s(48683),m=s(62866),x=s(79998),f=s(66328),g=s(98813),y=s(8666),b=s(75391);let w={orphan:0,active:1,detached:2,idle:3,main:4},v={orphan:"Orphan",active:"Active",detached:"Detached",idle:"Idle",main:"Main"},k={orphan:"bg-error/10 text-error",active:"bg-green-600/10 text-green-700",detached:"bg-warning/10 text-warning",idle:"bg-muted text-muted-foreground",main:"bg-primary/10 text-primary"},j={orphan:i.A,active:n.A,detached:l.A,idle:c,main:c};function N(){return(0,m.Qj)()?(0,r.jsx)(M,{}):(0,r.jsxs)("div",{className:"mx-auto max-w-2xl space-y-2 p-6",children:[(0,r.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"Worktrees"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"Connect to a NEXUS daemon to see active worktrees."})]})}function M(){var e,t,s,n;let{data:l,isLoading:o,error:N,refetch:M,isFetching:O}=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=(0,m.M1)();return(0,x.I)({queryKey:y.AF.worktrees(),queryFn:()=>s.getWorktrees(),enabled:null==(e=t.enabled)||e,refetchInterval:5e3})}(),S=function(){let e=(0,m.M1)(),t=(0,f.jE)();return(0,g.n)({mutationFn:async t=>{try{return await e.disposeWorktree(t)}catch(t){let e=function(e){if(e instanceof b.Iu&&e.body&&"object"==typeof e.body){let t=e.body;if("ok"in t)return t}return null}(t);if(e)return e;throw t}},onSuccess:e=>{e.ok&&t.invalidateQueries({queryKey:y.AF.worktrees()})}})}(),[C,F]=(0,a.useState)(null),q=null!=(e=null==l?void 0:l.repoRoot)?e:null,E=null!=(t=null==l?void 0:l.worktrees)?t:[],R=null!=(s=null==l?void 0:l.orphanedSessions)?s:[],I=E.map(e=>({view:e,status:e.orphan?"orphan":e.isMain?"main":e.isDetached?"detached":e.session&&e.session.alive?"active":"idle"})).sort((e,t)=>{var s,r,a,i;let n=null!=(s=w[e.status])?s:99,l=null!=(r=w[t.status])?r:99;if(n!==l)return n-l;let o=null!=(a=e.view.branch)?a:"~detached",c=null!=(i=t.view.branch)?i:"~detached";return o.localeCompare(c)}),B=function(e){let t={total:e.length,active:0,orphan:0,idle:0,detached:0,main:0};for(let s of e)t[s.status]+=1;return t}(I),P=Date.now(),L=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=!0===t.force,r=s?"Force-remove this worktree (will discard local changes)?\n\n".concat(e):t.locked?"This worktree is locked. Removing it will fail unless you force.\nProceed with --force?\n\n".concat(e):"Remove this worktree?\n\n".concat(e);if(!window.confirm(r))return;let a=await S.mutateAsync({path:e,force:s||!0===t.locked});F({path:e,result:a})};return(0,r.jsxs)("div",{className:"mx-auto max-w-5xl space-y-4 p-6",children:[(0,r.jsxs)("header",{className:"space-y-1",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("h1",{className:"flex items-center gap-2 text-xl font-semibold tracking-tight",children:[(0,r.jsx)(c,{className:"h-5 w-5"}),"Worktrees"]}),(0,r.jsxs)("button",{type:"button",onClick:()=>M(),disabled:O,"aria-label":"Refresh worktrees",className:"flex items-center gap-1 rounded-md border border-border px-2 py-1 text-[11px] hover:bg-surface-elevated disabled:opacity-50",children:[(0,r.jsx)(d.A,{className:"h-3 w-3 ".concat(O?"animate-spin":"")}),"Refresh"]})]}),q?(0,r.jsx)("p",{className:"text-[11px] font-mono text-muted-foreground",children:q}):(0,r.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["No repository found. Set ",(0,r.jsx)("code",{className:"font-mono",children:"harness.defaultRepo"})," (absolute path) in Settings, or start NEXUS inside a checkout."]})]}),N&&(0,r.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-error",children:[(0,r.jsx)(u.A,{className:"h-3 w-3"}),N instanceof Error?N.message:"Failed to load worktrees"]}),o&&!l&&(0,r.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Querying /v1/worktrees…"}),l&&(0,r.jsx)(A,{summary:B}),C&&(0,r.jsx)("div",{"data-testid":"worktree-dispose-result","data-result-status":C.result.ok?"ok":"error",className:"rounded-md border px-2.5 py-1.5 text-[11px] ".concat(C.result.ok?"border-green-600/40 bg-green-600/5 text-green-700":"border-error/40 bg-error/5 text-error"),children:(0,r.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,r.jsxs)("span",{children:[C.result.ok?"".concat("orphan-session-cleanup"===C.result.action?"Cleared orphan session":"Removed worktree"," — ").concat(C.path):"Dispose failed — ".concat(null!=(n=C.result.error)?n:"unknown error"),C.result.detail&&(0,r.jsxs)("span",{className:"ml-1 font-mono text-[10px] opacity-80",children:["(",C.result.detail,")"]})]}),(0,r.jsx)("button",{type:"button",onClick:()=>F(null),className:"text-[10px] underline opacity-70 hover:opacity-100",children:"dismiss"})]})}),l&&I.length>0&&(0,r.jsx)("section",{"data-testid":"worktree-list",className:"overflow-x-auto rounded-md border border-border",children:(0,r.jsxs)("table",{className:"min-w-full text-[11px]",children:[(0,r.jsx)("thead",{className:"bg-surface-elevated",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",children:"Status"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",children:"Branch"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",children:"Path"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",children:"SHA"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",children:"Owner"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",children:"Entered"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-right font-medium",children:"Actions"})]})}),(0,r.jsx)("tbody",{children:I.map(e=>{var t;let{view:s,status:a}=e,i=j[a];return(0,r.jsxs)("tr",{"data-testid":"worktree-row-".concat(s.path),"data-status":a,className:"border-t border-border",children:[(0,r.jsxs)("td",{className:"px-2 py-1.5",children:[(0,r.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-wider ".concat(k[a]),children:[(0,r.jsx)(i,{className:"h-3 w-3"}),v[a]]}),s.isLocked&&(0,r.jsx)("span",{title:"locked",className:"ml-1 inline-flex items-center text-warning",children:(0,r.jsx)(h,{className:"h-3 w-3"})})]}),(0,r.jsx)("td",{className:"px-2 py-1.5 font-mono",children:null!=(t=s.branch)?t:(0,r.jsx)("span",{className:"text-muted-foreground",children:"—"})}),(0,r.jsx)("td",{className:"px-2 py-1.5 font-mono text-[10px] text-muted-foreground",children:s.path}),(0,r.jsx)("td",{className:"px-2 py-1.5 font-mono text-[10px] text-muted-foreground",children:s.sha.slice(0,7)}),(0,r.jsx)("td",{className:"px-2 py-1.5",children:s.session?(0,r.jsxs)("span",{className:"text-[10px] ".concat(s.session.alive?"text-foreground":"text-error"),children:["pid ",s.session.sessionId,s.session.alive?" (alive)":" (dead — orphan)"]}):(0,r.jsx)("span",{className:"text-[10px] text-muted-foreground",children:"—"})}),(0,r.jsx)("td",{className:"px-2 py-1.5 text-[10px] text-muted-foreground",children:s.session?function(e,t){if(void 0===t)return"";let s=Math.floor(Math.max(0,e-t)/1e3);if(s<60)return"".concat(s,"s ago");let r=Math.floor(s/60);if(r<60)return"".concat(r,"m ago");let a=Math.floor(r/60);if(a<24)return"".concat(a,"h ago");let i=Math.floor(a/24);return"".concat(i,"d ago")}(P,s.session.enteredAt):""}),(0,r.jsx)("td",{className:"px-2 py-1.5 text-right",children:s.isMain?(0,r.jsx)("span",{className:"text-[10px] text-muted-foreground",children:"—"}):(0,r.jsxs)("button",{type:"button","data-testid":"dispose-worktree-".concat(s.path),onClick:()=>L(s.path,{locked:s.isLocked}),disabled:S.isPending,className:"inline-flex items-center gap-1 rounded-md border border-border px-1.5 py-0.5 text-[10px] text-error hover:bg-error/10 disabled:opacity-50","aria-label":"Dispose worktree ".concat(s.path),children:[(0,r.jsx)(p.A,{className:"h-3 w-3"}),"Dispose"]})})]},s.path)})})]})}),l&&0===I.length&&(0,r.jsx)("p",{className:"text-[11px] text-muted-foreground","data-testid":"worktree-empty",children:"No worktrees registered."}),l&&R.length>0&&(0,r.jsxs)("section",{"data-testid":"orphaned-sessions",className:"space-y-1",children:[(0,r.jsxs)("h2",{className:"flex items-center gap-1 text-sm font-medium text-warning",children:[(0,r.jsx)(i.A,{className:"h-4 w-4"}),"Orphaned sessions (",R.length,")"]}),(0,r.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Worktree directory was removed (e.g., via ",(0,r.jsx)("code",{children:"git worktree remove"}),") but the session JSON wasn't cleaned. Boot-time stale-cleanup will reap these the next time NEXUS restarts."]}),(0,r.jsx)("ul",{className:"space-y-1 text-[11px]",children:R.map(e=>(0,r.jsxs)("li",{"data-testid":"orphan-session-".concat(e.sessionId),className:"rounded-md border border-warning/40 bg-warning/5 px-2 py-1.5",children:[(0,r.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("span",{className:"font-mono",children:["pid ",e.sessionId]})," ",(0,r.jsxs)("span",{className:"text-muted-foreground",children:["(",e.alive?"alive (unusual)":"dead",")"]})]}),(0,r.jsxs)("button",{type:"button","data-testid":"cleanup-orphan-".concat(e.sessionId),onClick:()=>L(e.worktreePath),disabled:S.isPending,className:"inline-flex items-center gap-1 rounded-md border border-border px-1.5 py-0.5 text-[10px] text-error hover:bg-error/10 disabled:opacity-50","aria-label":"Clear orphan session ".concat(e.sessionId),children:[(0,r.jsx)(p.A,{className:"h-3 w-3"}),"Cleanup"]})]}),(0,r.jsxs)("div",{className:"font-mono text-[10px] text-muted-foreground",children:["branch ",(0,r.jsx)("strong",{children:e.branch})," \xb7 ",e.worktreePath]})]},e.sessionId))})]})]})}function A(e){let{summary:t}=e,s=[{label:"Total",value:t.total,cls:"text-foreground"},{label:"Active",value:t.active,cls:"text-green-700"},{label:"Orphan",value:t.orphan,cls:"text-error"},{label:"Idle",value:t.idle,cls:"text-muted-foreground"},{label:"Detached",value:t.detached,cls:"text-warning"}];return(0,r.jsx)("div",{"data-testid":"worktree-summary",className:"flex flex-wrap items-baseline gap-3 text-[11px]",children:s.map(e=>(0,r.jsxs)("span",{className:"flex items-baseline gap-1",children:[(0,r.jsx)("span",{className:"text-muted-foreground",children:e.label}),(0,r.jsx)("span",{className:"font-medium ".concat(e.cls),children:e.value})]},e.label))})}function O(){return(0,r.jsx)(N,{})}},97923:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(51719).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},98813:(e,t,s)=>{"use strict";s.d(t,{n:()=>d});var r=s(77947),a=s(28487),i=s(63028),n=s(84341),l=s(29401),o=class extends n.Q{#e;#t=void 0;#s;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,l.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.EN)(t.mutationKey)!==(0,l.EN)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#a(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#a(),this.#i()}mutate(e,t){return this.#r=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#a(){let e=this.#s?.state??(0,a.$)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#i(e){i.jG.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,s=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#r.onSuccess?.(e.data,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,s,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#r.onError?.(e.error,t,s,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,s,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},c=s(66328);function d(e,t){let s=(0,c.jE)(t),[a]=r.useState(()=>new o(s,e));r.useEffect(()=>{a.setOptions(e)},[a,e]);let n=r.useSyncExternalStore(r.useCallback(e=>a.subscribe(i.jG.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),d=r.useCallback((e,t)=>{a.mutate(e,t).catch(l.lQ)},[a]);if(n.error&&(0,l.GU)(a.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:d,mutateAsync:n.mutate}}}},e=>{e.O(0,[764,2300,5391,9243,7429,7358],()=>e(e.s=44098)),_N_E=e.O()}]);
|