elanous 0.2.14 → 0.2.16
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/{1307-6e7e0377c1db0bdc.js → 1307-b46d45b705e8c9ae.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/5977-c952712c87a1f757.js +1 -0
- package/apps/pwa/out/_next/static/chunks/899-46946fe8363e1262.js +1 -0
- package/apps/pwa/out/_next/static/chunks/{9103-7a3ae7f60af3b99f.js → 9103-60fbef33e66f0a46.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/approvals/page-79c3ed84baaedd03.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/autopilot/{page-7b2b4f378354869a.js → page-3cb52e5ea8fc2fa5.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/board/page-a424ef80885d1743.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/botlab/page-c1e20d7d338713f1.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/bots/{page-1512d91c7491ed62.js → page-482c5dbde699947c.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/ceo/page-1e962b31d1f11081.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/chat/{page-a627db94ec6904a0.js → page-8c2d9526164f5d09.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/consult/page-ffff6d819fbc6e0f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/control/{page-e6b84ab07d3567d5.js → page-a0e2a6d1bfb52fc5.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-c53598cfce6156f2.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/editor/{page-fed69f9759d248d0.js → page-13a63953f53c6a23.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/exec/{page-15374909d8f1aebd.js → page-5d3c8429d04f3831.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/field/{page-012a742f81218b01.js → page-3193bdc0bbab047a.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/inside/page-76270efaee638f17.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/intake/{page-99effd9d893a43dc.js → page-6107ca8ddd5e3bdd.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/{layout-938de57ae0315e46.js → layout-dce686e582c23937.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/live/page-d3d53b146416e422.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/loops/{page-160089123a40dd91.js → page-1a61c7ca1ceb3ae7.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/market/{page-629e1ede482ec6eb.js → page-51f811fa119308b6.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-dacff46049e1557e.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/morning/{page-27e99b4e54a849d4.js → page-4167348049166852.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/not-found-de52e8fdf9095f7a.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-36a7d994f4ca0299.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/ops/checklist/{page-32cde713be47cddb.js → page-ca3952cd78a83ca2.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/release/{page-e7e10cd3386222e5.js → page-5b042736aa113756.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-acb749f1e432bcf3.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/outputs/page-cd78862707999911.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/page-54b9ef8afe6278fd.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/reflection/{page-e64caff084f7ce21.js → page-1ebfe049c640e171.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/scheduler/{page-db07eaffba0df7e3.js → page-57924393e3e4e539.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/sessions/page-9e0ce6c8129fa641.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-31fa1ce4c4aff9ae.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/settings/{page-86f91034bd5cabe5.js → page-0f5cd57ca928f42b.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-abe8e3b74bea1ffc.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/setup/page-4364ef9f4e7c7f0f.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/share/{page-ce4d8a1215ce53a3.js → page-d28573d6792b4275.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/showroom/{page-58043db78ba519ae.js → page-59f03fda76c03d22.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/tasks/{page-357750dfb91bf960.js → page-d751de5f8062ff5e.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/term/{page-274703bc41b71333.js → page-fe1759f94003b32b.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/today/page-d64c984e855c8c68.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/trace/page-86914b0dee8ab7f8.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/vault/{page-3b7e821dc492bdfd.js → page-9afdee66b820c76e.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-d4aef67abf264874.js +1 -0
- package/apps/pwa/out/_next/static/chunks/app/workflows/{page-f8da5dc6f3752276.js → page-1ea64acadd704ace.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/workspace/{page-2f810b18d89ecba6.js → page-3544f154c87b43ee.js} +1 -1
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-30c2073bfc21c004.js +1 -0
- package/apps/pwa/out/_next/static/css/001d5fbaee388a25.css +1 -0
- package/apps/pwa/out/_next/static/css/{04dabcbcc4bfa6db.css → 085673d826b98b62.css} +1 -1
- package/apps/pwa/out/_next/static/rv9cierV0jSOvDBm1g0XB/_buildManifest.js +1 -0
- package/apps/pwa/out/approvals/index.html +1 -1
- package/apps/pwa/out/approvals/index.txt +15 -15
- package/apps/pwa/out/autopilot/index.html +1 -1
- package/apps/pwa/out/autopilot/index.txt +15 -15
- package/apps/pwa/out/board/index.html +1 -1
- package/apps/pwa/out/board/index.txt +15 -15
- package/apps/pwa/out/botlab/index.html +1 -1
- package/apps/pwa/out/botlab/index.txt +15 -15
- package/apps/pwa/out/bots/index.html +1 -1
- package/apps/pwa/out/bots/index.txt +15 -15
- package/apps/pwa/out/ceo/index.html +1 -0
- package/apps/pwa/out/ceo/index.txt +33 -0
- package/apps/pwa/out/chat/index.html +1 -1
- package/apps/pwa/out/chat/index.txt +15 -15
- package/apps/pwa/out/consult/index.html +1 -1
- package/apps/pwa/out/consult/index.txt +15 -15
- package/apps/pwa/out/control/index.html +1 -1
- package/apps/pwa/out/control/index.txt +15 -15
- package/apps/pwa/out/design-check/index.html +1 -1
- package/apps/pwa/out/design-check/index.txt +15 -15
- package/apps/pwa/out/editor/index.html +1 -1
- package/apps/pwa/out/editor/index.txt +15 -15
- package/apps/pwa/out/exec/index.html +1 -1
- package/apps/pwa/out/exec/index.txt +15 -15
- package/apps/pwa/out/field/index.html +1 -1
- package/apps/pwa/out/field/index.txt +15 -15
- package/apps/pwa/out/healthz +1 -1
- package/apps/pwa/out/index.html +1 -1
- package/apps/pwa/out/index.txt +15 -15
- package/apps/pwa/out/inside/index.html +1 -1
- package/apps/pwa/out/inside/index.txt +15 -15
- package/apps/pwa/out/intake/index.html +1 -1
- package/apps/pwa/out/intake/index.txt +15 -15
- package/apps/pwa/out/live/index.html +1 -1
- package/apps/pwa/out/live/index.txt +15 -15
- package/apps/pwa/out/loops/index.html +1 -1
- package/apps/pwa/out/loops/index.txt +15 -15
- package/apps/pwa/out/market/index.html +1 -1
- package/apps/pwa/out/market/index.txt +15 -15
- package/apps/pwa/out/missions/placeholder/index.html +1 -1
- package/apps/pwa/out/missions/placeholder/index.txt +15 -15
- package/apps/pwa/out/morning/index.html +1 -1
- package/apps/pwa/out/morning/index.txt +15 -15
- package/apps/pwa/out/observatory/index.html +1 -1
- package/apps/pwa/out/observatory/index.txt +15 -15
- package/apps/pwa/out/ops/checklist/index.html +1 -1
- package/apps/pwa/out/ops/checklist/index.txt +15 -15
- package/apps/pwa/out/ops/release/index.html +1 -1
- package/apps/pwa/out/ops/release/index.txt +15 -15
- package/apps/pwa/out/ops/seats/index.html +1 -1
- package/apps/pwa/out/ops/seats/index.txt +15 -15
- package/apps/pwa/out/outputs/index.html +1 -1
- package/apps/pwa/out/outputs/index.txt +15 -15
- package/apps/pwa/out/reflection/index.html +1 -1
- package/apps/pwa/out/reflection/index.txt +16 -16
- package/apps/pwa/out/scheduler/index.html +1 -1
- package/apps/pwa/out/scheduler/index.txt +15 -15
- package/apps/pwa/out/sessions/index.html +1 -1
- package/apps/pwa/out/sessions/index.txt +15 -15
- package/apps/pwa/out/settings/devices/index.html +1 -1
- package/apps/pwa/out/settings/devices/index.txt +15 -15
- package/apps/pwa/out/settings/index.html +1 -1
- package/apps/pwa/out/settings/index.txt +15 -15
- package/apps/pwa/out/setup/done/index.html +1 -1
- package/apps/pwa/out/setup/done/index.txt +15 -15
- package/apps/pwa/out/setup/index.html +1 -1
- package/apps/pwa/out/setup/index.txt +15 -15
- package/apps/pwa/out/share/index.html +1 -1
- package/apps/pwa/out/share/index.txt +15 -15
- package/apps/pwa/out/showroom/index.html +1 -1
- package/apps/pwa/out/showroom/index.txt +15 -15
- package/apps/pwa/out/tasks/index.html +1 -1
- package/apps/pwa/out/tasks/index.txt +15 -15
- package/apps/pwa/out/term/index.html +1 -1
- package/apps/pwa/out/term/index.txt +15 -15
- package/apps/pwa/out/today/index.html +1 -1
- package/apps/pwa/out/today/index.txt +15 -15
- package/apps/pwa/out/trace/index.html +1 -1
- package/apps/pwa/out/trace/index.txt +15 -15
- package/apps/pwa/out/vault/index.html +1 -1
- package/apps/pwa/out/vault/index.txt +15 -15
- package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
- package/apps/pwa/out/workflows/chat-ui/index.txt +15 -15
- package/apps/pwa/out/workflows/index.html +1 -1
- package/apps/pwa/out/workflows/index.txt +15 -15
- package/apps/pwa/out/workspace/index.html +1 -1
- package/apps/pwa/out/workspace/index.txt +15 -15
- package/apps/pwa/out/worktrees/index.html +1 -1
- package/apps/pwa/out/worktrees/index.txt +15 -15
- package/graphs/doc-gen/doc-gen.yaml +24 -0
- package/graphs/doc-gen/recipes.yaml +3 -0
- package/graphs/heal/heal-loop.yaml +1 -1
- package/graphs/implement-loop.yaml +1 -1
- package/graphs/orchestrator/orchestrator.yaml +7 -0
- package/graphs/orchestrator/recipes.yaml +3 -0
- package/graphs/release/recipes.yaml +3 -0
- package/graphs/release/release-loop.yaml +4 -2
- package/graphs/steward/recipes.yaml +2 -1
- package/package.json +1 -1
- package/scripts/brand/check.ts +7 -5
- package/scripts/ci-public-export-import-gate.ts +154 -0
- package/scripts/ci-test-interference-gate.ts +5 -1
- package/scripts/ci-typecheck-changed.ts +82 -31
- package/scripts/docs/doc-rot.ts +164 -0
- package/scripts/docs/generate-graph-anatomy.ts +437 -0
- package/scripts/docs-cli-check.ts +4 -4
- package/scripts/expose-rubric-suggest.ts +18 -12
- package/scripts/goals/goal-census.ts +343 -0
- package/scripts/lecture-note/node.ts +31 -11
- package/scripts/lessons/handbook-page.ts +30 -3
- package/scripts/marketing/generate-ax-brief.ts +140 -0
- package/scripts/marketing/generate-feature-map.ts +118 -0
- package/scripts/measure/author-section-contribution.ts +84 -0
- package/scripts/release-loop/checklist-gate-node.ts +53 -14
- package/scripts/release-loop/cut-branch.ts +43 -13
- package/scripts/release-loop/gate-node.ts +82 -14
- package/scripts/release-loop/vault-note-node.ts +257 -8
- package/scripts/release-story/draft.ts +57 -9
- package/scripts/rhythm/daily.ts +263 -76
- package/scripts/rhythm/monthly.ts +97 -0
- package/scripts/rhythm/weekly.ts +30 -9
- package/scripts/smart-merge/resync-shadow.ts +147 -0
- package/src/acp/client.ts +17 -2
- package/src/agent-env/profile.ts +161 -0
- package/src/agent-mission/driver.ts +51 -1
- package/src/agent-mission/supervisor-metrics-cli.ts +40 -0
- package/src/agent-mission/supervisor-metrics.ts +218 -0
- package/src/agent-substrate/pr-reviewer.ts +2 -0
- package/src/ask-user-question/pending-questions.ts +5 -0
- package/src/auth/github-app-token.ts +112 -13
- package/src/autopilot/build/llm-conflict-merge.ts +32 -6
- package/src/autopilot/track-agent-shadow.ts +2 -1
- package/src/briefing/brief-items.ts +276 -0
- package/src/budget/usage-outcomes.ts +204 -0
- package/src/claims/claims-render.ts +14 -5
- package/src/cli/agent-env-cli.ts +21 -0
- package/src/cli/brief-cli.ts +73 -0
- package/src/cli/decisions-cli.ts +9 -0
- package/src/cli/doctor-cli.ts +23 -1
- package/src/cli/doctor-node-modules.ts +147 -0
- package/src/cli/intake-cli.ts +46 -17
- package/src/cli/know-cli.ts +20 -0
- package/src/cli/logs-cli.ts +43 -1
- package/src/cli/pod-cli.ts +2 -0
- package/src/cli/pr-cli.ts +80 -12
- package/src/cli/release-cli.ts +66 -29
- package/src/cli/seat-requests-cli.ts +52 -0
- package/src/cli/self-update.ts +200 -1
- package/src/cli/usage-cli.ts +26 -0
- package/src/context-bus/context-now-public.ts +16 -6
- package/src/context-bus/context-now.ts +3 -1
- package/src/context-bus/coord-events.ts +6 -4
- package/src/decisions/decision-cards.ts +33 -7
- package/src/decisions/proact-meter.ts +286 -0
- package/src/decisions/proact1-lite.ts +86 -0
- package/src/decisions/web-push-decision-cards.ts +1 -1
- package/src/discord-self-message.ts +9 -0
- package/src/domains/alert-audit.ts +271 -0
- package/src/domains/core-tools.ts +4 -3
- package/src/domains/ops-facts-tool.ts +31 -1
- package/src/flow-loop/split.ts +24 -0
- package/src/harness/harness-cli-command.ts +147 -17
- package/src/harness/harness-incidents.ts +2 -0
- package/src/harness/harness-pod-dispatch.ts +67 -8
- package/src/harness/harness-queue.ts +380 -50
- package/src/harness/harness-seams.ts +13 -3
- package/src/harness/helper-repair.ts +218 -0
- package/src/harness/helper-scan.ts +27 -4
- package/src/harness/launch-stamp.ts +236 -0
- package/src/harness/ledger-write-guard-child.fixture.ts +12 -0
- package/src/harness/ledger-write-guard.ts +35 -0
- package/src/harness/nested-elanous-policy.ts +114 -0
- package/src/harness/pod-memory-policy.ts +15 -0
- package/src/harness/repository-name.ts +55 -0
- package/src/hq/fence-audit.ts +90 -0
- package/src/hq/hq.ts +70 -6
- package/src/hq/lease.ts +9 -7
- package/src/hq/move-plan.ts +126 -0
- package/src/hq/promote.ts +31 -0
- package/src/hq/transfer.ts +185 -0
- package/src/index.ts +189 -13
- package/src/intake-plane/check.ts +63 -0
- package/src/intake-plane/digest.ts +65 -21
- package/src/intake-plane/front-classifier.ts +6 -0
- package/src/intake-plane/items.ts +3 -2
- package/src/intake-plane/lens.ts +177 -0
- package/src/intake-plane/route.ts +145 -1
- package/src/knowledge/know-find.ts +105 -0
- package/src/llm.ts +75 -19
- package/src/loops/budget.ts +36 -5
- package/src/loops/checker.ts +2 -2
- package/src/loops/orchestrator/author-depth.ts +65 -9
- package/src/loops/orchestrator/author-input-check.ts +8 -3
- package/src/loops/orchestrator/author-ledger.ts +3 -1
- package/src/loops/orchestrator/finish-rate.ts +14 -3
- package/src/loops/orchestrator/seat-share.ts +56 -0
- package/src/loops/orchestrator/tick.ts +107 -29
- package/src/loops/orchestrator/traffic.ts +117 -11
- package/src/loops/registry.ts +142 -61
- package/src/maturity/bot-slash-catalog.ts +11 -2
- package/src/maturity/feature-maturity.ts +4 -3
- package/src/maturity/tui-slash-availability.ts +40 -0
- package/src/mss/logging/log-store.ts +35 -4
- package/src/nexus/api/http-server.ts +28 -14
- package/src/nexus/api/loop-edges.ts +173 -0
- package/src/nexus/api/schedules-read.ts +13 -0
- package/src/nexus/api/seat-requests.ts +79 -56
- package/src/oauth/overload-failover-launch.ts +75 -0
- package/src/oauth/overload-failover.ts +137 -0
- package/src/prompt-enhance/enhance.ts +6 -1
- package/src/release-loop/auto-start.ts +6 -3
- package/src/release-loop/checklist.ts +19 -5
- package/src/release-loop/feature-store.ts +59 -31
- package/src/release-loop/merged-pr-checklist.ts +125 -0
- package/src/release-loop/placement.ts +98 -29
- package/src/seat-dispatch/seat-ask.ts +33 -6
- package/src/seat-dispatch/seat-request-eligibility.ts +19 -0
- package/src/seat-dispatch/seat-request-ledger.ts +133 -0
- package/src/seat-loop/seat-loop.ts +215 -12
- package/src/self-dev/ask-launch-flow.ts +22 -1
- package/src/self-dev/authored-goal-trace.ts +64 -0
- package/src/self-dev/dev-cli.ts +19 -1
- package/src/self-dev/dev-pipeline.ts +14 -9
- package/src/self-dev/draft-sweep.ts +90 -10
- package/src/self-dev/draft-triage-rules.ts +25 -8
- package/src/self-dev/entrance-registry.ts +10 -6
- package/src/self-dev/old-door.ts +73 -0
- package/src/self-dev/orchestrate.ts +15 -1
- package/src/self-dev/review-provider-fallback.ts +6 -1
- package/src/self-dev/run-supervisor.ts +49 -2
- package/src/self-implement/app-api-budget.ts +166 -0
- package/src/self-implement/budget-gate.ts +7 -5
- package/src/self-implement/follow-up-goals.ts +289 -0
- package/src/self-implement/frozen-merges.ts +3 -2
- package/src/self-implement/goal-author.ts +50 -6
- package/src/self-implement/goal-clarification-escalation.ts +5 -0
- package/src/self-implement/heal-intake.ts +120 -2
- package/src/self-implement/heal-triage.ts +44 -0
- package/src/self-implement/host-regate.ts +9 -2
- package/src/self-implement/l8-merge-queue.ts +132 -0
- package/src/self-implement/orchestrator.ts +325 -47
- package/src/self-implement/pipeline-shape.ts +1 -1
- package/src/self-implement/revert-guard.ts +42 -7
- package/src/self-implement/run-ledger.ts +6 -0
- package/src/self-implement/run-status-mapping.ts +2 -0
- package/src/self-implement/seams.ts +45 -16
- package/src/self-implement/self-implement-cli.ts +1 -0
- package/src/self-implement/speed-claims.ts +338 -0
- package/src/session-runtime/index.ts +2 -0
- package/src/session-runtime/retry-api.ts +87 -0
- package/src/session-runtime/retry-policy.ts +107 -6
- package/src/steward/triage.ts +74 -3
- package/src/steward/working-backwards.ts +20 -2
- package/src/task-cards/card-cli.ts +25 -0
- package/src/task-cards/card-store.ts +5 -3
- package/src/task-orchestrator/surfaces/pod-artifact-return.ts +63 -48
- package/src/task-orchestrator/surfaces/pod-command-job.ts +84 -9
- package/src/task-orchestrator/surfaces/pod-failure-reason.ts +48 -0
- package/src/task-orchestrator/surfaces/pod-ledger-collect.ts +4 -3
- package/src/task-orchestrator/surfaces/pod-ledger-prod-sink.ts +75 -0
- package/src/task-orchestrator/surfaces/pod-pool.ts +70 -9
- package/src/task-orchestrator/surfaces/pod-source-receive.ts +37 -1
- package/src/task-orchestrator/surfaces/self-implement-pod.ts +166 -46
- package/src/task-orchestrator/surfaces/self-implement.ts +7 -1
- package/src/telegram-commands.ts +5 -0
- package/src/telegram.ts +72 -4
- package/src/user-config.ts +64 -7
- package/src/version/packed-revision.json +1 -1
- package/src/workflow-runtime/nodes/bash.ts +9 -1
- package/apps/pwa/out/_next/static/chunks/4562-071d8bac44a01069.js +0 -1
- package/apps/pwa/out/_next/static/chunks/5977-2df489622a52a33a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/approvals/page-74383f890f075511.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/board/page-c496bb16da85385f.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/botlab/page-1abfe3aec3be6bdc.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/consult/page-fb260b9283dbf646.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/design-check/page-61ec1d2e92bdd50a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/inside/page-fd7e200d4d83fbd7.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/live/page-d47266766766d227.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-2ce5471926761fdd.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/not-found-e995d30f6800b6bf.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/observatory/page-39f89c53038a51d4.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-5a753bb4ec0cc511.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/outputs/page-04250f0e2c0d03df.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/page-341480ed8e3c1ea8.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/sessions/page-8ac8d71c2adf9c8a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-e1e47d8d940aba3d.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/done/page-94dc383d3d54db1a.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/setup/page-b3759cc14da80908.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/today/page-194dce4a83143fce.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/trace/page-35bdeae2e2c17147.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-16bef3da05a900c3.js +0 -1
- package/apps/pwa/out/_next/static/chunks/app/worktrees/page-134c1bc762aee62c.js +0 -1
- package/apps/pwa/out/_next/static/css/2e33713c444d5b39.css +0 -1
- package/apps/pwa/out/_next/static/x6mjI6vqOkVVu0jFuDkz1/_buildManifest.js +0 -1
- /package/apps/pwa/out/_next/static/{x6mjI6vqOkVVu0jFuDkz1 → rv9cierV0jSOvDBm1g0XB}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5977],{48087:(e,l,o)=>{o.d(l,{Hw:()=>x,vm:()=>L,f4:()=>j,OE:()=>E,Ue:()=>P,Ye:()=>R});var t=o(91123),a=o(40828),i=o(22403),n=o(17873),r=o(74227),s=o(94476),p=o(65962),b=o(20931),c=o(35308),d=o(91925),u=o(36744),h=o(46044),w=o(73855),f=o(24982),g=o(32030),k=o(13080),v=o(53987),m=o(26879),y=o(76340),A=o(5500),O=o(31826),C=o(33932),T=o(92161);let x=[{id:"today",label:"오늘",icon:t.A,bottomTab:!0},{id:"talk",label:"대화",icon:a.A,bottomTab:!0},{id:"work",label:"일",icon:i.A,bottomTab:!0},{id:"make",label:"만들기",icon:n.A,bottomTab:!0},{id:"files",label:"자료",icon:r.A,bottomTab:!1},{id:"settings",label:"설정",icon:s.A,bottomTab:!1},{id:"ops",label:"운영\uD83D\uDD12",icon:p.A,bottomTab:!1}];function R(e,l){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"owner",t=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4?arguments[4]:void 0,i=e=>{var l;return null!=(l=e.visibility)?l:"public"},n=e.filter(e=>"ops"===e.group?t:(0,T.EX)(o,e.href,a));return{main:n.filter(e=>"ops"===e.group||"public"===i(e)),labs:l.showLabs?n.filter(e=>"ops"!==e.group&&"labs"===i(e)):[],hidden:l.showHidden?n.filter(e=>"ops"!==e.group&&"hidden"===i(e)):[]}}let j="elanous.nav.showLabs",L="elanous.nav.showHidden",E=[{href:"/share",category:"system-share-target",reason:"운영체제가 공유 동작으로 호출하는 Share Target 진입점."},{href:"/missions",category:"dynamic-route-parent",reason:"`[id]`를 받는 동적 주소이며 부모 경로 자체는 없다."},{href:"/setup",category:"provider-onboarding",reason:"LLM provider 온보딩 진입점."},{href:"/setup/done",category:"provider-onboarding-complete",reason:"LLM provider 온보딩 완료 화면."},{href:"/settings/devices",category:"settings-subpage",reason:"Settings 아래 Device fleet 하위 화면."},{href:"/workflows",category:"workflow-legacy-redirect",reason:"기존 워크플로 링크를 /editor?mode=workflow 로 전달한다."},{href:"/workflows/chat-ui",category:"workflow-subflow",reason:"Workflows에서 여는 hosted chat 하위 흐름."},{href:"/",category:"root-welcome",reason:"첫 방문자를 위한 루트 welcome 화면."},{href:"/404",category:"error-page",reason:"오류 페이지."},{href:"/consult",category:"contact-form",reason:"AX 도입 상담\xb7과정 문의를 접수하는 입력 화면(CS1 \xb7 #22436)."},{href:"/morning",category:"unwired-screen",reason:"부르는 백엔드가 아직 없는 미배선 화면."},{href:"/inside",category:"beta-direct-link",reason:"시연자가 주소로 여는 엘라누스 안쪽 장면 지도(메뉴에는 노출하지 않음)."},{href:"/botlab",category:"diagnostic-readonly",reason:"봇 화면 \xab벽\xbb을 한 자리에서 보는 읽기 진단 화면(#15390 \xb7 봇 운영자용)."}],P=[{group:"today",href:"/today",label:"오늘",hint:"결정 대기 \xb7 맡긴 일 \xb7 최근 대화",icon:t.A,kind:null},{group:"today",href:"/approvals",label:"승인 대기",hint:"아이디어 PR 요약 \xb7 승인하고 머지",icon:b.A,kind:null},{group:"today",href:"/intake",label:"넣기",hint:"넣으면 흡수 \xb7 작업 \xb7 그래프로 (URL \xb7 미션 \xb7 메모)",icon:t.A,kind:null},{group:"talk",href:"/chat",label:"채팅",hint:"채팅 (스트리밍 \xb7 multimodal \xb7 mic)",icon:a.A,kind:"chat"},{group:"talk",href:"/exec",label:"COO 에게 맡기기",hint:"COO 에게 맡기기 \xb7 맡긴 일",icon:c.A,kind:null},{group:"work",href:"/autopilot",label:"미션",hint:"미션 \xb7 작업 (미션 계보\xb7골 던지기\xb7작업 보드\xb7자율행동)",icon:i.A,kind:null,activeAlso:["/tasks","/missions"]},{group:"work",href:"/outputs",label:"산출물",hint:"엘라누스가 만든 문서 \xb7 슬라이드 \xb7 보고서 \xb7 영상",icon:d.A,kind:null},{group:"work",href:"/scheduler",label:"예약",hint:"예약 잡 종합 현황 (크론\xb7데몬\xb7launchd)",icon:u.A,kind:null},{group:"work",href:"/live",label:"Live",hint:"런이 판단\xb7기획하는 신호 (진짜 수 \xb7 쇼 모드)",icon:h.A,kind:null},{group:"work",href:"/trace",label:"Trace",hint:"렌즈를 좁혀 런을 따라간다 (플릿 → 런 → 판단)",icon:w.A,kind:null},{group:"make",href:"/term",label:"터미널",hint:"터미널 + agent dock",icon:n.A,kind:"term"},{group:"make",href:"/editor",label:"편집기",hint:"워크플로 \xb7 실행 그래프 작성\xb7편집",icon:f.A,kind:null,visibility:"labs",activeAlso:["/workflows"]},{group:"make",href:"/design-check",label:"디자인",hint:"디자인 시스템 고르기 \xb7 시안 \xb7 URL 로 내 시스템",icon:g.A,kind:null},{group:"make",href:"/workspace",label:"여러 탭",hint:"여러 탭 동시 보기",icon:d.A,kind:null,visibility:"labs"},{group:"files",href:"/vault",label:"Obsidian 노트",hint:"Vault — Obsidian 노트 (브라우저\xb7에디터\xb7검색\xb7그래프)",icon:r.A,kind:null},{group:"files",href:"/field",label:"현장 올리기",hint:"현장 올리기 \xb7 사진과 메모",icon:t.A,kind:null},{group:"files",href:"/market",label:"마켓",hint:"플러그인 찾아보기 \xb7 상세 \xb7 설치됨",icon:k.A,kind:null},{group:"settings",href:"/settings",label:"설정",hint:"환경 + provider + theme",icon:s.A,kind:"settings"},{group:"ops",href:"/loops",label:"루프 현황",hint:"루프\xb7크론 발화 상태 (읽기 전용 \xb7 beta)",icon:h.A,kind:null},{group:"ops",href:"/ops/release",label:"릴리스",hint:"판 진행 노드 줄 \xb7 로그 꼬리",icon:f.A,kind:null},{group:"ops",href:"/ops/checklist",label:"판별 피처",hint:"확인표 칸 목록 \xb7 상태 \xb7 담당 \xb7 근거",icon:b.A,kind:null},{group:"ops",href:"/ops/seats",label:"자리 현황",hint:"자리별 지금 일 \xb7 착지 \xb7 막힘 \xb7 결정 대기(?capture=public 공개 시연)",icon:v.A,kind:null},{group:"ops",href:"/bots",label:"봇",hint:"봇 신원 + 공통 명령 카탈로그 (읽기 전용)",icon:c.A,kind:null,visibility:"hidden"},{group:"ops",href:"/observatory",label:"관측",hint:"subject 관측 (talk \xb7 screen \xb7 agent)",icon:m.A,kind:null,visibility:"hidden"},{group:"ops",href:"/worktrees",label:"작업 트리",hint:"격리 작업 트리 목록\xb7상태",icon:f.A,kind:null,visibility:"hidden"},{group:"ops",href:"/control",label:"제어",hint:"데몬 제어 패널",icon:p.A,kind:"control",visibility:"hidden"},{group:"work",href:"/tasks",label:"Tasks",hint:"작업 보드 (Missions 안 ② 작업)",icon:y.A,kind:"tasks",visibility:"hidden"},{group:"work",href:"/board",label:"보드",hint:"태스크 카드 흐름 (스튜어드 → 실행 → 착지 → 릴리스)",icon:y.A,kind:null,visibility:"labs"},{group:"work",href:"/sessions",label:"대화 카드",hint:"대화 카드 데크 (스와이프 결정)",icon:A.A,kind:null,visibility:"hidden"},{group:"today",href:"/reflection",label:"Reflection",hint:"오늘의 회고 (5분 갱신)",icon:O.A,kind:null,visibility:"hidden"},...[].map(e=>({...e,group:"files"})),{group:"make",href:"/showroom",label:"Showroom",hint:"multi-agent 동시 비교 (broadcast \xb7 CV-3)",icon:C.A,kind:null,visibility:"labs"}]},65354:(e,l,o)=>{o.d(l,{AF:()=>t});let t={all:["nexus"],health:()=>[...t.all,"health"],snapshot:()=>[...t.all,"snapshot"],tabs:e=>e?[...t.all,"tabs",{kind:e}]:[...t.all,"tabs"],tab:e=>[...t.all,"tab",e],templates:()=>[...t.all,"templates"],template:e=>[...t.all,"template",e],config:()=>[...t.all,"config"],switches:()=>[...t.all,"switches"],switch:e=>[...t.all,"switch",e],secrets:()=>[...t.all,"secrets"],bindingChannels:()=>[...t.all,"bindings","channels"],bindings:e=>[...t.all,"bindings",e],binding:(e,l)=>[...t.all,"binding",e,l],logsTail:(e,l)=>l?[...t.all,"logs",e,{lines:l}]:[...t.all,"logs",e],workflows:()=>[...t.all,"workflows"],workflow:e=>[...t.all,"workflow",e],workflowRun:e=>[...t.all,"workflow-run",e],workflowRuns:()=>[...t.all,"workflow-runs"],pendingApprovals:()=>[...t.all,"workflow-pending-approvals"],platforms:()=>[...t.all,"platforms"],providers:()=>[...t.all,"providers"],worktrees:()=>[...t.all,"worktrees"],designCheck:()=>[...t.all,"design-check"],designPreviews:()=>[...t.all,"design-previews"],designPreview:e=>[...t.all,"design-preview",e],registryCatalog:()=>[...t.all,"registry-catalog"],resolvedView:()=>[...t.all,"resolved-view"]};t.snapshot(),t.tabs(),t.health(),t.snapshot(),t.config(),t.switches()},92161:(e,l,o)=>{o.d(l,{dY:()=>n,EX:()=>r});let t={pwaRoute:{"/":{pwa:"stable"},"/404":{pwa:"stable"},"/setup":{pwa:"stable"},"/setup/done":{pwa:"stable"},"/consult":{pwa:"stable"},"/chat":{pwa:"stable"},"/today":{pwa:"stable"},"/term":{pwa:"stable"},"/live":{pwa:"stable"},"/market":{pwa:"stable"},"/sessions":{pwa:"stable"},"/settings":{pwa:"beta"},"/editor":{pwa:"beta"},"/intake":{pwa:"beta"},"/trace":{pwa:"beta"},"/inside":{pwa:"beta"},"/board":{pwa:"beta"},"/autopilot":{pwa:"beta"},"/missions/[id]":{pwa:"beta"},"/tasks":{pwa:"beta"},"/workspace":{pwa:"beta"},"/reflection":{pwa:"beta"},"/vault":{pwa:"beta"},"/observatory":{pwa:"beta"},"/exec":{pwa:"beta"},"/outputs":{pwa:"beta"},"/field":{pwa:"beta"},"/showroom":{pwa:"beta"},"/workflows":{pwa:"beta"},"/approvals":{pwa:"tool"},"/worktrees":{pwa:"tool"},"/design-check":{pwa:"tool"},"/control":{pwa:"tool"},"/scheduler":{pwa:"ops"},"/loops":{pwa:"beta"},"/ops/release":{pwa:"ops"},"/ops/seats":{pwa:"ops"},"/ops/checklist":{pwa:"ops"},"/dashboard":{pwa:"ops"},"/bots":{pwa:"ops"},"/botlab":{pwa:"ops"},"/morning":{pwa:"broken"},"/settings/devices":{pwa:"broken"},"/workflows/chat-ui":{pwa:"broken"},"/share":{pwa:"system"}}},a=Object.fromEntries(Object.entries(t.pwaRoute).map(e=>{let[l,o]=e;return[l,o.pwa]}));function i(e){var l;let o=(null==(l=e.split(/[?#]/,1)[0])?void 0:l.replace(/\/+$/,""))||"/";return Object.prototype.hasOwnProperty.call(a,o)?o:o.startsWith("/missions/")&&-1===o.slice(10).indexOf("/")?"/missions/[id]":o}function n(e){let l=i(e);return Object.prototype.hasOwnProperty.call(a,l)?a[l]:void 0}function r(e,l,o){let a=i(l);if("general"===e&&(null==o?void 0:o.showBeta)&&"beta"===n(a))return!0;let r=function(e,l){var o;if(!Object.prototype.hasOwnProperty.call(t.pwaRoute,e))return;let a=t.pwaRoute[e];return null!=(o=a.pwa)?o:"desktop"===l?a.pwa:void 0}(a,"pwa");return!!r&&("owner"===e||"system"!==r&&("/settings"===a||"stable"===r||"contributor"===e&&("beta"===r||"tool"===r)))}},94306:(e,l,o)=>{o.d(l,{M1:()=>p,Qj:()=>b,tI:()=>s});var t=o(55539),a=o(46124),i=o(76642),n=o(50363);let r=(0,a.createContext)(null);function s(e){let{client:l,queryClient:o,defaultStaleTimeMs:s,children:p}=e,b=(0,a.useMemo)(()=>null!=o?o:new i.E({defaultOptions:{queries:{staleTime:null!=s?s:2e3,refetchOnWindowFocus:!1}}}),[o,s]);return(0,t.jsx)(r.Provider,{value:l,children:(0,t.jsx)(n.Ht,{client:b,children:p})})}function p(){let e=(0,a.useContext)(r);if(!e)throw Error("useNexusClient must be used within <NexusProvider>");return e}function b(){return(0,a.useContext)(r)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6605],{3704:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var r=a(46124);let n=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 o=(0,r.createContext)({}),c=(0,r.forwardRef)((e,t)=>{var a,s,c;let{color:i,size:d,strokeWidth:u,absoluteStrokeWidth:m,className:p="",children:h,iconNode:b,...x}=e,{size:f=24,strokeWidth:g=2,absoluteStrokeWidth:w=!1,color:y="currentColor",className:v=""}=null!=(a=(0,r.useContext)(o))?a:{},N=(null!=m?m:w)?24*Number(null!=u?u:g)/Number(null!=d?d:f):null!=u?u:g;return(0,r.createElement)("svg",{ref:t,...l,width:null!=(s=null!=d?d:f)?s:l.width,height:null!=(c=null!=d?d:f)?c:l.height,stroke:null!=i?i:y,strokeWidth:N,className:n("lucide",v,p),...!h&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(x)&&{"aria-hidden":"true"},...x},[...b.map(e=>{let[t,a]=e;return(0,r.createElement)(t,a)}),...Array.isArray(h)?h:[h]])}),i=(e,t)=>{let a=(0,r.forwardRef)((a,l)=>{let{className:o,...i}=a;return(0,r.createElement)(c,{ref:l,iconNode:t,className:n("lucide-".concat(s(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),o),...i})});return a.displayName=s(e),a}},5997:(e,t,a)=>{"use strict";a.d(t,{Zr:()=>l,f6:()=>n,oD:()=>s});let r="elanous.daemon.sessionId";function n(){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 s(){let e=function(){let e=new URLSearchParams(window.location.search).get("session");return e?(localStorage.setItem(r,e),e):localStorage.getItem(r)}();if(e)return e;let t=n();return localStorage.setItem(r,t),t}function l(){let e=n();return localStorage.setItem(r,e),e}},15151:(e,t,a)=>{"use strict";a.d(t,{C:()=>i,DaemonProvider:()=>d,Q:()=>u});var r=a(55539),n=a(46124),s=a(8101),l=a(5997),o=a(18060),c=a(72215);let i=(0,n.createContext)(null);function d(e){let{children:t}=e,a={baseUrl:"",token:"",provider:""},[d,u]=(0,n.useState)(a),[m,p]=(0,n.useState)(""),[h]=(0,n.useState)(()=>new o.ki(a));(0,n.useEffect)(()=>{let e=(0,s.Fp)();u(e),h.updateConfig(e),p((0,l.oD)()),(0,c.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[h]),(0,n.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let t=(0,s.Fp)();h.updateConfig(t),u(t),(0,c.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,c.cY)("webterm.provider.daemon.session-cross-tab",{previous:t||"(empty)",next:e.newValue}),e.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[h]);let b=e=>{u(t=>{let a={...t,...e};return(0,s.Qc)(e),h.updateConfig(a),(0,c.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),a})},x=e=>{p(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,c.cY)("webterm.provider.daemon.session-set",{sessionId:e})},f=(0,n.useMemo)(()=>({config:d,setConfig:b,client:h,sessionId:m,setSessionId:x}),[d,h,m]);return(0,r.jsx)(i.Provider,{value:f,children:t})}function u(){let e=(0,n.useContext)(i);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},39061:(e,t,a)=>{Promise.resolve().then(a.bind(a,88843))},42827:(e,t,a)=>{"use strict";a.d(t,{GM:()=>o,J3:()=>l,WF:()=>r,bR:()=>s,m:()=>c,r5:()=>n});let r="/v1/devices",n="/v1/approvals/merges",s="/v1/templates/capability-preview",l="/v1/idle-nudge/preview",o="/v1/morning-digest/showroom",c="/v1/next-fluent/dispatch"},54508:(e,t,a)=>{"use strict";a.d(t,{V5:()=>s,tV:()=>l});var r=a(42827);class n extends Error{constructor(e,t,a){super(a||t),this.status=e,this.error=t,this.reason=a,this.name="MergeApprovalsApiError"}}function s(e,t){return e instanceof n?401===e.status||"unauthorized"===e.error?{text:"이 기기에 소유자 토큰이 없어 승인 목록을 못 읽었습니다 — 이미 연결된 기기의 설정 › 연결 토큰 만들기 에서 토큰을 만들어, 이 기기의 설정 › 데몬 연결 › 연결 토큰 칸에 붙이면 바로 보입니다.",href:"/app/settings/#bearer-token"}:"gh-failed"===e.error?{text:"데몬이 GitHub 를 읽지 못했습니다(데몬 기계의 gh 로그인\xb7네트워크) — 잠시 뒤 다시 열어 보세요.".concat(e.reason?" 사유: ".concat(e.reason.split("\n")[0].slice(0,160)):"")}:"gh-invalid-response"===e.error?{text:"GitHub 응답을 해석하지 못했습니다 — 잠시 뒤 다시 열어 보세요."}:"approvals-repo-unknown"===e.error?{text:"승인할 저장소를 모릅니다 — 데몬 설정 intake.approvals.repo(예: owner/repo)를 채워 주세요.",href:"/app/settings/"}:e.reason?{text:e.reason}:{text:"".concat(t," (").concat(e.status," ").concat(e.error,")")}:e instanceof TypeError?{text:"데몬에 닿지 못했습니다 — 데몬이 켜져 있는지, 이 기기가 같은 네트워크(tailnet)에 있는지 확인하세요."}:{text:e instanceof Error&&e.message?e.message:t}}function l(e){var t,a;let s=null!=(t=e.fetchImpl)?t:fetch,l=(null!=(a=e.baseUrl)?a:"").replace(/\/+$/,"");async function o(t,a){let r={...a,headers:{"content-type":"application/json",...e.authHeader?{authorization:e.authHeader}:{}}},o=e.client?await e.client.fetchResponse(t,r):await s("".concat(l).concat(t),r),c=await o.json().catch(()=>null);if(!o.ok){var i;let e=c&&"object"==typeof c?c:{};throw new n(o.status,null!=(i=e.error)?i:"request-failed",e.reason)}return c}return{list:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"open";return o("merged"===e?"".concat(r.r5,"?state=merged"):r.r5)},get:e=>o("".concat(r.r5,"/").concat(e)),check:(e,t)=>o("".concat(r.r5,"/").concat(e,"/check"),{method:"POST",body:JSON.stringify({headSha:t})}),merge:(e,t)=>o("".concat(r.r5,"/").concat(e,"/merge"),{method:"POST",body:JSON.stringify({headSha:t})})}}},74780:(e,t,a)=>{"use strict";function r(e){return{slides:e.slides.map(e=>{let{image:t,caption:a,include:r}=e;return{image:t,caption:a,include:r}}),caption:{hook:e.caption.hook,body:e.caption.body},hashtags:[...e.hashtags],cover:{text:e.cover.text,sub:e.cover.sub},location:e.location}}a.d(t,{$Y:()=>l,LP:()=>c,Mz:()=>r,ll:()=>d,rH:()=>o});class n extends Error{constructor(e,t){super(t),this.status=e,this.name="GraphApprovalsApiError"}}let s={list:"목록을 보려면",decide:"승인하려면",save:"초안을 저장하려면"},l="/app/settings/#bearer-token";function o(e){return e instanceof n&&(401===e.status||403===e.status)}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"decide";return e instanceof n?401===e.status||403===e.status?"".concat(s[t]," 이 기기를 데몬에 연결해야 합니다 — 설정 › 데몬 연결 › 연결 토큰 칸에 토큰을 넣어 주세요."):404===e.status?"이 실행을 찾지 못했습니다. 목록을 다시 확인해 주세요.":409===e.status?"이미 결정된 실행입니다. 목록을 다시 확인해 주세요.":400===e.status?"결정 내용을 확인한 뒤 다시 시도해 주세요.":"승인 요청을 처리하지 못했습니다. 잠시 뒤 다시 시도해 주세요.":e instanceof TypeError?"서버에 연결하지 못했습니다. 연결 상태를 확인해 주세요.":"승인 요청을 처리하지 못했습니다. 잠시 뒤 다시 시도해 주세요."}let i="/v1/graph-approvals";function d(e){var t,a;let r=(null!=(t=e.baseUrl)?t:"").replace(/\/+$/,""),s=null!=(a=e.fetchImpl)?a:fetch;async function l(t,a){let l={...a,headers:{"content-type":"application/json",...e.authHeader?{authorization:e.authHeader}:{}}},o=e.client?await e.client.fetchResponse(t,l):await s("".concat(r).concat(t),l),c=await o.json().catch(()=>null);if(!o.ok){let e=c&&"object"==typeof c&&"error"in c&&"string"==typeof c.error?c.error:"request-failed";throw new n(o.status,e)}return c}return{list:()=>l(i),decide:(e,t,a)=>l("".concat(i,"/").concat(encodeURIComponent(e),"/").concat(encodeURIComponent(t)),{method:"POST",body:JSON.stringify({decision:a})}),saveFeedDraft:(e,t,a)=>l("".concat(i,"/").concat(encodeURIComponent(e),"/").concat(encodeURIComponent(t),"/feed-draft"),{method:"PUT",body:JSON.stringify(a)}),feedMedia:async(t,a,l)=>{let o="".concat(i,"/").concat(encodeURIComponent(t),"/").concat(encodeURIComponent(a),"/media?path=").concat(encodeURIComponent(l)),c={headers:e.authHeader?{authorization:e.authHeader}:{}},d=e.client?await e.client.fetchResponse(o,c):await s("".concat(r).concat(o),c);if(!d.ok)throw new n(d.status,"media-failed");return d.blob()}}}},76573:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let r=(0,a(3704).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},88843:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>j});var r=a(55539),n=a(46124),s=a(65761),l=a(77362),o=a(15151),c=a(97479),i=a(54508);function d(e,t){return"UNKNOWN"===t&&e<3?3e3:null}async function u(e,t){let a,r=0,n=d(0,"UNKNOWN");for(;null!==n;){var s,l,o;if(await t.sleep(n),t.isActive&&!t.isActive())break;r++;try{a=await e(),null==(l=t.onDetail)||l.call(t,a)}catch(e){}null==(s=t.onAttempt)||s.call(t),n=d(r,null!=(o=null==a?void 0:a.mergeable)?o:"UNKNOWN")}return{attempts:r,...a?{last:a}:{}}}var m=a(76573);function p(e){let{view:t,target:a}=e,[s]=(0,n.useState)(()=>Date.now()),[l,o]=(0,n.useState)(s);(0,n.useEffect)(()=>{let e=window.setInterval(()=>o(Date.now()),100);return()=>window.clearInterval(e)},[]);let c=function(e,t,a){let r="".concat((Math.max(0,e)/1e3).toFixed(1),"초");return{title:"merged"===t?"GitHub 에서 반영된 코드 변경을 읽고 있습니다":a?"GitHub 에서 승인을 기다리는 코드 변경과 #".concat(a," 카드를 읽고 있습니다"):"GitHub 에서 승인을 기다리는 코드 변경을 읽고 있습니다",clock:r,hint:e>=8e3?"평소(2~5초)보다 오래 걸립니다 — GitHub 응답을 기다리는 중이며 멈추지 않았습니다.":null}}(l-s,t,a);return(0,r.jsxs)("section",{role:"status","aria-live":"polite","aria-busy":"true",className:"space-y-3","data-approvals-loading":!0,children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 rounded-xl border border-blue-500/40 bg-blue-500/5 p-4",children:[(0,r.jsx)(m.A,{className:"h-6 w-6 shrink-0 text-blue-500 motion-safe:animate-spin","aria-hidden":!0}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("p",{className:"font-medium",children:c.title}),c.hint&&(0,r.jsx)("p",{className:"mt-1 text-sm text-amber-600 dark:text-amber-400",children:c.hint})]}),(0,r.jsx)("span",{className:"font-mono text-lg tabular-nums text-blue-600 dark:text-blue-300","aria-label":"경과 시간",children:c.clock})]}),(0,r.jsx)("div",{className:"h-1 overflow-hidden rounded-full bg-muted","aria-hidden":!0,children:(0,r.jsx)("div",{className:"h-full w-1/3 rounded-full bg-blue-500 motion-safe:animate-[approvals-slide_1.2s_ease-in-out_infinite]"})}),(0,r.jsx)("style",{children:"@keyframes approvals-slide{0%{transform:translateX(-100%)}100%{transform:translateX(300%)}}"}),[0,1].map(e=>(0,r.jsxs)("div",{className:"space-y-3 rounded-xl border border-border bg-card p-5 motion-safe:animate-pulse","aria-hidden":!0,children:[(0,r.jsx)("div",{className:"h-4 w-2/3 rounded bg-muted"}),(0,r.jsx)("div",{className:"h-3 w-full rounded bg-muted"}),(0,r.jsx)("div",{className:"h-3 w-5/6 rounded bg-muted"})]},e))]})}function h(e){let{view:t,onChange:a}=e,n=(e,n)=>(0,r.jsx)("button",{type:"button",role:"tab","aria-selected":t===e,onClick:()=>a(e),className:"rounded-md px-3 py-1 text-sm ".concat(t===e?"bg-foreground text-background":"bg-muted text-foreground"),children:n});return(0,r.jsxs)("div",{role:"tablist","aria-label":"승인 목록 보기",className:"flex gap-2",children:[n("open","승인 대기"),n("merged","완료")]})}function b(e){let{brief:t,lineage:a,summary:n}=e;return(0,r.jsxs)(r.Fragment,{children:[null!==t?(0,r.jsx)("section",{"aria-label":"승인 요약",className:"mt-3 break-words text-sm leading-relaxed [&_a]:text-blue-600 [&_a]:underline [&_blockquote]:border-l-2 [&_blockquote]:pl-3 [&_h3]:mt-3 [&_h3]:font-semibold [&_li]:ml-5 [&_li]:list-disc [&_p]:my-2 [&_table]:block [&_table]:overflow-x-auto",children:(0,r.jsx)(s.oz,{remarkPlugins:[l.A],components:{a:e=>{let{href:t,children:a}=e;return(0,r.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",children:a})}},children:t})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"mt-3 rounded border border-amber-500/40 bg-amber-500/15 p-3 text-sm text-amber-800 dark:text-amber-300",children:"승인 요약 내용이 없습니다 — GitHub 본문을 보거나 발사자에게 요청하세요"}),(0,r.jsx)("p",{className:"mt-3 whitespace-pre-wrap text-sm",children:n})]}),a&&(0,r.jsxs)("p",{className:"mt-3 text-sm text-muted-foreground",children:["아이디어 원장: ",a]})]})}function x(e){var t;let{gate:a,busy:n,blocked:s,mergeLabel:l,onCheck:o,onMerge:c}=e;return(0,r.jsxs)("div",{className:"mt-3 space-y-2","aria-label":"머지 전 검사",children:["none"===a.status&&(0,r.jsx)("button",{type:"button",onClick:o,disabled:n,className:"rounded-lg border px-3 py-2 text-sm disabled:opacity-50",children:"머지 전 검사 시작"}),"running"===a.status&&(0,r.jsx)("p",{role:"status",className:"text-sm",children:"검사 중…"}),"passed"===a.status&&(0,r.jsxs)("p",{className:"text-sm text-green-700 dark:text-green-400",children:["검사 통과 (",null!=(t=a.os)?t:"unknown",")",a.baseDrifted?" \xb7 검사 뒤 main 이 움직였다 — 머지 때 겹치는 파일이 있으면 다시 검사를 요구한다":""]}),("failed"===a.status||"unmeasured"===a.status)&&(0,r.jsxs)("div",{role:"alert",className:"text-sm text-red-600",children:[(0,r.jsx)("p",{children:"failed"===a.status?"검사 실패":"검사 측정 불가"}),(0,r.jsx)("ul",{className:"list-inside list-disc",children:a.failures.map((e,t)=>(0,r.jsx)("li",{children:e},t))}),(0,r.jsx)("button",{type:"button",onClick:o,disabled:n,className:"mt-2 rounded-lg border px-3 py-2 disabled:opacity-50",children:"머지 전 검사 다시 시작"})]}),(0,r.jsx)("button",{type:"button",onClick:c,disabled:n||s||"passed"!==a.status,className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white disabled:cursor-not-allowed disabled:opacity-50",children:null!=l?l:"승인하고 머지"})]})}function f(e){let{card:t,api:a,attempt:r,onAttempt:s,onUpdate:l}=e,o="UNKNOWN"===t.mergeable&&!t.merged&&"OPEN"===t.state;return(0,n.useEffect)(()=>{if(!o||r>0)return;let e=!0,n=[];return u(()=>a.get(t.number),{sleep:e=>new Promise(t=>{n.push(window.setTimeout(t,e))}),isActive:()=>e,onDetail:a=>{e&&l(a,t.headSha)},onAttempt:()=>{e&&s(t.number)}}),()=>{for(let t of(e=!1,n))window.clearTimeout(t)}},[a,t.number,o,r,s,l]),null}function g(){let e=(0,c.In)(),{client:t}=(0,o.Q)(),a=(0,n.useMemo)(()=>(0,i.tV)({client:t}),[t]),[s,l]=(0,n.useState)([]),[u,m]=(0,n.useState)(!0),[g,w]=(0,n.useState)(null),[y,v]=(0,n.useState)(null),[N,j]=(0,n.useState)({}),[k,S]=(0,n.useState)({}),[C,I]=(0,n.useState)(null),[E,U]=(0,n.useState)("open"),L=(0,n.useCallback)(e=>{S(t=>{var a;return{...t,[e]:(null!=(a=t[e])?a:0)+1}})},[]),R=(0,n.useCallback)((e,t)=>{l(a=>a.map(a=>a.number!==e.number||a.headSha!==t?a:{...e,gate:e.headSha===t?e.gate:{status:"none",failures:[]},merged:a.merged}))},[]);async function O(e){v(e.number),j(t=>({...t,[e.number]:""}));try{let{gate:t}=await a.check(e.number,e.headSha);l(a=>a.map(a=>a.number===e.number&&a.headSha===e.headSha?{...a,gate:t}:a))}catch(t){j(a=>({...a,[e.number]:(0,i.V5)(t,"검사를 시작하지 못했습니다.").text}))}finally{v(null)}}async function M(e){if(window.confirm("#".concat(e.number," ").concat(e.title,"\n현재 확인한 변경을 승인하고 머지할까요?"))){v(e.number),j(t=>({...t,[e.number]:""}));try{await a.merge(e.number,e.headSha),l(t=>t.map(t=>t.number===e.number?{...t,merged:!0,state:"MERGED"}:t))}catch(t){j(a=>({...a,[e.number]:(0,i.V5)(t,"머지하지 못했습니다.").text}))}finally{v(null)}}}return((0,n.useEffect)(()=>{let e=s.filter(e=>"OPEN"===e.state&&("running"===e.gate.status||"passed"===e.gate.status));if("open"!==E||!e.length)return;let t=!0,r=window.setInterval(()=>{for(let r of e)a.get(r.number).then(e=>{t&&R(e,r.headSha)}).catch(e=>{t&&j(t=>({...t,[r.number]:(0,i.V5)(e,"검사 상태를 불러오지 못했습니다.").text}))})},1e4);return()=>{t=!1,window.clearInterval(r)}},[a,s,R,E]),(0,n.useEffect)(()=>{let e=!0,t=Number(new URLSearchParams(window.location.search).get("pr")),r=Number.isSafeInteger(t)&&t>0?t:null;return(m(!0),w(null),I(r),"merged"===E)?(a.list("merged").then(t=>{let{items:a}=t;e&&l(a)}).catch(t=>{e&&w((0,i.V5)(t,"목록을 불러오지 못했습니다."))}).finally(()=>{e&&m(!1)}),()=>{e=!1}):(a.list().then(async t=>{let{items:n}=t;if(!e)return;let s=n.find(e=>e.number===r);if(r&&!s)try{let t=await a.get(r);e&&l([t,...n])}catch(t){e&&w((0,i.V5)(t,"PR 을 불러오지 못했습니다.")),e&&l(n)}else l(r?[...n].sort((e,t)=>Number(t.number===r)-Number(e.number===r)):n)}).catch(t=>{e&&w((0,i.V5)(t,"목록을 불러오지 못했습니다."))}).finally(()=>{e&&m(!1)}),()=>{e=!1})},[a,E]),"owner"===e||"open"!==E||u||s.length||g)?(0,r.jsxs)("main",{className:"mx-auto max-w-3xl space-y-5 p-4 pb-20 text-foreground sm:p-8",children:[(0,r.jsxs)("header",{children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold",children:"코드 변경 승인"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"자동으로 만든 코드 변경(PR)을 확인하고 승인합니다."})]}),(0,r.jsx)(h,{view:E,onChange:e=>{l([]),U(e)}}),u&&(0,r.jsx)(p,{view:E,target:C}),g&&(0,r.jsxs)("p",{role:"alert",className:"text-red-600","data-approvals-error":!0,children:[g.text,g.href&&(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)("a",{href:g.href,className:"font-semibold underline underline-offset-2","data-approvals-settings":!0,children:"설정 열기 →"})]})]}),!u&&!s.length&&!g&&(0,r.jsx)("p",{children:"merged"===E?"승인해 반영된 코드 변경이 아직 없습니다.":"승인을 기다리는 코드 변경이 없습니다."}),s.map(e=>{var t,n;let s=e.merged||"MERGED"===e.state,l="OPEN"!==e.state&&!s,o=e.draft?"초안 PR 은 머지할 수 없습니다. GitHub에서 초안을 해제한 뒤 다시 확인하세요.":e.checks.failure>0?"실패한 검사가 있습니다.":e.checks.pending>0?"검사가 아직 끝나지 않았습니다.":"CONFLICTING"===e.mergeable?"머지 충돌이 있습니다.":"MERGEABLE"!==e.mergeable?"머지 가능 여부가 아직 확인되지 않았습니다.":"main"!==e.base?"대상 브랜치가 main 이 아닙니다.":"",c=C===e.number,i=null!=(t=k[e.number])?t:0;return(0,r.jsxs)("article",{className:"rounded-xl border bg-card p-5 shadow-sm ".concat(c?"border-blue-500 ring-2 ring-blue-500/30":"border-border"),children:[(0,r.jsx)(f,{card:e,api:a,attempt:i,onAttempt:L,onUpdate:R}),(0,r.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,r.jsxs)("h2",{className:"font-semibold",children:["#",e.number," \xb7 ",e.title]}),(0,r.jsx)("span",{className:"rounded bg-muted px-2 py-1 text-xs",children:s?function(e){if(!e)return"머지됨";let t=new Date(e);if(Number.isNaN(t.getTime()))return"머지됨";let a=new Date(t.getTime()+324e5).toISOString();return"머지됨 ".concat(a.slice(5,10)," ").concat(a.slice(11,16)," KST")}(e.mergedAt):l?"닫힘":e.draft?"초안":"열림"})]}),(0,r.jsx)(b,{brief:e.brief,lineage:e.lineage,summary:e.summary}),(0,r.jsxs)("p",{className:"mt-3 text-sm text-muted-foreground",children:["+",e.additions," 추가 / −",e.deletions," 삭제 \xb7 파일 ",e.changedFiles]}),(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2 text-xs","aria-label":"검사 상태",children:[(0,r.jsxs)("span",{className:"rounded bg-green-500/15 px-2 py-1",children:["성공 ",e.checks.success]}),(0,r.jsxs)("span",{className:"rounded bg-red-500/15 px-2 py-1",children:["실패 ",e.checks.failure]}),(0,r.jsxs)("span",{className:"rounded bg-yellow-500/15 px-2 py-1",children:["대기 ",e.checks.pending]}),e.checks.success+e.checks.failure+e.checks.pending===0&&(0,r.jsx)("span",{className:"rounded bg-slate-500/15 px-2 py-1",children:"GitHub 검사 없음 — 머지 전 검사는 아래에서 별도로 실행"})]}),(0,r.jsxs)("details",{open:c,className:"mt-3 text-sm",children:[(0,r.jsx)("summary",{className:"cursor-pointer",children:"바뀐 파일 보기"}),(0,r.jsx)("ul",{className:"mt-2 list-inside list-disc break-all",children:e.files.map(e=>(0,r.jsx)("li",{children:e},e))})]}),(0,r.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-4",children:[(0,r.jsx)("a",{className:"text-sm text-blue-600 underline",href:e.url,target:"_blank",rel:"noopener noreferrer",children:"GitHub 에서 보기"}),!s&&!l&&(0,r.jsx)(x,{gate:e.gate,busy:null!==y,blocked:!!o,mergeLabel:y===e.number?"머지 중…":"UNKNOWN"!==(n=e.mergeable)?"승인하고 머지":null===d(i,n)?"확인 종료":"확인 중…",onCheck:()=>O(e),onMerge:()=>M(e)})]}),o&&!s&&!l&&(0,r.jsxs)("p",{className:"mt-2 text-sm text-amber-600",children:[o,"UNKNOWN"===e.mergeable&&i>=3?" 자동 확인이 끝났습니다. 최신 상태는 페이지를 새로고침하세요.":""]}),N[e.number]&&(0,r.jsx)("p",{role:"alert",className:"mt-2 text-sm text-red-600",children:N[e.number]})]},e.number)})]}):null}var w=a(74780);function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),a="release-loop"===e.graphId?"릴리스 발행":"announce-loop"===e.graphId?"공지":e.graphId,r=Date.parse(e.since),n=Number.isNaN(r)?0:Math.max(0,Math.floor((t-r)/6e4)),s=n<1?"방금 전":n<60?"".concat(n,"분 전"):n<1440?"".concat(Math.floor(n/60),"시간 전"):"".concat(Math.floor(n/1440),"일 전");return{title:a,nodeId:e.nodeId,waiting:s,message:e.message,recent:e.recent.map(e=>"".concat(e.ok&&"fail"!==e.outcome&&"error"!==e.outcome?"✓":"✗"," ").concat(e.nodeId).concat(e.outcome?" \xb7 ".concat(e.outcome):"").concat(e.summary?" \xb7 ".concat(e.summary):""))}}function v(e){var t,a,s,l,o,c,i;let{item:d,api:u,onDecided:m,confirm:p}=e,[h,b]=(0,n.useState)(d.feed),[x,f]=(0,n.useState)(()=>(0,w.Mz)(d.feed)),[g,y]=(0,n.useState)(!1),[v,N]=(0,n.useState)(0),[j,k]=(0,n.useState)(!1),[S,C]=(0,n.useState)(!1),[I,E]=(0,n.useState)(""),[U,L]=(0,n.useState)(""),[R,O]=(0,n.useState)(!1),M=(e,t)=>{L((0,w.LP)(e,t)),O((0,w.rH)(e))},[D,A]=(0,n.useState)({}),P=(0,n.useRef)(null),_=null!=p?p:e=>window.confirm(e),H=(i=(0,w.Mz)(h),JSON.stringify(x)!==JSON.stringify(i)),G=(0,n.useMemo)(()=>(function(e,t){let a=[];for(let r of(e.cover.image&&a.push({image:e.cover.image,isCover:!0}),t.slides))r.include&&a.push({image:r.image,caption:r.caption});return a})(h,x),[h,x]),T=G[Math.min(v,Math.max(0,G.length-1))],F=(0,n.useMemo)(()=>[h.cover.image,...h.slides.map(e=>e.image)].filter(e=>!!e),[h]);function V(e){N(t=>Math.max(0,Math.min(G.length-1,t+e)))}function z(e,t){f(a=>({...a,slides:a.slides.map((a,r)=>r===e?{...a,...t}:a)}))}function W(e,t){f(a=>{let r=e+t;if(r<0||r>=a.slides.length)return a;let n=[...a.slides];return[n[e],n[r]]=[n[r],n[e]],{...a,slides:n}})}async function Y(){C(!0),L(""),O(!1),E("");try{let e=await u.saveFeedDraft(d.graphId,d.runId,x);return b(e.feed),f((0,w.Mz)(e.feed)),E("저장했어요 \xb7 수정 ".concat(e.feed.revision," \xb7 아직 게시 전입니다")),!0}catch(e){return M(e,"save"),!1}finally{C(!1)}}async function J(){if(_("게시할까요? 승인하면 이 초안으로 게시 준비 묶음이 텔레그램으로 갑니다.")&&(!H||await Y())){C(!0),L("");try{await u.decide(d.graphId,d.runId,"approved"),m()}catch(e){M(e,"decide")}finally{C(!1)}}}async function K(){if(_("이 게시 초안을 거절할까요?")){C(!0),L("");try{await u.decide(d.graphId,d.runId,"rejected"),m()}catch(e){M(e,"decide")}finally{C(!1)}}}(0,n.useEffect)(()=>{let e=!0,t=[],a="undefined"!=typeof URL&&"function"==typeof URL.createObjectURL;return Promise.all(F.map(async r=>{try{let n=await u.feedMedia(d.graphId,d.runId,r);if(!e||!a)return null;let s=URL.createObjectURL(n);return t.push(s),[r,s]}catch(e){return null}})).then(t=>{e&&A(Object.fromEntries(t.filter(e=>!!e)))}),()=>{e=!1,a&&"function"==typeof URL.revokeObjectURL&&t.forEach(e=>URL.revokeObjectURL(e))}},[u,d.graphId,d.runId,F]);let $=(null==(t=h.brand)?void 0:t.name)||"브랜드",q=$.trim().charAt(0).toUpperCase()||"\xb7",Q=x.hashtags.join(" "),X=x.cover.text!==(null!=(s=h.cover.renderedText)?s:h.cover.text)||x.cover.sub!==(null!=(l=h.cover.renderedSub)?l:h.cover.sub);return(0,r.jsxs)("article",{"aria-label":"피드 미리보기","data-feed-revision":h.revision,className:"mx-auto w-full max-w-md overflow-hidden rounded-xl border border-border bg-card text-foreground shadow-sm",children:[(0,r.jsxs)("header",{className:"flex items-center gap-3 px-3 py-2",children:[(0,r.jsx)("span",{"aria-hidden":!0,className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-semibold",children:q}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"truncate text-sm font-semibold",children:$}),(null==(a=h.brand)?void 0:a.handle)&&(0,r.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:h.brand.handle})]}),(0,r.jsxs)("span",{className:"ml-auto shrink-0 text-xs text-muted-foreground",children:["수정 ",h.revision,H?" \xb7 저장 안 됨":""]})]}),(0,r.jsxs)("div",{className:"relative aspect-[4/5] w-full touch-pan-y select-none overflow-hidden bg-muted",onTouchStart:e=>{var t,a;P.current=null!=(a=null==(t=e.touches[0])?void 0:t.clientX)?a:null},onTouchEnd:e=>{var t;let a=P.current;P.current=null;let r=null==(t=e.changedTouches[0])?void 0:t.clientX;null==a||null==r||40>Math.abs(r-a)||V(r<a?1:-1)},children:[(null==T?void 0:T.image)&&D[T.image]?(0,r.jsx)("img",{src:D[T.image],alt:T.isCover?x.cover.text:null!=(o=T.caption)?o:"",className:"h-full w-full object-cover"}):(0,r.jsx)("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"이미지 불러오는 중"}),G.length>1&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button","aria-label":"이전 장",disabled:0===v,onClick:()=>V(-1),className:"absolute left-2 top-1/2 -translate-y-1/2 rounded-full bg-black/40 px-2 py-1 text-white disabled:opacity-0",children:"‹"}),(0,r.jsx)("button",{type:"button","aria-label":"다음 장",disabled:v>=G.length-1,onClick:()=>V(1),className:"absolute right-2 top-1/2 -translate-y-1/2 rounded-full bg-black/40 px-2 py-1 text-white disabled:opacity-0",children:"›"})]})]}),G.length>1&&(0,r.jsx)("div",{"aria-label":"장 표시",className:"flex justify-center gap-1.5 py-2",children:G.map((e,t)=>(0,r.jsx)("span",{"data-dot":t===v?"on":"off",className:"h-1.5 w-1.5 rounded-full ".concat(t===v?"bg-primary":"bg-muted-foreground/40")},t))}),X&&(0,r.jsxs)("p",{"data-cover-pending":!0,className:"mx-3 mb-2 rounded border border-dashed border-border px-2 py-1 text-xs text-muted-foreground",children:["커버 문구 변경 — \xab",x.cover.text,x.cover.sub?" \xb7 ".concat(x.cover.sub):"","\xbb \xb7 게시 때 커버를 다시 그립니다"]}),(0,r.jsxs)("div",{className:"space-y-2 px-3 pb-3 text-sm",children:[(0,r.jsxs)("p",{className:"break-words",children:[(0,r.jsx)("span",{className:"font-semibold",children:$})," ",x.caption.hook]}),x.caption.body&&(j?(0,r.jsx)("p",{className:"whitespace-pre-wrap break-words",children:x.caption.body}):(0,r.jsx)("button",{type:"button",onClick:()=>k(!0),className:"text-muted-foreground",children:"더 보기"})),x.hashtags.length>0&&(0,r.jsx)("p",{className:"flex flex-wrap gap-x-1.5 text-primary",children:x.hashtags.map((e,t)=>(0,r.jsx)("span",{className:"whitespace-nowrap",children:e},"".concat(e,"-").concat(t)))}),x.location&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["\uD83D\uDCCD ",x.location]})]}),g&&(0,r.jsxs)("section",{"aria-label":"초안 편집",className:"space-y-3 border-t border-border px-3 py-3 text-sm",children:[(0,r.jsxs)("label",{className:"block",children:["커버 문구",(0,r.jsx)("input",{value:x.cover.text,onChange:e=>f({...x,cover:{...x.cover,text:e.target.value}}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("label",{className:"block",children:["커버 부제",(0,r.jsx)("input",{value:x.cover.sub,onChange:e=>f({...x,cover:{...x.cover,sub:e.target.value}}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("label",{className:"block",children:["첫 줄",(0,r.jsx)("input",{value:x.caption.hook,onChange:e=>f({...x,caption:{...x.caption,hook:e.target.value}}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("label",{className:"block",children:["본문",(0,r.jsx)("textarea",{value:x.caption.body,rows:4,onChange:e=>f({...x,caption:{...x.caption,body:e.target.value}}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("label",{className:"block",children:["해시태그(띄어쓰기로 구분)",(0,r.jsx)("input",{value:Q,onChange:e=>f({...x,hashtags:e.target.value.split(/\s+/).filter(Boolean)}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("label",{className:"block",children:["위치(비우면 없음)",(0,r.jsx)("input",{value:null!=(c=x.location)?c:"",onChange:e=>f({...x,location:e.target.value.trim()?e.target.value:null}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsx)("ol",{"aria-label":"사진 순서",className:"space-y-2",children:x.slides.map((e,t)=>(0,r.jsxs)("li",{"data-slide":e.image,className:"rounded border border-border p-2 ".concat(e.include?"":"opacity-50"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"w-6 shrink-0 text-xs text-muted-foreground",children:t+1}),(0,r.jsx)("input",{"aria-label":"".concat(t+1,"번 사진 설명"),value:e.caption,onChange:e=>z(t,{caption:e.target.value}),className:"min-w-0 flex-1 rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,r.jsx)("button",{type:"button",disabled:0===t,onClick:()=>W(t,-1),className:"rounded border px-2 py-0.5 disabled:opacity-40",children:"앞으로"}),(0,r.jsx)("button",{type:"button",disabled:t===x.slides.length-1,onClick:()=>W(t,1),className:"rounded border px-2 py-0.5 disabled:opacity-40",children:"뒤로"}),(0,r.jsx)("button",{type:"button",onClick:()=>z(t,{include:!e.include}),className:"rounded border px-2 py-0.5",children:e.include?"빼기":"되살리기"})]})]},e.image))})]}),(I||U)&&(0,r.jsx)("p",{role:U?"alert":"status",className:"px-3 pb-2 text-sm ".concat(U?"text-red-600":"text-muted-foreground"),children:U||I}),U&&R&&(0,r.jsx)("p",{className:"px-3 pb-2 text-sm",children:(0,r.jsx)("a",{href:w.$Y,className:"font-medium underline","data-connect-token-link":!0,children:"연결 토큰 칸 열기 →"})}),(0,r.jsxs)("footer",{className:"flex flex-wrap gap-2 border-t border-border px-3 py-3",children:[(0,r.jsx)("button",{type:"button",disabled:S,onClick:()=>y(e=>!e),className:"rounded-lg border px-3 py-2 text-sm disabled:opacity-50",children:g?"편집 닫기":"편집"}),(0,r.jsx)("button",{type:"button",disabled:S||!H,onClick:()=>{Y()},className:"rounded-lg border px-3 py-2 text-sm disabled:opacity-50",children:"수정 저장"}),(0,r.jsx)("button",{type:"button",disabled:S,onClick:()=>{J()},className:"rounded-lg bg-blue-600 px-3 py-2 text-sm font-medium text-white disabled:opacity-50",children:"최종 게시"}),(0,r.jsx)("button",{type:"button",disabled:S,onClick:()=>{K()},className:"ml-auto rounded-lg px-3 py-2 text-sm text-muted-foreground disabled:opacity-50",children:"거절"})]})]})}function N(){let e,{client:t}=(0,o.Q)(),a=(0,n.useMemo)(()=>(0,w.ll)({client:t}),[t]),[s,l]=(0,n.useState)([]),[c,i]=(0,n.useState)(""),[d,u]=(0,n.useState)(!1),[m,p]=(0,n.useState)(!1),h=(0,n.useRef)((e=0,{begin:()=>e+=1,isLatest:t=>t===e})).current,b=(0,n.useCallback)(async()=>{let e=h.begin();try{let t=await a.list();if(!h.isLatest(e))return;l(t.items),i(""),u(!1)}catch(t){h.isLatest(e)&&(i((0,w.LP)(t,"list")),u((0,w.rH)(t)))}},[a,h]);async function x(e,t){if("rejected"!==t||window.confirm("".concat(y(e).title," 실행을 거절할까요?"))){p(!0),i(""),h.begin();try{await a.decide(e.graphId,e.runId,t),await b()}catch(e){i((0,w.LP)(e,"decide")),u((0,w.rH)(e))}finally{p(!1)}}}(0,n.useEffect)(()=>{b();let e=window.setInterval(()=>{b()},3e4);return()=>window.clearInterval(e)},[b]);let f=s.filter(e=>!!e.feed),g=s.filter(e=>!e.feed);return s.length||c?(0,r.jsxs)(r.Fragment,{children:[f.length>0&&(0,r.jsxs)("section",{"aria-label":"게시 대기",className:"mx-auto max-w-3xl space-y-4 px-4 pt-6 text-foreground sm:px-8",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"게시 대기"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"고쳐서 저장해도 대기열에 남습니다. \xab최종 게시\xbb를 눌러야만 올라갑니다."}),f.map(e=>(0,r.jsx)(v,{item:e,api:a,onDecided:()=>{h.begin(),b()}},"".concat(e.graphId,"/").concat(e.runId)))]}),(g.length>0||c)&&(0,r.jsxs)("section",{"aria-label":"실행 승인",className:"mx-auto max-w-3xl space-y-4 px-4 pt-6 text-foreground sm:px-8",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"실행 승인"}),c&&(0,r.jsx)("p",{role:"alert",className:"text-sm text-red-600",children:c}),c&&d&&(0,r.jsx)("p",{className:"text-sm",children:(0,r.jsx)("a",{href:w.$Y,className:"font-medium underline","data-connect-token-link":!0,children:"연결 토큰 칸 열기 →"})}),g.map(e=>{let t=y(e);return(0,r.jsxs)("article",{className:"rounded-xl border border-border bg-card p-5 shadow-sm",children:[(0,r.jsx)("h3",{className:"font-semibold",children:t.title}),(0,r.jsxs)("p",{className:"mt-1 text-sm text-muted-foreground",children:["멈춘 단계: ",t.nodeId," \xb7 ",t.waiting,"부터 대기 중"]}),(0,r.jsx)("p",{className:"mt-3 whitespace-pre-wrap break-words text-sm",children:t.message}),t.recent.length>0&&(0,r.jsxs)("div",{className:"mt-3 text-sm",children:[(0,r.jsx)("p",{className:"font-medium",children:"최근 단계"}),(0,r.jsx)("ul",{className:"mt-1 space-y-1",children:t.recent.map((e,t)=>(0,r.jsx)("li",{className:"break-words",children:e},t))})]}),(0,r.jsxs)("div",{className:"mt-4 flex gap-2",children:[(0,r.jsx)("button",{type:"button",disabled:m,onClick:()=>{x(e,"approved")},className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white disabled:opacity-50",children:"승인"}),(0,r.jsx)("button",{type:"button",disabled:m,onClick:()=>{x(e,"rejected")},className:"rounded-lg border px-4 py-2 text-sm disabled:opacity-50",children:"거절"})]})]},"".concat(e.graphId,"/").concat(e.runId))})]})]}):null}function j(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(N,{}),(0,r.jsx)(g,{})]})}},97479:(e,t,a)=>{"use strict";a.d(t,{GC:()=>n,In:()=>i,OG:()=>o});var r=a(46124);let n="elanous.pwa.role",s="elanous:pwa-role";function l(){try{let e=window.localStorage.getItem(n);if("owner"===e||"contributor"===e||"general"===e)return e}catch(e){}return"general"}function o(e){try{window.localStorage.setItem(n,e)}catch(e){}"function"==typeof window.dispatchEvent&&window.dispatchEvent(new Event(s))}function c(e){if("function"!=typeof window.addEventListener)return()=>{};window.addEventListener(s,e);let t=t=>{(t.key===n||null===t.key)&&e()};return window.addEventListener("storage",t),()=>{window.removeEventListener(s,e),window.removeEventListener("storage",t)}}function i(){return(0,r.useSyncExternalStore)(c,l,()=>"general")}}},e=>{e.O(0,[1826,8060,2463,2196,7358],()=>e(e.s=39061)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7081],{5997:(e,t,n)=>{"use strict";n.d(t,{Zr:()=>o,f6:()=>r,oD:()=>s});let a="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 s(){let e=function(){let e=new URLSearchParams(window.location.search).get("session");return e?(localStorage.setItem(a,e),e):localStorage.getItem(a)}();if(e)return e;let t=r();return localStorage.setItem(a,t),t}function o(){let e=r();return localStorage.setItem(a,e),e}},7456:(e,t,n)=>{"use strict";n.d(t,{Er:()=>r,cj:()=>c,dc:()=>o,yR:()=>i});let a=/^(oauth\.|harness\.decision|llm\.router)/;function r(e){let t=[],n=e=>{"string"==typeof e&&e.trim()&&!t.includes(e.trim())&&t.push(e.trim())};for(let t of e){var r;let e=null!=(r=t.data)?r:{};if(t.category.startsWith("oauth.")){for(let t of["from","to","name","account"])n(e[t]);if(Array.isArray(e.usage))for(let t of e.usage)n(null==t?void 0:t.name);continue}if(a.test(t.category))for(let t of(n(e.account),["what","why","reason"])){let a=e[t];if("string"==typeof a)for(let e of a.matchAll(/계정\s+([A-Za-z0-9][\w.-]*)/g))n(e[1])}}return t}function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function o(e){let t=new Map(e.map((e,t)=>[e,"account-".concat(t+1)])),n=e.length?RegExp("(^|[^\\w-])(".concat(e.map(s).sort((e,t)=>t.length-e.length).join("|"),")(?![\\w-])"),"g"):null,a=new Map;return(e,r)=>{let s=e.replace(/\b[a-z0-9-]+\.tail[0-9a-f]+\.ts\.net\b/gi,"tailnet-host").replace(/\bmsb\d+\b/gi,e=>(e=>{let t=e.toLowerCase();a.has(t)||a.set(t,"remote-".concat(a.size+1));let n=a.get(t);return e===e.toUpperCase()?n.toUpperCase():n})(e)).replace(/\bmbp\b/gi,e=>e===e.toUpperCase()?"LOCAL":"local").replace(/\/Users\/[^/\s"']+/g,"~").replace(/(크레딧|credits?|💳)(\s*[:=]?\s*)[\d][\d,.]*/gi,"$1$2•••").replace(/[\d][\d,.]*(\s*)(크레딧|credits?)/gi,"•••$1$2").replace(/\$\s?[\d][\d,.]*/g,"$•••").replace(/(잔량?|remaining|left)(\s*[:=]?\s*)(?:[A-Za-z0-9][\w.-]*\s+)?\d+(?:\.\d+)?\s?%/gi,"$1$2•••");return r&&n&&(s=s.replace(n,(e,n,a)=>{var r;return"".concat(n).concat(null!=(r=t.get(a))?r:"account")})),s}}function l(e,t){if("string"==typeof e)return t(e);if(Array.isArray(e))return e.map(e=>l(e,t));if(e&&"object"==typeof e){let n={};for(let[a,r]of Object.entries(e))"apiEquivalentUsd"===a||"usd"===a||/credit(s|Balance)?$/i.test(a)||(n[a]=l(r,t));return n}return e}function i(e){let t=o(r(e));return e.map(e=>{let n=a.test(e.category);return{...e,event:t(e.event,!1),data:e.data?l(e.data,e=>t(e,n)):e.data}})}function c(e,t){let n=o(t);return l(e,e=>n(e,!0))}},11817:(e,t,n)=>{Promise.resolve().then(n.bind(n,99850))},15151:(e,t,n)=>{"use strict";n.d(t,{C:()=>c,DaemonProvider:()=>d,Q:()=>u});var a=n(55539),r=n(46124),s=n(8101),o=n(5997),l=n(18060),i=n(72215);let c=(0,r.createContext)(null);function d(e){let{children:t}=e,n={baseUrl:"",token:"",provider:""},[d,u]=(0,r.useState)(n),[m,f]=(0,r.useState)(""),[p]=(0,r.useState)(()=>new l.ki(n));(0,r.useEffect)(()=>{let e=(0,s.Fp)();u(e),p.updateConfig(e),f((0,o.oD)()),(0,i.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[p]),(0,r.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let t=(0,s.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 g=e=>{u(t=>{let n={...t,...e};return(0,s.Qc)(e),p.updateConfig(n),(0,i.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),n})},h=e=>{f(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,i.cY)("webterm.provider.daemon.session-set",{sessionId:e})},x=(0,r.useMemo)(()=>({config:d,setConfig:g,client:p,sessionId:m,setSessionId:h}),[d,p,m]);return(0,a.jsx)(c.Provider,{value:x,children:t})}function u(){let e=(0,r.useContext)(c);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},99850:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>k});var a=n(55539),r=n(7456);function s(e){return e.map(e=>({...(0,r.cj)(e,[]),taskId:e.taskId}))}var o=n(46124),l=n(15151);function i(e){var t;for(let t of[e.sections.triage,e.sections.intake]){let e=null==t?void 0:t.data.title;if("string"==typeof e&&e.trim())return e.trim()}return(null==(t=e.apiTitle)?void 0:t.trim())||e.taskId}var c=n(79247);let d={green:"순항",yellow:"진행 중",red:"막힘",done:"완료"},u=["intake","triage","gates","relations","memory","workspace","run","landing","release"];function m(e){return null==e?"—":"string"==typeof e?e:JSON.stringify(e)}function f(e){let{entry:t}=e;return(0,a.jsxs)("details",{className:"mt-2 text-xs",children:[(0,a.jsx)("summary",{className:"cursor-pointer text-muted-foreground",children:"JSON"}),(0,a.jsx)("pre",{className:"mt-2 max-h-64 overflow-auto rounded-lg bg-muted p-2 text-xs whitespace-pre-wrap break-all",children:JSON.stringify(t.data,null,2)})]})}function p(e){let{entry:t}=e,n=new Date(t.ts).toISOString();return(0,a.jsxs)("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[(0,a.jsxs)("span",{children:["Owner: ",t.owner]}),(0,a.jsx)("time",{dateTime:n,children:n})]})}function g(e){var t;let{card:n,placements:r}=e,s=null==(t=n.sections.gates)?void 0:t.data;return(0,a.jsxs)("section",{"aria-label":"Task card detail",className:"min-w-0 space-y-4 rounded-2xl border border-border bg-card p-4",children:[(0,a.jsxs)("header",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:i(n)}),(0,a.jsx)("p",{className:"break-all text-xs text-muted-foreground",children:n.taskId})]}),r&&(0,a.jsxs)("p",{className:"overflow-x-auto whitespace-nowrap text-sm","aria-label":"Wish placement and progress",children:["배치 \xb7 ",r.length?r.map(e=>{let{cellId:t,cellTitle:n,version:a,status:r}=e;return"".concat(t," ").concat(n," \xb7 ").concat(a,"판 \xb7 ").concat(d[r])}).join(" / "):"아직 배치되지 않음"]}),s&&(0,a.jsxs)("p",{className:"overflow-x-auto whitespace-nowrap text-sm","aria-label":"Gate decisions",children:["Gate \xb7 budget: ",m(s.budget)," \xb7 location: ",m(s.location)]}),u.map(e=>{let t=n.sections[e];return t?(0,a.jsxs)("section",{"aria-label":"".concat(e," section"),className:"rounded-xl border border-border p-3",children:[(0,a.jsx)("h3",{className:"mb-1 text-sm font-semibold capitalize",children:e}),(0,a.jsx)(p,{entry:t}),(0,a.jsx)(f,{entry:t})]},e):null}),(0,a.jsxs)("section",{"aria-label":"Incidents",className:"space-y-2",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold",children:["Incidents (",n.incidents.length,")"]}),n.incidents.length?(0,a.jsx)("ol",{className:"space-y-2",children:n.incidents.map(e=>(0,a.jsxs)("li",{className:"rounded-xl border border-border p-3",children:[(0,a.jsx)(p,{entry:e}),(0,a.jsx)(f,{entry:e})]},e.key))}):(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"No incidents."})]})]})}let h=["steward","execution","landing","release","done"],x=new Set(["intake","triage","gates","relations","memory","workspace","run","landing","release","incidents"]);function b(e){let t=[],n=Date.parse(e.createdAt);for(let a of e.sections){let r;if(!x.has(a.key))continue;try{let e=JSON.parse(a.content);r=e&&"object"==typeof e&&!Array.isArray(e)?e:{content:a.content}}catch(e){r={content:a.content}}let s=Date.parse(a.createdAt);t.push({taskId:e.id,section:a.key,key:"".concat(a.key,":").concat(a.createdAt,":").concat(t.length),owner:a.owner,ts:Number.isFinite(s)?s:n,data:r,..."string"==typeof r.runId?{runId:r.runId}:{}})}if(0===t.length&&t.push({taskId:e.id,section:"triage",key:"api:title",owner:"task-card API",ts:n,data:{title:e.title}}),"closed"===e.status){let a=t.filter(e=>"release"===e.section).sort((e,t)=>t.ts-e.ts)[0];t.push({taskId:e.id,section:"release",key:"api:closed",owner:"task-card API",ts:Math.max(n,...t.map(e=>e.ts)),data:{...null==a?void 0:a.data,status:"done"}})}return{...function(e){let t,n=e[0];if(!n)return null;let a={},r=[],s=new Set,o=n.ts,l=-1/0;for(let i of e)if(!(i.taskId!==n.taskId||s.has(i.key)))if(s.add(i.key),o=Math.max(o,i.ts),i.runId&&i.ts>=l&&(t=i.runId,l=i.ts),"incidents"===i.section)r.push(i);else{let e=a[i.section];(!e||i.ts>=e.ts)&&(a[i.section]=i)}return{taskId:n.taskId,sections:a,incidents:r,updatedAt:o,...t?{runId:t}:{}}}(t),apiTitle:e.title}}function y(e){let{cards:t,selectedId:n,onSelect:r,selectedCard:s,detailError:o,placements:l}=e,c=(null==s?void 0:s.taskId)===n?s:null;return(0,a.jsxs)("div",{className:"space-y-4 p-4",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"보드"}),(0,a.jsx)("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-5",children:h.map(e=>(0,a.jsxs)("section",{"aria-label":"".concat(e," column"),className:"min-w-0 space-y-2 rounded-xl border border-border p-3",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold capitalize",children:e}),t.filter(t=>(function(e){var t;let n=null==(t=e.sections.release)?void 0:t.data;return(null==n?void 0:n.status)==="done"||(null==n?void 0:n.status)==="completed"?"done":n?"release":e.sections.landing?"landing":e.sections.run||e.sections.workspace||e.sections.gates||e.sections.relations||e.sections.memory?"execution":"steward"})(t)===e).map(e=>{var t,s;return(0,a.jsxs)("button",{type:"button",onClick:()=>r(e.taskId),"aria-pressed":n===e.taskId,className:"w-full rounded-lg border border-border bg-card p-3 text-left text-sm hover:bg-accent/40",children:[(0,a.jsx)("span",{className:"block font-medium",children:i(e)}),(0,a.jsx)("span",{className:"block text-xs text-muted-foreground",children:(0,a.jsx)("time",{dateTime:new Date(e.updatedAt).toISOString(),title:new Date(e.updatedAt).toLocaleString(),children:(t=function(e){let t=new Map;for(let a of e.incidents){var n;let e=null!=(n=a.data.incidentId)?n:a.data.id,r="string"==typeof e&&e.trim()?e:a.key,s=t.get(r);(!s||a.ts>=s.ts)&&t.set(r,a)}return Array.from(t.values()).filter(e=>"closed"!==e.data.status&&"resolved"!==e.data.status).length}(e),s=Date.now(),[...t>0?["사고 ".concat(t)]:[],...e.runId?["런 ".concat(e.runId.replace(/^run-/,"").slice(0,8))]:[],function(e,t,n){let a=Math.floor((t-e)/6e4);if(!Number.isFinite(a)||a<1)return"방금";if(a<60)return"".concat(a,"분 전");if(a<1440)return"".concat(Math.floor(a/60),"시간 전");let r=new Intl.DateTimeFormat("ko-KR",{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1,...n?{timeZone:n}:{}}).formatToParts(new Date(e)),s=e=>{var t,n;return null!=(n=null==(t=r.find(t=>t.type===e))?void 0:t.value)?n:""};return"".concat(s("month"),"/").concat(s("day")," ").concat(s("hour"),":").concat(s("minute"))}(e.updatedAt,s,void 0)]).join(" \xb7 ")})})]},e.taskId)})]},e))}),n&&(0,a.jsxs)("aside",{className:"max-w-3xl space-y-2","aria-label":"Selected card",children:[(0,a.jsx)("button",{type:"button",onClick:()=>r(null),"aria-label":"Close card detail",className:"text-sm text-muted-foreground",children:"Close"}),c?(0,a.jsx)(g,{card:c,placements:l}):(0,a.jsx)("p",{role:"status",children:null!=o?o:"Loading card detail…"})]})]})}function w(){let{config:e}=(0,l.Q)(),t=(0,o.useMemo)(()=>e.baseUrl?(0,c.xX)({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}):null,[e.baseUrl,e.token]),[n,i]=(0,o.useState)([]),[d,u]=(0,o.useState)(null),[m,f]=(0,o.useState)(null),[p,g]=(0,o.useState)(void 0),[h,x]=(0,o.useState)(null),[w,k]=(0,o.useState)(null),[v,j]=(0,o.useState)(!1);(0,o.useEffect)(()=>{"public"===new URLSearchParams(window.location.search).get("capture")&&j(!0)},[]);let I=(0,o.useMemo)(()=>v?s(n):n,[n,v]),N=v&&m?s([m])[0]:m,S=v&&p?(0,r.cj)(p,[]):p;return(0,o.useEffect)(()=>{let e=!1;if(i([]),u(null),f(null),g(void 0),x(null),!t)return void k("Connect to NEXUS to load task cards.");k(null);let n=()=>t.getTaskCards().then(t=>{let{cards:n}=t;e||(i(n.map(b)),k(null))}).catch(t=>{e||k(t instanceof c.Iu&&404===t.status?"Task cards are not available yet (pre-E1).":t instanceof Error?t.message:String(t))});n();let a=setInterval(()=>{n()},1e4);return()=>{e=!0,clearInterval(a)}},[t]),(0,o.useEffect)(()=>{if(!t||!d)return;let e=!1;return f(null),g(void 0),x(null),t.getTaskCard(d).then(t=>{let{card:n,placements:a}=t;e||(g(a),f(b(n)))}).catch(t=>{e||x(t instanceof Error?t.message:String(t))}),()=>{e=!0}},[t,d]),(0,a.jsxs)(a.Fragment,{children:[w&&(0,a.jsx)("p",{role:"status",className:"p-4 text-sm text-muted-foreground",children:w}),(0,a.jsx)(y,{cards:I,selectedId:d,selectedCard:N,detailError:h,placements:S,onSelect:e=>{(null===e||d!==e)&&(f(null),g(void 0),x(null),u(e))}})]})}function k(){return(0,a.jsx)(w,{})}}},e=>{e.O(0,[8060,9247,2463,2196,7358],()=>e(e.s=11817)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7955],{66307:(e,t,s)=>{"use strict";s.d(t,{BotlabPageContent:()=>h});var r,l=s(55539),a=s(46124);let o=(null!=(r=s(11041).env.NEXT_PUBLIC_ELANOUS_BOTLAB_HOST)?r:"").trim(),n="elanous.botlab.wallHost",d=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;function i(e){return e.length>0&&e.length<=253&&d.test(e)}function c(e){var t;let{search:s,remembered:r=null}=e,d=(0,a.useMemo)(()=>(function(e){var t,s;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,l=null;try{l=new URLSearchParams(e).get("host")}catch(e){l=null}let a=null!=(t=null==l?void 0:l.trim())?t:"";if(""!==a&&i(a))return{host:a,source:"query",rejected:null};let n=""===a?null:a,d=null!=(s=null==r?void 0:r.trim())?s:"";return""!==d&&i(d)?{host:d,source:"remembered",rejected:n}:""!==o&&i(o)?{host:o,source:"default",rejected:n}:{host:"",source:"unset",rejected:n}})(s,r),[s,r]),c="unset"===d.source?null:(t=d.host,"https://".concat(t).concat("/bot3/bot-wall.html"));return(0,a.useEffect)(()=>{if("query"===d.source)try{window.localStorage.setItem(n,d.host)}catch(e){}},[d.source,d.host]),(0,l.jsxs)("main",{className:"mx-auto flex w-full max-w-6xl flex-col gap-6 px-6 py-10 sm:px-10","data-testid":"botlab-panel",children:[(0,l.jsxs)("header",{children:[(0,l.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground",children:"Bot screens"}),(0,l.jsx)("h1",{className:"mt-2 text-3xl font-bold",children:"Botlab"}),(0,l.jsxs)("p",{className:"mt-2 max-w-3xl text-sm text-muted-foreground",children:["Live noVNC screens for the bots, served through Tailscale. One document holds all four sessions, so the VNC password is asked ",(0,l.jsx)("strong",{children:"once"}),", not four times."]}),(0,l.jsx)("p",{className:"mt-2 max-w-3xl text-sm text-muted-foreground",children:"View-only by default. This surface cannot send commands or control the bots."})]}),(0,l.jsxs)("section",{className:"rounded-xl border border-border bg-card p-4","aria-label":"Wall address",children:[(0,l.jsx)("h2",{className:"text-sm font-semibold",children:"Wall address"}),(0,l.jsx)("p",{className:"mt-1 break-all font-mono text-xs text-muted-foreground","data-testid":"botlab-wall-url",children:null!=c?c:"(no host configured)"}),(0,l.jsx)("p",{className:"mt-2 text-xs text-muted-foreground","data-testid":"botlab-host-source",children:"query"===d.source?"Host came from the ?host= query parameter (remembered on this device).":"remembered"===d.source?"Host is the one remembered on this device; override it with ?host=<tailnet-name>.":"default"===d.source?"Host is the build default (NEXT_PUBLIC_ELANOUS_BOTLAB_HOST); override it with ?host=<tailnet-name>.":"No wall host is configured. Open this page once with ?host=<the VM tailnet name> — it is remembered on this device."}),null!==d.rejected&&(0,l.jsxs)("p",{role:"alert",className:"mt-2 text-xs text-destructive","data-testid":"botlab-host-rejected",children:["Ignored ?host=",d.rejected," — not a valid hostname."]}),null!==c&&(0,l.jsxs)("p",{className:"mt-3 text-xs text-muted-foreground",children:[(0,l.jsx)("a",{className:"underline",href:c,target:"_blank",rel:"noreferrer","data-testid":"botlab-open-tab",children:"Open the wall in a new tab"})," — ","use this if the embedded frame stays blank."]})]}),null!==c&&(0,l.jsx)("section",{"aria-label":"Bot screen wall",children:(0,l.jsx)("iframe",{src:c,title:"Bot screen wall","data-testid":"botlab-wall-frame",className:"h-[70vh] w-full rounded-xl border border-border bg-background"})}),(0,l.jsxs)("section",{className:"rounded-xl border border-border bg-card p-5","aria-label":"If the wall is blank",children:[(0,l.jsx)("h2",{className:"text-sm font-semibold",children:"If the wall stays blank"}),(0,l.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"A blank frame is not necessarily a broken bot. There are three separate reasons, with different fixes:"}),(0,l.jsxs)("ol",{className:"mt-3 list-decimal space-y-2 pl-5 text-sm text-muted-foreground",children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"This device is outside the tailnet."})," The address simply does not exist here. Join the tailnet, or view the screens from a device that is on it."]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Tailscale serve is not published."})," Re-run"," ",(0,l.jsx)("code",{className:"font-mono text-xs",children:"bash scripts/botlab/deploy-bot-wall.sh"}),", which re-publishes the paths and then verifies each one returns 200."]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"The wall loaded but did not connect."})," That is a VNC-level failure, not a page failure — the wall itself reports connected/failed counts once you enter the password."]})]}),(0,l.jsx)("p",{className:"mt-3 text-xs text-muted-foreground",children:"The VNC password is deliberately not carried in this page or in the URL: any page a bot browser opens could otherwise reach the local websocket, and websockets have no CORS."})]}),(0,l.jsxs)("section",{className:"rounded-xl border border-dashed border-border p-5","aria-label":"Not wired yet",children:[(0,l.jsx)("h2",{className:"text-sm font-semibold",children:"Not wired yet"}),(0,l.jsxs)("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-muted-foreground",children:[(0,l.jsxs)("li",{children:["Per-bot cell headers (name \xb7 last round verdict \xb7 whether CDP is alive) need"," ",(0,l.jsx)("code",{className:"font-mono text-xs",children:"browserPort"})," and round results on the daemon's persona route. That route is owned by another track and is not published today."]}),(0,l.jsx)("li",{children:"Running a command from this surface needs a POST route that does not exist yet."})]})]})]})}function h(){let e=window.location.search,t=null;try{t=window.localStorage.getItem(n)}catch(e){t=null}return(0,l.jsx)(c,{search:e,remembered:t})}},73433:(e,t,s)=>{Promise.resolve().then(s.bind(s,66307))}},e=>{e.O(0,[2463,2196,7358],()=>e(e.s=73433)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3933],{5997:(e,t,s)=>{"use strict";s.d(t,{Zr:()=>l,f6:()=>n,oD:()=>r});let a="elanous.daemon.sessionId";function n(){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 r(){let e=function(){let e=new URLSearchParams(window.location.search).get("session");return e?(localStorage.setItem(a,e),e):localStorage.getItem(a)}();if(e)return e;let t=n();return localStorage.setItem(a,t),t}function l(){let e=n();return localStorage.setItem(a,e),e}},15151:(e,t,s)=>{"use strict";s.d(t,{C:()=>i,DaemonProvider:()=>d,Q:()=>m});var a=s(55539),n=s(46124),r=s(8101),l=s(5997),o=s(18060),c=s(72215);let i=(0,n.createContext)(null);function d(e){let{children:t}=e,s={baseUrl:"",token:"",provider:""},[d,m]=(0,n.useState)(s),[u,p]=(0,n.useState)(""),[x]=(0,n.useState)(()=>new o.ki(s));(0,n.useEffect)(()=>{let e=(0,r.Fp)();m(e),x.updateConfig(e),p((0,l.oD)()),(0,c.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[x]),(0,n.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let t=(0,r.Fp)();x.updateConfig(t),m(t),(0,c.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,c.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 f=e=>{m(t=>{let s={...t,...e};return(0,r.Qc)(e),x.updateConfig(s),(0,c.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),s})},h=e=>{p(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,c.cY)("webterm.provider.daemon.session-set",{sessionId:e})},g=(0,n.useMemo)(()=>({config:d,setConfig:f,client:x,sessionId:u,setSessionId:h}),[d,x,u]);return(0,a.jsx)(i.Provider,{value:g,children:t})}function m(){let e=(0,n.useContext)(i);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},29744:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var a=s(55539),n=s(46124),r=s(15151);let l="user@elanvital.ai",o={name:"이름",org:"회사명",kind:"회사/개인",interest:"관심 분야",contact:"연락처",consent:"동의"};function c(){let{client:e}=(0,r.Q)(),[t,s]=(0,n.useState)(""),[c,i]=(0,n.useState)(""),[d,m]=(0,n.useState)("personal"),[u,p]=(0,n.useState)("A"),[x,f]=(0,n.useState)(""),[h,g]=(0,n.useState)(!1),[b,y]=(0,n.useState)(!1),[j,v]=(0,n.useState)(""),[k,N]=(0,n.useState)(!1);async function w(s){if(s.preventDefault(),!h||b)return;let a={name:t.trim(),..."company"===d?{org:c.trim()}:{},kind:d,interest:u,contact:x.trim(),consent:!0},n=a.name?"company"!==d||a.org?a.contact?null:"contact":"org":"name";if(n){N(!0),v("".concat(o[n]," 항목을 입력해 주세요."));return}y(!0),v("");try{let t=await e.submitConsultRequest(a);if("receiptId"in t)N(!1),v("접수했습니다 \xb7 ".concat(t.receiptId," — 곧 연락드리겠습니다"));else{var r;N(!0),v("".concat(null!=(r=o[t.field])?r:"필수"," 항목을 확인해 주세요."))}}catch(e){N(!0),v("접수하지 못했습니다. 연결 상태를 확인하고 다시 보내 주세요.")}finally{y(!1)}}return(0,a.jsxs)("main",{className:"mx-auto w-full max-w-xl px-5 py-10 sm:py-16",children:[(0,a.jsxs)("header",{className:"mb-8",children:[(0,a.jsx)("p",{className:"mb-2 text-sm font-medium text-primary",children:"AX \xb7 상담 문의"}),(0,a.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"어떤 도움이 필요하신가요?"}),(0,a.jsx)("p",{className:"mt-3 text-sm text-muted-foreground",children:"도입 상담이나 교육 과정에 대해 남겨 주세요. 확인 후 연락드리겠습니다."}),(0,a.jsxs)("p",{className:"mt-2 text-sm text-muted-foreground",children:["메일로 바로 문의: ",(0,a.jsx)("a",{className:"underline",href:"mailto:".concat(l),children:l})]})]}),(0,a.jsxs)("form",{onSubmit:w,noValidate:!0,className:"space-y-6 rounded-xl border border-border bg-card p-5 sm:p-8",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:"consult-name",className:"block text-sm font-medium",children:"이름"}),(0,a.jsx)("input",{id:"consult-name",name:"name",required:!0,autoComplete:"name",value:t,onChange:e=>s(e.target.value),className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm"})]}),(0,a.jsxs)("fieldset",{className:"space-y-2",children:[(0,a.jsx)("legend",{className:"text-sm font-medium",children:"회사/개인"}),(0,a.jsxs)("div",{className:"flex gap-5 text-sm",children:[(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"radio",name:"kind",value:"company",checked:"company"===d,onChange:()=>m("company")}),"회사"]}),(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"radio",name:"kind",value:"personal",checked:"personal"===d,onChange:()=>m("personal")}),"개인"]})]})]}),"company"===d&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:"consult-org",className:"block text-sm font-medium",children:"회사명"}),(0,a.jsx)("input",{id:"consult-org",name:"org",required:!0,autoComplete:"organization",value:c,onChange:e=>i(e.target.value),className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm"})]}),(0,a.jsxs)("fieldset",{className:"space-y-2",children:[(0,a.jsx)("legend",{className:"text-sm font-medium",children:"관심 분야"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 text-sm",children:[(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"radio",name:"interest",value:"A",checked:"A"===u,onChange:()=>p("A")}),"A \xb7 AX 도입 상담"]}),(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"radio",name:"interest",value:"B",checked:"B"===u,onChange:()=>p("B")}),"B \xb7 과정\xb7교육 문의"]})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:"consult-contact",className:"block text-sm font-medium",children:"연락처 (메일 또는 전화)"}),(0,a.jsx)("input",{id:"consult-contact",name:"contact",required:!0,value:x,onChange:e=>f(e.target.value),className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm"})]}),(0,a.jsxs)("label",{className:"flex items-start gap-3 text-sm leading-6",children:[(0,a.jsx)("input",{type:"checkbox",name:"consent",checked:h,onChange:e=>g(e.target.checked),className:"mt-1"}),(0,a.jsx)("span",{children:"입력한 정보는 상담 연락을 위해 서버로 전송하며, 상담 연락에만 사용합니다"})]}),j&&(0,a.jsx)("p",{role:k?"alert":"status",className:k?"text-sm text-destructive":"text-sm text-primary",children:j}),(0,a.jsx)("button",{type:"submit",disabled:!h||b,className:"w-full rounded-md bg-primary px-4 py-2.5 text-sm font-medium text-primary-foreground disabled:cursor-not-allowed disabled:opacity-50",children:b?"보내는 중…":"보내기"})]})]})}},41765:(e,t,s)=>{Promise.resolve().then(s.bind(s,29744))}},e=>{e.O(0,[8060,2463,2196,7358],()=>e(e.s=41765)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6348],{3004:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});let n=(0,s(3704).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},7006:(e,t,s)=>{Promise.resolve().then(s.bind(s,47106))},18068:(e,t,s)=>{"use strict";s.d(t,{Qb:()=>a,SI:()=>o,dJ:()=>l});let n="elanous:auth-required",r=null,i=!1;function a(e){null===r&&(r=e,window.dispatchEvent(new CustomEvent(n,{detail:{path:e}})))}function l(e){let t=window,s=t=>e(t.detail);return t.addEventListener(n,s),null===r||i||e({path:r}),()=>t.removeEventListener(n,s)}function o(){i=!0}},24231:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});let n=(0,s(3704).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"}]])},47106:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>E});var n=s(55539),r=s(81694),i=s(3004);let a=(0,s(3704).A)("circle-dashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);var l=s(74227),o=s(24231),c=s(46124),d=s(94306),u=s(21501),h=s(50363),m=s(67264),p=s(65354),g=s(79247);function f(e){let{available:t,declared:s,onPick:r,pendingId:i,previews:a,onPreview:l}=e,{systems:o,themes:c}=function(e){let t=[],s=[];for(let n of e)("design-system"===n.source?t:s).push(n);return{systems:t,themes:s}}(t);return(0,n.jsxs)("div",{className:"space-y-4",children:[o.length>0&&(0,n.jsx)(x,{title:"Design systems",hint:"Web \xb7 copies tokens.css and DESIGN.md into design/system/",items:o,declared:s,onPick:r,pendingId:i,previews:a,onPreview:l}),c.length>0&&(0,n.jsx)(x,{title:"Terminal themes",hint:"One line in DESIGN.md",items:c,declared:s,onPick:r,pendingId:i,previews:a,onPreview:l})]})}function x(e){let{title:t,hint:s,items:r,declared:i,onPick:a,pendingId:l,previews:o,onPreview:c}=e;return(0,n.jsxs)("section",{className:"space-y-2","aria-label":t,children:[(0,n.jsxs)("h3",{className:"flex items-baseline gap-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:[t,(0,n.jsxs)("span",{className:"normal-case tracking-normal",children:[r.length," \xb7 ",s]})]}),(0,n.jsx)("ul",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:r.map(e=>(0,n.jsx)(b,{direction:e,chosen:e.id===i,onPick:a,pending:l===e.id,busy:null!==l,hasPreview:(null==o?void 0:o.has(e.id))===!0&&void 0!==c,onPreview:c},e.id))})]})}function b(e){var t,s,r,a,l,o,c,d,u;let{direction:h,chosen:m,onPick:p,pending:g,busy:f,hasPreview:x,onPreview:b}=e,y=null!=(r=h.swatch.bg)?r:h.isDark?"#111111":"#ffffff",v=null!=(a=h.swatch.fg)?a:h.swatch.text,w=null!=(o=null!=(l=null==(t=h.typography)?void 0:t.display)?l:null==(s=h.typography)?void 0:s.body)?o:null;return(0,n.jsxs)("li",{"data-direction":h.id,"data-direction-id":h.id,className:"flex flex-col gap-2 rounded-md border p-3 text-sm ".concat(m?"border-primary ring-1 ring-primary":""),children:[(0,n.jsxs)("div",{className:"flex items-center gap-1.5","aria-hidden":!0,children:[[y,v,h.swatch.accent].map((e,t)=>(0,n.jsx)("span",{className:"h-5 w-5 rounded-full border",style:{backgroundColor:e,borderColor:h.swatch.muted}},t)),h.category&&(0,n.jsx)("span",{className:"ml-auto truncate text-[11px] text-muted-foreground",children:h.category})]}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("p",{className:"truncate font-medium",children:null!=(c=h.label)?c:h.id}),(0,n.jsxs)("p",{className:"truncate text-xs text-muted-foreground",children:[(0,n.jsx)("code",{children:h.id}),w?" \xb7 ".concat(w):""]}),(0,n.jsx)("p",{className:"mt-1 line-clamp-2 text-xs text-muted-foreground",children:h.mood})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[x&&(0,n.jsx)("button",{type:"button",onClick:()=>null==b?void 0:b(h.id),className:"self-start rounded-md border px-2.5 py-1 text-xs hover:bg-muted","aria-label":"Preview ".concat(null!=(d=h.label)?d:h.id),children:"Preview"}),m?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-primary",children:[(0,n.jsx)(i.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Selected"]}):(0,n.jsx)("button",{type:"button",disabled:f,onClick:()=>p(h.id),className:"self-start rounded-md border px-2.5 py-1 text-xs hover:bg-muted disabled:opacity-50","aria-label":"Select ".concat(null!=(u=h.label)?u:h.id),children:g?"Selecting…":"Select"})]})]})}let y=/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;function v(e){return e.split(/[\s,]+/).map(e=>e.trim()).filter(Boolean)}function w(e,t){if("undefined"==typeof document)return t;let s=document.getElementById(e);return s&&"value"in s&&"string"==typeof s.value?s.value:t}function k(e){let{onCreate:t,onSelect:s,pending:r,result:i,error:a}=e,[l,o]=(0,c.useState)("url"),[d,u]=(0,c.useState)(""),[h,m]=(0,c.useState)(""),[p,g]=(0,c.useState)(""),f=v(h).filter(e=>y.test(e)),x=v(h).length,b=x>=2&&x<=6&&p.trim().length>0&&f.length===x;return(0,n.jsxs)("section",{className:"rounded-md border p-3","aria-label":"Make my system","data-make-my-system":"",children:[(0,n.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,n.jsx)("h3",{className:"text-sm font-medium",children:"Make my system"}),(0,n.jsxs)("div",{className:"flex gap-1",role:"tablist",children:[(0,n.jsx)("button",{type:"button",role:"tab","aria-selected":"url"===l,className:"rounded-md px-2 py-1 text-xs ".concat("url"===l?"bg-muted":""),onClick:()=>o("url"),children:"From a website"}),(0,n.jsx)("button",{type:"button",role:"tab","aria-selected":"colors"===l,className:"rounded-md px-2 py-1 text-xs ".concat("colors"===l?"bg-muted":""),onClick:()=>o("colors"),children:"From colors"})]})]}),(0,n.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:"Reference, not a copy — logos, names, images and text are not taken."}),"url"===l?(0,n.jsxs)("form",{className:"mt-2 flex flex-col gap-2 sm:flex-row",onSubmit:e=>{e.preventDefault();let s=d.trim();s&&!r&&t({kind:"url",url:s})},children:[(0,n.jsx)("label",{className:"sr-only",htmlFor:"make-system-url",children:"Website URL"}),(0,n.jsx)("input",{id:"make-system-url",type:"url",value:d,disabled:r,placeholder:"https://example.com",onChange:e=>u(e.target.value),className:"min-w-0 flex-1 rounded-md border bg-transparent px-2 py-1.5 text-sm"}),(0,n.jsx)("button",{type:"button",disabled:r,onClick:()=>{let e=w("make-system-url",d).trim();e&&!r&&t({kind:"url",url:e})},className:"rounded-md border px-3 py-1.5 text-sm hover:bg-muted disabled:opacity-50",children:r?"Measuring…":"Make it"})]}):(0,n.jsxs)("form",{className:"mt-2 space-y-2",onSubmit:e=>{e.preventDefault(),b&&!r&&t({kind:"palette",colors:f,id:p.trim()})},children:[(0,n.jsx)("label",{className:"block text-xs text-muted-foreground",htmlFor:"make-system-colors",children:"2–6 colors"}),(0,n.jsx)("input",{id:"make-system-colors",value:h,disabled:r,placeholder:"#f4efe6, #1f3a2e, #c8553d",onChange:e=>m(e.target.value),className:"w-full rounded-md border bg-transparent px-2 py-1.5 text-sm"}),f.length>0&&(0,n.jsx)("ul",{className:"flex gap-1","aria-label":"Color preview",children:f.map(e=>(0,n.jsx)("li",{className:"h-6 w-6 rounded-sm border",style:{backgroundColor:e},title:e},e))}),(0,n.jsx)("label",{className:"block text-xs text-muted-foreground",htmlFor:"make-system-id",children:"id"}),(0,n.jsx)("input",{id:"make-system-id",value:p,disabled:r,placeholder:"stumptowncoffee",onChange:e=>g(e.target.value),className:"w-full rounded-md border bg-transparent px-2 py-1.5 text-sm"}),(0,n.jsx)("button",{type:"button",disabled:r,onClick:()=>{let e=v(w("make-system-colors",h)).filter(e=>y.test(e)),s=w("make-system-id",p).trim();r||e.length<2||e.length>6||0===s.length||t({kind:"palette",colors:e,id:s})},className:"rounded-md border px-3 py-1.5 text-sm hover:bg-muted disabled:opacity-50",children:r?"Measuring…":"Make it"})]}),r&&(0,n.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"Measuring…"}),a&&(0,n.jsx)("p",{className:"mt-2 text-sm text-error",role:"alert",children:a}),i&&(0,n.jsxs)("div",{className:"mt-2 space-y-1 text-sm",children:[(0,n.jsxs)("p",{children:["Made ",i.id," — ",i.tokens.length," tokens \xb7 ",i.unread," unread"]}),i.warnings.map(e=>(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:e},e)),(0,n.jsx)("button",{type:"button",onClick:()=>s(i.id),className:"rounded-md border px-2.5 py-1 text-xs hover:bg-muted",children:"Select it"})]})]})}let j={missing:"Missing",declared:"Declared",available:"Not declared"},N={missing:"bg-error/10 text-error",declared:"bg-green-600/10 text-green-700",available:"bg-muted text-muted-foreground"},S={missing:r.A,declared:i.A,available:a};function C(){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:"Design check"}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"Connect to a NEXUS daemon to see this repository's craft rulebooks."})]})}function M(){let{data:e,isLoading:t,error:s,refetch:i,isFetching:a}=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=(0,d.M1)();return(0,u.I)({queryKey:p.AF.designCheck(),queryFn:()=>s.getDesignCheck(),enabled:null==(e=t.enabled)||e,refetchInterval:3e4})}();return(0,n.jsxs)("div",{className:"mx-auto max-w-3xl space-y-4 p-6",children:[(0,n.jsxs)("header",{className:"flex items-start justify-between gap-4",children:[(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsxs)("h1",{className:"flex items-center gap-2 text-xl font-semibold tracking-tight",children:[(0,n.jsx)(l.A,{className:"h-5 w-5","aria-hidden":!0}),"Design check"]}),(0,n.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Craft rulebooks declared by this repository's ",(0,n.jsx)("code",{children:"DESIGN.md"}),"."]})]}),(0,n.jsxs)("button",{type:"button",onClick:()=>void i(),className:"inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-sm hover:bg-muted","aria-label":"Refresh design check",children:[(0,n.jsx)(o.A,{className:"h-4 w-4 ".concat(a?"animate-spin":""),"aria-hidden":!0}),"Refresh"]})]}),t&&(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading…"}),s&&(0,n.jsxs)("p",{className:"rounded-md bg-error/10 p-3 text-sm text-error",children:["Could not reach the daemon: ",s instanceof Error?s.message:String(s)]}),e&&!1===e.ok&&(0,n.jsxs)("div",{className:"space-y-2 rounded-md border border-warning/40 bg-warning/5 p-4",children:[(0,n.jsxs)("p",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,n.jsx)(r.A,{className:"h-4 w-4 text-warning","aria-hidden":!0}),"Design check blocked"]}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:function(e,t){switch(e){case"no-repository":return"The daemon is not running inside a git checkout, so there is no DESIGN.md to check.";case"craft-directory":return"elanous's craft rulebook directory could not be read: ".concat(null!=t?t:"(unknown path)");case"design-document":return"This repository has no readable DESIGN.md: ".concat(null!=t?t:"(unknown path)");default:return"The design check is blocked (".concat(e,").")}}(e.blockedOn,e.path)})]}),e&&!0===e.ok&&(0,n.jsx)(F,{data:e})]})}function F(e){let{data:t}=e,s=function(e){let t=new Set(e.unavailableRulebooks),s=new Map;for(let t of e.availableRulebooks)s.set(t,"available");for(let n of e.declaredRulebooks)s.set(n,t.has(n)?"missing":"declared");let n={missing:0,declared:1,available:2};return[...s.entries()].map(e=>{let[t,s]=e;return{name:t,status:s}}).sort((e,t)=>n[e.status]-n[t.status]||e.name.localeCompare(t.name))}(t),r=t.unavailableRulebooks.length;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"rounded-md p-3 text-sm ".concat(r?"bg-error/10 text-error":"bg-green-600/10 text-green-700"),children:r?"".concat(r," declared rulebook").concat(1===r?"":"s"," could not be found."):"All ".concat(t.declaredRulebooks.length," declared rulebook").concat(1===t.declaredRulebooks.length?"":"s"," resolve.")}),(0,n.jsxs)("dl",{className:"grid grid-cols-1 gap-1 text-xs text-muted-foreground sm:grid-cols-2",children:[(0,n.jsxs)("div",{className:"truncate sm:col-span-2",children:[(0,n.jsx)("dt",{className:"inline font-medium",children:"Repository: "}),(0,n.jsxs)("dd",{className:"inline",children:[(0,n.jsx)("code",{children:t.repoRoot}),t.repoSource&&(0,n.jsxs)("span",{className:"ml-1",children:["(","config"===t.repoSource?"harness.defaultRepo":"daemon folder",")"]})]})]}),(0,n.jsxs)("div",{className:"truncate",children:[(0,n.jsx)("dt",{className:"inline font-medium",children:"Document: "}),(0,n.jsx)("dd",{className:"inline",children:(0,n.jsx)("code",{children:t.documentPath})})]}),(0,n.jsxs)("div",{className:"truncate",children:[(0,n.jsx)("dt",{className:"inline font-medium",children:"Rulebooks: "}),(0,n.jsx)("dd",{className:"inline",children:(0,n.jsx)("code",{children:t.craftDirectory})})]})]}),(0,n.jsx)(O,{data:t}),0===s.length?(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"elanous ships no craft rulebooks and this document declares none."}):(0,n.jsx)("ul",{className:"divide-y rounded-md border",children:s.map(e=>{let t=S[e.status];return(0,n.jsxs)("li",{className:"flex items-center justify-between gap-3 px-3 py-2",children:[(0,n.jsxs)("span",{className:"flex items-center gap-2 text-sm",children:[(0,n.jsx)(t,{className:"h-4 w-4 shrink-0","aria-hidden":!0}),(0,n.jsx)("code",{children:e.name})]}),(0,n.jsx)("span",{className:"shrink-0 rounded-full px-2 py-0.5 text-xs ".concat(N[e.status]),children:j[e.status]})]},e.name)})})]})}function O(e){var t,s,r,i;let{data:a}=e,l=function(){let e=(0,d.M1)(),t=(0,h.jE)();return(0,m.n)({mutationFn:t=>e.setDesignDirection(t),onSuccess:()=>t.invalidateQueries({queryKey:p.AF.designCheck()})})}(),o=function(){let e=(0,d.M1)(),t=(0,h.jE)();return(0,m.n)({mutationFn:t=>e.createDesignSystem(t),onSuccess:()=>t.invalidateQueries({queryKey:p.AF.designCheck()})})}(),x=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=(0,d.M1)();return(0,u.I)({queryKey:p.AF.designPreviews(),queryFn:()=>s.listDesignPreviews(),enabled:null==(e=t.enabled)||e,refetchInterval:3e4})}(),[b,y]=(0,c.useState)(null),[v,w]=(0,c.useState)(null),j=a.directions;if((0,c.useEffect)(()=>{if(!v||!j)return;let e=document.querySelector('[data-direction-id="'.concat(v.replace(/"/g,""),'"]'));null==e||e.scrollIntoView({block:"nearest"})},[v,j]),!j)return null;let N=l.isPending&&null!=(s=l.variables)?s:null;return(0,n.jsxs)("section",{className:"space-y-2",children:[(0,n.jsx)("h2",{className:"text-sm font-medium",children:"Design direction"}),(0,n.jsx)(k,{pending:o.isPending,result:null!=(r=o.data)?r:null,error:o.isError?function(e){switch(e instanceof g.Iu&&e.body&&"object"==typeof e.body?e.body.reason:void 0){case"bad-url":return"That address is not an http or https URL.";case"bad-id":return"The id may only use lowercase letters, digits, and hyphens.";case"id-taken":return"That id is already taken.";case"extract-failed":return"The page could not be measured.";case"no-colors":return"Give between 2 and 6 colors.";case"busy":return"Another system is being made — wait for it to finish.";default:if(e instanceof g.Iu&&401===e.status)return"Only the owner can make a system — sign in first.";return"Could not make the system: ".concat(e instanceof Error?e.message:String(e))}}(o.error):null,onCreate:e=>{o.mutate(e,{onSuccess:e=>w(e.id)})},onSelect:e=>{w(e),l.mutate(e)}}),j.unavailable&&(0,n.jsxs)("p",{className:"rounded-md bg-error/10 p-2 text-sm text-error",children:["Declared direction ",(0,n.jsx)("code",{children:j.unavailable})," is not registered."]}),null===j.declared&&!j.unavailable&&(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"None declared — pick one below."}),l.isError&&(0,n.jsx)("p",{className:"rounded-md bg-error/10 p-2 text-sm text-error",children:function(e){switch(e instanceof g.Iu&&e.body&&"object"==typeof e.body?e.body.reason:void 0){case"unknown-direction":return"The daemon does not know this direction.";case"no-repository":return"The daemon has no repository to write to (set harness.defaultRepo).";case"conflicting-system-file":return"design/system/ already holds a file the daemon will not overwrite.";case"cannot-read":return"The DESIGN.md could not be read.";case"cannot-write":return"The DESIGN.md could not be written.";default:if(e instanceof g.Iu&&401===e.status)return"Only the owner can pick a direction — sign in first.";return"Could not set the direction: ".concat(e instanceof Error?e.message:String(e))}}(l.error)}),b&&(0,n.jsx)(A,{system:b,onClose:()=>y(null),onSelect:()=>l.mutate(b),selecting:N===b,busy:null!==N,alreadySelected:j.declared===b}),(0,n.jsx)(f,{available:j.available,declared:j.declared,pendingId:N,previews:new Set((null!=(i=null==(t=x.data)?void 0:t.previews)?i:[]).map(e=>e.system)),onPreview:e=>y(e),onPick:e=>l.mutate(e)})]})}function A(e){let{system:t,onClose:s,onSelect:r,selecting:i,busy:a,alreadySelected:l}=e,o=function(e){let t=(0,d.M1)();return(0,u.I)({queryKey:p.AF.designPreview(null!=e?e:""),queryFn:()=>t.getDesignPreview(e),enabled:null!==e&&""!==e})}(t);return(0,n.jsxs)("div",{className:"space-y-2 rounded-md border p-3",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsxs)("p",{className:"text-sm font-medium",children:["Preview \xb7 ",(0,n.jsx)("code",{children:t})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[l?(0,n.jsx)("span",{className:"text-xs text-primary",children:"Selected"}):(0,n.jsx)("button",{type:"button",disabled:a,onClick:r,className:"rounded-md border px-2.5 py-1 text-xs hover:bg-muted disabled:opacity-50","aria-label":"Select ".concat(t),children:i?"Selecting…":"Select"}),(0,n.jsx)("button",{type:"button",onClick:s,className:"rounded-md border px-2.5 py-1 text-xs hover:bg-muted","aria-label":"Close preview",children:"Close"})]})]}),o.isLoading&&(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading preview…"}),o.isError&&(0,n.jsxs)("p",{className:"text-sm text-error",children:["Could not load the preview: ",o.error instanceof Error?o.error.message:String(o.error)]}),o.data&&(0,n.jsx)("iframe",{sandbox:"",srcDoc:o.data.html,title:"Preview \xb7 ".concat(t),className:"h-80 w-full rounded-md border bg-white"})]})}function E(){return(0,n.jsx)(C,{})}},65354:(e,t,s)=>{"use strict";s.d(t,{AF:()=>n});let n={all:["nexus"],health:()=>[...n.all,"health"],snapshot:()=>[...n.all,"snapshot"],tabs:e=>e?[...n.all,"tabs",{kind:e}]:[...n.all,"tabs"],tab:e=>[...n.all,"tab",e],templates:()=>[...n.all,"templates"],template:e=>[...n.all,"template",e],config:()=>[...n.all,"config"],switches:()=>[...n.all,"switches"],switch:e=>[...n.all,"switch",e],secrets:()=>[...n.all,"secrets"],bindingChannels:()=>[...n.all,"bindings","channels"],bindings:e=>[...n.all,"bindings",e],binding:(e,t)=>[...n.all,"binding",e,t],logsTail:(e,t)=>t?[...n.all,"logs",e,{lines:t}]:[...n.all,"logs",e],workflows:()=>[...n.all,"workflows"],workflow:e=>[...n.all,"workflow",e],workflowRun:e=>[...n.all,"workflow-run",e],workflowRuns:()=>[...n.all,"workflow-runs"],pendingApprovals:()=>[...n.all,"workflow-pending-approvals"],platforms:()=>[...n.all,"platforms"],providers:()=>[...n.all,"providers"],worktrees:()=>[...n.all,"worktrees"],designCheck:()=>[...n.all,"design-check"],designPreviews:()=>[...n.all,"design-previews"],designPreview:e=>[...n.all,"design-preview",e],registryCatalog:()=>[...n.all,"registry-catalog"],resolvedView:()=>[...n.all,"resolved-view"]};n.snapshot(),n.tabs(),n.health(),n.snapshot(),n.config(),n.switches()},67264:(e,t,s)=>{"use strict";s.d(t,{n:()=>d});var n=s(46124),r=s(17600),i=s(92477),a=s(33814),l=s(40404),o=class extends a.Q{#e;#t=void 0;#s;#n;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,l.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,l.EN)(t.mutationKey)!==(0,l.EN)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#r(),this.#i()}mutate(e,t){return this.#n=t,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(e)}#r(){let e=this.#s?.state??(0,r.$)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#i(e){i.jG.batch(()=>{if(this.#n&&this.hasListeners()){let t=this.#t.variables,s=this.#t.context,n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#n.onSuccess?.(e.data,t,s,n)}catch(e){Promise.reject(e)}try{this.#n.onSettled?.(e.data,null,t,s,n)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#n.onError?.(e.error,t,s,n)}catch(e){Promise.reject(e)}try{this.#n.onSettled?.(void 0,e.error,t,s,n)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},c=s(50363);function d(e,t){let s=(0,c.jE)(t),[r]=n.useState(()=>new o(s,e));n.useEffect(()=>{r.setOptions(e)},[r,e]);let a=n.useSyncExternalStore(n.useCallback(e=>r.subscribe(i.jG.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),d=n.useCallback((e,t)=>{r.mutate(e,t).catch(l.lQ)},[r]);if(a.error&&(0,l.GU)(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:d,mutateAsync:a.mutate}}},72215:(e,t,s)=>{"use strict";let n;s.d(t,{cY:()=>d,x8:()=>l});let r={debug:0,info:1,warn:2,error:3},i="/v1/debug-logs/batch",a=null;function l(e){a=e}class o{health(){return{pending:this.queue.length,consecutiveFailures:this.consecutiveFailures,lastOkAt:this.lastOkAt,droppedByCap:this.droppedByCap,fallbackBatches:this.fallbackBatches}}push(e){if(!(r[function(e){let t=e.slice(e.lastIndexOf(".")+1).toLowerCase();return/^(error|exception|crash|fail|failed)$/.test(t)?"error":/^(warn|degraded|timeout)$/.test(t)?"warn":/^(boot|ready|start|begin|open|ok|done|resolve|end|stop|close)$/.test(t)?"info":"debug"}(e.category)]<r[this.minLevel])){if(this.queue.push(e),this.queue.length>500){let e=this.queue.length-500;this.droppedByCap+=e,this.queue.splice(0,e)}if(this.queue.length>=100&&!this.inFlight){null!==this.timer&&(clearTimeout(this.timer),this.timer=null),this.flush();return}null===this.timer&&(this.timer=setTimeout(()=>{this.flush()},this.flushMs))}}async flush(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.inFlight||0===this.queue.length)return;let e=this.queue.slice(0,100);this.inFlight=!0;let t=!1,s=JSON.stringify({records:e});try{var n,r;t=await (n=this.fetchFn(s),r=this.postTimeoutMs,new Promise((e,t)=>{let s=setTimeout(()=>t(Error("debug-forward timeout after ".concat(r,"ms"))),r);n.then(t=>{clearTimeout(s),e(t)},e=>{clearTimeout(s),t(e)})}))}catch(e){t=!1}finally{this.inFlight=!1}if(!t){if(this.consecutiveFailures+=1,this.consecutiveFailures>=2&&a)try{await a(JSON.stringify({records:[...e,this.blockedNotice()]}))&&(this.fallbackBatches+=1)}catch(e){}this.wasFailing=!0,this.scheduleRetry();return}let i=this.lastOkAt;this.lastOkAt=Date.now();let l=this.consecutiveFailures;this.consecutiveFailures=0,this.queue.splice(0,e.length),this.wasFailing&&(this.wasFailing=!1,this.queue.push({ts:new Date().toISOString(),category:"pwa.debug-forwarder.recovered",event:"recovered",data:{consecutiveFailures:l,droppedByCap:this.droppedByCap,fallbackBatches:this.fallbackBatches,pending:this.queue.length,previousOkAt:i},source:{platform:"pwa"}})),this.queue.length>0&&null===this.timer&&(this.timer=setTimeout(()=>{this.flush()},this.flushMs))}scheduleRetry(){if(null!==this.timer||0===this.queue.length)return;let e=Math.min(this.flushMs*2**this.consecutiveFailures,3e4);this.timer=setTimeout(()=>{this.flush()},e)}blockedNotice(){return{ts:new Date().toISOString(),category:"pwa.debug-forwarder.http-blocked",event:"http-blocked",data:{consecutiveFailures:this.consecutiveFailures,pending:this.queue.length,droppedByCap:this.droppedByCap,lastOkAt:this.lastOkAt,via:"acp-fallback"},source:{platform:"pwa"}}}beaconFlush(){if(0!==this.queue.length)try{if("undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon){let e=this.queue.slice(0,100),t=new Blob([JSON.stringify({records:e})],{type:"application/json"});navigator.sendBeacon(i,t)&&this.queue.splice(0,e.length)}}catch(e){}}get pending(){return this.queue.length}constructor(e=c,t="debug",s=1e4,n=100){this.fetchFn=e,this.minLevel=t,this.postTimeoutMs=s,this.flushMs=n,this.queue=[],this.timer=null,this.inFlight=!1,this.consecutiveFailures=0,this.lastOkAt=null,this.droppedByCap=0,this.fallbackBatches=0,this.wasFailing=!1}}async function c(e){return(await fetch(i,{method:"POST",headers:{"content-type":"application/json"},body:e,keepalive:!0,..."undefined"!=typeof AbortSignal&&"function"==typeof AbortSignal.timeout?{signal:AbortSignal.timeout(1e4)}:{}})).ok}function d(e,t){if("undefined"==typeof console)return;let s=new Date().toISOString();if(void 0!==t){let n="";try{let e=new WeakSet;n=JSON.stringify(t,(t,s)=>{if("bigint"==typeof s)return"".concat(s.toString(),"n");if("function"==typeof s)return"[fn ".concat(s.name||"anon","]");if(s&&"object"==typeof s){if(e.has(s))return"[circular]";e.add(s)}return s})}catch(e){n="[unserializable: ".concat(String(e),"]")}n&&n.length>800&&(n=n.slice(0,797)+"..."),console.debug("[".concat(s,"] ").concat(e," ").concat(n),t),u(s,e,n)}else console.debug("[".concat(s,"] ").concat(e)),u(s,e,void 0)}function u(e,t,s){let r,i=function(){if(void 0!==n)return n;let e=function(){try{let e="off"!==window.localStorage.getItem("elanous.pwa.debug.forward"),t=window.localStorage.getItem("elanous.pwa.debug.forwardLevel");return{forward:e,level:"info"===t||"warn"===t||"error"===t?t:"debug"}}catch(e){return{forward:!0,level:"debug"}}}();if(!e.forward)return n=null,null;let t=new o(c,e.level,1e4,1500);try{window.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&t.beaconFlush()})}catch(e){}return n=t,t}();if(!i)return;let a=t.slice(t.lastIndexOf(".")+1)||t;if(void 0!==s&&""!==s)try{r=JSON.parse(s)}catch(e){r=s}i.push({ts:e,category:t,event:a,...void 0!==r?{data:r}:{},source:{platform:"pwa"}})}},74227:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});let n=(0,s(3704).A)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])},81694:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});let n=(0,s(3704).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},94306:(e,t,s)=>{"use strict";s.d(t,{M1:()=>c,Qj:()=>d,tI:()=>o});var n=s(55539),r=s(46124),i=s(76642),a=s(50363);let l=(0,r.createContext)(null);function o(e){let{client:t,queryClient:s,defaultStaleTimeMs:o,children:c}=e,d=(0,r.useMemo)(()=>null!=s?s:new i.E({defaultOptions:{queries:{staleTime:null!=o?o:2e3,refetchOnWindowFocus:!1}}}),[s,o]);return(0,n.jsx)(l.Provider,{value:t,children:(0,n.jsx)(a.Ht,{client:d,children:c})})}function c(){let e=(0,r.useContext)(l);if(!e)throw Error("useNexusClient must be used within <NexusProvider>");return e}function d(){return(0,r.useContext)(l)}}},e=>{e.O(0,[3324,1844,9247,2463,2196,7358],()=>e(e.s=7006)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8891],{38620:(e,t,n)=>{"use strict";n.d(t,{InsidePage:()=>Y});var r=n(55539),s=n(46124),l=n(58603),a=n(58298);let i=[{id:"mission-fabric",title:"미션 패브릭",oneLine:"들어온 일을 미션으로 정하고 실행에 잇습니다.",docs:["docs/manual/MANUAL-mission-fabric-integration-2026-09-03.md"],code:["src/mission-loop/composite-cycle.ts","src/harness/mission-solve-loop.ts"]},{id:"graph-engineering",title:"그래프 엔지니어링",oneLine:"실행의 노드와 경로를 그래프로 읽습니다.",docs:["docs/manual/MANUAL-graph-operations-2026-09-10.md"],code:["src/self-implement/graph-templates.ts","src/self-implement/graph-authority.ts"]},{id:"pty-intelligence",title:"PTY 인텔리전스",oneLine:"에이전트가 터미널의 실행과 관측을 연결합니다.",docs:["docs/manual/MANUAL-external-agent-pty-missions-2026-08-11.md"],code:["src/self-dev/dev-cli.ts"]},{id:"loop-agent",title:"루프 에이전트",oneLine:"일을 반복 관측하고 다음 행동을 고릅니다.",docs:["docs/manual/MANUAL-execution-and-landing-loops-2026-09-29.md"],code:["src/harness/mission-solve-loop.ts","src/mission-loop/composite-cycle.ts"]},{id:"observation",title:"바닥 \xb7 관측\xb7인지\xb7힐링",oneLine:"본 것을 이해하고 스스로 고치는 바닥입니다.",docs:["docs/manual/MANUAL-self-cognition-observability-2026-07-14.md"],code:["src/self-implement/orchestrator.ts"]},{id:"harness",title:"받침 \xb7 하니스",oneLine:"구현과 검증이 지나가는 실행 받침입니다.",docs:["docs/TECH-harness-execution-anatomy-current-state-2026-08-10.md"],code:["src/self-implement/orchestrator.ts","src/self-dev/dev-cli.ts"]}];var o=n(81969);function d(e){let{entry:t}=e,[n,l]=(0,s.useState)(!1);return(0,r.jsxs)("details",{open:n,style:{minWidth:0,border:"1px solid #68788f",borderRadius:12,padding:18,background:"#16263b"},children:[(0,r.jsx)("summary",{onClick:e=>{e.preventDefault(),l(e=>!e)},style:{cursor:"pointer",fontWeight:700,overflowWrap:"anywhere"},children:(0,o.t)(t.title)}),(0,r.jsx)("p",{children:(0,o.t)(t.oneLine)}),(0,r.jsxs)("div",{children:[(0,r.jsx)("strong",{children:"문서"}),(0,r.jsx)("ul",{children:t.docs.map(e=>(0,r.jsx)("li",{style:{overflowWrap:"anywhere"},children:(0,o.t)(e)},e))}),(0,r.jsx)("strong",{children:"코드"}),(0,r.jsx)("ul",{children:t.code.map(e=>(0,r.jsx)("li",{style:{overflowWrap:"anywhere"},children:(0,o.t)(e)},e))})]})]})}function c(){return(0,r.jsxs)("div",{"data-architecture-scene":!0,style:{width:"100%",maxWidth:1600,margin:"auto",display:"grid",gap:20,fontSize:18},children:[(0,r.jsx)("h2",{style:{fontSize:28,margin:0},children:"엘라누스의 구조"}),(0,r.jsx)("div",{"aria-label":"네 기둥",style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(min(100%, 240px), 1fr))",gap:16},children:i.slice(0,4).map(e=>(0,r.jsx)(d,{entry:e},e.id))}),(0,r.jsx)("div",{"aria-label":"받침",style:{width:"100%",maxWidth:480,justifySelf:"center"},children:(0,r.jsx)(d,{entry:i[5]})}),(0,r.jsx)("div",{"aria-label":"바닥",children:(0,r.jsx)(d,{entry:i[4]})})]})}var u=n(15151),p=n(69370);let m={currentMissionId:null,missions:{}},h=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),f=e=>"string"==typeof e&&e.trim().length>0;function g(e){let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch(e){return null}if(!t||"object"!=typeof t||Array.isArray(t))return null;let n=t;if("wizard.step"!==n.category||"wizard.step"!==n.event||!n.data||"object"!=typeof n.data||Array.isArray(n.data))return null;let r=n.data;return"string"==typeof r.ts&&Number.isFinite(Date.parse(r.ts))&&"string"==typeof r.wizardId&&r.wizardId&&["request","research","draft","validate","install","done"].includes(r.step)&&"string"==typeof r.text?{ts:r.ts,wizardId:r.wizardId,step:r.step,text:r.text,...void 0===r.detail?{}:{detail:r.detail}}:null}function y(e,t){let n=e.logsStreamUrl({exactCategory:"wizard.step"});return n?(0,p.BX)(n,{events:{log:e=>{let n=g(e.data);n&&t(n)}}}):()=>{}}let b={currentRunId:null,runs:{}},x={start:"border-sky-400 bg-sky-500/15 text-sky-200",ok:"border-green-500 bg-green-500/15 text-green-300",fail:"border-red-500 bg-red-500/15 text-red-300"};function v(e){let{state:t,now:n,receivedAt:s,lastSettlement:l,lastActivityTs:a=null,activityStatus:i="loading",wizardSteps:d=[]}=e,c=t.currentRunId?t.runs[t.currentRunId]:null,u=!c||n-s>6e4,p=null==c?void 0:c.order.some(e=>"start"===c.nodes[e].phase),m=l&&!p&&n-l.receivedAt<15e3,h=l&&!p&&n-l.receivedAt>=15e3,f=c?Math.max(0,Math.floor((n-Date.parse(c.startedAt))/1e3)):0,g=c&&l?Math.max(0,Math.floor((Date.parse(l.ts)-Date.parse(c.startedAt))/1e3)):0,y=h?"fail"===l.phase?"실패 \xb7 ".concat(l.nodeId):"완료 \xb7 ".concat(g,"초"):null;return(0,r.jsxs)("section",{"aria-label":"라이브 트레이스",className:"min-w-0 space-y-6 p-6 text-lg leading-relaxed",children:[d.length>0&&(0,r.jsx)("ol",{"aria-label":"플러그인 마법사 흐름",children:d.map(e=>(0,r.jsxs)("li",{children:["마법사 ",e.step," \xb7 ",(0,o.t)(e.text)]},"".concat(e.wizardId,":").concat(e.step)))}),u?(0,r.jsxs)("div",{className:"space-y-4 text-muted-foreground",children:[(0,r.jsx)("p",{children:"지금 도는 런이 없습니다"}),(0,r.jsxs)("p",{role:"status",children:["마지막 활동: ",a&&Number.isFinite(Date.parse(a))?(0,r.jsxs)("time",{dateTime:a,children:[new Date(a).toLocaleString("ko-KR",{timeZone:"Asia/Seoul"})," KST"]}):"loading"===i?"확인 중":"unavailable"===i?"못 읽음":"기록 없음"]}),(0,r.jsx)("button",{type:"button",className:"rounded-lg border border-border px-5 py-3 text-lg",disabled:!0,children:"녹화 보기"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("header",{className:"flex flex-wrap items-center gap-x-5 gap-y-2 break-all text-lg",children:[(0,r.jsx)("h2",{className:"font-semibold",children:c.graphId}),(0,r.jsxs)("span",{children:["런 ",c.runId.slice(0,6)]}),(0,r.jsxs)("span",{children:["경과 ",f,"초"]}),y&&(0,r.jsx)("span",{role:"status",children:y})]}),(0,r.jsxs)("div",{role:"list","aria-label":"노드 흐름",className:"flex flex-wrap gap-3",children:[m&&(0,r.jsx)("span",{className:"rounded-lg border border-border bg-muted px-3 py-1 text-sm text-muted-foreground",children:"다음 단계 준비 중"}),c.order.map(e=>{let t=c.nodes[e];return(0,r.jsxs)("div",{role:"listitem",className:"min-w-0 max-w-full break-all rounded-lg border px-5 py-3 ".concat(x[t.phase]),children:[(0,r.jsxs)("span",{className:"start"===t.phase?"animate-pulse":"",children:[t.nodeId," \xb7 ","start"===t.phase?"진행 중":"ok"===t.phase?"ok":"fail"]}),t.retries>0&&(0,r.jsxs)("span",{className:"ml-3","aria-label":"다시 ".concat(t.retries,"회"),children:["↻",t.retries]})]},e)})]})]})]})}function w(){let{client:e,config:t}=(0,u.Q)(),[n,l]=(0,s.useState)(()=>({client:e,baseUrl:t.baseUrl,token:t.token,state:b,receivedAt:0,lastSettlement:null,lastActivityTs:null,activityStatus:"loading"})),[a,i]=(0,s.useState)(0),[o,d]=(0,s.useState)([]),c=n.client===e&&n.baseUrl===t.baseUrl&&n.token===t.token;return(0,s.useEffect)(()=>{let n=!0;l({client:e,baseUrl:t.baseUrl,token:t.token,state:b,receivedAt:0,lastSettlement:null,lastActivityTs:null,activityStatus:"loading"}),d([]),e.listLogs({category:"graph.run",event:"node",limit:"1"}).then(r=>{n&&l(n=>{var s,l;if(n.client!==e||n.baseUrl!==t.baseUrl||n.token!==t.token)return n;let a=null==(l=r.logs)||null==(s=l[0])?void 0:s.ts,i="string"==typeof a&&Number.isFinite(Date.parse(a))?a:null,o=i&&(!n.lastActivityTs||Date.parse(i)>Date.parse(n.lastActivityTs))?i:n.lastActivityTs;return{...n,lastActivityTs:o,activityStatus:r.ok&&Array.isArray(r.logs)?"ready":"unavailable"}})}).catch(()=>{n&&l(n=>n.client===e&&n.baseUrl===t.baseUrl&&n.token===t.token?{...n,activityStatus:"unavailable"}:n)});let r=y(e,e=>{n&&d(t=>"request"===e.step?[e]:[...t.filter(t=>t.wizardId===e.wizardId),e].slice(-6))}),s=function(e,t){let n=e.logsStreamUrl({category:"graph.run"});return n?(0,p.BX)(n,{events:{log:e=>{let n=function(e){let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch(e){return null}if("object"!=typeof t||null===t||Array.isArray(t))return null;let n=t;if("graph.run"!==n.category||"node"!==n.event)return null;let r=n.data;return"object"!=typeof r||null===r||Array.isArray(r)?null:["graphId","runId","nodeId"].every(e=>"string"==typeof r[e]&&r[e].trim().length>0)&&("start"===r.phase||"ok"===r.phase||"fail"===r.phase)&&"string"==typeof n.ts&&Number.isFinite(Date.parse(n.ts))&&(void 0===r.seconds||"number"==typeof r.seconds&&Number.isFinite(r.seconds)&&!(r.seconds<0))?{kind:"node",graphId:r.graphId,runId:r.runId,nodeId:r.nodeId,phase:r.phase,ts:n.ts,...void 0===r.seconds?{}:{seconds:r.seconds}}:null}(e.data);n&&t(n)}}}):()=>{}}(e,r=>{if(!n)return;let s=Date.now();l(l=>{var a,i;if(!n)return l;let o=l.client===e&&l.baseUrl===t.baseUrl&&l.token===t.token,d=o?l.state:b,c=d.currentRunId===r.runId&&"start"!==r.phase&&(null==(i=d.runs[r.runId])||null==(a=i.nodes[r.nodeId])?void 0:a.phase)===r.phase,u=d.currentRunId!==r.runId&&d.runs[r.runId]?l.lastSettlement:"start"===r.phase||d.currentRunId!==r.runId?null:c?l.lastSettlement:{receivedAt:s,nodeId:r.nodeId,phase:r.phase,ts:r.ts},p=!o||!l.lastActivityTs||Date.parse(r.ts)>Date.parse(l.lastActivityTs)?r.ts:l.lastActivityTs;return{client:e,baseUrl:t.baseUrl,token:t.token,receivedAt:s,lastSettlement:u,lastActivityTs:p,activityStatus:o?l.activityStatus:"loading",state:function(e,t){var n,r,s,l;let a=Object.hasOwn(e.runs,t.runId)?e.runs[t.runId]:void 0,i=a&&Object.hasOwn(a.nodes,t.nodeId)?a.nodes[t.nodeId]:void 0,o={nodeId:t.nodeId,phase:t.phase,retries:(null!=(n=null==i?void 0:i.retries)?n:0)+("start"===t.phase&&i?1:0)},d={graphId:t.graphId,runId:t.runId,startedAt:null!=(r=null==a?void 0:a.startedAt)?r:t.ts,order:i?a.order:[...null!=(s=null==a?void 0:a.order)?s:[],t.nodeId],nodes:{...null==a?void 0:a.nodes,[t.nodeId]:o}};return{currentRunId:a&&null!=(l=e.currentRunId)?l:t.runId,runs:{...e.runs,[t.runId]:d}}}(d,r)}}),i(s)}),a=setInterval(()=>i(Date.now()),1e3);return()=>{n=!1,s(),r(),clearInterval(a)}},[e,t.baseUrl,t.token]),(0,r.jsx)(v,{state:c?n.state:b,now:a,receivedAt:n.receivedAt,lastSettlement:c?n.lastSettlement:null,lastActivityTs:c?n.lastActivityTs:null,activityStatus:c?n.activityStatus:"loading",wizardSteps:c?o:[]})}var j=n(43431),k=n(75764),A=n(55519);let I=A.DN.map(e=>({graph:"harness",kind:e,plugin:null,description:"",schema:{},core:!0})),S=A.CF.map(e=>({graph:"workflow",kind:e,plugin:null,description:"",schema:{},core:!0}));function N(){let{GraphEditor:e=j.F,WorkflowEditor:t=k.N}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[n,l]=(0,s.useState)("harness");return(0,r.jsxs)("section",{"aria-label":"그래프 편집기",className:"flex h-full min-h-[640px] min-w-0 flex-col",children:[(0,r.jsx)("div",{role:"tablist","aria-label":"그래프 편집 모드",className:"flex shrink-0 gap-2 border-b border-border px-4 py-3",children:["harness","workflow"].map(e=>(0,r.jsx)("button",{type:"button",role:"tab",id:"inside-editor-tab-".concat(e),"aria-controls":"inside-editor-panel-".concat(e),"aria-selected":n===e,onClick:()=>l(e),className:"rounded-lg px-4 py-2 text-lg min-[1440px]:text-[22px] ".concat(n===e?"bg-accent/15 text-text-primary":"text-text-tertiary hover:bg-surface-elevated"),children:"harness"===e?"실행 그래프":"워크플로"},e))}),(0,r.jsx)("div",{id:"inside-editor-panel-harness",role:"tabpanel","aria-labelledby":"inside-editor-tab-harness",hidden:"harness"!==n,className:"harness"===n?"flex min-h-0 min-w-0 flex-1 flex-col":"hidden",children:(0,r.jsx)(e,{palette:I,initialGraphId:"self-implement"})}),(0,r.jsx)("div",{id:"inside-editor-panel-workflow",role:"tabpanel","aria-labelledby":"inside-editor-tab-workflow",hidden:"workflow"!==n,className:"workflow"===n?"flex min-h-0 min-w-0 flex-1 flex-col":"hidden",children:(0,r.jsx)(t,{palette:S})})]})}var T=n(43537),U=n(79247),C=n(40385);let D=(0,C.g)(null,null);function O(e){let{view:t,runsUnreadable:n,refreshedAt:s}=e;return(0,r.jsxs)("section",{"aria-label":"루프 에이전트 활동",className:"min-w-0 space-y-6 p-4 text-lg min-[1440px]:text-[22px]",children:[(0,r.jsx)("div",{className:"grid grid-cols-2 gap-3 min-[1440px]:grid-cols-4",children:t.seats.map(e=>(0,r.jsxs)("article",{"aria-label":"".concat(e.seat," 자리"),className:"min-w-0 space-y-3 rounded-2xl border border-border bg-card p-3 min-[1440px]:p-6",children:[(0,r.jsx)("h2",{className:"font-bold",children:e.seat}),(0,r.jsx)("p",{className:"break-words","aria-label":"지금 하는 일",children:e.now}),(0,r.jsxs)("dl",{className:"space-y-1 text-base min-[1440px]:text-[22px]",children:[(0,r.jsxs)("div",{className:"flex flex-wrap justify-between gap-x-2",children:[(0,r.jsx)("dt",{children:"오늘 착지"}),(0,r.jsx)("dd",{children:e.landedToday})]}),(0,r.jsxs)("div",{className:"flex flex-wrap justify-between gap-x-2",children:[(0,r.jsx)("dt",{children:"막힘"}),(0,r.jsx)("dd",{children:e.blocked})]}),(0,r.jsxs)("div",{className:"flex flex-wrap justify-between gap-x-2",children:[(0,r.jsx)("dt",{children:"대표 결정 대기"}),(0,r.jsx)("dd",{children:e.decisionsWaiting})]})]})]},e.seat))}),(0,r.jsxs)("section",{"aria-label":"지금 도는 런",className:"min-w-0 rounded-2xl border border-border bg-card p-4",children:[(0,r.jsx)("h2",{className:"font-semibold",children:"지금 도는 런"}),n?(0,r.jsx)("p",{className:"text-muted-foreground",children:"못 읽음"}):0===t.runs.length?(0,r.jsx)("p",{className:"text-muted-foreground",children:"지금 도는 런이 없습니다"}):(0,r.jsx)("ul",{className:"mt-3 flex flex-wrap gap-3",children:t.runs.map((e,t)=>(0,r.jsxs)("li",{className:"min-w-0 break-words rounded-lg border border-border px-3 py-2",children:["런 ",e.id6," \xb7 ",e.stage," \xb7 경과 ","못 읽음"===e.elapsedSec?e.elapsedSec:"".concat(e.elapsedSec,"초")]},"".concat(e.id6,"-").concat(t)))})]}),(0,r.jsxs)("p",{className:"text-sm text-muted-foreground",children:["마지막 갱신 ",(0,r.jsx)("time",{dateTime:null!=s?s:void 0,children:s?new Date(s).toLocaleString("ko-KR",{timeZone:"Asia/Seoul"}):"못 읽음"})]})]})}function z(){var e,t;let{client:n,config:l}=(0,u.Q)(),[a,i]=(0,s.useState)(null),o="".concat(l.baseUrl,"\0").concat(l.token),d=(null==a?void 0:a.source)===o?a:null;return(0,s.useEffect)(()=>{let e=!0,t=!1,r=(0,U.xX)({baseUrl:l.baseUrl,token:l.token});i({source:o,seats:null,runs:null,runsUnreadable:!0,refreshedAt:null});let s=async()=>{var s;if(!e||t||document.hidden)return;t=!0;let l=new Intl.DateTimeFormat("sv-SE",{timeZone:"Asia/Seoul"}).format(new Date),[a,d]=await Promise.allSettled([(0,T.Nn)(n,l),r.getHarnessRuns()]);if(t=!1,!e)return;let c="fulfilled"===a.status&&"ready"===a.value.kind?a.value.data:null,u="fulfilled"===d.status&&Array.isArray(null==(s=d.value)?void 0:s.entries)?d.value:null;i({source:o,seats:c,runs:u,runsUnreadable:null===u,refreshedAt:c||u?new Date().toISOString():null})};s();let a=window.setInterval(()=>{s()},1e4),d=()=>{document.hidden||s()};return document.addEventListener("visibilitychange",d),()=>{e=!1,window.clearInterval(a),document.removeEventListener("visibilitychange",d)}},[n,l.baseUrl,l.token,o]),(0,r.jsx)(O,{view:d?(0,C.g)(d.seats,d.runs):D,runsUnreadable:null==(e=null==d?void 0:d.runsUnreadable)||e,refreshedAt:null!=(t=null==d?void 0:d.refreshedAt)?t:null})}let E=/^\s*(승인|거부|반려|보류|허용|차단|중단|취소)(?=$|[\s.,!?;:])/;function M(e){let{decisions:t,now:n=Date.now()}=e,s=Object.values(t.missions).flat().filter(e=>"answer"===e.step).sort((e,t)=>Date.parse(t.ts)-Date.parse(e.ts)||t.seq-e.seq),l=s[0],a=l?Math.max(0,Math.floor((n-Date.parse(l.ts))/6e4)):null,i=s.flatMap(e=>{var t;let r=null==(t=E.exec(e.detail.answer))?void 0:t[1];return r&&n-Date.parse(e.ts)<3e5?[{item:e,outcome:r}]:[]});return(0,r.jsxs)("section",{"aria-label":"PTY 인텔리전스",className:"min-w-0 rounded-xl border border-slate-600 p-5 text-lg leading-relaxed min-[1440px]:text-[22px]",children:[(0,r.jsx)("h2",{className:"mb-5 font-semibold",children:"PTY 판단"}),0===i.length?(0,r.jsxs)("p",{role:"status",children:["지금 PTY 판단이 없습니다 — 마지막 판단 ",null===a?"기록 없음":"".concat(a,"분 전")]}):(0,r.jsx)("ol",{"aria-label":"최근 PTY 판단",className:"space-y-4",children:i.slice(0,3).map(e=>{let{item:t,outcome:n}=e;return(0,r.jsxs)("li",{className:"min-w-0 rounded-lg border border-slate-600 p-4",children:[(0,r.jsx)("time",{dateTime:t.ts,children:(0,o.t)(t.ts)})," \xb7 ",(0,o.t)(n)]},"".concat(t.missionId,":").concat(t.seq))})})]})}let R=[{step:"request",label:"요청"},{step:"research",label:"조사"},{step:"draft",label:"초안"},{step:"validate",label:"검증"},{step:"install",label:"설치"},{step:"done",label:"끝"}],L={done:"border-green-500 bg-green-500/15 text-green-300",now:"border-sky-400 bg-sky-500/15 text-sky-200",todo:"border-slate-500 bg-slate-500/15 text-slate-300",failed:"border-red-500 bg-red-500/15 text-red-300"},K={done:"완료",now:"진행 중",todo:"대기",failed:"실패"};function F(e){let{events:t}=e,n=function(e){if(0===e.length)return[];let t=e[e.length-1].wizardId,n=e.filter(e=>e.wizardId===t),r=n[n.length-1],s=R.findIndex(e=>e.step===r.step);return R.map((e,t)=>{let{step:l,label:a}=e,i=n.findLast(e=>e.step===l),o=(null==i?void 0:i.detail)!=null&&"object"==typeof i.detail&&!Array.isArray(i.detail)&&!1===i.detail.ok;return{step:l,label:a,state:"done"===r.step?"done":o?"failed":t<s?"done":t===s?"now":"todo",...i?{text:i.text,at:i.ts}:{}}})}(t);return(0,r.jsx)("section",{"aria-label":"마법사 → 마켓",className:"min-w-0 space-y-6 p-4 text-lg min-[1440px]:text-[22px]",children:0===n.length?(0,r.jsxs)("p",{children:["마법사가 아직 돌지 않았습니다 — ",(0,r.jsx)("code",{children:'elanous plugin make "<한 줄>"'})," 로 시작"]}):(0,r.jsx)("ol",{"aria-label":"마법사 단계",className:"grid grid-cols-1 gap-3 min-[900px]:grid-cols-6",children:n.map(e=>(0,r.jsxs)("li",{"data-wizard-step":e.step,"data-state":e.state,className:"min-w-0 rounded-xl border p-4 ".concat(L[e.state]),children:[(0,r.jsxs)("div",{className:"font-semibold",children:[e.label," ",(0,r.jsxs)("span",{className:"font-normal",children:["\xb7 ",K[e.state]]})]}),e.text&&(0,r.jsx)("p",{className:"mt-3 overflow-hidden text-ellipsis whitespace-nowrap",title:(0,o.t)(e.text),children:(0,o.t)(e.text)})]},e.step))})})}let P=e=>"".concat(e.wizardId,":").concat(e.step,":").concat(e.ts,":").concat(e.text);function _(){let{client:e}=(0,u.Q)(),[t,n]=(0,s.useState)(()=>({client:e,events:[]}));return(0,s.useEffect)(()=>{let t=!0;n({client:e,events:[]});let r=r=>{t&&r.length&&n(t=>({client:e,events:function(e,t){let n=new Map;for(let r of[...e,...t])n.set(P(r),r);return[...n.values()].sort((e,t)=>e.ts.localeCompare(t.ts)).slice(-50)}(t.client===e?t.events:[],r)}))},s=e.fetchJson;"function"==typeof s&&s.call(e,"/v1/logs?exactCategory=wizard.step&limit=".concat(50)).then(e=>{let t=null==e?void 0:e.logs;r(Array.isArray(t)?t.map(g).filter(e=>null!==e):[])}).catch(()=>{});let l=y(e,e=>r([e]));return()=>{t=!1,l()}},[e]),(0,r.jsx)(F,{events:t.client===e?t.events:[]})}let q=["문서 아키텍처","라이브 트레이스","루프 에이전트","그래프 편집기","마법사 → 마켓","PTY 인텔리전스"],Z=q.length,X="elanous.inside.demo";function W(e){return null!==e&&/^[1-9]$/.test(e)&&Number(e)<=Z?Number(e):1}function Y(){let e=(0,l.useSearchParams)();return(0,r.jsx)(B,{search:e})}function B(e){let{search:t,liveTrace:n=(0,r.jsx)(w,{}),editorScene:l=(0,r.jsx)(N,{}),loopScene:i=(0,r.jsx)(z,{}),wizardScene:d=(0,r.jsx)(_,{}),ptyScene:u=(0,r.jsx)(H,{})}=e,[p,m]=(0,s.useState)(()=>W(t.get("scene"))),[h,f]=(0,s.useState)(()=>"1"===t.get("demo")),g=(0,s.useRef)(null),y=(0,s.useRef)(p),b=(0,s.useRef)(h);y.current=p,b.current=h;let x=(0,s.useCallback)(e=>{let t=new URL(window.location.href);for(let[n,r]of Object.entries(e))t.searchParams.set(n,r);window.history.replaceState(window.history.state,"",t.toString())},[]),v=(0,s.useCallback)(e=>{e<1||e>Z||(y.current=e,m(e),x({scene:String(e)}))},[x]),j=(0,s.useCallback)(()=>{let e=!b.current;b.current=e,f(e),x({demo:e?"1":"0"});try{window.localStorage.setItem(X,e?"1":"0")}catch(e){}},[x]);return(0,s.useEffect)(()=>{let e=t.get("demo"),n="1"===e;if(null===e)try{n="1"===window.localStorage.getItem(X)}catch(e){}else try{window.localStorage.setItem(X,n?"1":"0")}catch(e){}b.current=n,f(n);let r=W(t.get("scene"));y.current=r,m(r)},[t]),(0,s.useEffect)(()=>{window.dispatchEvent(new window.Event("elanous:inside-demo"))},[h]),(0,s.useEffect)(()=>{let e=e=>{if(!(e.altKey||e.ctrlKey||e.metaKey||(0,a._i)(e.target))){if("ArrowLeft"===e.key||"ArrowRight"===e.key){e.preventDefault();let t="ArrowRight"===e.key?1:-1;v(Math.min(Z,Math.max(1,y.current+t)))}else if("d"===e.key.toLowerCase())j();else if("f"===e.key.toLowerCase()){var t;"function"==typeof(null==(t=g.current)?void 0:t.requestFullscreen)&&g.current.requestFullscreen().catch(()=>{})}}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[v,j]),(0,r.jsxs)("main",{ref:g,"data-inside-page":!0,style:{width:"100%",minHeight:"100vh",minWidth:0,padding:20,boxSizing:"border-box",background:"#0c1828",color:"#f1f5fa",fontSize:18},children:[(0,r.jsx)("style",{children:'@media (min-width: 1440px) {\n [data-inside-page] h1 { font-size: 40px !important; }\n [data-inside-page] nav button { font-size: 22px !important; }\n [data-inside-page] [data-inside-scene="1"] [data-architecture-scene],\n [data-inside-page] [data-inside-scene="2"] section,\n [data-inside-page] [data-inside-scene="2"] header,\n [data-inside-page] [data-inside-scene="2"] button,\n [data-inside-page] [data-inside-scene="2"] .text-sm { font-size: 22px !important; }\n }'}),(0,r.jsxs)("header",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,r.jsx)("h1",{style:{fontSize:28,margin:0},children:"엘라누스 안쪽"}),h&&(0,r.jsx)("span",{"aria-label":"시연 모드",style:{fontSize:18},children:"시연"})]}),(0,r.jsx)("nav",{"aria-label":"장면 선택",style:{display:"flex",minHeight:48,overflowX:"auto",gap:8,margin:"18px 0",whiteSpace:"nowrap"},children:q.map((e,t)=>(0,r.jsx)("button",{type:"button","aria-current":p===t+1?"page":void 0,onClick:()=>v(t+1),style:{flexShrink:0,minHeight:48,padding:"8px 16px",fontSize:18,borderRadius:8,border:"1px solid #7188a5",color:"#fff",background:p===t+1?"#22558b":"#203147"},children:(0,o.t)("".concat(t+1," ").concat(e))},e))}),q.map((e,t)=>(0,r.jsx)("section",{"data-inside-scene":t+1,hidden:p!==t+1,"aria-label":(0,o.t)("".concat(t+1," ").concat(e)),style:{minWidth:0},children:0===t?(0,r.jsx)(c,{}):1===t?n:2===t?i:3===t?l:4===t?d:u},e))]})}function H(){let{client:e}=(0,u.Q)(),[t,n]=(0,s.useState)(()=>({client:e,decisions:m})),[l,a]=(0,s.useState)(()=>Date.now());return(0,s.useEffect)(()=>{let e=setInterval(()=>a(Date.now()),6e4);return()=>clearInterval(e)},[]),(0,s.useEffect)(()=>{let t=!0;n({client:e,decisions:m});let r=function(e,t){let n=e.logsStreamUrl({exactCategory:"pty.decision"});return n?(0,p.BX)(n,{events:{log:e=>{let n;try{n=JSON.parse(e.data)}catch(e){return}if(!n||"object"!=typeof n||Array.isArray(n))return;let r=n;if("pty.decision"!==r.category)return;let s=function(e){if(!h(e))return null;let{ts:t,missionId:n,seq:r,sessionId:s,terminalId:l,agent:a,step:i,text:o,detail:d}=e;if(!f(t)||!Number.isFinite(Date.parse(t))||!f(n)||!Number.isSafeInteger(r)||r<0||!f(s)||!f(l)||!f(a)||!f(o)||void 0!==d&&!h(d)||h(d)&&(void 0!==d.keys&&"string"!=typeof d.keys||void 0!==d.row&&(!Number.isSafeInteger(d.row)||d.row<0)))return null;let c={ts:t,missionId:n,seq:r,sessionId:s,terminalId:l,agent:a,text:o},u=h(d)?{...void 0!==d.keys?{keys:d.keys}:{},...void 0!==d.row?{row:d.row}:{}}:{};return"answer"===i?h(d)&&f(d.question)&&f(d.answer)?{...c,step:i,detail:{...u,question:d.question,answer:d.answer}}:null:"recover"===i?h(d)&&f(d.blocked)&&f(d.action)?{...c,step:i,detail:{...u,blocked:d.blocked,action:d.action}}:null:"done"===i?h(d)&&h(d.result)&&f(d.result.ref)&&("pr"===d.result.kind||"file"===d.result.kind||"text"===d.result.kind)?{...c,step:i,detail:{...u,result:{kind:d.result.kind,ref:d.result.ref}}}:null:"read"===i||"judge"===i||"input"===i?{...c,step:i,...void 0!==d?{detail:u}:{}}:null}(r.data);s&&r.event===s.step&&t(s)}}}):()=>{}}(e,r=>{t&&n(t=>({client:e,decisions:function(e,t){let n=Object.hasOwn(e.missions,t.missionId)?e.missions[t.missionId]:[];if(n.some(e=>e.seq===t.seq))return e;let r=[...n,t].sort((e,t)=>e.seq-t.seq),s={...e.missions,[t.missionId]:r},l=e.currentMissionId?s[e.currentMissionId]:void 0,a=r.at(-1),i=null==l?void 0:l.at(-1);return{missions:s,currentMissionId:!i||Date.parse(a.ts)>Date.parse(i.ts)?t.missionId:e.currentMissionId}}(t.client===e?t.decisions:m,r)}))});return()=>{t=!1,r()}},[e]),(0,r.jsx)(M,{decisions:t.client===e?t.decisions:m,now:l})}},40385:(e,t,n)=>{"use strict";n.d(t,{g:()=>i,q:()=>a});var r=n(81969);let s=[{id:"OP",seat:"COO"},{id:"MK",seat:"CMO"},{id:"TC",seat:"CTO"},{id:"UX",seat:"CXO"}];function l(e){return(0,r.t)(e.replace(/\s+/g," ")).trim()}function a(e){var t;let n=e.split("\n"),r=(e,t)=>{let n=e.trim();return t&&(n=(n=n.replace(/^\*\*\[[^\]]+\]\*\*\s*/,"")).replace(/^(?:📌\S*\s*)?\d{4}-\d{2}-\d{2}\s+\d{1,2}:\d{2}\s*KST\s*/,"")),l(n=(n=(n=(n=(n=(n=n.replace(/^→\s*(?:[A-Z]{1,4}|전원|전체)(?=\s|·|$)(?:\s*·\s*(?:[A-Z]{1,4}|전원|전체)(?=\s|·|$))*\s*(?:·)?\s*/u,"")).replace(/^—\s*/,"")).replace(/^[-*]\s+/,"").replace(/\*\*|`|__/g,"").replace(/^#+\s*/,"").trim()).replace(/^(?:보고|요청|정정|결정|사고|안내)\s*·\s*/,"")).replace(RegExp("^(?:\\p{Extended_Pictographic}\\uFE0F?)+\\s*","u"),"")).replace(/^(?:보고|요청|정정|결정|사고|안내)\s*·\s*/,""))},s=r(null!=(t=n[0])?t:"",!0);if(s)return s;let a=n.slice(1).find(e=>e.trim());return a?r(a,!1):""}function i(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return{seats:s.map(t=>{var n;let{id:r,seat:s}=t,l=null==e?void 0:e.seats.find(e=>e.seat===r);return{seat:s,now:(null==l?void 0:l.now)&&Array.from(a(l.now.text)).slice(0,40).join("")||"못 읽음",landedToday:(null==l?void 0:l.landed)==null?"못 읽음":l.landed.length,blocked:(null==l?void 0:l.blocked)==null?"못 읽음":l.blocked.length,decisionsWaiting:null!=(n=null==l?void 0:l.pendingDecisions)?n:"못 읽음"}}),runs:(null!=(n=null==t?void 0:t.entries)?n:[]).filter(e=>"running"===e.status).sort((e,t)=>{var n,r;return(Date.parse(null!=(n=t.lastActivityTimestamp)?n:"")||0)-(Date.parse(null!=(r=e.lastActivityTimestamp)?r:"")||0)}).slice(0,6).map(e=>{var t;let n=Date.parse(null!=(t=e.lastActivityTimestamp)?t:"");return{id6:function(e){let t=e.replace(/^run-/i,"");return/^[a-z0-9]{6}/i.test(t)&&l(t.slice(0,6))||"못 읽음"}(e.runId),stage:l(e.lastPhase||e.status)||"못 읽음",elapsedSec:Number.isFinite(n)?Math.max(0,Math.floor((r-n)/1e3)):"못 읽음"}})}}},43537:(e,t,n)=>{"use strict";function r(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function s(e){return"string"==typeof e}function l(e){return s(e)&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?Z$/.test(e)&&Number.isFinite(Date.parse(e))&&new Date(e).toISOString().slice(0,19)===e.slice(0,19)}function a(e){return r(e)&&s(e.nodeId)&&(null===e.ok||"boolean"==typeof e.ok)&&s(e.summary)}function i(e){return r(e)&&s(e.runId)&&s(e.status)&&s(e.startedAt)&&(null===e.version||s(e.version))&&Array.isArray(e.path)&&e.path.every(s)&&Array.isArray(e.nodes)&&e.nodes.every(a)}function o(e){return r(e)&&s(e.id)&&s(e.title)&&s(e.status)&&(void 0===e.owner||s(e.owner))&&s(e.updatedAt)&&(void 0===e.evidence||s(e.evidence))}n.d(t,{HG:()=>g,Kh:()=>f,Nn:()=>m,oc:()=>h});let d=e=>Number.isInteger(e)&&e>=0;function c(e){return r(e)&&s(e.id)&&s(e.title)&&(null===e.open||d(e.open))&&(null===e.landed||d(e.landed))&&(null===e.blocked||Array.isArray(e.blocked)&&e.blocked.every(e=>r(e)&&s(e.id)&&s(e.title)))}function u(e){return r(e)&&["OP","MK","TC","UX"].includes(e.seat)&&(void 0===e.role||s(e.role))&&(null===e.now||r(e.now)&&s(e.now.text)&&s(e.now.at))&&(null===e.landed||Array.isArray(e.landed)&&e.landed.every(e=>r(e)&&d(e.pr)&&s(e.title)&&s(e.at)&&(null===e.checklistId||s(e.checklistId))))&&(null===e.blocked||Array.isArray(e.blocked)&&e.blocked.every(e=>r(e)&&s(e.id)&&s(e.title)&&"red"===e.status))&&(null===e.pendingDecisions||d(e.pendingDecisions))&&(null===e.checklist||r(e.checklist)&&["green","yellow","red","done"].every(t=>d(e.checklist[t])))&&(void 0===e.subSeats||null===e.subSeats||Array.isArray(e.subSeats)&&e.subSeats.every(c))}async function p(e,t,n){try{let r=await e.fetchResponse(t,{method:"GET"});if(403===r.status)return{kind:"forbidden"};if(!r.ok)return{kind:"error",status:r.status};let s=n(await r.json());return null===s?{kind:"error",status:r.status}:{kind:"ready",data:s}}catch(e){return{kind:"error",status:0}}}function m(e,t){return p(e,"/v1/ops/seats".concat(t?"?date=".concat(encodeURIComponent(t)):""),e=>r(e)&&s(e.date)&&Array.isArray(e.seats)&&e.seats.every(u)&&new Set(e.seats.map(e=>e.seat)).size===e.seats.length?{date:e.date,seats:e.seats}:null)}function h(e,t){return p(e,"/v1/ops/release/runs".concat(t?"?version=".concat(encodeURIComponent(t)):""),e=>Array.isArray(e)&&e.every(i)?e:null)}function f(e,t,n){return p(e,"/v1/ops/release/runs/".concat(encodeURIComponent(t),"/nodes/").concat(encodeURIComponent(n),"/log"),e=>r(e)&&s(e.log)?{log:e.log}:null)}function g(e,t){return p(e,"/v1/ops/checklist?version=".concat(encodeURIComponent(t)),e=>{var t,n,a,i;if(!(r(e)&&s(e.version)&&(void 0===e.codename||s(e.codename))&&Array.isArray(e.items)&&e.items.every(o)&&["green","yellow","red","done"].every(t=>void 0===e[t]||Number.isInteger(e[t])&&e[t]>=0)&&(void 0===e.blocked||Array.isArray(e.blocked)&&e.blocked.every(s))&&(void 0===e.byOwner||r(e.byOwner)&&Object.values(e.byOwner).every(e=>Number.isInteger(e)&&e>=0))&&(void 0===e.history||Array.isArray(e.history))))return null;let d={green:0,yellow:0,red:0,done:0};for(let t of e.items)t.status in d&&d[t.status]++;return{version:e.version,...void 0!==e.codename?{codename:e.codename}:{},schedule:r(e.schedule)&&l(e.schedule.cutAt)&&(null===e.schedule.landBy||l(e.schedule.landBy))?{cutAt:e.schedule.cutAt,landBy:e.schedule.landBy}:null,items:e.items,green:null!=(t=e.green)?t:d.green,yellow:null!=(n=e.yellow)?n:d.yellow,red:null!=(a=e.red)?a:d.red,done:null!=(i=e.done)?i:d.done,...void 0!==e.blocked?{blocked:e.blocked}:{},...void 0!==e.byOwner?{byOwner:e.byOwner}:{},...void 0!==e.history?{history:e.history}:{}}})}},55499:(e,t,n)=>{Promise.resolve().then(n.bind(n,38620))},58298:(e,t,n)=>{"use strict";function r(e){return e.metaKey||e.ctrlKey}function s(e){let t=e.key.toLowerCase();return!r(e)||e.shiftKey||e.altKey||"k"!==t?r(e)&&e.shiftKey&&!e.altKey&&"j"===t?e.fromEditable?null:"toggle-role-judge":r(e)&&e.shiftKey&&!e.altKey&&"m"===t?e.fromEditable?null:"toggle-voice":r(e)&&e.shiftKey&&!e.altKey&&"y"===t?e.fromEditable?null:"toggle-tts":"?"!==e.key||r(e)||e.altKey?null:e.fromEditable?null:"open-help":"focus-broadcast-input"}function l(e){var t;if(!e)return!1;let n=e.tagName;if(!n)return!1;if("INPUT"===n||"TEXTAREA"===n||"SELECT"===n)return!0;let r=null==(t=e.getAttribute)?void 0:t.call(e,"contenteditable");return""===r||"true"===r}n.d(t,{ZQ:()=>s,_i:()=>l,nm:()=>a});let a=[{id:"focus-broadcast-input",combo:"⌘K / Ctrl+K",effect:"Focus broadcast input"},{id:"toggle-role-judge",combo:"⌘⇧J / Ctrl+⇧J",effect:"Toggle role-judge backend"},{id:"toggle-voice",combo:"⌘⇧M / Ctrl+⇧M",effect:"Toggle voice mode (mic)"},{id:"toggle-tts",combo:"⌘⇧Y / Ctrl+⇧Y",effect:"Toggle TTS mute"},{id:"open-help",combo:"?",effect:"Open this help overlay"}]},81969:(e,t,n)=>{"use strict";n.d(t,{t:()=>u});let r=/\brun-([0-9a-f]{8})-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,s=/(?:\/(?:Users|home|private)\/[\w.%@+~/-]+|\b[A-Za-z]:\\(?:[^\\\s,;<>"']+\\)*[^\\\s,;<>"']+)/g,l=/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi,a=RegExp("(?<![A-Za-z0-9_-])(?:[A-Za-z0-9_]{40,}|(?:sk|ghp|gho|ghs|github_pat|xox[abpr])[-_][A-Za-z0-9_-]{20,})(?![A-Za-z0-9_-])","g"),i=/\b(?:OP|MK|TC|UX)\b/g,o=/\bmsb(\d+)\b/gi,d=/(?:\u{1F451}|🪑|🅞|🅜|🅣|🅤|🅢|🅕)\uFE0F?/gu,c={OP:"COO",MK:"CMO",TC:"CTO",UX:"CXO"};function u(e){let t,n=e;do t=n,n=n.replace(r,(e,t)=>"run-".concat(t.slice(0,6))).replace(s,"").replace(l,"").replace(d,"").replace(a,"").replace(i,e=>c[e]).replace(o,(e,t)=>"remote-".concat(t));while(n!==t&&function(e){return[r,s,l,a,i,d,o].flatMap(t=>[...e.matchAll(t)].map(e=>e[0]))}(n).length>0);return n}}},e=>{e.O(0,[9901,9182,3324,1844,1866,8868,8060,9247,8949,4554,2463,2196,7358],()=>e(e.s=55499)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3141],{2965:(e,t,a)=>{Promise.resolve().then(a.bind(a,66847))},46044:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=(0,a(3704).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"}]])},51706:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n=(0,a(3704).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"}]])},66847:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>L});var n=a(55539),s=a(46124),l=a(21501),r=a(46044),i=a(51706),d=a(94306),o=a(34885),c=a(16241),u=a(21108),x=a(7456),m=a(97479),p=a(44373);let h={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 g(e){let{board:t,lines:a,mode:s,onSelectRun:l,selectedRunId:r,role:i="owner"}=e,d="max"===s,o="owner"===i,u=t.gauges,{snapshot:x}=t,m=o?0:t.stream.filter(e=>null!=e.why&&(0,c.Yu)(e.why)).length;return(0,n.jsxs)("div",{className:(0,p.cn)("space-y-4",d&&"live-max"),"data-live-mode":s,children:[(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-6",children:[(0,n.jsx)(v,{label:"LIVE",hint:"도는 런",value:String(u.live),tone:u.live>0?"live":"idle",max:d}),(0,n.jsx)(v,{label:"DECISIONS/MIN",hint:"판단 ".concat(u.decisions,"건"),value:String(u.decisionsPerMin),max:d}),(0,n.jsx)(v,{label:"SHIPPED",hint:"병합\xb7PR",value:String(u.shipped),tone:"ok",max:d}),(0,n.jsx)(v,{label:"SELF-HEAL",hint:u.selfHealRuns?"수리 런 ".concat(u.selfHealRuns):"수리 런 없음",value:null===u.selfHealRate?"—":"".concat(u.selfHealRate,"%"),max:d}),(0,n.jsx)(v,{label:"BURN",hint:"토큰/분",value:f(u.burnTokensPerMin),max:d}),(0,n.jsx)(v,{label:"BLOCKED",hint:"막힌 런",value:String(x.counters.blocked),tone:x.counters.blocked?"bad":"idle",max:d})]}),(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)(b,{run:e,round:t.rounds[e.runId],max:d,selected:e.runId===r,onSelect:l,owner:o},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:["판단 스트림",c.jg.map(e=>(0,n.jsx)("span",{className:(0,p.cn)("text-[11px] lg:text-[10px] font-mono",h[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",d&&0===t&&"live-line-in",d&&"SHIP"===e.kind&&"live-ship"),children:[(0,n.jsxs)("span",{className:"text-muted-foreground",children:[(0,n.jsx)("span",{title:e.ts,children:(0,c.qo)(e.ts)})," "]}),(0,n.jsxs)("span",{className:h[e.kind],children:["[",e.kind,"]"]})," ",o?e.what:(0,c.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,c.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:f(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)(j,{items:x.reviewVerdicts,max:d})]})]}),(0,n.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[o?(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 f(e){return e>=1e6?"".concat((e/1e6).toFixed(1),"M"):e>=1e3?"".concat((e/1e3).toFixed(e>=1e5?0:1),"k"):String(e)}function v(e){let{label:t,hint:a,value:s,tone:l="idle",max:r}=e;return(0,n.jsxs)("div",{className:(0,p.cn)("rounded-lg border p-3","live"===l&&"border-primary/50","bad"===l&&"border-error/50","ok"===l&&"border-green-600/40",r&&"live-gauge",r&&"live"===l&&"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",r&&"live-count"),"data-live-gauge":t,children:s}),(0,n.jsx)("div",{className:"text-[11px] lg:text-[10px] text-muted-foreground",children:a})]})}function b(e){let{run:t,round:a,max:s,selected:l,onSelect:r,owner:i}=e;return(0,n.jsx)("li",{children:(0,n.jsxs)("button",{type:"button","data-live-run":t.runId,onClick:()=>null==r?void 0:r(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",l&&"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:c.lV.map(e=>{let a=t.stages[e],l=t.current===e;return(0,n.jsx)("span",{title:"".concat(c.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",s&&l&&"bad"!==a&&"live-pulse",s&&l&&"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?c.fQ[t.current]:""})]})})}function j(e){let{items:t,max:a}=e,s=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/s*100,"%")}})}),(0,n.jsx)("span",{className:"w-8 text-right tabular-nums",children:e.count})]},e.name))})}var N=a(89578),y=a(43422);let w=[15,60,360,1440],k="@active";function S(){return(0,d.Qj)()?(0,n.jsx)(E,{}):(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 E(){var e,t,a,p,h,f;let v=(0,m.In)(),[b,j]=(0,s.useState)("practical"),[S,E]=(0,s.useState)(null),[L,A]=(0,s.useState)("all"),[C,R]=(0,s.useState)(!1);(0,s.useEffect)(()=>{try{window.localStorage.removeItem("elanous.live.mode")}catch(e){}},[]),(0,s.useEffect)(()=>{if(!S)return;let e=setTimeout(()=>{j("practical"),E(null)},Math.max(0,S-Date.now()));return()=>clearTimeout(e)},[S]);let H=(0,d.M1)(),[D,P]=(0,s.useState)(null),X=e=>{e.on?(j("max"),A(e.scope&&"all"!==e.scope?"run":"all"),E(e.until?Date.parse(e.until):Date.now()+18e5)):(j("practical"),E(null))};(0,s.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&&F?F:"all";H.setLiveDetail({scope:t,ttlMin:30,by:"pwa-live"}).then(X).catch(e=>P(e instanceof Error?e.message:String(e)))},[O,T]=(0,s.useState)(60),[U,_]=(0,s.useState)(""),B=(0,s.useRef)(!1);(0,s.useEffect)(()=>{"max"!==b||B.current||(B.current=!0,_(k),T(1440)),"max"!==b&&(B.current=!1)},[b]);let[F,K]=(0,s.useState)(null),{logs:V,runs:z,instances:Q}=(0,o.HI)({store:U||void 0,windowMinutes:O}),[Y,G]=(0,s.useState)(()=>Date.now());(0,s.useEffect)(()=>{G(Date.now())},[V.dataUpdatedAt]);let[J,Z]=(0,s.useState)(!1);(0,s.useEffect)(()=>{"public"===new URLSearchParams(window.location.search).get("capture")&&Z(!0)},[]);let W=null!=(p=null==(e=V.data)?void 0:e.logs)?p:M,$=(0,s.useMemo)(()=>J?(0,x.yR)(W):W,[W,J]),ee=(0,l.I)({queryKey:["live","shipped",O],queryFn:()=>H.getLiveShipped("".concat(O,"m")),refetchInterval:6e4}),et=(0,s.useMemo)(()=>{var e,t,a;let n=(0,c.Hc)($,null!=(a=null==(e=z.data)?void 0:e.entries)?a:[],{now:Y,windowMinutes:O}),s=null==(t=ee.data)?void 0:t.merged;if("number"!=typeof s)return n;let l=(0,u.NZ)($).length;return{...n,gauges:{...n.gauges,shipped:s,selfHealRuns:l,selfHealRate:s>0?Math.round(l/s*100):null}}},[$,z.data,Y,O,ee.data]),ea=O>0?Math.round($.length/O*10)/10:0,en=Math.round(JSON.stringify($).length/1024),es=(0,s.useMemo)(()=>$.filter(e=>{var t;return!F||(null==(t=e.data)?void 0:t.runId)===F}).map(e=>(0,c.BP)(e)),[$,F]),el=(null!=(h=null==(t=Q.data)?void 0:t.instances)?h:[]).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:I}),(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)(r.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=>T(Number(e.target.value)),className:"rounded-md border bg-background px-2 py-1",children:w.map(e=>(0,n.jsx)("option",{value:e,children:e<60?"".concat(e,"분"):"".concat(e/60,"시간")},e))}),(0,n.jsxs)("select",{"aria-label":"신호 출처",value:U,onChange:e=>_(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:k,children:"전체(연합 \xb7 최근 24시간에 쓰인 우주)"}),el.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":J,onClick:()=>Z(e=>!e),title:"녹화\xb7스크린샷용 — 계정 이름 → account-N \xb7 크레딧\xb7USD 숨김 \xb7 홈 경로 가림",className:"rounded-md border px-2 py-1 ".concat(J?"border-emerald-500 text-emerald-600 dark:text-emerald-300":"hover:bg-muted"),children:J?"● 공개 캡처 켜짐":"공개 캡처"}),"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)(i.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)(i.A,{className:"h-3.5 w-3.5","aria-hidden":!0})," 화려함 MAX"]})]})]}),C&&(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:!F,onClick:()=>q("run"),className:"rounded-md border px-2 py-1 hover:bg-muted disabled:opacity-50",children:F?"이 런만 켜기":"이 런만 켜기(먼저 런을 고르세요)"}),(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"===L&&F?"런 ".concat(F.replace(/^run-/,"").slice(0,8)):"전체"," \xb7 받는 신호 분당 ",ea,"건 \xb7 응답 약 ",en,"KB",S?" \xb7 ".concat(Math.max(0,Math.round((S-Y)/6e4)),"분 뒤 자동 꺼짐"):""," \xb7 하니스 판단 이벤트 ",et.emitted,"건"]}),V.error?(0,n.jsxs)("p",{className:"rounded-md bg-error/10 p-3 text-sm text-error",children:["신호를 못 읽었다: ",V.error instanceof Error?V.error.message:String(V.error)]}):null,F&&(0,n.jsx)(y.RT,{runId:F,run:null!=(f=et.snapshot.runs.find(e=>e.runId===F))?f:null,lines:es,onClose:()=>K(null)}),"max"===b?(0,n.jsx)(N.xl,{board:et,rows:$,windowMinutes:O,sourceLabel:U===k?"federated":U||"this instance",shippedSource:"number"==typeof(null==(a=ee.data)?void 0:a.merged)?"github":"log",publicCapture:J,role:v,onSelectRun:e=>K(t=>t===e?null:e)}):(0,n.jsx)(g,{board:et,lines:es,mode:b,role:v,selectedRunId:F,onSelectRun:e=>K(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 M=[],I="\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";function L(){return(0,n.jsx)(S,{})}},97479:(e,t,a)=>{"use strict";a.d(t,{GC:()=>s,In:()=>o,OG:()=>i});var n=a(46124);let s="elanous.pwa.role",l="elanous:pwa-role";function r(){try{let e=window.localStorage.getItem(s);if("owner"===e||"contributor"===e||"general"===e)return e}catch(e){}return"general"}function i(e){try{window.localStorage.setItem(s,e)}catch(e){}"function"==typeof window.dispatchEvent&&window.dispatchEvent(new Event(l))}function d(e){if("function"!=typeof window.addEventListener)return()=>{};window.addEventListener(l,e);let t=t=>{(t.key===s||null===t.key)&&e()};return window.addEventListener("storage",t),()=>{window.removeEventListener(l,e),window.removeEventListener("storage",t)}}function o(){return(0,n.useSyncExternalStore)(d,r,()=>"general")}}},e=>{e.O(0,[211,3324,3558,1844,5360,2463,2196,7358],()=>e(e.s=2965)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7398],{47276:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var a=s(55539),i=s(46124),n=s(58603);class r 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"}}function o(e){var t;let[s,n]=(0,i.useState)({loading:!0,error:null,state:null}),[r,o]=(0,i.useState)(""),[d,u]=(0,i.useState)(""),[m,h]=(0,i.useState)(!1),[x,p]=(0,i.useState)(null),[f,b]=(0,i.useState)(!1),y=(0,i.useRef)(!0);(0,i.useEffect)(()=>()=>{y.current=!1},[]);let g=(0,i.useCallback)(async()=>{n(e=>({...e,loading:!0,error:null}));try{let{state:t}=await e.api.spawn(e.missionId);if(!y.current)return;n({loading:!1,error:null,state:t})}catch(e){if(!y.current)return;n({loading:!1,error:c(e),state:null})}},[e.api,e.missionId]);(0,i.useEffect)(()=>{g()},[g]);let j=(0,i.useCallback)(async()=>{if(r.trim()&&!m){h(!0);try{let t=await e.api.deliberate(e.missionId,r.trim(),d.trim()||void 0);if(!y.current)return;n(e=>e.state?{...e,state:{...e.state,decisions:[...e.state.decisions,t]}}:e),o("")}catch(e){if(!y.current)return;n(t=>({...t,error:c(e)}))}finally{y.current&&h(!1)}}},[e.api,e.missionId,r,d,m]),v=(0,i.useCallback)(async t=>{if(t.trim()&&!x){p(t);try{let s=await e.api.decide(e.missionId,t);if(!y.current)return;n(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;n(t=>({...t,error:c(e)}))}finally{y.current&&p(null)}}},[e.api,e.missionId,x]),N=(0,i.useCallback)(async()=>{if(!f){b(!0);try{var t;let s=await e.api.archive(e.missionId);if(!y.current)return;n(e=>({...e,state:s})),null==(t=e.onArchived)||t.call(e)}catch(e){if(!y.current)return;n(t=>({...t,error:c(e)}))}finally{y.current&&b(!1)}}},[e.api,e.missionId,f,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:f,onClick:()=>void N(),children:f?"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:r,onChange:e=>o(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:!r.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)(l,{decision:e,onDecide:w?void 0:v,decidingChoice:x},e.ts))]})]})}function l(e){let{decision:t,onDecide:s,decidingChoice:n}=e,[r,o]=(0,i.useState)(""),l=t.resolution.status,c="decided"===t.resolution.status?t.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:t.question}),(0,a.jsx)("time",{className:"shrink-0 text-xs opacity-60",dateTime:new Date(t.ts).toISOString(),children:new Date(t.ts).toLocaleString()})]}),(0,a.jsx)("ul",{className:"mt-2 flex flex-col gap-2",children:t.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"})]}),s&&"open"===l&&(0,a.jsxs)("form",{className:"flex items-center gap-1",onSubmit:e=>{e.preventDefault(),r.trim()&&s(r.trim())},children:[(0,a.jsx)("input",{className:"w-32 rounded border border-zinc-300 px-2 py-0.5 text-xs",placeholder:"chosen…",value:r,onChange:e=>o(e.target.value),disabled:null!==n}),(0,a.jsx)("button",{type:"submit",className:"rounded bg-emerald-700 px-2 py-0.5 text-xs text-white disabled:opacity-50",disabled:!r.trim()||null!==n,children:n===r?"…":"apply"})]})]})]})}function c(e){if(e instanceof r){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,n.useParams)(),s=decodeURIComponent(null!=(e=null==t?void 0:t.id)?e:""),l=(0,i.useMemo)(()=>(function(e){var t;let s=e.baseUrl.replace(/\/+$/,""),a=null!=(t=e.fetchImpl)?t:fetch,i=e.authHeader;async function n(e,t){let n={"content-type":"application/json"};i&&(n.authorization=i),(null==t?void 0:t.headers)&&Object.assign(n,t.headers);let o=await a("".concat(s).concat(e),{...t,headers:n}),l=await o.json().catch(()=>null);if(!o.ok)throw new r(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 n(o(e)),deliberate:async(e,t,s)=>(await n(o(e,"/deliberate"),{method:"POST",body:JSON.stringify({question:t,...void 0!==s?{missionContext:s}:{}})})).decision,decide:async(e,t)=>(await n(o(e,"/decision"),{method:"POST",body:JSON.stringify({chosen:t})})).decision,archive:async e=>(await n(o(e,"/archive"),{method:"POST"})).state}})({baseUrl:window.location.origin}),[]);return s?(0,a.jsx)(o,{missionId:s,api:l}):(0,a.jsx)("div",{className:"p-4 text-sm",children:"Mission id missing in URL."})}},58603:(e,t,s)=>{"use strict";var a=s(99027);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}})},95034:(e,t,s)=>{Promise.resolve().then(s.bind(s,47276))}},e=>{e.O(0,[2463,2196,7358],()=>e(e.s=95034)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4345],{89350:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>d});var t=a(55539),l=a(58603),n=a(1369);function d(){let e=(0,l.usePathname)();return(0,t.jsx)("main",{"data-testid":"not-found",className:"min-h-screen bg-gradient-to-b from-background via-background to-muted/40 px-6 py-12 sm:px-10",children:(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-10",children:[(0,t.jsxs)("header",{className:"flex flex-col gap-3",children:[(0,t.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground",children:"elanous PWA"}),(0,t.jsx)("h1",{className:"text-3xl font-bold leading-tight sm:text-4xl",children:"여기엔 없습니다"}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:[(0,t.jsx)("code",{children:e||"알 수 없는 주소"})," 주소는 이 앱에 없습니다. 아래에서 지금 갈 수 있는 곳을 선택하거나 참고 주소의 사유를 확인하세요."]})]}),(0,t.jsx)(n.QL,{ariaLabel:"이동 가능한 주소와 참고 주소"})]})})}},95851:(e,s,a)=>{Promise.resolve().then(a.bind(a,89350))}},e=>{e.O(0,[211,3324,3558,5994,5977,224,2463,2196,7358],()=>e(e.s=95851)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6997],{3704:(e,t,s)=>{"use strict";s.d(t,{A:()=>d});var n=s(46124);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}},5997:(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}},15151:(e,t,s)=>{"use strict";s.d(t,{C:()=>d,DaemonProvider:()=>c,Q:()=>u});var n=s(55539),r=s(46124),a=s(8101),l=s(5997),i=s(18060),o=s(72215);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}},18705:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x});var n=s(55539),r=s(46124),a=s(43691);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(2699);let p=new(s(18060)).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)})]})}},27143:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});let n=(0,s(3704).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"}]])},51748:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});let n=(0,s(3704).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"}]])},53709:(e,t,s)=>{Promise.resolve().then(s.bind(s,18705))},53987:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});let n=(0,s(3704).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"}]])},82142:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});let n=(0,s(3704).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"}]])}},e=>{e.O(0,[8060,2699,2463,2196,7358],()=>e(e.s=53709)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2624],{5997:(e,n,t)=>{"use strict";t.d(n,{Zr:()=>a,f6:()=>l,oD:()=>s});let r="elanous.daemon.sessionId";function l(){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 s(){let e=function(){let e=new URLSearchParams(window.location.search).get("session");return e?(localStorage.setItem(r,e),e):localStorage.getItem(r)}();if(e)return e;let n=l();return localStorage.setItem(r,n),n}function a(){let e=l();return localStorage.setItem(r,e),e}},6119:(e,n,t)=>{Promise.resolve().then(t.bind(t,99864))},15151:(e,n,t)=>{"use strict";t.d(n,{C:()=>i,DaemonProvider:()=>c,Q:()=>u});var r=t(55539),l=t(46124),s=t(8101),a=t(5997),o=t(18060),d=t(72215);let i=(0,l.createContext)(null);function c(e){let{children:n}=e,t={baseUrl:"",token:"",provider:""},[c,u]=(0,l.useState)(t),[m,p]=(0,l.useState)(""),[f]=(0,l.useState)(()=>new o.ki(t));(0,l.useEffect)(()=>{let e=(0,s.Fp)();u(e),f.updateConfig(e),p((0,a.oD)()),(0,d.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[f]),(0,l.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let n=(0,s.Fp)();f.updateConfig(n),u(n),(0,d.cY)("webterm.provider.daemon.config-cross-tab",{key:e.key,hasToken:!!n.token});return}"elanous.daemon.sessionId"===e.key&&e.newValue&&p(n=>n===e.newValue?n:((0,d.cY)("webterm.provider.daemon.session-cross-tab",{previous:n||"(empty)",next:e.newValue}),e.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[f]);let b=e=>{u(n=>{let t={...n,...e};return(0,s.Qc)(e),f.updateConfig(t),(0,d.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),t})},h=e=>{p(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,d.cY)("webterm.provider.daemon.session-set",{sessionId:e})},v=(0,l.useMemo)(()=>({config:c,setConfig:b,client:f,sessionId:m,setSessionId:h}),[c,f,m]);return(0,r.jsx)(i.Provider,{value:v,children:n})}function u(){let e=(0,l.useContext)(i);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},37037:(e,n,t)=>{"use strict";t.d(n,{Es:()=>a,Wf:()=>l,q9:()=>s});let r=/\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 l(e){return!r.test(e)}function s(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 a(e){return e.replace(/#\d{4,6}\b/g,"PR")}},43537:(e,n,t)=>{"use strict";function r(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function l(e){return"string"==typeof e}function s(e){return l(e)&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?Z$/.test(e)&&Number.isFinite(Date.parse(e))&&new Date(e).toISOString().slice(0,19)===e.slice(0,19)}function a(e){return r(e)&&l(e.nodeId)&&(null===e.ok||"boolean"==typeof e.ok)&&l(e.summary)}function o(e){return r(e)&&l(e.runId)&&l(e.status)&&l(e.startedAt)&&(null===e.version||l(e.version))&&Array.isArray(e.path)&&e.path.every(l)&&Array.isArray(e.nodes)&&e.nodes.every(a)}function d(e){return r(e)&&l(e.id)&&l(e.title)&&l(e.status)&&(void 0===e.owner||l(e.owner))&&l(e.updatedAt)&&(void 0===e.evidence||l(e.evidence))}t.d(n,{HG:()=>h,Kh:()=>b,Nn:()=>p,oc:()=>f});let i=e=>Number.isInteger(e)&&e>=0;function c(e){return r(e)&&l(e.id)&&l(e.title)&&(null===e.open||i(e.open))&&(null===e.landed||i(e.landed))&&(null===e.blocked||Array.isArray(e.blocked)&&e.blocked.every(e=>r(e)&&l(e.id)&&l(e.title)))}function u(e){return r(e)&&["OP","MK","TC","UX"].includes(e.seat)&&(void 0===e.role||l(e.role))&&(null===e.now||r(e.now)&&l(e.now.text)&&l(e.now.at))&&(null===e.landed||Array.isArray(e.landed)&&e.landed.every(e=>r(e)&&i(e.pr)&&l(e.title)&&l(e.at)&&(null===e.checklistId||l(e.checklistId))))&&(null===e.blocked||Array.isArray(e.blocked)&&e.blocked.every(e=>r(e)&&l(e.id)&&l(e.title)&&"red"===e.status))&&(null===e.pendingDecisions||i(e.pendingDecisions))&&(null===e.checklist||r(e.checklist)&&["green","yellow","red","done"].every(n=>i(e.checklist[n])))&&(void 0===e.subSeats||null===e.subSeats||Array.isArray(e.subSeats)&&e.subSeats.every(c))}async function m(e,n,t){try{let r=await e.fetchResponse(n,{method:"GET"});if(403===r.status)return{kind:"forbidden"};if(!r.ok)return{kind:"error",status:r.status};let l=t(await r.json());return null===l?{kind:"error",status:r.status}:{kind:"ready",data:l}}catch(e){return{kind:"error",status:0}}}function p(e,n){return m(e,"/v1/ops/seats".concat(n?"?date=".concat(encodeURIComponent(n)):""),e=>r(e)&&l(e.date)&&Array.isArray(e.seats)&&e.seats.every(u)&&new Set(e.seats.map(e=>e.seat)).size===e.seats.length?{date:e.date,seats:e.seats}:null)}function f(e,n){return m(e,"/v1/ops/release/runs".concat(n?"?version=".concat(encodeURIComponent(n)):""),e=>Array.isArray(e)&&e.every(o)?e:null)}function b(e,n,t){return m(e,"/v1/ops/release/runs/".concat(encodeURIComponent(n),"/nodes/").concat(encodeURIComponent(t),"/log"),e=>r(e)&&l(e.log)?{log:e.log}:null)}function h(e,n){return m(e,"/v1/ops/checklist?version=".concat(encodeURIComponent(n)),e=>{var n,t,a,o;if(!(r(e)&&l(e.version)&&(void 0===e.codename||l(e.codename))&&Array.isArray(e.items)&&e.items.every(d)&&["green","yellow","red","done"].every(n=>void 0===e[n]||Number.isInteger(e[n])&&e[n]>=0)&&(void 0===e.blocked||Array.isArray(e.blocked)&&e.blocked.every(l))&&(void 0===e.byOwner||r(e.byOwner)&&Object.values(e.byOwner).every(e=>Number.isInteger(e)&&e>=0))&&(void 0===e.history||Array.isArray(e.history))))return null;let i={green:0,yellow:0,red:0,done:0};for(let n of e.items)n.status in i&&i[n.status]++;return{version:e.version,...void 0!==e.codename?{codename:e.codename}:{},schedule:r(e.schedule)&&s(e.schedule.cutAt)&&(null===e.schedule.landBy||s(e.schedule.landBy))?{cutAt:e.schedule.cutAt,landBy:e.schedule.landBy}:null,items:e.items,green:null!=(n=e.green)?n:i.green,yellow:null!=(t=e.yellow)?t:i.yellow,red:null!=(a=e.red)?a:i.red,done:null!=(o=e.done)?o:i.done,...void 0!==e.blocked?{blocked:e.blocked}:{},...void 0!==e.byOwner?{byOwner:e.byOwner}:{},...void 0!==e.history?{history:e.history}:{}}})}},99864:(e,n,t)=>{"use strict";t.d(n,{SeatBoardView:()=>p});var r=t(55539),l=t(46124),s=t(15151),a=t(43537),o=t(37037);let d=[{seat:"OP",role:"COO"},{seat:"MK",role:"CMO"},{seat:"TC",role:"CTO"},{seat:"UX",role:"CXO"}];function i(e){return null===e?"못 읽음":String(e)}function c(e,n,t){let r=e.split(/\r?\n/);return n?r.filter(e=>(0,o.Wf)(e)&&!t.some(n=>e.includes(n))).map(o.Es):r}function u(e){var n,t,l,s,a,d;let{seat:u,role:m,publicCapture:p,identifiers:f}=e,b=null!=(n=null==u?void 0:u.landed)?n:null,h=null!=(t=null==u?void 0:u.blocked)?t:null,v=null!=(l=null==u?void 0:u.checklist)?l:null;return(0,r.jsxs)("article",{className:"min-w-0 space-y-5 rounded-2xl border bg-card p-5 shadow-sm","aria-label":"".concat(m," 자리"),children:[(0,r.jsxs)("header",{children:[(0,r.jsx)("h2",{className:"text-3xl font-bold tracking-tight",children:m}),(0,r.jsx)("div",{className:"mt-3 min-h-12 break-words text-muted-foreground","aria-label":"지금 하는 일",children:(null==u?void 0:u.now)?c((0,o.q9)(u.now.text),p,f).map((e,n)=>(0,r.jsx)("p",{children:e},n)):"못 읽음"})]}),(0,r.jsxs)("section",{"aria-label":"오늘 착지",children:[(0,r.jsxs)("h3",{className:"font-semibold",children:["오늘 착지 ",(0,r.jsx)("strong",{className:"".concat(p?"text-5xl":"text-3xl"," ").concat(null===b?"text-muted-foreground":""),children:i(null!=(s=null==b?void 0:b.length)?s:null)})]}),b&&(0,r.jsx)("ul",{className:"mt-2 space-y-1",children:b.slice(-5).reverse().flatMap(e=>c(e.title,p,f).map((n,t)=>(0,r.jsx)("li",{className:"break-words",children:p?n:"#".concat(e.pr," \xb7 ").concat(n)},"".concat(e.pr,"-").concat(t))))})]}),(0,r.jsxs)("section",{"aria-label":"막힘",children:[(0,r.jsxs)("h3",{className:"font-semibold text-red-600 dark:text-red-400",children:["막힘 ",(0,r.jsx)("strong",{className:"".concat(p?"text-5xl":"text-3xl"," ").concat(null===h?"text-muted-foreground":""),children:i(null!=(a=null==h?void 0:h.length)?a:null)})]}),h&&(0,r.jsx)("ul",{className:"mt-2 space-y-1 text-red-600 dark:text-red-400",children:h.flatMap(e=>c(e.title,p,f).map((n,t)=>(0,r.jsx)("li",{className:"break-words",children:p?n:"".concat(e.id," \xb7 ").concat(n)},"".concat(e.id,"-").concat(t))))})]}),(0,r.jsxs)("p",{children:["대표 결정 대기 ",(0,r.jsx)("strong",{className:"".concat(p?"text-5xl":"text-3xl"," ").concat((null==u?void 0:u.pendingDecisions)==null?"text-muted-foreground":""),children:i(null!=(d=null==u?void 0:u.pendingDecisions)?d:null)})]}),(0,r.jsx)("section",{"aria-label":"칸 상태",className:"flex flex-wrap gap-2 border-t pt-3",children:v?(0,r.jsx)(r.Fragment,{children:["green","yellow","red","done"].map((e,n)=>(0,r.jsxs)("span",{"aria-label":"".concat(e," ").concat(v[e]),children:[["\uD83D\uDFE2","\uD83D\uDFE1","\uD83D\uDD34","✅"][n]," ",v[e]]},e))}):(0,r.jsx)("span",{className:"text-muted-foreground",children:"못 읽음"})}),(null==u?void 0:u.subSeats)&&u.subSeats.length>0&&(0,r.jsx)("ul",{"aria-label":"하위 자리",className:"space-y-1 border-t pt-3",children:u.subSeats.map(e=>{var n,t,l;let s="└ ".concat(e.id," ").concat(e.title," \xb7 열린 칸 ").concat(i(e.open)," \xb7 오늘 착지 ").concat(i(e.landed)," \xb7 막힘 ").concat(i(null!=(l=null==(n=e.blocked)?void 0:n.length)?l:null)),a=(null==(t=e.blocked)?void 0:t.length)?" \xb7 ".concat(e.blocked.map(e=>e.id).join(", ")):"",o=p?c(s,!0,f):[s],d=p?c(a,!0,f):[a];return o.map((n,t)=>(0,r.jsxs)("li",{className:"break-words",children:[n,d.join("")]},"".concat(e.id,"-").concat(t)))})})]})}function m(e){let{result:n,refreshedAt:t,publicCapture:l=!1}=e;if((null==n?void 0:n.kind)==="forbidden")return(0,r.jsx)("p",{children:"운영자만 볼 수 있습니다"});let s=(null==n?void 0:n.kind)==="ready"?n.data.seats:[],a=s.flatMap(e=>{var n,t,r;return[...(null!=(n=e.landed)?n:[]).flatMap(e=>[String(e.pr),...e.checklistId?[e.checklistId]:[]]),...(null!=(t=e.blocked)?t:[]).map(e=>e.id),...(null!=(r=e.subSeats)?r:[]).flatMap(e=>{var n;return(null!=(n=e.blocked)?n:[]).map(e=>e.id)})]});return(0,r.jsxs)("main",{className:"mx-auto w-full max-w-[1920px] space-y-6 p-4 text-foreground md:p-8 ".concat(l?"flex min-h-screen flex-col text-base":""),children:[(0,r.jsxs)("header",{children:[(0,r.jsx)("p",{className:"text-muted-foreground",children:"운영 / 자리 현황"}),(0,r.jsx)("h1",{className:"text-3xl font-bold",children:"자리 현황"})]}),(0,r.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 t=(null==n?void 0:n.kind)!=="ready"||d.some(n=>{var t;let{seat:r}=n;return!s.find(e=>e.seat===r)||(null==(t=s.find(e=>e.seat===r))?void 0:t[e])===null})?"못 읽음":String(s.reduce((n,t)=>n+("pendingDecisions"===e?t.pendingDecisions:t[e].length),0));return(0,r.jsxs)("p",{children:["landed"===e?"오늘 착지":"blocked"===e?"막힘":"결정 대기"," ",(0,r.jsx)("strong",{className:"".concat(l?"text-5xl":"text-3xl").concat("못 읽음"===t?" text-muted-foreground":""),children:t})]},e)}),(0,r.jsxs)("p",{children:["마지막 갱신 ",(0,r.jsx)("time",{dateTime:null!=t?t:void 0,children:t?new Date(t).toLocaleString("ko-KR",{timeZone:"Asia/Seoul"}):"못 읽음"})]})]}),null===n&&(0,r.jsx)("p",{role:"status",children:"자리 현황을 불러오는 중…"}),(null==n?void 0:n.kind)==="error"&&(0,r.jsxs)("p",{role:"alert",children:["자리 현황을 불러오지 못했습니다 (",n.status,")"]}),(null==n?void 0:n.kind)==="ready"&&(0,r.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 min-[1440px]:grid-cols-4",children:d.map(e=>{let{seat:n,role:t}=e;return(0,r.jsx)(u,{seat:s.find(e=>e.seat===n),role:t,publicCapture:l,identifiers:a},n)})}),l&&(0,r.jsx)("footer",{className:"mt-auto border-t pt-4 text-center font-semibold tracking-wide",children:"PUBLIC CAPTURE \xb7 가린 화면"})]})}function p(){let{client:e}=(0,s.Q)(),[n,t]=(0,l.useState)(null),[o,d]=(0,l.useState)(null),[i,c]=(0,l.useState)(null);return((0,l.useEffect)(()=>{c("public"===new URLSearchParams(window.location.search).get("capture"))},[]),(0,l.useEffect)(()=>{let n=!0,r=!1,l=!1,s=async()=>{if(!n||r||l||document.hidden)return;r=!0;let s=new Intl.DateTimeFormat("sv-SE",{timeZone:"Asia/Seoul"}).format(new Date),o=await (0,a.Nn)(e,s);r=!1,n&&(t(o),"forbidden"===o.kind&&(l=!0),"ready"===o.kind&&d(new Date().toISOString()))};t(null),d(null),s();let o=window.setInterval(()=>{s()},3e4),i=()=>{document.hidden||s()};return document.addEventListener("visibilitychange",i),()=>{n=!1,window.clearInterval(o),document.removeEventListener("visibilitychange",i)}},[e]),null===i)?null:(0,r.jsx)(m,{result:n,refreshedAt:o,publicCapture:i})}}},e=>{e.O(0,[8060,2463,2196,7358],()=>e(e.s=6119)),_N_E=e.O()}]);
|