elanous 0.3.4 → 0.3.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/apps/pwa/out/404/index.html +1 -1
- package/apps/pwa/out/404.html +1 -1
- package/apps/pwa/out/_next/static/chunks/{6fa80ede.7b05276e6be12b1d.js → 01af03c4.71e22e1e1aca813e.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/0e3e9261.84afa98360d3b889.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1163.de587836684ae0e8.js +74 -0
- package/apps/pwa/out/_next/static/chunks/124-5c8fb000f2fef6fd.js +1 -0
- package/apps/pwa/out/_next/static/chunks/147.48bf376824f7df0a.js +8 -0
- package/apps/pwa/out/_next/static/chunks/1623-0cd4aabb94e3fc0d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1689-5ee3c3dd16ab8667.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1783.708de9a0182ac571.js +41 -0
- package/apps/pwa/out/_next/static/chunks/1807-778f3031dc089a09.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{5892-6f0a1ee3c6c38173.js → 1911-bc30f2d39d2b318e.js} +3 -3
- package/apps/pwa/out/_next/static/chunks/1968.4f77d6f940c26d94.js +1 -0
- package/apps/pwa/out/_next/static/chunks/1985.ab97a36d1b3a9458.js +36 -0
- package/apps/pwa/out/_next/static/chunks/2169.709268f6190a67e4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2215.90b2a595c9880580.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2233.061c80f2a79abb24.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2466.ff652b24ae9dee2a.js +32 -0
- package/apps/pwa/out/_next/static/chunks/2541-70d25b112ae1960d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2556-14a3c1858511d4b2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{6764.ec2d2cf14278c473.js → 259.ff45e655e5e41a4d.js} +16 -16
- package/apps/pwa/out/_next/static/chunks/2592.cc0b9dc547aca123.js +104 -0
- package/apps/pwa/out/_next/static/chunks/2708-f51dd5bc56aed2a7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2845ea08.c590f5c7ddc06b98.js +122 -0
- package/apps/pwa/out/_next/static/chunks/2856-d3c6d2706d6cc45e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/2883-5b4aaa3950d416c2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{6355.34fd60aca3e95acf.js → 2999.c462d95ab66dba3a.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{d7c7394d.c015f14113d7faef.js → 2c8c2385.34ce9456dac99420.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/3085.59001f746a9a2e8c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3162-94995e3e8f1524f3.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3176.fcf82fd6b3fcfff5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{1695-e63446cc38743225.js → 3177-151f3b49f3b2d2ef.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/3196.4d0730f411899434.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{4935.7f5b0bd162f201cc.js → 3235.7b9c3e9c55ea6d98.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/3414-037ce9f127904fe2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/348.b77e8e6b6ed5230c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3483-f7f5f9a66e1780ad.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3501.d2b92806ac1d949e.js +287 -0
- package/apps/pwa/out/_next/static/chunks/3552.e6be7ac885976039.js +1 -0
- package/apps/pwa/out/_next/static/chunks/366-eb724714d15eb3f4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/3700.422355522e15e182.js +2 -0
- package/apps/pwa/out/_next/static/chunks/3789.443ac3d6037b503c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4278.5624379f0c23ee3d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4365-9e2bea90e6243b8e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4388.42598a55da8c47cf.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4530.3a14a074896302f2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4557-3b576c4706df592d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{2538.f7b0fd1f3b0c2bff.js → 4647.a6e02754d5dcf398.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/4793-a77c3acf9ffc4454.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4806.d7a41078ec5f9e6f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4881.ad56fcbdcfb39a23.js +1 -0
- package/apps/pwa/out/_next/static/chunks/4983.cb812be748dd07e5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5054.cef07be26f74f202.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5075.b30af8ae9aadc959.js +226 -0
- package/apps/pwa/out/_next/static/chunks/{8108.2cd332dff4f07acd.js → 5323.277ad337906fe70a.js} +3 -3
- package/apps/pwa/out/_next/static/chunks/5464-5837a4fba34df983.js +1 -0
- package/apps/pwa/out/_next/static/chunks/5535-3d077c5296902ba6.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{1549.81d2a59aa303b629.js → 5640.b32a01e556340532.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/5654.1b52dfa2ffb08352.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6.aa2a99e9454c9a8d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6208.70eba139a9c68af3.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{448.26b198f3b58cbcf9.js → 6251.a547705e850c5149.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/6253.d4f0940b616f889d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6281-8492f70e843316fa.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6289-3c8732cbeeeb62a2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6332-d5edcc5c35500524.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6433.e0006a1e924a2131.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6437.3cd4d04efb8ab871.js +286 -0
- package/apps/pwa/out/_next/static/chunks/6461-5584cf24a661817a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6618-9b8d9a46ede0c41e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6715-f1316dd169ff9f50.js +1 -0
- package/apps/pwa/out/_next/static/chunks/6735-e62669175cce8686.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{4578.04c77c13e3c62361.js → 6841.ed452e7d06f598ee.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/6937.0bdc3185f2ace9e4.js +79 -0
- package/apps/pwa/out/_next/static/chunks/{922c23f1.797bdf68f73f0488.js → 6c25ab46.9d19c4994d7f5495.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/7015-6abc8f1809ff071f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7056-c994bfc3e3701439.js +1 -0
- package/apps/pwa/out/_next/static/chunks/712-4496b0c3ac3e4b75.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7151.d2511e5f23155242.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7228.8cb7ac9d98e331d5.js +34 -0
- package/apps/pwa/out/_next/static/chunks/725.63b4017563b04379.js +93 -0
- package/apps/pwa/out/_next/static/chunks/{5456-e9f9027af2bb4799.js → 7250-70e47260b60cd47e.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/7263-34fefd269746719c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{3130.69315cfa410b3cc7.js → 7663.e4ea6f8c14df314c.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/77.b432098b663eb23e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{2987.f36195bfacdbcc4e.js → 770.f7b4481b25fe01c4.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/7746.c8b9b75e18472c54.js +115 -0
- package/apps/pwa/out/_next/static/chunks/{1004.b334bd3d776bd455.js → 7923.35fed012b66d1420.js} +3 -3
- package/apps/pwa/out/_next/static/chunks/7959.4e02edd1fdf86b05.js +1 -0
- package/apps/pwa/out/_next/static/chunks/7974-b134a047264b1e55.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8089-c13a0ed6973e7490.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8101.31728c5a01a6167b.js +77 -0
- package/apps/pwa/out/_next/static/chunks/8231.297058c760d62aee.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8389.af75612ea24ceba6.js +24 -0
- package/apps/pwa/out/_next/static/chunks/8427.085d79f7afbb3825.js +149 -0
- package/apps/pwa/out/_next/static/chunks/8473.20a465ef76441b50.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8541.3a501dabd3140fd0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8739-f0deba2b3e06427c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8818.02938c951b1000d1.js +94 -0
- package/apps/pwa/out/_next/static/chunks/8846.3103ace634243ee8.js +64 -0
- package/apps/pwa/out/_next/static/chunks/8847.72b1b3e33bcad95a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/8883-30b5a763ec36eafa.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{7644.bdbfed1da174219e.js → 9052.0be41f794a5fb029.js} +2 -2
- package/apps/pwa/out/_next/static/chunks/9086.b691a72402d521d5.js +27 -0
- package/apps/pwa/out/_next/static/chunks/9133.0be4ebb6c50cd78a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/916.3a04c642f0e5ff90.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9240.1637f5e69335d06b.js +62 -0
- package/apps/pwa/out/_next/static/chunks/9298-cd7b117f1a5be480.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9340-c2ac8651b03e94b2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9376.35941fbddcbfe1d4.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9424.9062e8119fae997a.js +24 -0
- package/apps/pwa/out/_next/static/chunks/9486.8ef4e64969908842.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9488.98d1b3c092da470a.js +23 -0
- package/apps/pwa/out/_next/static/chunks/{4055-90325ff209cd557e.js → 9648-42f1d4648cfa7eb8.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/9781-946d591f1e66da8d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9844.72bbf73fd214af65.js +90 -0
- package/apps/pwa/out/_next/static/chunks/9850.90badc8e9b213e5a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9868.027b845025f57183.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9948-dbde92fff6625cad.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9951-b903d4a257c01657.js +1 -0
- package/apps/pwa/out/_next/static/chunks/9ccc18c7-87a6c1410d97d560.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{6cd6be76.9d27e7414d939d53.js → abec6764.4a84c474be416fb7.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/_not-found/page-a76e282302331a47.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/approvals/page-9c79d56c52c3b39c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-cd45c61031d63214.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/board/page-e133c057c3c62663.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/botlab/page-89ff7827ff5f449f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/bots/page-0cd71686fa026045.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ceo/page-a0b329a1295e9704.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/chat/page-f4b64283a86189e3.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/consult/page-c6567da3170d92b7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/control/page-90bff14d4d1104a9.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/decisions/{page-9b16ae10bbe63997.js → page-bc7f2d53539f1599.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-51dd1cfa869e3e9e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/editor/page-734e98ce83fcb338.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/exec/page-0dbd78003825005e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/field/page-d716d9e3eebe01c9.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/healthz/route-a76e282302331a47.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/inside/page-35ac985a392a23da.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/intake/page-8169a6d36aca9d00.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/layout-c07319ebc55c858f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/live/page-e74b1236e3318957.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/live-run/{page-e7e02e459ca54062.js → page-f2d9e65f2fa34919.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/loops/page-e44e85553f3d1747.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/market/page-9786452dd87449f8.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-c01f73b8ca382e89.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/morning/page-4ba4b24fc4aa2262.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/not-found-e4f1cff672c21cf5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/observatory/{page-65ecf674fc5e9d19.js → page-7408295e90c5f3da.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/checklist/{page-d34cea406f837407.js → page-5145d13713aa12ba.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/release/{page-7d69cc10c33882b7.js → page-4b40d62f2182addf.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/resources/page-cbf974b1f9c988e2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-e63ff6bd28f8c0c9.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/outputs/page-a9dd827a1ab83e4f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/page-367850708c52c660.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/reflection/page-b1456fb9b51a4fd7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/scheduler/page-26867b3d37b1e7a8.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/sessions/{page-1156870631db0555.js → page-82c9de5c8c37b051.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-7f03bb1e52c1a43d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/settings/page-8b9f729cfc8ebc14.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-f2dec730b93abfab.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/layout-a76e282302331a47.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/page-fa6f33a05e473556.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/share/page-5e0e3113bfda415d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-7864eff18ce702ba.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/tasks/page-e29cc254c3ee0054.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/term/page-cd2f7856a7dc4849.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/today/page-2de3d35eb5a86aae.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/trace/page-cdb70038ead4a184.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/vault/page-e093c97ee87aca70.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-fb97121241bc7cfc.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-3072b3b9e14ea04d.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-a976e10f6c3f82bd.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-dfbc7268ba631190.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{49263d14.0a995d745de3f818.js → c9c445f7.15a7d747f61c56e6.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{57af6223.b79d56584a040f84.js → d1dc888b.cc6ca4afda9a5ef8.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/dc5145c8.9547e252e2e1d3d1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/e5a2a050-4b51c1f86f5cc4bb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/framework-5a93f9a572271e1c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/main-1c2ba214755ef1d0.js +1 -0
- package/apps/pwa/out/_next/static/chunks/main-app-55b1247a78f22727.js +1 -0
- package/apps/pwa/out/_next/static/chunks/pages/_app-239264d5fa7469e1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/pages/_error-8184168567215c6b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/webpack-0144ea4a99833df5.js +1 -0
- package/apps/pwa/out/_next/static/{v4GHQkFrQs8lzZY_KFv9_ → iXeJzCRg0ENSSl_RTbGIN}/_buildManifest.js +1 -1
- package/apps/pwa/out/approvals/index.html +1 -1
- package/apps/pwa/out/approvals/index.txt +22 -22
- package/apps/pwa/out/autopilot/index.html +1 -1
- package/apps/pwa/out/autopilot/index.txt +22 -22
- package/apps/pwa/out/board/index.html +1 -1
- package/apps/pwa/out/board/index.txt +22 -22
- package/apps/pwa/out/botlab/index.html +1 -1
- package/apps/pwa/out/botlab/index.txt +21 -21
- package/apps/pwa/out/bots/index.html +1 -1
- package/apps/pwa/out/bots/index.txt +21 -21
- package/apps/pwa/out/ceo/index.html +1 -1
- package/apps/pwa/out/ceo/index.txt +22 -22
- package/apps/pwa/out/chat/index.html +1 -1
- package/apps/pwa/out/chat/index.txt +21 -21
- package/apps/pwa/out/consult/index.html +1 -1
- package/apps/pwa/out/consult/index.txt +22 -22
- package/apps/pwa/out/control/index.html +1 -1
- package/apps/pwa/out/control/index.txt +22 -22
- package/apps/pwa/out/decisions/index.html +1 -1
- package/apps/pwa/out/decisions/index.txt +21 -21
- package/apps/pwa/out/design-check/index.html +1 -1
- package/apps/pwa/out/design-check/index.txt +22 -22
- package/apps/pwa/out/editor/index.html +1 -1
- package/apps/pwa/out/editor/index.txt +22 -22
- package/apps/pwa/out/exec/index.html +1 -1
- package/apps/pwa/out/exec/index.txt +22 -22
- package/apps/pwa/out/field/index.html +1 -1
- package/apps/pwa/out/field/index.txt +22 -22
- package/apps/pwa/out/healthz +1 -1
- package/apps/pwa/out/index.html +1 -1
- package/apps/pwa/out/index.txt +21 -21
- package/apps/pwa/out/inside/index.html +1 -1
- package/apps/pwa/out/inside/index.txt +21 -21
- package/apps/pwa/out/intake/index.html +1 -1
- package/apps/pwa/out/intake/index.txt +22 -22
- package/apps/pwa/out/live/index.html +1 -1
- package/apps/pwa/out/live/index.txt +22 -22
- package/apps/pwa/out/live-run/index.html +1 -1
- package/apps/pwa/out/live-run/index.txt +22 -22
- package/apps/pwa/out/loops/index.html +1 -1
- package/apps/pwa/out/loops/index.txt +21 -21
- package/apps/pwa/out/market/index.html +1 -1
- package/apps/pwa/out/market/index.txt +21 -21
- package/apps/pwa/out/missions/placeholder/index.html +1 -1
- package/apps/pwa/out/missions/placeholder/index.txt +21 -21
- package/apps/pwa/out/morning/index.html +1 -1
- package/apps/pwa/out/morning/index.txt +22 -22
- package/apps/pwa/out/observatory/index.html +1 -1
- package/apps/pwa/out/observatory/index.txt +22 -22
- package/apps/pwa/out/ops/checklist/index.html +1 -1
- package/apps/pwa/out/ops/checklist/index.txt +21 -21
- package/apps/pwa/out/ops/release/index.html +1 -1
- package/apps/pwa/out/ops/release/index.txt +21 -21
- package/apps/pwa/out/ops/resources/index.html +1 -1
- package/apps/pwa/out/ops/resources/index.txt +21 -21
- package/apps/pwa/out/ops/seats/index.html +1 -1
- package/apps/pwa/out/ops/seats/index.txt +21 -21
- package/apps/pwa/out/outputs/index.html +1 -1
- package/apps/pwa/out/outputs/index.txt +21 -21
- package/apps/pwa/out/reflection/index.html +1 -1
- package/apps/pwa/out/reflection/index.txt +22 -22
- package/apps/pwa/out/scheduler/index.html +1 -1
- package/apps/pwa/out/scheduler/index.txt +22 -22
- package/apps/pwa/out/sessions/index.html +1 -1
- package/apps/pwa/out/sessions/index.txt +21 -21
- package/apps/pwa/out/settings/devices/index.html +1 -1
- package/apps/pwa/out/settings/devices/index.txt +22 -22
- package/apps/pwa/out/settings/index.html +1 -1
- package/apps/pwa/out/settings/index.txt +22 -22
- package/apps/pwa/out/setup/done/index.html +1 -1
- package/apps/pwa/out/setup/done/index.txt +22 -22
- package/apps/pwa/out/setup/index.html +1 -1
- package/apps/pwa/out/setup/index.txt +22 -22
- package/apps/pwa/out/share/index.html +1 -1
- package/apps/pwa/out/share/index.txt +22 -22
- package/apps/pwa/out/showroom/index.html +1 -1
- package/apps/pwa/out/showroom/index.txt +21 -21
- package/apps/pwa/out/tasks/index.html +1 -1
- package/apps/pwa/out/tasks/index.txt +22 -22
- package/apps/pwa/out/term/index.html +1 -1
- package/apps/pwa/out/term/index.txt +22 -22
- package/apps/pwa/out/today/index.html +1 -1
- package/apps/pwa/out/today/index.txt +22 -22
- package/apps/pwa/out/trace/index.html +1 -1
- package/apps/pwa/out/trace/index.txt +22 -22
- package/apps/pwa/out/vault/index.html +1 -1
- package/apps/pwa/out/vault/index.txt +22 -22
- package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
- package/apps/pwa/out/workflows/chat-ui/index.txt +22 -22
- package/apps/pwa/out/workflows/index.html +1 -1
- package/apps/pwa/out/workflows/index.txt +22 -22
- package/apps/pwa/out/workspace/index.html +1 -1
- package/apps/pwa/out/workspace/index.txt +22 -22
- package/apps/pwa/out/worktrees/index.html +1 -1
- package/apps/pwa/out/worktrees/index.txt +22 -22
- package/bin/elanous.cjs +268 -64
- package/docs/goal-context/05-authoring-lessons.jsonl +5 -0
- package/graphs/implement-loop.yaml +1 -0
- package/graphs/natural-language-research.yaml +22 -1
- package/package.json +4 -3
- package/scripts/audit-test-state-writes.ts +2 -2
- package/scripts/data-diet-14d-gc.ts +568 -0
- package/scripts/generate-sim-world-device-catalogs.ts +28 -0
- package/scripts/install.sh +9 -12
- package/scripts/npm-postinstall.cjs +68 -0
- package/scripts/public-export.ts +63 -7
- package/scripts/release-loop/cut-branch.ts +2 -1
- package/scripts/release-loop/export-check-node.ts +7 -1
- package/scripts/release-loop/gate-node.ts +47 -31
- package/scripts/release-loop/gate-pr-cache.ts +7 -2
- package/scripts/release-loop/gate-radius-live.ts +19 -5
- package/scripts/release-loop/node-verdict.ts +3 -1
- package/scripts/release-loop/pwa-scenarios-node.ts +3 -3
- package/scripts/release-loop/resume-release.ts +18 -1
- package/scripts/review-model-ab.ts +48 -4
- package/scripts/sim-world-runner.ts +2 -1
- package/scripts/test-deterministic.ts +32 -3
- package/scripts/tree-sync-decide.ts +3 -1
- package/scripts/triage-open-drafts.py +41 -8
- package/scripts/ux-sim-merge-driver.mjs +28 -60
- package/scripts/ux-sim.ts +8 -1
- package/scripts/warm-pool-provider-config.ts +11 -1
- package/src/acp/core-turn-bridge.ts +4 -9
- package/src/acp/multi-llm-bridge.ts +2 -4
- package/src/acp/server.ts +105 -107
- package/src/ad-pipeline/higgsfield-backend.ts +4 -1
- package/src/agent/agent-output-tool.ts +3 -0
- package/src/agent/monad-agent-turn.ts +1 -1
- package/src/agent-mission/driver.ts +31 -5
- package/src/aside/remote-targets.ts +234 -0
- package/src/auto-research/research-turn.ts +2 -0
- package/src/autopilot/elanous-builtin-runner.ts +1 -1
- package/src/autopilot/mission-hitl-callback.ts +6 -1
- package/src/autopilot/pr-manager.ts +23 -4
- package/src/boot/daemon-prompt-turn.ts +1 -1
- package/src/boot/daemon-runtime.ts +1 -1
- package/src/boot/daemon-tools/self-implement.ts +75 -13
- package/src/capture/encoders/png.ts +2 -1
- package/src/chat/index.ts +0 -1
- package/src/cli/app-cli.ts +40 -0
- package/src/cli/doctor-cli.ts +77 -2
- package/src/cli/doctor-readiness.ts +3 -0
- package/src/cli/log-event-names.ts +1 -0
- package/src/cli/logs-cli.ts +11 -0
- package/src/cli/logs-warm-reuse-stats.ts +76 -0
- package/src/cli/msg-cli.ts +13 -7
- package/src/cli/pr-cli.ts +312 -17
- package/src/cli/pr-land-conflict-merge.ts +253 -0
- package/src/cli/pr-land-drift-repair.ts +298 -0
- package/src/cli/pr-land-heavy-remote.ts +99 -0
- package/src/cli/pr-land-overlap-evidence.ts +207 -13
- package/src/cli/pr-land-refusal.ts +21 -8
- package/src/cli/release-cli.ts +4 -3
- package/src/cli/repo-cli.ts +3 -2
- package/src/cli/resource-ledger-cli.ts +10 -1
- package/src/cli/review-typefix-carry.ts +452 -0
- package/src/cli/secret-cli.test-helpers.ts +9 -0
- package/src/cli/secret-cli.ts +294 -1
- package/src/cli/sim-cli.ts +94 -0
- package/src/cli/tasks-cli.ts +23 -8
- package/src/compact/archive.ts +6 -0
- package/src/compact/tool-output-budget.ts +33 -24
- package/src/control-plane/ledger.ts +47 -0
- package/src/control-plane/server.ts +32 -2
- package/src/core-turn/run-goal-loop.ts +1 -1
- package/src/dashboard/acp-boot.ts +8 -8
- package/src/dashboard/index.ts +7 -337
- package/src/dashboard/slash-runtime/dashboard-handlers.ts +2 -18
- package/src/dashboard/slash-runtime/help-groups.ts +1 -1
- package/src/dashboard/slash-runtime/index.ts +0 -6
- package/src/dashboard/turn-preamble.ts +4 -5
- package/src/debug/log.ts +4 -2
- package/src/extractors.ts +4 -2
- package/src/hq/promote.ts +12 -0
- package/src/hq/seats.ts +173 -3
- package/src/hq/transfer.ts +18 -0
- package/src/image/utils.ts +7 -1
- package/src/index.ts +27 -12
- package/src/kgp/pipeline.ts +2 -1
- package/src/llm.ts +86 -2
- package/src/loops/orchestrator/inbox-once.ts +2 -3
- package/src/maturity/feature-maturity.ts +2 -3
- package/src/mcp/server.ts +4 -4
- package/src/msg/msg-store.ts +98 -12
- package/src/nexus/api/agent-cli.ts +1 -1
- package/src/nexus/api/bot-commands.ts +1 -1
- package/src/nexus/api/chat-backend-detection.ts +1 -1
- package/src/nexus/api/config.ts +1 -1
- package/src/nexus/api/connect-info.ts +1 -1
- package/src/nexus/api/dispatch-runs.ts +1 -1
- package/src/nexus/api/edit-in-pwa.ts +1 -1
- package/src/nexus/api/errors.ts +1 -1
- package/src/nexus/api/grid.ts +88 -1
- package/src/nexus/api/harness-api.ts +2 -2
- package/src/nexus/api/harness-traversal.ts +1 -11
- package/src/nexus/api/health.ts +1 -1
- package/src/nexus/api/hitl-pushcut-settings.ts +1 -1
- package/src/nexus/api/http-server.ts +20 -6
- package/src/nexus/api/intake-pipeline-commit.ts +1 -1
- package/src/nexus/api/intake-pipeline-preview.ts +1 -1
- package/src/nexus/api/intake-runs.ts +1 -1
- package/src/nexus/api/log-fabric.ts +1 -1
- package/src/nexus/api/logs.ts +1 -1
- package/src/nexus/api/loop-edges.ts +255 -6
- package/src/nexus/api/meta-api.ts +2 -2
- package/src/nexus/api/missions.ts +1 -1
- package/src/nexus/api/platforms.ts +1 -1
- package/src/nexus/api/registry-catalog.ts +1 -1
- package/src/nexus/api/registry-discovery.ts +1 -1
- package/src/nexus/api/registry-resolved.ts +1 -1
- package/src/nexus/api/registry.ts +1 -1
- package/src/nexus/api/research-run-observer.ts +7 -1
- package/src/nexus/api/schedules-action.ts +1 -1
- package/src/nexus/api/schedules-read.ts +1 -1
- package/src/nexus/api/sessions-store.ts +1 -1
- package/src/nexus/api/showroom-layouts.ts +1 -1
- package/src/nexus/api/skill-router.ts +1 -1
- package/src/nexus/api/tabs-mutations.ts +1 -1
- package/src/nexus/api/tabs.ts +1 -1
- package/src/nexus/api/tasks-create.ts +1 -1
- package/src/nexus/api/tasks-scheduler.ts +1 -1
- package/src/nexus/api/templates.ts +1 -1
- package/src/nexus/api/terminals.ts +1 -1
- package/src/nexus/api/triggers.ts +1 -1
- package/src/nexus/api/workflow-events.ts +1 -1
- package/src/nexus/api/workflow-lifecycle.ts +1 -1
- package/src/nexus/api/workflow-pins.ts +1 -1
- package/src/nexus/api/workflow-router.ts +1 -1
- package/src/nexus/api/workflow-templates.ts +1 -1
- package/src/nexus/api/workflows.ts +1 -1
- package/src/nexus/api/worktrees.ts +1 -1
- package/src/nexus/apps/app-contract.ts +310 -0
- package/src/nexus/apps/app-host.ts +309 -0
- package/src/nexus/apps/app-openapi.ts +141 -0
- package/src/nexus/apps/app-simulate.ts +188 -0
- package/src/nexus/apps/backend-tier.ts +42 -0
- package/src/nexus/boot/register-mcp-clients.ts +132 -10
- package/src/nexus/config/secrets/env-import.ts +42 -0
- package/src/nexus/config/secrets/file-backend.ts +25 -0
- package/src/nexus/config/secrets/index.ts +12 -0
- package/src/nexus/config/secrets/transfer.ts +94 -0
- package/src/nexus/index.ts +10 -0
- package/src/oauth/codex-account-store.ts +8 -2
- package/src/oauth/codex-owner-mirror.ts +30 -0
- package/src/onboarding.ts +1 -1
- package/src/plugins/core/host.ts +0 -12
- package/src/plugins/core/manifest.ts +8 -5
- package/src/plugins/install/plugin-install.ts +4 -2
- package/src/pr-tool/census.ts +29 -8
- package/src/release-loop/rehearsal.ts +31 -10
- package/src/repl/agent-turn.ts +2 -1
- package/src/resource-ledger/resource-ledger.ts +18 -0
- package/src/self-dev/dev-cli.ts +22 -2
- package/src/self-dev/dev-pipeline.ts +13 -9
- package/src/self-dev/orchestrate.ts +18 -0
- package/src/self-dev/run-supervisor.ts +4 -2
- package/src/self-dev/run-types.ts +5 -0
- package/src/self-implement/comment-only-source.ts +11 -10
- package/src/self-implement/evidence-command-budget.ts +9 -8
- package/src/self-implement/executor-contract.ts +3 -3
- package/src/self-implement/gate-cli.ts +5 -2
- package/src/self-implement/gate-remote.ts +27 -3
- package/src/self-implement/goal-author-clarification.ts +15 -14
- package/src/self-implement/goal-author-text.ts +180 -0
- package/src/self-implement/goal-author.ts +2 -218
- package/src/self-implement/graph-authority.ts +18 -17
- package/src/self-implement/graph-templates.ts +13 -12
- package/src/self-implement/headless-elanous-driver.ts +3 -0
- package/src/self-implement/importer-test-index.ts +21 -20
- package/src/self-implement/knowhow-pack.ts +66 -5
- package/src/self-implement/l8-merge-queue.ts +26 -12
- package/src/self-implement/lazy-typescript.ts +15 -0
- package/src/self-implement/merge-train.ts +195 -17
- package/src/self-implement/off-diff-evidence.ts +48 -47
- package/src/self-implement/orchestrator.ts +2 -31
- package/src/self-implement/pwa-import-graph.ts +28 -27
- package/src/self-implement/readable-text.ts +18 -0
- package/src/self-implement/route-consumer-test-index.ts +18 -17
- package/src/self-implement/run-ledger.ts +1 -1
- package/src/self-implement/scoped-typecheck-config.ts +5 -4
- package/src/self-implement/seams.ts +3 -0
- package/src/self-implement/self-implement-cli.ts +19 -2
- package/src/self-implement/self-implement-runtime.ts +4 -6
- package/src/self-implement/soft-stop-observer.ts +6 -0
- package/src/self-implement/wiring-check.ts +74 -73
- package/src/session/chat.ts +20 -14
- package/src/session/compact-session.ts +7 -1
- package/src/session/request-size-guard.ts +146 -2
- package/src/sim-world-device-catalogs.json +311 -0
- package/src/skills/runner.ts +10 -3
- package/src/skills/tools/dev-harness.ts +7 -4
- package/src/skills/tools/mermaid.ts +5 -2
- package/src/skills/tools/persistent-grounding.ts +3 -1
- package/src/task-agent/parent-host.ts +29 -2
- package/src/task-agent/repair-branch-cas.ts +2 -1
- package/src/task-agent/repair-cycle.ts +5 -1
- package/src/task-orchestrator/surfaces/pod-lease.ts +78 -1
- package/src/task-orchestrator/surfaces/pod-si-warm-host.ts +68 -4
- package/src/task-orchestrator/surfaces/pod-si-warm-protocol.ts +26 -1
- package/src/task-orchestrator/surfaces/pod-si-warm-provider.ts +6 -4
- package/src/task-orchestrator/surfaces/pod-si-warm-transport.ts +2 -1
- package/src/task-orchestrator/surfaces/pod-warm-worker-pod.ts +98 -1
- package/src/task-orchestrator/surfaces/pod-warm-worker-provider.ts +393 -41
- package/src/task-orchestrator/surfaces/self-implement-pod.ts +77 -6
- package/src/task-orchestrator/surfaces/warm-reuse-evidence.ts +39 -3
- package/src/task-orchestrator/surfaces/warm-reuse-stats.ts +84 -0
- package/src/telegram-report.ts +3 -1
- package/src/tool-runtime/aside-selection-runtime.ts +24 -5
- package/src/tool-runtime/mcp-proxy-bootstrap.ts +6 -3
- package/src/tui/entry.ts +8 -92
- package/src/tui/slash/new-session.ts +2 -2
- package/src/tui-key.ts +545 -0
- package/src/tui-render-cache.ts +157 -0
- package/src/tui-string-width.ts +273 -0
- package/src/tui.ts +20 -988
- package/src/user-config.ts +66 -3
- package/src/ux-sim/author-reviewer-precheck-device.ts +2 -2
- package/src/ux-sim/backend-tier-device.ts +13 -0
- package/src/ux-sim/chain-land.ts +158 -0
- package/src/ux-sim/device-fidelity.ts +261 -0
- package/src/ux-sim/event-monkey.ts +48 -0
- package/src/ux-sim/fake-app-auth.ts +236 -0
- package/src/ux-sim/fake-app-host.ts +107 -0
- package/src/ux-sim/fake-app-realtime.ts +372 -0
- package/src/ux-sim/fake-app-storage.ts +477 -0
- package/src/ux-sim/fake-app-traffic.ts +375 -0
- package/src/ux-sim/fake-bin-install-helper.mjs +119 -0
- package/src/ux-sim/fake-bin.ts +49 -5
- package/src/ux-sim/fake-dns-cert.ts +295 -0
- package/src/ux-sim/fake-elevenlabs.ts +144 -0
- package/src/ux-sim/fake-fetch.ts +158 -0
- package/src/ux-sim/fake-gh.ts +45 -1
- package/src/ux-sim/fake-higgsfield.ts +106 -0
- package/src/ux-sim/fake-kubectl.ts +34 -6
- package/src/ux-sim/fake-land-queue.ts +5 -2
- package/src/ux-sim/fake-payment.ts +201 -0
- package/src/ux-sim/fake-ps.ts +82 -0
- package/src/ux-sim/fake-stt.ts +101 -0
- package/src/ux-sim/fault-nexus-stall.ts +225 -0
- package/src/ux-sim/fault-pod-child-result.ts +2 -2
- package/src/ux-sim/fault-pod-reuse-residue.ts +73 -0
- package/src/ux-sim/fault-pool-cap.ts +5 -2
- package/src/ux-sim/hq-move-sim.ts +293 -0
- package/src/ux-sim/install-consent-device.ts +52 -0
- package/src/ux-sim/mock-scenario-catalog.json +3552 -2618
- package/src/ux-sim/next-tui-seat-scenarios.ts +12 -8
- package/src/ux-sim/release-sim-rig.ts +208 -7
- package/src/ux-sim/secret-canary.ts +416 -0
- package/src/ux-sim/sim-coverage.ts +299 -0
- package/src/ux-sim/subagent-tools-device.ts +31 -2
- package/src/ux-sim/temp-git-repo.ts +95 -0
- package/src/ux-sim/tool-async-fail-loop.ts +165 -0
- package/src/ux-sim/warm-pool-reuse-sim.ts +201 -13
- package/src/ux-sim/warm-pool-reuse-switch-sim.ts +76 -0
- package/src/ux-sim/warm-si-reuse-sim.ts +234 -0
- package/src/ux-sim/world-chaos-runtime.ts +312 -0
- package/src/ux-sim/world-host-chaos.ts +124 -0
- package/src/ux-sim/world-schema.ts +271 -5
- package/src/ux-sim/world-snapshot.ts +307 -0
- package/src/ux-sim/world.ts +673 -47
- package/src/ux-sim/worlds/secret-export-import.yaml +27 -0
- package/src/ux-sim/worlds/secret-zsh-keys-absorb.yaml +26 -0
- package/src/version/packed-revision.json +1 -1
- package/apps/pwa/out/_next/static/chunks/001d1d30.3b264a3a5834784b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1044.f780ef30fbeec1d2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/106.ef1dcdfef46b0b72.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1207.912f5869bdf13244.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1226-29248177d8e43df5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/128757ea.677175b2ad79b371.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1469.157ee10170c461ab.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1475-f4208d07b2b41e44.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1525.9fd05c15746d77c8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/1596-80cc66168f6a520b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/224.0585d01ba7f4f898.js +0 -226
- package/apps/pwa/out/_next/static/chunks/2277.80d00b0a6fe67cad.js +0 -94
- package/apps/pwa/out/_next/static/chunks/2287.6a4cce8ac8897fda.js +0 -1
- package/apps/pwa/out/_next/static/chunks/2378.0805bd9972a241f3.js +0 -24
- package/apps/pwa/out/_next/static/chunks/25600806.42d40cb74fdc4bf3.js +0 -122
- package/apps/pwa/out/_next/static/chunks/2785-33003c356341fab5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/280-66f2ebc166517702.js +0 -1
- package/apps/pwa/out/_next/static/chunks/29.135cc356bdf1a8be.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3111-f3c2382dc49d4719.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3135-4f30d19149be541d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/336.dd6c1b81512124e6.js +0 -74
- package/apps/pwa/out/_next/static/chunks/337.35019dda0819a283.js +0 -64
- package/apps/pwa/out/_next/static/chunks/3393.cbbe17ef7aeee5e7.js +0 -2
- package/apps/pwa/out/_next/static/chunks/3394.8a08fac56ac2f941.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3461-113eb7d3afb5969e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3603-473956ca996d5b03.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3687.55335796604accd0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3692-ed2cebf0d6c4e273.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3702-d50492fee8529bd7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3782.3ead96e62c8ac5c5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3849-59a5a66baa48998b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/3965.1ae261de91a7507b.js +0 -115
- package/apps/pwa/out/_next/static/chunks/3985-432efaf9bc4e4123.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4174.d97cc593a5cf01bc.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4276.863502da440e095f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4450-ea0ec552f18d799d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4495.2fbef8546af0792c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/4674.e41c0f9b62fed6e2.js +0 -36
- package/apps/pwa/out/_next/static/chunks/482.52b487cbac96db29.js +0 -93
- package/apps/pwa/out/_next/static/chunks/4841.b78af1deed2d3d3f.js +0 -23
- package/apps/pwa/out/_next/static/chunks/4869.839bacfaab182108.js +0 -1
- package/apps/pwa/out/_next/static/chunks/500-57c24ef4341cdb21.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5017-e079ea96feddbe85.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5135.7b73d384c46dc26b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5359-7aa498ded308ea17.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5457-5459ae7638b42dff.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5521-16fb56b15c809e4a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5616-33de319a016180cd.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5646.41a48aad446799fa.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5716.ad2c840320ab9472.js +0 -41
- package/apps/pwa/out/_next/static/chunks/5730-ca5565abe3d360ad.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5841.26bcfac34b5889b4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/586.658dedb3bc558b22.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5894-7d90af46a43f80d2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5927-88cbc16437430987.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5960.0dfb8bd3d27e1063.js +0 -1
- package/apps/pwa/out/_next/static/chunks/597-9bf9f66dba4ccae9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6064.f425ee61836bb5c7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6074.39f84a90284749de.js +0 -1
- package/apps/pwa/out/_next/static/chunks/61.cbbe643a52cf53ab.js +0 -62
- package/apps/pwa/out/_next/static/chunks/6184.4c0ba455eb3d27a1.js +0 -79
- package/apps/pwa/out/_next/static/chunks/6224.cd0ca2a16727e9a9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6229-a83289910e01869b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6243.61e6f450a70a8d91.js +0 -90
- package/apps/pwa/out/_next/static/chunks/6295-4f1a1386f8667fd1.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6310.5fb57ba0781bc476.js +0 -286
- package/apps/pwa/out/_next/static/chunks/6653.f3f30affdbe694aa.js +0 -32
- package/apps/pwa/out/_next/static/chunks/6657.f57e1d8511e510ce.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6672-bc0f317b72f0bbd2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6761-2143fe6fe3578118.js +0 -1
- package/apps/pwa/out/_next/static/chunks/6955-75b2659eafd27893.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7051-406b0538949c932f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7222.df77e48936e60d2e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7242-08db87893cf792b7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7307-3172df9d07acb8e0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7613.4523dc082005e359.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7648-7c7346c2a73503f9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7788.ffd9f4d57647a354.js +0 -149
- package/apps/pwa/out/_next/static/chunks/7793.4d3de6ce591fbc21.js +0 -34
- package/apps/pwa/out/_next/static/chunks/7816.4b8c0fa1e5b4ec4f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/7988-bbcd506079ceceb6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8066.32863fb9dd2dc278.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8073-cdf4607b80d127fe.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8414-77dbc0c35bc85f42.js +0 -1
- package/apps/pwa/out/_next/static/chunks/849.fe241354322a97e9.js +0 -27
- package/apps/pwa/out/_next/static/chunks/8665.900daf2473f7032a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8713.11d79e4e023ab74f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8718.137b7ce2c3cae66b.js +0 -8
- package/apps/pwa/out/_next/static/chunks/8764.39400f626e015e79.js +0 -287
- package/apps/pwa/out/_next/static/chunks/8803.d3504166481bc91e.js +0 -24
- package/apps/pwa/out/_next/static/chunks/8939.a14783a0a81e5e62.js +0 -1
- package/apps/pwa/out/_next/static/chunks/8963.928e777871d1d637.js +0 -104
- package/apps/pwa/out/_next/static/chunks/8987-372a6317aaf83fa9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9039.03e40d9f9fd90920.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9546.3a0afc5d5fa0851d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9671.d935d274b65718e4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9756.24e020ddf99f7020.js +0 -77
- package/apps/pwa/out/_next/static/chunks/9777-6b21b6f1989ea7b1.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9947.7a8d89554e873316.js +0 -1
- package/apps/pwa/out/_next/static/chunks/9980.fd66776b3782eeb4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/_not-found/page-2c29b6716055aa54.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/approvals/page-538c811d4da4d7b8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-32cb397d044bb5aa.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/board/page-02d148f66a3da6bb.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/botlab/page-42b7211f972c6001.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/bots/page-46bac74d4ce82733.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ceo/page-10e7ee66dc7c3d8a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/chat/page-391a9ecbfb541e68.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/consult/page-6b69baa42370ba35.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/control/page-58960a34c0fa8f97.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-417a7b86f7eceeea.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/editor/page-09f86a64836617b7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/exec/page-cb640bac3150eb4c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/field/page-e80fc997e0c589d5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/healthz/route-2c29b6716055aa54.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/inside/page-173d296c2127560a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/intake/page-358c3e0c2ce7184c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/layout-09c6e6033ddb1605.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/live/page-11a4763fe20fe116.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/loops/page-b0c21fcb45c049d0.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/market/page-f331955e0ca9bf84.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-c4c4b4333b24e505.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/morning/page-7cab7257602fe967.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/not-found-a0dc43b385fba1b5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/resources/page-c2b69a4da710ccee.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-80adac335abc5070.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/outputs/page-10b7dbd205510a67.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/page-5f3c9b795a225d8c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/reflection/page-68ece02272941b6c.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/scheduler/page-21d4e1472f806b1e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-4fc726c790e6a7bf.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/page-e0dc9ec9ac537906.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-83138c236444d7d5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/layout-2c29b6716055aa54.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/page-61133c103b342d2b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/share/page-40cac04d8f4822c6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-ecb7be39ce14845a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/tasks/page-a288059ee8ed73fb.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/term/page-31ed388024d4f660.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/today/page-29d28b05a7ddede3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/trace/page-b39bdb4ce095ccfc.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/vault/page-ecbc7b9f31d195b7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-059b94e88f91e73f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-ca29c405228c72b9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-ff99da4e3ff50503.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-2aa0c6cdb2ef7ea8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/db2f0161-8781ed841c51137a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/f6a577ab-4b799b8c69e49cfd.js +0 -1
- package/apps/pwa/out/_next/static/chunks/framework-01d45c12f1bce665.js +0 -1
- package/apps/pwa/out/_next/static/chunks/main-0a9bbda118d4e9dc.js +0 -1
- package/apps/pwa/out/_next/static/chunks/main-app-7f817b9fe2a360cc.js +0 -1
- package/apps/pwa/out/_next/static/chunks/pages/_app-f953b3d6c9ece48e.js +0 -1
- package/apps/pwa/out/_next/static/chunks/pages/_error-1a3e6e3f0aa99004.js +0 -1
- package/apps/pwa/out/_next/static/chunks/webpack-090556529ba4efb6.js +0 -1
- package/src/autopilot/mission-tui-watch.ts +0 -380
- package/src/dashboard/plugin-wizard-runtime.ts +0 -111
- package/src/dashboard/plugin-wizard-tool.ts +0 -69
- package/src/tui/slash/mission.ts +0 -492
- /package/apps/pwa/out/_next/static/{v4GHQkFrQs8lzZY_KFv9_ → iXeJzCRg0ENSSl_RTbGIN}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2856],{2856:(e,t,s)=>{s.d(t,{O:()=>e9});var a=s(65245),r=s(64297),n=s(79836),l=s(16912),i=s(32111),d=s(39622),o=s(41486),c=s(69298);let u="pushcut-webhook",m="pushcut";async function x(e,t){return e.fetchJson("/v1/config/secrets",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:u,value:t})})}async function p(e){return e.fetchJson("/v1/registry/bindings?channel=".concat(m))}async function h(e,t){var s;let a=null!=(s=t.method)?s:"POST",r={};return void 0!==t.sessionId&&(r.sessionId=t.sessionId),void 0!==t.label&&(r.label=t.label),void 0!==t.meta&&(r.meta=t.meta),void 0!==t.mergeMeta&&(r.mergeMeta=t.mergeMeta),e.fetchJson("/v1/registry/bindings/".concat(m,"/").concat(encodeURIComponent(t.token)),{method:a,headers:{"content-type":"application/json"},body:JSON.stringify(r)})}async function f(e,t){return e.fetchJson("/v1/registry/bindings/".concat(m,"/").concat(encodeURIComponent(t)),{method:"DELETE"})}var b=s(62391);let g="elanous.pwa.pushSubscriptionId",j="elanous.pwa.pushSubscriptionLabel";function v(){let e="Notification"in window&&"serviceWorker"in navigator&&"PushManager"in window,t=null,s=null;try{t=window.localStorage.getItem(g),s=window.localStorage.getItem(j)}catch(e){}return{supported:e,permission:e?Notification.permission:"unknown",cachedId:t,cachedLabel:s}}async function y(e){var t,s;let a,r;if(!("Notification"in window)||!("serviceWorker"in navigator)||!("PushManager"in window))return{status:"unsupported",reason:"Notification/PushManager API absent"};if(!e.baseUrl)return{status:"error",reason:"daemon baseUrl not configured"};if("granted"!==await Notification.requestPermission())return(0,b.cY)("pwa.push.permission-denied"),{status:"permission-denied"};let n=e.baseUrl.replace(/\/$/,"");try{let e=await fetch("".concat(n,"/v1/push/vapid-public-key"));if(!e.ok)throw Error("HTTP ".concat(e.status));let t=await e.json();if(!t.publicKey)throw Error("missing publicKey in response");a=t.publicKey}catch(e){return{status:"error",reason:"vapid fetch: ".concat(e instanceof Error?e.message:String(e))}}let l=await navigator.serviceWorker.ready;try{r=await l.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:function(e){let t="=".repeat((4-e.length%4)%4),s=atob((e+t).replace(/-/g,"+").replace(/_/g,"/")),a=new Uint8Array(s.length);for(let e=0;e<s.length;e+=1)a[e]=s.charCodeAt(e);return a}(a)})}catch(e){return{status:"error",reason:"subscribe: ".concat(e instanceof Error?e.message:String(e))}}let i=r.toJSON(),d=null!=(s=e.label)?s:"".concat(null!=(t=navigator.userAgent.split(" ")[0])?t:"browser"," ").concat(new Date().toISOString().slice(0,10));try{let t=await fetch("".concat(n,"/v1/push/subscribe"),{method:"POST",headers:{"content-type":"application/json",...e.token?{authorization:"Bearer ".concat(e.token)}:{}},body:JSON.stringify({subscription:i,label:d})});if(!t.ok){let e=await t.text();try{await r.unsubscribe()}catch(e){}return{status:"error",reason:"subscribe POST: ".concat(t.status," ").concat(e.slice(0,200))}}let s=await t.json();if(!s.id){try{await r.unsubscribe()}catch(e){}return{status:"error",reason:"daemon did not return subscription id"}}try{window.localStorage.setItem(g,s.id),window.localStorage.setItem(j,d)}catch(e){}return(0,b.cY)("pwa.push.enabled",{id:s.id,label:d}),{status:"enabled",id:s.id}}catch(e){try{await r.unsubscribe()}catch(e){}return{status:"error",reason:e instanceof Error?e.message:String(e)}}}async function N(e){let t=null;try{t=window.localStorage.getItem(g)}catch(e){}if(!t)return{status:"not-subscribed"};try{if("serviceWorker"in navigator){let e=await navigator.serviceWorker.ready,t=await e.pushManager.getSubscription();t&&await t.unsubscribe()}}catch(e){}if(e.baseUrl)try{await fetch("".concat(e.baseUrl.replace(/\/$/,""),"/v1/push/subscribe/").concat(encodeURIComponent(t)),{method:"DELETE",...e.token?{headers:{authorization:"Bearer ".concat(e.token)}}:{}})}catch(e){(0,b.cY)("pwa.push.disable.daemon-failed",{reason:e instanceof Error?e.message:String(e)})}try{window.localStorage.removeItem(g),window.localStorage.removeItem(j)}catch(e){}return{status:"disabled"}}var k=s(2882);let w=[{value:"none",label:"none — auto-detect / Quick Setup 안내"},{value:"codex",label:"codex — OpenAI Codex (OAuth or OPENAI_API_KEY)"},{value:"claude-code",label:"claude-code — Anthropic (claude-code CLI 인증)"},{value:"gemini",label:"gemini — Google (GEMINI_API_KEY)"}];function S(){let e=(0,k.Qj)(),[t,s]=(0,r.useState)({status:"idle"}),[n,l]=(0,r.useState)({status:"idle"}),[i,o]=(0,r.useState)(!1);(0,r.useEffect)(()=>{o(!0)},[]);let c=(0,r.useCallback)(async()=>{if(e){s({status:"loading"});try{let t=await e.getChatBackendDetection();s({status:"ok",snapshot:t})}catch(e){s({status:"error",error:e.message})}}},[e]),u=(0,r.useCallback)(async t=>{if(e){l({status:"mutating",target:t});try{await e.putSwitch("global.chat.defaultBackend",{value:t}),await c(),l({status:"idle"})}catch(e){l({status:"error",error:e.message})}}},[e,c]);return((0,r.useEffect)(()=>{c()},[c]),i&&e)?(0,a.jsxs)("section",{"data-testid":"quick-setup-card",className:"rounded border border-border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"Quick Setup — chat 백엔드"}),(0,a.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"chat 탭이 사용할 LLM 백엔드 1개만 셋업하면 됩니다. 데스크탑 NEXUS TUI Settings 탭과 같은 안내."})]}),(0,a.jsx)(d.$,{"data-testid":"quick-setup-refresh",variant:"outline",size:"sm",disabled:"loading"===t.status,onClick:()=>void c(),"aria-label":"detection 재실행",title:"env / OAuth 재감지 (TUI 의 r 키 mirror)",children:"loading"===t.status?"…":"Refresh"})]}),"idle"===t.status&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"대기 중…"}),"loading"===t.status&&(0,a.jsx)("p",{"data-testid":"quick-setup-loading",className:"text-xs text-muted-foreground",children:"detection 진행 중…"}),"error"===t.status&&(0,a.jsx)("p",{"data-testid":"quick-setup-error",className:"text-xs text-destructive",children:t.error}),"ok"===t.status&&(0,a.jsx)(C,{snapshot:t.snapshot,swap:n,onSwap:u})]}):null}function C(e){let{snapshot:t,swap:s,onSwap:r}=e,n="none"!==t.detection.backend;return(0,a.jsxs)("div",{className:"space-y-3 text-xs",children:[(0,a.jsx)("div",{"data-testid":"quick-setup-status",children:n?(0,a.jsxs)("span",{children:["현재 wired \xb7"," ",(0,a.jsx)("code",{className:"rounded bg-muted px-1 font-mono",children:t.detection.backend})," ",(0,a.jsxs)("span",{className:"text-muted-foreground",children:["(",t.detection.source,")"]})]}):(0,a.jsx)("span",{className:"text-muted-foreground",children:"현재 wired \xb7 (없음 — 아래 3 provider 중 1개 셋업)"})}),(0,a.jsx)("ul",{className:"space-y-2","data-testid":"quick-setup-entries",children:t.entries.map(e=>(0,a.jsx)(U,{entry:e,wired:t.detection.backend===e.provider},e.provider))}),(0,a.jsxs)("div",{className:"space-y-1 border-t border-border/40 pt-2",children:[(0,a.jsx)("label",{className:"block text-[11px] text-muted-foreground",htmlFor:"quick-setup-swap",children:"Backend swap (`global.chat.defaultBackend` 변경)"}),(0,a.jsx)("select",{id:"quick-setup-swap","data-testid":"quick-setup-swap",value:t.detection.backend,disabled:"mutating"===s.status,onChange:e=>r(e.target.value),className:"flex h-8 w-full rounded-md border border-input bg-background px-2 py-1 text-xs shadow-xs focus:outline-none focus:ring-2 focus:ring-ring",children:w.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"mutating"===s.status&&(0,a.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["적용 중 (target: ",(0,a.jsx)("code",{children:s.target}),")…"]}),"error"===s.status&&(0,a.jsxs)("p",{"data-testid":"quick-setup-swap-error",className:"text-[11px] text-destructive",children:["swap 실패 \xb7 ",s.error]}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"새 chat 탭부터 적용 \xb7 기존 chat 인스턴스는 per-tab override 또는 재시작 시 반영. 변경은 즉시 NEXUS daemon 의 UserConfig 에 저장."})]}),(0,a.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["Grok \xb7 중국 4종 (kimi/qwen/glm/deepseek) 등은 NEXUS chat 우선순위 외 — daemon 탭 또는 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"elanous legacy"})," ","에서 사용."]})]})}function U(e){let{entry:t,wired:s}=e;return(0,a.jsxs)("li",{"data-testid":"quick-setup-provider-".concat(t.provider),"data-wired":s?"true":"false",className:"rounded border border-border/60 bg-background p-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 font-medium",children:[(0,a.jsx)("span",{"aria-hidden":"true",children:s?"▶":" "}),(0,a.jsx)("span",{children:t.label})]}),(0,a.jsx)("ul",{className:"mt-1 space-y-1",children:t.paths.map(e=>(0,a.jsxs)("li",{"data-testid":"quick-setup-path-".concat(t.provider,"-").concat(e.tag),"data-detected":e.detected?"true":"false",className:"flex gap-2",children:[(0,a.jsx)("span",{"aria-label":e.detected?"detected":"missing",children:e.detected?"✓":"◯"}),(0,a.jsx)("span",{className:"font-mono text-[11px] text-muted-foreground",children:e.tag}),(0,a.jsx)("span",{className:"text-[11px]",children:e.hint})]},e.tag))})]})}var P=s(84974),E=s(8695),M=s(14072);let A="global.nexus.firstBootGuideShown";function z(){let e=(0,k.Qj)(),[t,s]=(0,r.useState)({status:"idle"}),[n,l]=(0,r.useState)(!1),[i,o]=(0,r.useState)(!1);(0,r.useEffect)(()=>{o(!0)},[]);let c=(0,r.useCallback)(async()=>{if(e){s({status:"loading"});try{let t=await e.getSwitch(A),a=!0===t.switch.value;s({status:a?"hidden":"shown"})}catch(e){s({status:"error",error:e.message})}}},[e]),u=(0,r.useCallback)(async()=>{if(e){l(!0);try{await e.putSwitch(A,{value:!0}),s({status:"hidden"})}catch(e){s({status:"error",error:e.message})}finally{l(!1)}}},[e]);return((0,r.useEffect)(()=>{c()},[c]),i&&e&&"shown"===t.status)?(0,a.jsxs)("section",{"data-testid":"welcome-card",className:"rounded border border-primary/30 bg-primary/5 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"✦ Welcome to elanous NEXUS"}),(0,a.jsx)(d.$,{"data-testid":"welcome-card-dismiss",variant:"ghost",size:"sm",disabled:n,onClick:()=>void u(),"aria-label":"환영 카드 닫기",children:n?"…":"Got it"})]}),(0,a.jsxs)("div",{className:"space-y-2 text-xs text-muted-foreground",children:[(0,a.jsx)("p",{children:"모바일 / iOS / 원격에서도 같은 NEXUS 에 접속 — 데스크탑 TUI 와 이 PWA 는 같은 daemon 의 두 surface (UserConfig SSoT 공유)."}),(0,a.jsxs)("p",{children:["Chat 백엔드를 셋업하지 않았다면 위의 ",(0,a.jsx)("strong",{children:"Quick Setup"})," ","카드에서 1개만 선택하면 됩니다."]}),(0,a.jsxs)("p",{children:["Telegram \xb7 Discord allowlist \xb7 자동 부팅 (launchd / systemd) 등"," ",(0,a.jsx)("em",{children:"advanced 셋업"}),"은 데스크탑에서"," ",(0,a.jsx)("span",{className:"font-mono",children:"elanous legacy"})," →"," ",(0,a.jsx)("span",{className:"font-mono",children:"/setup"})," wizard 에서 셋업 (NEXUS 미mirror 영역)."]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"font-mono",children:"[Got it]"})," ","한 번 누르면 다음부터 안 보입니다 (TUI 와 동기화)."]})]})]}):null}let I=[{area:"Chat 백엔드",status:"✓ NEXUS native",location:"PWA Quick Setup card"},{area:"Telegram bot token",status:"✓ NEXUS native",location:"PWA Secret modal"},{area:"Discord bot token",status:"✓ NEXUS native",location:"PWA Secret modal"},{area:"Telegram allowlist",status:"◯ Wizard 전용",location:"desktop",cmd:"elanous legacy → /setup"},{area:"Discord guild \xb7 voice",status:"◯ Wizard 전용",location:"desktop",cmd:"elanous legacy → /setup"},{area:"OS 자동 부팅",status:"◯ NEXUS subcommand",location:"desktop",cmd:"elanous nexus install --launchd"}];function T(){return(0,a.jsxs)("section",{"data-testid":"advanced-setup-map",className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Advanced setup map"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:[(0,a.jsx)("p",{className:"mb-2 text-muted-foreground",children:"NEXUS native 셋업 영역은 PWA 에서 직접 \xb7 그 외 advanced 셋업은 desktop wizard 또는 NEXUS subcommand 에서."}),(0,a.jsxs)("table",{className:"w-full text-left text-[11px]",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border text-muted-foreground",children:[(0,a.jsx)("th",{className:"py-1 pr-2 font-medium",children:"영역"}),(0,a.jsx)("th",{className:"py-1 pr-2 font-medium",children:"상태"}),(0,a.jsx)("th",{className:"py-1 font-medium",children:"셋업 위치"})]})}),(0,a.jsx)("tbody",{children:I.map(e=>(0,a.jsxs)("tr",{"data-testid":"advanced-setup-row-".concat(e.area),className:"border-b border-border/50 last:border-0",children:[(0,a.jsx)("td",{className:"py-1.5 pr-2 font-medium",children:e.area}),(0,a.jsx)("td",{className:"py-1.5 pr-2 font-mono text-[10px]",children:e.status}),(0,a.jsxs)("td",{className:"py-1.5 text-muted-foreground",children:[e.location,e.cmd&&(0,a.jsxs)(a.Fragment,{children:[" \xb7 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[10px]",children:e.cmd})]})]})]},e.area))})]})]})]})}function R(){let e=(0,k.Qj)(),[t,s]=(0,r.useState)({status:"idle"}),[n,l]=(0,r.useState)(!1),[i,o]=(0,r.useState)(!1);(0,r.useEffect)(()=>{o(!0)},[]);let c=(0,r.useCallback)(async()=>{if(e){s({status:"minting"}),l(!1);try{let t=await e.mintConnectToken();s({status:"shown",token:t.token,hint:t.hint})}catch(e){s({status:"error",error:e.message})}}},[e]),u=(0,r.useCallback)(async()=>{if("shown"===t.status)try{await navigator.clipboard.writeText(t.token),l(!0),setTimeout(()=>l(!1),2e3)}catch(e){s({status:"error",error:"clipboard: ".concat(e.message)})}},[t]);return i&&e?(0,a.jsxs)("section",{"data-testid":"connect-token-card",className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"연결 토큰 만들기 (다른 기기용)"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-2",children:[(0,a.jsxs)("p",{className:"text-muted-foreground",children:["다른 머신에서 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"elanous nexus connect <host>"})," 시 paste 할 bearer token 을 발급. 한 번 paste 하면 그 머신의 bookmark 에 영구 저장 — 매번 재발급할 필요 없음."]}),"idle"===t.status&&(0,a.jsx)(d.$,{size:"sm",onClick:()=>void c(),"data-testid":"connect-token-generate",children:"Generate connect token"}),"minting"===t.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Minting…"}),"shown"===t.status&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("code",{className:"block break-all rounded bg-muted p-2 font-mono text-[11px] select-all","data-testid":"connect-token-value",children:t.token}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(d.$,{size:"sm",onClick:()=>void u(),"data-testid":"connect-token-copy",children:n?"✓ Copied":"Copy to clipboard"}),(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>s({status:"idle"}),"data-testid":"connect-token-hide",children:"Hide"})]}),(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground",children:t.hint})]}),"error"===t.status&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("p",{className:"text-rose-500",children:["발급 실패: ",t.error]}),(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>s({status:"idle"}),children:"Reset"})]})]})]}):null}var L=s(59324),D=s(17741),$=s(14239),O=s(44592),Y=s(69648),B=s(60266);function _(){return(0,k.Qj)()?(0,a.jsx)(Q,{}):null}function Q(){var e;let{data:t,isLoading:s,error:r,refetch:n,isFetching:l}=function(){let e=(0,k.M1)();return(0,Y.I)({queryKey:B.AF.platforms(),queryFn:()=>e.getPlatforms(),refetchInterval:3e4})}(),i=null!=(e=null==t?void 0:t.platforms)?e:[],d=i.filter(e=>"connected"===e.status).length;return(0,a.jsxs)("section",{className:"space-y-2","data-testid":"platform-connections-card",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Platform connections"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[(0,a.jsx)("span",{"data-testid":"platform-summary",children:t?"".concat(d," of ").concat(i.length," connected"):s?"loading…":""}),(0,a.jsx)("button",{type:"button",onClick:()=>n(),disabled:l,"aria-label":"Refresh platform connection status",className:"rounded p-1 hover:bg-surface-elevated disabled:opacity-50",children:(0,a.jsx)(L.A,{className:"h-3 w-3 ".concat(l?"animate-spin":"")})})]})]}),r&&(0,a.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-error",children:[(0,a.jsx)(D.A,{className:"h-3 w-3"}),r instanceof Error?r.message:"Failed to load platform list"]}),s&&!t&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Querying /v1/platforms…"}),t&&(0,a.jsx)("ul",{className:"space-y-1.5",role:"list",children:i.map(e=>(0,a.jsx)(W,{entry:e},e.id))})]})}function W(e){let{entry:t}=e,s="connected"===t.status;return(0,a.jsxs)("li",{"data-testid":"platform-row-".concat(t.id),"data-status":t.status,className:"flex items-start gap-3 rounded-md border border-border bg-surface px-3 py-2",children:[(0,a.jsx)("div",{className:"mt-0.5 flex-shrink-0",children:s?(0,a.jsx)($.A,{className:"h-4 w-4 text-green-600","aria-label":"connected"}):(0,a.jsx)(O.A,{className:"h-4 w-4 text-muted-foreground","aria-label":"not configured"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,a.jsx)("span",{className:"text-[12px] font-medium",children:t.label}),(0,a.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-wider ".concat(s?"bg-green-600/10 text-green-700":"bg-muted text-muted-foreground"),children:s?"connected":"not configured"})]}),(0,a.jsx)("div",{className:"text-[11px] text-muted-foreground",children:t.detail}),!s&&t.hint&&(0,a.jsx)("div",{className:"text-[10px] italic text-muted-foreground/80",children:t.hint})]})]})}var F=s(14590);function H(){var e,t;let s=(0,k.Qj)(),[n,l]=(0,r.useState)({status:"idle"}),[i,o]=(0,r.useState)({status:"idle"}),[c,u]=(0,r.useState)(!1);(0,r.useEffect)(()=>{u(!0)},[]);let m=(0,r.useCallback)(async()=>{if(s){l({status:"loading"});try{var e,t,a;let r=await fetch("".concat(s.baseUrl,"/v1/hitl/audit/recent?channel=pushcut&limit=").concat(1),{credentials:"include"}),n=await r.json();if(!r.ok||!n.ok)return void l({status:"error",error:null!=(t=n.error)?t:"HTTP ".concat(r.status),fetchedAt:Date.now()});let i=null==(e=n.entries)?void 0:e[n.entries.length-1];l({status:"ok",count:null!=(a=n.count)?a:0,lastEntry:i,fetchedAt:Date.now()})}catch(e){l({status:"error",error:e.message,fetchedAt:Date.now()})}}},[s]),x=(0,r.useCallback)(async()=>{if(s){o({status:"sending"});try{var e,t;let a=await fetch("".concat(s.baseUrl,"/v1/hitl/test-pushcut"),{method:"POST",credentials:"include",headers:{"content-type":"application/json"},body:JSON.stringify({})}),r=await a.json();a.ok&&r.ok?(o({status:"ok",banner:"✓ sent → ".concat(null!=(e=r.notificationName)?e:"(unknown)")}),m()):o({status:"error",banner:"✗ ".concat(null!=(t=r.reason)?t:"HTTP ".concat(a.status)).concat(r.hint?" \xb7 ".concat(r.hint):"")})}catch(e){o({status:"error",banner:"✗ ".concat(e.message)})}}},[s,m]);if((0,r.useEffect)(()=>{m()},[m]),!c||!s)return null;let p=n.lastEntry,h=p?(t=Date.now()-p.ts)<0?"just now":t<6e4?"".concat(Math.floor(t/1e3),"s ago"):t<36e5?"".concat(Math.floor(t/6e4),"m ago"):t<864e5?"".concat(Math.floor(t/36e5),"h ago"):"".concat(Math.floor(t/864e5),"d ago"):"(no Pushcut deliveries recorded yet)";return(0,a.jsxs)("section",{"data-testid":"pushcut-settings-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDCF2 Pushcut HITL channel"}),(0,a.jsx)(d.$,{"data-testid":"pushcut-settings-refresh",variant:"ghost",size:"sm",onClick:()=>void m(),"aria-label":"Refresh Pushcut status",children:"↻"})]}),(0,a.jsxs)("dl",{className:"grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 text-xs",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Last delivery"}),(0,a.jsx)("dd",{"data-testid":"pushcut-last-delivery",className:"font-mono",children:"loading"===n.status?"…":h}),p?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Last answer"}),(0,a.jsxs)("dd",{className:"font-mono",children:[p.answer?"yes":"no"," \xb7 ",p.elapsedMs,"ms"]}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Last requestId"}),(0,a.jsx)("dd",{className:"font-mono break-all",children:p.requestId})]}):null,(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Total recorded"}),(0,a.jsx)("dd",{className:"font-mono",children:"ok"===n.status?null!=(e=n.count)?e:0:"—"})]}),"error"===n.status?(0,a.jsxs)("p",{className:"mt-2 text-xs text-destructive",children:["audit fetch failed: ",n.error]}):null,(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,a.jsx)(d.$,{"data-testid":"pushcut-test-button",variant:"outline",size:"sm",disabled:"sending"===i.status,onClick:()=>void x(),children:"sending"===i.status?"…":"Test notification"}),i.banner?(0,a.jsx)("span",{"data-testid":"pushcut-test-banner",className:"ok"===i.status?"text-xs text-emerald-600 font-mono":"text-xs text-destructive font-mono",children:i.banner}):null]}),(0,a.jsxs)("p",{className:"mt-2 text-[11px] text-muted-foreground",children:["Audit log: ",(0,a.jsx)("span",{className:"font-mono",children:"$ELANOUS_DIR/hitl-log.jsonl"})," ","(rotates at 100 MB \xb7 cv-3 β-4)"]})]})}var K=s(89064);let V=[{value:"fixed",label:"고정 (Fixed)",blurb:"입력 바 위에 항상 표시. 키보드 위주 dogfood 에 좋음."},{value:"popup",label:"팝업 (Popup)",blurb:"턴이 끝날 때마다 잠깐 (~6초) 나타나고 자동 dismiss. 모바일 화면 절약."},{value:"off",label:"끔 (Off)",blurb:"완전 숨김. 입력만으로 진행하고 싶을 때."}];function q(){let[e,t]=(0,r.useState)("fixed"),[s,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>(n(!0),t((0,K.sY)()),(0,K.u9)(t)),[]),(0,a.jsxs)("section",{"data-testid":"intent-panel-settings",className:"rounded-lg border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Intent Panel"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Showroom 의 intent 6-button 패널 표시 방식을 선택합니다."})]}),(0,a.jsx)("div",{role:"radiogroup","aria-label":"intent panel display mode",className:"mt-3 space-y-2",children:V.map(r=>{let n=s&&e===r.value;return(0,a.jsxs)("label",{"data-testid":"intent-panel-mode-".concat(r.value),className:"flex cursor-pointer items-start gap-3 rounded-md border border-border/60 p-3 hover:border-border","data-active":n?"true":"false",children:[(0,a.jsx)("input",{type:"radio",name:"intent-panel-display-mode",value:r.value,checked:n,onChange:()=>{var e;return e=r.value,void((0,K._n)(e),t(e))},className:"mt-0.5 h-4 w-4"}),(0,a.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:r.label}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:r.blurb})]})]},r.value)})})]})}var X=s(10417);function G(){let[e,t]=(0,r.useState)(X.kv),[s,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>(n(!0),t((0,X.Vm)()),(0,X.$L)(t)),[]),(0,a.jsxs)("section",{"data-testid":"chat-routing-settings",className:"rounded-lg border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Chat input classification"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"입력 중 자동 분류를 켜거나 끕니다. 전송은 기존 ACP 경로를 유지합니다."})]}),(0,a.jsx)("div",{className:"mt-3 space-y-2",children:(0,a.jsxs)("label",{"data-testid":"chat-routing-auto",className:"flex cursor-pointer items-start gap-3 rounded-md border border-border/60 p-3 hover:border-border","data-active":s&&e.autoRouting?"true":"false",children:[(0,a.jsx)("input",{type:"checkbox",checked:s?e.autoRouting:X.kv.autoRouting,onChange:e=>{var s;return s=e.target.checked,void((0,X.Kz)(s),t(e=>({...e,autoRouting:s})))},className:"mt-0.5 h-4 w-4"}),(0,a.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"Automatic routing"}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"입력 중 mission router 가 plan / build / review / research / quick / vision 으로 자동 분류합니다. OFF (default) 시 분류 요청을 보내지 않습니다."})]})]})})]})}function J(){var e,t,s,l;let{connection:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=(0,r.useContext)(n.C),o=null!=(t=null!=(e=null==i?void 0:i.baseUrl)?e:null==d?void 0:d.config.baseUrl)?t:"",c=null!=(l=null!=(s=null==i?void 0:i.token)?s:null==d?void 0:d.config.token)?l:"",[u,m]=(0,r.useState)(null),[x,p]=(0,r.useState)(!1),[h,f]=(0,r.useState)("");(0,r.useEffect)(()=>{if(m(null),f(""),!o)return;let e=new AbortController;return(async()=>{try{let t=await fetch("".concat(o.replace(/\/$/,""),"/v1/config/chat-fast-path"),{signal:e.signal,credentials:"same-origin",...c?{headers:{authorization:"Bearer ".concat(c)}}:{}});if(!t.ok)throw Error("HTTP ".concat(t.status));let s=await t.json();e.signal.aborted||m(s.enabled)}catch(t){e.signal.aborted||f(t instanceof Error?t.message:String(t))}})(),()=>e.abort()},[o,c]);let b=async e=>{p(!0),f("");try{let t=await fetch("".concat(o.replace(/\/$/,""),"/v1/config/chat-fast-path"),{method:"PUT",credentials:"same-origin",headers:{"content-type":"application/json",...c?{authorization:"Bearer ".concat(c)}:{}},body:JSON.stringify({enabled:e})});if(!t.ok)throw Error("HTTP ".concat(t.status));let s=await t.json();m(s.enabled)}catch(e){f(e instanceof Error?e.message:String(e))}finally{p(!1)}};return(0,a.jsxs)("section",{className:"space-y-3 rounded-lg border border-border bg-card p-4","data-testid":"fast-reply-card",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"짧은 물음은 빠르게"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:'인사\xb7짧은 물음은 도구 없이 먼저 답합니다 — 확인이 필요하면 "확인해 볼까요?"'}),(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,a.jsx)("input",{type:"checkbox",checked:null!=u&&u,disabled:null===u||x,onChange:e=>{b(e.target.checked)},"aria-label":"빠른 답변 켜기/끄기"}),null===u?"불러오는 중":u?"켜짐":"꺼짐"]}),h&&(0,a.jsx)("p",{role:"alert",className:"text-xs text-destructive",children:h})]})}function Z(e){let t=Object.entries(e);return 0===t.length?"—":t.map(e=>{let[t,s]=e;return"".concat(t,":").concat(s)}).join(" \xb7 ")}function ee(){let{config:e}=(0,n.Q)(),[t,s]=(0,r.useState)({ocr:{total:0,failures:0,byProvider:{},byPolishMode:{}},save:{total:0,failures:0,byPolishMode:{}},client:{cancel:0,edit:0,discard:0},startedAt:"",ts:""}),[l,i]=(0,r.useState)(!1),[o,c]=(0,r.useState)(null),[u,m]=(0,r.useState)(!1),x=(0,r.useCallback)(async()=>{if(e.baseUrl){m(!0);try{let t=await fetch("".concat(e.baseUrl,"/v1/metrics/notes-from-image"),{...e.token?{headers:{authorization:"Bearer ".concat(e.token)}}:{}});if(!t.ok)return void c("HTTP ".concat(t.status));let a=await t.json();s(a.snapshot),i(a.wired),c(null),(0,b.cY)("notes-metrics.snapshot",{wired:a.wired,ocrTotal:a.snapshot.ocr.total,saveTotal:a.snapshot.save.total})}catch(e){c(String(e instanceof Error?e.message:e))}finally{m(!1)}}},[e.baseUrl,e.token]);(0,r.useEffect)(()=>{x();let e=setInterval(()=>{x()},1e4);return()=>clearInterval(e)},[x]);let p=t.ocr.total-t.ocr.failures,h=t.save.total-t.save.failures;return(0,a.jsxs)("section",{"data-testid":"notes-metrics-card",className:"rounded-lg border border-border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-3 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-heading text-sm font-medium",children:"카메라 노트 metric"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"카메라 → markdown 노트 파이프라인 사용량 (daemon 재시작 시 0 으로 리셋)."})]}),(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>void x(),disabled:u,"aria-label":"refresh notes metrics",children:(0,a.jsx)(L.A,{className:u?"h-3.5 w-3.5 animate-spin":"h-3.5 w-3.5"})})]}),!l&&(0,a.jsx)("p",{"data-testid":"notes-metrics-not-wired",className:"mb-3 rounded bg-muted/50 px-2 py-1 text-xs text-muted-foreground",children:"collector 미wire — runNexus 재기동 후 측정 시작."}),o&&(0,a.jsxs)("p",{"data-testid":"notes-metrics-error",className:"mb-3 text-xs text-destructive",children:["metric fetch 실패: ",o]}),(0,a.jsxs)("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"OCR 총 / 성공 / 실패"}),(0,a.jsxs)("dd",{"data-testid":"notes-metrics-ocr",children:[t.ocr.total," / ",p," / ",t.ocr.failures]}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"OCR provider"}),(0,a.jsx)("dd",{"data-testid":"notes-metrics-ocr-providers",children:Z(t.ocr.byProvider)}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"OCR polishMode"}),(0,a.jsx)("dd",{"data-testid":"notes-metrics-ocr-polish",children:Z(t.ocr.byPolishMode)}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Save 총 / 성공 / 실패"}),(0,a.jsxs)("dd",{"data-testid":"notes-metrics-save",children:[t.save.total," / ",h," / ",t.save.failures]}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Save polishMode"}),(0,a.jsx)("dd",{"data-testid":"notes-metrics-save-polish",children:Z(t.save.byPolishMode)}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Client cancel \xb7 edit \xb7 discard"}),(0,a.jsxs)("dd",{"data-testid":"notes-metrics-client",children:[t.client.cancel," \xb7 ",t.client.edit," \xb7 ",t.client.discard]})]}),t.startedAt&&l&&(0,a.jsxs)("p",{className:"mt-3 text-[10px] text-muted-foreground",children:["since ",t.startedAt]})]})}var et=s(54219);function es(){let[e,t]=(0,r.useState)(et.hn);(0,r.useEffect)(()=>{t((0,et.hn)())},[]);let s=e=>{t((0,et.qv)(e)),(0,b.cY)("settings.ocr-prefs.update",e)};return(0,a.jsxs)("section",{"data-testid":"ocr-prefs-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDCF7 OCR 기본 설정"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"사진 → 노트 모달의 초기 토글 상태. 매번 같은 옵션을 켜고 있다면 default 로 저장."})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"flex items-center justify-between gap-3 rounded-md border border-input bg-background px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{children:"LLM 비전 default"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:"\xb7 더 정확하지만 느림 + 비쌈"})]}),(0,a.jsx)("input",{type:"checkbox","data-testid":"ocr-prefs-llm-vision",checked:e.defaultUseLlmVision,onChange:e=>s({defaultUseLlmVision:e.target.checked}),"aria-label":"LLM 비전 default"})]}),(0,a.jsxs)("label",{className:"flex items-center justify-between gap-3 rounded-md border border-input bg-background px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{children:"손글씨 default"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:"\xb7 handwriting strength 자동 추가"})]}),(0,a.jsx)("input",{type:"checkbox","data-testid":"ocr-prefs-handwriting",checked:e.defaultPreferHandwriting,onChange:e=>s({defaultPreferHandwriting:e.target.checked}),"aria-label":"손글씨 default"})]})]}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{t((0,et.sg)()),(0,b.cY)("settings.ocr-prefs.reset")},className:"text-xs text-muted-foreground","data-testid":"ocr-prefs-reset",children:"기본값으로 리셋"})})]})}let ea=["lm-studio","vllm","ollama","anthropic-openai-wrap"],er={"lm-studio":"http://localhost:1234",vllm:"http://localhost:8000",ollama:"http://localhost:11434","anthropic-openai-wrap":"https://api.anthropic.com"};function en(){let{client:e,config:t}=(0,n.Q)(),[s,l]=(0,r.useState)({status:"idle"}),[i,u]=(0,r.useState)(0),[m,x]=(0,r.useState)(!1),[p,h]=(0,r.useState)(""),[f,b]=(0,r.useState)("anthropic-openai-wrap"),[g,j]=(0,r.useState)(er["anthropic-openai-wrap"]),[v,y]=(0,r.useState)(""),[N,k]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(!t.baseUrl)return void l({status:"idle"});let s=!1;return l({status:"loading"}),(async()=>{try{let t=await e.getLlmHosts();s||l({status:"ok",data:t})}catch(e){s||l({status:"error",error:e instanceof Error?e.message:String(e)})}})(),()=>{s=!0}},[e,t.baseUrl,i]);let w=(0,r.useCallback)(()=>u(e=>e+1),[]),S=(0,r.useCallback)(e=>{b(e),j(er[e])},[]),C=(0,r.useCallback)(async()=>{let t=p.trim(),a=g.trim(),r=v.trim();if(!t||!a)return void c.oR.error("name + endpoint 필수");if("anthropic-openai-wrap"===f&&!r)return void c.oR.error("Anthropic 은 apiKey 필수");k(!0);try{var n,l;let i=[...(null!=(l=null==(n=s.data)?void 0:n.hosts)?l:[]).filter(e=>e.name!==t).map(e=>{let t={name:e.name,kind:e.kind,endpoint:e.endpoint};return e.apiKey&&"[redacted]"!==e.apiKey&&(t.apiKey=e.apiKey),t}),{name:t,kind:f,endpoint:a,...r?{apiKey:r}:{}}];await e.setLlmHosts(i),c.oR.success("host '".concat(t,"' 추가됨")),h(""),y(""),x(!1),w()}catch(e){c.oR.error("추가 실패: ".concat(e instanceof Error?e.message:String(e)))}finally{k(!1)}},[e,p,f,g,v,s.data,w]),U=(0,r.useCallback)(async t=>{k(!0);try{var a,r;let n=(null!=(r=null==(a=s.data)?void 0:a.hosts)?r:[]).filter(e=>e.name!==t).map(e=>{let t={name:e.name,kind:e.kind,endpoint:e.endpoint};return e.apiKey&&"[redacted]"!==e.apiKey&&(t.apiKey=e.apiKey),t});await e.setLlmHosts(n),c.oR.success("host '".concat(t,"' 제거됨")),w()}catch(e){c.oR.error("제거 실패: ".concat(e instanceof Error?e.message:String(e)))}finally{k(!1)}},[e,s.data,w]),P=(0,r.useCallback)(async()=>{k(!0);try{await e.clearLlmHosts(),c.oR.success("env / legacy 로 환원"),w()}catch(e){c.oR.error("reset 실패: ".concat(e instanceof Error?e.message:String(e)))}finally{k(!1)}},[e,w]);if(!t.baseUrl)return null;let E=s.data,M=(null==E?void 0:E.source)==="override"?"bg-fuchsia-100 text-fuchsia-700 dark:bg-fuchsia-900 dark:text-fuchsia-200":(null==E?void 0:E.source)==="env"?"bg-amber-100 text-amber-700 dark:bg-amber-900 dark:text-amber-200":"bg-zinc-100 text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300";return(0,a.jsxs)("section",{className:"space-y-2","data-testid":"llm-hosts-card",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"LLM Hosts"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[E&&(0,a.jsx)("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium uppercase ".concat(M),"data-testid":"llm-hosts-source-badge",children:E.source}),(0,a.jsx)("span",{"data-testid":"llm-hosts-count",children:E?"".concat(E.count," host").concat(1===E.count?"":"s"):"loading"===s.status?"loading…":""}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:w,disabled:"loading"===s.status||N,"data-testid":"llm-hosts-refresh",children:"Refresh"})]})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-2",children:[(null==E?void 0:E.deprecations)&&E.deprecations.length>0&&(0,a.jsxs)("div",{className:"rounded border border-amber-300 bg-amber-50 p-2 text-[11px] text-amber-800 dark:border-amber-700 dark:bg-amber-900/30 dark:text-amber-200","data-testid":"llm-hosts-deprecations",children:[(0,a.jsx)("p",{className:"font-medium",children:"호환성 경고 \xb7 다음 release 에서 제거 예정"}),(0,a.jsx)("ul",{className:"ml-4 list-disc",children:E.deprecations.map(e=>(0,a.jsx)("li",{className:"font-mono text-[10px]",children:e},e))})]}),"error"===s.status&&(0,a.jsxs)("p",{className:"text-rose-500","data-testid":"llm-hosts-error",children:["조회 실패 \xb7 ",s.error]}),"loading"===s.status&&!E&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing /v1/llm/hosts…"}),E&&0===E.hosts.length&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"No hosts configured. Add one below to enable a remote LLM provider (e.g. Anthropic / Gemini API direct)."}),E&&E.hosts.length>0&&(0,a.jsx)("ul",{className:"space-y-1","data-testid":"llm-hosts-list",children:E.hosts.map(e=>(0,a.jsxs)("li",{className:"flex items-center gap-2 rounded border border-border bg-muted/30 px-2 py-1","data-testid":"llm-host-row-".concat(e.name),children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 font-mono text-[11px] font-medium",children:[(0,a.jsx)("span",{children:e.name}),(0,a.jsx)("span",{className:"rounded bg-muted px-1 text-[9px] uppercase text-muted-foreground",children:e.kind}),"[redacted]"===e.apiKey&&(0,a.jsx)("span",{className:"rounded bg-emerald-100 px-1 text-[9px] uppercase text-emerald-700 dark:bg-emerald-900 dark:text-emerald-200",title:"apiKey configured (server-side, not echoed)","data-testid":"llm-host-key-badge-".concat(e.name),children:"key"})]}),(0,a.jsx)("div",{className:"truncate font-mono text-[10px] text-muted-foreground",children:e.endpoint})]}),"override"===E.source&&(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{U(e.name)},disabled:N,"data-testid":"llm-host-remove-".concat(e.name),children:"Remove"})]},e.name))}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 pt-1",children:[(0,a.jsx)(d.$,{size:"sm",onClick:()=>x(e=>!e),disabled:N,"data-testid":"llm-hosts-add-toggle",children:m?"Cancel add":"Add host"}),(null==E?void 0:E.source)==="override"&&(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{P()},disabled:N,"data-testid":"llm-hosts-reset",children:"Reset to env/legacy"})]}),m&&(0,a.jsxs)("div",{className:"mt-2 space-y-1.5 rounded border border-dashed border-border p-2","data-testid":"llm-hosts-add-form",children:[(0,a.jsx)(o.p,{value:p,placeholder:"name (e.g. anthropic-cloud)",onChange:e=>h(e.target.value),"data-testid":"llm-hosts-add-name",className:"text-[11px]"}),(0,a.jsx)("select",{value:f,onChange:e=>S(e.target.value),className:"flex h-8 w-full rounded-md border border-input bg-background px-2 text-xs","data-testid":"llm-hosts-add-kind",children:ea.map(e=>(0,a.jsx)("option",{value:e,children:e},e))}),(0,a.jsx)(o.p,{value:g,placeholder:"endpoint URL",onChange:e=>j(e.target.value),"data-testid":"llm-hosts-add-endpoint",className:"text-[11px]"}),"anthropic-openai-wrap"===f&&(0,a.jsx)(o.p,{type:"password",value:v,placeholder:"apiKey (sk-ant-…)",onChange:e=>y(e.target.value),"data-testid":"llm-hosts-add-apikey",className:"text-[11px]"}),(0,a.jsx)(d.$,{size:"sm",onClick:()=>{C()},disabled:N||!p.trim()||!g.trim(),"data-testid":"llm-hosts-add-submit",children:N?"Saving…":"Save"})]})]}),(0,a.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["In-memory override \xb7 daemon restart reverts to ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"ELANOUS_LLM_HOSTS"})," env / legacy single host. Permanent change → set the env var in ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:".zshrc"})," or ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"launchctl setenv"}),". PUT replaces the full list, so re-add Anthropic/Gemini hosts in one go (existing apiKeys appear as ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"[redacted]"})," and aren’t round-trippable)."]})]})}var el=s(24425);function ei(){var e,t;let[s,n]=(0,r.useState)(el.lu);(0,r.useEffect)(()=>{n((0,el.lu)())},[]);let l=s.speakingThresholdMultiplier===el.Qc.speakingThresholdMultiplier;return(0,a.jsxs)("section",{"data-testid":"voice-prefs-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83C\uDF99️ Voice barge-in 튜닝"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"BI-2 ducking 강도 — TTS 재생 중 자기-에코 false-fire 를 막는 RMS multiplier. 변경은 voice toggle off → on 또는 새로고침 시 적용."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsx)("span",{className:"font-medium",children:"speaking threshold multiplier"}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"voice-prefs-multiplier-value",children:(e=s.speakingThresholdMultiplier,"".concat(e.toFixed(1),"\xd7"))})]}),(0,a.jsx)("input",{type:"range",min:el.u4,max:el.M_,step:.1,value:s.speakingThresholdMultiplier,onChange:e=>{var t;return t={speakingThresholdMultiplier:Number(e.target.value)},void(n((0,el.ik)(t)),(0,b.cY)("settings.voice-prefs.update",t))},"data-testid":"voice-prefs-multiplier-slider","aria-label":"Speaking threshold multiplier","aria-valuemin":el.u4,"aria-valuemax":el.M_,"aria-valuenow":s.speakingThresholdMultiplier,className:"w-full"}),(0,a.jsx)("p",{className:"mt-1 text-[11px] text-muted-foreground","data-testid":"voice-prefs-hint",children:(t=s.speakingThresholdMultiplier)<=1.2?"거의 ducking 없음 — 자기-에코 false-fire 가능":t<=1.7?"약한 ducking — 강한 AEC 환경 + 빠른 cut-in":t<=2.5?"기본값 — 대부분 환경에서 균형":t<=3.5?"강한 ducking — 시끄러운 환경 / 민감한 마이크":"매우 강한 ducking — 자기-에코가 심한 환경"})]})}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{n((0,el.KS)()),(0,b.cY)("settings.voice-prefs.reset")},disabled:l,className:"text-xs text-muted-foreground","data-testid":"voice-prefs-reset",children:["기본값으로 리셋 (",el.Qc.speakingThresholdMultiplier.toFixed(1),"\xd7)"]})})]})}var ed=s(8596),eo=s(9380),ec=s(49519);function eu(e){let{currentTier:t,nextTier:s,currentTierMonthlyUsd:n,nextTierMonthlyUsd:l,monthSoFarUsd:i,onConfirm:o,onCancel:c}=e,u=(0,r.useRef)(null);(0,r.useEffect)(()=>{var e;null==(e=u.current)||e.focus()},[]);let m=eo.YS[t],x=eo.YS[s],p=l>n,h=p?'Switch to "'.concat(eo.LW[s],'" tier?'):'Switch to "'.concat(eo.LW[s],'" tier (cheaper)'),f=l-n,b=f>=0?"+".concat((0,eo.Bg)(Math.abs(f))):"-".concat((0,eo.Bg)(Math.abs(f)));return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"tier-confirm-title","aria-describedby":"tier-confirm-summary","data-testid":"tier-change-confirm-modal",onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),c())},children:(0,a.jsxs)("div",{className:"w-full max-w-md rounded-lg border bg-white p-4 shadow-xl dark:bg-zinc-900 ".concat(p?"border-amber-300 dark:border-amber-700":"border-emerald-300 dark:border-emerald-700"),children:[(0,a.jsxs)("h2",{id:"tier-confirm-title",className:"mb-2 text-sm font-medium ".concat(p?"text-amber-700 dark:text-amber-300":"text-emerald-700 dark:text-emerald-300"),children:[p?"⚠️":"✓"," ",h]}),(0,a.jsx)("p",{id:"tier-confirm-summary",className:"mb-3 text-xs text-zinc-700 dark:text-zinc-300",children:x.rationale}),(0,a.jsxs)("dl",{className:"mb-4 space-y-1.5 text-xs",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("dt",{className:"text-zinc-500 dark:text-zinc-400",children:"Month so far"}),(0,a.jsx)("dd",{className:"font-mono tabular-nums text-zinc-900 dark:text-zinc-100","data-testid":"tier-confirm-month-so-far",children:(0,eo.Bg)(i).replace("/mo","")})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("dt",{className:"text-zinc-500 dark:text-zinc-400",children:["At current tier (",eo.LW[t],")"]}),(0,a.jsx)("dd",{className:"font-mono tabular-nums text-zinc-900 dark:text-zinc-100","data-testid":"tier-confirm-current-projected",children:(0,eo.Bg)(n)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between rounded px-2 py-1 ".concat(p?"bg-amber-50 dark:bg-amber-950/40":"bg-emerald-50 dark:bg-emerald-950/40"),children:[(0,a.jsxs)("dt",{className:p?"text-amber-700 dark:text-amber-300":"text-emerald-700 dark:text-emerald-300",children:["At new tier (",eo.LW[s],")"]}),(0,a.jsxs)("dd",{className:"font-mono tabular-nums ".concat(p?"text-amber-900 dark:text-amber-100":"text-emerald-900 dark:text-emerald-100"),"data-testid":"tier-confirm-next-projected",children:[(0,eo.Bg)(l),(0,a.jsxs)("span",{className:"ml-1 text-[10px] opacity-70","data-testid":"tier-confirm-delta",children:["(",b,")"]})]})]})]}),(0,a.jsxs)("p",{className:"mb-3 text-[11px] text-zinc-500 dark:text-zinc-400","data-testid":"tier-confirm-rate-line",children:["Per-call: $",m.usdPerMinAudio.toFixed(3),"/min → $",(x.usdPerMinAudio+x.loadedExtraUsdPerMin).toFixed(3),"/min"]}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:c,"data-testid":"tier-confirm-cancel",children:"Cancel"}),(0,a.jsx)(d.$,{ref:u,type:"button",size:"sm",onClick:o,"data-testid":"tier-confirm-confirm",className:p?"bg-amber-600 text-white hover:bg-amber-700":"bg-emerald-600 text-white hover:bg-emerald-700",children:p?"Confirm switch":"Switch"})]})]})})}let em=eo.Ql.length;function ex(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(ec.Ij),[i,o]=(0,r.useState)(null),[c,u]=(0,r.useState)("idle"),[m]=(0,r.useState)(0);(0,r.useEffect)(()=>{l((0,ec.Ij)());let e=!1;return(async()=>{let s=await (0,ed.ee)(t);!e&&s&&(l(s),u("synced"))})(),()=>{e=!0}},[t]);let x=(0,ec.gF)(s),p=eo.YS[x],h=void 0===s.stt,f=(0,eo.K0)(null!=i?i:x),g=(0,r.useMemo)(()=>{let e={};for(let t of eo.Ql)e[t]=(0,eo.nX)(t,s.audioMinPerDay);return e},[s.audioMinPerDay]),j=e=>{l((0,ec.Pz)({stt:e})),u("syncing"),(0,b.cY)("settings.model-tier.update",{stt:e}),(0,ed.ZB)(t,e).then(u)};return(0,a.jsxs)("section",{"data-testid":"voice-model-tier-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83C\uDF9A️ Voice transcription quality"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick how accurate vs. cheap the speech-to-text should be — elanous picks the model. Switching takes effect on the next voice call."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsxs)("span",{className:"font-medium",children:[eo.LW[x],h&&(0,a.jsx)("span",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground","data-testid":"voice-model-tier-default-badge",children:"Smart default"}),"syncing"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"voice-model-tier-sync-status",children:"Syncing…"}),"synced"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"voice-model-tier-sync-status",children:"Synced"}),"offline"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"voice-model-tier-sync-status",title:"Daemon unreachable — change saved locally \xb7 will sync when daemon comes back",children:"Offline"}),"error"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"voice-model-tier-sync-status",title:"Daemon refused the write — local copy still has your choice",children:"Sync error"})]}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"voice-model-tier-cost",children:s.audioMinPerDay>0?(0,eo.Bg)(g[x]):"".concat((p.usdPerMinAudio+p.loadedExtraUsdPerMin).toFixed(3),"/min")})]}),(0,a.jsx)("input",{type:"range",min:0,max:em-1,step:1,value:f,onChange:e=>{let t=function(e){let t=Math.max(0,Math.min(em-1,Math.round(e)));return eo.Ql[t]}(Number(e.target.value));if(t!==x){if(function(e){let{currentTier:t,nextTier:s,currentTierMonthlyUsd:a,nextTierMonthlyUsd:r,audioMinPerDay:n}=e;if(t===s)return!1;let l=r-a;if(l<0)return!1;if(n>0)return l>=1;let i=eo.YS[t].usdPerMinAudio+eo.YS[t].loadedExtraUsdPerMin,d=eo.YS[s].usdPerMinAudio+eo.YS[s].loadedExtraUsdPerMin;return 0===i?d>0:d>=5*i}({currentTier:x,nextTier:t,currentTierMonthlyUsd:g[x],nextTierMonthlyUsd:g[t],audioMinPerDay:s.audioMinPerDay}))return void o(t);j(t)}},"data-testid":"voice-model-tier-slider","aria-label":"Voice transcription tier","aria-valuemin":0,"aria-valuemax":em-1,"aria-valuenow":f,"aria-valuetext":eo.LW[x],className:"w-full"}),(0,a.jsx)("div",{className:"mt-1 flex justify-between text-[10px] text-muted-foreground","data-testid":"voice-model-tier-tick-labels",children:eo.Ql.map(e=>(0,a.jsx)("span",{className:e===x?"font-semibold text-foreground":void 0,children:eo.LW[e]},e))}),(0,a.jsx)("p",{className:"mt-2 text-[11px] text-muted-foreground","data-testid":"voice-model-tier-rationale",children:p.rationale}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-muted-foreground/80","data-testid":"voice-model-tier-model-id",children:["Model: ",(0,a.jsx)("span",{className:"font-mono",children:p.model}),"wip"===p.status&&(0,a.jsx)("span",{className:"ml-1 rounded bg-amber-500/10 px-1 py-0.5 text-amber-600",children:"WIP \xb7 install local binary first"})]})]})}),(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,a.jsxs)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{l((0,ec.Pv)()),o(null),u("syncing"),(0,b.cY)("settings.model-tier.reset"),(0,ed.ZB)(t,null).then(u)},disabled:h,className:"text-xs text-muted-foreground","data-testid":"voice-model-tier-reset",children:["Reset to default (",eo.LW[eo.j$],")"]}),s.audioMinPerDay>0&&(0,a.jsxs)("span",{className:"text-[10px] text-muted-foreground","data-testid":"voice-model-tier-usage-hint",children:["~",s.audioMinPerDay.toFixed(0)," min/day \xb7 14-day rolling avg"]})]}),i&&(0,a.jsx)(eu,{currentTier:x,nextTier:i,currentTierMonthlyUsd:g[x],nextTierMonthlyUsd:g[i],monthSoFarUsd:m,onConfirm:()=>{i&&j(i),o(null)},onCancel:()=>{o(null),(0,b.cY)("settings.model-tier.cancel",{from:x})}})]})}let ep=eo.Ql.length;function eh(e){return"string"==typeof e&&(0,eo.D9)(e)?e:"anthropic"}function ef(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(ec.Ij),[i,o]=(0,r.useState)(()=>eh(e.provider)),[c,u]=(0,r.useState)("idle");(0,r.useEffect)(()=>{l((0,ec.Ij)());let e=!1;return(async()=>{let s=await (0,ed.ee)(t);!e&&s&&(l(s),u("synced"))})(),()=>{e=!0}},[t]),(0,r.useEffect)(()=>{o(eh(e.provider))},[e.provider]);let m=(0,ec.oA)(s),x=void 0===s.llm,p=(0,eo.K0)(m),h=(0,eo.f7)(i,m);return(0,a.jsxs)("section",{"data-testid":"llm-model-tier-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83E\uDDE0 AI assistant quality"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick how careful vs. fast the model should think. elanous chooses the right model on your active provider \xb7 the slider stays the same across providers."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsxs)("span",{className:"font-medium",children:[eo.LW[m],x&&(0,a.jsx)("span",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground","data-testid":"llm-model-tier-default-badge",children:"Smart default"}),"syncing"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"llm-model-tier-sync-status",children:"Syncing…"}),"synced"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"llm-model-tier-sync-status",children:"Synced"}),"offline"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"llm-model-tier-sync-status",title:"Daemon unreachable",children:"Offline"}),"error"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"llm-model-tier-sync-status",title:"Daemon refused the write",children:"Sync error"})]}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"llm-model-tier-provider",children:eo.T0[i]})]}),(0,a.jsx)("input",{type:"range",min:0,max:ep-1,step:1,value:p,onChange:e=>{let s=function(e){let t=Math.max(0,Math.min(ep-1,Math.round(e)));return eo.Ql[t]}(Number(e.target.value));s!==m&&(l((0,ec.Pz)({llm:s})),u("syncing"),(0,b.cY)("settings.model-tier.llm.update",{llm:s}),(0,ed.tM)(t,s).then(u))},"data-testid":"llm-model-tier-slider","aria-label":"AI assistant tier","aria-valuemin":0,"aria-valuemax":ep-1,"aria-valuenow":p,"aria-valuetext":eo.LW[m],className:"w-full"}),(0,a.jsx)("div",{className:"mt-1 flex justify-between text-[10px] text-muted-foreground","data-testid":"llm-model-tier-tick-labels",children:eo.Ql.map(e=>(0,a.jsx)("span",{className:e===m?"font-semibold text-foreground":void 0,children:eo.LW[e]},e))}),(0,a.jsx)("p",{className:"mt-2 text-[11px] text-muted-foreground","data-testid":"llm-model-tier-rationale",children:h.rationale}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-muted-foreground/80","data-testid":"llm-model-tier-model-id",children:["Model: ",(0,a.jsx)("span",{className:"font-mono",children:h.model}),h.reasoningLevel&&(0,a.jsxs)("span",{className:"ml-1 text-muted-foreground",children:["\xb7 reasoning: ",(0,a.jsx)("span",{className:"font-mono",children:h.reasoningLevel})]}),"wip"===h.status&&(0,a.jsx)("span",{className:"ml-1 rounded bg-amber-500/10 px-1 py-0.5 text-amber-600",children:"WIP \xb7 install local runtime first"})]})]})}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{l((0,ec.Pz)({llm:void 0})),u("syncing"),(0,b.cY)("settings.model-tier.llm.reset"),(0,ed.tM)(t,null).then(u)},disabled:x,className:"text-xs text-muted-foreground","data-testid":"llm-model-tier-reset",children:["Reset to default (",eo.LW[eo.j$],")"]})})]})}let eb=eo.Ql.length;function eg(){var e;let{config:t}=(0,n.Q)(),s=(0,r.useMemo)(()=>({baseUrl:t.baseUrl,...t.token?{token:t.token}:{}}),[t.baseUrl,t.token]),[l,i]=(0,r.useState)(ec.Ij),[o,c]=(0,r.useState)("idle");(0,r.useEffect)(()=>{i((0,ec.Ij)());let e=!1;return(async()=>{let t=await (0,ed.ee)(s);!e&&t&&(i(t),c("synced"))})(),()=>{e=!0}},[s]);let u=(0,ec.Md)(l),m=eo.eP[u],x=void 0===l.tts,p=(0,eo.K0)(u),h=!Number.isFinite(e=m.usdPerCharacter)||e<=0?"free":"$".concat((1e6*e).toFixed(0),"/M chars");return(0,a.jsxs)("section",{"data-testid":"tts-model-tier-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDD0A Voice playback quality"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick text-to-speech quality vs. cost. Voice identity (Rachel \xb7 SoYoung \xb7 custom) lives in a separate picker (Phase 2 M2-2b)."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsxs)("span",{className:"font-medium",children:[eo.LW[u],x&&(0,a.jsx)("span",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground","data-testid":"tts-model-tier-default-badge",children:"Smart default"}),"syncing"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"tts-model-tier-sync-status",children:"Syncing…"}),"synced"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"tts-model-tier-sync-status",children:"Synced"}),"offline"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"tts-model-tier-sync-status",children:"Offline"}),"error"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"tts-model-tier-sync-status",children:"Sync error"})]}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"tts-model-tier-rate",children:h})]}),(0,a.jsx)("input",{type:"range",min:0,max:eb-1,step:1,value:p,onChange:e=>{let t=function(e){let t=Math.max(0,Math.min(eb-1,Math.round(e)));return eo.Ql[t]}(Number(e.target.value));t!==u&&(i((0,ec.Pz)({tts:t})),c("syncing"),(0,b.cY)("settings.model-tier.tts.update",{tts:t}),(0,ed.pP)(s,t).then(c))},"data-testid":"tts-model-tier-slider","aria-label":"Voice playback tier","aria-valuemin":0,"aria-valuemax":eb-1,"aria-valuenow":p,"aria-valuetext":eo.LW[u],className:"w-full"}),(0,a.jsx)("div",{className:"mt-1 flex justify-between text-[10px] text-muted-foreground","data-testid":"tts-model-tier-tick-labels",children:eo.Ql.map(e=>(0,a.jsx)("span",{className:e===u?"font-semibold text-foreground":void 0,children:eo.LW[e]},e))}),(0,a.jsx)("p",{className:"mt-2 text-[11px] text-muted-foreground","data-testid":"tts-model-tier-rationale",children:m.rationale}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-muted-foreground/80","data-testid":"tts-model-tier-model-id",children:["Provider: ",(0,a.jsx)("span",{className:"font-mono",children:m.provider}),(0,a.jsx)("span",{className:"ml-1",children:"\xb7"}),(0,a.jsxs)("span",{className:"ml-1",children:["Model: ",(0,a.jsx)("span",{className:"font-mono",children:m.model})]})]})]})}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{i((0,ec.Pz)({tts:void 0})),c("syncing"),(0,b.cY)("settings.model-tier.tts.reset"),(0,ed.pP)(s,null).then(c)},disabled:x,className:"text-xs text-muted-foreground","data-testid":"tts-model-tier-reset",children:["Reset to default (",eo.LW[eo.j$],")"]})})]})}let ej=null;async function ev(e){var t;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.baseUrl)return null;let a=null!=(t=s.now)?t:Date.now();if(!s.bypassMemo&&ej&&a-ej.fetchedAt<6e4)return ej.lib;try{let t=e.baseUrl.replace(/\/$/,"")+"/v1/elevenlabs/voices",s={};e.token&&(s.authorization="Bearer ".concat(e.token));let r=await fetch(t,{headers:s});if(!r.ok)return null;let n=await r.json(),l={voices:Array.isArray(n.voices)?n.voices:[],configured:!0===n.configured,fromCache:!0===n.fromCache};return ej={fetchedAt:a,lib:l},l}catch(e){return null}}let ey="elanous.tts-voice.recent";function eN(){if("undefined"==typeof localStorage)return[];try{let e=localStorage.getItem(ey);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(e=>"string"==typeof e&&e.length>0).slice(0,5)}catch(e){return[]}}let ek=[{key:"default",label:"Default",hint:"Fallback when a specific context isn't set"},{key:"chat",label:"Chat reply",hint:"Used by the PWA / TUI chat surface"},{key:"digest",label:"Morning digest",hint:"Daily summary read-back (P2-D7)"},{key:"alert",label:"Push alerts",hint:"Urgency-driven voice for push notifications"},{key:"discord",label:"Discord bot",hint:"X9 Discord voice channel + DM voice replies"}],ew="elanous.tts-voice-map";function eS(){if("undefined"==typeof localStorage)return{};try{let e=localStorage.getItem(ew);if(!e)return{};let t=JSON.parse(e),s={};for(let e of ek){let a=t[e.key];"string"==typeof a&&a.trim().length>0&&(s[e.key]=a.trim())}return s}catch(e){return{}}}function eC(e){return[e.gender,e.accent,e.category].filter(Boolean).join(" \xb7 ")||"voice"}function eU(){var e;let{config:t}=(0,n.Q)(),s=(0,r.useMemo)(()=>({baseUrl:t.baseUrl,...t.token?{token:t.token}:{}}),[t.baseUrl,t.token]),[l,i]=(0,r.useState)(eS),[c,u]=(0,r.useState)("idle"),[m,x]=(0,r.useState)(null),[p,h]=(0,r.useState)(""),[f,g]=(0,r.useState)(null),[j,v]=(0,r.useState)(eN),y=(0,r.useRef)(null),[N,k]=(0,r.useState)(null);(0,r.useEffect)(()=>{i(eS()),v(eN());let e=!1;return(async()=>{let t=await ev(s);e||(x(t),u(null===t?"offline":"synced"))})(),()=>{e=!0}},[s]);let w=(0,r.useMemo)(()=>{let e=new Map;if(m)for(let t of m.voices)e.set(t.id,t);return e},[m]),S=(0,r.useMemo)(()=>{if(!m)return[];var e=m.voices;let t=p.trim().toLowerCase();return t?e.filter(e=>[e.name,e.category,e.accent,e.gender,e.age,e.description,e.language,e.id].filter(Boolean).join(" ").toLowerCase().includes(t)):[...e]},[m,p]),C=async(e,t)=>{let a=(null!=t?t:"").trim(),r={...l};a?r[e]=a:delete r[e],i(r);if("undefined"!=typeof localStorage)try{localStorage.setItem(ew,JSON.stringify(r))}catch(e){}a&&(!function(e){if("undefined"==typeof localStorage||!e||"string"!=typeof e)return;let t=e.trim();if(!t)return;let s=eN().filter(e=>e!==t),a=[t,...s].slice(0,5);try{localStorage.setItem(ey,JSON.stringify(a))}catch(e){}}(a),v(eN())),u("syncing"),(0,b.cY)("settings.tts-voice.apply",{context:e,voiceId:a||null}),u(await (0,ed.D4)(s,{[e]:a||null}))},U=async()=>{if(i({}),"undefined"!=typeof localStorage)try{localStorage.removeItem(ew)}catch(e){}u("syncing"),(0,b.cY)("settings.tts-voice.reset-all"),u(await (0,ed.D4)(s,{default:null,chat:null,digest:null,alert:null,discord:null}))},P=e=>{if(!e.previewUrl)return;y.current&&(y.current.pause(),y.current.src="");let t=new Audio(e.previewUrl);y.current=t,k(e.id),t.addEventListener("ended",()=>k(t=>t===e.id?null:t)),t.addEventListener("error",()=>k(t=>t===e.id?null:t)),t.play().catch(()=>k(t=>t===e.id?null:t)),(0,b.cY)("settings.tts-voice.preview",{voiceId:e.id})},E=()=>{y.current&&(y.current.pause(),y.current.src="",y.current=null),k(null)},M=Object.keys(l).length>0,A=null!==m&&m.voices.length>0;return(0,a.jsxs)("section",{"data-testid":"tts-voice-id-picker-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDDE3️ Voice identity (per context)"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick a different voice per surface (chat / morning digest / alerts / Discord). Browse the ElevenLabs library or paste a voice id directly."})]}),"syncing"===c&&(0,a.jsx)("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"tts-voice-sync-status",children:"Syncing…"}),"synced"===c&&(0,a.jsx)("span",{className:"rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"tts-voice-sync-status",children:"Synced"}),"offline"===c&&(0,a.jsx)("span",{className:"rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"tts-voice-sync-status",title:"Daemon unreachable",children:"Offline"}),"error"===c&&(0,a.jsx)("span",{className:"rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"tts-voice-sync-status",children:"Sync error"})]}),m&&!m.configured&&(0,a.jsxs)("div",{className:"mb-3 rounded bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300","data-testid":"tts-voice-library-unconfigured",children:["ElevenLabs API key not set — set ",(0,a.jsx)("code",{className:"font-mono",children:"ELEVENLABS_API_KEY"})," in your env or store via ",(0,a.jsx)("code",{className:"font-mono",children:"elanous config set-secret elevenlabs.apiKey <key>"})," ","to browse the 10k+ voice library."]}),(0,a.jsx)("div",{className:"space-y-2","data-testid":"tts-voice-rows",children:ek.map(e=>{let t=l[e.key],s=t?w.get(t):void 0;return(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-baseline justify-between gap-2 text-xs",children:[(0,a.jsx)("span",{className:"font-medium","data-testid":"tts-voice-row-".concat(e.key,"-label"),children:e.label}),s&&(0,a.jsxs)("span",{className:"text-[11px] text-muted-foreground","data-testid":"tts-voice-row-".concat(e.key,"-current-name"),children:[s.name," ",(0,a.jsxs)("span",{className:"opacity-60",children:["\xb7 ",eC(s)]})]}),t&&!s&&(0,a.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground","data-testid":"tts-voice-row-".concat(e.key,"-current"),children:t})]}),(0,a.jsx)("p",{className:"mb-1 text-[10px] text-muted-foreground",children:e.hint}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(o.p,{defaultValue:null!=t?t:"",onBlur:s=>{let a=s.target.value.trim();a!==(null!=t?t:"")&&C(e.key,a||null)},placeholder:"Voice id (paste) or use Browse →",className:"text-xs","data-testid":"tts-voice-row-".concat(e.key,"-input")}),(0,a.jsx)(d.$,{type:"button",size:"sm",variant:f===e.key?"default":"outline",onClick:()=>g(f===e.key?null:e.key),disabled:!A,className:"text-xs","data-testid":"tts-voice-row-".concat(e.key,"-browse"),title:A?"Browse library":"Library not loaded yet",children:"Browse"}),(null==s?void 0:s.previewUrl)&&(0,a.jsx)(d.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>N===s.id?E():P(s),className:"text-xs","data-testid":"tts-voice-row-".concat(e.key,"-preview"),children:N===s.id?"⏸":"▶"}),(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>C(e.key,null),disabled:!t,className:"text-xs text-muted-foreground","data-testid":"tts-voice-row-".concat(e.key,"-clear"),children:"Clear"})]})]},e.key)})}),null!==f&&A&&(0,a.jsxs)("div",{className:"mt-3 rounded-md border border-input bg-background p-2","data-testid":"tts-voice-library-catalog",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-2",children:[(0,a.jsx)(o.p,{value:p,onChange:e=>h(e.target.value),placeholder:"Search voices (name \xb7 accent \xb7 gender \xb7 description)",className:"text-xs","data-testid":"tts-voice-library-search"}),(0,a.jsx)(d.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>g(null),className:"text-xs text-muted-foreground","data-testid":"tts-voice-library-close",children:"Close"})]}),j.length>0&&!p&&(0,a.jsxs)("div",{className:"mb-2","data-testid":"tts-voice-recent-row",children:[(0,a.jsx)("p",{className:"mb-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:"Recently used"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:j.map(e=>{let t=w.get(e);return t?(0,a.jsx)("button",{type:"button",className:"rounded border border-border/40 bg-muted/30 px-2 py-1 text-[11px] hover:bg-muted",onClick:()=>f&&C(f,e),"data-testid":"tts-voice-recent-".concat(e),children:t.name},e):null})})]}),(0,a.jsxs)("p",{className:"mb-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:[S.length," voice",1===S.length?"":"s",p&&' matching "'.concat(p,'"')]}),(0,a.jsxs)("div",{className:"max-h-64 space-y-1 overflow-y-auto pr-1","data-testid":"tts-voice-library-list",children:[S.slice(0,50).map(e=>{let t=N===e.id;return(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded border border-border/40 bg-muted/20 px-2 py-1 text-xs","data-testid":"tts-voice-library-row-".concat(e.id),children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"truncate font-medium",children:e.name}),(0,a.jsxs)("div",{className:"truncate text-[10px] text-muted-foreground",children:[eC(e),e.description&&(0,a.jsxs)("span",{children:[" \xb7 ",e.description]})]})]}),e.previewUrl&&(0,a.jsx)(d.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>t?E():P(e),className:"text-xs","data-testid":"tts-voice-library-preview-".concat(e.id),children:t?"⏸":"▶"}),(0,a.jsx)(d.$,{type:"button",size:"sm",onClick:()=>f&&C(f,e.id),className:"text-xs","data-testid":"tts-voice-library-apply-".concat(e.id),children:"Apply"})]},e.id)}),S.length>50&&(0,a.jsxs)("p",{className:"text-center text-[10px] text-muted-foreground",children:["Showing first 50 of ",S.length," \xb7 refine the search to see more"]}),0===S.length&&(0,a.jsxs)("p",{className:"px-2 py-4 text-center text-[11px] text-muted-foreground",children:['No voices match "',p,'"']})]})]}),(0,a.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:U,disabled:!M,className:"text-xs text-muted-foreground","data-testid":"tts-voice-reset-all",children:"Reset all"}),(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground/80",children:A?"".concat(null!=(e=null==m?void 0:m.voices.length)?e:0," voices \xb7 library cache via daemon"):"Paste voice id manually until daemon library is reachable"})]})]})}let eP={casual_chat:{id:"casual_chat",label:"Casual chat",icon:"\uD83D\uDCAC",description:"Day-to-day messaging \xb7 cheap STT / LLM \xb7 no read-back.",tiers:{stt:"budget",llm:"budget",tts:"budget"}},meeting:{id:"meeting",label:"Meeting notes",icon:"\uD83D\uDCCB",description:"Balanced accuracy for transcripts \xb7 standard LLM summarization.",tiers:{stt:"balanced",llm:"balanced",tts:"balanced"},monthlyUsdCap:5},medical_dictation:{id:"medical_dictation",label:"Medical / legal dictation",icon:"\uD83C\uDFE5",description:"Loaded STT (timestamps + jargon adaptation) \xb7 Best LLM \xb7 ElevenLabs voice.",tiers:{stt:"loaded",llm:"best",tts:"best"},monthlyUsdCap:20},live_caption:{id:"live_caption",label:"Live captioning",icon:"\uD83C\uDFAC",description:"Low-latency STT \xb7 LLM disabled \xb7 no read-back.",tiers:{stt:"balanced",llm:"budget",tts:"budget"}},sleep_mode:{id:"sleep_mode",label:"Sleep mode",icon:"\uD83C\uDF19",description:"Cost zero \xb7 local-only models \xb7 no API calls.",tiers:{stt:"budget",llm:"budget",tts:"budget"},monthlyUsdCap:0}},eE=["casual_chat","meeting","medical_dictation","live_caption","sleep_mode"],eM="elanous.active-preset";function eA(){if("undefined"!=typeof localStorage)try{let e=localStorage.getItem(eM);if(!e)return;return eE.includes(e)?e:void 0}catch(e){return}}function ez(e){if("undefined"!=typeof localStorage)try{null===e?localStorage.removeItem(eM):localStorage.setItem(eM,e)}catch(e){}}function eI(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(eA),[i,o]=(0,r.useState)("idle"),[c,u]=(0,r.useState)(null);(0,r.useEffect)(()=>{l(eA())},[]);let m=async e=>{u(e.id),o("syncing"),(0,b.cY)("settings.preset.apply",{id:e.id}),ez(e.id),l(e.id),o(await (0,ed.F$)(t,{id:e.id,tiers:e.tiers,...e.ttsVoice?{ttsVoice:e.ttsVoice}:{},...void 0!==e.monthlyUsdCap?{monthlyUsdCap:e.monthlyUsdCap}:{}})),u(null)},x=async()=>{o("syncing"),(0,b.cY)("settings.preset.clear"),ez(null),l(void 0),o(await (0,ed.F$)(t,null))};return(0,a.jsxs)("section",{"data-testid":"preset-card-grid",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"⚡ Quick presets"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"One-click bundles for common use cases — applies STT, LLM, TTS, voice id, and budget cap together. You can still fine-tune any slider after applying."})]}),"syncing"===i&&(0,a.jsx)("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"preset-sync-status",children:"Syncing…"}),"synced"===i&&(0,a.jsx)("span",{className:"rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"preset-sync-status",children:"Synced"}),"offline"===i&&(0,a.jsx)("span",{className:"rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"preset-sync-status",children:"Offline"}),"error"===i&&(0,a.jsx)("span",{className:"rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"preset-sync-status",children:"Sync error"})]}),s&&(0,a.jsxs)("div",{className:"mb-3 flex items-center justify-between rounded bg-emerald-500/5 px-3 py-2 text-xs","data-testid":"preset-active-banner",children:[(0,a.jsxs)("span",{className:"text-emerald-700 dark:text-emerald-300",children:["✓ Active preset: ",(0,a.jsx)("strong",{children:eP[s].label})]}),(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:x,className:"text-[11px] text-muted-foreground","data-testid":"preset-clear-active",children:"Clear preset"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3","data-testid":"preset-card-list",children:eE.map(e=>{let t=eP[e],r=s===e,n=c===e;return(0,a.jsxs)("button",{type:"button",onClick:()=>m(t),disabled:n,className:"rounded-md border px-3 py-2 text-left transition-colors ".concat(r?"border-emerald-500 bg-emerald-500/5":"border-border/60 bg-background hover:bg-muted/40"),"data-testid":"preset-card-".concat(e),children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,a.jsxs)("span",{className:"text-sm font-semibold",children:[t.icon," ",t.label]}),r&&(0,a.jsx)("span",{className:"text-[10px] text-emerald-600",children:"active"}),n&&(0,a.jsx)("span",{className:"text-[10px] text-blue-600",children:"applying…"})]}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:t.description}),(0,a.jsxs)("div",{className:"mt-2 flex flex-wrap gap-1 text-[9px] text-muted-foreground",children:[t.tiers.stt&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["stt:",t.tiers.stt]}),t.tiers.llm&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["llm:",t.tiers.llm]}),t.tiers.tts&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["tts:",t.tiers.tts]}),void 0!==t.monthlyUsdCap&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["cap:$",t.monthlyUsdCap]})]})]},e)})})]})}var eT=s(87670),eR=s(91230),eL=s(44458),eD=s(10298),e$=s(93129);let eO={skills:"\uD83D\uDEE0️",toolRestrictions:"\uD83D\uDD12",structuredOutput:"\uD83D\uDCCB",thinkingControl:"\uD83D\uDCAD",effortControl:"⚙️",sessionResume:"↩️",mcp:"\uD83E\uDDE9",hooks:"\uD83E\uDE9D",agents:"\uD83E\uDD16",envInjection:"\uD83D\uDD11",costControl:"\uD83D\uDCB0",fallbackModel:"\uD83D\uDD01",sandbox:"\uD83E\uDDF1",multiHostFanout:"\uD83C\uDF10"};function eY(){let{client:e,config:t}=(0,n.Q)(),s=(0,e$.X)(e),[l,i]=(0,r.useState)({}),[d,o]=(0,r.useState)({state:"idle"}),[c,u]=(0,r.useState)("list"),m=(0,r.useMemo)(()=>{let e=s.providers[0];return e?Object.keys(e.capabilities).sort():[]},[s.providers]);(0,r.useEffect)(()=>{if(s.providers.length>0&&0===Object.keys(l).length){let e={};for(let t of s.providers)e[t.id]=!1;i(e)}},[s.providers,l]);let x=(0,r.useCallback)(e=>{i(t=>({...t,[e]:!t[e]}))},[]),p=(0,r.useCallback)(async()=>{o({state:"running"});try{var e,a;let r="".concat(null!=(a=null==(e=t.baseUrl)?void 0:e.replace(/\/$/,""))?a:"","/v1/registry/discovery"),n={};t.token&&(n.authorization="Bearer ".concat(t.token));let l=await fetch(r,{method:"POST",headers:n});if(!l.ok)return void o({state:"error",detail:"HTTP ".concat(l.status)});await s.reload(),o({state:"ok"})}catch(e){o({state:"error",detail:e instanceof Error?e.message:String(e)})}},[t.baseUrl,t.token,s]);return(0,a.jsxs)("section",{className:"space-y-2","data-testid":"llm-catalog-card",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"LLM Catalog"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[(0,a.jsx)("span",{"data-testid":"llm-catalog-summary",children:s.loading?"loading…":"".concat(s.providers.length," providers \xb7 ").concat(s.models.length," models")}),(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>"list"===e?"matrix":"list"),"aria-label":"Toggle view: list vs capability matrix","data-testid":"llm-catalog-view-toggle",className:"rounded px-1.5 py-0.5 text-[10px] uppercase font-medium hover:bg-surface-elevated",children:"list"===c?"matrix":"list"}),(0,a.jsx)("button",{type:"button",onClick:p,disabled:"running"===d.state||s.loading,"aria-label":"Run discovery refresh","data-testid":"llm-catalog-refresh",className:"rounded p-1 hover:bg-surface-elevated disabled:opacity-50",children:(0,a.jsx)(L.A,{className:"h-3 w-3 ".concat("running"===d.state?"animate-spin":"")})})]})]}),s.error&&(0,a.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-error","data-testid":"llm-catalog-error",children:[(0,a.jsx)(D.A,{className:"h-3 w-3"}),s.error]}),"error"===d.state&&(0,a.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-error",children:[(0,a.jsx)(D.A,{className:"h-3 w-3"}),"discovery failed \xb7 ",d.detail]}),"ok"===d.state&&(0,a.jsx)("p",{className:"text-[11px] text-emerald-600 dark:text-emerald-400",children:"discovery complete — catalog refreshed"}),s.loading&&0===s.providers.length&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Querying /v1/registry/catalog…"}),s.providers.length>0&&"matrix"===c&&(0,a.jsx)("div",{className:"overflow-x-auto rounded-md border border-border","data-testid":"llm-catalog-matrix",children:(0,a.jsxs)("table",{className:"min-w-full text-[10px]",children:[(0,a.jsx)("thead",{className:"bg-surface-elevated",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"sticky left-0 z-10 bg-surface-elevated px-2 py-1 text-left font-medium",children:"Provider"}),m.map(e=>{var t;return(0,a.jsx)("th",{className:"px-1.5 py-1 text-center font-medium uppercase text-muted-foreground",title:e,children:null!=(t=eO[e])?t:e.slice(0,3)},e)})]})}),(0,a.jsx)("tbody",{children:s.providers.map(e=>(0,a.jsxs)("tr",{className:"border-t border-border/40","data-testid":"llm-catalog-matrix-row-".concat(e.id),children:[(0,a.jsx)("td",{className:"sticky left-0 z-10 bg-card px-2 py-1 font-mono text-[10px]",children:e.id}),m.map(t=>{let s=e.capabilities[t];return(0,a.jsx)("td",{className:"px-1.5 py-1 text-center",title:"".concat(e.id," \xb7 ").concat(t,": ").concat(s?"yes":"no"),children:s?(0,a.jsx)(eT.A,{className:"mx-auto h-3 w-3 text-emerald-600 dark:text-emerald-400"}):(0,a.jsx)(eR.A,{className:"mx-auto h-3 w-3 text-muted-foreground/50"})},t)})]},e.id))})]})}),s.providers.length>0&&"list"===c&&(0,a.jsx)("ul",{className:"space-y-1 rounded-md border border-border","data-testid":"llm-catalog-provider-list",children:s.providers.map(e=>{var t;let r=s.modelsByProvider(e.id),n=null!=(t=l[e.id])&&t,i=Object.entries(e.capabilities).filter(e=>{let[,t]=e;return!0===t}).map(e=>{let[t]=e;return t});return(0,a.jsxs)("li",{className:"border-b border-border/40 last:border-0","data-testid":"llm-catalog-provider-".concat(e.id),children:[(0,a.jsxs)("button",{type:"button",onClick:()=>x(e.id),"aria-expanded":n,className:"flex w-full items-start justify-between gap-2 px-2 py-1.5 text-left hover:bg-surface-elevated","data-testid":"llm-catalog-provider-toggle-".concat(e.id),children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-[12px] font-medium",children:[n?(0,a.jsx)(eL.A,{className:"h-3 w-3"}):(0,a.jsx)(eD.A,{className:"h-3 w-3"}),(0,a.jsx)("span",{children:e.displayName}),(0,a.jsx)("span",{className:"rounded bg-muted px-1 font-mono text-[9px] uppercase text-muted-foreground",children:e.id})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-0.5 pl-4 text-[10px] text-muted-foreground",children:i.map(e=>{var t;return(0,a.jsxs)("span",{className:"rounded bg-surface-elevated px-1",title:e,children:[null!=(t=eO[e])?t:"\xb7"," ",e]},e)})})]}),(0,a.jsxs)("span",{className:"shrink-0 rounded bg-muted px-1 text-[10px] text-muted-foreground",children:[r.length," model",1===r.length?"":"s"]})]}),n&&(0,a.jsxs)("ul",{className:"border-t border-border/40 bg-surface-elevated/50 px-2 py-1","data-testid":"llm-catalog-models-".concat(e.id),children:[0===r.length&&(0,a.jsx)("li",{className:"py-1 text-[10px] text-muted-foreground",children:"no models registered for this provider"}),r.map(e=>(0,a.jsxs)("li",{className:"flex items-center justify-between gap-2 py-0.5 font-mono text-[10px]","data-testid":"llm-catalog-model-".concat(e.id),children:[(0,a.jsx)("span",{className:"truncate",title:e.id,children:e.id}),(0,a.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:[e.contextSize?"".concat(Math.round(e.contextSize/1e3),"k ctx"):"—",e.pricing?" \xb7 $".concat(e.pricing.inputPerMTok,"/$").concat(e.pricing.outputPerMTok):""]})]},e.id))]})]},e.id)})})]})}var eB=s(85110);function e_(e){let{status:t,percent:s,monthlyUsdCap:n,monthSoFarUsd:l,recommendedFallback:i,notifyAtPct:o,onApply:c,onAdjustCap:u,onDismiss:m}=e,[x,p]=(0,r.useState)("switch"),h=(0,r.useRef)(null);(0,r.useEffect)(()=>{var e;null==(e=h.current)||e.focus()},[]);let f="cap-exceeded"===t,b=eo.LW[i],g=(0,eo.Bg)(l).replace("/mo",""),j=(0,eo.Bg)(n).replace("/mo","");return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"budget-threshold-title","aria-describedby":"budget-threshold-summary","data-testid":"budget-threshold-modal","data-status":t,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),m())},children:(0,a.jsxs)("div",{className:"w-full max-w-md rounded-lg border bg-white p-4 shadow-xl dark:bg-zinc-900 ".concat(f?"border-rose-300 dark:border-rose-700":"border-amber-300 dark:border-amber-700"),children:[(0,a.jsxs)("h2",{id:"budget-threshold-title",className:"mb-2 text-sm font-medium ".concat(f?"text-rose-700 dark:text-rose-300":"text-amber-700 dark:text-amber-300"),children:["\uD83D\uDCB0 You've used ",g," of ",j," monthly cap (",Math.round(s),"%)"]}),(0,a.jsx)("p",{id:"budget-threshold-summary",className:"mb-3 text-xs text-zinc-600 dark:text-zinc-400","data-testid":"budget-threshold-summary",children:f?"You've passed the cap. elanous recommends falling back to ".concat(b," tier for the rest of this month."):"You're past the ".concat(o,"% threshold. elanous can switch to ").concat(b," tier to slow the burn.")}),(0,a.jsxs)("fieldset",{className:"mb-4 space-y-1.5 text-xs","data-testid":"budget-threshold-choices",children:[(0,a.jsx)("legend",{className:"sr-only",children:"Auto-fallback options"}),(0,a.jsx)(eQ,{id:"switch",label:"Switch to ".concat(b," tier for the rest of this month"),checked:"switch"===x,onSelect:()=>p("switch")}),(0,a.jsx)(eQ,{id:"continue",label:"Continue at current tier (may exceed cap)",checked:"continue"===x,onSelect:()=>p("continue")}),(0,a.jsx)(eQ,{id:"local-only",label:"Use local-only models (cost = $0)",checked:"local-only"===x,onSelect:()=>p("local-only")})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:u,"data-testid":"budget-threshold-adjust-cap",children:"Adjust cap"}),(0,a.jsx)(d.$,{ref:h,type:"button",size:"sm",onClick:()=>c(x,i),"data-testid":"budget-threshold-apply",className:f?"bg-rose-600 text-white hover:bg-rose-700":"bg-amber-600 text-white hover:bg-amber-700",children:"Apply"})]})]})})}function eQ(e){let{id:t,label:s,checked:r,onSelect:n}=e;return(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded px-2 py-1 ".concat(r?"bg-zinc-100 dark:bg-zinc-800":"hover:bg-zinc-50 dark:hover:bg-zinc-800/50"),"data-testid":"budget-threshold-choice-".concat(t),children:[(0,a.jsx)("input",{type:"radio",name:"budget-threshold-choice",value:t,checked:r,onChange:n,className:"h-3 w-3"}),(0,a.jsx)("span",{className:"text-zinc-700 dark:text-zinc-200",children:s})]})}function eW(e){var t,s;let{pollMs:l=6e4,onAdjustCap:i}=e,{config:d}=(0,n.Q)(),[o,u]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(!d.baseUrl)return;let e=!1,t=async()=>{let t=await (0,eB.gh)({baseUrl:d.baseUrl,...d.token?{token:d.token}:{}});e||u(t)};if(t(),l<=0)return()=>{e=!0};let s=setInterval(()=>{t()},l);return()=>{e=!0,clearInterval(s)}},[d.baseUrl,d.token,l]);let m=(0,r.useCallback)(async(e,t)=>{if(!o)return;if("continue"===e){(0,eB.s0)(o.monthYYYYMM,"ok"===o.status?"warning":o.status),u({...o,status:"ok"}),c.oR.message("Continuing at current tier — elanous will nag again at next threshold.");return}let s=await (0,eB.iQ)({baseUrl:d.baseUrl,...d.token?{token:d.token}:{}},t);"synced"===s?c.oR.success("Switched STT/LLM/TTS to ".concat(t,".")):"offline"===s?c.oR.error("Daemon offline — change saved locally, will sync when online."):c.oR.error("Budget fallback failed: ".concat(s,".")),(0,eB.s0)(o.monthYYYYMM,"ok"===o.status?"warning":o.status),u({...o,status:"ok"})},[d.baseUrl,d.token,o]),x=(0,r.useCallback)(()=>{o&&((0,eB.s0)(o.monthYYYYMM,"ok"===o.status?"warning":o.status),u({...o,status:"ok"}))},[o]),p=(0,r.useCallback)(()=>{i&&i(),x()},[i,x]);return o&&(0,eB.Vl)(o)?(0,a.jsx)(e_,{status:o.status,percent:null!=(t=o.percent)?t:0,monthlyUsdCap:null!=(s=o.monthlyUsdCap)?s:0,monthSoFarUsd:o.monthSoFarUsd,recommendedFallback:o.recommendedFallback,notifyAtPct:o.notifyAtPct,onApply:(e,t)=>{m(e,t)},onAdjustCap:p,onDismiss:x}):null}let eF={embedding:"RAG retrieval \xb7 similarity. Most users never touch this.",vision:"OCR \xb7 screenshot analysis \xb7 note-from-image."};function eH(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(ec.Ij),[i,o]=(0,r.useState)("idle"),[c,u]=(0,r.useState)("idle");(0,r.useEffect)(()=>{l((0,ec.Ij)());let e=!1;return(async()=>{let s=await (0,ed.ee)(t);!e&&s&&l(s)})(),()=>{e=!0}},[t]);let m=async(e,s)=>{(0,b.cY)("pwa.settings.tier.embedding-vision","selected ".concat(e,"=").concat(s)),"embedding"===e?(o("syncing"),o(await (0,ed.zs)(t,s)),l(e=>({...e,embedding:s}))):(u("syncing"),u(await (0,ed.We)(t,s)),l(e=>({...e,vision:s})))},x=e=>{let t="embedding"===e?(0,ec.ew)(s):(0,ec.lH)(s),r="embedding"===e?!!s.embedding:!!s.vision,n="embedding"===e?i:c;return(0,a.jsxs)("div",{className:"space-y-1.5","data-testid":"embedding-vision-row-".concat(e),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-xs font-medium uppercase tracking-wide text-zinc-500 dark:text-zinc-400",children:"embedding"===e?"Embedding":"Vision"}),(0,a.jsx)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:r?"Saved \xb7 ".concat(n):"Smart default"})]}),(0,a.jsx)("p",{className:"text-[11px] text-zinc-500 dark:text-zinc-400",children:eF[e]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:eo.Ql.map(s=>(0,a.jsx)(d.$,{size:"sm",variant:s===t?"default":"outline",onClick:()=>{m(e,s)},"data-testid":"embedding-vision-".concat(e,"-").concat(s),className:"text-[11px]",children:eo.LW[s]},s))})]})};return(0,a.jsxs)("section",{className:"space-y-4 rounded-md border border-border bg-card p-4","data-testid":"embedding-vision-card",children:[(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Embedding \xb7 Vision tier"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Phase 3 scaffolding — model selection for RAG embedding + image vision. Resolvers wired; call-site integration follows as RAG / vision pipelines come online."})]}),x("embedding"),x("vision")]})}var eK=s(43285);function eV(e){var t,s;return{displayName:e.displayName,description:null!=(t=e.description)?t:"",systemPrompt:null!=(s=e.systemPrompt)?s:""}}function eq(e,t){let s=eV(e),a={};return t.displayName!==s.displayName&&(a.displayName=t.displayName),t.description!==s.description&&(a.description=t.description),t.systemPrompt!==s.systemPrompt&&(a.systemPrompt=t.systemPrompt),a}function eX(){let e=(0,k.Qj)(),[t,s]=(0,r.useState)(!1),[n,l]=(0,r.useState)({status:"idle"}),[i,o]=(0,r.useState)(null),[c,u]=(0,r.useState)({}),[m,x]=(0,r.useState)([]),[p,h]=(0,r.useState)(null),[f,b]=(0,r.useState)(""),[g,j]=(0,r.useState)(""),[v,y]=(0,r.useState)(!1),[N,w]=(0,r.useState)(null),[S,C]=(0,r.useState)(null);(0,r.useEffect)(()=>{s(!0)},[]);let U=(0,r.useCallback)(async function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){o(null),t||l({status:"loading"});try{let s=await e.getPersonas();l({status:"ok",personas:s.personas}),t||u({})}catch(e){t?o(e.message):l({status:"error",message:e.message})}}},[e]);(0,r.useEffect)(()=>{t&&e&&(U(),e.getPersonaPresets().then(e=>x(e.presets)).catch(e=>h(e.message)))},[t,e,U]);let P=(0,r.useCallback)(async()=>{if(e&&f&&g.trim()&&!v){y(!0),w(null),C(null);try{let t=await e.createPersona({preset:f,name:g.trim()});C("".concat(t.persona.displayName," 인격이 생성되었습니다.")),j(""),await U(!0)}catch(e){w(e.message)}finally{y(!1)}}},[e,f,g,v,U]),E=(0,r.useCallback)((e,t,s)=>{u(a=>{var r;let n={...null==(r=a[e.personaId])?void 0:r.draft};return s===eV(e)[t]?delete n[t]:n[t]=s,{...a,[e.personaId]:{draft:n,saving:!1,error:void 0}}})},[]),M=(0,r.useCallback)(async t=>{if(!e)return;let s=t.personaId,a=c[s];if(!a||a.saving)return;let r=eq(t,{...eV(t),...a.draft});if(0!==Object.keys(r).length){u(e=>({...e,[s]:{...a,saving:!0,error:void 0}}));try{let t=await e.patchPersona(s,r);l(e=>"ok"!==e.status?e:{status:"ok",personas:e.personas.map(e=>e.personaId===s?t.persona:e)}),u(e=>{let{[s]:t,...a}=e;return a})}catch(e){u(t=>({...t,[s]:{...a,saving:!1,error:e.message}}))}}},[e,c]);return t&&e?(0,a.jsxs)("section",{id:"personas","data-testid":"persona-card",className:"space-y-3 rounded border border-border bg-card p-4",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold",children:"Personas"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"프리셋으로 인격을 만들고 이름, 설명, 시스템 프롬프트를 편집합니다."})]}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>{U()},disabled:"loading"===n.status,children:"Refresh"})]}),(0,a.jsxs)("form",{className:"flex flex-wrap items-end gap-2",onSubmit:e=>{e.preventDefault(),P()},children:[(0,a.jsxs)("label",{className:"flex min-w-36 flex-1 flex-col gap-1 text-xs",htmlFor:"persona-preset",children:["프리셋",(0,a.jsxs)("select",{id:"persona-preset",value:f,onChange:e=>{b(e.target.value),w(null),C(null)},disabled:v,className:"rounded border border-input bg-background px-2.5 py-1.5",children:[(0,a.jsx)("option",{value:"",children:"프리셋 선택"}),m.map(e=>(0,a.jsx)("option",{value:e.personaId,children:e.displayName},e.personaId))]})]}),(0,a.jsxs)("label",{className:"flex min-w-36 flex-1 flex-col gap-1 text-xs",htmlFor:"persona-new-name",children:["이름",(0,a.jsx)("input",{id:"persona-new-name",value:g,onChange:e=>{j(e.target.value),w(null),C(null)},disabled:v,placeholder:"새 인격 이름",className:"rounded border border-input bg-background px-2.5 py-1.5"})]}),(0,a.jsx)(d.$,{type:"submit",size:"sm",disabled:!f||!g.trim()||v,children:v?"생성중…":"인격 만들기"})]}),p?(0,a.jsxs)("p",{role:"alert",className:"text-xs text-destructive",children:["프리셋 로드 실패: ",p]}):null,N?(0,a.jsxs)("p",{role:"alert",className:"text-xs text-destructive",children:["인격 생성 실패: ",N]}):null,S?(0,a.jsx)("p",{role:"status",className:"text-xs text-green-700 dark:text-green-400",children:S}):null,i?(0,a.jsxs)("p",{role:"alert",className:"text-xs text-destructive",children:["인격 목록 새로고침 실패: ",i]}):null,"idle"===n.status||"loading"===n.status?(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Loading personas…"}):null,"error"===n.status?(0,a.jsxs)("p",{className:"text-xs text-destructive",children:["persona 로드 실패: ",n.message]}):null,"ok"===n.status&&0===n.personas.length?(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"아직 인격이 없습니다. 위에서 프리셋을 골라 새 인격을 만드세요."}):null,"ok"===n.status&&n.personas.length>0?(0,a.jsx)("ul",{className:"flex flex-col gap-3",children:n.personas.map(e=>(0,a.jsx)(eG,{persona:e,edit:c[e.personaId],onDraftChange:E,onSave:M},e.personaId))}):null,(0,a.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Note: ⚗ Auto describer 와 orchestrator routing 은"," ",(0,a.jsx)("a",{href:"https://github.com/ElanvitalAI/elanous/blob/main/docs/research/RESEARCH-hermes-pr27572-triage-orchestrator-deferred-2026-05-19.md",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Hermes PR #27572 research"})," ","채택 시 활성화 예정."]})]}):null}function eG(e){var t;let{persona:s,edit:r,onDraftChange:n,onSave:l}=e,i={...eV(s),...null==r?void 0:r.draft},o=Object.keys(eq(s,i)).length>0,c=null!=(t=null==r?void 0:r.saving)&&t,u=280-i.description.length<0;return(0,a.jsxs)("li",{className:"flex flex-col gap-2 rounded border border-border bg-background p-3","data-testid":"persona-row-".concat(s.personaId),children:[(0,a.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[s.brandColor?(0,a.jsx)("span",{className:"inline-block h-3 w-3 rounded",style:{backgroundColor:s.brandColor},"aria-hidden":!0}):null,(0,a.jsx)("span",{className:"text-sm font-medium",children:s.displayName}),(0,a.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground",children:s.personaId})]}),s.primaryModel?(0,a.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:s.primaryModel}):null]}),(0,a.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:["표시 이름",(0,a.jsx)("input",{value:i.displayName,onChange:e=>n(s,"displayName",e.target.value),disabled:c,"data-testid":"persona-display-name-".concat(s.personaId),className:"w-full rounded border border-input bg-transparent px-2.5 py-1.5"})]}),(0,a.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:["설명",(0,a.jsx)("textarea",{value:i.description,onChange:e=>n(s,"description",e.target.value),rows:2,maxLength:560,placeholder:"이 persona 가 무엇을 잘 하는지 1-2 문장으로 적어주세요.",disabled:c,"data-testid":"persona-description-".concat(s.personaId),className:(0,eK.cn)("w-full rounded border border-input bg-transparent px-2.5 py-1.5 text-xs","focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50",u&&"border-destructive")})]}),(0,a.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:["시스템 프롬프트",(0,a.jsx)("textarea",{value:i.systemPrompt,onChange:e=>n(s,"systemPrompt",e.target.value),rows:5,disabled:c,"data-testid":"persona-system-prompt-".concat(s.personaId),className:"w-full rounded border border-input bg-transparent px-2.5 py-1.5 font-mono text-xs"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("span",{className:(0,eK.cn)("font-mono text-[10px]",u?"text-destructive":"text-muted-foreground"),children:[i.description.length," / ",280]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(null==r?void 0:r.error)?(0,a.jsx)("span",{className:"text-[10px] text-destructive",children:r.error}):null,(0,a.jsx)(d.$,{size:"sm",onClick:()=>l(s),disabled:!o||c||u||!i.displayName.trim(),"data-testid":"persona-save-".concat(s.personaId),children:c?"저장중…":"저장"})]})]})]})}let eJ="2026-11-06T02:25:24.337Z",eZ="f9080db";function e0(e){try{return new Date(e).toLocaleString("ko-KR",{timeZone:"Asia/Seoul",year:"2-digit",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}catch(t){return e}}function e1(){let[e,t]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=!1;return fetch("/v1/health").then(e=>e.ok?e.json():null).then(s=>{!e&&s&&"number"==typeof s.startedAt&&t({startedAt:s.startedAt,sha:"string"==typeof s.daemonSha?s.daemonSha:""})}).catch(()=>{}),()=>{e=!0}},[]);let s=eZ&&"unknown"!==eZ?eZ:"",n=(null==e?void 0:e.sha)&&"unknown"!==e.sha?e.sha:"",l=!!n&&!!s&&n!==s;return(0,a.jsxs)("section",{className:"space-y-3 rounded-2xl border border-border bg-card p-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-base font-semibold",children:"빌드 정보"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"배포 최신 여부 판별 — 새로고침 후 시각/SHA 가 안 바뀌면 옛 캐시."})]}),(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,a.jsxs)("div",{className:"rounded-xl bg-muted/40 p-3",children:[(0,a.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-muted-foreground",children:"PWA 프론트 빌드"}),(0,a.jsxs)("div",{className:"mt-1 font-mono text-sm",children:[eJ?e0(eJ):"—",s?" \xb7 ".concat(s):""]})]}),(0,a.jsxs)("div",{className:"rounded-xl bg-muted/40 p-3",children:[(0,a.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-muted-foreground",children:"데몬(백엔드) 시작"}),(0,a.jsxs)("div",{className:"mt-1 font-mono text-sm ".concat(l?"text-amber-500":""),children:[e?e0(new Date(e.startedAt).toISOString()):"…",n?" \xb7 ".concat(n):""]}),l&&(0,a.jsx)("div",{className:"mt-1 text-[11px] text-amber-500",children:"프론트/데몬 SHA 불일치 — 재빌드\xb7재시작 필요"})]})]})]})}var e2=s(92554),e5=s(19389);function e3(){let{read:e=e5.fG,write:t=e5.MQ}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[s,n]=(0,r.useState)(!1),[l,i]=(0,r.useState)(!1);(0,r.useEffect)(()=>{n(e(e2.f4)),i(e(e2.vm))},[e]);let d=e=>e2.Ue.filter(t=>t.visibility===e).map(e=>e.label).join(" \xb7 "),o=(e,s,a)=>{a(s),t(e,s)};return(0,a.jsxs)("section",{className:"space-y-3 rounded-2xl border border-border bg-card p-4","aria-label":"메뉴",children:[(0,a.jsx)("h2",{className:"text-base font-semibold",children:"메뉴"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"메뉴에는 주요 탭만 보입니다. Labs(베타)와 숨긴 탭은 이 기기에서만 켤 수 있고, 숨긴 탭도 주소로는 열립니다."}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-sm",children:[(0,a.jsx)("input",{type:"checkbox","data-elanous-action":"menu-show-labs",checked:s,onChange:e=>o(e2.f4,e.target.checked,n)}),(0,a.jsxs)("span",{children:["Labs 탭 보기 ",(0,a.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",d("labs"),")"]})]})]}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-sm",children:[(0,a.jsx)("input",{type:"checkbox","data-elanous-action":"menu-show-hidden",checked:l,onChange:e=>o(e2.vm,e.target.checked,i)}),(0,a.jsxs)("span",{children:["숨긴 탭 보기 ",(0,a.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",d("hidden"),")"]})]})]})]})}let e4=["","claude","gemini","grok","codex"];function e6(){let[e,t]=(0,r.useState)(i.sR);return(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Mermaid theme"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"자동은 밝은 default 도식입니다. 노트의 init 테마 지시가 이 설정보다 우선합니다."}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",role:"group","aria-label":"Mermaid theme",children:i.HS.map(s=>(0,a.jsx)(d.$,{type:"button",variant:e===s?"default":"outline",size:"sm","aria-pressed":e===s,onClick:()=>{t(s),(0,i.Rk)(s)},children:"auto"===s?"자동":s},s))})]})}function e9(){var e,t,s,i,b,g;let{config:j,setConfig:k,client:w,sessionId:C}=(0,n.Q)();(0,r.useEffect)(()=>{if("#bearer-token"!==window.location.hash)return;let e=window.setTimeout(()=>{let e=document.getElementById("bearer-token");null==e||e.scrollIntoView({block:"center"}),null==e||e.focus()},50);return()=>window.clearTimeout(e)},[]);let{theme:U,setTheme:A}=(0,l.D)(),[I,L]=(0,r.useState)({status:"idle"}),[D,$]=(0,r.useState)({status:"idle"}),[O,Y]=(0,r.useState)({status:"idle"}),[B,Q]=(0,r.useState)(0),[W,K]=(0,r.useState)({status:"idle"}),[V,X]=(0,r.useState)(0),[Z,et]=(0,r.useState)({status:"idle"}),[ea,er]=(0,r.useState)(0),[el,ed]=(0,r.useState)(()=>({supported:!1,permission:"unknown",cachedId:null,cachedLabel:null})),[eo,ec]=(0,r.useState)(!1),[eu,em]=(0,r.useState)(null);(0,r.useEffect)(()=>{ed(v())},[]);let ep=(0,r.useCallback)(()=>{ed(v())},[]),eh=(0,r.useCallback)(async()=>{ec(!0),em(null);try{let e=await y({baseUrl:j.baseUrl,...j.token?{token:j.token}:{}});"enabled"===e.status?c.oR.success("Notifications enabled"):"permission-denied"===e.status?c.oR.error("Permission denied — enable in browser/iOS settings"):"unsupported"===e.status?c.oR.error("Push not supported: ".concat(e.reason)):(em(e.reason),c.oR.error("Enable failed: ".concat(e.reason)))}finally{ec(!1),ep()}},[j.baseUrl,j.token,ep]),eb=(0,r.useCallback)(async()=>{ec(!0);try{await N({baseUrl:j.baseUrl,...j.token?{token:j.token}:{}}),c.oR.success("Notifications disabled")}finally{ec(!1),ep()}},[j.baseUrl,j.token,ep]),ej=(0,r.useCallback)(async()=>{if(j.baseUrl)try{var e,t;let s=await fetch("".concat(j.baseUrl.replace(/\/$/,""),"/v1/push/test"),{method:"POST",...j.token?{headers:{authorization:"Bearer ".concat(j.token)}}:{}});if(!s.ok)return void c.oR.error("Test failed: HTTP ".concat(s.status));let a=await s.json();c.oR.success("Test sent: ".concat(null!=(e=a.delivered)?e:0," / ").concat(null!=(t=a.attempted)?t:0," delivered"))}catch(e){c.oR.error("Test failed: ".concat(e instanceof Error?e.message:String(e)))}},[j.baseUrl,j.token]),[ev,ey]=(0,r.useState)(""),[eN,ek]=(0,r.useState)(""),[ew,eS]=(0,r.useState)(""),[eC,eP]=(0,r.useState)(null),[eE,eM]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(!j.baseUrl)return void L({status:"idle"});let e=!1,t=new AbortController,s=Date.now();return L({status:"loading"}),(async()=>{try{let a=await fetch("".concat(j.baseUrl.replace(/\/$/,""),"/v1/health"),{signal:t.signal});if(e)return;let r=Date.now()-s;if(!a.ok)return void L({status:"error",error:"HTTP ".concat(a.status),latencyMs:r,checkedAt:Date.now()});let n=await a.json();L({status:n.ok?"ok":"error",..."number"==typeof n.sessions?{sessions:n.sessions}:{},latencyMs:r,checkedAt:Date.now(),...n.ok?{}:{error:"health.ok=false"}})}catch(t){if(e)return;L({status:"error",error:t instanceof Error?t.message:String(t),latencyMs:Date.now()-s,checkedAt:Date.now()})}})(),()=>{e=!0,t.abort()}},[j.baseUrl]),(0,r.useEffect)(()=>{if("ok"!==I.status||!j.baseUrl)return void $({status:"idle"});let e=!1,t=new AbortController;return $({status:"loading"}),(async()=>{try{var s,a;let r=await fetch("".concat(j.baseUrl.replace(/\/$/,""),"/v1/tools"),{signal:t.signal,credentials:"same-origin",mode:"same-origin",...j.token?{headers:{authorization:"Bearer ".concat(j.token)}}:{}});if(e)return;if(!r.ok)return void $({status:"error",error:"HTTP ".concat(r.status)});let n=await r.json(),l=(null!=(s=n.specs)?s:[]).map(e=>{var t;return"string"==typeof e?{name:e,description:""}:{name:e.name,description:null!=(t=e.description)?t:""}});$({status:"ok",kind:null!=(a=n.kind)?a:"none",specs:l})}catch(t){if(e)return;$({status:"error",error:t instanceof Error?t.message:String(t)})}})(),()=>{e=!0,t.abort()}},[I.status,I.checkedAt,j.baseUrl,j.token]),(0,r.useEffect)(()=>{if("ok"!==I.status||!j.baseUrl)return void Y({status:"idle"});let e=!1,t=new AbortController;return Y({status:"loading"}),(async()=>{try{var s;let a=await fetch("".concat(j.baseUrl.replace(/\/$/,""),"/v1/diag/auth-trace"),{signal:t.signal,credentials:"same-origin",mode:"same-origin",...j.token?{headers:{authorization:"Bearer ".concat(j.token)}}:{}});if(e)return;if(!a.ok)return void Y({status:"error",error:"HTTP ".concat(a.status)});let r=await a.json();Y({status:"ok",entries:null!=(s=r.entries)?s:[],fetchedAt:Date.now()})}catch(t){if(e)return;Y({status:"error",error:t instanceof Error?t.message:String(t)})}})(),()=>{e=!0,t.abort()}},[I.status,I.checkedAt,j.baseUrl,j.token,B]),(0,r.useEffect)(()=>{if("ok"!==I.status||!j.baseUrl||!C)return void K({status:"idle"});let e=!1,t=null,s=new AbortController;return K({status:"loading"}),(async()=>{try{let a="".concat(j.baseUrl.replace(/\/$/,""),"/v1/turns/last/screenshot?session=").concat(encodeURIComponent(C)),r=await fetch(a,{signal:s.signal,...j.token?{headers:{authorization:"Bearer ".concat(j.token)}}:{}});if(e)return;if(404===r.status)return void K({status:"none",fetchedAt:Date.now()});if(!r.ok)return void K({status:"error",error:"HTTP ".concat(r.status)});let n=await r.blob();if(e)return;t=URL.createObjectURL(n),K({status:"ok",objectUrl:t,fetchedAt:Date.now()})}catch(t){if(e)return;K({status:"error",error:t instanceof Error?t.message:String(t)})}})(),()=>{e=!0,s.abort(),t&&URL.revokeObjectURL(t)}},[I.status,j.baseUrl,j.token,C,V]),(0,r.useEffect)(()=>{if("ok"!==I.status||!j.baseUrl)return void et({status:"idle"});let e=!1;return et(e=>({...e,status:"loading"})),(async()=>{try{let t=await p(w);if(e)return;et(e=>({status:"ok",bindings:t.bindings,...e.secretRef?{secretRef:e.secretRef}:{},...e.pendingSecretValue?{pendingSecretValue:e.pendingSecretValue}:{}}))}catch(s){if(e)return;let t=s instanceof Error?s.message:String(s);t.includes("404")||t.includes("Not Found")?et({status:"nexus-missing"}):et({status:"error",error:t})}})(),()=>{e=!0}},[w,I.status,j.baseUrl,ea]);let eA=(0,r.useCallback)(()=>{er(e=>e+1)},[]),ez=(0,r.useCallback)(async()=>{eM(!0);try{let e=function(){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}(),t=await x(w,e);et(s=>({...s,secretRef:t.ref,pendingSecretValue:e})),c.oR.success("Pushcut secret rotated \xb7 copy + paste into iPhone Shortcut")}catch(t){let e=t instanceof Error?t.message:String(t);c.oR.error("secret rotate failed: ".concat(e))}finally{eM(!1)}},[w]),eT=(0,r.useCallback)(async()=>{if(!ev.trim())return void c.oR.error("token required");let e=eN.trim()||C;if(!e)return void c.oR.error("sessionId required (auto-fill: open this session in /term first)");eP("__new__");try{await h(w,{token:ev.trim(),sessionId:e,...ew.trim()?{label:ew.trim()}:{}}),c.oR.success("binding saved"),ey(""),ek(""),eS(""),eA()}catch(e){c.oR.error("binding save failed: ".concat(e instanceof Error?e.message:String(e)))}finally{eP(null)}},[w,ev,eN,ew,C,eA]),eR=(0,r.useCallback)(async e=>{eP(e);try{await f(w,e),c.oR.success("binding deleted: ".concat(e.slice(0,8),"…")),eA()}catch(e){c.oR.error("delete failed: ".concat(e instanceof Error?e.message:String(e)))}finally{eP(null)}},[w,eA]),eL=e=>"number"!=typeof e?"—":"".concat(e," ms"),eD=e=>{if(!e)return"";let t=Math.floor((Date.now()-e)/1e3);return t<5?"just now":t<60?"".concat(t,"s ago"):"".concat(Math.floor(t/60),"m ago")};return(0,a.jsxs)("div",{className:"mx-auto max-w-2xl space-y-8 p-6",children:[(0,a.jsx)(eW,{}),(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"Settings"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"Daemon connection, provider default, theme. Stored in localStorage."})]}),(0,a.jsx)(z,{}),(0,a.jsx)(S,{}),(0,a.jsx)(P.Q,{}),(0,a.jsx)(E.lN,{}),(0,a.jsx)(M.Q,{}),(0,a.jsx)("div",{id:"channels",className:"scroll-mt-8","aria-hidden":!0}),(0,a.jsx)(_,{}),(0,a.jsx)(F.W,{}),(0,a.jsx)("div",{id:"advanced",className:"scroll-mt-8","aria-hidden":!0}),(0,a.jsx)(eY,{}),(0,a.jsx)(en,{}),(0,a.jsx)(H,{}),(0,a.jsx)(G,{}),(0,a.jsx)(J,{}),(0,a.jsx)(q,{}),(0,a.jsx)(ee,{}),(0,a.jsx)(es,{}),(0,a.jsx)("div",{id:"voice",className:"scroll-mt-8","aria-hidden":!0}),(0,a.jsx)(ei,{}),(0,a.jsx)(eI,{}),(0,a.jsx)(ex,{}),(0,a.jsx)(ef,{}),(0,a.jsx)(eg,{}),(0,a.jsx)(eU,{}),(0,a.jsx)(eH,{}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"데몬 연결"}),(0,a.jsxs)("label",{className:"block space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"Base URL"}),(0,a.jsx)(o.p,{value:j.baseUrl,placeholder:"http://localhost:31415",onChange:e=>k({baseUrl:e.target.value})})]}),(0,a.jsxs)("label",{className:"block space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"연결 토큰"}),(0,a.jsx)(o.p,{id:"bearer-token",type:"password",value:j.token,placeholder:"다른 기기에서 만든 연결 토큰을 붙여 넣으세요",onChange:e=>k({token:e.target.value})})]}),(0,a.jsxs)("label",{className:"block space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"Default provider"}),(0,a.jsx)("select",{value:j.provider,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-xs focus:outline-none focus:ring-2 focus:ring-ring",onChange:e=>k({provider:e.target.value}),children:e4.map(e=>(0,a.jsx)("option",{value:e,children:e||"(none — server default)"},e))})]})]}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Daemon health"}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>{k({baseUrl:j.baseUrl})},disabled:!j.baseUrl,children:"Recheck"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["idle"===I.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Set Base URL above to probe."}),"loading"===I.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing…"}),"ok"===I.status&&(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full bg-emerald-500","aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium text-foreground",children:"Reachable"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:eL(I.latencyMs)}),(0,a.jsx)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:eD(I.checkedAt)})]}),"number"==typeof I.sessions&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:["Active sessions: ",(0,a.jsx)("span",{className:"font-mono text-foreground",children:I.sessions})]})]}),"error"===I.status&&(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full bg-rose-500","aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium text-rose-600 dark:text-rose-400",children:"Unreachable"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:eL(I.latencyMs)}),(0,a.jsx)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:eD(I.checkedAt)})]}),(0,a.jsx)("p",{className:"break-all font-mono text-[11px] text-muted-foreground",children:I.error}),(0,a.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["Verify Base URL \xb7 daemon running (",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"elanous serve --status"}),") \xb7 network reachable from this device."]})]})]})]}),(0,a.jsx)("div",{id:"tools",className:"scroll-mt-8","aria-hidden":!0}),("ok"===D.status||"error"===D.status)&&(0,a.jsxs)("section",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"LLM tool surface"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["ok"===D.status&&"none"===D.kind&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Tools 미설정 — `elanous serve --tools readonly` 또는 `webterm` 으로 활성화."}),"ok"===D.status&&D.kind&&"none"!==D.kind&&(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full ".concat("webterm"===D.kind?"bg-amber-500":"bg-emerald-500"),"aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium text-foreground",children:"kind:"}),(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono",children:D.kind}),"webterm"===D.kind&&(0,a.jsx)("span",{className:"text-[10px] text-amber-600 dark:text-amber-400",children:"(write-capable)"})]}),D.specs&&D.specs.length>0&&(0,a.jsx)("ul",{className:"flex flex-wrap gap-1",children:D.specs.map(e=>(0,a.jsx)("li",{title:e.description,className:"rounded border border-border bg-muted/50 px-1.5 py-0.5 font-mono text-[10px]",children:e.name},e.name))})]}),"error"===D.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"tool surface 조회 실패"})," \xb7 ",D.error]})]})]}),("ok"===O.status||"error"===O.status)&&(0,a.jsxs)("section",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Auth trace"}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>Q(e=>e+1),children:"Refresh"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["error"===O.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"auth-trace 조회 실패"})," \xb7 ",O.error]}),"ok"===O.status&&(null!=(i=null==(e=O.entries)?void 0:e.length)?i:0)===0&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"아직 auth 결정 없음. /v1/* 호출이 한 번도 없었다는 뜻."}),"ok"===O.status&&O.entries&&O.entries.length>0&&(0,a.jsx)("div",{className:"max-h-64 overflow-auto font-mono text-[10px]",children:(0,a.jsxs)("table",{className:"w-full",children:[(0,a.jsx)("thead",{className:"sticky top-0 bg-card text-muted-foreground",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-1 text-left",children:"time"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"path"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"ok"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"reason"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"sfs"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"origin"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"host"})]})}),(0,a.jsx)("tbody",{children:O.entries.slice().reverse().slice(0,30).map((e,t)=>{var s,r,n;return(0,a.jsxs)("tr",{className:"border-t border-border/50",children:[(0,a.jsx)("td",{className:"px-1 whitespace-nowrap",children:new Date(e.ts).toLocaleTimeString()}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[120px]",children:e.path}),(0,a.jsx)("td",{className:"px-1 ".concat(e.ok?"text-emerald-500":"text-rose-500"),children:e.ok?"Y":"N"}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[140px]",children:e.reason}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[80px]",children:null!=(s=e.sfs)?s:"∅"}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[140px]",children:null!=(r=e.origin)?r:"∅"}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[140px]",children:null!=(n=e.host)?n:"∅"})]},"".concat(e.ts,"-").concat(t))})})]})})]})]}),C&&"webterm"===D.kind&&(0,a.jsxs)("section",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Last screenshot"}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>X(e=>e+1),disabled:"loading"===W.status||!j.baseUrl,children:"Refresh"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["loading"===W.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing…"}),"none"===W.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:["아직 agent 가 screenshot 을 호출한 적 없음. ",(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"WebTerminalScreenshot"})," tool 실행 후 Refresh."]}),"ok"===W.status&&W.objectUrl&&(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("p",{className:"text-muted-foreground",children:["Most recent ",(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"tool_result"})," image in this session."]}),(0,a.jsx)("img",{src:W.objectUrl,alt:"Last screenshot",className:"max-w-full rounded border border-border bg-black"})]}),"error"===W.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"screenshot 조회 실패"})," \xb7 ",W.error]})]})]}),("idle"!==Z.status||"ok"===I.status)&&(0,a.jsxs)("section",{className:"space-y-3","data-testid":"pushcut-section",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Pushcut webhook"}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:eA,disabled:"loading"===Z.status||!j.baseUrl,"data-testid":"pushcut-refresh",children:"Refresh"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-3",children:["loading"===Z.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing…"}),"nexus-missing"===Z.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:["NEXUS endpoints not reachable. ",(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"elanous nexus"})," 로 띄우면 secret + binding 관리가 활성됩니다.",(0,a.jsxs)("span",{className:"block mt-1 text-[10px]",children:["(현재 daemon 만 단독 실행 중인 경우 — 본 섹션은 NEXUS HTTP 의 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"/v1/registry/bindings"})," + ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"/v1/config/secrets"})," 의존)"]})]}),"error"===Z.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"조회 실패"})," \xb7 ",Z.error]}),("ok"===Z.status||Z.secretRef)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"font-medium",children:"HMAC secret"}),(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{ez()},disabled:eE||!j.baseUrl,"data-testid":"pushcut-rotate-secret",children:eE?"Rotating…":"Rotate"})]}),Z.secretRef&&(0,a.jsxs)("p",{className:"font-mono text-[10px] text-muted-foreground",children:["ref: ",(0,a.jsx)("span",{className:"text-foreground",children:Z.secretRef})," \xb7 id: ",(0,a.jsx)("span",{className:"text-foreground",children:u})]}),Z.pendingSecretValue&&(0,a.jsxs)("div",{className:"rounded border border-amber-300 bg-amber-50 px-2 py-1.5 dark:border-amber-700 dark:bg-amber-950",children:[(0,a.jsx)("p",{className:"text-[10px] font-semibold text-amber-700 dark:text-amber-200",children:"Copy now — only shown once"}),(0,a.jsx)("code",{className:"block break-all font-mono text-[11px] text-amber-900 dark:text-amber-100 select-all","data-testid":"pushcut-secret-value",children:Z.pendingSecretValue}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-amber-700 dark:text-amber-300",children:["Paste into iPhone “elanous-camera” Pushcut Shortcut Header ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"X-Pushcut-Sig"})," recipe."]})]})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"font-medium",children:"연결 (토큰 → 대화)"}),(0,a.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[null!=(b=null==(t=Z.bindings)?void 0:t.length)?b:0," active"]})]}),(null!=(g=null==(s=Z.bindings)?void 0:s.length)?g:0)===0&&"ok"===Z.status&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"No bindings yet. Add one below — the daemon will route Pushcut webhooks for that token to the chosen session."}),Z.bindings&&Z.bindings.length>0&&(0,a.jsx)("ul",{className:"space-y-1","data-testid":"pushcut-bindings-list",children:Z.bindings.map(e=>{var t,s;return(0,a.jsxs)("li",{className:"flex items-center gap-2 rounded border border-border bg-muted/30 px-2 py-1",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 space-y-0.5",children:[(0,a.jsx)("div",{className:"font-mono text-[11px] font-medium truncate",children:null!=(t=e.label)?t:"(no label)"}),(0,a.jsxs)("div",{className:"font-mono text-[10px] text-muted-foreground truncate",children:["token: ",e.key.length>16?"".concat(e.key.slice(0,8),"…").concat(e.key.slice(-4)):e.key]}),(0,a.jsxs)("div",{className:"font-mono text-[10px] text-muted-foreground truncate",children:["session: ",null!=(s=e.sessionId)?s:"(unset)"]})]}),(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{eR(e.key)},disabled:eC===e.key,"data-testid":"pushcut-delete-".concat(e.key),children:eC===e.key?"Deleting…":"Delete"})]},e.key)})}),(0,a.jsxs)("div",{className:"space-y-1.5 rounded border border-dashed border-border p-2 mt-2",children:[(0,a.jsx)("p",{className:"text-[10px] font-medium text-muted-foreground",children:"Add binding"}),(0,a.jsx)(o.p,{value:ev,placeholder:"token (webhook URL key)",onChange:e=>ey(e.target.value),"data-testid":"pushcut-add-token",className:"text-[11px]"}),(0,a.jsx)(o.p,{value:eN,placeholder:C?"sessionId (default: ".concat(C.slice(0,12),"…)"):"sessionId",onChange:e=>ek(e.target.value),"data-testid":"pushcut-add-session",className:"text-[11px]"}),(0,a.jsx)(o.p,{value:ew,placeholder:"label (e.g. iPhone 15)",onChange:e=>eS(e.target.value),"data-testid":"pushcut-add-label",className:"text-[11px]"}),(0,a.jsx)(d.$,{size:"sm",onClick:()=>{eT()},disabled:"__new__"===eC||!ev.trim(),"data-testid":"pushcut-add-submit",children:"__new__"===eC?"Saving…":"Add"})]})]})]})]}),(0,a.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Channel: ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:m})," \xb7 powered by NEXUS subsystem registry (PR τ #1698) + secret backend (PR σ #1696). Webhook receiver lands in a follow-up daemon-side PR."]})]}),(0,a.jsx)("div",{id:"ios",className:"scroll-mt-8","aria-hidden":!0}),el.supported&&(0,a.jsxs)("section",{className:"space-y-3","data-testid":"webpush-section",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Notifications"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full ".concat(el.cachedId?"bg-emerald-500":"denied"===el.permission?"bg-rose-500":"bg-muted-foreground"),"aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium",children:el.cachedId?"Subscribed":"denied"===el.permission?"Permission denied":"Not subscribed"}),el.cachedLabel&&(0,a.jsx)("span",{className:"ml-auto font-mono text-[10px] text-muted-foreground",children:el.cachedLabel})]}),"denied"===el.permission&&(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground",children:"Browser/iOS denied notification permission. Enable in Settings → Safari → Notifications, then reload."}),eu&&(0,a.jsx)("p",{className:"text-[10px] text-rose-500 break-all","data-testid":"webpush-error",children:eu}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[!el.cachedId&&(0,a.jsx)(d.$,{size:"sm",onClick:()=>{eh()},disabled:eo||!j.baseUrl||"denied"===el.permission,"data-testid":"webpush-enable",children:eo?"Enabling…":"Enable notifications"}),el.cachedId&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{eb()},disabled:eo,"data-testid":"webpush-disable",children:eo?"Disabling…":"Disable"}),(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{ej()},disabled:eo||!j.baseUrl,"data-testid":"webpush-test",children:"Send test"})]})]}),(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground",children:"Push 알림은 PWA 가 닫혀 있어도 도착합니다 — agent turn 완료 \xb7 녹화 종료 등. iOS 16.4+ home-screen installed PWA 만 작동 (Pushcut 가 fallback)."})]})]}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"대화"}),(0,a.jsx)("div",{className:"rounded-md border border-border bg-card px-3 py-2 font-mono text-xs",children:C||"(no session yet)"}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["A new session id is allocated on first load. Use Chat’s",(0,a.jsx)("code",{className:"mx-1 rounded bg-muted px-1.5 py-0.5",children:":fork"}),"meta-command to start fresh once U-3 ships."]})]}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Theme"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:l.z.map(e=>(0,a.jsx)(d.$,{variant:e===U?"default":"outline",size:"sm",onClick:()=>A(e),children:e},e))})]}),(0,a.jsx)(e6,{}),(0,a.jsx)(eX,{}),(0,a.jsx)(T,{}),(0,a.jsx)(R,{}),(0,a.jsx)(e3,{}),(0,a.jsx)(e1,{}),(0,a.jsx)(d.$,{onClick:()=>c.oR.success("Settings saved"),children:"Saved"})]})}},16912:(e,t,s)=>{s.d(t,{D:()=>p,ThemeProvider:()=>x,z:()=>i});var a=s(65245),r=s(64297),n=s(62391),l=s(2882);let i=["catppuccin-mocha","mocha-pastel-accent","catppuccin-latte","rose-pine-dawn","nord-light","elanous-pastel-default"],d="elanous.pwa.theme",o="dashboard.theme.active",c="catppuccin-mocha";function u(e){return"string"==typeof e&&i.includes(e)}let m=(0,r.createContext)(null);function x(e){let{children:t}=e,s=(0,l.Qj)(),[x,p]=(0,r.useState)(c),h=(0,r.useRef)(0),f=(0,r.useCallback)(e=>{p(e),document.documentElement.dataset.theme=e},[]);(0,r.useEffect)(()=>{let e=localStorage.getItem(d),t=u(e)?e:c;f(t),(0,n.cY)("webterm.provider.theme.init",{theme:t})},[f]),(0,r.useEffect)(()=>{if(!s)return;let e=!0,t=h.current;return s.getSwitch(o).then(s=>{let{switch:a}=s;e&&t===h.current&&u(a.value)&&(f(a.value),localStorage.setItem(d,a.value))}).catch(()=>void 0),()=>{e=!1}},[f,s]);let b=(0,r.useCallback)(e=>{u(e)&&(h.current+=1,f(e),localStorage.setItem(d,e),(0,n.cY)("webterm.provider.theme.set",{theme:e}),null==s||s.putSwitch(o,{value:e}).catch(()=>void 0))},[f,s]);return(0,a.jsx)(m.Provider,{value:{theme:x,setTheme:b,themes:i},children:t})}function p(){let e=(0,r.useContext)(m);if(!e)throw Error("useTheme must be used inside <ThemeProvider>");return e}},19389:(e,t,s)=>{s.d(t,{MQ:()=>n,OY:()=>a,fG:()=>r});let a="elanous:nav-prefs";function r(e){try{return"1"===window.localStorage.getItem(e)}catch(e){return!1}}function n(e,t){try{t?window.localStorage.setItem(e,"1"):window.localStorage.removeItem(e)}catch(e){}try{window.dispatchEvent(new Event(a))}catch(e){}}},32111:(e,t,s)=>{s.d(t,{HS:()=>a,O2:()=>n,Rk:()=>o,XP:()=>c,sR:()=>d,uU:()=>r});let a=["auto","default","neutral","dark","forest"],r="elanous.mermaid.theme",n="elanous:mermaid-theme-change",l=null,i=null;function d(){if(i!==window&&(l=null),null!==l)return l;try{var e;let t=window.localStorage.getItem(r);return null!=(e=a.find(e=>e===t))?e:"auto"}catch(e){return"auto"}}function o(e){i=window;try{window.localStorage.setItem(r,e),l=null}catch(t){l=e}window.dispatchEvent(new Event(n))}function c(e,t){for(let t of e.matchAll(/%%\{\s*init\s*:\s*\{([\s\S]*?)\}\s*\}%%/gi)){var s;let e=null==(s=t[1])?void 0:s.match(/(?:^|,)\s*['"]?theme['"]?\s*:\s*['"]?(default|neutral|dark|forest|base)\b/i);if(e)return e[1].toLowerCase()}return"auto"===t?"default":t}},89064:(e,t,s)=>{s.d(t,{GZ:()=>i,_n:()=>u,gu:()=>o,mB:()=>d,sY:()=>c,u9:()=>m});let a="elanous.showroom.intentPanel.collapsed",r="elanous.showroom.intentPanel.displayMode",n="fixed",l=new Set(["fixed","popup","off"]);function i(){try{return"true"===window.localStorage.getItem(a)}catch(e){return!1}}function d(e){try{e?window.localStorage.setItem(a,"true"):window.localStorage.removeItem(a),window.dispatchEvent(new StorageEvent("storage",{key:a,newValue:e?"true":null}))}catch(e){}}function o(e){let t=t=>{(t.key===a||null===t.key)&&e(i())};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}function c(){try{let e=window.localStorage.getItem(r);if(e&&l.has(e))return e;return n}catch(e){return n}}function u(e){try{e===n?window.localStorage.removeItem(r):window.localStorage.setItem(r,e),window.dispatchEvent(new StorageEvent("storage",{key:r,newValue:e===n?null:e}))}catch(e){}}function m(e){let t=t=>{(t.key===r||null===t.key)&&e(c())};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}},93129:(e,t,s)=>{s.d(t,{X:()=>i});var a=s(64297);let r=null,n=[],l=[];function i(e){let[t,s]=(0,a.useState)(()=>r&&Date.now()-r.at<3e5?r.providers:n),[i,d]=(0,a.useState)(()=>r&&Date.now()-r.at<3e5?r.models:l),[o,c]=(0,a.useState)(!1),[u,m]=(0,a.useState)(null),x=(0,a.useCallback)(async()=>{c(!0),m(null);try{let t=await e.getRegistryCatalog(),a=t.providers.map(e=>({id:e.id,displayName:e.displayName,aliases:e.aliases,modelPrefixes:e.modelPrefixes,apiKeyEnv:e.apiKeyEnv,endpointPattern:e.endpointPattern,capabilities:e.capabilities,builtIn:e.builtIn})),n=t.models.map(e=>({id:e.id,provider:e.provider,displayName:e.displayName,...void 0!==e.family?{family:e.family}:{},...void 0!==e.familyShortcut?{familyShortcut:e.familyShortcut}:{},...void 0!==e.contextSize?{contextSize:e.contextSize}:{},...void 0!==e.outputMaxTokens?{outputMaxTokens:e.outputMaxTokens}:{},...void 0!==e.vision?{vision:e.vision}:{},...void 0!==e.reasoning?{reasoning:e.reasoning}:{},...void 0!==e.toolCalling?{toolCalling:e.toolCalling}:{},...void 0!==e.pricing?{pricing:e.pricing}:{},...void 0!==e.deprecated?{deprecated:e.deprecated}:{},...void 0!==e.releaseDate?{releaseDate:e.releaseDate}:{},...void 0!==e.kind?{kind:e.kind}:{}}));r={at:Date.now(),providers:a,models:n},s(a),d(n)}catch(e){m(e instanceof Error?e.message:String(e))}finally{c(!1)}},[e]);(0,a.useEffect)(()=>{if(r&&Date.now()-r.at<3e5){s(r.providers),d(r.models);return}x()},[x]);let p=(0,a.useCallback)(async()=>{r=null,await x()},[x]),h=(0,a.useMemo)(()=>t.map(e=>e.id),[t]),f=(0,a.useMemo)(()=>{let e=new Map;for(let t of i){let s=e.get(t.provider);s?s.push(t):e.set(t.provider,[t])}return t=>{var s;return t?null!=(s=e.get(t))?s:[]:i}},[i]);return{providers:t,providerIds:h,models:i,modelsByProvider:f,loading:o,error:u,reload:p}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2883],{75117:(e,r,t)=>{t.d(r,{Zr:()=>a,f6:()=>s,oD:()=>o});let n="elanous.daemon.sessionId";function s(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"s-".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2,10))}function o(){let e=function(){let e=new URLSearchParams(window.location.search).get("session");return e?(localStorage.setItem(n,e),e):localStorage.getItem(n)}();if(e)return e;let r=s();return localStorage.setItem(n,r),r}function a(){let e=s();return localStorage.setItem(n,e),e}},79836:(e,r,t)=>{t.d(r,{C:()=>d,DaemonProvider:()=>u,Q:()=>c});var n=t(65245),s=t(64297),o=t(67890),a=t(75117),l=t(79948),i=t(62391);let d=(0,s.createContext)(null);function u(e){let{children:r}=e,t={baseUrl:"",token:"",provider:""},[u,c]=(0,s.useState)(t),[y,v]=(0,s.useState)(""),[m]=(0,s.useState)(()=>new l.ki(t));(0,s.useEffect)(()=>{let e=(0,o.Fp)();c(e),m.updateConfig(e),v((0,a.oD)()),(0,i.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[m]),(0,s.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let r=(0,o.Fp)();m.updateConfig(r),c(r),(0,i.cY)("webterm.provider.daemon.config-cross-tab",{key:e.key,hasToken:!!r.token});return}"elanous.daemon.sessionId"===e.key&&e.newValue&&v(r=>r===e.newValue?r:((0,i.cY)("webterm.provider.daemon.session-cross-tab",{previous:r||"(empty)",next:e.newValue}),e.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[m]);let p=e=>{c(r=>{let t={...r,...e};return(0,o.Qc)(e),m.updateConfig(t),(0,i.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),t})},f=e=>{v(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,i.cY)("webterm.provider.daemon.session-set",{sessionId:e})},b=(0,s.useMemo)(()=>({config:u,setConfig:p,client:m,sessionId:y,setSessionId:f}),[u,m,y]);return(0,n.jsx)(d.Provider,{value:b,children:r})}function c(){let e=(0,s.useContext)(d);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},95761:(e,r,t)=>{function n(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function s(e){return"string"==typeof e}function o(e){return s(e)&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?Z$/.test(e)&&Number.isFinite(Date.parse(e))&&new Date(e).toISOString().slice(0,19)===e.slice(0,19)}function a(e){return n(e)&&s(e.nodeId)&&(null===e.ok||"boolean"==typeof e.ok)&&s(e.summary)&&(void 0===e.startedAt||null===e.startedAt||s(e.startedAt))&&(void 0===e.endedAt||null===e.endedAt||s(e.endedAt))}t.d(r,{Gj:()=>g,HG:()=>A,Hj:()=>k,Kh:()=>b,Nn:()=>p,oc:()=>f,yu:()=>h});let l=new Set(["pending","running","done","retry","timeout","failed"]),i=e=>void 0===e||"number"==typeof e&&Number.isFinite(e);function d(e){return!!(n(e)&&s(e.runId)&&s(e.status)&&s(e.startedAt)&&(null===e.version||s(e.version))&&Array.isArray(e.path)&&e.path.every(s)&&Array.isArray(e.nodes)&&e.nodes.every(a))&&(void 0!==e.gateShards&&!function(e){if(!n(e)||!s(e.version)||!s(e.updatedAt)||!Array.isArray(e.shards)||!n(e.summary))return!1;let r=e.summary;return e.shards.every(e=>n(e)&&s(e.id)&&l.has(e.state)&&i(e.plannedMin)&&i(e.installSec)&&i(e.rc)&&(void 0===e.waitReason||s(e.waitReason)))&&Number.isInteger(r.total)&&n(r.counts)&&[...l].every(e=>Number.isInteger(r.counts[e]))&&Array.isArray(r.waitReasons)&&r.waitReasons.every(e=>n(e)&&s(e.reason)&&Number.isInteger(e.count))&&(null===r.etaMin||"number"==typeof r.etaMin)&&(null===r.staleMin||"number"==typeof r.staleMin)&&(void 0===r.overrunMin||"number"==typeof r.overrunMin)}(e.gateShards)&&delete e.gateShards,!0)}function u(e){return n(e)&&s(e.id)&&s(e.title)&&s(e.status)&&(void 0===e.owner||s(e.owner))&&s(e.updatedAt)&&(void 0===e.evidence||s(e.evidence))}let c=e=>Number.isInteger(e)&&e>=0;function y(e){return n(e)&&s(e.id)&&s(e.title)&&(null===e.open||c(e.open))&&(null===e.landed||c(e.landed))&&(null===e.blocked||Array.isArray(e.blocked)&&e.blocked.every(e=>n(e)&&s(e.id)&&s(e.title)))}function v(e){return n(e)&&["OP","MK","TC","UX"].includes(e.seat)&&(void 0===e.role||s(e.role))&&(null===e.now||n(e.now)&&s(e.now.text)&&s(e.now.at))&&(null===e.landed||Array.isArray(e.landed)&&e.landed.every(e=>n(e)&&c(e.pr)&&s(e.title)&&s(e.at)&&(null===e.checklistId||s(e.checklistId))))&&(null===e.blocked||Array.isArray(e.blocked)&&e.blocked.every(e=>n(e)&&s(e.id)&&s(e.title)&&"red"===e.status))&&(null===e.pendingDecisions||c(e.pendingDecisions))&&(null===e.checklist||n(e.checklist)&&["green","yellow","red","done"].every(r=>c(e.checklist[r])))&&(void 0===e.subSeats||null===e.subSeats||Array.isArray(e.subSeats)&&e.subSeats.every(y))}async function m(e,r,t){try{let n=await e.fetchResponse(r,{method:"GET"});if(403===n.status)return{kind:"forbidden"};if(!n.ok)return{kind:"error",status:n.status};let s=t(await n.json());return null===s?{kind:"error",status:n.status}:{kind:"ready",data:s}}catch(e){return{kind:"error",status:0}}}function p(e,r){return m(e,"/v1/ops/seats".concat(r?"?date=".concat(encodeURIComponent(r)):""),e=>n(e)&&s(e.date)&&Array.isArray(e.seats)&&e.seats.every(v)&&new Set(e.seats.map(e=>e.seat)).size===e.seats.length?{date:e.date,seats:e.seats}:null)}function f(e,r){return m(e,"/v1/ops/release/runs".concat(r?"?version=".concat(encodeURIComponent(r)):""),e=>Array.isArray(e)&&e.every(d)?e:null)}function b(e,r,t){return m(e,"/v1/ops/release/runs/".concat(encodeURIComponent(r),"/nodes/").concat(encodeURIComponent(t),"/log"),e=>n(e)&&s(e.log)?{log:e.log}:null)}function A(e,r){return m(e,"/v1/ops/checklist?version=".concat(encodeURIComponent(r)),e=>{var r,t,a,l;if(!(n(e)&&s(e.version)&&(void 0===e.codename||s(e.codename))&&Array.isArray(e.items)&&e.items.every(u)&&["green","yellow","red","done"].every(r=>void 0===e[r]||Number.isInteger(e[r])&&e[r]>=0)&&(void 0===e.blocked||Array.isArray(e.blocked)&&e.blocked.every(s))&&(void 0===e.byOwner||n(e.byOwner)&&Object.values(e.byOwner).every(e=>Number.isInteger(e)&&e>=0))&&(void 0===e.history||Array.isArray(e.history))))return null;let i={green:0,yellow:0,red:0,done:0};for(let r of e.items)r.status in i&&i[r.status]++;return{version:e.version,...void 0!==e.codename?{codename:e.codename}:{},schedule:n(e.schedule)&&o(e.schedule.cutAt)&&(null===e.schedule.landBy||o(e.schedule.landBy))?{cutAt:e.schedule.cutAt,landBy:e.schedule.landBy}:null,items:e.items,green:null!=(r=e.green)?r:i.green,yellow:null!=(t=e.yellow)?t:i.yellow,red:null!=(a=e.red)?a:i.red,done:null!=(l=e.done)?l:i.done,...void 0!==e.blocked?{blocked:e.blocked}:{},...void 0!==e.byOwner?{byOwner:e.byOwner}:{},...void 0!==e.history?{history:e.history}:{}}})}function g(e){return m(e,"/v1/ops/resources/ledger",e=>{if(!n(e)||!s(e.observedAt)||"ok"!==e.readStatus||!Array.isArray(e.matrix)||!Array.isArray(e.leases)||!Array.isArray(e.measurements)||!Array.isArray(e.findings))return null;let r=e=>null===e||"number"==typeof e&&Number.isFinite(e);return e.matrix.every(e=>n(e)&&s(e.host)&&s(e.lane)&&r(e.capacity)&&Number.isInteger(e.leases)&&"number"==typeof e.leasedCpu&&"number"==typeof e.leasedMemoryBytes&&r(e.observedPodCpuRequests)&&r(e.observedPodMemoryRequestsBytes)&&r(e.measuredPods)&&r(e.unknownPods)&&r(e.measuredProcesses)&&r(e.unknownProcesses)&&r(e.deltaLeasesVsPods))&&e.leases.every(e=>n(e)&&s(e.id)&&s(e.fp)&&s(e.host)&&s(e.lane)&&n(e.resources)&&n(e.mission)&&s(e.heartbeatAt)&&s(e.startedAt))&&(void 0===e.recentReclaims||Array.isArray(e.recentReclaims)&&e.recentReclaims.every(e=>n(e)&&s(e.id)&&s(e.fp)&&s(e.host)&&s(e.lane)&&s(e.at)&&("lease-ended"===e.kind||"lease-reaped"===e.kind)&&s(e.reason)&&s(e.stoppedBy)))&&e.measurements.every(e=>n(e)&&s(e.host)&&s(e.observedAt)&&Array.isArray(e.pods)&&Array.isArray(e.processes)&&Array.isArray(e.errors)&&e.errors.every(s))&&e.findings.every(e=>n(e)&&s(e.kind)&&s(e.host)&&s(e.id)&&s(e.detail)&&"report-only"===e.action)?e:null})}function h(e){return m(e,"/v1/ops/resources/guardian",e=>{if(!n(e)||!["pending","ready","stale","failed"].includes(e.state)||"boolean"!=typeof e.stale||null!==e.observedAt&&!s(e.observedAt)||void 0!==e.staleReason&&!s(e.staleReason)||void 0!==e.lastFailureAt&&!s(e.lastFailureAt)||!Array.isArray(e.findings)||!n(e.cleanup))return null;let r=e=>Number.isSafeInteger(e)&&e>=0;return e.findings.every(e=>n(e)&&s(e.kind)&&s(e.host)&&s(e.id)&&(void 0===e.fp||s(e.fp))&&s(e.detail)&&"report-only"===e.action)&&r(e.cleanup.reaped)&&r(e.cleanup.skipped)&&r(e.cleanup.errors)&&(void 0===e.releaseReservation||n(e.releaseReservation)&&s(e.releaseReservation.status)&&s(e.releaseReservation.reason))&&("pending"!==e.state||null===e.observedAt)&&("ready"!==e.state||!e.stale&&null!==e.observedAt)&&("stale"!==e.state||e.stale)&&("failed"!==e.state||e.stale&&null===e.observedAt&&s(e.lastFailureAt))?e:null})}function k(e,r){return m(e,"/v1/ops/train-throughput?date=".concat(encodeURIComponent(r)),e=>{if(!n(e)||!s(e.date)||!s(e.generatedAt)||void 0!==e.sourceIncomplete&&"boolean"!=typeof e.sourceIncomplete||!n(e.hosts)||!n(e.hours)||!Array.isArray(e.attempts))return null;let r=e=>{if(!n(e))return!1;let r=e.rejectedByReason;return["assigned","assignedPrs","completed","succeeded","rejected","failed","unmeasured"].every(r=>c(e[r]))&&(null===e.landed||c(e.landed))&&(null===e.averageWaitSeconds||c(e.averageWaitSeconds))&&n(r)&&["typecheck","ratchet","introduced","setup-unmeasured","authorization","lock-owner","other"].every(e=>c(r[e]))};return Object.values(e.hosts).every(r)&&Object.values(e.hours).every(r)?e:null})}}}]);
|
package/apps/pwa/out/_next/static/chunks/{6355.34fd60aca3e95acf.js → 2999.c462d95ab66dba3a.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2999],{22999:(e,s,t)=>{t.d(s,{parseTerminalSse:()=>n});function n(e){let s,t=[],n=e;for(;(s=n.indexOf("\n\n"))>=0;){let e,r=n.slice(0,s);n=n.slice(s+2);let p="message",o=[];for(let e of r.split("\n"))e.startsWith("event: ")?p=e.slice(7).trim():e.startsWith("data: ")&&o.push(e.slice(6));if(0===o.length)continue;try{e=JSON.parse(o.join("\n"))}catch(e){continue}let a=null!=e?e:{};"mode"===p&&("bytes"===a.mode||"screen"===a.mode)?t.push({type:"mode",mode:a.mode,..."number"==typeof a.pollMs?{pollMs:a.pollMs}:{}}):"reset"===p&&"string"==typeof a.screen?t.push({type:"reset",screen:a.screen}):"data"===p&&"string"==typeof e?t.push({type:"data",chunk:e}):"screen"===p&&"string"==typeof a.screen?t.push({type:"screen",screen:a.screen}):"status"===p&&"string"==typeof a.status?t.push({type:"status",status:a.status}):"end"===p&&t.push({type:"end",reason:"string"==typeof a.reason?a.reason:"end"})}return{events:t,rest:n}}}}]);
|