elanous 0.3.2 → 0.3.4
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/{280-f880696e14bc1032.js → 280-66f2ebc166517702.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/{5359-11952bdf39bae0c7.js → 5359-7aa498ded308ea17.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/approvals/{page-822c5395a88eb1e5.js → page-538c811d4da4d7b8.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-32cb397d044bb5aa.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/board/page-02d148f66a3da6bb.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/botlab/page-42b7211f972c6001.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/bots/{page-d1cdb65c4ceb5c33.js → page-46bac74d4ce82733.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/ceo/page-10e7ee66dc7c3d8a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/chat/page-391a9ecbfb541e68.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/consult/{page-c5b8f3b77568a8e9.js → page-6b69baa42370ba35.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/control/{page-77db1e47b120b94e.js → page-58960a34c0fa8f97.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/decisions/{page-3048505d466ec98a.js → page-9b16ae10bbe63997.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-417a7b86f7eceeea.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/editor/{page-6a36535d413596b1.js → page-09f86a64836617b7.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/exec/page-cb640bac3150eb4c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/field/page-e80fc997e0c589d5.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/inside/page-173d296c2127560a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/intake/page-358c3e0c2ce7184c.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/{layout-956789c8340e289e.js → layout-09c6e6033ddb1605.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/live/page-11a4763fe20fe116.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/live-run/page-e7e02e459ca54062.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/loops/{page-e911bcd2bfb5c305.js → page-b0c21fcb45c049d0.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/market/{page-52b55f54c9d8e0fb.js → page-f331955e0ca9bf84.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-c4c4b4333b24e505.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/morning/{page-afa5068541a55cd1.js → page-7cab7257602fe967.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/{not-found-3eb72a4f6788a903.js → not-found-a0dc43b385fba1b5.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-65ecf674fc5e9d19.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/checklist/{page-c9e4ca5025534239.js → page-d34cea406f837407.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/release/page-7d69cc10c33882b7.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/resources/{page-da8f855dc25cae3d.js → page-c2b69a4da710ccee.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-80adac335abc5070.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/outputs/page-10b7dbd205510a67.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/{page-f95beb047d743d09.js → page-5f3c9b795a225d8c.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/reflection/{page-3b0434a6fc1154e1.js → page-68ece02272941b6c.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/scheduler/{page-9deae0524ce7a7e2.js → page-21d4e1472f806b1e.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/sessions/{page-4f4f0858754f73a4.js → page-1156870631db0555.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-4fc726c790e6a7bf.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/settings/page-e0dc9ec9ac537906.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/done/{page-2e8cc4d212f1ca01.js → page-83138c236444d7d5.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/page-61133c103b342d2b.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/share/{page-b8c0c73c2e5a8917.js → page-40cac04d8f4822c6.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-ecb7be39ce14845a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/tasks/{page-aedaede687cc293d.js → page-a288059ee8ed73fb.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/term/{page-bb5c95ce68358be2.js → page-31ed388024d4f660.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/today/page-29d28b05a7ddede3.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/trace/page-b39bdb4ce095ccfc.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/vault/{page-9a1cdd7c5a50bf73.js → page-ecbc7b9f31d195b7.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-059b94e88f91e73f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-ca29c405228c72b9.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-ff99da4e3ff50503.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-2aa0c6cdb2ef7ea8.js +1 -0
- package/apps/pwa/out/approvals/index.html +1 -1
- package/apps/pwa/out/approvals/index.txt +13 -13
- package/apps/pwa/out/autopilot/index.html +1 -1
- package/apps/pwa/out/autopilot/index.txt +13 -13
- package/apps/pwa/out/board/index.html +1 -1
- package/apps/pwa/out/board/index.txt +13 -13
- package/apps/pwa/out/botlab/index.html +1 -1
- package/apps/pwa/out/botlab/index.txt +13 -13
- package/apps/pwa/out/bots/index.html +1 -1
- package/apps/pwa/out/bots/index.txt +13 -13
- package/apps/pwa/out/ceo/index.html +1 -1
- package/apps/pwa/out/ceo/index.txt +13 -13
- package/apps/pwa/out/chat/index.html +1 -1
- package/apps/pwa/out/chat/index.txt +13 -13
- package/apps/pwa/out/consult/index.html +1 -1
- package/apps/pwa/out/consult/index.txt +13 -13
- package/apps/pwa/out/control/index.html +1 -1
- package/apps/pwa/out/control/index.txt +13 -13
- package/apps/pwa/out/decisions/index.html +1 -1
- package/apps/pwa/out/decisions/index.txt +13 -13
- package/apps/pwa/out/design-check/index.html +1 -1
- package/apps/pwa/out/design-check/index.txt +13 -13
- package/apps/pwa/out/editor/index.html +1 -1
- package/apps/pwa/out/editor/index.txt +13 -13
- package/apps/pwa/out/exec/index.html +1 -1
- package/apps/pwa/out/exec/index.txt +13 -13
- package/apps/pwa/out/field/index.html +1 -1
- package/apps/pwa/out/field/index.txt +13 -13
- package/apps/pwa/out/healthz +1 -1
- package/apps/pwa/out/index.html +1 -1
- package/apps/pwa/out/index.txt +13 -13
- package/apps/pwa/out/inside/index.html +1 -1
- package/apps/pwa/out/inside/index.txt +13 -13
- package/apps/pwa/out/intake/index.html +1 -1
- package/apps/pwa/out/intake/index.txt +13 -13
- package/apps/pwa/out/live/index.html +1 -1
- package/apps/pwa/out/live/index.txt +13 -13
- package/apps/pwa/out/live-run/index.html +1 -1
- package/apps/pwa/out/live-run/index.txt +13 -13
- package/apps/pwa/out/loops/index.html +1 -1
- package/apps/pwa/out/loops/index.txt +13 -13
- package/apps/pwa/out/market/index.html +1 -1
- package/apps/pwa/out/market/index.txt +13 -13
- package/apps/pwa/out/missions/placeholder/index.html +1 -1
- package/apps/pwa/out/missions/placeholder/index.txt +13 -13
- package/apps/pwa/out/morning/index.html +1 -1
- package/apps/pwa/out/morning/index.txt +13 -13
- package/apps/pwa/out/observatory/index.html +1 -1
- package/apps/pwa/out/observatory/index.txt +13 -13
- package/apps/pwa/out/ops/checklist/index.html +1 -1
- package/apps/pwa/out/ops/checklist/index.txt +13 -13
- package/apps/pwa/out/ops/release/index.html +1 -1
- package/apps/pwa/out/ops/release/index.txt +13 -13
- package/apps/pwa/out/ops/resources/index.html +1 -1
- package/apps/pwa/out/ops/resources/index.txt +13 -13
- package/apps/pwa/out/ops/seats/index.html +1 -1
- package/apps/pwa/out/ops/seats/index.txt +13 -13
- package/apps/pwa/out/outputs/index.html +1 -1
- package/apps/pwa/out/outputs/index.txt +13 -13
- package/apps/pwa/out/reflection/index.html +1 -1
- package/apps/pwa/out/reflection/index.txt +14 -14
- package/apps/pwa/out/scheduler/index.html +1 -1
- package/apps/pwa/out/scheduler/index.txt +13 -13
- package/apps/pwa/out/sessions/index.html +1 -1
- package/apps/pwa/out/sessions/index.txt +13 -13
- package/apps/pwa/out/settings/devices/index.html +1 -1
- package/apps/pwa/out/settings/devices/index.txt +13 -13
- package/apps/pwa/out/settings/index.html +1 -1
- package/apps/pwa/out/settings/index.txt +13 -13
- package/apps/pwa/out/setup/done/index.html +1 -1
- package/apps/pwa/out/setup/done/index.txt +13 -13
- package/apps/pwa/out/setup/index.html +1 -1
- package/apps/pwa/out/setup/index.txt +13 -13
- package/apps/pwa/out/share/index.html +1 -1
- package/apps/pwa/out/share/index.txt +13 -13
- package/apps/pwa/out/showroom/index.html +1 -1
- package/apps/pwa/out/showroom/index.txt +13 -13
- package/apps/pwa/out/tasks/index.html +1 -1
- package/apps/pwa/out/tasks/index.txt +13 -13
- package/apps/pwa/out/term/index.html +1 -1
- package/apps/pwa/out/term/index.txt +13 -13
- package/apps/pwa/out/today/index.html +1 -1
- package/apps/pwa/out/today/index.txt +13 -13
- package/apps/pwa/out/trace/index.html +1 -1
- package/apps/pwa/out/trace/index.txt +13 -13
- package/apps/pwa/out/vault/index.html +1 -1
- package/apps/pwa/out/vault/index.txt +13 -13
- package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
- package/apps/pwa/out/workflows/chat-ui/index.txt +13 -13
- package/apps/pwa/out/workflows/index.html +1 -1
- package/apps/pwa/out/workflows/index.txt +13 -13
- package/apps/pwa/out/workspace/index.html +1 -1
- package/apps/pwa/out/workspace/index.txt +13 -13
- package/apps/pwa/out/worktrees/index.html +1 -1
- package/apps/pwa/out/worktrees/index.txt +13 -13
- package/graphs/natural-language-research.yaml +38 -0
- package/package.json +1 -1
- package/personas/botlab-4.yaml +8 -0
- package/src/acp/core-turn-bridge.ts +5 -0
- package/src/auto-research/research-turn.ts +120 -5
- package/src/cli/intake-source-cli.ts +9 -4
- package/src/cli/release-cli.ts +7 -2
- package/src/cli/setup-cli.ts +2 -2
- package/src/cli/setup-keys.ts +8 -5
- package/src/core-turn/run-core-turn.ts +93 -14
- package/src/dashboard/first-screen-band.ts +2 -6
- package/src/dashboard/index.ts +41 -13
- package/src/dashboard/plugin-wizard-runtime.ts +15 -1
- package/src/dashboard/plugin-wizard-tool.ts +16 -2
- package/src/dashboard/turn-preamble.ts +8 -0
- package/src/index.ts +26 -0
- package/src/intake-plane/actions.ts +20 -12
- package/src/intake-plane/intake-sources.ts +32 -11
- package/src/intake-plane/items.ts +1 -1
- package/src/mcp/server.ts +7 -2
- package/src/native-tool-catalog.ts +3 -0
- package/src/nexus/api/harness-api.ts +17 -2
- package/src/nexus/api/harness-traversal.ts +14 -4
- package/src/nexus/api/meta-api.ts +3 -1
- package/src/nexus/api/research-run-observer.ts +59 -0
- package/src/onboarding/first-run-doctor-test-control.ts +42 -0
- package/src/onboarding/first-run-doctor.ts +1 -0
- package/src/plugins/core/host.ts +12 -0
- package/src/prompt-library/session-guidance.ts +7 -6
- package/src/self-implement/orchestrator.ts +13 -0
- package/src/self-implement/run-ledger.ts +1 -1
- package/src/self-implement/run-step-projection.ts +10 -2
- package/src/session/chat.ts +2 -0
- package/src/session-runtime/index.ts +47 -5
- package/src/setup/service-key-catalog.ts +4 -2
- package/src/setup/service-keys.ts +34 -10
- package/src/terminal/coding-agent.ts +12 -1
- package/src/tool-hints/gate.ts +7 -3
- package/src/tool-hints/signals.ts +43 -1
- package/src/tool-runtime/browser-hand-runtime.ts +19 -9
- package/src/tool-runtime/elanous-linear-issue-runtime.ts +13 -3
- package/src/tui.ts +97 -4
- package/src/ux-sim/classic-tui-seat-scenarios.ts +54 -4
- package/src/ux-sim/mock-scenario-catalog.json +8 -3
- package/src/version/packed-revision.json +1 -1
- package/apps/pwa/out/_next/static/chunks/app/autopilot/page-9d7432ad7cb155ce.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/board/page-26941f067e899ed3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/botlab/page-3c29b0e0d681e33d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ceo/page-1224ce11e2a2eef5.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/chat/page-940b44876305fac2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-8d97da172a2cd552.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/exec/page-8696a777c88bacc2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/field/page-c4f1095489266f97.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/inside/page-ea374796ca2317b9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/intake/page-111a4245428caa84.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/live/page-7645ef6d17d2314b.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/live-run/page-3448160192777209.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-6a904a7d1b3aee11.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-527a398eac0b4699.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/release/page-63c8938149254e9d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-f48403ffee4c4b77.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/outputs/page-905013106f55daad.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-73857fa536e7c832.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/page-c0bdee145df0f6c9.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/page-fe67b4e66f496b3a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/showroom/page-2e8ed69b1a70c746.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/today/page-c6b096777f73c43a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/trace/page-45967d78c1748112.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-c54c8b957ebf94e2.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/page-9dc19aee0932542a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workspace/page-8f291522cb3d91a6.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-52b36e1c8acd087f.js +0 -1
- /package/apps/pwa/out/_next/static/{5URFQKPO21SIgTlLvb1Jv → v4GHQkFrQs8lzZY_KFv9_}/_buildManifest.js +0 -0
- /package/apps/pwa/out/_next/static/{5URFQKPO21SIgTlLvb1Jv → v4GHQkFrQs8lzZY_KFv9_}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3141],{10466:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=(0,a(89570).A)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},17337:(e,t,a)=>{Promise.resolve().then(a.bind(a,43097))},24144:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=(0,a(89570).A)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},43097:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>R});var n=a(17594),r=a(48082),s=a(96545),l=a(74055),i=a(10466),o=a(24144),d=a(46982),c=a(99081),u=a(12252),x=a(17240),m=a(22244),h=a(81755),p=a(273);let g={PLAN:"text-sky-600 dark:text-sky-400",ROUTE:"text-violet-600 dark:text-violet-400",VERIFY:"text-amber-600 dark:text-amber-400",HEAL:"text-emerald-600 dark:text-emerald-400",ESCALATE:"text-rose-600 dark:text-rose-400",SHIP:"text-green-700 dark:text-green-400 font-semibold"};function f(e){let{board:t,lines:a,mode:r,onSelectRun:s,selectedRunId:l,role:i="owner"}=e,o="max"===r,d="owner"===i,c=t.gauges,{snapshot:x}=t,m=d?0:t.stream.filter(e=>null!=e.why&&(0,u.Yu)(e.why)).length;return(0,n.jsxs)("div",{className:(0,p.cn)("space-y-4",o&&"live-max"),"data-live-mode":r,children:[(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-6",children:[(0,n.jsx)(b,{label:"LIVE",hint:"도는 런",value:String(c.live),tone:c.live>0?"live":"idle",max:o}),(0,n.jsx)(b,{label:"DECISIONS/MIN",hint:"판단 ".concat(c.decisions,"건"),value:String(c.decisionsPerMin),max:o}),(0,n.jsx)(b,{label:"SHIPPED",hint:"병합\xb7PR",value:String(c.shipped),tone:"ok",max:o}),(0,n.jsx)(b,{label:"SELF-HEAL",hint:c.selfHealRuns?"수리 런 ".concat(c.selfHealRuns):"수리 런 없음",value:null===c.selfHealRate?"—":"".concat(c.selfHealRate,"%"),max:o}),(0,n.jsx)(b,{label:"BURN",hint:"토큰/분",value:v(c.burnTokensPerMin),max:o}),(0,n.jsx)(b,{label:"BLOCKED",hint:"막힌 런",value:String(x.counters.blocked),tone:x.counters.blocked?"bad":"idle",max:o})]}),(0,n.jsxs)("section",{className:"space-y-2","aria-label":"런",children:[(0,n.jsxs)("h2",{className:"text-sm font-medium",children:["런 ",(0,n.jsxs)("span",{className:"text-xs text-muted-foreground",children:["최근 ",x.windowMinutes,"분 \xb7 ",x.runs.length]})]}),0===x.runs.length?(0,n.jsx)("p",{className:"rounded-md border border-dashed p-4 text-sm text-muted-foreground","data-live-empty":!0,children:"지금 이 창에 런 신호가 없습니다 — 텔레그램이나 Intake 로 한 줄 보내면 여기에 런이 뜹니다."}):(0,n.jsx)("ul",{className:"space-y-1.5",children:x.runs.slice(0,12).map(e=>(0,n.jsx)(j,{run:e,round:t.rounds[e.runId],max:o,selected:e.runId===l,onSelect:s,owner:d},e.runId))})]}),(0,n.jsxs)("div",{className:"grid gap-4 lg:grid-cols-5",children:[(0,n.jsxs)("section",{className:"space-y-2 lg:col-span-3","aria-label":"판단 스트림",children:[(0,n.jsxs)("h2",{className:"flex flex-wrap items-center gap-2 text-sm font-medium",children:["판단 스트림",u.jg.map(e=>(0,n.jsx)("span",{className:(0,p.cn)("text-[11px] lg:text-[10px] font-mono",g[e]),children:e},e))]}),0===t.stream.length?(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:"이 창에 판단 신호가 없습니다."}):(0,n.jsx)("ul",{className:"max-h-80 space-y-1 overflow-auto rounded-md border p-2 font-mono text-[11px]","data-live-stream":!0,children:t.stream.slice(0,40).map((e,t)=>(0,n.jsxs)("li",{className:(0,p.cn)("leading-relaxed",o&&0===t&&"live-line-in",o&&"SHIP"===e.kind&&"live-ship"),children:[(0,n.jsxs)("span",{className:"text-muted-foreground",children:[(0,n.jsx)("span",{title:e.ts,children:(0,u.qo)(e.ts)})," "]}),(0,n.jsxs)("span",{className:g[e.kind],children:["[",e.kind,"]"]})," ",d?e.what:(0,u.hS)(e.what.replace(/run-[0-9a-f]{8}-[^\s]*/gi,""),i),e.why&&(0,n.jsxs)("span",{className:"text-muted-foreground",children:[" \xb7 왜: ",(0,u.hS)(e.why,i)]}),e.purpose&&(0,n.jsxs)("span",{className:"text-muted-foreground",children:[" \xb7 목적: ",e.purpose]}),e.target&&(0,n.jsxs)("span",{className:"text-muted-foreground",children:[" → ",e.target]})]},"".concat(e.ts,"-").concat(t)))})]}),(0,n.jsxs)("section",{className:"space-y-2 lg:col-span-2","aria-label":"성적표",children:[(0,n.jsx)("h2",{className:"text-sm font-medium",children:"모델 성적표"}),0===t.scorecard.length?(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:"이 창에 모델 요청이 없습니다."}):(0,n.jsxs)("table",{className:"w-full text-[11px]",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{className:"text-muted-foreground",children:[(0,n.jsx)("th",{className:"text-left font-normal",children:"모델"}),(0,n.jsx)("th",{className:"text-right font-normal",children:"요청"}),(0,n.jsx)("th",{className:"text-right font-normal",children:"토큰"}),(0,n.jsx)("th",{className:"text-right font-normal",children:"과금"})]})}),(0,n.jsx)("tbody",{children:t.scorecard.slice(0,8).map(e=>{var t;return(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"truncate",children:e.model}),(0,n.jsx)("td",{className:"text-right tabular-nums",children:e.requests}),(0,n.jsx)("td",{className:"text-right tabular-nums",children:v(e.tokens)}),(0,n.jsx)("td",{className:"text-right text-muted-foreground",children:null!=(t=e.billing)?t:"—"})]},e.model)})})]}),(0,n.jsx)("h2",{className:"pt-2 text-sm font-medium",children:"리뷰 판정"}),(0,n.jsx)(N,{items:x.reviewVerdicts,max:o})]})]}),(0,n.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[d?(0,n.jsxs)("section",{className:"space-y-2","aria-label":"흐르는 로그",children:[(0,n.jsx)("h2",{className:"text-sm font-medium",children:"흐르는 로그"}),(0,n.jsx)("pre",{className:"max-h-60 overflow-auto rounded-md border bg-muted/30 p-2 text-[11px] leading-relaxed","data-live-log":!0,children:a.slice(0,60).join("\n")||"—"})]}):m>0?(0,n.jsxs)("p",{className:"text-xs text-muted-foreground","data-live-folded-errors":!0,children:["오류 ",m,"건 접힘"]}):null,(0,n.jsxs)("section",{className:"space-y-2","aria-label":"빈 칸 표",children:[(0,n.jsxs)("h2",{className:"text-sm font-medium",children:["빈 칸 표 ",(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:"판단 로그에 없는 칸"})]}),0===t.missing.length?(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:"빈 칸 없음."}):(0,n.jsx)("table",{className:"w-full text-[11px]","data-live-missing":!0,children:(0,n.jsx)("tbody",{children:t.missing.slice(0,10).map(e=>(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"font-mono",children:e.key}),(0,n.jsx)("td",{className:"text-right tabular-nums",children:e.count}),(0,n.jsx)("td",{className:"pl-2 text-muted-foreground",children:e.lacks.join(" \xb7 ")})]},e.key))})})]})]})]})}function v(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(e>=1e5?0:1),"k"):String(e)}function b(e){let{label:t,hint:a,value:r,tone:s="idle",max:l}=e;return(0,n.jsxs)("div",{className:(0,p.cn)("rounded-lg border p-3","live"===s&&"border-primary/50","bad"===s&&"border-error/50","ok"===s&&"border-green-600/40",l&&"live-gauge",l&&"live"===s&&"live-glow"),children:[(0,n.jsx)("div",{className:"font-mono text-[11px] lg:text-[10px] tracking-wider text-muted-foreground",children:t}),(0,n.jsx)("div",{className:(0,p.cn)("text-2xl font-semibold tabular-nums",l&&"live-count"),"data-live-gauge":t,children:r}),(0,n.jsx)("div",{className:"text-[11px] lg:text-[10px] text-muted-foreground",children:a})]})}function j(e){let{run:t,round:a,max:r,selected:s,onSelect:l,owner:i}=e;return(0,n.jsx)("li",{children:(0,n.jsxs)("button",{type:"button","data-live-run":t.runId,onClick:()=>null==l?void 0:l(t.runId),className:(0,p.cn)("flex w-full items-center gap-3 rounded-md border px-3 py-2 text-left text-xs hover:bg-muted/40",s&&"ring-1 ring-primary"),children:[(0,n.jsx)("span",{className:"w-24 shrink-0 truncate font-mono text-[11px] text-muted-foreground",children:i?t.runId.replace(/^run-/,"").slice(0,8):"런"}),(0,n.jsx)("span",{className:"flex flex-1 gap-1","aria-label":"단계",children:u.lV.map(e=>{let a=t.stages[e],s=t.current===e;return(0,n.jsx)("span",{title:"".concat(u.fQ[e]," \xb7 ").concat(null!=a?a:"신호 없음"),"data-stage":e,"data-tone":null!=a?a:"none",className:(0,p.cn)("h-2 flex-1 rounded-full bg-muted","info"===a&&"bg-primary/60","ok"===a&&"bg-green-600","bad"===a&&"bg-error",r&&s&&"bad"!==a&&"live-pulse",r&&s&&"bad"===a&&"live-pulse-bad")},e)})}),(0,n.jsx)("span",{className:"w-14 shrink-0 text-right font-mono text-[11px] lg:text-[10px] text-muted-foreground",children:a?"R ".concat(a,"/3"):""}),(0,n.jsx)("span",{className:"w-24 shrink-0 text-right text-[11px]",children:t.blocked?(0,n.jsx)("span",{className:"text-error",children:"막힘"}):"ok"===t.stages.land?(0,n.jsxs)("span",{className:"text-green-700",children:["착지",t.pr?" #".concat(t.pr):""]}):t.current?u.fQ[t.current]:""})]})})}function N(e){let{items:t,max:a}=e,r=Math.max(1,...t.map(e=>e.count));return 0===t.length?(0,n.jsx)("div",{className:"text-[11px] text-muted-foreground",children:"—"}):(0,n.jsx)("ul",{className:"space-y-1",children:t.slice(0,6).map(e=>(0,n.jsxs)("li",{className:"flex items-center gap-2 text-[11px]",children:[(0,n.jsx)("span",{className:"w-24 shrink-0 truncate",children:e.name}),(0,n.jsx)("span",{className:"h-1.5 flex-1 rounded-full bg-muted",children:(0,n.jsx)("span",{className:(0,p.cn)("block h-1.5 rounded-full bg-primary/70",a&&"transition-[width] duration-700"),style:{width:"".concat(e.count/r*100,"%")}})}),(0,n.jsx)("span",{className:"w-8 text-right tabular-nums",children:e.count})]},e.name))})}var w=a(20486),y=a(33330);let k=[15,60,360,1440],S="@active";function E(){return(0,d.Qj)()?(0,n.jsx)(M,{}):(0,n.jsxs)("div",{className:"mx-auto max-w-2xl space-y-2 p-6",children:[(0,n.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"Live"}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"Connect to a NEXUS daemon to watch runs live."})]})}function M(){var e,t,a,s,p,g;let v=(0,h.In)(),[b,j]=(0,r.useState)("practical"),[N,E]=(0,r.useState)(null),[M,C]=(0,r.useState)("all"),[L,R]=(0,r.useState)(!1);(0,r.useEffect)(()=>{try{window.localStorage.removeItem("elanous.live.mode")}catch(e){}},[]),(0,r.useEffect)(()=>{if(!N)return;let e=setTimeout(()=>{j("practical"),E(null)},Math.max(0,N-Date.now()));return()=>clearTimeout(e)},[N]);let H=(0,d.M1)(),[D,P]=(0,r.useState)(null),X=e=>{e.on?(j("max"),C(e.scope&&"all"!==e.scope?"run":"all"),E(e.until?Date.parse(e.until):Date.now()+18e5)):(j("practical"),E(null))};(0,r.useEffect)(()=>{let e=!0;return H.getLiveDetail().then(t=>{e&&X(t)}).catch(()=>{}),()=>{e=!1}},[H]);let q=e=>{R(!1),P(null);let t="run"===e&&z?z:"all";H.setLiveDetail({scope:t,ttlMin:30,by:"pwa-live"}).then(X).catch(e=>P(e instanceof Error?e.message:String(e)))},[O,U]=(0,r.useState)(60),[_,B]=(0,r.useState)(""),T=(0,r.useRef)(!1);(0,r.useEffect)(()=>{"max"!==b||T.current||(T.current=!0,B(S),U(1440)),"max"!==b&&(T.current=!1)},[b]);let[z,F]=(0,r.useState)(null),{logs:W,runs:K,instances:V}=(0,c.HI)({store:_||void 0,windowMinutes:O}),[Y,Q]=(0,r.useState)(()=>Date.now());(0,r.useEffect)(()=>{Q(Date.now())},[W.dataUpdatedAt]);let[Z,G]=(0,r.useState)(!1);(0,r.useEffect)(()=>{"public"===new URLSearchParams(window.location.search).get("capture")&&G(!0)},[]);let $=null!=(s=null==(e=W.data)?void 0:e.logs)?s:I,J=(0,r.useMemo)(()=>Z?(0,m.yR)($):$,[$,Z]),ee=(0,l.I)({queryKey:["live","shipped",O],queryFn:()=>H.getLiveShipped("".concat(O,"m")),refetchInterval:6e4}),et=(0,r.useMemo)(()=>{var e,t,a;let n=(0,u.Hc)(J,null!=(a=null==(e=K.data)?void 0:e.entries)?a:[],{now:Y,windowMinutes:O}),r=null==(t=ee.data)?void 0:t.merged;if("number"!=typeof r)return n;let s=(0,x.NZ)(J).length;return{...n,gauges:{...n.gauges,shipped:r,selfHealRuns:s,selfHealRate:r>0?Math.round(s/r*100):null}}},[J,K.data,Y,O,ee.data]),ea=O>0?Math.round(J.length/O*10)/10:0,en=Math.round(JSON.stringify(J).length/1024),er=(0,r.useMemo)(()=>J.filter(e=>{var t;return!z||(null==(t=e.data)?void 0:t.runId)===z}).map(e=>(0,u.BP)(e)),[J,z]),es=(null!=(p=null==(t=V.data)?void 0:t.instances)?p:[]).filter(e=>!1!==e.dbExists&&!e.current);return(0,n.jsxs)("div",{className:"mx-auto ".concat("max"===b?"max-w-none space-y-2 p-2":"max-w-6xl space-y-4 p-4 sm:p-6"),children:[(0,n.jsx)("style",{children:A}),(0,n.jsxs)("header",{className:"flex flex-wrap items-center gap-3 ".concat("max"===b?"justify-end":"justify-between"),children:[(0,n.jsxs)("div",{className:"max"===b?"hidden":"",children:[(0,n.jsxs)("h1",{className:"flex items-center gap-2 text-xl font-semibold tracking-tight",children:[(0,n.jsx)(i.A,{className:"h-5 w-5","aria-hidden":!0})," Live"]}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"하니스 런이 판단하고 기획하는 신호 — 보이는 수는 전부 진짜다."})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(0,n.jsx)("select",{"aria-label":"시간 창",value:O,onChange:e=>U(Number(e.target.value)),className:"rounded-md border bg-background px-2 py-1",children:k.map(e=>(0,n.jsx)("option",{value:e,children:e<60?"".concat(e,"분"):"".concat(e/60,"시간")},e))}),(0,n.jsxs)("select",{"aria-label":"신호 출처",value:_,onChange:e=>B(e.target.value),className:"max-w-48 rounded-md border bg-background px-2 py-1",children:[(0,n.jsx)("option",{value:"",children:"이 인스턴스"}),(0,n.jsx)("option",{value:S,children:"전체(연합 \xb7 최근 24시간에 쓰인 우주)"}),es.map(e=>(0,n.jsx)("option",{value:e.name,children:e.name},e.name))]}),(0,n.jsx)("button",{type:"button","data-elanous-action":"live-public-capture","aria-pressed":Z,onClick:()=>G(e=>!e),title:"녹화\xb7스크린샷용 — 계정 이름 → account-N \xb7 크레딧\xb7USD 숨김 \xb7 홈 경로 가림",className:"rounded-md border px-2 py-1 ".concat(Z?"border-emerald-500 text-emerald-600 dark:text-emerald-300":"hover:bg-muted"),children:Z?"● 공개 캡처 켜짐":"공개 캡처"}),"max"===b?(0,n.jsxs)("button",{type:"button","data-elanous-action":"live-max-off",onClick:()=>{P(null),H.setLiveDetail({scope:"all",ttlMin:0,by:"pwa-live"}).then(X).catch(e=>P(e instanceof Error?e.message:String(e))),j("practical"),E(null)},className:"inline-flex items-center gap-1 rounded-md border border-primary px-2 py-1 text-primary hover:bg-muted",children:[(0,n.jsx)(o.A,{className:"h-3.5 w-3.5","aria-hidden":!0})," 화려함 MAX 켜짐 \xb7 끄기"]}):(0,n.jsxs)("button",{type:"button","data-elanous-action":"live-max-on",onClick:()=>R(!0),className:"inline-flex items-center gap-1 rounded-md border px-2 py-1 hover:bg-muted",children:[(0,n.jsx)(o.A,{className:"h-3.5 w-3.5","aria-hidden":!0})," 화려함 MAX"]})]})]}),L&&(0,n.jsxs)("div",{role:"dialog","aria-label":"화려함 MAX 켜기",className:"space-y-2 rounded-md border border-primary/50 bg-primary/5 p-3 text-sm","data-live-max-confirm":!0,children:[(0,n.jsx)("p",{className:"font-medium",children:"화려함 MAX 를 켤까요?"}),(0,n.jsxs)("p",{className:"text-xs text-muted-foreground",children:["마케팅(시연\xb7녹화)과 상세 런 디버깅용입니다. 켜면 하니스가 판단마다 \xab왜\xb7목적\xb7보낸 곳\xbb을 추가로 기록합니다(부하가 듭니다) — 30분 뒤 자동으로 꺼지고, 다른 기기에서도 같은 상태로 보입니다. 지금 이 화면이 받는 신호: 분당 ",ea,"건 \xb7 응답 약 ",en,"KB."]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs",children:[(0,n.jsx)("button",{type:"button","data-elanous-action":"live-max-all",onClick:()=>q("all"),className:"rounded-md border px-2 py-1 hover:bg-muted",children:"전체로 켜기"}),(0,n.jsx)("button",{type:"button","data-elanous-action":"live-max-run",disabled:!z,onClick:()=>q("run"),className:"rounded-md border px-2 py-1 hover:bg-muted disabled:opacity-50",children:z?"이 런만 켜기":"이 런만 켜기(먼저 런을 고르세요)"}),(0,n.jsx)("button",{type:"button",onClick:()=>R(!1),className:"rounded-md px-2 py-1 text-muted-foreground hover:bg-muted",children:"취소"})]})]}),D&&(0,n.jsxs)("p",{className:"rounded-md bg-error/10 p-2 text-xs text-error",children:["MAX 스위치를 못 바꿨다: ",D]}),"max"===b&&(0,n.jsxs)("p",{className:"rounded-md border border-primary/40 px-3 py-1 text-[11px] lg:text-[10px] text-muted-foreground","data-live-cost-badge":!0,children:["화려함 MAX \xb7 범위 ","run"===M&&z?"런 ".concat(z.replace(/^run-/,"").slice(0,8)):"전체"," \xb7 받는 신호 분당 ",ea,"건 \xb7 응답 약 ",en,"KB",N?" \xb7 ".concat(Math.max(0,Math.round((N-Y)/6e4)),"분 뒤 자동 꺼짐"):""," \xb7 하니스 판단 이벤트 ",et.emitted,"건"]}),W.error?(0,n.jsxs)("p",{className:"rounded-md bg-error/10 p-3 text-sm text-error",children:["신호를 못 읽었다: ",W.error instanceof Error?W.error.message:String(W.error)]}):null,z&&(0,n.jsx)(y.RT,{runId:z,run:null!=(g=et.snapshot.runs.find(e=>e.runId===z))?g:null,lines:er,onClose:()=>F(null)}),"max"===b?(0,n.jsx)(w.xl,{board:et,rows:J,windowMinutes:O,sourceLabel:_===S?"federated":_||"this instance",shippedSource:"number"==typeof(null==(a=ee.data)?void 0:a.merged)?"github":"log",publicCapture:Z,role:v,onSelectRun:e=>F(t=>t===e?null:e)}):(0,n.jsx)(f,{board:et,lines:er,mode:b,role:v,selectedRunId:z,onSelectRun:e=>F(t=>t===e?null:e)}),(0,n.jsxs)("p",{className:"text-[11px] text-muted-foreground ".concat("max"===b?"hidden":""),children:["갱신 5초 \xb7 출처 ",(0,n.jsx)("code",{children:"/v1/logs"})," \xb7 ",(0,n.jsx)("code",{children:"/v1/harness/runs"})," \xb7 비밀처럼 보이는 조각은 가린다."]})]})}let I=[],A="\n@keyframes live-pulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(99,102,241,0) } 50% { opacity: .55; box-shadow: 0 0 10px 2px rgba(99,102,241,.55) } }\n@keyframes live-pulse-bad { 0%,100% { opacity: 1 } 50% { opacity: .4; box-shadow: 0 0 10px 2px rgba(239,68,68,.6) } }\n@keyframes live-glow { 0%,100% { box-shadow: 0 0 0 0 rgba(99,102,241,0) } 50% { box-shadow: 0 0 18px 2px rgba(99,102,241,.35) } }\n@keyframes live-line-in { from { transform: translateY(-6px); opacity: 0 } to { transform: none; opacity: 1 } }\n@keyframes live-ship { 0% { background: rgba(34,197,94,.35) } 100% { background: transparent } }\n.live-max .live-pulse { animation: live-pulse 1.4s ease-in-out infinite }\n.live-max .live-pulse-bad { animation: live-pulse-bad 1s ease-in-out infinite }\n.live-max .live-glow { animation: live-glow 2.4s ease-in-out infinite }\n.live-max .live-line-in { animation: live-line-in .45s ease-out }\n.live-max .live-ship { animation: live-ship 2.4s ease-out; font-size: 12px }\n.live-max .live-gauge { background: radial-gradient(120% 120% at 0% 0%, rgba(99,102,241,.10), transparent 60%) }\n.live-max .live-count { text-shadow: 0 0 12px rgba(99,102,241,.45) }\n.live-stage { background: radial-gradient(120% 90% at 50% 0%, rgba(79,70,229,.25), rgba(2,6,23,.98) 60%), #020617; box-shadow: inset 0 0 0 1px rgba(99,102,241,.25) }\n.live-stage .live-line-in { animation: live-line-in .45s ease-out }\n@keyframes live-v5-marquee { from { transform: translateX(0) } to { transform: translateX(-50%) } }\n@keyframes live-v5-blink { 0%,100% { opacity: 1 } 50% { opacity: .45 } }\n@keyframes live-v5-hot { 0%,100% { box-shadow: 0 0 14px #a78bfa55, inset 0 0 14px #a78bfa22 } 50% { box-shadow: 0 0 26px #a78bfa99, inset 0 0 22px #a78bfa44 } }\n.live-v5-marquee { animation: live-v5-marquee linear infinite }\n.live-v5-blink { animation: live-v5-blink 1.6s ease-in-out infinite }\n.live-v5-hot { animation: live-v5-hot 1.8s ease-in-out infinite }\n@media (prefers-reduced-motion: reduce) { .live-max *, .live-v5 * { animation: none !important; transition: none !important } }\n";var C=a(85359);function L(){let e=(0,s.useSearchParams)().get("run");return e?(0,n.jsx)(C.Yd,{runId:e}):(0,n.jsx)(E,{})}function R(){return(0,n.jsx)(r.Suspense,{fallback:(0,n.jsx)("p",{className:"p-4 text-sm text-text-tertiary",children:"라이브를 여는 중…"}),children:(0,n.jsx)(L,{})})}},81755:(e,t,a)=>{"use strict";a.d(t,{GC:()=>r,In:()=>d,OG:()=>i});var n=a(48082);let r="elanous.pwa.role",s="elanous:pwa-role";function l(){try{let e=window.localStorage.getItem(r);if("owner"===e||"contributor"===e||"general"===e)return e}catch(e){}return"general"}function i(e){try{window.localStorage.setItem(r,e)}catch(e){}"function"==typeof window.dispatchEvent&&window.dispatchEvent(new Event(s))}function o(e){if("function"!=typeof window.addEventListener)return()=>{};window.addEventListener(s,e);let t=t=>{(t.key===r||null===t.key)&&e()};return window.addEventListener("storage",t),()=>{window.removeEventListener(s,e),window.removeEventListener("storage",t)}}function d(){return(0,n.useSyncExternalStore)(o,l,()=>"general")}},89570:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var n=a(48082);let r=function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.filter((e,t,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===t).join(" ").trim()},s=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,a)=>a?a.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,n.createContext)({}),o=(0,n.forwardRef)((e,t)=>{var a,s,o;let{color:d,size:c,strokeWidth:u,absoluteStrokeWidth:x,className:m="",children:h,iconNode:p,...g}=e,{size:f=24,strokeWidth:v=2,absoluteStrokeWidth:b=!1,color:j="currentColor",className:N=""}=null!=(a=(0,n.useContext)(i))?a:{},w=(null!=x?x:b)?24*Number(null!=u?u:v)/Number(null!=c?c:f):null!=u?u:v;return(0,n.createElement)("svg",{ref:t,...l,width:null!=(s=null!=c?c:f)?s:l.width,height:null!=(o=null!=c?c:f)?o:l.height,stroke:null!=d?d:j,strokeWidth:w,className:r("lucide",N,m),...!h&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(g)&&{"aria-hidden":"true"},...g},[...p.map(e=>{let[t,a]=e;return(0,n.createElement)(t,a)}),...Array.isArray(h)?h:[h]])}),d=(e,t)=>{let a=(0,n.forwardRef)((a,l)=>{let{className:i,...d}=a;return(0,n.createElement)(o,{ref:l,iconNode:t,className:r("lucide-".concat(s(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),i),...d})});return a.displayName=s(e),a}}},e=>{e.O(0,[8997,7571,3727,1695,5616,1596,4055,3603,8073,3985,5359,7988,4306,3702,7358],()=>e(e.s=17337)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[125],{58497:(e,t,l)=>{Promise.resolve().then(l.bind(l,76559))},76559:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>b});var s=l(17594),r=l(48082),a=l(96545),n=l(74055),c=l(46982),i=l(268),o=l(52191),d=l(85359);let x="__auto_follow_latest__";function u(){return(0,c.Qj)()?(0,s.jsx)(m,{}):(0,s.jsxs)("div",{className:"mx-auto max-w-2xl space-y-2 p-6",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"런 장면"}),(0,s.jsx)("p",{className:"text-sm text-text-secondary",children:"데몬에 연결되면 최근 하니스 런을 자동으로 따라갑니다."})]})}function m(){let e=(0,c.M1)(),t=(0,a.useRouter)(),l=(0,a.useSearchParams)(),u=(0,r.useMemo)(()=>Date.now()-864e5,[]),m=(0,n.I)({queryKey:["harness-runs-since",u],queryFn:()=>e.getHarnessRunsSince(u,{includeLanded:!1}),refetchInterval:3e4}),h=(0,r.useMemo)(()=>{var e,t;return m.data?(0,i.wk)(null!=(e=m.data.entries)?e:[],null!=(t=m.data.finished)?t:[]):[]},[m.data]),p=(0,i.ov)(h);return(0,s.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-4",children:[(0,s.jsxs)("header",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("h1",{className:"text-base font-semibold text-text-primary",children:"런 장면"}),(0,s.jsx)("span",{className:"text-xs text-text-tertiary",children:"최신 세션 런을 자동으로 따라갑니다 (라이브 \xb7 리플레이)"}),(0,s.jsxs)("label",{className:"flex w-full min-w-0 items-center gap-1 text-xs text-text-secondary sm:ml-auto sm:w-auto sm:min-w-[320px]",children:[(0,s.jsx)("span",{className:"shrink-0",children:"런"}),(0,s.jsxs)("select",{"aria-label":"런 고르기",value:x,onChange:e=>{let l;e.target.value&&e.target.value!==x&&(l=e.target.value,t.replace("/live-run/?run=".concat(encodeURIComponent(l))))},className:"min-w-0 flex-1 rounded border border-border bg-background px-2 py-1 text-xs text-text-primary",children:[(0,s.jsx)("option",{value:x,children:m.isLoading?"불러오는 중…":"최신 런 자동 따라가기"}),h.some(e=>e.live)&&(0,s.jsx)("optgroup",{label:"도는 중",children:h.filter(e=>e.live).map(e=>(0,s.jsxs)("option",{value:e.runId,children:["● ",e.label]},e.runId))}),h.some(e=>!e.live)&&(0,s.jsx)("optgroup",{label:"끝난 런 (최근 24시간)",children:h.filter(e=>!e.live).map(e=>(0,s.jsxs)("option",{value:e.runId,children:[e.at?"".concat((0,o.Xf)(e.at).slice(0,5)," \xb7 "):"",e.label]},e.runId))})]})]})]}),m.isError&&(0,s.jsx)("p",{role:"status",className:"text-xs text-warning",children:"런 목록을 읽지 못했습니다."}),p?(0,s.jsx)(d.Yd,{runId:p,initialFolded:"folded"===l.get("units")},p):(0,s.jsx)("p",{role:"status",className:"rounded-lg border border-border bg-surface p-4 text-sm text-text-secondary",children:m.isLoading?"최근 런 목록을 불러오는 중입니다.":"최근 24시간 런이 없습니다."})]})}function h(){return(0,c.Qj)()?(0,s.jsx)(p,{}):(0,s.jsxs)("div",{className:"mx-auto max-w-2xl space-y-2 p-6",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"런 장면"}),(0,s.jsx)("p",{className:"text-sm text-text-secondary",children:"데몬에 연결되면 하니스 런 하나가 도는 장면을 그립니다."})]})}function p(){var e;let t=(0,c.M1)(),l=(0,a.useRouter)(),x=(0,a.useSearchParams)(),u=(null==(e=x.get("run"))?void 0:e.trim())||null,[m,h]=(0,r.useState)(!1),p="1"===x.get("stage")&&!!u,b=(0,r.useMemo)(()=>Date.now()-864e5,[]),f=(0,n.I)({queryKey:["harness-runs-since",b],queryFn:()=>t.getHarnessRunsSince(b,{includeLanded:!1}),enabled:!u||m,refetchInterval:3e4}),g=(0,r.useMemo)(()=>{var e,t;return f.data?(0,i.wk)(null!=(e=f.data.entries)?e:[],null!=(t=f.data.finished)?t:[]):[]},[f.data]),v=e=>l.replace("/live-run/?run=".concat(encodeURIComponent(e)));return(0,s.jsxs)("div",{className:p?"fixed inset-0 z-[100] flex min-h-0 flex-col overflow-hidden bg-[#070b18] p-3 text-white sm:p-5":"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-4",children:[(0,s.jsxs)("header",{className:"flex flex-wrap items-center gap-2 ".concat(p?"mb-2 border-b border-white/10 pb-2":""),children:[(0,s.jsx)("h1",{className:"font-semibold ".concat(p?"text-lg tracking-[0.18em] text-cyan-100 sm:text-xl":"text-base text-text-primary"),children:p?"ELANOUS \xb7 LIVE GRAPH":"런 장면"}),(0,s.jsx)("span",{className:"text-xs ".concat(p?"text-white/55":"text-text-tertiary"),children:p?"DEMO1104 \xb7 GRAPH SHOWSTOPPER":"하니스 런 하나가 실제로 밟은 노드\xb7간선 (라이브 \xb7 리플레이)"}),!p&&(0,s.jsxs)("label",{className:"flex w-full min-w-0 items-center gap-1 text-xs text-text-secondary sm:ml-auto sm:w-auto sm:min-w-[320px]",children:[(0,s.jsx)("span",{className:"shrink-0",children:"런"}),(0,s.jsxs)("select",{"aria-label":"런 고르기",value:null!=u?u:"",onChange:e=>{e.target.value&&v(e.target.value)},onFocus:()=>h(!0),onBlur:()=>h(!1),className:"min-w-0 flex-1 rounded border border-border bg-background px-2 py-1 text-xs text-text-primary",children:[(0,s.jsx)("option",{value:"",children:u?"현재 런 \xb7 목록 열기":f.isLoading?"불러오는 중…":g.length?"런을 고르세요":"최근 24시간 런 없음"}),u&&!g.some(e=>e.runId===u)&&(0,s.jsx)("option",{value:u,children:u}),g.some(e=>e.live)&&(0,s.jsx)("optgroup",{label:"도는 중",children:g.filter(e=>e.live).map(e=>(0,s.jsxs)("option",{value:e.runId,children:["● ",e.label]},e.runId))}),g.some(e=>!e.live)&&(0,s.jsx)("optgroup",{label:"끝난 런 (최근 24시간)",children:g.filter(e=>!e.live).map(e=>(0,s.jsxs)("option",{value:e.runId,children:[e.at?"".concat((0,o.Xf)(e.at).slice(0,5)," \xb7 "):"",e.label]},e.runId))})]})]}),u&&(0,s.jsx)("button",{type:"button",onClick:p?()=>{document.fullscreenElement&&document.exitFullscreen().catch(()=>void 0),l.replace("/live-run/?run=".concat(encodeURIComponent(null!=u?u:"")),{scroll:!1})}:()=>{if(!u)return;let e=document.documentElement.requestFullscreen;e&&e.call(document.documentElement).catch(()=>void 0),l.replace("/live-run/?run=".concat(encodeURIComponent(u),"&stage=1"),{scroll:!1})},className:"rounded-lg border px-3 py-1.5 text-xs font-semibold ".concat(p?"border-white/20 bg-white/10 text-white hover:bg-white/20":"ml-auto border-border text-text-primary hover:bg-surface-elevated"),children:p?"무대 모드 종료":"⛶ 무대 모드"})]}),f.isError&&(0,s.jsx)("p",{role:"status",className:"text-xs text-warning",children:"런 목록을 읽지 못했습니다 — 주소에 ?run=<runId> 를 주면 그 런은 그대로 그립니다."}),u?(0,s.jsx)(d.Yd,{runId:u,initialFolded:"folded"===x.get("units"),stageMode:p},u):(0,s.jsx)("ul",{className:"grid gap-2 sm:grid-cols-2",children:g.slice(0,12).map(e=>(0,s.jsx)("li",{children:(0,s.jsxs)("button",{type:"button",onClick:()=>v(e.runId),className:"w-full rounded-lg border border-border bg-surface p-3 text-left hover:bg-surface-elevated",children:[(0,s.jsx)("span",{className:"text-xs font-semibold ".concat(e.live?"text-amber-500":"text-text-tertiary"),children:e.live?"● 도는 중":"끝남 ".concat(e.at?(0,o.Xf)(e.at):"")}),(0,s.jsx)("span",{className:"mt-1 block truncate text-sm text-text-primary",children:e.label}),(0,s.jsx)("span",{className:"block font-mono text-[11px] text-text-tertiary",children:e.runId})]})},e.runId))})]})}function b(){return(0,s.jsx)(r.Suspense,{fallback:(0,s.jsx)("p",{className:"p-4 text-sm",children:"런 장면을 불러오는 중…"}),children:(0,s.jsx)(f,{})})}function f(){var e;let t=(0,a.useSearchParams)(),l=(0,a.useRouter)();if(!(null==(e=t.get("run"))?void 0:e.trim()))return(0,s.jsx)(u,{});let r="1"===t.get("stage");return(0,s.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[!r&&(0,s.jsx)("div",{className:"flex shrink-0 justify-end px-4 pt-2",children:(0,s.jsx)("button",{type:"button","aria-label":"최신 런 자동 따라가기",onClick:()=>l.replace("/live-run/"),className:"rounded border border-border bg-surface px-2 py-1 text-xs text-text-secondary hover:bg-surface-elevated",children:"최신 런 자동 따라가기"})}),(0,s.jsx)(h,{})]})}}},e=>{e.O(0,[8997,7571,3727,5616,4055,3603,8073,3985,5359,4306,3702,7358],()=>e(e.s=58497)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7398],{17206:(e,t,s)=>{Promise.resolve().then(s.bind(s,21898))},21898:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var a=s(17594),i=s(48082),r=s(96545);class n extends Error{constructor(e,t,s){super("mission-room ".concat(e," on ").concat(t)),this.status=e,this.path=t,this.body=s,this.name="MissionRoomApiError"}}var o=s(52655);function l(e){var t;let[s,r]=(0,i.useState)({loading:!0,error:null,state:null}),[n,l]=(0,i.useState)(""),[d,u]=(0,i.useState)(""),[m,p]=(0,i.useState)(!1),[x,h]=(0,i.useState)(null),[b,f]=(0,i.useState)(!1),y=(0,i.useRef)(!0);(0,i.useEffect)(()=>()=>{y.current=!1},[]);let g=(0,i.useCallback)(async()=>{r(e=>({...e,loading:!0,error:null}));try{let{state:t}=await e.api.spawn(e.missionId);if(!y.current)return;r({loading:!1,error:null,state:t})}catch(e){if(!y.current)return;r({loading:!1,error:c(e),state:null})}},[e.api,e.missionId]);(0,i.useEffect)(()=>{g()},[g]);let j=(0,i.useCallback)(async()=>{if(n.trim()&&!m){p(!0);try{let t=await e.api.deliberate(e.missionId,n.trim(),d.trim()||void 0);if(!y.current)return;r(e=>e.state?{...e,state:{...e.state,decisions:[...e.state.decisions,t]}}:e),l("")}catch(e){if(!y.current)return;r(t=>({...t,error:c(e)}))}finally{y.current&&p(!1)}}},[e.api,e.missionId,n,d,m]),N=(0,i.useCallback)(async t=>{if(t.trim()&&!x){h(t);try{let s=await e.api.decide(e.missionId,t);if(!y.current)return;r(e=>{if(!e.state)return e;let t=e.state.decisions.slice(),a=t.findIndex(e=>e.ts===s.ts);return a>=0&&(t[a]=s),{...e,state:{...e.state,decisions:t}}})}catch(e){if(!y.current)return;r(t=>({...t,error:c(e)}))}finally{y.current&&h(null)}}},[e.api,e.missionId,x]),v=(0,i.useCallback)(async()=>{if(!b){f(!0);try{var t;let s=await e.api.archive(e.missionId);if(!y.current)return;r(e=>({...e,state:s})),null==(t=e.onArchived)||t.call(e)}catch(e){if(!y.current)return;r(t=>({...t,error:c(e)}))}finally{y.current&&f(!1)}}},[e.api,e.missionId,b,e.onArchived]),w=(null==(t=s.state)?void 0:t.status)==="archived",S=(0,i.useMemo)(()=>s.state?[...s.state.decisions].sort((e,t)=>t.ts-e.ts):[],[s.state]);return s.loading&&!s.state?(0,a.jsx)("div",{className:"p-4 text-sm opacity-70",children:"Loading mission room…"}):(0,a.jsxs)("section",{className:"mission-room-panel flex flex-col gap-4 p-4","data-mission-id":e.missionId,children:[(0,a.jsxs)("header",{className:"flex items-baseline justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:e.missionTitle?"".concat(e.missionTitle," \xb7 deliberation"):"Mission Deliberation Room"}),s.state&&(0,a.jsxs)("p",{className:"text-xs opacity-70",children:["tag: ",(0,a.jsx)("code",{children:s.state.missionTag})," \xb7 status:"," ",(0,a.jsx)("span",{className:w?"text-amber-600":"text-emerald-600",children:s.state.status})," \xb7 ","decisions: ",s.state.decisions.length]})]}),!w&&s.state&&(0,a.jsx)("button",{type:"button",className:"text-xs underline opacity-70 hover:opacity-100",disabled:b,onClick:()=>void v(),children:b?"archiving…":"archive room"})]}),s.error&&(0,a.jsx)("div",{role:"alert",className:"rounded border border-rose-400/50 bg-rose-50 px-3 py-2 text-sm text-rose-900",children:s.error}),!w&&(0,a.jsxs)("form",{className:"flex flex-col gap-2 rounded border border-zinc-200 p-3",onSubmit:e=>{e.preventDefault(),j()},children:[(0,a.jsx)("label",{className:"text-xs uppercase tracking-wide opacity-70",children:"New deliberation"}),(0,a.jsx)("textarea",{className:"min-h-[80px] w-full rounded border border-zinc-300 bg-white p-2 text-sm",placeholder:"Describe the branch you're stuck on…",value:n,onChange:e=>l(e.target.value),disabled:m}),(0,a.jsx)("textarea",{className:"min-h-[40px] w-full rounded border border-zinc-200 bg-zinc-50 p-2 text-xs",placeholder:"Optional mission context (task list digest, etc.)",value:d,onChange:e=>u(e.target.value),disabled:m}),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)("button",{type:"submit",className:"rounded bg-zinc-900 px-3 py-1 text-sm text-white disabled:opacity-50",disabled:!n.trim()||m,children:m?"asking lanes…":"ask the lanes"})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[0===S.length&&(0,a.jsx)("p",{className:"text-sm opacity-70",children:"No deliberations yet."}),S.map(e=>(0,a.jsx)(o.l,{decision:e,onDecide:w?void 0:N,decidingChoice:x},e.ts))]})]})}function c(e){if(e instanceof n){let t="object"==typeof e.body&&e.body&&"detail"in e.body?e.body.detail:null;return 404===e.status?"Mission room not found.":409===e.status?t?"Conflict: ".concat(t):"Conflict — room may be archived or no open decision.":401===e.status?"Authentication required.":"Mission room error (".concat(e.status,").")}return e instanceof Error?e.message:String(e)}function d(){var e;let t=(0,r.useParams)(),s=decodeURIComponent(null!=(e=null==t?void 0:t.id)?e:""),o=(0,i.useMemo)(()=>(function(e){var t;let s=e.baseUrl.replace(/\/+$/,""),a=null!=(t=e.fetchImpl)?t:fetch,i=e.authHeader;async function r(e,t){let r={"content-type":"application/json"};i&&(r.authorization=i),(null==t?void 0:t.headers)&&Object.assign(r,t.headers);let o=await a("".concat(s).concat(e),{...t,headers:r}),l=await o.json().catch(()=>null);if(!o.ok)throw new n(o.status,e,l);return l}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"/v1/missions/".concat(encodeURIComponent(e),"/showroom").concat(t)}return{spawn:async e=>await r(o(e)),deliberate:async(e,t,s)=>(await r(o(e,"/deliberate"),{method:"POST",body:JSON.stringify({question:t,...void 0!==s?{missionContext:s}:{}})})).decision,decide:async(e,t)=>(await r(o(e,"/decision"),{method:"POST",body:JSON.stringify({chosen:t})})).decision,archive:async e=>(await r(o(e,"/archive"),{method:"POST"})).state}})({baseUrl:window.location.origin}),[]);return s?(0,a.jsx)(l,{missionId:s,api:o}):(0,a.jsx)("div",{className:"p-4 text-sm",children:"Mission id missing in URL."})}},52655:(e,t,s)=>{"use strict";s.d(t,{l:()=>r});var a=s(17594),i=s(48082);function r(e){let[t,s]=(0,i.useState)("");if("onChoose"in e){let{decision:t,onChoose:s,busy:i}=e;return(0,a.jsxs)("article",{className:"rounded border border-border bg-card p-3","data-decision-card":t.id,children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:t.title}),(0,a.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-sm text-muted-foreground",children:t.situation}),(0,a.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:t.options.map(e=>(0,a.jsxs)("button",{type:"button",disabled:i,onClick:()=>s(e),className:"rounded-md border border-border px-2 py-1 text-sm hover:bg-muted disabled:opacity-50",children:[e.label,"option"in t.recommendation&&t.recommendation.option===e.id&&(0,a.jsx)("span",{className:"ml-1 text-primary",children:"추천"})]},e.id))})]})}let{decision:r,onDecide:n,decidingChoice:o}=e,l=r.resolution.status,c="decided"===r.resolution.status?r.resolution.chosen:null;return(0,a.jsxs)("article",{className:"rounded border border-zinc-200 bg-white p-3",children:[(0,a.jsxs)("header",{className:"flex items-baseline justify-between gap-2",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:r.question}),(0,a.jsx)("time",{className:"shrink-0 text-xs opacity-60",dateTime:new Date(r.ts).toISOString(),children:new Date(r.ts).toLocaleString()})]}),(0,a.jsx)("ul",{className:"mt-2 flex flex-col gap-2",children:r.opinions.map((e,t)=>(0,a.jsxs)("li",{className:"rounded bg-zinc-50 p-2 text-xs",children:[(0,a.jsxs)("div",{className:"font-medium",children:[e.role,e.modelId?(0,a.jsxs)("span",{className:"opacity-60",children:[" \xb7 ",e.modelId]}):null]}),(0,a.jsx)("pre",{className:"mt-1 whitespace-pre-wrap text-xs leading-snug",children:e.text})]},"".concat(e.role,"-").concat(t)))}),(0,a.jsxs)("footer",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,a.jsxs)("span",{className:"text-xs opacity-70",children:["resolution:"," ","decided"===l?(0,a.jsxs)("span",{className:"font-medium text-emerald-700",children:["decided → ",c]}):(0,a.jsx)("span",{className:"text-amber-700",children:"open"})]}),n&&"open"===l&&(0,a.jsxs)("form",{className:"flex items-center gap-1",onSubmit:e=>{e.preventDefault(),t.trim()&&n(t.trim())},children:[(0,a.jsx)("input",{className:"w-32 rounded border border-zinc-300 px-2 py-0.5 text-xs",placeholder:"chosen…",value:t,onChange:e=>s(e.target.value),disabled:null!==o}),(0,a.jsx)("button",{type:"submit",className:"rounded bg-emerald-700 px-2 py-0.5 text-xs text-white disabled:opacity-50",disabled:!t.trim()||null!==o,children:o===t?"…":"apply"})]})]})]})}},96545:(e,t,s)=>{"use strict";var a=s(42701);s.o(a,"useParams")&&s.d(t,{useParams:function(){return a.useParams}}),s.o(a,"usePathname")&&s.d(t,{usePathname:function(){return a.usePathname}}),s.o(a,"useRouter")&&s.d(t,{useRouter:function(){return a.useRouter}}),s.o(a,"useSearchParams")&&s.d(t,{useSearchParams:function(){return a.useSearchParams}})}},e=>{e.O(0,[4306,3702,7358],()=>e(e.s=17206)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6997],{15249:(e,t,s)=>{"use strict";s.d(t,{Zr:()=>l,f6:()=>r,oD:()=>a});let n="elanous.daemon.sessionId";function r(){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 a(){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 t=r();return localStorage.setItem(n,t),t}function l(){let e=r();return localStorage.setItem(n,e),e}},15920:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});let n=(0,s(89570).A)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]])},24169:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});let n=(0,s(89570).A)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},34441:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});let n=(0,s(89570).A)("messages-square",[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]])},50961:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x});var n=s(17594),r=s(48082),a=s(41647);let l={live:"live",unknown:"unknown",inactive:"inactive"},i={running:"running","probable-running":"probably running","ended-unclosed":"ended, not closed",unknown:"run state unknown"};function o(e){let{label:t,present:s}=e;return(0,n.jsxs)("span",{className:"rounded-full px-2 py-0.5 text-[10px] ".concat(s?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"),children:[t,": ",s?"present":"absent"]})}function d(e){var t,s,l;let{ptyIds:i,onRefresh:o}=e,[d,c]=(0,r.useState)(null!=(t=i[0])?t:""),[u,m]=(0,r.useState)({kind:"loading",ptyId:null!=(s=i[0])?s:""}),[p,x]=(0,r.useState)(0),[h,f]=(0,r.useState)({kind:"idle"}),g=(0,r.useRef)(null),b=i.includes(d)?d:null!=(l=i[0])?l:"",k=u.ptyId===b?u:{kind:"loading",ptyId:b},v="pending"===h.kind,j="idle"===h.kind||h.ptyId===b?h:{kind:"idle"},y="pending"===j.kind;return(0,r.useEffect)(()=>{c(e=>{var t;return i.includes(e)?e:null!=(t=i[0])?t:""})},[i]),(0,r.useEffect)(()=>{if(!b)return;let e=new AbortController;return m({kind:"loading",ptyId:b}),fetch((0,a.xV)(b),{signal:e.signal}).then(async t=>{if(!t.ok)throw Error("GET ".concat((0,a.xV)(b)," failed (").concat(t.status,")"));let s=await t.json();if("string"!=typeof s.frame)throw Error("Terminal frame response did not contain text.");e.signal.aborted||m({kind:"success",ptyId:b,frame:s.frame})}).catch(t=>{e.signal.aborted||m({kind:"error",ptyId:b,message:t instanceof Error?t.message:"Terminal frame request failed."})}),()=>e.abort()},[b,p]),(0,r.useEffect)(()=>(f(e=>"pending"===e.kind&&e.ptyId!==b?{kind:"idle"}:e),()=>{var e;null==(e=g.current)||e.abort(),g.current=null}),[b]),(0,n.jsxs)("div",{className:"space-y-2 rounded-md bg-surface-elevated p-3","data-testid":"terminal-frame-panel",children:[i.length>1&&(0,n.jsxs)("label",{className:"flex w-fit items-center gap-2 text-xs",children:["PTY",(0,n.jsx)("select",{value:b,onChange:e=>c(e.target.value),"aria-label":"Select terminal PTY",disabled:v,children:i.map(e=>(0,n.jsx)("option",{value:e,children:e},e))})]}),b&&(0,n.jsxs)("div",{className:"space-y-1","data-testid":"terminal-takeover",children:[(0,n.jsx)("button",{type:"button",className:"text-xs underline","aria-label":"Take over PTY ownership","data-testid":"terminal-takeover-button",disabled:y,onClick:()=>{var e;if(!b||v)return;null==(e=g.current)||e.abort();let t=new AbortController;g.current=t,f({kind:"pending",ptyId:b}),(0,a.HS)(b,globalThis.fetch,{signal:t.signal}).then(e=>{if(!t.signal.aborted){if(e.ok){f({kind:"success",ptyId:e.ptyId}),x(e=>e+1),null==o||o();return}f({kind:"error",ptyId:e.ptyId,failureKind:e.kind,message:e.message})}})},children:y?"Taking over ownership…":"Take over ownership"}),"pending"===j.kind&&(0,n.jsx)("p",{className:"text-xs text-muted-foreground",role:"status","data-testid":"terminal-takeover-pending",children:"Taking over ownership…"}),"success"===j.kind&&(0,n.jsx)("p",{className:"text-xs text-muted-foreground",role:"status","data-testid":"terminal-takeover-success",children:"Ownership transferred. Observation refreshed."}),"error"===j.kind&&(0,n.jsx)("p",{className:"text-xs text-destructive",role:"alert","data-testid":"terminal-takeover-error","data-takeover-kind":j.failureKind,children:j.message})]}),"loading"===k.kind&&(0,n.jsx)("p",{className:"text-xs text-muted-foreground",role:"status",children:"Loading terminal frame…"}),"error"===k.kind&&(0,n.jsxs)("p",{className:"text-xs text-destructive",role:"alert",children:["Unable to load terminal frame: ",k.message]}),"success"===k.kind&&(0,n.jsx)("pre",{className:"max-h-80 overflow-auto whitespace-pre-wrap break-words rounded bg-background p-3 font-mono text-xs","data-testid":"terminal-frame",children:k.frame||"(Terminal frame is empty.)"})]})}function c(e){let{subject:t,onRefresh:s}=e,[l,i]=(0,r.useState)(!1),o="terminal-frame-".concat(encodeURIComponent(t.id)),c=t.screen.ptyIds;return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("p",{className:"text-xs text-muted-foreground",children:["screen: ",c.length," PTY \xb7 ",t.screen.liveCount," live"]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("button",{type:"button",className:"text-xs underline","aria-expanded":l,"aria-controls":o,onClick:()=>i(e=>!e),children:l?"Hide terminal frame":"Show terminal frame"}),(0,n.jsx)("a",{className:"text-xs underline",href:(0,a.GG)(),children:"Open terminal inspector"})]}),l&&(0,n.jsx)("div",{id:o,children:(0,n.jsx)(d,{ptyIds:c,onRefresh:s})})]})}function u(e){let{subjects:t,runningRuns:s,scope:d,includeIsolatedInstances:u=!1,onIncludeIsolatedInstancesChange:m,progressBySubject:p=new Map,onRefresh:x}=e,[h,f]=(0,r.useState)(!1),g=(0,a.U$)(t,h);return(0,n.jsxs)("section",{className:"space-y-3","aria-label":"Observatory subjects",children:[s&&(0,n.jsxs)("p",{className:"text-sm text-muted-foreground","data-testid":"running-runs-summary",children:["Server run count: ",s.running," running, ",s["probable-running"]," probable-running"," ","(counted statuses: ",s.countedStatuses.join(", "),")"]}),(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsxs)("label",{className:"flex w-fit cursor-pointer items-center gap-2 text-sm",children:[(0,n.jsx)("input",{type:"checkbox",checked:u,onChange:e=>null==m?void 0:m(e.target.checked),"aria-label":"Include isolated instances"}),"Include isolated instances: ",u?"included":"local only"]}),d&&(0,n.jsxs)("p",{className:"text-xs text-muted-foreground","data-testid":"observatory-scope",children:["Observation scope: ",d.domain,"; ",d.roots," root",1===d.roots?"":"s","; ",d.federated?"federated":"local only","; ",d.hiddenDead," dead hidden",void 0===d.hiddenSubAgentRuns?"":"; ".concat(d.hiddenSubAgentRuns," sub-agent runs hidden")]})]}),(0,n.jsxs)("label",{className:"flex w-fit cursor-pointer items-center gap-2 text-sm",children:[(0,n.jsx)("input",{type:"checkbox",checked:h,onChange:e=>f(e.target.checked)}),"Show all subjects"]}),0===g.length?(0,n.jsx)("p",{className:"rounded-md border border-border p-4 text-sm text-muted-foreground","data-testid":"subject-list-empty",children:0===t.length?"No observation subjects reported.":"No live or unknown subjects. Turn on Show all subjects to include inactive subjects."}):(0,n.jsx)("ul",{className:"space-y-2","data-testid":"subject-list",children:g.map(e=>{let t=(0,a.XG)(e),s=(0,a.t_)(e),r=p.get(e.id);return(0,n.jsxs)("li",{className:"space-y-2 rounded-md border border-border p-3","data-status":s,children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"font-mono text-sm",children:e.runId||e.id}),(0,n.jsxs)("p",{className:"text-xs text-muted-foreground",children:["origin: ",e.origin]})]}),(0,n.jsx)("span",{className:"rounded-full bg-surface-elevated px-2 py-0.5 text-[10px] font-medium uppercase",children:l[s]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-1","aria-label":"Subject surfaces",children:[(0,n.jsx)(o,{label:"\uD83D\uDDE3️ talk",present:t.talk}),(0,n.jsx)(o,{label:"\uD83D\uDDA5️ screen",present:t.screen}),(0,n.jsx)(o,{label:"\uD83E\uDD16 agent",present:t.agent})]}),e.run&&(0,n.jsxs)("p",{className:"text-xs text-muted-foreground","data-testid":"subject-run-assessment","data-run-status":e.run.status,children:["run: ",i[e.run.status]," — reason: ",e.run.reason," (presence: ",e.run.presence,")"]}),(null==r?void 0:r.kind)==="no-screen"&&(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:"progress: no screen"}),(null==r?void 0:r.kind)==="no-progress"&&(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:"progress: no progress reported"}),(null==r?void 0:r.kind)==="progress"&&(0,n.jsxs)("p",{className:"text-xs text-muted-foreground",children:["progress (",r.ptyId,"): ",r.status," — ",r.line,r.hasMissingFrames?" (missing frames)":""]}),t.screen&&(0,n.jsx)(c,{subject:e,onRefresh:x})]},e.id)})})]})}var m=s(13135);let p=new(s(47648)).ki({baseUrl:"",token:"",provider:""});function x(){let[e,t]=(0,r.useState)(null),[s,l]=(0,r.useState)(),[i,o]=(0,r.useState)(),[d,c]=(0,r.useState)(!1),[x,h]=(0,r.useState)(new Map),[f,g]=(0,r.useState)(null),[b,k]=(0,r.useState)(0);return(0,r.useEffect)(()=>{let e=!1;return(async()=>{try{var s,n;let[r,i]=await Promise.all([fetch((0,a.h7)(d)).then(async e=>{if(!e.ok)throw Error("GET ".concat((0,a.h7)(d)," failed (").concat(e.status,")"));return e.json()}),p.listProgressFrames().catch(()=>null)]);if(e)return;let c=null!=(s=r.subjects)?s:[];g(null),t(c),l(r.runningRuns),o(r.scope),h((0,a.vq)(c,i?(0,m.gA)(null!=(n=i.logs)?n:[]):new Map))}catch(t){e||g(t instanceof Error?t.message:"Failed to load observation subjects")}})(),()=>{e=!0}},[d,b]),(0,n.jsxs)("main",{className:"mx-auto max-w-4xl space-y-4 p-6",children:[(0,n.jsxs)("header",{className:"space-y-1",children:[(0,n.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"Observatory"}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"Subject-level view of talk, screen, and agent observation surfaces."}),(0,n.jsx)("button",{type:"button",className:"text-sm underline",onClick:()=>{(0,a.L4)()},children:"Open new terminal"})]}),f?(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsx)("p",{role:"alert",className:"rounded-md border border-error/40 bg-error/5 p-3 text-sm text-error",children:f}),(0,n.jsxs)("label",{className:"flex w-fit cursor-pointer items-center gap-2 text-sm",children:[(0,n.jsx)("input",{type:"checkbox",checked:d,onChange:e=>c(e.target.checked),"aria-label":"Include isolated instances"}),"Include isolated instances: ",d?"included":"local only"]})]}):null===e?(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading observation subjects…"}):(0,n.jsx)(u,{subjects:e,runningRuns:s,scope:i,includeIsolatedInstances:d,onIncludeIsolatedInstancesChange:c,progressBySubject:x,onRefresh:()=>k(e=>e+1)})]})}},56594:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});let n=(0,s(89570).A)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]])},83337:(e,t,s)=>{Promise.resolve().then(s.bind(s,50961))},87691:(e,t,s)=>{"use strict";s.d(t,{C:()=>d,DaemonProvider:()=>c,Q:()=>u});var n=s(17594),r=s(48082),a=s(87338),l=s(15249),i=s(47648),o=s(91659);let d=(0,r.createContext)(null);function c(e){let{children:t}=e,s={baseUrl:"",token:"",provider:""},[c,u]=(0,r.useState)(s),[m,p]=(0,r.useState)(""),[x]=(0,r.useState)(()=>new i.ki(s));(0,r.useEffect)(()=>{let e=(0,a.Fp)();u(e),x.updateConfig(e),p((0,l.oD)()),(0,o.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[x]),(0,r.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let t=(0,a.Fp)();x.updateConfig(t),u(t),(0,o.cY)("webterm.provider.daemon.config-cross-tab",{key:e.key,hasToken:!!t.token});return}"elanous.daemon.sessionId"===e.key&&e.newValue&&p(t=>t===e.newValue?t:((0,o.cY)("webterm.provider.daemon.session-cross-tab",{previous:t||"(empty)",next:e.newValue}),e.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[x]);let h=e=>{u(t=>{let s={...t,...e};return(0,a.Qc)(e),x.updateConfig(s),(0,o.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),s})},f=e=>{p(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,o.cY)("webterm.provider.daemon.session-set",{sessionId:e})},g=(0,r.useMemo)(()=>({config:c,setConfig:h,client:x,sessionId:m,setSessionId:f}),[c,x,m]);return(0,n.jsx)(d.Provider,{value:g,children:t})}function u(){let e=(0,r.useContext)(d);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},89570:(e,t,s)=>{"use strict";s.d(t,{A:()=>d});var n=s(48082);let r=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return t.filter((e,t,s)=>!!e&&""!==e.trim()&&s.indexOf(e)===t).join(" ").trim()},a=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,s)=>s?s.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,n.createContext)({}),o=(0,n.forwardRef)((e,t)=>{var s,a,o;let{color:d,size:c,strokeWidth:u,absoluteStrokeWidth:m,className:p="",children:x,iconNode:h,...f}=e,{size:g=24,strokeWidth:b=2,absoluteStrokeWidth:k=!1,color:v="currentColor",className:j=""}=null!=(s=(0,n.useContext)(i))?s:{},y=(null!=m?m:k)?24*Number(null!=u?u:b)/Number(null!=c?c:g):null!=u?u:b;return(0,n.createElement)("svg",{ref:t,...l,width:null!=(a=null!=c?c:g)?a:l.width,height:null!=(o=null!=c?c:g)?o:l.height,stroke:null!=d?d:v,strokeWidth:y,className:r("lucide",j,p),...!x&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(f)&&{"aria-hidden":"true"},...f},[...h.map(e=>{let[t,s]=e;return(0,n.createElement)(t,s)}),...Array.isArray(x)?x:[x]])}),d=(e,t)=>{let s=(0,n.forwardRef)((s,l)=>{let{className:i,...d}=s;return(0,n.createElement)(o,{ref:l,iconNode:t,className:r("lucide-".concat(a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),i),...d})});return s.displayName=a(e),s}}},e=>{e.O(0,[7648,3135,4306,3702,7358],()=>e(e.s=83337)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6231],{7607:(e,n,l)=>{Promise.resolve().then(l.bind(l,84264))},13469:(e,n,l)=>{"use strict";l.d(n,{EF:()=>d,m6:()=>s});var t=l(17594);let r=new Set(["done","completed","success","succeeded","failed","error","cancelled","aborted"]),a=/fail|error|block|stall|cancel|abort/i;function s(e,n){if((null==e?void 0:e.kind)!=="ready")return null;let l=e.data.reduce((e,n)=>!e||Date.parse(n.startedAt)>Date.parse(e.startedAt)?n:e,null);return!l||r.has(l.status.toLowerCase())&&n-Date.parse(l.startedAt)>864e5?null:l}function d(e){var n,l;let{result:d,onSelect:u,selectedRun:i,expectedRunId:o,now:c=Date.now()}=e,m=void 0===i?s(d,c):i;if(o&&(null==m?void 0:m.runId)!==o)return(0,t.jsx)("p",{role:"status",children:"발행 진행 \xb7 노드 흐름: 런이 달라 못 잼"});if(!m)return null;let h=Math.max(0,m.path.findIndex(e=>{var n;return(null==(n=m.nodes.find(n=>n.nodeId===e))?void 0:n.ok)!==!0})),p=m.path.length>0&&m.path.every(e=>{var n;return(null==(n=m.nodes.find(n=>n.nodeId===e))?void 0:n.ok)===!0})?m.path.length-1:h,x=m.path[p],f=m.nodes.find(e=>e.nodeId===x),v="done"===m.status.toLowerCase()&&(null==f?void 0:f.ok)===!1,b=!v&&((null==f?void 0:f.ok)===!1||a.test(m.status))?null==f||null==(n=f.summary.split(/\r?\n/,1)[0])?void 0:n.trim():null,w=r.has(m.status.toLowerCase()),k=w?function(e){let n=Date.parse(e.startedAt),l=e.path.map(n=>{var l;let t=null==(l=e.nodes.find(e=>e.nodeId===n))?void 0:l.endedAt;return t?Date.parse(t):NaN}).filter(Number.isFinite);return Number.isFinite(n)&&0!==l.length?Math.max(0,Math.floor((Math.max(...l)-n)/6e4)):null}(m):null,j=w?null:Math.max(0,Math.floor((c-Date.parse(m.startedAt))/6e4));return(0,t.jsxs)("section",{"aria-label":"발행 진행",...void 0!==i?{"data-run-id":m.runId}:{},className:"min-w-0 rounded-2xl border bg-card p-3 text-foreground",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>u(m),className:"flex w-full min-w-0 items-center gap-2 text-left text-sm hover:text-primary",children:[(0,t.jsxs)("span",{className:"shrink-0 whitespace-nowrap font-semibold",children:["발행 ",null!=(l=m.version)?l:"판 미상"]}),w?(0,t.jsxs)("span",{className:"shrink-0 whitespace-nowrap",children:["\xb7 끝남",null!==k?" \xb7 걸린 시간 ".concat(k,"분"):""]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"shrink-0 whitespace-nowrap",children:["\xb7 ",null!=x?x:"노드 미상"," (",m.path.length?p+1:0,"/",m.path.length,")"]}),(0,t.jsxs)("span",{className:"shrink-0 whitespace-nowrap",children:["\xb7 경과 ",Number.isFinite(j)?j:0,"분"]})]}),(0,t.jsx)("span",{className:"min-w-0 flex-1 overflow-x-auto whitespace-nowrap","aria-label":"발행 노드 순서",children:m.path.map((e,n)=>{let l=m.nodes.find(n=>n.nodeId===e),r=!w&&n===p,a=w||n<p;return(0,t.jsxs)("span",{"aria-current":r?"step":void 0,className:"mr-1 inline-block rounded-full border px-2 py-0.5 ".concat(r?"border-primary bg-primary/10 font-semibold":!w&&n>p?"opacity-50":""),children:[a?(null==l?void 0:l.ok)===!0?"✓ ":(null==l?void 0:l.ok)===!1?"✗ ":"":"",e]},"".concat(e,"-").concat(n))})})]}),(0,t.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["상태: ",m.status]}),v&&(0,t.jsx)("p",{role:"status",className:"truncate text-sm text-amber-700 dark:text-amber-400",children:"경고: 노드 실패 보고 \xb7 런은 끝남"}),b&&(0,t.jsxs)("p",{role:"alert",className:"truncate text-sm text-red-600 dark:text-red-400",children:["막힘: ",b]})]})}},84264:(e,n,l)=>{"use strict";l.d(n,{ReleaseRunsView:()=>m});var t=l(17594),r=l(48082),a=l(87691),s=l(65989),d=l(13469),u=l(65456);let i=["done","completed","failed","cancelled","aborted","success","succeeded","error"],o=new Intl.DateTimeFormat("ko-KR",{timeZone:"Asia/Seoul",year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",hourCycle:"h23"});function c(e){var n;let{result:l,version:r,versions:a=[],selectedRun:s,unmatchedRunId:i,openedNodeId:c,log:m,onVersion:h,onRun:p,onNode:x,onStripRun:f}=e;if((null==l?void 0:l.kind)==="forbidden"||(null==m?void 0:m.kind)==="forbidden")return(0,t.jsx)("p",{children:"운영자만 볼 수 있습니다"});let v=(null==l?void 0:l.kind)==="ready"?l.data:[],b=r?v.filter(e=>e.version===r):v,w=s?b.filter(e=>e.runId===s.runId):[],k=1===w.length?w[0]:null,j=(null==l?void 0:l.kind)==="ready"&&(null!==s&&!k||!!i),N=[...new Set([...a,...v.map(e=>e.version).filter(e=>!!e)])];return r&&!N.includes(r)&&N.push(r),(0,t.jsxs)("main",{className:"mx-auto w-full min-w-0 max-w-4xl space-y-6 overflow-x-hidden px-4 py-6 text-foreground",children:[j?(0,t.jsx)("p",{role:"status",children:"발행 진행 \xb7 노드 흐름: 런이 달라 못 잼"}):f&&(0,t.jsx)(d.EF,{result:l,selectedRun:k,expectedRunId:null==k?void 0:k.runId,onSelect:f}),(0,t.jsxs)("header",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"운영 / 릴리스"}),(0,t.jsx)("h1",{className:"text-2xl font-semibold",children:"릴리스"})]}),(0,t.jsxs)("label",{className:"block space-y-2 text-sm font-medium",children:["판",(0,t.jsx)("input",{"aria-label":"판",list:"ops-release-versions",className:"block w-full max-w-xs rounded-md border bg-background p-2",value:r,onChange:e=>h(e.target.value),placeholder:"전체 판"}),(0,t.jsx)("datalist",{id:"ops-release-versions",children:N.map(e=>(0,t.jsx)("option",{value:e},e))})]}),null===l?(0,t.jsx)("p",{role:"status",children:"런을 불러오는 중…"}):"error"===l.kind?(0,t.jsxs)("p",{role:"alert",children:["런을 불러오지 못했습니다 (",l.status,")"]}):null,(null==l?void 0:l.kind)==="ready"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{className:"min-w-0 space-y-2","aria-label":"런 목록",children:[(0,t.jsx)("h2",{className:"font-semibold",children:"런 목록"}),0===b.length&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"이 판의 런이 없습니다."}),b.map(e=>{var n;return(0,t.jsxs)("button",{type:"button","aria-pressed":(null==k?void 0:k.runId)===e.runId,onClick:()=>p(e.runId),className:"block w-full min-w-0 rounded-md border p-3 text-left hover:bg-muted aria-pressed:border-primary",children:[(0,t.jsxs)("span",{className:"block truncate font-medium",children:[null!=(n=e.version)?n:"판 미상"," \xb7 ",e.status]}),(0,t.jsx)("time",{"aria-label":"시작 시각 (KST)",className:"block break-all text-sm text-muted-foreground",dateTime:e.startedAt,children:Number.isFinite(Date.parse(e.startedAt))?"".concat(o.format(new Date(e.startedAt))," KST"):"시각 미기록"})]},e.runId)})]}),k&&!j&&(0,t.jsxs)("section",{className:"min-w-0 space-y-3","aria-label":"노드 진행","data-run-id":k.runId,children:[(0,t.jsxs)("h2",{className:"font-semibold",children:["노드 흐름 ",(0,t.jsxs)("span",{className:"text-sm font-normal text-muted-foreground",children:["\xb7 ",null!=(n=k.version)?n:"판 미상"," \xb7 ",k.status]})]}),(0,t.jsx)(u.af,{run:k,openedNodeId:c,onNode:x}),c&&k.path.includes(c)?(0,t.jsx)(u.Jv,{run:k,nodeId:c,log:m}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"노드를 누르면 요약 전문과 로그 꼬리가 열립니다."})]})]})]})}function m(){var e,n;let{client:l}=(0,a.Q)(),[u,o]=(0,r.useState)(null),[m,h]=(0,r.useState)([]),[p,x]=(0,r.useState)(null),[f,v]=(0,r.useState)(null),[b,w]=(0,r.useState)(null),[k,j]=(0,r.useState)(null),[N,I]=(0,r.useState)(null),[g,y]=(0,r.useState)(!1),S=(0,r.useRef)(0),R=(0,r.useRef)(!1),C=(0,r.useRef)(null),D=(0,r.useRef)([]),E=(0,r.useRef)(l);(0,r.useEffect)(()=>{var e,n;let l=new URLSearchParams(null!=(n=null==(e=window.location)?void 0:e.search)?n:"").get("run");l&&w(l)},[]),(0,r.useEffect)(()=>{let e=!0;return(E.current!==l&&(E.current=l,R.current=!1,y(!1),h([]),C.current=null,x(null)),R.current)?()=>{e=!1}:(S.current++,j(null),I(null),v(null),D.current=[],null===u&&(C.current=null,x(null)),(0,s.oc)(l,u||void 0).then(n=>{if(e&&!R.current&&(v(n),"forbidden"===n.kind&&(R.current=!0,y(!0)),"ready"===n.kind)&&(D.current=n.data,h(e=>[...new Set([...e,...n.data.map(e=>e.version).filter(e=>!!e)])]),null===u&&null===C.current)){var l,t,r,a,s,i,o,c;let e=new URLSearchParams(null!=(s=null==(l=window.location)?void 0:l.search)?s:"").get("run");C.current=null!=(c=null!=(o=null!=(i=null==(t=n.data.find(n=>n.runId===e))?void 0:t.version)?i:null==(r=(0,d.m6)(n,Date.now()))?void 0:r.version)?o:null==(a=n.data[0])?void 0:a.version)?c:null,x(C.current)}}),()=>{e=!1})},[l,u]);let A=!g&&((null==f?void 0:f.kind)==="ready"||(null==f?void 0:f.kind)==="error")&&D.current.some(e=>!i.includes(e.status.toLowerCase()));(0,r.useEffect)(()=>{if(!A)return;let e=!0,n=!1,t=async()=>{if(n||document.hidden||!e||R.current||!D.current.some(e=>!i.includes(e.status.toLowerCase())))return;n=!0;let t=await (0,s.oc)(l,u||void 0);n=!1,e&&!R.current&&(v(t),"ready"===t.kind&&(D.current=t.data),"forbidden"===t.kind&&(R.current=!0,y(!0)))},r=window.setInterval(()=>{t()},1e4),a=()=>{document.hidden||t()};return document.addEventListener("visibilitychange",a),()=>{e=!1,window.clearInterval(r),document.removeEventListener("visibilitychange",a)}},[l,u,A]);let F=null===u?p:u,L=(null==f?void 0:f.kind)==="ready"?f.data.filter(e=>!F||e.version===F):[],M=b?L.find(e=>e.runId===b):null!=(e=(0,d.m6)({kind:"ready",data:L},Date.now()))?e:L[0],_=null!=(n=null!=F?F:null==M?void 0:M.version)?n:"",K=null==M?void 0:M.runId;(0,r.useEffect)(()=>{S.current++,j(null),I(null)},[K]);let T=(0,r.useCallback)(e=>{(e!==p||null!==u)&&(S.current++,x(null),o(e),w(null),j(null),I(null))},[u,p]),P=e=>{S.current++,w(e),j(null),I(null)};if(g)return(0,t.jsx)("p",{children:"운영자만 볼 수 있습니다"});let O=k&&k.runId===K?k.nodeId:null,U=N&&N.runId===K&&N.nodeId===O?N.result:null;return(0,t.jsx)(c,{result:f,version:_,versions:m,selectedRun:null!=M?M:null,unmatchedRunId:b&&!M?b:null,openedNodeId:O,log:U,onVersion:T,onRun:P,onNode:e=>{if(!M||(null==f?void 0:f.kind)!=="ready")return;let n=++S.current,t=M.runId;if((null==k?void 0:k.runId)===t&&k.nodeId===e){j(null),I(null);return}j({runId:t,nodeId:e}),I(null),(0,s.Kh)(l,t,e).then(l=>{n!==S.current||R.current||("forbidden"===l.kind&&(R.current=!0,y(!0)),I({runId:t,nodeId:e,result:l}))})},onStripRun:e=>{if(e.version!==F){var n;o(null!=(n=e.version)?n:""),x(null)}P(e.runId)}})}}},e=>{e.O(0,[7648,8987,5456,4306,3702,7358],()=>e(e.s=7607)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2624],{13469:(e,t,n)=>{"use strict";n.d(t,{EF:()=>d,m6:()=>s});var l=n(17594);let a=new Set(["done","completed","success","succeeded","failed","error","cancelled","aborted"]),r=/fail|error|block|stall|cancel|abort/i;function s(e,t){if((null==e?void 0:e.kind)!=="ready")return null;let n=e.data.reduce((e,t)=>!e||Date.parse(t.startedAt)>Date.parse(e.startedAt)?t:e,null);return!n||a.has(n.status.toLowerCase())&&t-Date.parse(n.startedAt)>864e5?null:n}function d(e){var t,n;let{result:d,onSelect:i,selectedRun:o,expectedRunId:c,now:u=Date.now()}=e,m=void 0===o?s(d,u):o;if(c&&(null==m?void 0:m.runId)!==c)return(0,l.jsx)("p",{role:"status",children:"발행 진행 \xb7 노드 흐름: 런이 달라 못 잼"});if(!m)return null;let p=Math.max(0,m.path.findIndex(e=>{var t;return(null==(t=m.nodes.find(t=>t.nodeId===e))?void 0:t.ok)!==!0})),h=m.path.length>0&&m.path.every(e=>{var t;return(null==(t=m.nodes.find(t=>t.nodeId===e))?void 0:t.ok)===!0})?m.path.length-1:p,x=m.path[h],f=m.nodes.find(e=>e.nodeId===x),b="done"===m.status.toLowerCase()&&(null==f?void 0:f.ok)===!1,v=!b&&((null==f?void 0:f.ok)===!1||r.test(m.status))?null==f||null==(t=f.summary.split(/\r?\n/,1)[0])?void 0:t.trim():null,g=a.has(m.status.toLowerCase()),j=g?function(e){let t=Date.parse(e.startedAt),n=e.path.map(t=>{var n;let l=null==(n=e.nodes.find(e=>e.nodeId===t))?void 0:n.endedAt;return l?Date.parse(l):NaN}).filter(Number.isFinite);return Number.isFinite(t)&&0!==n.length?Math.max(0,Math.floor((Math.max(...n)-t)/6e4)):null}(m):null,w=g?null:Math.max(0,Math.floor((u-Date.parse(m.startedAt))/6e4));return(0,l.jsxs)("section",{"aria-label":"발행 진행",...void 0!==o?{"data-run-id":m.runId}:{},className:"min-w-0 rounded-2xl border bg-card p-3 text-foreground",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>i(m),className:"flex w-full min-w-0 items-center gap-2 text-left text-sm hover:text-primary",children:[(0,l.jsxs)("span",{className:"shrink-0 whitespace-nowrap font-semibold",children:["발행 ",null!=(n=m.version)?n:"판 미상"]}),g?(0,l.jsxs)("span",{className:"shrink-0 whitespace-nowrap",children:["\xb7 끝남",null!==j?" \xb7 걸린 시간 ".concat(j,"분"):""]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("span",{className:"shrink-0 whitespace-nowrap",children:["\xb7 ",null!=x?x:"노드 미상"," (",m.path.length?h+1:0,"/",m.path.length,")"]}),(0,l.jsxs)("span",{className:"shrink-0 whitespace-nowrap",children:["\xb7 경과 ",Number.isFinite(w)?w:0,"분"]})]}),(0,l.jsx)("span",{className:"min-w-0 flex-1 overflow-x-auto whitespace-nowrap","aria-label":"발행 노드 순서",children:m.path.map((e,t)=>{let n=m.nodes.find(t=>t.nodeId===e),a=!g&&t===h,r=g||t<h;return(0,l.jsxs)("span",{"aria-current":a?"step":void 0,className:"mr-1 inline-block rounded-full border px-2 py-0.5 ".concat(a?"border-primary bg-primary/10 font-semibold":!g&&t>h?"opacity-50":""),children:[r?(null==n?void 0:n.ok)===!0?"✓ ":(null==n?void 0:n.ok)===!1?"✗ ":"":"",e]},"".concat(e,"-").concat(t))})})]}),(0,l.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["상태: ",m.status]}),b&&(0,l.jsx)("p",{role:"status",className:"truncate text-sm text-amber-700 dark:text-amber-400",children:"경고: 노드 실패 보고 \xb7 런은 끝남"}),v&&(0,l.jsxs)("p",{role:"alert",className:"truncate text-sm text-red-600 dark:text-red-400",children:["막힘: ",v]})]})}},43465:(e,t,n)=>{"use strict";n.d(t,{Es:()=>s,Wf:()=>a,q9:()=>r});let l=/\u{1F451}|`[^`]+`|\b(?=[0-9a-f]*\d)(?=[0-9a-f]*[a-f])[0-9a-f]{7,40}\b|\/Users\/|\/(?:home|root)\/|\/\.ssh\/|~\/\.elanous|elt_|\$\s*[-+]?\d[\d,.]*|run-[0-9a-f]{8}\b|\b(?:test|mirror):|\b(?:account|remote)-\d+\b|\bmsb\d+\b|\.ts\.net\b|\bgcpvm\b|user|[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}/iu;function a(e){return!l.test(e)}function r(e){return(e.replace(/^\s*\*\*\[[A-Za-z]{1,4}\]\*\*\s*/,"").replace(/^(?:\{\{TS\}\}|\d{4}-\d{2}-\d{2}\s+\d{1,2}:\d{2}(?::\d{2})?\s*(?:KST)?)\s*/,"").replace(/^→\s*(?:(?:[A-Z]{2,4}|전원|전체)(?=[\s·,(]|$)[\s·,]*)+/u,"").replace(/^—\s*/,"").replace(/^(?:보고|요청|정정|결정|사고|안내)\s*·\s*/,"").trim()||e.trim()).replace(/\*\*/g,"")}function s(e){return e.replace(/#\d{4,6}\b/g,"PR")}},90420:(e,t,n)=>{"use strict";n.d(t,{SeatBoardView:()=>x});var l=n(17594),a=n(48082),r=n(96545),s=n(87691),d=n(65989),i=n(13469),o=n(43465);let c=[{seat:"OP",role:"COO"},{seat:"MK",role:"CMO"},{seat:"TC",role:"CTO"},{seat:"UX",role:"CXO"}];function u(e){return null===e?"못 읽음":String(e)}function m(e,t,n){let l=e.split(/\r?\n/);return t?l.filter(e=>(0,o.Wf)(e)&&!n.some(t=>e.includes(t))).map(o.Es):l}function p(e){var t,n,a,r,s,d;let{seat:i,role:c,publicCapture:p,identifiers:h}=e,x=null!=(t=null==i?void 0:i.landed)?t:null,f=null!=(n=null==i?void 0:i.blocked)?n:null,b=null!=(a=null==i?void 0:i.checklist)?a:null;return(0,l.jsxs)("article",{className:"min-w-0 space-y-5 rounded-2xl border bg-card p-5 shadow-sm","aria-label":"".concat(c," 자리"),children:[(0,l.jsxs)("header",{children:[(0,l.jsx)("h2",{className:"text-3xl font-bold tracking-tight",children:c}),(0,l.jsx)("div",{className:"mt-3 min-h-12 break-words text-muted-foreground","aria-label":"지금 하는 일",children:(null==i?void 0:i.now)?m((0,o.q9)(i.now.text),p,h).map((e,t)=>(0,l.jsx)("p",{children:e},t)):"못 읽음"})]}),(0,l.jsxs)("section",{"aria-label":"오늘 착지",children:[(0,l.jsxs)("h3",{className:"font-semibold",children:["오늘 착지 ",(0,l.jsx)("strong",{className:"".concat(p?"text-5xl":"text-3xl"," ").concat(null===x?"text-muted-foreground":""),children:u(null!=(r=null==x?void 0:x.length)?r:null)})]}),x&&(0,l.jsx)("ul",{className:"mt-2 space-y-1",children:x.slice(-5).reverse().flatMap(e=>m(e.title,p,h).map((t,n)=>(0,l.jsx)("li",{className:"break-words",children:p?t:"#".concat(e.pr," \xb7 ").concat(t)},"".concat(e.pr,"-").concat(n))))})]}),(0,l.jsxs)("section",{"aria-label":"막힘",children:[(0,l.jsxs)("h3",{className:"font-semibold text-red-600 dark:text-red-400",children:["막힘 ",(0,l.jsx)("strong",{className:"".concat(p?"text-5xl":"text-3xl"," ").concat(null===f?"text-muted-foreground":""),children:u(null!=(s=null==f?void 0:f.length)?s:null)})]}),f&&(0,l.jsx)("ul",{className:"mt-2 space-y-1 text-red-600 dark:text-red-400",children:f.flatMap(e=>m(e.title,p,h).map((t,n)=>(0,l.jsx)("li",{className:"break-words",children:p?t:"".concat(e.id," \xb7 ").concat(t)},"".concat(e.id,"-").concat(n))))})]}),(0,l.jsxs)("p",{children:["대표 결정 대기 ",(0,l.jsx)("strong",{className:"".concat(p?"text-5xl":"text-3xl"," ").concat((null==i?void 0:i.pendingDecisions)==null?"text-muted-foreground":""),children:u(null!=(d=null==i?void 0:i.pendingDecisions)?d:null)})]}),(0,l.jsx)("section",{"aria-label":"칸 상태",className:"flex flex-wrap gap-2 border-t pt-3",children:b?(0,l.jsx)(l.Fragment,{children:["green","yellow","red","done"].map((e,t)=>(0,l.jsxs)("span",{"aria-label":"".concat(e," ").concat(b[e]),children:[["\uD83D\uDFE2","\uD83D\uDFE1","\uD83D\uDD34","✅"][t]," ",b[e]]},e))}):(0,l.jsx)("span",{className:"text-muted-foreground",children:"못 읽음"})}),(null==i?void 0:i.subSeats)&&i.subSeats.length>0&&(0,l.jsx)("ul",{"aria-label":"하위 자리",className:"space-y-1 border-t pt-3",children:i.subSeats.map(e=>{var t,n,a;let r="└ ".concat(e.id," ").concat(e.title," \xb7 열린 칸 ").concat(u(e.open)," \xb7 오늘 착지 ").concat(u(e.landed)," \xb7 막힘 ").concat(u(null!=(a=null==(t=e.blocked)?void 0:t.length)?a:null)),s=(null==(n=e.blocked)?void 0:n.length)?" \xb7 ".concat(e.blocked.map(e=>e.id).join(", ")):"",d=p?m(r,!0,h):[r],i=p?m(s,!0,h):[s];return d.map((t,n)=>(0,l.jsxs)("li",{className:"break-words",children:[t,i.join("")]},"".concat(e.id,"-").concat(n)))})})]})}function h(e){let{result:t,refreshedAt:n,publicCapture:a=!1,releaseStrip:r}=e;if((null==t?void 0:t.kind)==="forbidden")return(0,l.jsx)("p",{children:"운영자만 볼 수 있습니다"});let s=(null==t?void 0:t.kind)==="ready"?t.data.seats:[],d=s.flatMap(e=>{var t,n,l;return[...(null!=(t=e.landed)?t:[]).flatMap(e=>[String(e.pr),...e.checklistId?[e.checklistId]:[]]),...(null!=(n=e.blocked)?n:[]).map(e=>e.id),...(null!=(l=e.subSeats)?l:[]).flatMap(e=>{var t;return(null!=(t=e.blocked)?t:[]).map(e=>e.id)})]});return(0,l.jsxs)("main",{className:"mx-auto w-full max-w-[1920px] space-y-6 p-4 text-foreground md:p-8 ".concat(a?"flex min-h-screen flex-col text-base":""),children:[!a&&r,(0,l.jsxs)("header",{children:[(0,l.jsx)("p",{className:"text-muted-foreground",children:"운영 / 자리 현황"}),(0,l.jsx)("h1",{className:"text-3xl font-bold",children:"자리 현황"})]}),(0,l.jsxs)("section",{"aria-label":"오늘 합계",className:"flex flex-wrap items-center gap-x-8 gap-y-3 rounded-2xl border bg-card p-5",children:[["landed","blocked","pendingDecisions"].map(e=>{let n=(null==t?void 0:t.kind)!=="ready"||c.some(t=>{var n;let{seat:l}=t;return!s.find(e=>e.seat===l)||(null==(n=s.find(e=>e.seat===l))?void 0:n[e])===null})?"못 읽음":String(s.reduce((t,n)=>t+("pendingDecisions"===e?n.pendingDecisions:n[e].length),0));return(0,l.jsxs)("p",{children:["landed"===e?"오늘 착지":"blocked"===e?"막힘":"결정 대기"," ",(0,l.jsx)("strong",{className:"".concat(a?"text-5xl":"text-3xl").concat("못 읽음"===n?" text-muted-foreground":""),children:n})]},e)}),(0,l.jsxs)("p",{children:["마지막 갱신 ",(0,l.jsx)("time",{dateTime:null!=n?n:void 0,children:n?new Date(n).toLocaleString("ko-KR",{timeZone:"Asia/Seoul"}):"못 읽음"})]})]}),null===t&&(0,l.jsx)("p",{role:"status",children:"자리 현황을 불러오는 중…"}),(null==t?void 0:t.kind)==="error"&&(0,l.jsxs)("p",{role:"alert",children:["자리 현황을 불러오지 못했습니다 (",t.status,")"]}),(null==t?void 0:t.kind)==="ready"&&(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 min-[1440px]:grid-cols-4",children:c.map(e=>{let{seat:t,role:n}=e;return(0,l.jsx)(p,{seat:s.find(e=>e.seat===t),role:n,publicCapture:a,identifiers:d},t)})}),a&&(0,l.jsx)("footer",{className:"mt-auto border-t pt-4 text-center font-semibold tracking-wide",children:"PUBLIC CAPTURE \xb7 가린 화면"})]})}function x(){let{client:e}=(0,s.Q)(),t=(0,r.useRouter)(),[n,o]=(0,a.useState)(null),[c,u]=(0,a.useState)(null),[m,p]=(0,a.useState)(null),[x,f]=(0,a.useState)(null);return((0,a.useEffect)(()=>{f("public"===new URLSearchParams(window.location.search).get("capture"))},[]),(0,a.useEffect)(()=>{let t=!0,n=!1,l=!1,a=async()=>{if(!t||n||l||document.hidden)return;n=!0;let a=new Intl.DateTimeFormat("sv-SE",{timeZone:"Asia/Seoul"}).format(new Date),r=await (0,d.Nn)(e,a);n=!1,t&&(u(r),"forbidden"===r.kind&&(l=!0),"ready"===r.kind&&p(new Date().toISOString()))};u(null),p(null),a();let r=window.setInterval(()=>{a()},3e4),s=()=>{document.hidden||a()};return document.addEventListener("visibilitychange",s),()=>{t=!1,window.clearInterval(r),document.removeEventListener("visibilitychange",s)}},[e]),(0,a.useEffect)(()=>{if(!1!==x||(null==c?void 0:c.kind)==="forbidden")return;let t=!0,n=!1,l=!1,a=async()=>{if(!t||n||l||document.hidden)return;n=!0;let a=await (0,d.oc)(e);n=!1,t&&(o(a),"forbidden"===a.kind&&(l=!0))};o(null),a();let r=window.setInterval(()=>{a()},1e4),s=()=>{document.hidden||a()};return document.addEventListener("visibilitychange",s),()=>{t=!1,window.clearInterval(r),document.removeEventListener("visibilitychange",s)}},[e,x,(null==c?void 0:c.kind)==="forbidden"]),null===x)?null:(0,l.jsx)(h,{result:c,refreshedAt:m,publicCapture:x,releaseStrip:(0,l.jsx)(i.EF,{result:n,onSelect:e=>t.push("/ops/release?run=".concat(encodeURIComponent(e.runId)))})})}},94227:(e,t,n)=>{Promise.resolve().then(n.bind(n,90420))},96545:(e,t,n)=>{"use strict";var l=n(42701);n.o(l,"useParams")&&n.d(t,{useParams:function(){return l.useParams}}),n.o(l,"usePathname")&&n.d(t,{usePathname:function(){return l.usePathname}}),n.o(l,"useRouter")&&n.d(t,{useRouter:function(){return l.useRouter}}),n.o(l,"useSearchParams")&&n.d(t,{useSearchParams:function(){return l.useSearchParams}})}},e=>{e.O(0,[7648,8987,4306,3702,7358],()=>e(e.s=94227)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4635],{15249:(e,t,r)=>{"use strict";r.d(t,{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 t=s();return localStorage.setItem(n,t),t}function a(){let e=s();return localStorage.setItem(n,e),e}},27509:(e,t,r)=>{Promise.resolve().then(r.bind(r,48238))},48238:(e,t,r)=>{"use strict";r.d(t,{OutputsList:()=>i});var n=r(17594),s=r(48082),o=r(87691);let a={OP:"COO",MK:"CMO",TC:"CTO",UX:"CXO"},l=new Intl.DateTimeFormat("ko-KR",{timeZone:"Asia/Seoul",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",hourCycle:"h23"});function i(){let{client:e}=(0,o.Q)(),[t,r]=(0,s.useState)([]),[a,l]=(0,s.useState)("all"),[i,d]=(0,s.useState)("loading");return(0,s.useEffect)(()=>{let t=!0;return(function(e){let{limit:t,source:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new URLSearchParams;void 0!==t&&n.set("limit",String(t)),void 0!==r&&n.set("source",r);let s=n.toString();return e.fetchJson("/v1/outputs".concat(s?"?".concat(s):""))})(e).then(e=>{let{outputs:n}=e;t&&(r(n),d("ready"))}).catch(()=>{t&&d("error")}),()=>{t=!1}},[e]),(0,n.jsx)(c,{outputs:t,selected:a,onSelect:l,status:i})}function c(e){let{outputs:t,selected:r,onSelect:s,status:o}=e,i=Array.from(new Map(t.map(e=>[e.kind,e.kindLabel])).entries()),c="all"===r?t:t.filter(e=>e.kind===r);return(0,n.jsxs)("main",{className:"mx-auto w-full max-w-3xl space-y-8 px-5 py-10 sm:py-16",children:[(0,n.jsxs)("header",{className:"space-y-2",children:[(0,n.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"산출물"}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"엘라누스가 만든 문서\xb7슬라이드\xb7보고서\xb7영상을 한곳에서 봅니다."})]}),"loading"===o&&(0,n.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"산출물을 불러오는 중…"}),"error"===o&&(0,n.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:"산출물 목록을 읽지 못했습니다"}),"ready"===o&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{role:"group","aria-label":"종류 고르기",className:"flex flex-wrap gap-2",children:[["all","전부"],...i].map(e=>{let[o,a]=e;return(0,n.jsxs)("button",{type:"button",onClick:()=>s(o),"aria-pressed":r===o,className:"rounded-full border px-3 py-1.5 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ".concat(r===o?"border-primary bg-primary text-primary-foreground":"border-border bg-card text-foreground hover:bg-muted"),children:[a," ","all"===o?t.length:t.filter(e=>e.kind===o).length]},o)})}),0===t.length?(0,n.jsx)("p",{className:"rounded-xl border border-dashed border-border px-5 py-10 text-center text-sm text-muted-foreground",children:"아직 만든 산출물이 없습니다 — 일을 맡기면 여기에 쌓입니다"}):(0,n.jsx)("ul",{className:"space-y-3","aria-label":"산출물 목록",children:c.map((e,t)=>{var r;return(0,n.jsxs)("li",{className:"rounded-xl border border-border bg-card p-5 shadow-sm",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[(0,n.jsx)("span",{className:"rounded-md bg-muted px-2 py-1 font-medium text-foreground",children:e.kindLabel}),e.seat&&(0,n.jsx)("span",{children:null!=(r=a[e.seat])?r:e.seat}),(0,n.jsx)("time",{dateTime:e.at,children:function(e){let t=Object.fromEntries(l.formatToParts(new Date(e)).map(e=>{let{type:t,value:r}=e;return[t,r]}));return"".concat(t.month,"월 ").concat(t.day,"일 ").concat(t.hour,":").concat(t.minute)}(e.at)}),(0,n.jsx)("span",{children:"exec"===e.source?"맡긴 일":"현장"})]}),(0,n.jsx)("h2",{className:"mt-3 font-semibold leading-snug",children:e.title}),e.url?(0,n.jsx)("a",{href:e.url,target:"_blank",rel:"noopener",className:"mt-3 inline-block text-sm font-medium text-primary underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:"열기"}):e.fileName&&(0,n.jsx)("p",{className:"mt-3 text-sm text-muted-foreground",children:e.fileName})]},"".concat(e.at,"-").concat(e.kind,"-").concat(t))})})]})]})}},87691:(e,t,r)=>{"use strict";r.d(t,{C:()=>c,DaemonProvider:()=>d,Q:()=>u});var n=r(17594),s=r(48082),o=r(87338),a=r(15249),l=r(47648),i=r(91659);let c=(0,s.createContext)(null);function d(e){let{children:t}=e,r={baseUrl:"",token:"",provider:""},[d,u]=(0,s.useState)(r),[m,f]=(0,s.useState)(""),[p]=(0,s.useState)(()=>new l.ki(r));(0,s.useEffect)(()=>{let e=(0,o.Fp)();u(e),p.updateConfig(e),f((0,a.oD)()),(0,i.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[p]),(0,s.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let t=(0,o.Fp)();p.updateConfig(t),u(t),(0,i.cY)("webterm.provider.daemon.config-cross-tab",{key:e.key,hasToken:!!t.token});return}"elanous.daemon.sessionId"===e.key&&e.newValue&&f(t=>t===e.newValue?t:((0,i.cY)("webterm.provider.daemon.session-cross-tab",{previous:t||"(empty)",next:e.newValue}),e.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[p]);let x=e=>{u(t=>{let r={...t,...e};return(0,o.Qc)(e),p.updateConfig(r),(0,i.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),r})},g=e=>{f(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,i.cY)("webterm.provider.daemon.session-set",{sessionId:e})},h=(0,s.useMemo)(()=>({config:d,setConfig:x,client:p,sessionId:m,setSessionId:g}),[d,p,m]);return(0,n.jsx)(c.Provider,{value:h,children:t})}function u(){let e=(0,s.useContext)(c);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}}},e=>{e.O(0,[7648,4306,3702,7358],()=>e(e.s=27509)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1718],{37666:(e,t,s)=>{Promise.resolve().then(s.bind(s,73952))},39991:(e,t,s)=>{"use strict";s.d(t,{GM:()=>n,J3:()=>l,WF:()=>a,bR:()=>c,m:()=>r,r5:()=>i});let a="/v1/devices",i="/v1/approvals/merges",c="/v1/templates/capability-preview",l="/v1/idle-nudge/preview",n="/v1/morning-digest/showroom",r="/v1/next-fluent/dispatch"},73952:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});var a=s(17594),i=s(48082),c=s(39991);class l extends Error{constructor(e,t,s){super("devices ".concat(e," on ").concat(t)),this.status=e,this.path=t,this.body=s,this.name="DevicesApiError"}}function n(e){let{api:t}=e,[s,c]=(0,i.useState)(null),[n,r]=(0,i.useState)(null),[o,d]=(0,i.useState)(!0);return((0,i.useEffect)(()=>{let e=!1;return t.fleet().then(t=>{e||(c(t),d(!1))}).catch(t=>{e||(r(t instanceof l?"(".concat(t.status,") ").concat(t.path):String(t)),d(!1))}),()=>{e=!0}},[t]),o)?(0,a.jsx)("div",{className:"text-sm opacity-70",children:"Loading device fleet…"}):n?(0,a.jsx)("div",{role:"alert",className:"rounded bg-rose-50 px-3 py-2 text-sm text-rose-900",children:n}):s?0===s.totalDevices?(0,a.jsxs)("div",{className:"rounded border border-zinc-200 bg-zinc-50 p-4 text-sm",children:[(0,a.jsx)("p",{className:"font-medium",children:"No Apple devices detected yet."}),(0,a.jsxs)("p",{className:"mt-1 opacity-70",children:["The iOS Companion writes ",(0,a.jsx)("code",{children:"~/.elanous/devices.json"})," on iCloud sync. Install it on at least one Apple device to populate this list."]})]}):(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsxs)("caption",{className:"text-xs opacity-60 text-left mb-2",children:["snapshot @ ",new Date(s.snapshotAt).toLocaleString()," \xb7 ",s.totalDevices," devices"]}),(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-zinc-200 text-xs uppercase tracking-wide opacity-70",children:[(0,a.jsx)("th",{className:"text-left py-1",children:"kind"}),(0,a.jsx)("th",{className:"text-right py-1",children:"count"}),(0,a.jsx)("th",{className:"text-left py-1 pl-3",children:"capabilities"})]})}),(0,a.jsx)("tbody",{children:s.kinds.map(e=>(0,a.jsxs)("tr",{className:"border-b border-zinc-100 align-top",children:[(0,a.jsx)("td",{className:"py-1 font-medium",children:e.kind}),(0,a.jsx)("td",{className:"py-1 text-right tabular-nums",children:e.count}),(0,a.jsx)("td",{className:"py-1 pl-3 text-xs",children:0===e.capabilities.length?(0,a.jsx)("span",{className:"opacity-50",children:"(none advertised)"}):e.capabilities.map(e=>(0,a.jsx)("span",{className:"mr-1 inline-block rounded bg-zinc-100 px-1.5 py-0.5",children:e},e))})]},e.kind))})]}):(0,a.jsx)("div",{className:"text-sm opacity-70",children:"No fleet data."})}function r(){let e=(0,i.useMemo)(()=>(function(e){var t;let s=e.baseUrl.replace(/\/+$/,""),a=null!=(t=e.fetchImpl)?t:fetch;async function i(t,i){let c={"content-type":"application/json"};e.authHeader&&(c.authorization=e.authHeader);let n=await a("".concat(s).concat(t),{...i,headers:c}),r=await n.json().catch(()=>null);if(!n.ok)throw new l(n.status,t,r);return r}return{fleet:async()=>await i(c.WF),preview:async e=>await i(c.bR,{method:"POST",body:JSON.stringify(e)})}})({baseUrl:window.location.origin}),[]);return(0,a.jsxs)("section",{className:"flex flex-col gap-4 p-4",children:[(0,a.jsxs)("header",{children:[(0,a.jsx)("h1",{className:"text-lg font-semibold",children:"Device fleet"}),(0,a.jsx)("p",{className:"text-xs opacity-70",children:"Detected Apple devices \xb7 OMF v1 templates use this to decide which capabilities to fire vs gracefully degrade. iPhone-only fleets still get full template value via the fallback chain."})]}),(0,a.jsx)(n,{api:e})]})}}},e=>{e.O(0,[4306,3702,7358],()=>e(e.s=37666)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4662],{6241:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(89570).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},12544:(e,t,r)=>{Promise.resolve().then(r.bind(r,41661))},14189:(e,t,r)=>{"use strict";r.d(t,{$L:()=>l,Kz:()=>i,Vm:()=>s,kv:()=>a});let n="elanous.pwa.chat.autoRouting",o="elanous-chat-routing-changed",a={autoRouting:!1};function s(){return{autoRouting:function(e,t){try{let r=window.localStorage.getItem(e);if("1"===r)return!0;if("0"===r)return!1;return t}catch(e){return t}}(n,a.autoRouting)}}function i(e){try{window.localStorage.setItem(n,e?"1":"0")}catch(e){}window.dispatchEvent(new CustomEvent(o))}function l(e){let t=()=>e(s()),r=t=>{t.key===n&&e(s())};return window.addEventListener(o,t),window.addEventListener("storage",r),()=>{window.removeEventListener(o,t),window.removeEventListener("storage",r)}}},15249:(e,t,r)=>{"use strict";r.d(t,{Zr:()=>s,f6:()=>o,oD:()=>a});let n="elanous.daemon.sessionId";function o(){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 a(){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 t=o();return localStorage.setItem(n,t),t}function s(){let e=o();return localStorage.setItem(n,e),e}},17650:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(89570).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},20591:(e,t,r)=>{"use strict";r.d(t,{hn:()=>a,qv:()=>s,sg:()=>i});let n="elanous.ocr.prefs",o={defaultUseLlmVision:!1,defaultPreferHandwriting:!1};function a(){if("undefined"==typeof localStorage)return{...o};try{let e=localStorage.getItem(n);if(!e)return{...o};let t=JSON.parse(e);return{defaultUseLlmVision:"boolean"==typeof t.defaultUseLlmVision?t.defaultUseLlmVision:o.defaultUseLlmVision,defaultPreferHandwriting:"boolean"==typeof t.defaultPreferHandwriting?t.defaultPreferHandwriting:o.defaultPreferHandwriting}}catch(e){return{...o}}}function s(e){if("undefined"==typeof localStorage)return{...o,...e};let t={...a(),...e};try{localStorage.setItem(n,JSON.stringify(t))}catch(e){}return t}function i(){if("undefined"==typeof localStorage)return{...o};try{localStorage.removeItem(n)}catch(e){}return{...o}}},31193:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(89570).A)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},31217:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(89570).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},41390:(e,t,r)=>{"use strict";r.d(t,{N:()=>i});var n=r(17594),o=r(81755),a=r(99906);let s=[{role:"owner",label:"오너",description:"모든 화면과 운영 화면을 봅니다."},{role:"contributor",label:"기여자",description:"베타 화면과 개발 도구를 함께 봅니다."},{role:"general",label:"일반",description:"사용할 준비가 된 화면을 봅니다."}];function i(){let e=(0,o.In)(),{showBeta:t,setShowBeta:r}=(0,a.hj)();return(0,n.jsxs)("section",{"aria-label":"화면 역할",className:"rounded-lg border border-border bg-card p-4",children:[(0,n.jsx)("h2",{className:"text-base font-semibold",children:"화면 역할"}),(0,n.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"이 기기에서 메뉴에 표시할 화면을 선택하세요. 주소를 직접 입력하면 다른 화면도 열 수 있습니다."}),(0,n.jsx)("div",{className:"mt-3 grid gap-2 sm:grid-cols-3",children:s.map(t=>{let{role:r,label:a,description:s}=t;return(0,n.jsxs)("button",{type:"button","aria-pressed":e===r,onClick:()=>(0,o.OG)(r),className:"rounded-lg border p-3 text-left transition-colors hover:border-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ".concat(e===r?"border-primary bg-primary/10":"border-border"),children:[(0,n.jsx)("span",{className:"block font-medium",children:a}),(0,n.jsx)("span",{className:"mt-1 block text-xs text-muted-foreground",children:s})]},r)})}),"general"===e&&(0,n.jsxs)("label",{className:"mt-4 flex items-center justify-between gap-3 border-t border-border pt-4 text-sm",children:[(0,n.jsx)("span",{children:"실험 기능 켜기"}),(0,n.jsx)("input",{type:"checkbox",role:"switch",checked:t,onChange:e=>r(e.currentTarget.checked),className:"h-5 w-5 accent-primary"})]})]})}},41661:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(17594),o=r(90280),a=r(41390);function s(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"mx-auto max-w-2xl px-6 pt-6",children:(0,n.jsx)(a.N,{})}),(0,n.jsx)(o.O,{})]})}},56741:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(89570).A)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},59884:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(89570).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},68557:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(89570).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},74747:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(89570).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},81755:(e,t,r)=>{"use strict";r.d(t,{GC:()=>o,In:()=>c,OG:()=>i});var n=r(48082);let o="elanous.pwa.role",a="elanous:pwa-role";function s(){try{let e=window.localStorage.getItem(o);if("owner"===e||"contributor"===e||"general"===e)return e}catch(e){}return"general"}function i(e){try{window.localStorage.setItem(o,e)}catch(e){}"function"==typeof window.dispatchEvent&&window.dispatchEvent(new Event(a))}function l(e){if("function"!=typeof window.addEventListener)return()=>{};window.addEventListener(a,e);let t=t=>{(t.key===o||null===t.key)&&e()};return window.addEventListener("storage",t),()=>{window.removeEventListener(a,e),window.removeEventListener("storage",t)}}function c(){return(0,n.useSyncExternalStore)(l,s,()=>"general")}},87691:(e,t,r)=>{"use strict";r.d(t,{C:()=>c,DaemonProvider:()=>d,Q:()=>u});var n=r(17594),o=r(48082),a=r(87338),s=r(15249),i=r(47648),l=r(91659);let c=(0,o.createContext)(null);function d(e){let{children:t}=e,r={baseUrl:"",token:"",provider:""},[d,u]=(0,o.useState)(r),[m,f]=(0,o.useState)(""),[w]=(0,o.useState)(()=>new i.ki(r));(0,o.useEffect)(()=>{let e=(0,a.Fp)();u(e),w.updateConfig(e),f((0,s.oD)()),(0,l.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[w]),(0,o.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let t=(0,a.Fp)();w.updateConfig(t),u(t),(0,l.cY)("webterm.provider.daemon.config-cross-tab",{key:e.key,hasToken:!!t.token});return}"elanous.daemon.sessionId"===e.key&&e.newValue&&f(t=>t===e.newValue?t:((0,l.cY)("webterm.provider.daemon.session-cross-tab",{previous:t||"(empty)",next:e.newValue}),e.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[w]);let g=e=>{u(t=>{let r={...t,...e};return(0,a.Qc)(e),w.updateConfig(r),(0,l.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),r})},h=e=>{f(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,l.cY)("webterm.provider.daemon.session-set",{sessionId:e})},p=(0,o.useMemo)(()=>({config:d,setConfig:g,client:w,sessionId:m,setSessionId:h}),[d,w,m]);return(0,n.jsx)(c.Provider,{value:p,children:t})}function u(){let e=(0,o.useContext)(c);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},99906:(e,t,r)=>{"use strict";r.d(t,{hj:()=>i});var n=r(48082);let o="elanous.pwa.showBeta",a="elanous:show-beta";function s(){try{return"1"===window.localStorage.getItem(o)}catch(e){return!1}}function i(){let[e,t]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{t(s());let e=e=>{let r=e.detail;t("boolean"==typeof r?r:s())},r=e=>{(e.key===o||null===e.key)&&t(s())};return window.addEventListener(a,e),window.addEventListener("storage",r),()=>{window.removeEventListener(a,e),window.removeEventListener("storage",r)}},[]),{showBeta:e,setShowBeta:(0,n.useCallback)(e=>{t(e);try{e?window.localStorage.setItem(o,"1"):window.localStorage.removeItem(o)}catch(e){}window.dispatchEvent(new CustomEvent(a,{detail:e}))},[])}}}},e=>{e.O(0,[1695,5616,8414,5457,4055,7051,5894,7648,7307,2785,500,7242,3849,280,4306,3702,7358],()=>e(e.s=12544)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[620],{273:(e,t,r)=>{"use strict";r.d(t,{cn:()=>n});var s=r(86922),a=r(34558);function n(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.QP)((0,s.$)(t))}},19322:(e,t,r)=>{Promise.resolve().then(r.bind(r,24162))},24162:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>w});var s=r(17594),a=r(96545),n=r(48082),i=r(38475),l=r(41390),o=r(62668),d=r(58274),c=r(58402),u=r(273);function p(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=e.trim();if(0===s.length)return{ok:!1,message:"required"};let a=null!=(t=r.minLength)?t:8;return s.length<a?{ok:!1,message:"at least ".concat(a," characters")}:r.prefix&&r.prefix.length>0&&!s.startsWith(r.prefix)?{ok:!1,message:'must start with "'.concat(r.prefix,'"')}:{ok:!0}}function x(e){let{label:t,value:r,onChange:a,validation:i,disabled:l,placeholder:o,id:x}=e,[m,g]=(0,n.useState)(!1),v=null!=x?x:"api-key-".concat(t.toLowerCase().replace(/\s+/g,"-")),f=(0,n.useMemo)(()=>p(r,i),[r,i]),h=r.length>0&&!f.ok,b=(0,n.useCallback)(e=>{a(e.target.value.replace(/^\s+|\s+$/g,""))},[a]),w=(0,n.useCallback)(()=>g(e=>!e),[]);return(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("label",{htmlFor:v,className:"text-xs font-medium text-foreground/80",children:t}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(c.p,{id:v,type:m?"text":"password",value:r,onChange:b,disabled:l,placeholder:null!=o?o:"Paste your ".concat(t),autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-invalid":h,"aria-describedby":h?"".concat(v,"-error"):void 0,className:(0,u.cn)("font-mono text-xs",h&&"border-destructive"),"data-testid":"api-key-input"}),(0,s.jsx)(d.$,{type:"button",variant:"outline",size:"sm",onClick:w,disabled:l,"aria-label":m?"Hide API key":"Show API key","data-testid":"api-key-toggle",children:m?"Hide":"Show"})]}),h&&f.message?(0,s.jsx)("p",{id:"".concat(v,"-error"),className:"text-xs text-destructive","data-testid":"api-key-error",children:f.message}):null]})}var m=r(46982),g=r(47648),v=r(87338);let f={anthropic:"sk-ant-",gemini:"AIza",openai:"sk-"};function h(e){let t=f[e];return t?{prefix:t,minLength:16}:{minLength:16}}let b={timeout:"5분 안에 로그인이 끝나지 않았습니다. 다시 시도해 주세요.","authorization-denied":"로그인이 거절되었습니다. 다시 시도해 주세요.","browser-unavailable":"브라우저 로그인을 시작하지 못했습니다. 기기 코드로 해 보세요.","port-unavailable":"로그인 응답을 받을 자리(포트 1455)가 이미 쓰이고 있습니다. 기기 코드로 해 보세요.","token-exchange":"로그인은 됐지만 토큰을 받지 못했습니다. 다시 시도해 주세요.","device-code-failed":"기기 코드를 받지 못했습니다. 네트워크를 확인하고 다시 시도해 주세요.","device-poll-failed":"로그인 확인 중 연결이 끊겼습니다. 다시 시도해 주세요.","config-save-failed":"로그인은 됐지만 설정을 저장하지 못했습니다. 다시 시도해 주세요."};function w(){var e,t;let r=(0,a.useRouter)(),c=(0,m.Qj)(),[u,x]=(0,n.useState)(!1),[f,w]=(0,n.useState)({status:"idle"}),[y,k]=(0,n.useState)(()=>Date.now()),[C,S]=(0,n.useState)(0),[E,P]=(0,n.useState)(null),[z,L]=(0,n.useState)(""),[I,_]=(0,n.useState)({status:"idle"}),[$,A]=(0,n.useState)({state:"idle"}),[K,M]=(0,n.useState)("device"),[T,U]=(0,n.useState)(!1),[G,O]=(0,n.useState)(""),[F,Q]=(0,n.useState)(""),[R,q]=(0,n.useState)(!1),B=(0,n.useMemo)(()=>u?new g.ki((0,v.Fp)()):null,[u]);(0,n.useEffect)(()=>{if(!u)return;let e=["127.0.0.1","localhost"].includes(window.location.hostname);U(e),M(e?"browser":"device")},[u]),(0,n.useEffect)(()=>{if(!B)return;let e=!0,t=!1,s=async()=>{if(!t){t=!0;try{let t=await B.getCodexLogin();if(!e)return;A(t),"idle"!==t.state&&P(e=>null!=e?e:"openai-codex"),"ok"===t.state&&r.push("/setup/done"),"error"===t.state?O(t.error):O("")}catch(t){e&&O(t instanceof Error?t.message:String(t))}finally{t=!1}}};s();let a=window.setInterval(()=>{s()},2e3);return()=>{e=!1,window.clearInterval(a)}},[B,r]);let D=(0,n.useCallback)(async e=>{try{var t;if(!(null==(t=navigator.clipboard)?void 0:t.writeText))throw Error("clipboard unavailable");await navigator.clipboard.writeText(e),Q("코드를 복사했습니다.")}catch(e){Q("복사할 수 없습니다. 위 코드를 직접 선택해 복사해주세요.")}},[]),H=(0,n.useCallback)(async e=>{let t=null!=e?e:K;if(!B||R)return;e&&M(e),q(!0),O(""),Q("");let s="browser"===t?window.open("","_blank"):null;try{let e=await B.startCodexLogin(t);A(e),"pending"===e.state&&"browser"===e.mode&&e.authorizeUrl?s?s.location.href=e.authorizeUrl:O("새 탭이 차단되었습니다. 아래 로그인 링크를 직접 열어 계속해주세요."):null==s||s.close(),"ok"===e.state&&r.push("/setup/done"),"error"===e.state&&O(e.error)}catch(e){null==s||s.close(),O(e instanceof Error?e.message:String(e))}finally{q(!1)}},[B,R,K,r]);(0,n.useEffect)(()=>{x(!0)},[]);let W=(0,n.useCallback)(async()=>{if(c){S(0),k(Date.now()),w({status:"loading"});try{let e=await c.getLlmProviders();w({status:"ok",snapshot:e})}catch(e){w({status:"error",message:e.message})}}},[c]);(0,n.useEffect)(()=>{u&&c&&W()},[u,c,W]),(0,n.useEffect)(()=>{if("loading"!==f.status)return;let e=window.setInterval(()=>S(Math.floor((Date.now()-y)/1e3)),1e3);return()=>window.clearInterval(e)},[f.status,y]);let V="ok"===f.status?f.snapshot.providers:[],J=V.find(e=>"codex"===e.flow),X=(0,n.useMemo)(()=>{var e;return null!=(e=V.find(e=>e.provider===E))?e:null},[V,E]),Y=(0,n.useMemo)(()=>!!X&&"mutating"!==I.status&&("auto"===X.flow||"apiKey"===X.flow&&p(z,h(X.provider)).ok),[X,z,I.status]),Z=(0,n.useCallback)(async()=>{if(!c||!X)return;let e={provider:X.provider};"apiKey"===X.flow&&(e.apiKey=z),_({status:"mutating"});try{await c.setLlmProvider(e),r.push("/setup/done")}catch(e){_({status:"error",message:e instanceof Error?e.message:String(e)})}},[c,X,z,r]);return u&&c?"loading"===f.status||"idle"===f.status?(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)(l.N,{}),(0,s.jsxs)("section",{role:"status","aria-live":"polite",className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:["공급자 확인 중 \xb7 ",C,"초"]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2","aria-hidden":"true",children:[0,1,2].map(e=>(0,s.jsxs)("div",{className:"h-24 animate-pulse rounded border border-border bg-card p-3",children:[(0,s.jsx)("div",{className:"mb-3 h-4 w-1/2 rounded bg-muted"}),(0,s.jsx)("div",{className:"h-3 w-3/4 rounded bg-muted"})]},e))})]})]}):"error"===f.status?(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)(l.N,{}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 rounded border border-destructive/40 bg-destructive/5 p-4",children:[(0,s.jsxs)("p",{className:"text-sm text-destructive",children:["Provider 카탈로그 로드 실패: ",f.message]}),(0,s.jsx)(d.$,{variant:"outline",size:"sm",onClick:W,children:"다시 시도"})]})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)(l.N,{}),J?(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded border border-primary/30 bg-primary/5 p-4",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"구독이 있으면 추가 비용 없이"}),(0,s.jsxs)(d.$,{type:"button",variant:"outline",onClick:()=>{P(J.provider),L(""),_({status:"idle"}),window.requestAnimationFrame(()=>{var e;null==(e=document.getElementById("selected-provider"))||e.scrollIntoView({behavior:"smooth"})})},children:[J.label," 구독 로그인 보기"]})]}):null,(0,s.jsx)(j,{providers:V,selected:E,onSelect:e=>{P(e),L(""),_({status:"idle"})},activeProvider:f.snapshot.activeProvider}),X?"codex"===X.flow?(0,s.jsxs)("section",{id:"selected-provider",className:"flex flex-col gap-4 rounded border border-border bg-card p-4",children:[(0,s.jsx)("h3",{className:"text-base font-semibold",children:X.label}),"ok"===$.state?(0,s.jsx)("p",{role:"status",children:"연결됨"}):null,"pending"===$.state?"browser"===$.mode?(0,s.jsxs)("div",{role:"status",className:"flex flex-col gap-2",children:[(0,s.jsx)("p",{children:"로그인을 마치면 이 화면이 다음으로 넘어갑니다."}),$.authorizeUrl?(0,s.jsx)("a",{href:$.authorizeUrl,target:"_blank",rel:"noopener noreferrer",className:"underline",children:"ChatGPT 로그인 링크 열기"}):null,(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"새 탭이 열리지 않았다면 위 링크를 직접 여세요."}),(0,s.jsx)(d.$,{type:"button",variant:"outline",disabled:R,onClick:()=>{H("device")},children:"기기 코드로 바꾸기"})]}):(0,s.jsxs)("div",{role:"status",className:"flex flex-col gap-3",children:[(0,s.jsx)("p",{children:"아래 코드를 입력해 ChatGPT 에 로그인해주세요."}),(0,s.jsx)("strong",{className:"text-3xl tracking-widest","data-testid":"codex-user-code",children:null!=(e=$.userCode)?e:"코드 준비 중…"}),$.userCode?(0,s.jsx)(d.$,{type:"button",variant:"outline",onClick:()=>{D($.userCode)},children:"복사"}):null,F?(0,s.jsx)("p",{role:"status","aria-live":"polite",children:F}):null,$.verificationUrl?(0,s.jsx)("a",{href:$.verificationUrl,target:"_blank",rel:"noopener noreferrer",className:"underline",children:$.verificationUrl}):null]}):null,G?(0,s.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:null!=(t=b[G])?t:G}):null,"pending"!==$.state&&"ok"!==$.state?(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(d.$,{type:"button",disabled:R,onClick:()=>{H()},children:"error"===$.state?"다시 시도":"ChatGPT 로 로그인"}),T&&("error"===$.state||G)?(0,s.jsxs)(d.$,{type:"button",variant:"outline",onClick:()=>{M("browser"===K?"device":"browser"),O("")},children:["다른 방식으로 (","browser"===K?"기기 코드":"브라우저",")"]}):null]}):null]}):(0,s.jsx)(N,{provider:X,apiKey:z,onApiKeyChange:L,submitState:I,canSubmit:Y,onSubmit:Z}):(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"위에서 provider 를 선택해주세요."}),(0,s.jsxs)("details",{className:"rounded border border-border bg-card",children:[(0,s.jsx)("summary",{className:"cursor-pointer p-4 text-sm font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:"고급 \xb7 자식 LLM 선호"}),(0,s.jsx)("div",{className:"p-4 pt-0",children:(0,s.jsx)(i.lN,{})})]}),(0,s.jsx)(o.Q,{})]}):(0,s.jsx)(l.N,{})}function j(e){let{providers:t,selected:r,onSelect:a,activeProvider:n}=e,i=t.filter(e=>e.recommended),l=t.filter(e=>!e.recommended);return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("section",{className:"flex flex-col gap-2",children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"주요 provider"}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:i.map(e=>(0,s.jsx)(y,{provider:e,selected:r===e.provider,active:n===e.provider,onSelect:a},e.provider))})]}),l.length>0?(0,s.jsxs)("details",{className:"rounded border border-border bg-card",children:[(0,s.jsxs)("summary",{className:"cursor-pointer px-3 py-2 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:["기타 provider (",l.length,")"]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-2 border-t border-border p-2 sm:grid-cols-2",children:l.map(e=>(0,s.jsx)(y,{provider:e,selected:r===e.provider,active:n===e.provider,onSelect:a},e.provider))})]}):null]})}function y(e){let{provider:t,selected:r,active:a,onSelect:n}=e;return(0,s.jsxs)("button",{type:"button",onClick:()=>n(t.provider),"data-testid":"provider-card-".concat(t.provider),"aria-pressed":r,className:(0,u.cn)("flex flex-col items-start gap-1 rounded border bg-card p-3 text-left transition-colors","hover:border-primary/40 focus-visible:border-primary focus-visible:outline-none",r?"border-primary bg-primary/5":"border-border"),children:[(0,s.jsxs)("div",{className:"flex w-full items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium",children:t.label}),(0,s.jsxs)("div",{className:"flex gap-1",children:[a?(0,s.jsx)("span",{className:"rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"현재"}):null,t.hasSavedKey?(0,s.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:"key 저장됨"}):null]})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:t.description})]})}function N(e){let{provider:t,apiKey:r,onApiKeyChange:a,submitState:n,canSubmit:i,onSubmit:l}=e,o="apiKey"===t.flow,c="auto"===t.flow,u="local"===t.flow;return(0,s.jsxs)("section",{id:"selected-provider",className:"flex flex-col gap-4 rounded border border-border bg-card p-4",children:[(0,s.jsxs)("header",{className:"flex flex-col gap-1",children:[(0,s.jsx)("h3",{className:"text-base font-semibold",children:t.label}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:t.description})]}),o?(0,s.jsx)(x,{label:t.apiKeyLabel,value:r,onChange:a,validation:h(t.provider),disabled:"mutating"===n.status}):null,c?(0,s.jsx)("p",{className:"rounded bg-muted/50 px-3 py-2 text-xs text-muted-foreground",children:"Auto 모드는 매 호출마다 env 에서 첫 번째 사용 가능한 provider 를 선택합니다. 사용자가 export 한 env 변수에 의존하니, 실패 시 provider 를 명시 선택해주세요."}):null,u?(0,s.jsxs)("p",{className:"rounded bg-yellow-500/10 px-3 py-2 text-xs text-yellow-700 dark:text-yellow-400",children:["Local runtime probe 흐름은 PWA 에서 직접 처리할 수 없어요. 터미널에서"," ",(0,s.jsx)("span",{className:"font-mono",children:"elanous setup llm"})," 을 실행해주세요."]}):null,"error"===n.status?(0,s.jsx)("p",{className:"rounded border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive",children:n.message}):null,(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)(d.$,{type:"button",onClick:l,disabled:!i,"data-testid":"setup-submit",children:"mutating"===n.status?"저장중…":"저장 & chat 으로"})})]})}},41390:(e,t,r)=>{"use strict";r.d(t,{N:()=>l});var s=r(17594),a=r(81755),n=r(99906);let i=[{role:"owner",label:"오너",description:"모든 화면과 운영 화면을 봅니다."},{role:"contributor",label:"기여자",description:"베타 화면과 개발 도구를 함께 봅니다."},{role:"general",label:"일반",description:"사용할 준비가 된 화면을 봅니다."}];function l(){let e=(0,a.In)(),{showBeta:t,setShowBeta:r}=(0,n.hj)();return(0,s.jsxs)("section",{"aria-label":"화면 역할",className:"rounded-lg border border-border bg-card p-4",children:[(0,s.jsx)("h2",{className:"text-base font-semibold",children:"화면 역할"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"이 기기에서 메뉴에 표시할 화면을 선택하세요. 주소를 직접 입력하면 다른 화면도 열 수 있습니다."}),(0,s.jsx)("div",{className:"mt-3 grid gap-2 sm:grid-cols-3",children:i.map(t=>{let{role:r,label:n,description:i}=t;return(0,s.jsxs)("button",{type:"button","aria-pressed":e===r,onClick:()=>(0,a.OG)(r),className:"rounded-lg border p-3 text-left transition-colors hover:border-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ".concat(e===r?"border-primary bg-primary/10":"border-border"),children:[(0,s.jsx)("span",{className:"block font-medium",children:n}),(0,s.jsx)("span",{className:"mt-1 block text-xs text-muted-foreground",children:i})]},r)})}),"general"===e&&(0,s.jsxs)("label",{className:"mt-4 flex items-center justify-between gap-3 border-t border-border pt-4 text-sm",children:[(0,s.jsx)("span",{children:"실험 기능 켜기"}),(0,s.jsx)("input",{type:"checkbox",role:"switch",checked:t,onChange:e=>r(e.currentTarget.checked),className:"h-5 w-5 accent-primary"})]})]})}},46982:(e,t,r)=>{"use strict";r.d(t,{M1:()=>d,Qj:()=>c,tI:()=>o});var s=r(17594),a=r(48082),n=r(67384),i=r(34585);let l=(0,a.createContext)(null);function o(e){let{client:t,queryClient:r,defaultStaleTimeMs:o,children:d}=e,c=(0,a.useMemo)(()=>null!=r?r:new n.E({defaultOptions:{queries:{staleTime:null!=o?o:2e3,refetchOnWindowFocus:!1}}}),[r,o]);return(0,s.jsx)(l.Provider,{value:t,children:(0,s.jsx)(i.Ht,{client:c,children:d})})}function d(){let e=(0,a.useContext)(l);if(!e)throw Error("useNexusClient must be used within <NexusProvider>");return e}function c(){return(0,a.useContext)(l)}},58274:(e,t,r)=>{"use strict";r.d(t,{$:()=>o});var s=r(17594),a=r(39515),n=r(34796),i=r(273);let l=(0,n.F)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function o(e){let{className:t,variant:r="default",size:n="default",...o}=e;return(0,s.jsx)(a.$,{"data-slot":"button",className:(0,i.cn)(l({variant:r,size:n,className:t})),...o})}},81755:(e,t,r)=>{"use strict";r.d(t,{GC:()=>a,In:()=>d,OG:()=>l});var s=r(48082);let a="elanous.pwa.role",n="elanous:pwa-role";function i(){try{let e=window.localStorage.getItem(a);if("owner"===e||"contributor"===e||"general"===e)return e}catch(e){}return"general"}function l(e){try{window.localStorage.setItem(a,e)}catch(e){}"function"==typeof window.dispatchEvent&&window.dispatchEvent(new Event(n))}function o(e){if("function"!=typeof window.addEventListener)return()=>{};window.addEventListener(n,e);let t=t=>{(t.key===a||null===t.key)&&e()};return window.addEventListener("storage",t),()=>{window.removeEventListener(n,e),window.removeEventListener("storage",t)}}function d(){return(0,s.useSyncExternalStore)(o,i,()=>"general")}},96545:(e,t,r)=>{"use strict";var s=r(42701);r.o(s,"useParams")&&r.d(t,{useParams:function(){return s.useParams}}),r.o(s,"usePathname")&&r.d(t,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}}),r.o(s,"useSearchParams")&&r.d(t,{useSearchParams:function(){return s.useSearchParams}})},99906:(e,t,r)=>{"use strict";r.d(t,{hj:()=>l});var s=r(48082);let a="elanous.pwa.showBeta",n="elanous:show-beta";function i(){try{return"1"===window.localStorage.getItem(a)}catch(e){return!1}}function l(){let[e,t]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{t(i());let e=e=>{let r=e.detail;t("boolean"==typeof r?r:i())},r=e=>{(e.key===a||null===e.key)&&t(i())};return window.addEventListener(n,e),window.addEventListener("storage",r),()=>{window.removeEventListener(n,e),window.removeEventListener("storage",r)}},[]),{showBeta:e,setShowBeta:(0,s.useCallback)(e=>{t(e);try{e?window.localStorage.setItem(a,"1"):window.localStorage.removeItem(a)}catch(e){}window.dispatchEvent(new CustomEvent(n,{detail:e}))},[])}}}},e=>{e.O(0,[1695,5616,8414,7051,7648,7307,7242,4306,3702,7358],()=>e(e.s=19322)),_N_E=e.O()}]);
|