maestro-flow 0.3.15 → 0.3.17
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/.claude/agents/workflow-planner.md +24 -8
- package/.claude/commands/maestro-amend.md +300 -0
- package/.claude/commands/maestro-analyze.md +1 -49
- package/.claude/commands/maestro-execute.md +2 -56
- package/.claude/commands/maestro-fork.md +3 -50
- package/.claude/commands/maestro-merge.md +2 -26
- package/.claude/commands/maestro-milestone-audit.md +1 -5
- package/.claude/commands/maestro-milestone-complete.md +1 -7
- package/.claude/commands/maestro-plan.md +6 -127
- package/.claude/commands/maestro-roadmap.md +3 -101
- package/.claude/commands/maestro-spec-generate.md +1 -25
- package/.claude/commands/maestro-ui-design.md +14 -73
- package/.claude/commands/maestro-verify.md +1 -32
- package/.claude/commands/maestro.md +13 -30
- package/.claude/commands/manage-harvest.md +7 -44
- package/.claude/commands/manage-knowhow-capture.md +193 -0
- package/.claude/commands/{manage-memory.md → manage-knowhow.md} +77 -88
- package/.claude/commands/manage-learn.md +3 -28
- package/.claude/commands/manage-status.md +1 -20
- package/.claude/commands/manage-wiki.md +1 -1
- package/.claude/commands/quality-business-test.md +1 -1
- package/.claude/commands/quality-debug.md +3 -18
- package/.claude/commands/quality-integration-test.md +3 -23
- package/.claude/commands/quality-retrospective.md +1 -28
- package/.claude/commands/quality-review.md +3 -52
- package/.claude/commands/quality-test-gen.md +1 -10
- package/.claude/commands/quality-test.md +3 -25
- package/.claude/commands/spec-add.md +1 -21
- package/.claude/commands/spec-load.md +1 -16
- package/.claude/commands/wiki-connect.md +2 -112
- package/.claude/commands/wiki-digest.md +2 -141
- package/.codex/skills/learn-decompose/SKILL.md +2 -8
- package/.codex/skills/maestro/SKILL.md +60 -146
- package/.codex/skills/maestro-analyze/SKILL.md +52 -150
- package/.codex/skills/maestro-brainstorm/SKILL.md +36 -91
- package/.codex/skills/maestro-composer/SKILL.md +4 -76
- package/.codex/skills/maestro-execute/SKILL.md +46 -177
- package/.codex/skills/maestro-init/SKILL.md +7 -51
- package/.codex/skills/maestro-link-coordinate/SKILL.md +56 -229
- package/.codex/skills/maestro-milestone-audit/SKILL.md +7 -36
- package/.codex/skills/maestro-milestone-complete/SKILL.md +11 -93
- package/.codex/skills/maestro-overlay/SKILL.md +23 -92
- package/.codex/skills/maestro-plan/SKILL.md +70 -166
- package/.codex/skills/maestro-player/SKILL.md +24 -149
- package/.codex/skills/maestro-quick/SKILL.md +5 -48
- package/.codex/skills/maestro-roadmap/SKILL.md +21 -66
- package/.codex/skills/maestro-spec-generate/SKILL.md +20 -56
- package/.codex/skills/maestro-ui-design/SKILL.md +6 -53
- package/.codex/skills/maestro-verify/SKILL.md +39 -136
- package/.codex/skills/manage-codebase-rebuild/SKILL.md +25 -75
- package/.codex/skills/manage-codebase-refresh/SKILL.md +5 -32
- package/.codex/skills/manage-issue/SKILL.md +1 -6
- package/.codex/skills/manage-issue-discover/SKILL.md +33 -93
- package/.codex/skills/{manage-memory → manage-knowhow}/SKILL.md +95 -95
- package/.codex/skills/manage-knowhow-capture/SKILL.md +110 -0
- package/.codex/skills/manage-learn/SKILL.md +17 -71
- package/.codex/skills/manage-status/SKILL.md +4 -35
- package/.codex/skills/manage-wiki/SKILL.md +1 -1
- package/.codex/skills/quality-business-test/SKILL.md +2 -14
- package/.codex/skills/quality-debug/SKILL.md +41 -133
- package/.codex/skills/quality-integration-test/SKILL.md +36 -145
- package/.codex/skills/quality-refactor/SKILL.md +6 -59
- package/.codex/skills/quality-retrospective/SKILL.md +292 -531
- package/.codex/skills/quality-review/SKILL.md +30 -65
- package/.codex/skills/quality-sync/SKILL.md +2 -11
- package/.codex/skills/quality-test/SKILL.md +4 -45
- package/.codex/skills/quality-test-gen/SKILL.md +33 -121
- package/.codex/skills/spec-add/SKILL.md +2 -9
- package/.codex/skills/spec-load/SKILL.md +4 -14
- package/.codex/skills/spec-map/SKILL.md +4 -37
- package/.codex/skills/spec-remove/SKILL.md +3 -35
- package/.codex/skills/spec-setup/SKILL.md +2 -19
- package/.codex/skills/team-coordinate/SKILL.md +20 -132
- package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +61 -215
- package/.codex/skills/team-executor/SKILL.md +7 -66
- package/.codex/skills/team-executor/roles/executor/commands/monitor.md +60 -182
- package/.codex/skills/team-executor/specs/session-schema.md +22 -56
- package/.codex/skills/team-lifecycle-v4/SKILL.md +22 -143
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +31 -223
- package/.codex/skills/team-quality-assurance/SKILL.md +14 -88
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +46 -186
- package/.codex/skills/team-review/SKILL.md +12 -86
- package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +49 -187
- package/.codex/skills/team-tech-debt/SKILL.md +11 -50
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +50 -239
- package/.codex/skills/team-testing/SKILL.md +14 -99
- package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +52 -228
- package/.codex/skills/wiki-connect/SKILL.md +2 -5
- package/README.md +6 -0
- package/README.zh-CN.md +6 -0
- package/chains/_intent-map.json +7 -7
- package/chains/singles/{memory-capture.json → knowhow-capture.json} +5 -5
- package/chains/singles/{memory.json → knowhow.json} +6 -6
- package/dashboard/dist/assets/{ArtifactsPage-CUrrDGgN.js → ArtifactsPage-iJZtYsmR.js} +6 -6
- package/dashboard/dist/assets/ChatInput-DNnDLdQF.js +6 -0
- package/dashboard/dist/assets/ChatPage-BjBibfE4.js +22 -0
- package/dashboard/dist/assets/{CollabPage-DIUXeazv.js → CollabPage-8lUMUol_.js} +1 -1
- package/dashboard/dist/assets/{ExecutionPanel-VmYeADFj.js → ExecutionPanel-BKV3GZ7Q.js} +1 -1
- package/dashboard/dist/assets/{KanbanPage-DLq8v7hg.js → KanbanPage-diY3QmGd.js} +2 -2
- package/dashboard/dist/assets/{MarkdownRenderer-D7AehrnR.js → MarkdownRenderer-cYFfe1uX.js} +1 -1
- package/dashboard/dist/assets/McpPage-COjuIf7U.js +21 -0
- package/dashboard/dist/assets/MeetingRoomPage-wnvT7wlB.js +85 -0
- package/dashboard/dist/assets/{OutputPanel-B-Rjwgmv.js → OutputPanel-DDL90Idy.js} +1 -1
- package/dashboard/dist/assets/{ProblemsPanel-GEpF-oi4.js → ProblemsPanel-zFN9IIs0.js} +1 -1
- package/dashboard/dist/assets/{RequirementBoardPage-xs8uDM7I.js → RequirementBoardPage-DOPJoT0I.js} +2 -2
- package/dashboard/dist/assets/{RequirementPage-BKDSFwjA.js → RequirementPage-CEVquRgM.js} +1 -1
- package/dashboard/dist/assets/RoomsPage-D5USEWDh.js +1 -0
- package/dashboard/dist/assets/{SpecsPage-DLFb9ZH0.js → SpecsPage-BOwBin_o.js} +1 -1
- package/dashboard/dist/assets/{SupervisorPage-SOki_kgz.js → SupervisorPage-5iRyMU5T.js} +1 -1
- package/dashboard/dist/assets/TeamsPage-DlcEmr_Q.js +1 -0
- package/dashboard/dist/assets/{TreeBrowser-B9DHdULE.js → TreeBrowser-Y48Wz-QY.js} +1 -1
- package/dashboard/dist/assets/WorkflowPage-CmQaRVgL.js +6 -0
- package/dashboard/dist/assets/arrow-left-NCUOENvg.js +6 -0
- package/dashboard/dist/assets/{check-DJDk3A2a.js → check-o7nfGNHf.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-C7bVDreZ.js → chevron-right-BXySK2fn.js} +1 -1
- package/dashboard/dist/assets/{circle-alert-Na1vf6qQ.js → circle-alert-DcSBokh4.js} +1 -1
- package/dashboard/dist/assets/{circle-check-CEGgy3NV.js → circle-check-Cd-jce4j.js} +1 -1
- package/dashboard/dist/assets/{circle-check-big-3JB8zRYj.js → circle-check-big-BN7Mdp4i.js} +1 -1
- package/dashboard/dist/assets/{circle-Qfgy4LB_.js → circle-cooAwnAR.js} +1 -1
- package/dashboard/dist/assets/{code-Ble63Idz.js → code-BQa9oL1n.js} +1 -1
- package/dashboard/dist/assets/{columns-3-BUcKlxve.js → columns-3-BzgxelGx.js} +1 -1
- package/dashboard/dist/assets/{download-CMqkfn8x.js → download-swRJnate.js} +1 -1
- package/dashboard/dist/assets/en-C_BD3UCD.js +1 -0
- package/dashboard/dist/assets/{folder-B9ewx9LL.js → folder-DbGbLNFN.js} +1 -1
- package/dashboard/dist/assets/index-BEUaOz_b.css +1 -0
- package/dashboard/dist/assets/{index-JTmGteaT.js → index-DIoMBMbv.js} +1 -1
- package/dashboard/dist/assets/index-DLBN_7fb.js +44 -0
- package/dashboard/dist/assets/index-uIqUCT8y.js +236 -0
- package/dashboard/dist/assets/{list-DI8Wn2aT.js → list-BTRAIvDq.js} +1 -1
- package/dashboard/dist/assets/loader-NHtB6Mdn.js +6 -0
- package/dashboard/dist/assets/{minus-Lp_BfctG.js → minus-BjMxRTET.js} +1 -1
- package/dashboard/dist/assets/{pen-line-Ch7sphzZ.js → pen-line-C4_O16H0.js} +1 -1
- package/dashboard/dist/assets/{pencil-_yRMHmGT.js → pencil-DTmKhyDY.js} +1 -1
- package/dashboard/dist/assets/{proxy-D72Y8a4Y.js → proxy-Dtx5p6IO.js} +1 -1
- package/dashboard/dist/assets/rows-2-GR1dZtRu.js +6 -0
- package/dashboard/dist/assets/{search-BS6fI6Bg.js → search-DVtgy2W7.js} +1 -1
- package/dashboard/dist/assets/{shallow-BXasQBvr.js → shallow-BOmvDNsv.js} +1 -1
- package/dashboard/dist/assets/{table-CeGlFjlP.js → table-DCzuJAFh.js} +1 -1
- package/dashboard/dist/assets/team-types-BPeOvVdA.js +6 -0
- package/dashboard/dist/assets/{terminal-BJic2yW-.js → terminal-CzogW4cl.js} +1 -1
- package/dashboard/dist/assets/{trash-2-Czz4X8Fb.js → trash-2-52LATVfW.js} +1 -1
- package/dashboard/dist/assets/users-DLFE2voE.js +6 -0
- package/dashboard/dist/assets/{zap-C3H0jVFA.js → zap-DhiYlgyZ.js} +1 -1
- package/dashboard/dist/assets/zh-CN-DvQKfow3.js +1 -0
- package/dashboard/dist/index.html +2 -2
- package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.js +19 -11
- package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/agent-sdk-adapter.js +5 -0
- package/dashboard/dist-server/dashboard/src/server/agents/agent-sdk-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +21 -4
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/env-cleanup.js +8 -0
- package/dashboard/dist-server/dashboard/src/server/agents/env-cleanup.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js +6 -6
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.test.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/index.js +14 -3
- package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/mcp-config-builder.d.ts +24 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/mcp-config-builder.js +220 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/mcp-config-builder.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/mcp-config-builder.test.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/mcp-config-builder.test.js +115 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/mcp-config-builder.test.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/meeting-room-mcp-server.d.ts +44 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/meeting-room-mcp-server.js +260 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/meeting-room-mcp-server.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/meeting-room-mcp-server.test.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/meeting-room-mcp-server.test.js +194 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/meeting-room-mcp-server.test.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/stdio-bridge.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/stdio-bridge.js +279 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/stdio-bridge.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/tcp-helpers.d.ts +14 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/tcp-helpers.js +131 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/tcp-helpers.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/tcp-helpers.test.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/tcp-helpers.test.js +134 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/tcp-helpers.test.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/meeting-room-session.d.ts +51 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/meeting-room-session.js +185 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/meeting-room-session.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/room-agent-registry.d.ts +29 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/room-agent-registry.js +125 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/room-agent-registry.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/room-mailbox.d.ts +18 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/room-mailbox.js +63 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/room-mailbox.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/room-session-manager.d.ts +19 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/room-session-manager.js +45 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/room-session-manager.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/room-task-board.d.ts +25 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/room-task-board.js +115 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/room-task-board.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/room-types.d.ts +53 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/room-types.js +5 -0
- package/dashboard/dist-server/dashboard/src/server/rooms/room-types.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/routes/agents.js +6 -0
- package/dashboard/dist-server/dashboard/src/server/routes/agents.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/cli-history.js +20 -1
- package/dashboard/dist-server/dashboard/src/server/routes/cli-history.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/index.d.ts +2 -1
- package/dashboard/dist-server/dashboard/src/server/routes/index.js +8 -1
- package/dashboard/dist-server/dashboard/src/server/routes/index.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/install.js +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/install.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/mcp.js +2 -2
- package/dashboard/dist-server/dashboard/src/server/routes/mcp.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/room-mcp.d.ts +3 -0
- package/dashboard/dist-server/dashboard/src/server/routes/room-mcp.js +246 -0
- package/dashboard/dist-server/dashboard/src/server/routes/room-mcp.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/routes/rooms.d.ts +3 -0
- package/dashboard/dist-server/dashboard/src/server/routes/rooms.js +38 -0
- package/dashboard/dist-server/dashboard/src/server/routes/rooms.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.integration.test.js +7 -7
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.integration.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.d.ts +39 -1
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +12 -0
- package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +25 -14
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js +6 -6
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js +17 -16
- package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.d.ts +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js +18 -7
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.d.ts +3 -1
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js +75 -1
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/room-handler.d.ts +17 -0
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/room-handler.js +192 -0
- package/dashboard/dist-server/dashboard/src/server/ws/handlers/room-handler.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/ws/session-scoped-event-filter.d.ts +13 -0
- package/dashboard/dist-server/dashboard/src/server/ws/session-scoped-event-filter.js +37 -0
- package/dashboard/dist-server/dashboard/src/server/ws/session-scoped-event-filter.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/ws/ws-manager.d.ts +7 -1
- package/dashboard/dist-server/dashboard/src/server/ws/ws-manager.js +39 -2
- package/dashboard/dist-server/dashboard/src/server/ws/ws-manager.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/constants.js +12 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/room-leader-prompt.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/shared/room-leader-prompt.js +38 -0
- package/dashboard/dist-server/dashboard/src/shared/room-leader-prompt.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/shared/team-types.d.ts +66 -0
- package/dashboard/dist-server/dashboard/src/shared/team-types.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/shared/types.d.ts +24 -3
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +76 -2
- package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
- package/dashboard/dist-server/shared/agent-types.d.ts +2 -0
- package/dashboard/dist-server/src/commands/delegate.js +11 -8
- package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
- package/dist/shared/agent-types.d.ts +2 -0
- package/dist/shared/agent-types.d.ts.map +1 -1
- package/dist/src/cli.js +2 -2
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +11 -8
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/install-backend.d.ts +1 -1
- package/dist/src/commands/install-backend.d.ts.map +1 -1
- package/dist/src/commands/install-backend.js +1 -1
- package/dist/src/commands/install-backend.js.map +1 -1
- package/dist/src/commands/install-ui/ExecutionView.d.ts.map +1 -1
- package/dist/src/commands/install-ui/ExecutionView.js +4 -1
- package/dist/src/commands/install-ui/ExecutionView.js.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/commands/install-ui/InstallExecution.js +4 -1
- package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/commands/install.js +5 -5
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/knowhow.d.ts +10 -0
- package/dist/src/commands/knowhow.d.ts.map +1 -0
- package/dist/src/commands/knowhow.js +217 -0
- package/dist/src/commands/knowhow.js.map +1 -0
- package/dist/src/commands/overlay-ui/OverlayList.d.ts +2 -0
- package/dist/src/commands/overlay-ui/OverlayList.d.ts.map +1 -1
- package/dist/src/commands/overlay-ui/OverlayList.js +6 -3
- package/dist/src/commands/overlay-ui/OverlayList.js.map +1 -1
- package/dist/src/commands/overlay-ui/index.d.ts.map +1 -1
- package/dist/src/commands/overlay-ui/index.js +70 -44
- package/dist/src/commands/overlay-ui/index.js.map +1 -1
- package/dist/src/commands/overlay.d.ts.map +1 -1
- package/dist/src/commands/overlay.js +4 -3
- package/dist/src/commands/overlay.js.map +1 -1
- package/dist/src/commands/update.d.ts.map +1 -1
- package/dist/src/commands/update.js +31 -21
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/core/manifest.d.ts +8 -1
- package/dist/src/core/manifest.d.ts.map +1 -1
- package/dist/src/core/manifest.js +3 -1
- package/dist/src/core/manifest.js.map +1 -1
- package/dist/src/core/overlay/applier.d.ts +1 -1
- package/dist/src/core/overlay/applier.d.ts.map +1 -1
- package/dist/src/core/overlay/applier.js +40 -13
- package/dist/src/core/overlay/applier.js.map +1 -1
- package/dist/src/core/overlay/loader.d.ts.map +1 -1
- package/dist/src/core/overlay/loader.js +6 -0
- package/dist/src/core/overlay/loader.js.map +1 -1
- package/dist/src/core/overlay/types.d.ts +5 -1
- package/dist/src/core/overlay/types.d.ts.map +1 -1
- package/dist/src/core/overlay/types.js +1 -1
- package/dist/src/core/overlay/types.js.map +1 -1
- package/dist/src/hooks/context-monitor.js +1 -1
- package/dist/src/hooks/context-monitor.js.map +1 -1
- package/dist/src/hooks/skill-context.js +1 -1
- package/dist/src/hooks/skill-context.js.map +1 -1
- package/dist/src/mcp/delegate-channel-relay.d.ts +4 -0
- package/dist/src/mcp/delegate-channel-relay.d.ts.map +1 -1
- package/dist/src/mcp/delegate-channel-relay.js +73 -4
- package/dist/src/mcp/delegate-channel-relay.js.map +1 -1
- package/dist/src/tools/index.js +2 -2
- package/dist/src/tools/index.js.map +1 -1
- package/dist/src/tools/store-knowhow.d.ts +21 -0
- package/dist/src/tools/store-knowhow.d.ts.map +1 -0
- package/dist/src/tools/store-knowhow.js +295 -0
- package/dist/src/tools/store-knowhow.js.map +1 -0
- package/package.json +1 -1
- package/shared/agent-types.ts +2 -0
- package/workflows/analyze.md +61 -185
- package/workflows/brainstorm.md +3 -23
- package/workflows/codebase-rebuild.md +79 -191
- package/workflows/codebase-refresh.md +26 -124
- package/workflows/debug.md +21 -141
- package/workflows/execute.md +183 -350
- package/workflows/fork.md +72 -230
- package/workflows/harvest.md +12 -79
- package/workflows/init.md +3 -17
- package/workflows/integration-test.md +21 -190
- package/workflows/issue-analyze.md +35 -153
- package/workflows/issue-discover.md +88 -263
- package/workflows/issue-execute.md +29 -208
- package/workflows/issue-plan.md +33 -154
- package/workflows/issue.md +44 -202
- package/workflows/knowhow.md +374 -0
- package/workflows/learn.md +30 -177
- package/workflows/maestro-coordinate.codex.md +77 -362
- package/workflows/maestro-link-coordinate.md +12 -61
- package/workflows/maestro.codex.md +124 -457
- package/workflows/maestro.md +562 -976
- package/workflows/map.md +16 -53
- package/workflows/merge.md +42 -197
- package/workflows/milestone-audit.md +5 -43
- package/workflows/milestone-complete.md +11 -60
- package/workflows/plan.md +188 -387
- package/workflows/quick.md +25 -174
- package/workflows/refactor.md +28 -221
- package/workflows/retrospective.md +104 -443
- package/workflows/review.md +87 -299
- package/workflows/roadmap.md +117 -97
- package/workflows/spec-generate.md +22 -118
- package/workflows/specs-add.md +5 -25
- package/workflows/specs-load.md +1 -5
- package/workflows/specs-remove.md +0 -11
- package/workflows/specs-setup.md +11 -47
- package/workflows/status.md +58 -200
- package/workflows/sync.md +28 -141
- package/workflows/test-gen.md +23 -100
- package/workflows/test.md +15 -125
- package/workflows/ui-design.md +139 -465
- package/workflows/ui-style.md +36 -228
- package/workflows/verify.md +52 -273
- package/workflows/wiki-connect.md +9 -46
- package/workflows/wiki-digest.md +7 -50
- package/workflows/wiki-manage.md +11 -108
- package/.claude/commands/maestro-coordinate.md +0 -63
- package/.claude/commands/manage-memory-capture.md +0 -59
- package/.codex/skills/maestro-coordinate/SKILL.md +0 -213
- package/.codex/skills/manage-memory-capture/SKILL.md +0 -93
- package/dashboard/dist/assets/ChatInput-pUOLJIKE.js +0 -49
- package/dashboard/dist/assets/ChatPage-B8Xqkt0v.js +0 -27
- package/dashboard/dist/assets/McpPage-BY0SjTgw.js +0 -21
- package/dashboard/dist/assets/TeamsPage-BO2kP70F.js +0 -11
- package/dashboard/dist/assets/WorkflowPage-C8hWbYim.js +0 -6
- package/dashboard/dist/assets/en-ZbRpfzuP.js +0 -1
- package/dashboard/dist/assets/index-C2Mcb4TJ.js +0 -231
- package/dashboard/dist/assets/index-DyBbPc18.css +0 -1
- package/dashboard/dist/assets/loader-B5F6PzFT.js +0 -11
- package/dashboard/dist/assets/zh-CN-CoXBFuny.js +0 -1
- package/workflows/maestro-coordinate.md +0 -582
- package/workflows/memory.md +0 -451
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import{d as K,o as ge,a7 as E,j as e,r as y,X as ve,a8 as Q,a5 as se,R as ye,P as je,O as Ne,f as we,T as Ce,h as ke,i as B,V as Me,n as Le}from"./index-C2Mcb4TJ.js";import{L as Oe}from"./list-DI8Wn2aT.js";import{T as oe}from"./terminal-BJic2yW-.js";import{S as ae}from"./search-BS6fI6Bg.js";import{T as Se}from"./trash-2-Czz4X8Fb.js";import{C as Ee}from"./chevron-right-C7bVDreZ.js";import{F as Ae,a as De,D as Ie}from"./folder-B9ewx9LL.js";import{D as Te}from"./download-CMqkfn8x.js";import{m as M}from"./proxy-D72Y8a4Y.js";import{P as Pe}from"./pen-line-Ch7sphzZ.js";import{A as Be}from"./index-JTmGteaT.js";import{C as We}from"./check-DJDk3A2a.js";import{C as Re}from"./code-Ble63Idz.js";import{M as _e}from"./minus-Lp_BfctG.js";/**
|
|
2
|
-
* @license lucide-react v0.577.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const Fe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ze=K("chevron-left",Fe);/**
|
|
7
|
-
* @license lucide-react v0.577.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const Ge=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],q=K("globe",Ge);/**
|
|
12
|
-
* @license lucide-react v0.577.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Ve=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],$e=K("package",Ve);/**
|
|
17
|
-
* @license lucide-react v0.577.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const Je=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Ye=K("wrench",Je);function He(t,o,r){return t==="project"&&r?`project:${o}@${r}`:`${t}:${o}`}function Ue(t){const o=[],r=t.globalServers??{},n=t.projects??{},a=t.enterpriseServers??{},i=t.codex;for(const[d,m]of Object.entries(r))o.push(Y(d,m,"global"));for(const[d,m]of Object.entries(n)){const b=m.mcpServers??{},l=m.disabledMcpServers??[];for(const[x,p]of Object.entries(b))o.push({...Y(x,p,"project",d),enabled:!l.includes(x)})}for(const[d,m]of Object.entries(a))o.push({...Y(d,m,"enterprise"),enabled:!0});if(i!=null&&i.servers)for(const[d,m]of Object.entries(i.servers)){const b=o.find(l=>l.name===d&&l.scope==="global");b?b.cli.codex=!0:o.push({...Y(d,m,"codex"),cli:{claude:!1,codex:!0}})}return o}function Y(t,o,r,n){const a=typeof o.url=="string";return{id:He(r,t,n),name:t,scope:r,projectPath:n,enabled:o.enabled!==!1,transport:a?"http":"stdio",command:typeof o.command=="string"?o.command:void 0,args:Array.isArray(o.args)?o.args:void 0,url:a?o.url:void 0,env:typeof o.env=="object"&&o.env!==null?o.env:void 0,cli:{claude:r!=="codex",codex:r==="codex"},raw:o}}const f=ge((t,o)=>({servers:[],templates:[],categories:[],loading:!1,error:null,activeView:"list",scopeFilter:"all",search:"",selectedServer:null,templateSearch:"",templateCategory:null,editingServer:null,setActiveView:r=>t({activeView:r}),setScopeFilter:r=>t({scopeFilter:r}),setSearch:r=>t({search:r}),setSelectedServer:r=>t({selectedServer:r}),setTemplateSearch:r=>t({templateSearch:r}),setTemplateCategory:r=>t({templateCategory:r}),setEditingServer:r=>t({editingServer:r}),fetchConfig:async()=>{t({loading:!0,error:null});try{const r=await fetch(E.CONFIG);if(!r.ok)throw new Error(`Failed: ${r.status}`);const n=await r.json();t({servers:Ue(n),loading:!1})}catch(r){t({loading:!1,error:String(r)})}},fetchTemplates:async()=>{try{const[r,n]=await Promise.all([fetch(E.TEMPLATES),fetch(E.TEMPLATES_CATEGORIES)]);if(!r.ok||!n.ok)return;const a=await r.json(),i=await n.json();t({templates:a.templates??[],categories:i.categories??[]})}catch{}},toggleServer:async(r,n,a)=>{t(i=>({servers:i.servers.map(d=>d.name===n?{...d,enabled:a}:d)}));try{await fetch(E.TOGGLE,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectPath:r,serverName:n,enable:a})})}catch{o().fetchConfig()}},removeServer:async(r,n)=>{const a=o().servers;t(i=>({servers:i.servers.filter(d=>d.name!==n)}));try{(await fetch(E.REMOVE_SERVER,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectPath:r,serverName:n})})).ok||t({servers:a})}catch{t({servers:a})}},addGlobalServer:async(r,n)=>{try{await fetch(E.ADD_GLOBAL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverName:r,serverConfig:n})}),o().fetchConfig()}catch{}},removeGlobalServer:async r=>{const n=o().servers;t(a=>({servers:a.servers.filter(i=>i.name!==r)}));try{(await fetch(E.REMOVE_GLOBAL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverName:r})})).ok||t({servers:n})}catch{t({servers:n})}},updateServer:async(r,n)=>{try{await fetch(E.UPDATE_SERVER,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({scope:r.scope,serverName:r.name,serverConfig:n,projectPath:r.projectPath})}),t({editingServer:null}),o().fetchConfig()}catch{}},installTemplate:async(r,n,a)=>{try{await fetch(E.TEMPLATES_INSTALL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({templateName:r,projectPath:n,scope:a})}),o().fetchConfig()}catch{}},filteredServers:()=>{const{servers:r,scopeFilter:n,search:a}=o();let i=r;if(n!=="all"&&(i=i.filter(d=>d.scope===n)),a){const d=a.toLowerCase();i=i.filter(m=>{var b,l;return m.name.toLowerCase().includes(d)||(((b=m.command)==null?void 0:b.toLowerCase().includes(d))??!1)||(((l=m.url)==null?void 0:l.toLowerCase().includes(d))??!1)})}return i},filteredTemplates:()=>{const{templates:r,templateSearch:n,templateCategory:a}=o();let i=r;if(a&&(i=i.filter(d=>d.category===a)),n){const d=n.toLowerCase();i=i.filter(m=>{var b;return m.name.toLowerCase().includes(d)||(((b=m.description)==null?void 0:b.toLowerCase().includes(d))??!1)})}return i},projectGroups:()=>{const{servers:r}=o(),n=new Map;for(const i of r){const d=i.projectPath??null,m=n.get(d)??[];m.push(i),n.set(d,m)}const a=[];for(const[i,d]of n)a.push({projectPath:i,servers:d});return a},selectedEntry:()=>{const{servers:r,selectedServer:n}=o();return n?r.find(a=>a.id===n)??null:null}}));function G({size:t=14,className:o,style:r}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:o,style:r,children:e.jsx("path",{d:"M17.304 3.541l-5.15 16.918H9.29l5.15-16.918zm-9.757 10.3l-2.1 3.613H2.131l3.256-5.576zm2.74-7.354L6.41 13.49l-2.037-3.5L8.052 3.54z"})})}function V({size:t=14,className:o,style:r}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:o,style:r,children:e.jsx("path",{d:"M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.14-.08 4.779-2.759a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.07.07 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.677l5.815 3.354-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.124 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.41-.676zm2.01-3.023l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zM8.307 12.863l-2.02-1.164a.08.08 0 0 1-.038-.057V6.074a4.5 4.5 0 0 1 7.375-3.453l-.14.08-4.779 2.758a.795.795 0 0 0-.393.681zm1.097-2.361l2.602-1.506 2.607 1.506v3.012l-2.602 1.506-2.607-1.506z"})})}const ne={global:{bg:"rgba(91,141,184,0.12)",text:"var(--color-accent-blue, #5B8DB8)"},project:{bg:"rgba(145,120,181,0.12)",text:"var(--color-status-planning, #9178B5)"},enterprise:{bg:"rgba(200,134,58,0.12)",text:"var(--color-status-verifying, #C8863A)"},codex:{bg:"rgba(90,158,120,0.12)",text:"var(--color-status-completed, #5A9E78)"}},le={stdio:{bg:"rgba(91,141,184,0.08)",text:"var(--color-accent-blue, #5B8DB8)"},http:{bg:"rgba(145,120,181,0.08)",text:"var(--color-status-planning, #9178B5)"}};function Xe({server:t,onClose:o}){var x;const r=f(p=>p.removeServer),n=f(p=>p.removeGlobalServer),a=f(p=>p.setEditingServer),i=y.useMemo(()=>t.env?Object.entries(t.env):[],[t.env]),d=y.useMemo(()=>JSON.stringify(t.raw,null,2),[t.raw]),m=ne[t.scope]??ne.global,b=le[t.transport]??le.stdio;function l(){t.scope==="global"?n(t.name):r(t.projectPath??"",t.name),o()}return e.jsxs(M.aside,{initial:{width:0,opacity:0},animate:{width:380,opacity:1},exit:{width:0,opacity:0},transition:{type:"spring",stiffness:400,damping:30},className:"shrink-0 border-l border-border bg-bg-card overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-[10px] px-[18px] py-[14px] border-b border-border-divider shrink-0",children:[e.jsx("div",{className:"w-9 h-9 rounded-[var(--radius-lg)] shrink-0 flex items-center justify-center",style:{background:b.bg,color:b.text},children:t.transport==="stdio"?e.jsx(oe,{size:18,strokeWidth:1.8}):e.jsx(q,{size:18,strokeWidth:1.8})}),e.jsx("span",{className:"text-[15px] font-bold text-text-primary flex-1 min-w-0 truncate",children:t.name}),e.jsx("button",{type:"button",onClick:o,"aria-label":"Close detail panel",className:"flex items-center justify-center w-7 h-7 rounded-[var(--radius-md)] text-text-tertiary hover:text-text-primary hover:bg-bg-hover transition-colors",children:e.jsx(ve,{size:14,strokeWidth:2})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-[18px] py-[16px]",style:{width:380},children:[e.jsxs(_,{label:"Info",children:[e.jsx(H,{label:"Scope",children:e.jsx("span",{className:"text-[9px] font-bold px-[7px] py-[2px] rounded-[4px] uppercase tracking-[0.03em] font-mono",style:{background:m.bg,color:m.text},children:t.scope})}),e.jsx(H,{label:"Transport",children:e.jsx("span",{className:"text-[9px] font-semibold px-[7px] py-[2px] rounded-[4px] uppercase",style:{background:b.bg,color:b.text},children:t.transport})}),e.jsx(H,{label:"Status",children:e.jsxs("span",{className:"text-[12px] font-semibold flex items-center gap-[4px]",style:{color:t.enabled?"var(--color-status-completed, #5A9E78)":"var(--color-text-tertiary)"},children:[e.jsx("span",{className:"w-[7px] h-[7px] rounded-full inline-block",style:{background:t.enabled?"var(--color-status-completed, #5A9E78)":"var(--color-text-tertiary)"}}),t.enabled?"Enabled":"Disabled"]})}),t.projectPath&&e.jsx(H,{label:"Source",children:e.jsx("span",{className:"font-mono text-[11px] text-text-primary break-all",children:t.projectPath})})]}),e.jsxs(_,{label:"CLI Presence",children:[e.jsx(ie,{icon:e.jsx(G,{size:12}),label:"Claude Code",present:t.cli.claude,tintBg:"rgba(200,134,58,0.08)",tintColor:"var(--color-status-verifying, #C8863A)"}),e.jsx(ie,{icon:e.jsx(V,{size:12}),label:"Codex CLI",present:t.cli.codex,tintBg:"rgba(90,158,120,0.08)",tintColor:"var(--color-status-completed, #5A9E78)"})]}),e.jsx(_,{label:"Command",children:e.jsx("div",{className:"bg-bg-secondary border border-border-divider rounded-[var(--radius-lg)] px-3 py-[10px] font-mono text-[11px] text-text-primary leading-[1.7] whitespace-pre-wrap break-all",children:t.command?`${t.command}${(x=t.args)!=null&&x.length?" "+t.args.join(" "):""}`:t.url??"(no command)"})}),i.length>0&&e.jsx(_,{label:"Environment",children:e.jsx("div",{className:"bg-bg-secondary border border-border-divider rounded-[var(--radius-lg)] overflow-hidden",children:e.jsx("table",{className:"w-full border-collapse",children:e.jsx("tbody",{children:i.map(([p,s])=>e.jsxs("tr",{children:[e.jsx("td",{className:"px-2 py-1 text-[11px] font-mono font-medium whitespace-nowrap border-b border-border-divider",style:{color:"var(--color-accent-blue, #5B8DB8)"},children:p}),e.jsx("td",{className:"px-2 py-1 text-[11px] font-mono text-text-secondary break-all border-b border-border-divider",children:s})]},p))})})})}),e.jsx(_,{label:"Raw Config",children:e.jsx("div",{className:"rounded-[var(--radius-lg)] px-3 py-[10px] font-mono text-[11px] leading-[1.7] whitespace-pre-wrap break-all",style:{background:"var(--color-code-bg, #2C2723)",color:"var(--color-code-text, #D9D0C4)",border:"1px solid var(--color-code-border, #3D3731)"},children:d})})]}),e.jsxs("div",{className:"flex gap-[6px] px-[18px] py-3 border-t border-border-divider shrink-0",children:[e.jsxs("button",{type:"button",onClick:()=>a(t),className:"flex-1 flex items-center justify-center gap-[4px] px-[10px] py-[5px] rounded-[var(--radius-md)] border border-border bg-bg-card text-[10px] font-semibold text-text-secondary hover:border-text-tertiary hover:text-text-primary transition-all",children:[e.jsx(Pe,{size:11,strokeWidth:2}),"Edit"]}),e.jsxs("button",{type:"button",onClick:l,className:"flex-1 flex items-center justify-center gap-[4px] px-[10px] py-[5px] rounded-[var(--radius-md)] border border-border bg-bg-card text-[10px] font-semibold text-status-failed hover:border-status-failed hover:bg-red-50 transition-all",children:[e.jsx(Se,{size:11,strokeWidth:2}),"Remove"]})]})]})}function _({label:t,children:o}){return e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.05em] text-text-tertiary mb-[6px]",children:t}),o]})}function H({label:t,children:o}){return e.jsxs("div",{className:"flex items-center gap-2 py-[3px]",children:[e.jsx("span",{className:"text-[11px] font-semibold text-text-secondary min-w-[70px] shrink-0",children:t}),o]})}function ie({icon:t,label:o,present:r,tintBg:n,tintColor:a}){return e.jsxs("div",{className:"flex items-center gap-[10px] px-[10px] py-2 rounded-[var(--radius-md)] mb-1",style:{background:r?n:void 0},children:[e.jsx("div",{className:"w-6 h-[18px] rounded-[4px] flex items-center justify-center",style:{background:n,color:a},children:t}),e.jsx("span",{className:"text-[12px] font-semibold text-text-primary flex-1",children:o}),e.jsx("span",{className:"text-[10px] font-semibold",style:{color:r?"var(--color-status-completed, #5A9E78)":"var(--color-text-tertiary)"},children:r?"Installed":"Not found"})]})}const re=["write_file","edit_file","read_file","read_many_files","team_msg","core_memory"],u=ge((t,o)=>({open:!1,step:"mode",mode:"global",projectPath:"",detection:null,selectedComponents:new Set,backup:!0,mcpEnabled:!0,enabledTools:new Set(re),detecting:!1,installing:!1,result:null,error:null,manifests:[],setOpen:r=>{t(r?{open:r,step:"mode",result:null,error:null,detection:null}:{open:r})},setStep:r=>t({step:r}),setMode:r=>t({mode:r}),setProjectPath:r=>t({projectPath:r}),toggleComponent:r=>t(n=>{const a=new Set(n.selectedComponents);return a.has(r)?a.delete(r):a.add(r),{selectedComponents:a}}),selectAllComponents:()=>t(r=>{if(!r.detection)return{};const n=r.detection.components.filter(a=>a.available).map(a=>a.id);return r.selectedComponents.has("mcp")&&n.push("mcp"),{selectedComponents:new Set(n)}}),setBackup:r=>t({backup:r}),setMcpEnabled:r=>t({mcpEnabled:r}),toggleTool:r=>t(n=>{const a=new Set(n.enabledTools);return a.has(r)?a.delete(r):a.add(r),{enabledTools:a}}),detect:async()=>{const{mode:r,projectPath:n}=o();t({detecting:!0,error:null});try{const a=await fetch(Q.DETECT,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:r,projectPath:r==="project"?n:void 0})}),i=await a.json();if(!a.ok)throw new Error(i.error??`HTTP ${a.status}`);const d=i,m=d.components.filter(b=>b.available).map(b=>b.id);m.push("mcp"),t({detecting:!1,detection:d,selectedComponents:new Set(m),step:"configure"})}catch(a){t({detecting:!1,error:String(a)})}},install:async()=>{const{mode:r,projectPath:n,selectedComponents:a,backup:i,mcpEnabled:d,enabledTools:m}=o();t({installing:!0,error:null,step:"progress"});try{const l=await(await fetch(Q.EXECUTE,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:r,projectPath:r==="project"?n:void 0,components:Array.from(a),backup:i,mcpConfig:d&&a.has("mcp")?{enabled:!0,enabledTools:Array.from(m)}:void 0})})).json();t({installing:!1,result:l})}catch(b){t({installing:!1,result:{success:!1,filesInstalled:0,dirsCreated:0,manifestPath:"",disabledItemsRestored:0,mcpRegistered:!1,components:[],error:String(b)}})}},fetchManifests:async()=>{try{const r=await fetch(Q.MANIFESTS);if(!r.ok)return;const n=await r.json();t({manifests:n.manifests??[]})}catch{}},reset:()=>t({step:"mode",mode:"global",projectPath:"",detection:null,selectedComponents:new Set,backup:!0,mcpEnabled:!0,enabledTools:new Set(re),detecting:!1,installing:!1,result:null,error:null})}));function Ke(t){const o=t.includes("/")?"/":t.includes("\\")?"\\":"/",r=t.endsWith(o)?t.slice(0,-1):t,n=r.lastIndexOf(o);return n>=0?r.slice(n+1):r}const qe=[{id:"all",label:"All"},{id:"global",label:"Global",color:"var(--color-accent-blue, #5B8DB8)"},{id:"project",label:"Project",color:"var(--color-status-planning, #9178B5)"},{id:"enterprise",label:"Enterprise",color:"var(--color-status-verifying, #C8863A)"}],ce={global:{bg:"rgba(91,141,184,0.12)",text:"var(--color-accent-blue, #5B8DB8)"},project:{bg:"rgba(145,120,181,0.12)",text:"var(--color-status-planning, #9178B5)"},enterprise:{bg:"rgba(200,134,58,0.12)",text:"var(--color-status-verifying, #C8863A)"},codex:{bg:"rgba(90,158,120,0.12)",text:"var(--color-status-completed, #5A9E78)"}};function Qe(){const t=f(c=>c.servers),o=f(c=>c.scopeFilter),r=f(c=>c.search),n=y.useMemo(()=>{let c=t;if(o!=="all"&&(c=c.filter(C=>C.scope===o)),r){const C=r.toLowerCase();c=c.filter(z=>{var O,T;return z.name.toLowerCase().includes(C)||(((O=z.command)==null?void 0:O.toLowerCase().includes(C))??!1)||(((T=z.url)==null?void 0:T.toLowerCase().includes(C))??!1)})}return c},[t,o,r]),a=f(c=>c.selectedServer),i=f(c=>c.setScopeFilter),d=f(c=>c.setSearch),m=f(c=>c.setSelectedServer),b=f(c=>c.toggleServer),l=f(c=>c.removeServer),x=f(c=>c.removeGlobalServer),p=f(c=>c.setEditingServer),s=u(c=>c.setOpen),h=t.filter(c=>c.enabled).length,w=t.filter(c=>c.scope==="global").length,k=t.filter(c=>c.scope==="project").length,S=t.filter(c=>c.scope==="enterprise").length,A=t.filter(c=>c.transport==="stdio").length,L=t.filter(c=>c.transport==="http").length,$={all:t.length,global:w,project:k,enterprise:S},W=a?t.find(c=>c.id===a)??null:null;function g(c){b(c.projectPath??"",c.name,!c.enabled)}function j(c){c.scope==="global"?x(c.name):l(c.projectPath??"",c.name)}function N(c){p(c)}return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center gap-5 px-5 py-2 border-b border-border-divider bg-bg-primary shrink-0",children:[e.jsx(U,{color:"var(--color-status-completed, #5A9E78)",value:h,label:"Active"}),e.jsx(U,{color:"var(--color-accent-blue, #5B8DB8)",value:w,label:"Global"}),e.jsx(U,{color:"var(--color-status-planning, #9178B5)",value:k,label:"Project"}),e.jsx(U,{color:"var(--color-status-verifying, #C8863A)",value:S,label:"Enterprise"})]}),e.jsxs("div",{className:"flex items-center gap-[10px] px-5 py-2 border-b border-border-divider shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-[6px] px-3 py-[6px] rounded-[var(--radius-lg)] bg-bg-card border border-border w-[260px] focus-within:border-[var(--color-status-planning,#9178B5)] transition-colors",children:[e.jsx(ae,{size:13,strokeWidth:2,className:"text-text-tertiary shrink-0"}),e.jsx("input",{type:"text",placeholder:"Search servers...",value:r,onChange:c=>d(c.target.value),className:"border-none bg-transparent outline-none text-[12px] text-text-primary w-full placeholder:text-text-tertiary"})]}),e.jsx("div",{className:"flex gap-[6px]",children:qe.map(c=>{const C=o===c.id;return e.jsxs("button",{type:"button",onClick:()=>i(c.id),className:["flex items-center gap-1 px-[10px] py-1 rounded-full border text-[10px] font-semibold whitespace-nowrap transition-all cursor-pointer",C?"bg-text-primary text-white border-text-primary":"bg-bg-card text-text-tertiary border-border hover:border-text-tertiary hover:text-text-secondary"].join(" "),children:[c.color&&!C&&e.jsx("span",{className:"w-[6px] h-[6px] rounded-full",style:{background:c.color}}),c.label,e.jsx("span",{className:"font-mono text-[9px] opacity-60",children:$[c.id]})]},c.id)})}),e.jsx("div",{className:"w-px h-[18px] bg-border-divider"}),e.jsx("div",{className:"flex gap-[6px]",children:["stdio","http"].map(c=>e.jsxs("button",{type:"button",className:"flex items-center gap-1 px-[10px] py-1 rounded-full border border-border bg-bg-card text-[10px] font-semibold text-text-tertiary hover:border-text-tertiary hover:text-text-secondary transition-all cursor-pointer whitespace-nowrap",children:[c.toUpperCase(),e.jsx("span",{className:"font-mono text-[9px] opacity-60",children:c==="stdio"?A:L})]},c))}),e.jsx("div",{className:"flex-1"}),e.jsxs("button",{type:"button",onClick:()=>s(!0),className:"flex items-center gap-[6px] px-[14px] py-[6px] rounded-[var(--radius-lg)] border border-border bg-bg-card text-[11px] font-semibold text-text-secondary cursor-pointer transition-all hover:border-text-tertiary hover:text-text-primary whitespace-nowrap",children:[e.jsx(Te,{size:13,strokeWidth:2}),"Install Wizard"]}),e.jsxs("button",{type:"button",className:"flex items-center gap-[6px] px-[14px] py-[6px] rounded-[var(--radius-lg)] border-none bg-text-primary text-white text-[11px] font-semibold cursor-pointer transition-all hover:-translate-y-px hover:shadow-md whitespace-nowrap",children:[e.jsx(se,{size:13,strokeWidth:2}),"Add Server"]})]}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[e.jsx("div",{className:"flex-1 overflow-y-auto min-w-0",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"sticky top-0 z-10 text-left text-[10px] font-semibold uppercase tracking-[0.05em] text-text-tertiary px-[14px] py-2 bg-bg-secondary border-b border-border whitespace-nowrap w-[36px]"}),e.jsx("th",{className:"sticky top-0 z-10 text-left text-[10px] font-semibold uppercase tracking-[0.05em] text-text-tertiary px-[14px] py-2 bg-bg-secondary border-b border-border whitespace-nowrap",children:"Name"}),e.jsx("th",{className:"sticky top-0 z-10 text-left text-[10px] font-semibold uppercase tracking-[0.05em] text-text-tertiary px-[14px] py-2 bg-bg-secondary border-b border-border whitespace-nowrap",children:"Command / URL"}),e.jsx("th",{className:"sticky top-0 z-10 text-left text-[10px] font-semibold uppercase tracking-[0.05em] text-text-tertiary px-[14px] py-2 bg-bg-secondary border-b border-border whitespace-nowrap",children:"Scope"}),e.jsx("th",{className:"sticky top-0 z-10 text-left text-[10px] font-semibold uppercase tracking-[0.05em] text-text-tertiary px-[14px] py-2 bg-bg-secondary border-b border-border whitespace-nowrap",children:"CLI"}),e.jsx("th",{className:"sticky top-0 z-10 text-left text-[10px] font-semibold uppercase tracking-[0.05em] text-text-tertiary px-[14px] py-2 bg-bg-secondary border-b border-border whitespace-nowrap w-[50px]",children:"On"}),e.jsx("th",{className:"sticky top-0 z-10 text-left text-[10px] font-semibold uppercase tracking-[0.05em] text-text-tertiary px-[14px] py-2 bg-bg-secondary border-b border-border whitespace-nowrap w-[140px]"})]})}),e.jsx("tbody",{children:(()=>{if(!(o==="all"||o==="project"))return n.map(v=>e.jsx(Z,{server:v,selected:a===v.id,onSelect:()=>m(a===v.id?null:v.id),onToggle:()=>g(v),onEdit:()=>N(v),onRemove:()=>j(v)},v.id));const C=n.filter(v=>v.scope==="project"),z=n.filter(v=>v.scope!=="project"),O=new Map;for(const v of C){const R=v.projectPath??"",J=O.get(R)??[];J.push(v),O.set(R,J)}const T=[];for(const v of z)T.push(e.jsx(Z,{server:v,selected:a===v.id,onSelect:()=>m(a===v.id?null:v.id),onToggle:()=>g(v),onEdit:()=>N(v),onRemove:()=>j(v)},v.id));for(const[v,R]of O){const J=Ke(v);T.push(e.jsx(Ze,{folderName:J,fullPath:v,count:R.length},`group:${v}`));for(const P of R)T.push(e.jsx(Z,{server:P,selected:a===P.id,onSelect:()=>m(a===P.id?null:P.id),onToggle:()=>g(P),onEdit:()=>N(P),onRemove:()=>j(P)},P.id))}return T.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"text-center py-8 text-text-tertiary text-[length:var(--font-size-sm)]",children:"No servers found"})}):T})()})]})}),e.jsx(Be,{children:W&&e.jsx(Xe,{server:W,onClose:()=>m(null)})})]})]})}function U({color:t,value:o,label:r}){return e.jsxs("div",{className:"flex items-center gap-[6px]",children:[e.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:t}}),e.jsx("span",{className:"text-[16px] font-extrabold text-text-primary font-mono",children:o}),e.jsx("span",{className:"text-[10px] font-semibold text-text-tertiary uppercase tracking-[0.04em]",children:r})]})}function Ze({folderName:t,fullPath:o,count:r}){return e.jsx("tr",{className:"group-header-row",children:e.jsx("td",{colSpan:7,className:"px-[14px] py-[6px] bg-[rgba(145,120,181,0.04)] border-b border-border-divider",children:e.jsxs("div",{className:"flex items-center gap-[8px]",children:[e.jsx(Ae,{size:13,strokeWidth:1.8,style:{color:"var(--color-status-planning, #9178B5)",opacity:.7}}),e.jsx("span",{className:"text-[11px] font-bold text-text-secondary",title:o,children:t}),e.jsx("span",{className:"text-[9px] font-mono text-text-tertiary opacity-60",children:r})]})})})}function Z({server:t,selected:o,onSelect:r,onToggle:n,onEdit:a,onRemove:i}){var x;const d=ce[t.scope]??ce.global,m=t.command?`${t.command}${(x=t.args)!=null&&x.length?" "+t.args.join(" "):""}`:t.url??"",b=!t.cli.claude&&t.cli.codex,l=t.cli.claude&&!t.cli.codex;return e.jsxs("tr",{onClick:r,className:["cursor-pointer transition-colors group",o?"[&>td]:bg-[rgba(145,120,181,0.07)]":"hover:[&>td]:bg-bg-hover"].join(" "),children:[e.jsx("td",{className:"px-[14px] py-2 border-b border-border-divider align-middle",children:e.jsx("div",{className:"w-7 h-7 rounded-[var(--radius-md)] shrink-0 flex items-center justify-center",style:{background:t.transport==="stdio"?"rgba(91,141,184,0.08)":"rgba(145,120,181,0.08)",color:t.transport==="stdio"?"var(--color-accent-blue, #5B8DB8)":"var(--color-status-planning, #9178B5)"},children:t.transport==="stdio"?e.jsx(oe,{size:14,strokeWidth:1.8}):e.jsx(q,{size:14,strokeWidth:1.8})})}),e.jsx("td",{className:"px-[14px] py-2 border-b border-border-divider align-middle",children:e.jsx("span",{className:"text-[12px] font-semibold text-text-primary",children:t.name})}),e.jsx("td",{className:"px-[14px] py-2 border-b border-border-divider align-middle",children:e.jsx("span",{className:"font-mono text-[11px] text-text-tertiary max-w-[280px] whitespace-nowrap overflow-hidden text-ellipsis block",children:m})}),e.jsx("td",{className:"px-[14px] py-2 border-b border-border-divider align-middle whitespace-nowrap",children:e.jsx("span",{className:"text-[9px] font-bold px-[7px] py-[2px] rounded-[4px] uppercase tracking-[0.03em] font-mono",style:{background:d.bg,color:d.text},children:t.scope})}),e.jsx("td",{className:"px-[14px] py-2 border-b border-border-divider align-middle",children:e.jsxs("div",{className:"flex gap-[3px]",children:[e.jsx("span",{className:["w-5 h-4 rounded-[3px] flex items-center justify-center",t.cli.claude?"":"opacity-25"].join(" "),style:{background:"rgba(200,134,58,0.08)",color:"var(--color-status-verifying, #C8863A)"},title:"Claude Code",children:e.jsx(G,{size:11})}),e.jsx("span",{className:["w-5 h-4 rounded-[3px] flex items-center justify-center",t.cli.codex?"":"opacity-25"].join(" "),style:{background:"rgba(90,158,120,0.08)",color:"var(--color-status-completed, #5A9E78)"},title:"Codex CLI",children:e.jsx(V,{size:11})})]})}),e.jsx("td",{className:"px-[14px] py-2 border-b border-border-divider align-middle text-center",children:e.jsxs("label",{className:"relative inline-block w-8 h-[18px] cursor-pointer",onClick:p=>p.stopPropagation(),children:[e.jsx("input",{type:"checkbox",checked:t.enabled,onChange:n,disabled:t.scope==="enterprise",className:"sr-only peer"}),e.jsx("div",{className:["w-8 h-[18px] rounded-full transition-colors duration-200",t.scope==="enterprise"?"opacity-50 cursor-default":""].join(" "),style:{background:t.enabled?"var(--color-status-completed, #5A9E78)":"var(--color-border, #E8E5DE)"},children:e.jsx("div",{className:"absolute top-[2px] left-[2px] w-[14px] h-[14px] rounded-full bg-white shadow-sm transition-transform duration-200",style:{transform:t.enabled?"translateX(14px)":"translateX(0)"}})})]})}),e.jsx("td",{className:"px-[14px] py-2 border-b border-border-divider align-middle",children:e.jsxs("div",{className:"flex gap-1 items-center opacity-0 group-hover:opacity-100 transition-opacity",onClick:p=>p.stopPropagation(),children:[(l||b)&&e.jsx("button",{type:"button",className:"flex items-center gap-[3px] px-2 py-1 rounded-[5px] border border-border bg-bg-card text-text-tertiary hover:border-[var(--color-accent-blue,#5B8DB8)] hover:text-[var(--color-accent-blue,#5B8DB8)] hover:bg-[rgba(91,141,184,0.04)] transition-all whitespace-nowrap",title:l?"Copy to Codex":"Copy to Claude",children:l?e.jsxs(e.Fragment,{children:[e.jsx(Ee,{size:10,strokeWidth:2.5}),e.jsx("span",{className:"w-[14px] h-[11px] rounded-[2px] flex items-center justify-center",style:{background:"rgba(90,158,120,0.08)",color:"var(--color-status-completed, #5A9E78)"},children:e.jsx(V,{size:9})})]}):e.jsxs(e.Fragment,{children:[e.jsx(ze,{size:10,strokeWidth:2.5}),e.jsx("span",{className:"w-[14px] h-[11px] rounded-[2px] flex items-center justify-center",style:{background:"rgba(200,134,58,0.08)",color:"var(--color-status-verifying, #C8863A)"},children:e.jsx(G,{size:9})})]})}),e.jsx("button",{type:"button",onClick:a,className:"flex items-center gap-1 px-[10px] py-[5px] rounded-[var(--radius-md)] border border-border bg-bg-card text-[10px] font-semibold text-text-secondary hover:border-text-tertiary hover:text-text-primary transition-all",children:e.jsx(Pe,{size:11,strokeWidth:2})}),t.scope!=="enterprise"&&e.jsx("button",{type:"button",onClick:i,className:"flex items-center gap-1 px-[10px] py-[5px] rounded-[var(--radius-md)] border border-border bg-bg-card text-[10px] font-semibold text-status-failed hover:border-status-failed hover:bg-red-50 transition-all",children:e.jsx(Se,{size:11,strokeWidth:2})})]})})]})}function et(t){const o=t.includes("/")?"/":t.includes("\\")?"\\":"/",r=t.endsWith(o)?t.slice(0,-1):t,n=r.lastIndexOf(o);return n>=0?r.slice(n+1):r}const tt={global:{label:"Global Servers",color:"var(--color-accent-blue, #5B8DB8)"},project:{label:"Project Servers",color:"var(--color-status-planning, #9178B5)"},enterprise:{label:"Enterprise Managed",color:"var(--color-status-verifying, #C8863A)"},codex:{label:"Codex Servers",color:"var(--color-status-completed, #5A9E78)"}},de={global:{bg:"rgba(91,141,184,0.12)",text:"var(--color-accent-blue, #5B8DB8)"},project:{bg:"rgba(145,120,181,0.12)",text:"var(--color-status-planning, #9178B5)"},enterprise:{bg:"rgba(200,134,58,0.12)",text:"var(--color-status-verifying, #C8863A)"},codex:{bg:"rgba(90,158,120,0.12)",text:"var(--color-status-completed, #5A9E78)"}},xe={stdio:{bg:"rgba(91,141,184,0.08)",text:"var(--color-accent-blue, #5B8DB8)"},http:{bg:"rgba(145,120,181,0.08)",text:"var(--color-status-planning, #9178B5)"}};function rt(){const t=f(l=>l.servers),o=f(l=>l.scopeFilter),r=f(l=>l.search),n=f(l=>l.selectedServer),a=f(l=>l.setSelectedServer),i=f(l=>l.toggleServer),d=y.useMemo(()=>{let l=t;if(o!=="all"&&(l=l.filter(x=>x.scope===o)),r){const x=r.toLowerCase();l=l.filter(p=>{var s,h;return p.name.toLowerCase().includes(x)||(((s=p.command)==null?void 0:s.toLowerCase().includes(x))??!1)||(((h=p.url)==null?void 0:h.toLowerCase().includes(x))??!1)})}return l},[t,o,r]),m=y.useMemo(()=>{const l=new Map;for(const p of d){const s=l.get(p.scope)??[];s.push(p),l.set(p.scope,s)}const x=[];for(const p of["global","project","enterprise","codex"]){const s=l.get(p);if(s&&s.length>0){const h=tt[p]??{label:p,color:"var(--color-text-tertiary)"},w={scope:p,label:h.label,color:h.color,servers:s};if(p==="project"){const k=new Map;for(const S of s){const A=S.projectPath??"__unknown__",L=k.get(A)??[];L.push(S),k.set(A,L)}w.projectSubGroups=[];for(const[S,A]of k)w.projectSubGroups.push({projectPath:S,folderName:et(S),servers:A})}x.push(w)}}return x},[d]);function b(l){i(l.projectPath??"",l.name,!l.enabled)}return d.length===0?e.jsx("div",{className:"flex items-center justify-center h-full text-text-tertiary text-[length:var(--font-size-sm)]",children:"No servers found"}):e.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:m.map((l,x)=>e.jsxs(M.div,{className:"mb-5",initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.25,delay:x*.06},children:[e.jsxs("div",{className:"flex items-center gap-2 mb-[10px] pb-[6px] border-b border-border-divider",children:[e.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:l.color}}),e.jsx("span",{className:"text-[12px] font-bold text-text-primary",children:l.label}),e.jsxs("span",{className:"text-[10px] text-text-tertiary font-mono",children:[l.servers.length," server",l.servers.length!==1?"s":""]})]}),l.projectSubGroups?e.jsx("div",{className:"flex flex-col gap-[14px]",children:l.projectSubGroups.map(p=>e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-[8px] mb-[8px]",children:[e.jsx(Ae,{size:13,strokeWidth:1.8,style:{color:"var(--color-status-planning, #9178B5)",opacity:.7}}),e.jsx("span",{className:"text-[11px] font-bold text-text-secondary",title:p.projectPath,children:p.folderName}),e.jsx("span",{className:"text-[9px] font-mono text-text-tertiary opacity-60",children:p.servers.length})]}),e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-[10px]",children:p.servers.map((s,h)=>e.jsx(pe,{server:s,selected:n===s.id,isEnterprise:!1,delay:h*.04,onSelect:()=>a(n===s.id?null:s.id),onToggle:()=>b(s)},s.id))})]},p.projectPath))}):e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-[10px]",children:l.servers.map((p,s)=>e.jsx(pe,{server:p,selected:n===p.id,isEnterprise:l.scope==="enterprise",delay:s*.04,onSelect:()=>a(n===p.id?null:p.id),onToggle:()=>b(p)},p.id))})]},l.scope))})}function pe({server:t,selected:o,isEnterprise:r,delay:n,onSelect:a,onToggle:i}){var s;const d=de[t.scope]??de.global,m=xe[t.transport]??xe.stdio,b=t.command?`${t.command}${(s=t.args)!=null&&s.length?" "+t.args.join(" "):""}`:t.url??"",l=t.env?Object.keys(t.env):[],x=!t.cli.claude&&t.cli.codex,p=t.cli.claude&&!t.cli.codex;return e.jsxs(M.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.2,delay:n},onClick:a,className:["bg-bg-card border rounded-[10px] p-[14px] cursor-pointer transition-all duration-200 flex flex-col gap-2",o?"border-[var(--color-status-planning,#9178B5)] shadow-[0_0_0_2px_rgba(145,120,181,0.2)]":"border-border hover:border-text-tertiary hover:shadow-md hover:-translate-y-[2px]"].join(" "),style:r?{borderColor:"rgba(200,134,58,0.3)",background:"rgba(200,134,58,0.04)"}:void 0,children:[e.jsxs("div",{className:"flex items-center gap-[10px]",children:[e.jsx("div",{className:"w-9 h-9 rounded-[var(--radius-lg)] shrink-0 flex items-center justify-center",style:{background:t.transport==="stdio"?"rgba(91,141,184,0.08)":"rgba(145,120,181,0.08)",color:t.transport==="stdio"?"var(--color-accent-blue, #5B8DB8)":"var(--color-status-planning, #9178B5)"},children:t.transport==="stdio"?e.jsx(oe,{size:18,strokeWidth:1.8}):e.jsx(q,{size:18,strokeWidth:1.8})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-[13px] font-bold text-text-primary truncate",children:t.name}),e.jsxs("div",{className:"flex gap-[5px] mt-[3px]",children:[e.jsx("span",{className:"text-[9px] font-bold px-[7px] py-[2px] rounded-[4px] uppercase tracking-[0.03em] font-mono",style:{background:d.bg,color:d.text},children:t.scope}),e.jsx("span",{className:"text-[9px] font-semibold px-[7px] py-[2px] rounded-[4px] uppercase",style:{background:m.bg,color:m.text},children:t.transport})]})]}),e.jsxs("label",{className:"relative inline-block w-8 h-[18px] shrink-0 cursor-pointer",onClick:h=>h.stopPropagation(),children:[e.jsx("input",{type:"checkbox",checked:t.enabled,onChange:i,disabled:r,className:"sr-only"}),e.jsx("div",{className:["w-8 h-[18px] rounded-full transition-colors duration-200 relative",r?"opacity-50 cursor-default":""].join(" "),style:{background:t.enabled?"var(--color-status-completed, #5A9E78)":"var(--color-border, #E8E5DE)"},children:e.jsx("div",{className:"absolute top-[2px] left-[2px] w-[14px] h-[14px] rounded-full bg-white shadow-sm transition-transform duration-200",style:{transform:t.enabled?"translateX(14px)":"translateX(0)"}})})]})]}),b&&e.jsx("div",{className:"font-mono text-[10px] text-text-secondary bg-bg-secondary rounded-[var(--radius-md)] px-[10px] py-[6px] whitespace-nowrap overflow-hidden text-ellipsis",style:r?{background:"rgba(200,134,58,0.08)"}:void 0,children:r?"managed (read-only)":b}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("div",{className:"flex gap-1 flex-wrap flex-1 min-w-0",children:l.map(h=>e.jsx("span",{className:"text-[9px] font-mono px-[6px] py-[2px] rounded-[4px]",style:{background:"rgba(91,141,184,0.08)",color:"var(--color-accent-blue, #5B8DB8)"},children:h},h))}),e.jsxs("div",{className:"flex gap-[3px] shrink-0 items-center",children:[(p||x)&&e.jsx("button",{type:"button",onClick:h=>h.stopPropagation(),className:"flex items-center gap-[3px] px-[7px] py-[3px] rounded-[4px] border border-border bg-bg-card text-text-tertiary transition-all hover:border-[var(--color-accent-blue,#5B8DB8)] hover:text-[var(--color-accent-blue,#5B8DB8)] hover:bg-[rgba(91,141,184,0.04)]",title:p?"Copy to Codex":"Copy to Claude",children:p?e.jsxs(e.Fragment,{children:[e.jsx(Ee,{size:9,strokeWidth:2.5}),e.jsx(V,{size:11,style:{color:"var(--color-status-completed, #5A9E78)"}})]}):e.jsxs(e.Fragment,{children:[e.jsx(ze,{size:9,strokeWidth:2.5}),e.jsx(G,{size:11,style:{color:"var(--color-status-verifying, #C8863A)"}})]})}),e.jsxs("div",{className:"flex gap-[3px]",children:[e.jsx("span",{className:["w-5 h-4 rounded-[3px] flex items-center justify-center",t.cli.claude?"":"opacity-25"].join(" "),style:{background:"rgba(200,134,58,0.08)",color:"var(--color-status-verifying, #C8863A)"},title:"Claude Code",children:e.jsx(G,{size:11})}),e.jsx("span",{className:["w-5 h-4 rounded-[3px] flex items-center justify-center",t.cli.codex?"":"opacity-25"].join(" "),style:{background:"rgba(90,158,120,0.08)",color:"var(--color-status-completed, #5A9E78)"},title:"Codex CLI",children:e.jsx(V,{size:11})})]})]})]})]})}const me={database:{icon:e.jsx(Ie,{size:18,strokeWidth:1.8}),bg:"rgba(91,141,184,0.08)",color:"var(--color-accent-blue, #5B8DB8)"},search:{icon:e.jsx(ae,{size:18,strokeWidth:1.8}),bg:"rgba(145,120,181,0.08)",color:"var(--color-status-planning, #9178B5)"},code:{icon:e.jsx(Re,{size:18,strokeWidth:1.8}),bg:"rgba(90,158,120,0.08)",color:"var(--color-status-completed, #5A9E78)"},filesystem:{icon:e.jsx(De,{size:18,strokeWidth:1.8}),bg:"rgba(184,149,64,0.08)",color:"var(--color-status-idle, #B89540)"},api:{icon:e.jsx(q,{size:18,strokeWidth:1.8}),bg:"rgba(200,134,58,0.08)",color:"var(--color-status-verifying, #C8863A)"},utility:{icon:e.jsx(Ye,{size:18,strokeWidth:1.8}),bg:"rgba(160,157,151,0.08)",color:"var(--color-text-tertiary, #A09D97)"}},st={database:{bg:"rgba(91,141,184,0.12)",color:"var(--color-accent-blue, #5B8DB8)"},sql:{bg:"rgba(90,158,120,0.12)",color:"var(--color-status-completed, #5A9E78)"},search:{bg:"rgba(145,120,181,0.12)",color:"var(--color-status-planning, #9178B5)"},code:{bg:"rgba(90,158,120,0.12)",color:"var(--color-status-completed, #5A9E78)"},tools:{bg:"rgba(90,158,120,0.12)",color:"var(--color-status-completed, #5A9E78)"},filesystem:{bg:"rgba(184,149,64,0.12)",color:"var(--color-status-idle, #B89540)"},files:{bg:"rgba(184,149,64,0.12)",color:"var(--color-status-idle, #B89540)"},api:{bg:"rgba(200,134,58,0.12)",color:"var(--color-status-verifying, #C8863A)"},web:{bg:"rgba(200,134,58,0.12)",color:"var(--color-status-verifying, #C8863A)"},docs:{bg:"rgba(145,120,181,0.12)",color:"var(--color-status-planning, #9178B5)"},research:{bg:"rgba(200,134,58,0.12)",color:"var(--color-status-verifying, #C8863A)"}},ot={database:"var(--color-accent-blue, #5B8DB8)",search:"var(--color-status-planning, #9178B5)",code:"var(--color-status-completed, #5A9E78)",filesystem:"var(--color-status-idle, #B89540)",api:"var(--color-status-verifying, #C8863A)",utility:"var(--color-text-tertiary, #A09D97)"};function at(){const t=f(s=>s.templates),o=f(s=>s.categories),r=f(s=>s.servers),n=f(s=>s.templateSearch),a=f(s=>s.templateCategory),i=y.useMemo(()=>{let s=t;if(a&&(s=s.filter(h=>h.category===a)),n){const h=n.toLowerCase();s=s.filter(w=>{var k;return w.name.toLowerCase().includes(h)||(((k=w.description)==null?void 0:k.toLowerCase().includes(h))??!1)})}return s},[t,n,a]),d=f(s=>s.setTemplateSearch),m=f(s=>s.setTemplateCategory),b=f(s=>s.installTemplate),l=y.useMemo(()=>new Set(r.map(s=>s.name.toLowerCase())),[r]),x=y.useMemo(()=>{const s={};for(const h of t)h.category&&(s[h.category]=(s[h.category]??0)+1);return s},[t]),p=y.useMemo(()=>t.filter(s=>l.has(s.name.toLowerCase())).length,[t,l]);return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center gap-5 px-5 py-2 border-b border-border-divider bg-bg-primary shrink-0",children:[e.jsx(ee,{color:"var(--color-status-planning, #9178B5)",value:t.length,label:"Templates"}),e.jsx(ee,{color:"var(--color-accent-blue, #5B8DB8)",value:o.length,label:"Categories"}),e.jsx(ee,{color:"var(--color-status-completed, #5A9E78)",value:p,label:"Installed"})]}),e.jsxs("div",{className:"flex items-center gap-[10px] px-5 py-2 border-b border-border-divider shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-[6px] px-3 py-[6px] rounded-[var(--radius-lg)] bg-bg-card border border-border w-[260px] focus-within:border-[var(--color-status-planning,#9178B5)] transition-colors",children:[e.jsx(ae,{size:13,strokeWidth:2,className:"text-text-tertiary shrink-0"}),e.jsx("input",{type:"text",placeholder:"Search templates...",value:n,onChange:s=>d(s.target.value),className:"border-none bg-transparent outline-none text-[12px] text-text-primary w-full placeholder:text-text-tertiary"})]}),e.jsxs("div",{className:"flex gap-[6px]",children:[e.jsxs("button",{type:"button",onClick:()=>m(null),className:["flex items-center gap-1 px-[10px] py-1 rounded-full border text-[10px] font-semibold whitespace-nowrap transition-all cursor-pointer",a===null?"bg-text-primary text-white border-text-primary":"bg-bg-card text-text-tertiary border-border hover:border-text-tertiary hover:text-text-secondary"].join(" "),children:["All",e.jsx("span",{className:"font-mono text-[9px] opacity-60",children:t.length})]}),o.map(s=>{const h=a===s,w=ot[s.toLowerCase()];return e.jsxs("button",{type:"button",onClick:()=>m(h?null:s),className:["flex items-center gap-1 px-[10px] py-1 rounded-full border text-[10px] font-semibold whitespace-nowrap transition-all cursor-pointer",h?"bg-text-primary text-white border-text-primary":"bg-bg-card text-text-tertiary border-border hover:border-text-tertiary hover:text-text-secondary"].join(" "),children:[w&&!h&&e.jsx("span",{className:"w-[6px] h-[6px] rounded-full",style:{background:w}}),s,e.jsx("span",{className:"font-mono text-[9px] opacity-60",children:x[s]??0})]},s)})]}),e.jsx("div",{className:"flex-1"}),e.jsxs("button",{type:"button",className:"flex items-center gap-[6px] px-[14px] py-[6px] rounded-[var(--radius-lg)] border-none bg-text-primary text-white text-[11px] font-semibold cursor-pointer transition-all hover:-translate-y-px hover:shadow-md whitespace-nowrap",children:[e.jsx(se,{size:13,strokeWidth:2}),"New Template"]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:i.length===0?e.jsx("div",{className:"flex items-center justify-center h-full text-text-tertiary text-[length:var(--font-size-sm)]",children:"No templates found"}):e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(300px,1fr))] gap-3",children:i.map((s,h)=>e.jsx(nt,{template:s,installed:l.has(s.name.toLowerCase()),delay:h*.04,onInstall:()=>void b(s.name)},s.id))})})]})}function ee({color:t,value:o,label:r}){return e.jsxs("div",{className:"flex items-center gap-[6px]",children:[e.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:t}}),e.jsx("span",{className:"text-[16px] font-extrabold text-text-primary font-mono",children:o}),e.jsx("span",{className:"text-[10px] font-semibold text-text-tertiary uppercase tracking-[0.04em]",children:r})]})}function nt({template:t,installed:o,delay:r,onInstall:n}){var m,b;const a=((m=t.category)==null?void 0:m.toLowerCase())??"",i=me[a]??me.utility,d=t.serverConfig.command?`${t.serverConfig.command}${(b=t.serverConfig.args)!=null&&b.length?" "+t.serverConfig.args.join(" "):""}`:"";return e.jsxs(M.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.2,delay:r},className:"bg-bg-card border border-border rounded-[10px] p-[14px] transition-all duration-200 cursor-pointer flex flex-col gap-[10px] hover:border-text-tertiary hover:shadow-md hover:-translate-y-[2px]",children:[e.jsxs("div",{className:"flex items-start gap-[10px]",children:[e.jsx("div",{className:"w-9 h-9 rounded-[var(--radius-lg)] shrink-0 flex items-center justify-center",style:{background:i.bg,color:i.color},children:i.icon}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-[13px] font-bold text-text-primary",children:t.name}),t.description&&e.jsx("div",{className:"text-[11px] text-text-secondary leading-[1.5] mt-[2px] line-clamp-2",children:t.description})]})]}),d&&e.jsx("div",{className:"font-mono text-[10px] text-text-secondary bg-bg-secondary rounded-[var(--radius-md)] px-[10px] py-[6px] whitespace-nowrap overflow-hidden text-ellipsis",children:d}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"flex gap-1 flex-wrap",children:(t.tags??[]).map(l=>{const x=st[l.toLowerCase()]??{bg:"rgba(160,157,151,0.12)",color:"var(--color-text-tertiary)"};return e.jsx("span",{className:"text-[9px] font-semibold px-[6px] py-[2px] rounded-[4px] uppercase tracking-[0.03em]",style:{background:x.bg,color:x.color},children:l},l)})}),o?e.jsxs("span",{className:"flex items-center gap-1 px-[10px] py-1 rounded-[var(--radius-md)] border text-[10px] font-semibold whitespace-nowrap",style:{borderColor:"var(--color-status-completed, #5A9E78)",color:"var(--color-status-completed, #5A9E78)",background:"rgba(90,158,120,0.06)"},children:[e.jsx(We,{size:10,strokeWidth:2.5}),"Installed"]}):e.jsxs("button",{type:"button",onClick:l=>{l.stopPropagation(),n()},className:"flex items-center gap-1 px-[10px] py-1 rounded-[var(--radius-md)] border border-border bg-bg-card text-[10px] font-semibold text-text-secondary transition-all hover:border-[var(--color-status-completed,#5A9E78)] hover:text-[var(--color-status-completed,#5A9E78)] hover:bg-[rgba(90,158,120,0.04)] whitespace-nowrap cursor-pointer",children:[e.jsx(Te,{size:10,strokeWidth:2.5}),"Install"]})]})]})}const be={global:{bg:"rgba(91,141,184,0.12)",text:"var(--color-accent-blue, #5B8DB8)"},project:{bg:"rgba(145,120,181,0.12)",text:"var(--color-status-planning, #9178B5)"},enterprise:{bg:"rgba(200,134,58,0.12)",text:"var(--color-status-verifying, #C8863A)"},codex:{bg:"rgba(90,158,120,0.12)",text:"var(--color-status-completed, #5A9E78)"}};function lt(){const t=f(n=>n.editingServer),o=f(n=>n.setEditingServer),r=f(n=>n.updateServer);return t?e.jsx(ye,{open:!!t,onOpenChange:n=>{n||o(null)},children:e.jsxs(je,{children:[e.jsx(Ne,{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),e.jsxs(we,{className:B("fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2","w-[560px] max-w-[95vw] max-h-[85vh]","rounded-[var(--radius-lg)] border border-border bg-bg-primary shadow-lg","flex flex-col overflow-hidden","focus:outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Ce,{className:"text-[14px] font-semibold text-text-primary",children:"Edit Server"}),e.jsx(ct,{scope:t.scope})]}),e.jsx(ke,{className:B("w-7 h-7 flex items-center justify-center rounded-[var(--radius-sm)]","text-text-tertiary hover:text-text-primary hover:bg-bg-hover","transition-colors"),"aria-label":"Close",children:e.jsx(ve,{size:14,strokeWidth:2})})]}),e.jsx(it,{server:t,onSave:n=>void r(t,n),onCancel:()=>o(null)})]})]})}):null}function it({server:t,onSave:o,onCancel:r}){var W;const n=t.transport==="stdio",a=t.scope==="enterprise",[i,d]=y.useState(t.command??""),[m,b]=y.useState(((W=t.args)==null?void 0:W.join(" "))??""),[l,x]=y.useState(t.url??""),[p,s]=y.useState(()=>t.env?Object.entries(t.env).map(([g,j])=>({key:g,value:j})):[]),[h,w]=y.useState(!1),k=y.useMemo(()=>()=>{const g={...t.raw};if(n){g.command=i;const N=m.trim().split(/\s+/).filter(Boolean);N.length>0?g.args=N:delete g.args,delete g.url}else g.url=l,delete g.command,delete g.args;delete g.env;const j={};for(const N of p)N.key.trim()&&(j[N.key.trim()]=N.value);return Object.keys(j).length>0&&(g.env=j),delete g.enabled,g},[t.raw,n,i,m,l,p]);function S(){w(!0),o(k())}function A(){s(g=>[...g,{key:"",value:""}])}function L(g){s(j=>j.filter((N,c)=>c!==g))}function $(g,j,N){s(c=>c.map((C,z)=>z===g?{...C,[j]:N}:C))}return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:[e.jsx(D,{label:"Server Name",children:e.jsx("input",{type:"text",value:t.name,readOnly:!0,className:"w-full px-3 py-2 rounded-[var(--radius-md)] border border-border bg-bg-secondary text-[12px] text-text-tertiary font-mono cursor-not-allowed"})}),e.jsx(D,{label:"Transport",children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-[9px] font-bold px-[7px] py-[2px] rounded-[4px] uppercase tracking-[0.03em] font-mono",style:{background:n?"rgba(91,141,184,0.08)":"rgba(145,120,181,0.08)",color:n?"var(--color-accent-blue, #5B8DB8)":"var(--color-status-planning, #9178B5)"},children:t.transport})})}),a&&e.jsx("div",{className:"mb-4 px-3 py-2 rounded-[var(--radius-md)] border border-[var(--color-status-verifying,#C8863A)] bg-[rgba(200,134,58,0.06)] text-[11px] text-[var(--color-status-verifying,#C8863A)]",children:"Enterprise-managed servers cannot be edited from the dashboard."}),n&&e.jsx(D,{label:"Command",children:e.jsx("input",{type:"text",value:i,onChange:g=>d(g.target.value),disabled:a,placeholder:"e.g. npx",className:F})}),n&&e.jsx(D,{label:"Arguments",children:e.jsx("input",{type:"text",value:m,onChange:g=>b(g.target.value),disabled:a,placeholder:"space-separated arguments",className:F})}),!n&&e.jsx(D,{label:"URL",children:e.jsx("input",{type:"text",value:l,onChange:g=>x(g.target.value),disabled:a,placeholder:"https://...",className:F})}),e.jsx(D,{label:"Environment Variables",children:e.jsxs("div",{className:"space-y-2",children:[p.map((g,j)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"text",value:g.key,onChange:N=>$(j,"key",N.target.value),disabled:a,placeholder:"KEY",className:B(F,"w-[160px] shrink-0 font-mono text-[11px]")}),e.jsx("input",{type:"text",value:g.value,onChange:N=>$(j,"value",N.target.value),disabled:a,placeholder:"value",className:B(F,"flex-1 font-mono text-[11px]")}),!a&&e.jsx("button",{type:"button",onClick:()=>L(j),className:"shrink-0 w-6 h-6 flex items-center justify-center rounded-[var(--radius-sm)] text-text-tertiary hover:text-status-failed hover:bg-red-50 transition-colors",children:e.jsx(_e,{size:12,strokeWidth:2})})]},j)),!a&&e.jsxs("button",{type:"button",onClick:A,className:"flex items-center gap-1 px-2 py-1 text-[10px] font-semibold text-text-tertiary hover:text-text-primary transition-colors",children:[e.jsx(se,{size:11,strokeWidth:2}),"Add variable"]})]})})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 px-5 py-3 border-t border-border shrink-0",children:[e.jsx("button",{type:"button",onClick:r,className:"px-4 py-[6px] rounded-[var(--radius-md)] border border-border bg-bg-card text-[11px] font-semibold text-text-secondary hover:text-text-primary transition-colors",children:"Cancel"}),e.jsx("button",{type:"button",onClick:S,disabled:h||a,className:B("px-4 py-[6px] rounded-[var(--radius-md)] border-none bg-text-primary text-white text-[11px] font-semibold transition-all","hover:-translate-y-px hover:shadow-md",(h||a)&&"opacity-50 cursor-not-allowed hover:translate-y-0 hover:shadow-none"),children:h?"Saving...":"Save Changes"})]})]})}const F=B("w-full px-3 py-2 rounded-[var(--radius-md)] border border-border bg-bg-card","text-[12px] text-text-primary outline-none","focus:border-[var(--color-status-planning,#9178B5)] transition-colors","placeholder:text-text-tertiary","disabled:opacity-50 disabled:cursor-not-allowed");function D({label:t,children:o}){return e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.05em] text-text-tertiary mb-[6px]",children:t}),o]})}function ct({scope:t}){const o=be[t]??be.global;return e.jsx("span",{className:"text-[9px] font-bold px-[7px] py-[2px] rounded-[4px] uppercase tracking-[0.03em] font-mono",style:{background:o.bg,color:o.text},children:t})}const ue=[{id:"mode",label:"Mode"},{id:"configure",label:"Configure"},{id:"review",label:"Review"},{id:"progress",label:"Install"}];function dt({current:t}){const o=ue.findIndex(r=>r.id===t);return e.jsx("div",{className:"flex items-center gap-1 px-1",children:ue.map((r,n)=>{const a=n<o,i=n===o;return e.jsxs("div",{className:"flex items-center gap-1",children:[n>0&&e.jsx("div",{className:"w-8 h-px",style:{background:a?"var(--color-status-completed, #5A9E78)":"var(--color-border, #E8E5DE)"}}),e.jsxs("div",{className:"flex items-center gap-[6px]",children:[e.jsx("div",{className:"w-5 h-5 rounded-full flex items-center justify-center text-[9px] font-bold font-mono",style:{background:a?"var(--color-status-completed, #5A9E78)":i?"var(--color-text-primary, #1A1917)":"var(--color-bg-card, #F8F7F5)",color:a||i?"#fff":"var(--color-text-tertiary)",border:!a&&!i?"1px solid var(--color-border, #E8E5DE)":"none"},children:a?e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})}):n+1}),e.jsx("span",{className:"text-[11px] font-semibold whitespace-nowrap",style:{color:i?"var(--color-text-primary)":"var(--color-text-tertiary)"},children:r.label})]})]},r.id)})})}function xt(){const t=u(x=>x.mode),o=u(x=>x.setMode),r=u(x=>x.projectPath),n=u(x=>x.setProjectPath),a=u(x=>x.detecting),i=u(x=>x.error),d=u(x=>x.detect),m=u(x=>x.manifests),b=u(x=>x.fetchManifests);y.useEffect(()=>{b()},[b]);const l=t==="global"||t==="project"&&r.trim().length>0;return e.jsxs("div",{className:"flex flex-col gap-6 max-w-[520px] mx-auto py-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-[14px] font-semibold text-text-primary mb-1",children:"Installation Mode"}),e.jsx("p",{className:"text-[12px] text-text-tertiary",children:"Choose where to install maestro commands, agents, and workflows."})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(he,{selected:t==="global",onClick:()=>o("global"),title:"Global",description:"Install to home directory (~/.claude/, ~/.maestro/). Available across all projects.",recommended:!0}),e.jsx(he,{selected:t==="project",onClick:()=>o("project"),title:"Project",description:"Install to a specific project directory. Commands are project-scoped."})]}),t==="project"&&e.jsxs("div",{className:"flex flex-col gap-[6px]",children:[e.jsx("label",{className:"text-[11px] font-semibold text-text-secondary uppercase tracking-[0.04em]",children:"Project Path"}),e.jsx("input",{type:"text",value:r,onChange:x=>n(x.target.value),placeholder:"/path/to/your/project",className:"w-full px-3 py-2 rounded-[var(--radius-md)] border border-border bg-bg-card text-[12px] text-text-primary placeholder:text-text-tertiary focus:outline-none focus:border-[var(--color-status-planning,#9178B5)] transition-colors"})]}),m.length>0&&e.jsxs("div",{className:"rounded-[var(--radius-md)] border border-border bg-[rgba(184,149,64,0.04)] px-4 py-3",children:[e.jsx("p",{className:"text-[11px] font-semibold text-[var(--color-status-executing,#B89540)] mb-1",children:"Existing installations found"}),e.jsx("div",{className:"flex flex-col gap-1",children:m.slice(0,3).map(x=>e.jsxs("p",{className:"text-[10px] text-text-tertiary font-mono",children:[x.scope," — v",x.version," — ",new Date(x.installedAt).toLocaleDateString()]},x.id))})]}),i&&e.jsx("div",{className:"rounded-[var(--radius-md)] border border-[rgba(196,101,85,0.3)] bg-[rgba(196,101,85,0.04)] px-4 py-3",children:e.jsx("p",{className:"text-[11px] text-status-failed",children:i})}),e.jsx("div",{className:"flex justify-end pt-2",children:e.jsx("button",{type:"button",disabled:!l||a,onClick:()=>void d(),className:"flex items-center gap-[6px] px-5 py-[8px] rounded-[var(--radius-lg)] border-none bg-text-primary text-white text-[12px] font-semibold cursor-pointer transition-all hover:-translate-y-px hover:shadow-md disabled:opacity-40 disabled:cursor-default disabled:transform-none",children:a?e.jsxs(e.Fragment,{children:[e.jsx(pt,{}),"Scanning..."]}):"Next"})})]})}function he({selected:t,onClick:o,title:r,description:n,recommended:a}){return e.jsxs("button",{type:"button",onClick:o,className:"flex items-start gap-3 p-4 rounded-[var(--radius-lg)] border text-left transition-all cursor-pointer w-full",style:{borderColor:t?"var(--color-text-primary, #1A1917)":"var(--color-border, #E8E5DE)",background:t?"rgba(26,25,23,0.02)":"var(--color-bg-card, #F8F7F5)"},children:[e.jsx("div",{className:"w-[18px] h-[18px] rounded-full border-2 flex items-center justify-center shrink-0 mt-[1px]",style:{borderColor:t?"var(--color-text-primary, #1A1917)":"var(--color-border, #E8E5DE)"},children:t&&e.jsx("div",{className:"w-[10px] h-[10px] rounded-full",style:{background:"var(--color-text-primary, #1A1917)"}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-text-primary",children:r}),a&&e.jsx("span",{className:"text-[8px] font-bold px-[6px] py-[1px] rounded-full bg-[rgba(90,158,120,0.1)] text-[var(--color-status-completed,#5A9E78)] uppercase tracking-wider",children:"Recommended"})]}),e.jsx("p",{className:"text-[11px] text-text-tertiary mt-[2px] leading-[1.4]",children:n})]})]})}function pt(){return e.jsxs("svg",{className:"animate-spin w-[14px] h-[14px]",viewBox:"0 0 24 24",fill:"none",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",opacity:"0.3"}),e.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]})}function mt(){const t=u(s=>s.detection),o=u(s=>s.selectedComponents),r=u(s=>s.toggleComponent),n=u(s=>s.selectAllComponents),a=u(s=>s.backup),i=u(s=>s.setBackup),d=u(s=>s.mcpEnabled),m=u(s=>s.setMcpEnabled),b=u(s=>s.enabledTools),l=u(s=>s.toggleTool),x=u(s=>s.setStep);if(!t)return null;const p=t.components.filter(s=>s.available).every(s=>o.has(s.id));return e.jsxs("div",{className:"flex flex-col gap-5 max-w-[560px] mx-auto py-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h3",{className:"text-[13px] font-semibold text-text-primary",children:"Components"}),e.jsx("button",{type:"button",onClick:n,className:"text-[10px] font-semibold text-text-tertiary hover:text-text-primary transition-colors cursor-pointer",children:p?"All selected":"Select all"})]}),e.jsxs("div",{className:"flex flex-col gap-[6px]",children:[t.components.map(s=>e.jsxs("label",{className:"flex items-center gap-3 px-3 py-[10px] rounded-[var(--radius-md)] border border-border bg-bg-card cursor-pointer hover:bg-bg-hover transition-colors",style:{opacity:s.available?1:.4,pointerEvents:s.available?"auto":"none"},children:[e.jsx("input",{type:"checkbox",checked:o.has(s.id),onChange:()=>r(s.id),disabled:!s.available,className:"w-[14px] h-[14px] accent-[var(--color-text-primary,#1A1917)] cursor-pointer"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("span",{className:"text-[12px] font-semibold text-text-primary",children:s.label}),e.jsxs("span",{className:"text-[10px] text-text-tertiary ml-2 font-mono",children:[s.fileCount," files"]})]}),e.jsx("span",{className:"text-[9px] text-text-tertiary font-mono max-w-[200px] truncate",title:s.targetDir,children:s.targetDir.replace(/\\/g,"/").replace(/^.*\/\./,"~/.")})]},s.id)),e.jsxs("label",{className:"flex items-center gap-3 px-3 py-[10px] rounded-[var(--radius-md)] border border-border bg-bg-card cursor-pointer hover:bg-bg-hover transition-colors",children:[e.jsx("input",{type:"checkbox",checked:o.has("mcp"),onChange:()=>r("mcp"),className:"w-[14px] h-[14px] accent-[var(--color-text-primary,#1A1917)] cursor-pointer"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("span",{className:"text-[12px] font-semibold text-text-primary",children:"MCP Server"}),e.jsx("span",{className:"text-[10px] text-text-tertiary ml-2",children:"Register maestro-tools MCP"})]})]})]})]}),t.existingManifest&&e.jsxs("div",{className:"rounded-[var(--radius-md)] border border-[rgba(184,149,64,0.3)] bg-[rgba(184,149,64,0.04)] px-4 py-3",children:[e.jsxs("p",{className:"text-[11px] font-semibold text-[var(--color-status-executing,#B89540)] mb-2",children:["Existing installation (v",t.existingManifest.version,") will be overwritten"]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:a,onChange:s=>i(s.target.checked),className:"w-[14px] h-[14px] accent-[var(--color-status-executing,#B89540)] cursor-pointer"}),e.jsx("span",{className:"text-[11px] text-text-secondary",children:"Create backup before installing"})]})]}),o.has("mcp")&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("h3",{className:"text-[13px] font-semibold text-text-primary",children:"MCP Tools"}),e.jsxs("label",{className:"flex items-center gap-[6px] cursor-pointer ml-auto",children:[e.jsx("input",{type:"checkbox",checked:d,onChange:s=>m(s.target.checked),className:"w-[13px] h-[13px] accent-[var(--color-text-primary,#1A1917)] cursor-pointer"}),e.jsx("span",{className:"text-[10px] text-text-secondary font-semibold",children:"Enable MCP"})]})]}),d&&e.jsx("div",{className:"flex flex-wrap gap-[6px]",children:re.map(s=>e.jsx("button",{type:"button",onClick:()=>l(s),className:"px-[10px] py-[5px] rounded-full border text-[10px] font-mono font-semibold transition-all cursor-pointer",style:{borderColor:b.has(s)?"var(--color-text-primary)":"var(--color-border)",background:b.has(s)?"var(--color-text-primary)":"var(--color-bg-card)",color:b.has(s)?"#fff":"var(--color-text-tertiary)"},children:s},s))})]}),t.disabledItems.length>0&&e.jsxs("div",{className:"rounded-[var(--radius-md)] border border-border bg-bg-card px-4 py-3",children:[e.jsxs("p",{className:"text-[11px] font-semibold text-text-secondary mb-1",children:[t.disabledItems.length," disabled item(s) will be preserved"]}),e.jsx("div",{className:"flex flex-wrap gap-1",children:t.disabledItems.map(s=>e.jsxs("span",{className:"text-[9px] font-mono text-text-tertiary px-[6px] py-[2px] rounded bg-bg-secondary",children:[s.name," (",s.type,")"]},s.relativePath))})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2",children:[e.jsx("button",{type:"button",onClick:()=>x("mode"),className:"px-4 py-[7px] rounded-[var(--radius-lg)] border border-border bg-bg-card text-[12px] font-semibold text-text-secondary hover:text-text-primary hover:border-text-tertiary transition-all cursor-pointer",children:"Back"}),e.jsx("button",{type:"button",onClick:()=>x("review"),disabled:o.size===0,className:"px-5 py-[8px] rounded-[var(--radius-lg)] border-none bg-text-primary text-white text-[12px] font-semibold cursor-pointer transition-all hover:-translate-y-px hover:shadow-md disabled:opacity-40 disabled:cursor-default disabled:transform-none",children:"Review"})]})]})}function bt(){const t=u(s=>s.mode),o=u(s=>s.projectPath),r=u(s=>s.detection),n=u(s=>s.selectedComponents),a=u(s=>s.backup),i=u(s=>s.mcpEnabled),d=u(s=>s.enabledTools),m=u(s=>s.setStep),b=u(s=>s.install);if(!r)return null;const l=r.components.filter(s=>s.available&&n.has(s.id)),x=l.reduce((s,h)=>s+h.fileCount,0),p=n.has("mcp");return e.jsxs("div",{className:"flex flex-col gap-5 max-w-[560px] mx-auto py-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-[14px] font-semibold text-text-primary mb-1",children:"Review Installation"}),e.jsx("p",{className:"text-[12px] text-text-tertiary",children:"Confirm the following will be installed."})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx(X,{label:"Mode",value:t}),e.jsx(X,{label:"Components",value:String(l.length+(p?1:0))}),e.jsx(X,{label:"Files",value:String(x)}),e.jsx(X,{label:"Backup",value:a&&r.existingManifest?"Yes":"No"})]}),t==="project"&&o&&e.jsxs("div",{className:"flex gap-2 items-center text-[11px]",children:[e.jsx("span",{className:"font-semibold text-text-secondary",children:"Project:"}),e.jsx("span",{className:"font-mono text-text-tertiary",children:o})]}),e.jsx("div",{className:"rounded-[var(--radius-md)] border border-border overflow-hidden",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left text-[9px] font-semibold uppercase tracking-[0.05em] text-text-tertiary px-3 py-[6px] bg-bg-secondary border-b border-border",children:"Component"}),e.jsx("th",{className:"text-left text-[9px] font-semibold uppercase tracking-[0.05em] text-text-tertiary px-3 py-[6px] bg-bg-secondary border-b border-border",children:"Target"}),e.jsx("th",{className:"text-right text-[9px] font-semibold uppercase tracking-[0.05em] text-text-tertiary px-3 py-[6px] bg-bg-secondary border-b border-border w-[60px]",children:"Files"})]})}),e.jsxs("tbody",{children:[l.map(s=>e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2 border-b border-border-divider text-[11px] font-semibold text-text-primary",children:s.label}),e.jsx("td",{className:"px-3 py-2 border-b border-border-divider text-[10px] font-mono text-text-tertiary max-w-[250px] truncate",title:s.targetDir,children:s.targetDir.replace(/\\/g,"/").replace(/^.*\/\./,"~/.")}),e.jsx("td",{className:"px-3 py-2 border-b border-border-divider text-[11px] font-mono text-text-secondary text-right",children:s.fileCount})]},s.id)),p&&e.jsxs("tr",{children:[e.jsx("td",{className:"px-3 py-2 border-b border-border-divider text-[11px] font-semibold text-text-primary",children:"MCP Server"}),e.jsx("td",{className:"px-3 py-2 border-b border-border-divider text-[10px] font-mono text-text-tertiary",children:t==="project"?".mcp.json":"~/.claude.json"}),e.jsx("td",{className:"px-3 py-2 border-b border-border-divider text-[11px] font-mono text-text-secondary text-right",children:"—"})]})]})]})}),p&&i&&e.jsxs("div",{className:"rounded-[var(--radius-md)] border border-border bg-bg-card px-4 py-3",children:[e.jsx("p",{className:"text-[10px] font-semibold text-text-secondary uppercase tracking-[0.04em] mb-1",children:"MCP Tools"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:Array.from(d).map(s=>e.jsx("span",{className:"text-[9px] font-mono font-semibold px-[7px] py-[2px] rounded-full bg-[rgba(90,158,120,0.08)] text-[var(--color-status-completed,#5A9E78)]",children:s},s))})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2",children:[e.jsx("button",{type:"button",onClick:()=>m("configure"),className:"px-4 py-[7px] rounded-[var(--radius-lg)] border border-border bg-bg-card text-[12px] font-semibold text-text-secondary hover:text-text-primary hover:border-text-tertiary transition-all cursor-pointer",children:"Back"}),e.jsx("button",{type:"button",onClick:()=>void b(),className:"px-5 py-[8px] rounded-[var(--radius-lg)] border-none bg-[var(--color-status-completed,#5A9E78)] text-white text-[12px] font-semibold cursor-pointer transition-all hover:-translate-y-px hover:shadow-md",children:"Install"})]})]})}function X({label:t,value:o}){return e.jsxs("div",{className:"flex-1 rounded-[var(--radius-md)] border border-border bg-bg-card px-3 py-2 text-center",children:[e.jsx("div",{className:"text-[14px] font-extrabold text-text-primary font-mono capitalize",children:o}),e.jsx("div",{className:"text-[9px] font-semibold text-text-tertiary uppercase tracking-[0.04em]",children:t})]})}function ut(){const t=u(a=>a.installing),o=u(a=>a.result),r=u(a=>a.setOpen),n=u(a=>a.reset);return t?e.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-16",children:[e.jsxs("svg",{className:"animate-spin w-8 h-8 text-text-primary",viewBox:"0 0 24 24",fill:"none",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",opacity:"0.15"}),e.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})]}),e.jsx("p",{className:"text-[13px] font-semibold text-text-primary",children:"Installing..."}),e.jsx("p",{className:"text-[11px] text-text-tertiary",children:"Copying files and registering configuration"})]}):o?o.success?e.jsxs("div",{className:"flex flex-col items-center gap-5 py-10 max-w-[440px] mx-auto",children:[e.jsx("div",{className:"w-12 h-12 rounded-full flex items-center justify-center",style:{background:"rgba(90,158,120,0.1)"},children:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--color-status-completed, #5A9E78)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})}),e.jsxs("div",{className:"text-center",children:[e.jsx("h3",{className:"text-[14px] font-semibold text-text-primary mb-1",children:"Installation Complete"}),e.jsx("p",{className:"text-[11px] text-text-tertiary",children:"All components installed successfully."})]}),e.jsxs("div",{className:"w-full rounded-[var(--radius-md)] border border-border bg-bg-card overflow-hidden",children:[e.jsx(I,{label:"Files installed",value:String(o.filesInstalled)}),e.jsx(I,{label:"Directories created",value:String(o.dirsCreated)}),e.jsx(I,{label:"Components",value:o.components.join(", ")}),o.disabledItemsRestored>0&&e.jsx(I,{label:"Disabled items restored",value:String(o.disabledItemsRestored)}),e.jsx(I,{label:"MCP registered",value:o.mcpRegistered?"Yes":"No"}),e.jsx(I,{label:"Manifest",value:o.manifestPath.replace(/\\/g,"/").split("/").slice(-1)[0],last:!0})]}),e.jsx("button",{type:"button",onClick:()=>r(!1),className:"px-5 py-[8px] rounded-[var(--radius-lg)] border-none bg-text-primary text-white text-[12px] font-semibold cursor-pointer transition-all hover:-translate-y-px hover:shadow-md",children:"Done"})]}):e.jsxs("div",{className:"flex flex-col items-center gap-5 py-10 max-w-[440px] mx-auto",children:[e.jsx("div",{className:"w-12 h-12 rounded-full flex items-center justify-center",style:{background:"rgba(196,101,85,0.1)"},children:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--color-status-failed, #C46555)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),e.jsxs("div",{className:"text-center",children:[e.jsx("h3",{className:"text-[14px] font-semibold text-text-primary mb-1",children:"Installation Failed"}),e.jsx("p",{className:"text-[11px] text-status-failed",children:o.error})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{type:"button",onClick:n,className:"px-4 py-[7px] rounded-[var(--radius-lg)] border border-border bg-bg-card text-[12px] font-semibold text-text-secondary hover:text-text-primary transition-all cursor-pointer",children:"Try Again"}),e.jsx("button",{type:"button",onClick:()=>r(!1),className:"px-4 py-[7px] rounded-[var(--radius-lg)] border-none bg-text-primary text-white text-[12px] font-semibold cursor-pointer transition-all",children:"Close"})]})]}):null}function I({label:t,value:o,last:r}){return e.jsxs("div",{className:"flex items-center justify-between px-4 py-[8px]",style:{borderBottom:r?"none":"1px solid var(--color-border-divider)"},children:[e.jsx("span",{className:"text-[10px] font-semibold text-text-tertiary uppercase tracking-[0.04em]",children:t}),e.jsx("span",{className:"text-[11px] font-mono text-text-primary",children:o})]})}function ht(){const t=u(a=>a.open),o=u(a=>a.setOpen),r=u(a=>a.step),n=u(a=>a.installing);return e.jsx(ye,{open:t,onOpenChange:a=>{!a&&n||o(a)},children:e.jsxs(je,{children:[e.jsx(Ne,{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),e.jsxs(we,{className:B("fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2","w-[640px] max-w-[95vw] max-h-[85vh]","rounded-[var(--radius-lg)] border border-border bg-bg-primary shadow-lg","flex flex-col overflow-hidden","focus:outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(Ce,{className:"text-[14px] font-semibold text-text-primary",children:"Install Wizard"}),e.jsx(dt,{current:r})]}),!n&&e.jsx(ke,{className:B("w-7 h-7 flex items-center justify-center rounded-[var(--radius-sm)]","text-text-tertiary hover:text-text-primary hover:bg-bg-hover","transition-colors"),"aria-label":"Close",children:e.jsxs("svg",{className:"w-[14px] h-[14px]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-5",children:[r==="mode"&&e.jsx(xt,{}),r==="configure"&&e.jsx(mt,{}),r==="review"&&e.jsx(bt,{}),r==="progress"&&e.jsx(ut,{})]})]})]})})}const ft=[{label:"List",icon:e.jsx(Oe,{size:14,strokeWidth:1.8}),shortcut:"1"},{label:"Cards",icon:e.jsx(Le,{size:14,strokeWidth:1.8}),shortcut:"2"},{label:"Templates",icon:e.jsx($e,{size:14,strokeWidth:1.8}),shortcut:"3"}],fe=["list","cards","templates"],te={initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8}};function zt(){const t=f(l=>l.activeView),o=f(l=>l.setActiveView),r=f(l=>l.fetchConfig),n=f(l=>l.fetchTemplates),a=f(l=>l.loading),i=f(l=>l.error),{register:d,unregister:m}=y.useContext(Me),b=y.useCallback(l=>o(fe[l]),[o]);return y.useEffect(()=>{d({items:ft.map(l=>({label:l.label,icon:l.icon,shortcut:l.shortcut})),activeIndex:fe.indexOf(t),onSwitch:b})},[t,d,b]),y.useEffect(()=>()=>m(),[m]),y.useEffect(()=>{function l(x){x.target instanceof HTMLInputElement||x.target instanceof HTMLTextAreaElement||(x.key==="1"?o("list"):x.key==="2"?o("cards"):x.key==="3"&&o("templates"))}return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[o]),y.useEffect(()=>{r(),n()},[r,n]),a?e.jsx("div",{className:"flex items-center justify-center h-full text-text-secondary text-[length:var(--font-size-sm)]",children:"Loading MCP configuration..."}):i?e.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3",children:[e.jsx("span",{className:"text-status-failed text-[length:var(--font-size-sm)]",children:"Failed to load MCP config"}),e.jsx("span",{className:"text-text-tertiary text-[length:var(--font-size-xs)]",children:i}),e.jsx("button",{type:"button",onClick:()=>void r(),className:"px-3 py-1 rounded-[var(--radius-md)] text-[11px] font-semibold text-text-secondary hover:text-text-primary transition-all",style:{border:"var(--style-btn-secondary-border)",background:"var(--style-btn-secondary-bg)"},children:"Retry"})]}):e.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[e.jsx(ht,{}),e.jsx(lt,{}),e.jsxs(Be,{mode:"wait",children:[t==="list"&&e.jsx(M.div,{className:"flex-1 flex flex-col overflow-hidden",variants:te,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.25,ease:[.34,1.56,.64,1]},children:e.jsx(Qe,{})},"list"),t==="cards"&&e.jsx(M.div,{className:"flex-1 flex flex-col overflow-hidden",variants:te,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.25,ease:[.34,1.56,.64,1]},children:e.jsx(rt,{})},"cards"),t==="templates"&&e.jsx(M.div,{className:"flex-1 flex flex-col overflow-hidden",variants:te,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.25,ease:[.34,1.56,.64,1]},children:e.jsx(at,{})},"templates")]})]})}export{zt as McpPage};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{d as Q,r as c,j as e,p as re,aa as ae,M as ne,ac as g,X as P,ad as Y,a3 as q,F as R,k as U,s as ie,V as oe,n as le}from"./index-C2Mcb4TJ.js";import{L as ce}from"./list-DI8Wn2aT.js";import{S as de}from"./search-BS6fI6Bg.js";import{C as xe}from"./chevron-right-C7bVDreZ.js";import{T as pe}from"./trash-2-Czz4X8Fb.js";import{A as J,L as me}from"./loader-B5F6PzFT.js";import{u as ue,f as he,L as H,m as L}from"./proxy-D72Y8a4Y.js";import{A as O}from"./index-JTmGteaT.js";/**
|
|
2
|
-
* @license lucide-react v0.577.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const fe=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],be=Q("send",fe);/**
|
|
7
|
-
* @license lucide-react v0.577.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const ge=[["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"}]],W=Q("users",ge),ye=t=>!t.isLayoutDirty&&t.willUpdate(!1);function G(){const t=new Set,s=new WeakMap,r=()=>t.forEach(ye);return{add:i=>{t.add(i),s.set(i,i.addEventListener("willUpdate",r))},remove:i=>{t.delete(i);const a=s.get(i);a&&(a(),s.delete(i)),r()},dirty:r}}const ve=c.createContext(null);function je(){const t=c.useRef(!1);return ue(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Ne(){const t=je(),[s,r]=c.useState(0),i=c.useCallback(()=>{t.current&&r(s+1)},[s]);return[c.useCallback(()=>he.postRender(i),[i]),s]}const Z=t=>t===!0,we=t=>Z(t===!0)||t==="id",ke=({children:t,id:s,inherit:r=!0})=>{const i=c.useContext(H),a=c.useContext(ve),[f,h]=Ne(),x=c.useRef(null),m=i.id||a;x.current===null&&(we(r)&&m&&(s=s?m+"-"+s:m),x.current={id:s,group:Z(r)&&i.group||G()});const u=c.useMemo(()=>({...x.current,forceRender:f}),[h]);return e.jsx(H.Provider,{value:u,children:t})},I={active:"#B89540",completed:"#5A9E78",failed:"#C46555",archived:"#A09D97"},T={done:"#5A9E78",in_progress:"#B89540",pending:"#A09D97",skipped:"#D1CEC8"},Se={done:"#5A9E78",active:"#B89540",pending:"#A09D97",injected:"#8B6BBF"},ee={idle:"#A09D97",active:"#4A90D9",busy:"#B89540",error:"#C46555",offline:"#6B6860"},Ce={Coordinate:"#4A90D9",Lifecycle:"#8B6BBF",QA:"#3D9B6F",Review:"#D4832E",Testing:"#3BA0B5","Frontend Debug":"#D05454","Perf Opt":"#C99B2D","Tech Debt":"#A09D97","Plan & Execute":"#4A90D9",Brainstorm:"#8B6BBF","Roadmap Dev":"#3D9B6F",Issue:"#D05454","Iter Dev":"#D4832E","Ultra Analyze":"#C99B2D","UX Improve":"#3BA0B5","UI Design":"#8B6BBF","Arch Opt":"#4A90D9",Team:"#A09D97"},Ae={Coordinate:"TC",Lifecycle:"LV",QA:"QA",Review:"RV",Testing:"TST","Frontend Debug":"FD","Perf Opt":"PO","Tech Debt":"TD","Plan & Execute":"PX",Brainstorm:"BS","Roadmap Dev":"RD",Issue:"IS","Iter Dev":"ID","Ultra Analyze":"UA","UX Improve":"UX","UI Design":"UI","Arch Opt":"AO",Team:"TM"},X=["#4A90D9","#8B6BBF","#C99B2D","#D05454","#3D9B6F","#D4832E","#3BA0B5"];function De({status:t}){const s=I[t];return e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[10px] font-semibold",style:{background:`${s}18`,color:s},children:[t==="active"&&e.jsxs("span",{className:"relative flex w-1.5 h-1.5",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:s}}),e.jsx("span",{className:"relative inline-flex rounded-full w-1.5 h-1.5",style:{backgroundColor:s}})]}),t.charAt(0).toUpperCase()+t.slice(1)]})}function Be({session:t,onClick:s,onDelete:r}){const i=Ce[t.skill]??"#A09D97",a=Ae[t.skill]??"TM";return e.jsxs("button",{type:"button",onClick:s,className:"group w-full text-left bg-bg-card border border-border rounded-xl p-3.5 hover:border-accent-blue hover:shadow-[0_2px_12px_rgba(0,0,0,0.06)] transition-all duration-150 cursor-pointer",children:[e.jsxs("div",{className:"flex items-center gap-2.5 mb-2",children:[e.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center text-[11px] font-bold text-white shrink-0",style:{backgroundColor:i},children:a}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-[13px] font-semibold text-text-primary truncate",children:t.title}),e.jsx("div",{className:"text-[10px] font-mono text-text-placeholder truncate",children:t.sessionId})]}),e.jsx(De,{status:t.status}),r&&e.jsx("button",{type:"button",onClick:f=>{f.stopPropagation(),r(t.sessionId)},className:"w-6 h-6 rounded-md flex items-center justify-center text-text-placeholder opacity-0 group-hover:opacity-100 hover:!text-status-failed hover:bg-[rgba(196,101,85,0.1)] transition-all shrink-0",title:"Delete session",children:e.jsx(pe,{size:13,strokeWidth:2})})]}),t.description&&e.jsx("p",{className:"text-[11px] text-text-secondary leading-relaxed mb-2.5 line-clamp-2",children:t.description}),t.pipelineStages.length>0&&e.jsx("div",{className:"flex gap-1 mb-2.5",children:t.pipelineStages.map(f=>e.jsx("div",{className:"w-2 h-2 rounded-full",title:`${f.name}: ${f.status}`,style:{backgroundColor:T[f.status]}},f.id))}),e.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-text-tertiary mb-2.5",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(re,{size:11,strokeWidth:2}),t.taskProgress.completed,"/",t.taskProgress.total," tasks"]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(ae,{size:11,strokeWidth:2}),t.duration||"--"]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(ne,{size:11,strokeWidth:2}),t.messageCount," msgs"]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 pt-2 border-t border-border-divider",children:[e.jsxs("div",{className:"flex gap-0.5",children:[t.roles.slice(0,4).map((f,h)=>e.jsx("div",{className:"w-[18px] h-[18px] rounded-[5px] flex items-center justify-center text-[8px] font-bold text-white",title:f,style:{backgroundColor:X[h%X.length]},children:f.charAt(0).toUpperCase()},f)),t.roles.length>4&&e.jsxs("div",{className:"w-[18px] h-[18px] rounded-[5px] flex items-center justify-center text-[8px] font-semibold text-text-tertiary bg-bg-hover",children:["+",t.roles.length-4]})]}),e.jsx("div",{className:"flex-1"}),e.jsx(xe,{size:14,className:"text-text-placeholder group-hover:text-accent-blue transition-colors"})]})]})}const Le=["all","active","completed","failed","archived"];function Ee({viewMode:t}){const s=g(n=>n.sessions),r=g(n=>n.filteredSessions),i=g(n=>n.statusFilter),a=g(n=>n.skillFilter),f=g(n=>n.searchQuery),h=g(n=>n.setStatusFilter),x=g(n=>n.setSkillFilter),m=g(n=>n.setSearchQuery),u=g(n=>n.fetchSessionDetail),o=g(n=>n.deleteSession),b=r(),w=c.useMemo(()=>{const n=s.filter(C=>C.status==="active").length,p=s.filter(C=>C.status==="completed").length,j=s.reduce((C,E)=>C+E.roles.length,0);return{total:s.length,active:n,completed:p,totalRoles:j}},[s]),k=c.useMemo(()=>{const n=new Set(s.map(p=>p.skill));return Array.from(n).sort()},[s]);return e.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-3 px-5 py-2.5 border-b border-border shrink-0",children:[e.jsx("span",{className:"text-[14px] font-semibold text-text-primary",children:"Sessions"}),e.jsx("span",{className:"text-[11px] font-medium text-text-tertiary bg-bg-hover px-1.5 py-0.5 rounded-full",children:b.length}),e.jsxs("div",{className:"relative ml-2",children:[e.jsx(de,{size:13,className:"absolute left-2 top-1/2 -translate-y-1/2 text-text-placeholder"}),e.jsx("input",{type:"text",placeholder:"Search sessions...",value:f,onChange:n=>m(n.target.value),className:"pl-7 pr-2.5 py-1 rounded-lg border border-border bg-bg-secondary text-[12px] text-text-primary placeholder:text-text-placeholder w-48 focus:outline-none focus:border-accent-blue transition-colors"})]}),e.jsx("div",{className:"flex-1"}),e.jsx("div",{className:"flex gap-1",children:Le.map(n=>e.jsx("button",{type:"button",onClick:()=>h(n),className:["px-2 py-0.5 rounded-full text-[10px] font-semibold transition-all",i===n?"bg-text-primary text-white":"text-text-tertiary hover:text-text-primary hover:bg-bg-hover"].join(" "),children:n==="all"?"All":n.charAt(0).toUpperCase()+n.slice(1)},n))}),k.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-px h-4 bg-border-divider"}),e.jsx("div",{className:"flex gap-1",children:k.map(n=>e.jsx("button",{type:"button",onClick:()=>x(a===n?null:n),className:["px-2 py-0.5 rounded-full text-[10px] font-semibold transition-all",a===n?"bg-accent-blue text-white":"text-text-tertiary hover:text-text-primary hover:bg-bg-hover"].join(" "),children:n},n))})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-5",children:[e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(F,{label:"Total Sessions",value:w.total,sub:`across ${k.length} skill types`}),e.jsx(F,{label:"Active",value:w.active,color:I.active,sub:"running now"}),e.jsx(F,{label:"Completed",value:w.completed,color:I.completed,sub:"finished"}),e.jsx(F,{label:"Total Roles",value:w.totalRoles,sub:`avg ${w.total?(w.totalRoles/w.total).toFixed(1):0} per session`})]}),b.length===0&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-text-tertiary",children:[e.jsx("span",{className:"text-[14px] font-medium mb-1",children:"No sessions found"}),e.jsx("span",{className:"text-[12px]",children:s.length===0?"Run a team skill to see sessions here":"Try adjusting your filters"})]}),t==="cards"&&b.length>0&&e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-3",children:b.map(n=>e.jsx(Be,{session:n,onClick:()=>void u(n.sessionId),onDelete:p=>void o(p)},n.sessionId))}),t==="table"&&b.length>0&&e.jsx(Te,{sessions:b,onSelect:n=>void u(n)})]})]})}function F({label:t,value:s,color:r,sub:i}){return e.jsxs("div",{className:"bg-bg-card rounded-xl border border-border px-4 py-3",children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-0.5",children:t}),e.jsx("div",{className:"text-[22px] font-bold",style:{color:r??"var(--color-text-primary)"},children:s}),e.jsx("div",{className:"text-[11px] text-text-tertiary mt-0.5",children:i})]})}const V=["#4A90D9","#8B6BBF","#C99B2D","#D05454","#3D9B6F","#D4832E","#3BA0B5"];function Te({sessions:t,onSelect:s}){return e.jsx("div",{className:"bg-bg-card rounded-xl border border-border overflow-hidden",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left px-3.5 py-2.5 text-[10px] font-semibold uppercase tracking-widest text-text-tertiary bg-bg-secondary border-b border-border sticky top-0 z-[5]",children:"Session"}),e.jsx("th",{className:"text-left px-3.5 py-2.5 text-[10px] font-semibold uppercase tracking-widest text-text-tertiary bg-bg-secondary border-b border-border sticky top-0 z-[5]",children:"Status"}),e.jsx("th",{className:"text-left px-3.5 py-2.5 text-[10px] font-semibold uppercase tracking-widest text-text-tertiary bg-bg-secondary border-b border-border sticky top-0 z-[5]",children:"Progress"}),e.jsx("th",{className:"text-left px-3.5 py-2.5 text-[10px] font-semibold uppercase tracking-widest text-text-tertiary bg-bg-secondary border-b border-border sticky top-0 z-[5]",children:"Roles"}),e.jsx("th",{className:"text-left px-3.5 py-2.5 text-[10px] font-semibold uppercase tracking-widest text-text-tertiary bg-bg-secondary border-b border-border sticky top-0 z-[5]",children:"Duration"}),e.jsx("th",{className:"w-8 bg-bg-secondary border-b border-border sticky top-0 z-[5]"})]})}),e.jsx("tbody",{children:t.map(r=>{const i=r.taskProgress.total?Math.round(r.taskProgress.completed/r.taskProgress.total*100):0,a=I[r.status];return e.jsxs("tr",{onClick:()=>s(r.sessionId),className:"cursor-pointer hover:bg-bg-hover transition-colors group",children:[e.jsx("td",{className:"px-3.5 py-2.5 border-b border-border-divider",children:e.jsx("div",{className:"flex items-center gap-2.5 min-w-[240px]",children:e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-[13px] font-semibold text-text-primary truncate",children:r.title}),e.jsx("div",{className:"text-[10px] font-mono text-text-placeholder",children:r.sessionId})]})})}),e.jsx("td",{className:"px-3.5 py-2.5 border-b border-border-divider",children:e.jsx("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[10px] font-semibold",style:{background:`${a}18`,color:a},children:r.status})}),e.jsx("td",{className:"px-3.5 py-2.5 border-b border-border-divider",children:e.jsxs("div",{className:"flex items-center gap-2 min-w-[120px]",children:[e.jsx("div",{className:"flex-1 h-[5px] bg-bg-hover rounded-full overflow-hidden min-w-[60px]",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${i}%`,backgroundColor:a}})}),e.jsxs("span",{className:"text-[11px] font-semibold text-text-tertiary whitespace-nowrap min-w-[36px]",children:[r.taskProgress.completed,"/",r.taskProgress.total]})]})}),e.jsx("td",{className:"px-3.5 py-2.5 border-b border-border-divider",children:e.jsx("div",{className:"flex gap-0.5",children:r.roles.slice(0,5).map((f,h)=>e.jsx("div",{className:"w-[18px] h-[18px] rounded-[5px] flex items-center justify-center text-[8px] font-bold text-white",title:f,style:{backgroundColor:V[h%V.length]},children:f.charAt(0).toUpperCase()},f))})}),e.jsx("td",{className:"px-3.5 py-2.5 border-b border-border-divider",children:e.jsx("span",{className:"font-mono text-[11px] text-text-tertiary whitespace-nowrap",children:r.duration||"--"})}),e.jsx("td",{className:"px-3.5 py-2.5 border-b border-border-divider text-center",children:e.jsx("span",{className:"text-[14px] text-text-placeholder group-hover:text-accent-blue transition-colors",children:"→"})})]},r.sessionId)})})]})})}function te({session:t,open:s,onClose:r}){const i=c.useCallback(a=>{a.target===a.currentTarget&&r()},[r]);return e.jsx(e.Fragment,{children:e.jsx("div",{className:["absolute inset-0 z-40 bg-black/[.18] backdrop-blur-[2px] transition-opacity duration-200",s?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"].join(" "),onClick:i,children:e.jsxs("div",{className:["absolute top-0 left-0 right-0 z-50 bg-bg-card border-b border-border","rounded-b-[14px] shadow-[0_12px_40px_rgba(0,0,0,0.12)]","transition-transform duration-[280ms] ease-[cubic-bezier(0.34,1.56,0.64,1)]","max-h-[68vh] overflow-hidden flex flex-col",s?"translate-y-0":"-translate-y-full"].join(" "),children:[e.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 border-b border-border-divider shrink-0",children:[e.jsx("h3",{className:"text-[14px] font-bold text-text-primary",children:t.title}),e.jsx("span",{className:"text-[10px] font-mono text-text-tertiary",children:t.sessionId}),e.jsx("div",{className:"flex-1"}),e.jsx("button",{type:"button",onClick:r,className:"w-[26px] h-[26px] rounded-[7px] flex items-center justify-center text-text-tertiary hover:bg-bg-hover hover:text-text-primary transition-all",children:e.jsx(P,{size:14})})]}),e.jsxs("div",{className:"grid grid-cols-3 flex-1 overflow-auto",children:[e.jsxs("div",{className:"p-3.5",children:[e.jsxs("div",{className:"text-[9px] font-semibold uppercase tracking-widest text-text-placeholder mb-2.5 flex items-center gap-1.5",children:["Pipeline",e.jsx("span",{className:"bg-bg-hover px-1.5 rounded-full text-[9px] text-text-tertiary",children:t.pipelineStages.length})]}),e.jsxs("div",{className:"flex gap-2 mb-3",children:[e.jsx(_,{label:"Done",value:t.pipelineStages.filter(a=>a.status==="done").length}),e.jsx(_,{label:"Active",value:t.pipelineStages.filter(a=>a.status==="in_progress").length}),e.jsx(_,{label:"Pending",value:t.pipelineStages.filter(a=>a.status==="pending").length})]}),t.pipeline.waves.length>0?e.jsx(Ie,{waves:t.pipeline.waves}):e.jsx("div",{className:"flex gap-1.5 flex-wrap",children:t.pipelineStages.map(a=>e.jsx(Oe,{node:a},a.id))})]}),e.jsxs("div",{className:"p-3.5 border-l border-border-divider",children:[e.jsxs("div",{className:"text-[9px] font-semibold uppercase tracking-widest text-text-placeholder mb-2.5 flex items-center gap-1.5",children:["Roles",e.jsx("span",{className:"bg-bg-hover px-1.5 rounded-full text-[9px] text-text-tertiary",children:t.roleDetails.length})]}),e.jsxs("div",{className:"flex flex-col",children:[t.roleDetails.map(a=>e.jsx(ze,{role:a},a.name)),t.roleDetails.length===0&&e.jsx("span",{className:"text-[11px] text-text-tertiary italic",children:"No roles data"})]})]}),e.jsxs("div",{className:"p-3.5 border-l border-border-divider",children:[e.jsxs("div",{className:"text-[9px] font-semibold uppercase tracking-widest text-text-placeholder mb-2.5 flex items-center gap-1.5",children:["Messages",e.jsx("span",{className:"bg-bg-hover px-1.5 rounded-full text-[9px] text-text-tertiary",children:t.messages.length})]}),e.jsxs("div",{className:"flex flex-col max-h-[50vh] overflow-y-auto",children:[t.messages.slice(-20).map(a=>e.jsx(Fe,{message:a},a.id)),t.messages.length===0&&e.jsx("span",{className:"text-[11px] text-text-tertiary italic",children:"No messages"})]})]})]}),e.jsx("div",{className:"flex justify-center py-1.5 border-t border-border-divider cursor-pointer hover:bg-bg-hover",children:e.jsx("div",{className:"w-10 h-1 rounded-full bg-text-placeholder"})})]})})})}const N={nodeW:100,nodeH:26,rowGap:6,padX:12,padY:8,arrowLen:36};function Ie({waves:t}){const s=c.useMemo(()=>{const x=[...t].sort((n,p)=>n.number-p.number),m=new Map,u=[];let o=N.padX;for(const n of x){u.push(o);let p=N.padY;for(const j of n.nodes)m.set(j.id,{x:o,y:p,wave:n.number}),p+=N.nodeH+N.rowGap;o+=N.nodeW+N.arrowLen}const b=Math.max(...x.map(n=>n.nodes.length),1),w=x.length*(N.nodeW+N.arrowLen)-N.arrowLen+N.padX*2,k=b*(N.nodeH+N.rowGap)-N.rowGap+N.padY*2;return{sorted:x,positions:m,waveXPositions:u,svgW:w,svgH:k}},[t]),{sorted:r,positions:i,waveXPositions:a,svgW:f,svgH:h}=s;return e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("svg",{width:f,height:h,viewBox:`0 0 ${f} ${h}`,className:"block",children:[e.jsx("defs",{children:e.jsx("marker",{id:"dag-arrow",markerWidth:"6",markerHeight:"4",refX:"5",refY:"2",orient:"auto",children:e.jsx("path",{d:"M0,0 L6,2 L0,4",fill:"var(--color-text-placeholder)"})})}),r.map((x,m)=>{if(m===0)return null;const u=r[m-1],o=a[m-1],b=a[m],w=[];for(const k of u.nodes){const n=i.get(k.id),p=o+N.nodeW,j=n.y+N.nodeH/2;for(const C of x.nodes){const E=i.get(C.id),B=b,D=E.y+N.nodeH/2;w.push(e.jsx("line",{x1:p+2,y1:j,x2:B-2,y2:D,stroke:"var(--color-text-placeholder)",strokeWidth:"1",strokeOpacity:"0.4",markerEnd:"url(#dag-arrow)"},`${k.id}-${C.id}`))}}return e.jsx("g",{children:w},`arrows-${x.number}`)}),r.map(x=>x.nodes.map(m=>{const u=i.get(m.id),o=T[m.status];return e.jsxs("g",{children:[e.jsx("rect",{x:u.x,y:u.y,width:N.nodeW,height:N.nodeH,rx:6,fill:"var(--color-bg-hover)",stroke:o,strokeWidth:m.status==="in_progress"?1.5:.5,strokeOpacity:m.status==="in_progress"?1:.4}),e.jsx("circle",{cx:u.x+10,cy:u.y+N.nodeH/2,r:3,fill:o}),e.jsx("text",{x:u.x+18,y:u.y+N.nodeH/2,dominantBaseline:"central",fill:"var(--color-text-primary)",fontSize:"9",fontWeight:"600",fontFamily:"inherit",children:Re(m.name,10)})]},m.id)})),r.map((x,m)=>e.jsxs("text",{x:a[m]+N.nodeW/2,y:h-1,textAnchor:"middle",fill:"var(--color-text-placeholder)",fontSize:"8",fontWeight:"600",children:["W",x.number]},`wave-label-${x.number}`))]})})}function Re(t,s){return t.length<=s?t:t.slice(0,s-1)+"…"}function _({label:t,value:s}){return e.jsxs("div",{className:"flex-1 text-center p-1.5 bg-bg-hover rounded-lg",children:[e.jsx("div",{className:"text-[16px] font-bold text-text-primary",children:s}),e.jsx("div",{className:"text-[9px] font-semibold uppercase text-text-tertiary",children:t})]})}function Oe({node:t}){const s=T[t.status];return e.jsxs("div",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg border border-border text-[10px] mb-1 hover:border-accent-blue transition-colors",children:[e.jsx("span",{className:"w-[7px] h-[7px] rounded-full",style:{backgroundColor:s}}),e.jsx("span",{className:"font-semibold text-text-primary",children:t.name})]})}function ze({role:t}){const s=Se[t.status];return e.jsxs("div",{className:"flex items-center gap-2 py-1.5 border-b border-border-divider last:border-0",children:[e.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center text-[10px] font-bold text-white shrink-0",style:{backgroundColor:s},children:t.prefix||t.name.charAt(0).toUpperCase()}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-[12px] font-semibold text-text-primary truncate",children:t.name}),e.jsxs("div",{className:"text-[10px] text-text-tertiary",children:[t.taskCount," task",t.taskCount!==1?"s":""]})]}),e.jsxs("div",{className:"flex gap-1 shrink-0",children:[e.jsx("span",{className:"text-[8px] font-semibold px-1.5 py-0.5 rounded-full",style:{background:`${s}18`,color:s},children:t.status}),t.injected&&e.jsx("span",{className:"text-[8px] font-semibold px-1.5 py-0.5 rounded-full bg-[#8B6BBF18] text-[#8B6BBF]",children:"injected"})]})]})}function Fe({message:t}){const r={message:"#4A90D9",state_update:"#3D9B6F",task_complete:"#5A9E78",error:"#D05454",broadcast:"#8B6BBF",shutdown:"#A09D97"}[t.type]??"#A09D97";return e.jsxs("div",{className:"flex gap-2 py-1.5 border-b border-border-divider last:border-0 text-[11px] items-start",children:[e.jsx("div",{className:"w-[22px] h-[22px] rounded-md flex items-center justify-center text-[10px] shrink-0 mt-0.5",style:{background:`${r}18`,color:r},children:t.from.charAt(0).toUpperCase()}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[10px] font-semibold text-text-primary",children:t.from}),e.jsx("span",{className:"text-[8px] font-semibold px-1.5 py-0.5 rounded-full",style:{background:`${r}18`,color:r},children:t.type}),e.jsx("span",{className:"text-[9px] font-mono text-text-placeholder ml-auto",children:t.ts.substring(11,19)})]}),e.jsx("div",{className:"text-[11px] text-text-secondary truncate mt-0.5",children:t.summary})]})]})}function $e(){const t=g(l=>l.activeSession),s=g(l=>l.activeSessionId),r=g(l=>l.loading),i=g(l=>l.clearActiveSession),[a,f]=c.useState(!1),[h,x]=c.useState(null),[m,u]=c.useState(""),[o,b]=c.useState(!1),[w,k]=c.useState([]),[n,p]=c.useState(new Set);c.useEffect(()=>{function l(y){y.key==="Escape"&&(a?f(!1):i())}return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[i,a]);const j=c.useCallback(async l=>{if(s){x(l),b(!0),k(y=>y.some(v=>v.id===l.id)?y:[...y,l]);try{const y=`${Y.SESSIONS}/${s}/files/${encodeURIComponent(l.path)}`,v=await fetch(y);if(!v.ok)throw new Error(`Failed: ${v.status}`);if((v.headers.get("content-type")??"").includes("json")){const S=await v.json();u(JSON.stringify(S,null,2))}else u(await v.text())}catch{u("// Failed to load file content")}b(!1)}},[s]),C=c.useCallback(l=>{k(y=>{const v=y.filter(d=>d.id!==l);return(h==null?void 0:h.id)===l&&(v.length>0?j(v[v.length-1]):(x(null),u(""))),v})},[h,j]),E=c.useCallback(l=>{p(y=>{const v=new Set(y);return v.has(l)?v.delete(l):v.add(l),v})},[]);if(r||!t)return e.jsx("div",{className:"flex items-center justify-center h-full text-text-secondary text-[length:var(--font-size-sm)]",children:"Loading session..."});const B=I[t.status],D=new Map;for(const l of t.files){const y=l.category;D.has(y)||D.set(y,[]),D.get(y).push(l)}const z={artifacts:"Artifacts","role-specs":"Role Specs",session:"Session",wisdom:"Wisdom","message-bus":"Message Bus"};return e.jsxs("div",{className:"-m-[var(--spacing-4)] max-sm:-m-[var(--spacing-2)] flex flex-col h-[calc(100%+var(--spacing-4)*2)] max-sm:h-[calc(100%+var(--spacing-2)*2)] overflow-hidden relative",children:[e.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-2 border-b border-border shrink-0 bg-bg-secondary",children:[e.jsx("button",{type:"button",onClick:i,className:"w-7 h-7 rounded-lg flex items-center justify-center text-text-tertiary hover:text-text-primary hover:bg-bg-hover transition-all",title:"Back to sessions",children:e.jsx(J,{size:15,strokeWidth:2})}),e.jsx("span",{className:"text-[14px] font-semibold text-text-primary truncate",children:t.title}),e.jsx("span",{className:"text-[10px] font-mono text-text-tertiary",children:t.sessionId}),e.jsx("div",{className:"flex-1"}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[10px] font-semibold",style:{background:`${B}18`,color:B},children:[t.status==="active"&&e.jsxs("span",{className:"relative flex w-1.5 h-1.5",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:B}}),e.jsx("span",{className:"relative inline-flex rounded-full w-1.5 h-1.5",style:{backgroundColor:B}})]}),t.status]}),e.jsx("span",{className:"text-[11px] font-mono text-text-tertiary",children:t.duration}),e.jsxs("button",{type:"button",onClick:()=>f(!0),className:"ml-2 px-2.5 py-1 rounded-lg bg-bg-hover text-[11px] font-semibold text-text-secondary hover:text-text-primary hover:bg-bg-active transition-all flex items-center gap-1.5",children:[e.jsx(W,{size:12}),"Team Status"]})]}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[e.jsxs("aside",{className:"w-[240px] border-r border-border bg-bg-secondary flex flex-col shrink-0 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-border-divider",children:[e.jsx("span",{className:"text-[11px] font-semibold text-text-primary",children:"Session Explorer"}),e.jsx("span",{className:"text-[9px] font-semibold px-1.5 py-0.5 rounded-full",style:{background:`${B}18`,color:B},children:t.status})]}),e.jsxs("div",{className:"px-3 py-2 border-b border-border-divider",children:[e.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-widest text-text-placeholder mb-2",children:"Pipeline DAG"}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.pipelineStages.map((l,y)=>e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 py-0.5",children:[e.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:T[l.status]}}),e.jsx("span",{className:["text-[10px] flex-1 truncate",l.status==="in_progress"?"font-semibold text-text-primary":"text-text-secondary",l.status==="pending"?"opacity-50":""].join(" "),children:l.name}),e.jsx("span",{className:"text-[8px] font-semibold px-1 rounded-full",style:{background:`${T[l.status]}18`,color:T[l.status]},children:l.status==="done"?"Done":l.status==="in_progress"?"Run":"Wait"})]}),y<t.pipelineStages.length-1&&e.jsx("div",{className:"w-px h-2 bg-border-divider ml-[3.5px]"})]},l.id)),t.pipelineStages.length===0&&e.jsx("span",{className:"text-[10px] text-text-tertiary italic",children:"No pipeline data"})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto",children:[Array.from(D.entries()).map(([l,y])=>e.jsxs("div",{className:"px-1.5 py-1",children:[e.jsxs("button",{type:"button",onClick:()=>E(l),className:"flex items-center gap-1 px-1.5 py-1 w-full text-left text-[9px] font-semibold uppercase tracking-widest text-text-placeholder hover:text-text-primary transition-colors",children:[e.jsx(q,{size:10,className:["transition-transform",n.has(l)?"-rotate-90":""].join(" ")}),z[l]??l,e.jsx("span",{className:"ml-auto text-[9px] bg-bg-hover px-1 rounded-full text-text-tertiary",children:y.length})]}),!n.has(l)&&e.jsx("div",{className:"flex flex-col gap-0.5",children:y.map(v=>e.jsxs("button",{type:"button",onClick:()=>void j(v),className:["flex items-center gap-1.5 px-2 py-1 rounded-md text-left text-[11px] w-full transition-all",(h==null?void 0:h.id)===v.id?"bg-bg-active text-text-primary font-medium":"text-text-secondary hover:bg-bg-hover hover:text-text-primary"].join(" "),children:[e.jsx(R,{size:11,className:"text-text-placeholder shrink-0"}),e.jsx("span",{className:"truncate",children:v.name})]},v.id))})]},l)),t.files.length===0&&e.jsx("div",{className:"px-3 py-4 text-[11px] text-text-tertiary italic text-center",children:"No files found"})]})]}),e.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden bg-bg-primary",children:[w.length>0&&e.jsx("div",{className:"flex items-center border-b border-border bg-bg-secondary shrink-0 overflow-x-auto",children:w.map(l=>e.jsxs("div",{className:["flex items-center gap-1.5 px-3 py-1.5 text-[11px] cursor-pointer border-r border-border-divider shrink-0",(h==null?void 0:h.id)===l.id?"bg-bg-primary text-text-primary font-medium":"text-text-tertiary hover:text-text-secondary hover:bg-bg-hover"].join(" "),children:[e.jsx("button",{type:"button",onClick:()=>void j(l),className:"truncate max-w-[140px]",children:l.name}),e.jsx("button",{type:"button",onClick:y=>{y.stopPropagation(),C(l.id)},className:"w-4 h-4 rounded flex items-center justify-center text-text-placeholder hover:text-text-primary hover:bg-bg-hover transition-all",children:e.jsx(P,{size:10})})]},l.id))}),e.jsxs("div",{className:"flex-1 overflow-auto p-4",children:[o&&e.jsx("div",{className:"text-[12px] text-text-tertiary",children:"Loading file..."}),!o&&!h&&e.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-text-tertiary gap-2",children:[e.jsx(R,{size:32,className:"opacity-30"}),e.jsx("span",{className:"text-[13px] font-medium",children:"Select a file to view"}),e.jsx("span",{className:"text-[11px]",children:"Choose from the sidebar or click Team Status for an overview"})]}),!o&&h&&e.jsx("div",{className:"font-mono text-[12px] leading-relaxed text-text-primary whitespace-pre-wrap break-words",children:m})]})]})]}),e.jsx(te,{session:t,open:a,onClose:()=>f(!1)})]})}function Me(){const[t,s]=c.useState(!1);return c.useEffect(()=>{const r=window.matchMedia("(prefers-reduced-motion: reduce)");s(r.matches);const i=a=>s(a.matches);return r.addEventListener("change",i),()=>r.removeEventListener("change",i)},[]),t}const Pe={idle:"Idle",active:"Active",busy:"Busy",error:"Error",offline:"Offline"},_e=new Set(["active","busy"]);function We({status:t,role:s}){const r=Me(),i=ee[t],a=_e.has(t);return e.jsxs("div",{className:"inline-flex items-center gap-1.5",children:[e.jsxs(L.div,{className:"relative flex items-center justify-center w-[14px] h-[14px]",animate:a&&!r?{scale:[1,1.05,1],opacity:[1,.85,1]}:{scale:1,opacity:1},transition:r?{duration:0}:{duration:2,repeat:1/0,ease:"easeInOut"},children:[a&&!r&&e.jsx("div",{className:"absolute inset-0 rounded-full",style:{backgroundColor:`${i}20`,boxShadow:`0 0 6px ${i}30`}}),e.jsx("div",{className:a&&!r?"pulse-dot":void 0,style:{width:7,height:7,borderRadius:"50%",backgroundColor:i,animation:a&&!r?"pulse-dot 1.5s ease-in-out infinite":"none",willChange:a?"transform, opacity":"auto"}})]}),e.jsxs("div",{className:"flex items-center gap-1 overflow-hidden",children:[e.jsx("span",{className:"text-[10px] font-semibold text-text-primary",children:s}),e.jsx(O,{mode:"wait",children:e.jsx(L.span,{className:"text-[8px] font-semibold px-1.5 py-0.5 rounded-full whitespace-nowrap",style:{background:`${i}18`,color:i},initial:r?!1:{opacity:0,y:6,scale:.9},animate:{opacity:1,y:0,scale:1},exit:r?void 0:{opacity:0,y:-6,scale:.9},transition:r?{duration:0}:{duration:.2,ease:"easeOut"},children:Pe[t]},t)})]})]})}function Ue(t){switch(t.type){case"user_message":return{text:t.content,kind:"user"};case"assistant_message":return t.content?{text:t.content,kind:"assistant"}:null;case"thinking":return{text:t.content,kind:"system"};case"error":return{text:t.message,kind:"system"};case"tool_use":return{text:`${t.name}(${JSON.stringify(t.input).slice(0,60)})`,kind:"system"};case"file_change":return{text:`[${t.action}] ${t.path}`,kind:"system"};case"command_exec":return{text:`$ ${t.command}`,kind:"system"};case"status_change":return{text:`Status: ${t.status}`,kind:"system"};default:return null}}function He(t){const s=new Date(t);return isNaN(s.getTime())?"":s.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Ge({role:t,sessionId:s,status:r}){const[i,a]=c.useState(""),f=c.useRef(null),h=c.useRef(null),x=g(p=>p.getProcessIdForRole(s,t)),m=U(p=>x?p.entries[x]??[]:[]),u=U(p=>x?p.processStreaming[x]??!1:!1),o=c.useMemo(()=>{const p=[];for(const j of m){const C=Ue(j);C&&p.push({entry:j,display:C})}return p},[m]);c.useEffect(()=>{const p=f.current;p&&(p.scrollTop=p.scrollHeight)},[o.length]);const b=c.useCallback(()=>{var j;const p=i.trim();p&&(ie({action:"team:message",sessionId:s,to:t,content:p}),a(""),(j=h.current)==null||j.focus())},[i,s,t]),w=c.useCallback(p=>{p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),b()),p.key==="Escape"&&a("")},[b]),k=ee[r],n=!!x;return e.jsxs("div",{className:"flex flex-col rounded-xl border bg-bg-primary overflow-hidden",style:{borderColor:`${k}40`},children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-border-divider bg-bg-secondary shrink-0",children:[e.jsx(We,{status:r,role:t}),e.jsx("div",{className:"flex-1"}),u&&e.jsx(me,{size:12,className:"text-text-tertiary animate-spin"})]}),e.jsxs("div",{ref:f,className:"flex-1 overflow-y-auto p-3 min-h-[160px] max-h-[400px] flex flex-col gap-1.5",children:[!n&&e.jsx("div",{className:"flex items-center justify-center h-full text-text-tertiary text-[11px] italic",children:"Connecting..."}),n&&o.length===0&&e.jsx("div",{className:"flex items-center justify-center h-full text-text-tertiary text-[11px] italic",children:"Waiting for activity..."}),e.jsx(O,{initial:!1,children:o.map(({entry:p,display:j})=>e.jsx(L.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.15,ease:"easeOut"},className:["text-[11px] leading-relaxed px-2 py-1 rounded-md max-w-[95%]",j.kind==="user"?"self-end bg-accent-muted text-text-primary":j.kind==="assistant"?"self-start bg-bg-secondary text-text-primary":"self-start bg-bg-hover text-text-tertiary font-mono text-[10px]"].join(" "),children:e.jsxs("div",{className:"flex items-start gap-1.5",children:[e.jsx("span",{className:"text-text-placeholder text-[9px] shrink-0 mt-0.5",children:He(p.timestamp)}),e.jsx("span",{className:"break-words whitespace-pre-wrap",children:j.text})]})},p.id))})]}),e.jsxs("div",{className:"flex items-end gap-2 px-3 py-2 border-t border-border-divider bg-bg-secondary shrink-0",children:[e.jsx("textarea",{ref:h,value:i,onChange:p=>a(p.target.value),onKeyDown:w,placeholder:`Message ${t}...`,rows:1,className:"flex-1 resize-none rounded-lg border border-border bg-bg-primary px-2.5 py-1.5 text-[11px] text-text-primary placeholder:text-text-placeholder focus:outline-none focus:border-accent-muted transition-colors","aria-label":`Send message to ${t}`}),e.jsx("button",{type:"button",onClick:b,disabled:!i.trim(),className:"w-7 h-7 rounded-lg flex items-center justify-center text-text-tertiary hover:text-text-primary hover:bg-bg-hover disabled:opacity-30 disabled:cursor-not-allowed transition-all shrink-0",title:`Send to ${t}`,"aria-label":`Send message to ${t}`,children:e.jsx(be,{size:13,strokeWidth:2})})]})]})}const $=[{key:"initialization",label:"Init"},{key:"planning",label:"Planning"},{key:"execution",label:"Execution"},{key:"review",label:"Review"},{key:"completion",label:"Complete"}],M={initialization:"#4A90D9",planning:"#8B6BBF",execution:"#B89540",review:"#3D9B6F",completion:"#5A9E78"};function Xe(){const[t,s]=c.useState(!1);return c.useEffect(()=>{const r=window.matchMedia("(prefers-reduced-motion: reduce)");s(r.matches);const i=a=>s(a.matches);return r.addEventListener("change",i),()=>r.removeEventListener("change",i)},[]),t}function Ve(){const t=g(x=>x.phaseState),s=Xe(),r=(t==null?void 0:t.current)??null,i=(t==null?void 0:t.fixAttempts)??0,a=3,f=r?$.findIndex(x=>x.key===r):-1,h=s?0:.3;return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-1",children:[e.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-widest text-text-placeholder",children:"Phase"}),r&&e.jsx("span",{className:"text-[9px] font-semibold px-1.5 py-0.5 rounded-full",style:{background:`${M[r]}18`,color:M[r]},children:r})]}),e.jsx(ke,{children:e.jsx("div",{className:"flex items-center px-4 py-2",children:$.map((x,m)=>{const u=x.key===r,o=f>m,b=M[x.key];return e.jsxs("div",{className:"flex items-center",children:[e.jsxs(L.div,{layout:!0,className:"flex flex-col items-center gap-1",transition:{duration:h,ease:"easeOut"},children:[e.jsxs(L.div,{layout:!0,className:"flex items-center justify-center rounded-full",style:{backgroundColor:o||u?b:"var(--color-bg-hover)",...u?{boxShadow:`0 0 0 2px var(--color-bg-primary), 0 0 0 4px ${b}, 0 0 12px ${b}40`}:{}},animate:{width:u?28:20,height:u?28:20},transition:{duration:h,ease:"easeOut"},children:[o&&e.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",children:e.jsx("path",{d:"M1 4L3.5 6.5L9 1",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),u&&!s&&e.jsx(L.div,{className:"rounded-full bg-white",animate:{scale:[1,1.2,1],opacity:[1,.7,1]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"},style:{width:8,height:8}}),u&&s&&e.jsx("div",{className:"w-2 h-2 rounded-full bg-white"})]}),e.jsx("span",{className:["text-[9px] font-semibold whitespace-nowrap transition-colors",u?"text-text-primary":o?"text-text-secondary":"text-text-placeholder"].join(" "),children:x.label}),x.key==="review"&&i>0&&e.jsxs("span",{className:"text-[7px] font-bold px-1 py-px rounded-full",style:{background:"#C4655518",color:"#C46555"},children:[i,"/",a]})]}),m<$.length-1&&e.jsxs("div",{className:"relative h-[2px] mx-1 min-w-[20px] flex-1",children:[e.jsx("div",{className:"absolute inset-0 rounded-full",style:{backgroundColor:"var(--color-bg-hover)"}}),e.jsx(L.div,{className:"absolute inset-y-0 left-0 rounded-full",initial:{width:"0%"},animate:{width:o?"100%":"0%"},transition:{duration:s?0:.5,ease:"easeOut"},style:{backgroundColor:M[$[m+1].key]}})]})]},x.key)})})})]})}function Ke(){const t=g(d=>d.activeSession),s=g(d=>d.activeSessionId),r=g(d=>d.loading),i=g(d=>d.clearActiveSession),a=g(d=>d.agentStatuses),f=g(d=>d.phaseState),[h,x]=c.useState(!1),[m,u]=c.useState(!1),[o,b]=c.useState(null),[w,k]=c.useState(""),[n,p]=c.useState(!1),[j,C]=c.useState(new Set);c.useEffect(()=>{function d(S){S.target instanceof HTMLTextAreaElement||S.target instanceof HTMLInputElement||S.key==="Escape"&&(h?x(!1):m?u(!1):i())}return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[i,h,m]);const E=c.useCallback(async d=>{if(s){b(d),p(!0),u(!0);try{const S=`${Y.SESSIONS}/${s}/files/${encodeURIComponent(d.path)}`,A=await fetch(S);if(!A.ok)throw new Error(`Failed: ${A.status}`);if((A.headers.get("content-type")??"").includes("json")){const se=await A.json();k(JSON.stringify(se,null,2))}else k(await A.text())}catch{k("// Failed to load file content")}p(!1)}},[s]),B=c.useCallback(d=>{C(S=>{const A=new Set(S);return A.has(d)?A.delete(d):A.add(d),A})},[]);if(r||!t)return e.jsx("div",{className:"flex items-center justify-center h-full text-text-secondary text-[length:var(--font-size-sm)]",children:"Loading session..."});const D=I[t.status],z=new Map;for(const d of a)z.set(d.role,d.status);const l=t.roleDetails.map(d=>d.name),y=new Map;for(const d of t.files){const S=d.category;y.has(S)||y.set(S,[]),y.get(S).push(d)}const v={artifacts:"Artifacts","role-specs":"Role Specs",session:"Session",wisdom:"Wisdom","message-bus":"Message Bus"};return e.jsxs("div",{className:"-m-[var(--spacing-4)] max-sm:-m-[var(--spacing-2)] flex flex-col h-[calc(100%+var(--spacing-4)*2)] max-sm:h-[calc(100%+var(--spacing-2)*2)] overflow-hidden relative",children:[e.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-2 border-b border-border shrink-0 bg-bg-secondary",children:[e.jsx("button",{type:"button",onClick:i,className:"w-7 h-7 rounded-lg flex items-center justify-center text-text-tertiary hover:text-text-primary hover:bg-bg-hover transition-all",title:"Back to sessions",children:e.jsx(J,{size:15,strokeWidth:2})}),e.jsx("span",{className:"text-[14px] font-semibold text-text-primary truncate",children:t.title}),e.jsx("span",{className:"text-[10px] font-mono text-text-tertiary",children:t.sessionId}),e.jsx("div",{className:"flex-1"}),f&&e.jsx("div",{className:"hidden sm:flex items-center gap-1.5 mr-2",children:e.jsx(Ve,{})}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[10px] font-semibold",style:{background:`${D}18`,color:D},children:[e.jsxs("span",{className:"relative flex w-1.5 h-1.5",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:D}}),e.jsx("span",{className:"relative inline-flex rounded-full w-1.5 h-1.5",style:{backgroundColor:D}})]}),t.status]}),e.jsx("span",{className:"text-[11px] font-mono text-text-tertiary",children:t.duration}),e.jsxs("button",{type:"button",onClick:()=>u(d=>!d),className:"ml-1 px-2.5 py-1 rounded-lg bg-bg-hover text-[11px] font-semibold text-text-secondary hover:text-text-primary hover:bg-bg-active transition-all flex items-center gap-1.5",children:[e.jsx(R,{size:12}),"Files"]}),e.jsxs("button",{type:"button",onClick:()=>x(!0),className:"px-2.5 py-1 rounded-lg bg-bg-hover text-[11px] font-semibold text-text-secondary hover:text-text-primary hover:bg-bg-active transition-all flex items-center gap-1.5",children:[e.jsx(W,{size:12}),"Status"]})]}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[e.jsxs("div",{className:"flex-1 overflow-y-auto p-4",children:[e.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:"repeat(auto-fit, minmax(320px, 1fr))"},children:e.jsx(O,{children:l.map(d=>e.jsx(L.div,{layout:!0,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2,ease:"easeOut"},children:e.jsx(Ge,{role:d,sessionId:t.sessionId,status:z.get(d)??"idle"})},d))})}),l.length===0&&e.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-text-tertiary gap-2",children:[e.jsx(W,{size:32,className:"opacity-30"}),e.jsx("span",{className:"text-[13px] font-medium",children:"No agent roles"}),e.jsx("span",{className:"text-[11px]",children:"Waiting for agents to join the session..."})]})]}),e.jsx(O,{children:m&&e.jsxs(L.aside,{initial:{width:0,opacity:0},animate:{width:260,opacity:1},exit:{width:0,opacity:0},transition:{duration:.2,ease:"easeOut"},className:"border-l border-border bg-bg-secondary flex flex-col shrink-0 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-border-divider shrink-0",children:[e.jsx("span",{className:"text-[11px] font-semibold text-text-primary flex-1",children:"Files"}),e.jsx("button",{type:"button",onClick:()=>u(!1),className:"w-5 h-5 rounded flex items-center justify-center text-text-placeholder hover:text-text-primary hover:bg-bg-hover transition-all",children:e.jsx(P,{size:11})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto",children:[Array.from(y.entries()).map(([d,S])=>e.jsxs("div",{className:"px-1.5 py-1",children:[e.jsxs("button",{type:"button",onClick:()=>B(d),className:"flex items-center gap-1 px-1.5 py-1 w-full text-left text-[9px] font-semibold uppercase tracking-widest text-text-placeholder hover:text-text-primary transition-colors",children:[e.jsx(q,{size:10,className:["transition-transform",j.has(d)?"-rotate-90":""].join(" ")}),v[d]??d,e.jsx("span",{className:"ml-auto text-[9px] bg-bg-hover px-1 rounded-full text-text-tertiary",children:S.length})]}),!j.has(d)&&e.jsx("div",{className:"flex flex-col gap-0.5",children:S.map(A=>e.jsxs("button",{type:"button",onClick:()=>void E(A),className:["flex items-center gap-1.5 px-2 py-1 rounded-md text-left text-[11px] w-full transition-all",(o==null?void 0:o.id)===A.id?"bg-bg-active text-text-primary font-medium":"text-text-secondary hover:bg-bg-hover hover:text-text-primary"].join(" "),children:[e.jsx(R,{size:11,className:"text-text-placeholder shrink-0"}),e.jsx("span",{className:"truncate",children:A.name})]},A.id))})]},d)),t.files.length===0&&e.jsx("div",{className:"px-3 py-4 text-[11px] text-text-tertiary italic text-center",children:"No files found"})]}),o&&e.jsxs("div",{className:"border-t border-border-divider flex flex-col max-h-[40%]",children:[e.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 bg-bg-primary shrink-0",children:[e.jsx(R,{size:11,className:"text-text-placeholder"}),e.jsx("span",{className:"text-[10px] font-medium text-text-primary truncate",children:o.name}),e.jsx("div",{className:"flex-1"}),e.jsx("button",{type:"button",onClick:()=>{b(null),k("")},className:"w-4 h-4 rounded flex items-center justify-center text-text-placeholder hover:text-text-primary hover:bg-bg-hover transition-all",children:e.jsx(P,{size:9})})]}),e.jsx("div",{className:"flex-1 overflow-auto p-2",children:n?e.jsx("div",{className:"text-[10px] text-text-tertiary",children:"Loading..."}):e.jsx("pre",{className:"font-mono text-[10px] leading-relaxed text-text-secondary whitespace-pre-wrap break-words",children:w})})]})]})})]}),e.jsx(te,{session:t,open:h,onClose:()=>x(!1)})]})}const Qe=[{label:"Cards",icon:e.jsx(le,{size:14,strokeWidth:1.8}),shortcut:"1"},{label:"Table",icon:e.jsx(ce,{size:14,strokeWidth:1.8}),shortcut:"2"}],K=["cards","table"],Ye={initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8}};function it(){const t=g(o=>o.activeView),s=g(o=>o.setActiveView),r=g(o=>o.activeSessionId),i=g(o=>o.activeSession),a=g(o=>o.fetchSessions),f=g(o=>o.loading),h=g(o=>o.error),{register:x,unregister:m}=c.useContext(oe),u=c.useCallback(o=>s(K[o]),[s]);return c.useEffect(()=>{r?m():x({items:Qe.map(o=>({label:o.label,icon:o.icon,shortcut:o.shortcut})),activeIndex:K.indexOf(t),onSwitch:u})},[t,r,x,m,u]),c.useEffect(()=>()=>m(),[m]),c.useEffect(()=>{function o(b){b.target instanceof HTMLInputElement||b.target instanceof HTMLTextAreaElement||r||(b.key==="1"?s("cards"):b.key==="2"&&s("table"))}return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[s,r]),c.useEffect(()=>{a()},[a]),f&&!r?e.jsx("div",{className:"flex items-center justify-center h-full text-text-secondary text-[length:var(--font-size-sm)]",children:"Loading team sessions..."}):h&&!r?e.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3",children:[e.jsx("span",{className:"text-status-failed text-[length:var(--font-size-sm)]",children:"Failed to load team sessions"}),e.jsx("span",{className:"text-text-tertiary text-[length:var(--font-size-xs)]",children:h}),e.jsx("button",{type:"button",onClick:()=>void a(),className:"px-3 py-1 rounded-[var(--radius-md)] text-[11px] font-semibold text-text-secondary hover:text-text-primary transition-all",style:{border:"var(--style-btn-secondary-border)",background:"var(--style-btn-secondary-bg)"},children:"Retry"})]}):r?(i==null?void 0:i.status)==="active"?e.jsx(Ke,{}):e.jsx($e,{}):e.jsx("div",{className:"flex flex-col h-full overflow-hidden",children:e.jsx(O,{mode:"wait",children:e.jsx(L.div,{className:"flex-1 flex flex-col overflow-hidden",variants:Ye,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.25,ease:[.34,1.56,.64,1]},children:e.jsx(Ee,{viewMode:t})},t)})})}export{it as TeamsPage};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{d as H,j as e,S as h,a as j,r as v,c as X,L as W,V as J,p as Y}from"./index-C2Mcb4TJ.js";import{u as Z}from"./shallow-BXasQBvr.js";import{c as E,S as T,P as $,b as ee,D as te,K as se}from"./table-CeGlFjlP.js";import{C as A}from"./check-DJDk3A2a.js";import{L as F}from"./list-DI8Wn2aT.js";import{C as O}from"./circle-check-CEGgy3NV.js";import{C as ae}from"./circle-alert-Na1vf6qQ.js";import{C as re}from"./columns-3-BUcKlxve.js";/**
|
|
2
|
-
* @license lucide-react v0.577.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const ne=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],ie=H("play",ne),B=[{status:"pending",label:"Pending"},{status:"exploring",label:"Exploring"},{status:"planning",label:"Planning"},{status:"executing",label:"Executing"},{status:"verifying",label:"Verifying"},{status:"completed",label:"Complete"}];function oe(t,s){return s==="completed"?t.filter(a=>a.status==="completed").length:s==="verifying"?t.filter(a=>a.status==="verifying"||a.status==="testing").length:s==="pending"?t.filter(a=>a.status==="pending"||a.status==="not_started").length:t.filter(a=>a.status===s).length}function le({phases:t,hiddenCols:s,onToggleCol:a}){return e.jsx("div",{className:"flex items-center px-[var(--spacing-4)] py-[var(--spacing-3)] border-b border-border-divider bg-bg-primary shrink-0 gap-0 overflow-x-auto",children:B.map((n,i)=>{const x=oe(t,n.status),r=h[n.status],l=s==null?void 0:s.has(n.status);return e.jsxs("div",{className:"contents",children:[e.jsxs("button",{type:"button",onClick:()=>a==null?void 0:a(n.status),className:`flex items-center gap-[var(--spacing-2)] px-[var(--spacing-3-5)] py-[var(--spacing-1-5)] text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] cursor-pointer transition-all rounded-full border ${l?"opacity-40 border-border bg-bg-secondary":"opacity-100 border-transparent bg-transparent hover:bg-bg-secondary"}`,title:l?`Show ${n.label} column`:`Hide ${n.label} column`,children:[e.jsx("span",{className:"inline-block w-2 h-2 rounded-full shrink-0",style:{backgroundColor:r}}),e.jsx("span",{className:"text-text-tertiary",children:n.label}),e.jsx("span",{className:"text-[10px] font-[var(--font-weight-semibold)] px-[var(--spacing-1-5)] py-px rounded-full bg-bg-secondary text-text-tertiary font-mono",children:x})]}),i<B.length-1&&e.jsx("div",{className:"relative w-5 h-px bg-border shrink-0",children:e.jsx("div",{className:"absolute -right-px -top-[3px] border-[3px] border-transparent border-l-[4px] border-l-border"})})]},n.status)})})}const _={feat:{bg:"rgba(74,144,217,0.12)",text:"var(--color-status-exploring)"},feature:{bg:"rgba(74,144,217,0.12)",text:"var(--color-status-exploring)"},fix:{bg:"rgba(208,84,84,0.12)",text:"var(--color-status-blocked)"},refac:{bg:"rgba(139,107,191,0.12)",text:"var(--color-status-planning)"},refactor:{bg:"rgba(139,107,191,0.12)",text:"var(--color-status-planning)"},docs:{bg:"rgba(160,157,151,0.12)",text:"var(--color-status-pending)"},test:{bg:"rgba(91,141,184,0.12)",text:"var(--color-status-testing)"}},I={in_progress:{bg:"rgba(201,155,45,0.1)",text:"var(--color-status-executing)"},running:{bg:"rgba(201,155,45,0.1)",text:"var(--color-status-executing)"},pending:{bg:"rgba(160,157,151,0.1)",text:"var(--color-status-pending)"},queued:{bg:"rgba(160,157,151,0.1)",text:"var(--color-status-pending)"},completed:{bg:"rgba(61,155,111,0.1)",text:"var(--color-status-completed)"},done:{bg:"rgba(61,155,111,0.1)",text:"var(--color-status-completed)"},failed:{bg:"rgba(208,84,84,0.1)",text:"var(--color-status-blocked)"}},ce={in_progress:"Running",running:"Running",pending:"Queued",queued:"Queued",completed:"Done",done:"Done",failed:"Failed"};function R(t){return{feature:"feat",refactor:"refac"}[t]??t}function de({task:t}){const s=_[t.type]??_[R(t.type)]??_.feat,a=I[t.status]??I.pending,n=ce[t.status]??t.status;return e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] px-[var(--spacing-2-5)] py-[var(--spacing-1-5)] rounded-[var(--radius-default)] bg-bg-card text-[length:var(--font-size-xs)] cursor-pointer transition-colors duration-[var(--duration-fast)] hover:bg-bg-hover",children:[e.jsx("span",{className:"font-mono text-[length:10px] text-text-tertiary min-w-[60px] shrink-0",children:t.id}),e.jsx("span",{className:"text-[length:9px] font-[var(--font-weight-semibold)] uppercase px-[7px] py-[2px] rounded-full shrink-0",style:{backgroundColor:s.bg,color:s.text},children:R(t.type)}),e.jsx("span",{className:"flex-1 text-text-primary whitespace-nowrap overflow-hidden text-ellipsis",children:t.title}),e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] px-[7px] py-[2px] rounded-full shrink-0",style:{backgroundColor:a.bg,color:a.text},children:n})]})}const xe={not_started:"var(--color-tint-pending)",pending:"var(--color-tint-pending)",exploring:"var(--color-tint-exploring)",planning:"var(--color-tint-planning)",executing:"var(--color-tint-executing)",verifying:"var(--color-tint-verifying)",testing:"var(--color-tint-testing)",completed:"var(--color-tint-completed)",blocked:"var(--color-tint-blocked)"};function pe({phase:t,onSelectTask:s,recommendedAdvance:a}){const n=j(g=>g.setSelectedPhase),[i,x]=v.useState(!1),{tasks:r,loading:l}=E(i?t.phase:null),{tasks_completed:p,tasks_total:o,current_wave:c}=t.execution,m=h[t.status],y=t.verification.gaps.length>0,b=t.plan.task_count>0,d=X(g=>g.issues),f=v.useMemo(()=>d.filter(g=>g.phase_id===t.phase),[d,t.phase]),u=f.filter(g=>{var k;return((k=g.execution)==null?void 0:k.status)==="running"}).length;return b?e.jsxs("div",{children:[e.jsxs("div",{role:"button",tabIndex:0,onClick:()=>n(t.phase),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),n(t.phase))},className:"rounded-[10px] px-[var(--spacing-3-5)] py-[var(--spacing-3)] cursor-pointer transition-all duration-[var(--duration-normal)] ease-[var(--ease-spring)] hover:-translate-y-0.5 hover:shadow-[0_4px_12px_rgba(0,0,0,0.06)] focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)]",style:{backgroundColor:xe[t.status]??"var(--color-tint-pending)"},children:[e.jsxs("div",{className:"flex items-center justify-between mb-[var(--spacing-1-5)]",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-1-5)]",children:[e.jsx("button",{type:"button",onClick:g=>{g.stopPropagation(),x(!i)},className:"w-4 h-4 flex items-center justify-center text-text-tertiary hover:text-text-primary transition-colors","aria-label":i?"Collapse tasks":"Expand tasks",children:e.jsx("svg",{className:`w-3 h-3 transition-transform duration-150 ${i?"rotate-90":""}`,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"9 18 15 12 9 6"})})}),e.jsx(T,{status:t.status,cardVariant:!0})]}),e.jsxs("span",{className:"text-[length:var(--font-size-xs)] font-mono text-text-tertiary",children:["P-",String(t.phase).padStart(2,"0")]})]}),e.jsx("div",{className:"text-[length:var(--font-size-base)] font-[var(--font-weight-semibold)] text-text-primary mb-[var(--spacing-0-5)]",children:t.title}),t.goal&&e.jsx("p",{className:"text-[12px] text-text-secondary leading-[var(--line-height-normal)] line-clamp-2 mb-[var(--spacing-2)]",children:t.goal}),o>0&&e.jsx($,{completed:p,total:o,color:m}),t.status==="executing"&&c>0&&e.jsxs("div",{className:"flex items-center gap-[var(--spacing-1-5)] text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] mt-[var(--spacing-1-5)]",style:{color:m},children:[e.jsx("span",{className:"inline-block w-[5px] h-[5px] rounded-full animate-pulse motion-reduce:animate-none",style:{backgroundColor:m}}),"Wave ",c," active"]}),y&&e.jsxs("div",{className:"inline-flex items-center gap-[var(--spacing-1)] mt-[var(--spacing-1-5)] text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[var(--spacing-0-5)] rounded-full",style:{backgroundColor:"rgba(196, 101, 85, 0.1)",color:"var(--color-status-blocked)"},children:[t.verification.gaps.length," Gap",t.verification.gaps.length>1?"s":""]}),a&&e.jsxs("div",{className:"inline-flex items-center gap-[var(--spacing-1)] mt-[var(--spacing-1-5)] text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] px-[var(--spacing-2)] py-[var(--spacing-0-5)] rounded-full",style:{backgroundColor:"rgba(91, 141, 184, 0.1)",color:"var(--color-accent-blue)"},children:[e.jsx("span",{className:"inline-block w-[5px] h-[5px] rounded-full animate-pulse",style:{backgroundColor:"var(--color-accent-blue)"}}),"Advance recommended"]}),u>0&&e.jsxs(W,{to:`/kanban?phase=${t.phase}`,onClick:g=>g.stopPropagation(),className:"inline-flex items-center gap-[var(--spacing-1)] mt-[var(--spacing-1-5)] text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] px-[var(--spacing-2)] py-[var(--spacing-0-5)] rounded-full no-underline transition-colors hover:opacity-80",style:{backgroundColor:"rgba(184, 149, 64, 0.1)",color:"#B89540"},title:`${u} issue(s) running — view in Kanban`,children:[e.jsx("span",{className:"inline-block w-[5px] h-[5px] rounded-full animate-pulse",style:{backgroundColor:"#B89540"}}),u," running"]}),f.length>0&&u===0&&e.jsxs(W,{to:`/kanban?phase=${t.phase}`,onClick:g=>g.stopPropagation(),className:"inline-flex items-center gap-[var(--spacing-1)] mt-[var(--spacing-1-5)] text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] px-[var(--spacing-2)] py-[var(--spacing-0-5)] rounded-full no-underline transition-colors hover:opacity-80",style:{backgroundColor:"var(--color-bg-secondary)",color:"var(--color-text-tertiary)",border:"1px solid var(--color-border)"},children:[f.length," issue",f.length>1?"s":""]})]}),i&&e.jsx("div",{className:"mt-[var(--spacing-1)] flex flex-col gap-[var(--spacing-1)]",children:l?e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-text-tertiary px-[var(--spacing-3)] py-[var(--spacing-2)]",children:"Loading tasks..."}):r.length===0?e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-text-tertiary px-[var(--spacing-3)] py-[var(--spacing-2)]",children:"No tasks"}):r.map(g=>e.jsx("div",{onClick:()=>s==null?void 0:s({type:"task",task:g,phaseId:t.phase}),children:e.jsx(de,{task:{id:g.id,title:g.title,type:g.type,status:g.meta.status}})},g.id))})]}):e.jsx("div",{role:"button",tabIndex:0,onClick:()=>n(t.phase),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),n(t.phase))},className:"rounded-[8px] px-[var(--spacing-3)] py-[var(--spacing-2)] cursor-pointer transition-all duration-[var(--duration-normal)] hover:shadow-[0_2px_8px_rgba(0,0,0,0.04)] focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus-ring)] opacity-60 hover:opacity-80",style:{border:"1px dashed var(--color-border)",backgroundColor:"transparent"},children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[e.jsx(T,{status:t.status,cardVariant:!0}),e.jsx("span",{className:"text-[length:var(--font-size-sm)] font-[var(--font-weight-medium)] text-text-secondary",children:t.title})]}),e.jsxs("span",{className:"text-[length:var(--font-size-xs)] font-mono text-text-tertiary",children:["P-",String(t.phase).padStart(2,"0")]})]})})}const P=4;function ge({color:t,phases:s,label:a,onSelectTask:n}){const[i,x]=v.useState(!1),r=[...s].sort((c,m)=>(m.plan.task_count||0)-(c.plan.task_count||0)),l=r.length>P,p=i||!l?r:r.slice(0,P),o=r.length-P;return e.jsxs("div",{className:"flex flex-col w-[280px] shrink-0 bg-bg-secondary rounded-[12px] overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] px-[var(--spacing-3-5)] py-[var(--spacing-2-5)]",children:[e.jsx("span",{className:"inline-block w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:t}}),e.jsx("span",{className:"text-[12px] font-[var(--font-weight-semibold)] text-text-primary",children:a}),e.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-tertiary bg-bg-card px-[var(--spacing-1-5)] rounded-full",children:s.length})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-[var(--spacing-2)] pb-[var(--spacing-2)] flex flex-col gap-[var(--spacing-2)]",children:[p.map(c=>e.jsx(pe,{phase:c,onSelectTask:n},c.phase)),l&&e.jsx("button",{type:"button",onClick:()=>x(!i),className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-text-tertiary hover:text-text-secondary py-[var(--spacing-1-5)] cursor-pointer transition-colors text-center",children:i?"Show less":`+${o} more`})]})]})}function ue(){var p;const t=j(o=>o.board),s=(t==null?void 0:t.phases)??[],a=s.filter(o=>o.status==="completed").length,n=s.length,i=s.reduce((o,c)=>o+c.execution.tasks_completed,0),x=s.reduce((o,c)=>o+c.execution.tasks_total,0),r=x>0?Math.round(i/x*100):0,l=((p=t==null?void 0:t.project)==null?void 0:p.current_milestone)??"";return e.jsxs("div",{className:"flex items-center gap-[var(--spacing-5)] px-[var(--spacing-5)] py-[var(--spacing-2)] border-t border-border bg-bg-secondary text-[12px] shrink-0",children:[l&&e.jsx("span",{className:"font-[var(--font-weight-semibold)] text-text-primary",children:l}),e.jsxs("span",{className:"text-text-secondary",children:["Phases: ",e.jsxs("strong",{className:"font-[var(--font-weight-semibold)] text-text-primary",children:[a,"/",n]})," complete"]}),e.jsxs("span",{className:"text-text-secondary",children:["Tasks: ",e.jsxs("strong",{className:"font-[var(--font-weight-semibold)] text-text-primary",children:[i,"/",x]})]}),e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] w-36",children:[e.jsx("div",{className:"flex-1 h-1 rounded-full bg-border overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-[width] duration-500 ease-out",style:{width:`${r}%`,backgroundColor:"var(--color-status-completed)"}})}),e.jsxs("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-medium)] text-text-secondary font-mono tabular-nums",children:[r,"%"]})]})]})}const z=[{status:"pending",label:"Pending",match:["not_started","pending"]},{status:"exploring",label:"Exploring",match:["exploring"]},{status:"planning",label:"Planning",match:["planning"]},{status:"executing",label:"Executing",match:["executing"]},{status:"verifying",label:"Verifying",match:["verifying","testing"]},{status:"completed",label:"Complete",match:["completed"]}];function me(t){const s=new Map;for(const a of z)s.set(a.status,[]);for(const a of t){const n=z.find(i=>i.match.includes(a.status));n&&s.get(n.status).push(a)}return s}function he({onSelectTask:t}){const s=j(r=>{var l;return((l=r.board)==null?void 0:l.phases)??[]}),a=v.useMemo(()=>me(s),[s]),[n,i]=v.useState(()=>new Set(["completed"])),x=v.useCallback(r=>{i(l=>{const p=new Set(l);return p.has(r)?p.delete(r):p.add(r),p})},[]);return e.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[e.jsx(le,{phases:s,hiddenCols:n,onToggleCol:x}),e.jsxs("div",{className:"flex gap-[var(--spacing-2-5)] flex-1 overflow-x-auto px-[var(--spacing-3)] py-[var(--spacing-3)]",children:[z.map(r=>n.has(r.status)?null:e.jsx(ge,{status:r.status,color:h[r.status],label:r.label,phases:a.get(r.status)??[],onSelectTask:t},r.status)),n.size===z.length&&e.jsx("div",{className:"flex-1 flex items-center justify-center text-text-tertiary text-[length:var(--font-size-sm)]",children:"All columns hidden — click a category tag above to show it."})]}),e.jsx(ue,{})]})}const ve=6,fe=Array.from({length:ve},(t,s)=>`Week ${s+1}`),V={pending:"var(--color-status-pending)",in_progress:"var(--color-status-executing)",completed:"var(--color-status-completed)",failed:"var(--color-status-blocked)"},be={pending:"Queued",in_progress:"Running",completed:"Done",failed:"Failed"};function ye({phaseId:t,onSelectTask:s}){const{tasks:a,loading:n}=E(t);return n?e.jsxs("div",{className:"grid items-center py-[var(--spacing-1)] border-b border-border-divider",style:{gridTemplateColumns:"180px 1fr"},children:[e.jsx("div",{className:"pl-[var(--spacing-6)] text-[length:var(--font-size-xs)] text-text-tertiary",children:"Loading..."}),e.jsx("div",{})]}):a.length===0?null:e.jsx(e.Fragment,{children:a.map(i=>e.jsxs("div",{className:"grid items-center py-[var(--spacing-1)] border-b border-border-divider bg-[rgba(0,0,0,0.02)] cursor-pointer hover:bg-bg-hover transition-colors duration-[var(--duration-fast)]",style:{gridTemplateColumns:"180px 1fr"},onClick:()=>s==null?void 0:s({type:"task",task:i,phaseId:t}),children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] pl-[var(--spacing-6)] text-[length:var(--font-size-xs)]",children:[e.jsx("span",{className:"w-[6px] h-[6px] rounded-full shrink-0",style:{backgroundColor:V[i.meta.status]??"var(--color-status-pending)"}}),e.jsx("span",{className:"font-mono text-[length:10px] text-text-tertiary shrink-0",children:i.id}),e.jsx("span",{className:"text-text-secondary truncate",children:i.title}),e.jsx("span",{className:"ml-auto pr-[var(--spacing-3)] text-[length:10px] font-[var(--font-weight-medium)] shrink-0",style:{color:V[i.meta.status]??"var(--color-text-tertiary)"},children:be[i.meta.status]??i.meta.status})]}),e.jsx("div",{})]},i.id))})}function je({onSelectPhase:t,onSelectTask:s}){const a=j(d=>d.board),[n,i]=v.useState(new Set);if(!a||a.phases.length===0)return e.jsx("div",{className:"flex items-center justify-center h-full text-text-secondary text-[length:var(--font-size-sm)]",children:"No phases to display"});const x=a.phases,r=x.length,l=x.reduce((d,f)=>d+f.execution.tasks_total,0),p=x.reduce((d,f)=>d+f.execution.tasks_completed,0),o=l>0?Math.round(p/l*100):0,c=x.find(d=>d.status==="executing"),m=c?x.indexOf(c):-1,y=m>=0&&c?(()=>{const d=m/r*100,f=1/r*100,u=c.execution.tasks_total>0?c.execution.tasks_completed/c.execution.tasks_total:0;return d+f*u})():-1;function b(d){i(f=>{const u=new Set(f);return u.has(d)?u.delete(d):u.add(d),u})}return e.jsxs("div",{className:"p-[var(--spacing-4)] h-full overflow-auto",children:[e.jsxs("div",{className:"grid border-b border-border pb-[var(--spacing-2)] mb-[var(--spacing-1)]",style:{gridTemplateColumns:"180px 1fr"},children:[e.jsx("span",{className:"text-[length:11px] font-[var(--font-weight-semibold)] text-text-tertiary uppercase tracking-[0.04em]",children:"Phase"}),e.jsx("div",{className:"flex justify-between",children:fe.map(d=>e.jsx("span",{className:"text-[length:10px] text-text-tertiary",children:d},d))})]}),x.map((d,f)=>{const u=h[d.status],g=f/r*100,k=1/r*100,N=d.execution.tasks_total>0?d.execution.tasks_completed/d.execution.tasks_total:0,K=d.status==="pending"?.5:d.status==="completed"?1:.85,L=d.plan.task_count>0,S=n.has(d.phase);return e.jsxs("div",{children:[e.jsxs("div",{className:"grid items-center py-[var(--spacing-1-5)] border-b border-border-divider cursor-pointer hover:bg-bg-hover transition-colors duration-[var(--duration-fast)]",style:{gridTemplateColumns:"180px 1fr"},onClick:()=>t(d.phase),children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] text-[length:var(--font-size-xs)]",children:[L&&e.jsx("button",{type:"button",onClick:Q=>{Q.stopPropagation(),b(d.phase)},className:"w-4 h-4 flex items-center justify-center text-text-tertiary hover:text-text-primary transition-colors shrink-0","aria-label":S?"Collapse tasks":"Expand tasks",children:e.jsx("svg",{className:`w-3 h-3 transition-transform duration-150 ${S?"rotate-90":""}`,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"9 18 15 12 9 6"})})}),!L&&e.jsx("span",{className:"w-4 shrink-0"}),e.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:u}}),e.jsx("span",{className:"font-[var(--font-weight-medium)] text-text-primary truncate",children:d.title}),e.jsxs("span",{className:"ml-auto pr-[var(--spacing-3)] font-mono text-[length:10px] text-text-tertiary",children:[d.execution.tasks_completed,"/",d.execution.tasks_total]})]}),e.jsxs("div",{className:"relative h-7 bg-bg-secondary rounded-[var(--radius-default)] overflow-visible",children:[e.jsxs("div",{className:"absolute top-1 h-5 rounded-[var(--radius-default)] flex items-center px-[var(--spacing-2)] text-[length:10px] font-[var(--font-weight-semibold)] text-white transition-[width] duration-300 ease-[var(--ease-out)]",style:{left:`${g}%`,width:`${k}%`,backgroundColor:u,opacity:K},children:[N>0&&N<1&&e.jsx("div",{className:"absolute top-0 left-0 h-full rounded-[var(--radius-default)] opacity-30 bg-white",style:{width:`${N*100}%`}}),e.jsxs("span",{className:"relative z-[1] whitespace-nowrap",children:["P-",String(d.phase).padStart(2,"0"),N>0&&N<1?` (${Math.round(N*100)}%)`:""]})]}),y>=0&&(c==null?void 0:c.phase)===d.phase&&e.jsx("div",{className:"absolute top-0 bottom-0 w-0.5 bg-[var(--color-status-blocked)] z-[5] rounded-sm",style:{left:`${y}%`},children:e.jsx("span",{className:"absolute -top-[18px] -left-3 text-[length:9px] font-[var(--font-weight-semibold)] text-[var(--color-status-blocked)]",children:"Today"})})]})]}),S&&e.jsx(ye,{phaseId:d.phase,onSelectTask:s})]},d.phase)}),e.jsxs("div",{className:"mt-[var(--spacing-5)] pt-[var(--spacing-3)] border-t border-border flex items-center gap-[var(--spacing-5)]",children:[e.jsxs("span",{className:"text-[length:var(--font-size-xs)] text-text-secondary",children:[e.jsx("strong",{className:"font-[var(--font-weight-semibold)] text-text-primary",children:"Overall:"})," ",p,"/",l," tasks complete (",o,"%)"]}),e.jsx("div",{className:"w-[200px]",children:e.jsx($,{completed:p,total:l})})]})]})}const Ne={not_started:"Pending",pending:"Pending",exploring:"Explore",planning:"Plan",executing:"Execute",verifying:"Verify",testing:"Test",completed:"Done",blocked:"Blocked"};function q(t){return t==="completed"}function G(t){return t==="executing"}function we(t){return q(t)||G(t)?1:t==="verifying"||t==="testing"||t==="planning"?.7:t==="exploring"?.5:.4}function ke({phases:t}){return e.jsx("div",{className:"flex items-center gap-0 px-[var(--spacing-6)] py-[var(--spacing-4)] border-b border-border bg-bg-primary overflow-x-auto shrink-0",children:t.map((s,a)=>{const n=h[s.status],i=q(s.status),x=G(s.status),r=we(s.status);return e.jsxs("div",{className:"contents",children:[e.jsxs("div",{className:"flex flex-col items-center gap-1 shrink-0 cursor-pointer group",children:[e.jsxs("div",{className:"relative w-[42px] h-[42px] rounded-[12px] flex items-center justify-center text-[length:var(--font-size-sm)] font-bold text-white transition-transform duration-200 group-hover:scale-110",style:{backgroundColor:n,opacity:r},children:[i?e.jsx(A,{size:18,strokeWidth:2.5}):s.phase,x&&e.jsx("span",{className:"absolute -inset-1 rounded-[14px] border-2 animate-pulse opacity-30",style:{borderColor:n}})]}),e.jsx("span",{className:"text-[10px] font-[var(--font-weight-semibold)] max-w-[80px] text-center truncate text-text-tertiary",style:x?{color:n,fontWeight:700}:void 0,children:s.title}),e.jsx("span",{className:"text-[8px] font-[var(--font-weight-semibold)] uppercase tracking-wide px-[5px] py-px rounded-full",style:{backgroundColor:`color-mix(in srgb, ${n} 12%, transparent)`,color:n},children:Ne[s.status]})]}),a<t.length-1&&e.jsxs("div",{className:"relative w-10 h-0.5 shrink-0 mb-[22px]",children:[e.jsx("div",{className:"absolute inset-0 bg-border"}),i&&e.jsx("div",{className:"absolute top-0 left-0 h-full rounded-sm",style:{width:"100%",backgroundColor:"var(--color-status-completed)"}}),!i&&e.jsx("div",{className:"absolute -right-px -top-[3px] border-[3px] border-transparent border-l-[5px] border-l-border"})]})]},s.phase)})})}const Ce={not_started:"/maestro-analyze {N}",pending:"/maestro-analyze {N}",exploring:"/maestro-plan {N}",planning:"/maestro-execute {N}",executing:"/maestro-execute {N}",verifying:"/quality-review {N}",testing:"/quality-test {N}",completed:"/maestro-phase-transition",blocked:"/quality-debug"};function ze(t){const s=t.filter(a=>a.status!=="completed"&&a.status!=="blocked");return s.length===0?null:s.reduce((a,n)=>n.phase<a.phase?n:a,s[0])}function Se({phase:t}){const[s,a]=v.useState(!1),n=v.useRef(null);if(v.useEffect(()=>()=>{n.current&&clearTimeout(n.current)},[]),!t)return e.jsx("div",{className:"text-[length:var(--font-size-sm)] text-text-tertiary italic text-center py-[var(--spacing-6)]",children:"All phases complete"});const x=(Ce[t.status]??"").replace("{N}",String(t.phase)),r=h[t.status];function l(){navigator.clipboard.writeText(x).then(()=>{a(!0),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>a(!1),2e3)})}return e.jsxs("div",{className:"flex flex-col gap-[var(--spacing-2)]",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2-5)] mb-[var(--spacing-2)]",children:[e.jsx("div",{className:"w-8 h-8 rounded-[10px] flex items-center justify-center text-[length:var(--font-size-base)] font-bold text-white shrink-0",style:{backgroundColor:r},children:t.phase}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-[length:var(--font-size-sm)] font-bold text-text-primary truncate",children:t.title}),e.jsx("span",{className:"inline-block text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] px-[var(--spacing-1-5)] py-px rounded-full mt-px",style:{backgroundColor:`${r}1a`,color:r},children:t.status.replace(/_/g," ").replace(/\b\w/g,p=>p.toUpperCase())})]})]}),e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[e.jsx("code",{className:"flex-1 font-mono bg-bg-primary border border-border-divider rounded px-[var(--spacing-1-5)] py-[var(--spacing-0-5)] text-[length:var(--font-size-xs)] text-text-primary truncate",children:x}),e.jsx("button",{type:"button",onClick:l,className:"shrink-0 cursor-pointer text-text-tertiary hover:text-text-primary transition-colors text-[length:var(--font-size-xs)]",children:s?"Copied!":"Copy"})]})]})}function _e(){const t=j(a=>{var n;return((n=a.board)==null?void 0:n.phases)??[]}),s=t.find(a=>a.status==="executing")??null;return e.jsxs("div",{className:"flex flex-col overflow-hidden border-r border-r-border-divider border-b border-b-border-divider",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] px-[var(--spacing-4)] py-[var(--spacing-2-5)] border-b border-border-divider shrink-0",children:[e.jsx(ie,{size:14,strokeWidth:2,className:"text-text-tertiary"}),e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] uppercase tracking-wider text-text-tertiary",children:"Active Execution"}),s&&s.execution.current_wave>0&&e.jsxs("span",{className:"ml-auto text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] px-[var(--spacing-1-5)] py-px rounded-full",style:{backgroundColor:"rgba(184, 149, 64, 0.12)",color:h.executing},children:["Wave ",s.execution.current_wave]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-[var(--spacing-4)] py-[var(--spacing-3)]",children:s?e.jsx(Pe,{phase:s}):e.jsx(Se,{phase:ze(t)})})]})}function Pe({phase:t}){const{tasks_completed:s,tasks_total:a,current_wave:n}=t.execution,i=a>0?Math.round(s/a*100):0,x=h[t.status];return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2-5)] mb-[var(--spacing-3)]",children:[e.jsx("div",{className:"w-8 h-8 rounded-[10px] flex items-center justify-center text-[length:var(--font-size-base)] font-bold text-white",style:{backgroundColor:x},children:t.phase}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[length:var(--font-size-base)] font-bold text-text-primary",children:t.title}),t.goal&&e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-text-tertiary",children:t.goal})]})]}),e.jsxs("div",{className:"mb-[var(--spacing-3-5)]",children:[e.jsx("div",{className:"h-1.5 bg-border rounded-full overflow-hidden mb-1",children:e.jsx("div",{className:"h-full rounded-full transition-[width] duration-500 ease-out",style:{width:`${i}%`,backgroundColor:"var(--color-status-completed)"}})}),e.jsxs("div",{className:"flex justify-between text-[length:var(--font-size-xs)] text-text-tertiary",children:[e.jsxs("span",{children:[s," of ",a," tasks complete"]}),e.jsxs("span",{children:[i,"%"]})]})]}),n>0&&e.jsxs("div",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-secondary mb-[var(--spacing-1-5)]",children:["Wave ",n]}),t.plan.task_ids.length>0&&e.jsx("div",{className:"flex flex-col gap-1",children:t.plan.task_ids.map(r=>e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] px-[var(--spacing-2-5)] py-[var(--spacing-1-5)] rounded-[var(--radius-md)] bg-bg-primary border border-border-divider text-[length:var(--font-size-sm)]",children:[e.jsx("span",{className:"inline-block w-2 h-2 rounded-full shrink-0 bg-text-quaternary"}),e.jsx("span",{className:"flex-1 text-text-primary font-[var(--font-weight-medium)] truncate",children:r}),e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-mono text-text-quaternary",children:r})]},r))})]})}const Te={not_started:"Not Started",pending:"Pending",exploring:"Exploring",planning:"Planning",executing:"Executing",verifying:"Verifying",testing:"Testing",completed:"Completed",blocked:"Blocked"};function Ee(){const t=j(s=>{var a;return((a=s.board)==null?void 0:a.phases)??[]});return e.jsxs("div",{className:"flex flex-col overflow-hidden border-r border-r-border-divider border-b border-border-divider",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] px-[var(--spacing-4)] py-[var(--spacing-2-5)] border-b border-border-divider shrink-0",children:[e.jsx(F,{size:14,strokeWidth:2,className:"text-text-tertiary"}),e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] uppercase tracking-wider text-text-tertiary",children:"Phase Queue"}),e.jsxs("span",{className:"ml-auto text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] px-[var(--spacing-1-5)] py-px rounded-full bg-border-subtle text-text-secondary",children:[t.length," phases"]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-[var(--spacing-4)] py-[var(--spacing-3)]",children:t.map(s=>{const a=h[s.status],{tasks_completed:n,tasks_total:i,current_wave:x}=s.execution,r=i>0?Math.round(n/i*100):0,l=s.status==="executing",p=s.status==="completed";let o=Te[s.status];return l&&x>0&&(o+=` -- Wave ${x}`),s.verification.gaps.length>0&&(o+=` -- ${s.verification.gaps.length} gap(s)`),e.jsxs("div",{className:["flex items-center gap-[var(--spacing-2-5)] px-[var(--spacing-2-5)] py-[var(--spacing-2)] rounded-[var(--radius-md)] cursor-pointer transition-all duration-150 mb-0.5",l?"bg-[var(--color-tint-executing)]":"hover:bg-bg-primary"].join(" "),children:[e.jsx("div",{className:"w-6 h-6 rounded-[7px] flex items-center justify-center text-[length:var(--font-size-xs)] font-bold text-white shrink-0",style:{backgroundColor:a},children:p?e.jsx(A,{size:12,strokeWidth:2.5}):s.phase}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-[length:var(--font-size-sm)] font-[var(--font-weight-semibold)] text-text-primary truncate",children:s.title}),e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-text-tertiary",style:l?{color:a}:void 0,children:o})]}),e.jsxs("div",{className:"text-right shrink-0",children:[e.jsxs("div",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] font-mono text-text-tertiary",style:p?{color:a}:void 0,children:[n,"/",i]}),e.jsx("div",{className:"w-10 h-[3px] bg-border rounded-full overflow-hidden mt-0.5",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${r}%`,backgroundColor:a}})})]})]},s.phase)})})]})}function $e(){const t=j(o=>o.board),s=(t==null?void 0:t.phases)??[],a=s.reduce((o,c)=>o+c.execution.tasks_completed,0),n=s.reduce((o,c)=>o+c.execution.tasks_total,0),i=s.filter(o=>o.status==="completed").length,x=s.length,r=s.reduce((o,c)=>o+c.execution.commits.length,0),l=s.filter(o=>o.status==="verifying"||o.status==="testing"),p=s.flatMap(o=>o.verification.gaps.map(c=>({phase:o.phase,text:typeof c=="string"?c:c.description??c.id??JSON.stringify(c)})));return e.jsxs("div",{className:"flex flex-col overflow-hidden border-b border-border-divider",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] px-[var(--spacing-4)] py-[var(--spacing-2-5)] border-b border-border-divider shrink-0",children:[e.jsx(O,{size:14,strokeWidth:2,className:"text-text-tertiary"}),e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] uppercase tracking-wider text-text-tertiary",children:"Quality"})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-[var(--spacing-4)] py-[var(--spacing-3)]",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-[var(--spacing-2)] mb-[var(--spacing-3-5)]",children:[e.jsx(C,{label:"Tasks",value:a,sub:`/${n}`,detail:`${n>0?Math.round(a/n*100):0}% complete`}),e.jsx(C,{label:"Phases",value:i,sub:`/${x}`,detail:`${x>0?Math.round(i/x*100):0}% complete`}),e.jsx(C,{label:"Gaps",value:p.length,color:p.length>0?h.blocked:void 0,detail:"active"}),e.jsx(C,{label:"Commits",value:r,detail:"this milestone"})]}),l.length>0&&e.jsx("div",{className:"mb-[var(--spacing-3-5)]",children:l.map(o=>e.jsxs("div",{className:"mb-[var(--spacing-3)]",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-1-5)] text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-secondary mb-[var(--spacing-1-5)]",children:[e.jsx(O,{size:12,strokeWidth:2,style:{color:h[o.status]}}),"Verification (P-",String(o.phase).padStart(2,"0"),")"]}),o.verification.must_haves.map((c,m)=>{const b=o.verification.gaps.map(d=>typeof d=="string"?d:d.description??d.id??"").includes(c);return e.jsxs("div",{className:"flex items-center gap-[var(--spacing-1-5)] py-1 border-b border-border-divider text-[length:var(--font-size-sm)]",children:[b?e.jsx(ae,{size:12,strokeWidth:2.5,style:{color:h.blocked}}):e.jsx(A,{size:12,strokeWidth:2.5,style:{color:h.completed}}),e.jsx("span",{className:"flex-1 text-text-secondary",children:c}),e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)]",style:{color:b?h.blocked:h.completed},children:b?"Gap":"Verified"})]},m)})]},o.phase))}),s.some(o=>o.validation.test_coverage!==null)&&e.jsxs("div",{children:[e.jsx("div",{className:"flex items-center gap-[var(--spacing-1-5)] text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-secondary mb-[var(--spacing-1-5)]",children:"Test Coverage"}),s.filter(o=>o.validation.test_coverage!==null).map(o=>{const c=o.validation.test_coverage,m=typeof c=="number"?c:typeof c=="object"&&c!==null?c.statements??0:0,y=m>=80?h.completed:m>=60?h.executing:h.verifying;return e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] text-[length:var(--font-size-xs)] mb-1",children:[e.jsxs("span",{className:"w-[70px] text-text-tertiary font-[var(--font-weight-medium)]",children:["P-",String(o.phase).padStart(2,"0")]}),e.jsx("div",{className:"flex-1 h-1.5 bg-border rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${m}%`,backgroundColor:y}})}),e.jsxs("span",{className:"w-9 text-right font-mono font-[var(--font-weight-semibold)] text-text-secondary",children:[m.toFixed(1),"%"]})]},o.phase)})]})]})]})}function C({label:t,value:s,sub:a,detail:n,color:i}){return e.jsxs("div",{className:"px-[var(--spacing-3)] py-[var(--spacing-2-5)] rounded-[10px] bg-bg-primary border border-border-divider",children:[e.jsx("div",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] uppercase tracking-wide text-text-tertiary mb-1",children:t}),e.jsxs("div",{className:"text-[length:var(--font-size-xl)] font-bold text-text-primary",style:i?{color:i}:void 0,children:[s,a&&e.jsx("span",{className:"text-[length:var(--font-size-sm)] font-[var(--font-weight-medium)] text-text-tertiary",children:a})]}),e.jsx("div",{className:"text-[length:var(--font-size-xs)] text-text-tertiary mt-0.5",children:n})]})}function Ae(t){const s=[];for(const a of t){const n=h[a.status],i=`P-${String(a.phase).padStart(2,"0")} ${a.title}`;a.status==="executing"&&a.execution.current_wave>0&&s.push({color:n,time:"",text:`Wave ${a.execution.current_wave} active -- ${i}`}),a.status==="verifying"&&a.verification.gaps.length>0&&s.push({color:h.blocked,time:"",text:`${a.verification.gaps.length} gap(s) -- ${i}`}),a.status==="completed"&&s.push({color:n,time:"",text:`Completed -- ${i}`})}return s.slice(0,6)}function Le(){const t=j(a=>{var n;return((n=a.board)==null?void 0:n.phases)??[]}),s=Ae(t);return s.length===0?null:e.jsxs("div",{className:"col-span-full flex items-center gap-[var(--spacing-4)] px-[var(--spacing-4)] py-[var(--spacing-2)] border-t border-border bg-bg-secondary overflow-x-auto shrink-0",children:[e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] uppercase tracking-wider text-text-quaternary whitespace-nowrap",children:"Activity"}),s.map((a,n)=>e.jsxs("span",{className:"flex items-center gap-[var(--spacing-1-5)] text-[length:var(--font-size-xs)] text-text-secondary whitespace-nowrap shrink-0",children:[e.jsx("span",{className:"inline-block w-[5px] h-[5px] rounded-full shrink-0",style:{backgroundColor:a.color}}),a.text,n<s.length-1&&e.jsx("span",{className:"inline-block w-px h-3.5 bg-border-divider ml-[var(--spacing-4)]"})]},n))]})}function We(){const t=j(s=>{var a;return((a=s.board)==null?void 0:a.phases)??[]});return e.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[e.jsx(ke,{phases:t}),e.jsxs("div",{className:"flex-1 grid grid-cols-[1fr_1fr_320px] grid-rows-[1fr_auto] overflow-hidden",children:[e.jsx(_e,{}),e.jsx(Ee,{}),e.jsx($e,{}),e.jsx(Le,{})]})]})}const w="text-left px-[var(--spacing-3)] py-[var(--spacing-2)] text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-tertiary uppercase tracking-wide",D={pending:"var(--color-status-pending)",in_progress:"var(--color-status-executing)",completed:"var(--color-status-completed)",failed:"var(--color-status-blocked)"},Oe={pending:"Queued",in_progress:"Running",completed:"Done",failed:"Failed"};function Be({phaseId:t,onSelectTask:s}){const{tasks:a,loading:n}=E(t);return n?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"px-[var(--spacing-6)] py-[var(--spacing-2)] text-[length:var(--font-size-xs)] text-text-tertiary",children:"Loading tasks..."})}):a.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"px-[var(--spacing-6)] py-[var(--spacing-2)] text-[length:var(--font-size-xs)] text-text-tertiary",children:"No tasks"})}):e.jsx(e.Fragment,{children:a.map(i=>e.jsxs("tr",{className:"bg-[rgba(0,0,0,0.03)] border-t border-border-divider cursor-pointer hover:bg-bg-hover transition-colors",onClick:()=>s==null?void 0:s({type:"task",task:i,phaseId:t}),children:[e.jsx("td",{className:"px-[var(--spacing-3)] py-[var(--spacing-2)] pl-[var(--spacing-6)]",children:e.jsx("span",{className:"inline-block w-2 h-2 rounded-full",style:{backgroundColor:D[i.meta.status]??"var(--color-status-pending)"}})}),e.jsx("td",{className:"px-[var(--spacing-3)] py-[var(--spacing-2)] text-[length:var(--font-size-xs)] font-mono text-text-tertiary",children:i.id}),e.jsx("td",{colSpan:2,className:"px-[var(--spacing-3)] py-[var(--spacing-2)] text-[length:var(--font-size-xs)] text-text-primary",children:i.title}),e.jsx("td",{className:"px-[var(--spacing-3)] py-[var(--spacing-2)] text-center hidden sm:table-cell",children:e.jsxs("span",{className:"text-[length:10px] text-text-tertiary tabular-nums",children:["W",i.meta.wave]})}),e.jsx("td",{className:"px-[var(--spacing-3)] py-[var(--spacing-2)] text-right hidden sm:table-cell",children:e.jsx("span",{className:"text-[length:10px] font-[var(--font-weight-medium)]",style:{color:D[i.meta.status]??"var(--color-text-tertiary)"},children:Oe[i.meta.status]??i.meta.status})})]},i.id))})}function Ie({onSelectTask:t}){const s=j(r=>{var l;return((l=r.board)==null?void 0:l.phases)??[]}),[a,n]=v.useState(new Set),i=v.useMemo(()=>[...s].sort((r,l)=>r.phase-l.phase),[s]);function x(r){n(l=>{const p=new Set(l);return p.has(r)?p.delete(r):p.add(r),p})}return i.length===0?e.jsx("div",{className:"flex items-center justify-center h-full text-text-secondary text-[length:var(--font-size-sm)]",children:"No phases available"}):e.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-[var(--spacing-3)] px-[var(--spacing-4)] py-[var(--spacing-2-5)] border-b border-border-divider shrink-0 bg-bg-secondary",children:[e.jsx("span",{className:"text-[length:var(--font-size-xs)] font-[var(--font-weight-semibold)] text-text-primary",children:"All Phases"}),e.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-tertiary bg-bg-card rounded-full px-[var(--spacing-1-5)] tabular-nums",children:i.length}),e.jsx("div",{className:"ml-auto flex items-center gap-[var(--spacing-3)]",children:["executing","verifying","planning","completed"].map(r=>{const l=i.filter(p=>p.status===r||r==="verifying"&&p.status==="testing").length;return l===0?null:e.jsxs("div",{className:"flex items-center gap-[var(--spacing-1)]",children:[e.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:h[r]}}),e.jsx("span",{className:"text-[length:10px] text-text-secondary tabular-nums",children:l})]},r)})})]}),e.jsx("div",{className:"flex-1 overflow-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{className:"sticky top-0 z-10",children:e.jsxs("tr",{className:"bg-bg-secondary border-b border-border-divider",children:[e.jsx("th",{className:`${w} w-[60px]`,children:"#"}),e.jsx("th",{className:`${w} w-[120px]`,children:"Status"}),e.jsx("th",{className:w,children:"Title"}),e.jsx("th",{className:`${w} hidden lg:table-cell`,children:"Goal"}),e.jsx("th",{className:`${w} w-[60px] text-center hidden sm:table-cell`,children:"Wave"}),e.jsx("th",{className:`${w} text-right w-[130px] hidden sm:table-cell`,children:"Progress"})]})}),e.jsx("tbody",{children:i.map((r,l)=>{const{tasks_completed:p,tasks_total:o,current_wave:c}=r.execution,m=a.has(r.phase),y=r.plan.task_count>0;return e.jsxs(v.Fragment,{children:[e.jsxs("tr",{className:["border-t border-border-divider transition-colors",l%2===0?"bg-bg-primary":"bg-[rgba(0,0,0,0.015)]"].join(" "),children:[e.jsx("td",{className:"px-[var(--spacing-3)] py-[var(--spacing-2-5)] text-[length:var(--font-size-xs)] font-mono text-text-tertiary whitespace-nowrap",children:e.jsxs("div",{className:"flex items-center gap-[var(--spacing-1)]",children:[y&&e.jsx("button",{type:"button",onClick:()=>x(r.phase),className:"w-4 h-4 flex items-center justify-center text-text-tertiary hover:text-text-primary transition-colors","aria-label":m?"Collapse tasks":"Expand tasks",children:e.jsx("svg",{className:`w-3 h-3 transition-transform duration-150 ${m?"rotate-90":""}`,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"9 18 15 12 9 6"})})}),"P-",String(r.phase).padStart(2,"0")]})}),e.jsx("td",{className:"px-[var(--spacing-3)] py-[var(--spacing-2-5)]",children:e.jsx(T,{status:r.status,cardVariant:!0})}),e.jsx("td",{className:"px-[var(--spacing-3)] py-[var(--spacing-2-5)] text-[length:var(--font-size-sm)] font-[var(--font-weight-medium)] text-text-primary",children:r.title}),e.jsx("td",{className:"px-[var(--spacing-3)] py-[var(--spacing-2-5)] text-[length:var(--font-size-xs)] text-text-secondary hidden lg:table-cell max-w-[320px]",children:e.jsx("span",{className:"line-clamp-1",children:r.goal})}),e.jsx("td",{className:"px-[var(--spacing-3)] py-[var(--spacing-2-5)] text-center hidden sm:table-cell",children:r.status==="executing"&&c>0?e.jsxs("span",{className:"text-[length:10px] font-[var(--font-weight-semibold)] tabular-nums",style:{color:h.executing},children:["W",c]}):e.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-tertiary",children:"—"})}),e.jsx("td",{className:"px-[var(--spacing-3)] py-[var(--spacing-2-5)] hidden sm:table-cell",children:o>0?e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)] justify-end",children:[e.jsx("div",{className:"w-[56px]",children:e.jsx($,{completed:p,total:o,color:h[r.status]})}),e.jsxs("span",{className:"text-[length:10px] text-text-tertiary tabular-nums w-[32px] text-right shrink-0",children:[p,"/",o]})]}):e.jsx("span",{className:"text-[length:var(--font-size-xs)] text-text-tertiary block text-right",children:"—"})})]}),m&&e.jsx(Be,{phaseId:r.phase,onSelectTask:t})]},r.phase)})})]})})]})}const M=[{id:"init",label:"Initialize Project",command:"/maestro-init",description:"Set up project configuration and workspace",done:t=>!!(t!=null&&t.project_name&&t.project_name!=="")},{id:"roadmap",label:"Create Roadmap",command:"/maestro-roadmap",description:"Define phases and milestones for your project",done:t=>!1},{id:"plan",label:"Plan Phase 1",command:"/maestro-plan 1",description:"Create execution plan for the first phase",done:t=>!1}];function Re({project:t}){var x;const[s,a]=v.useState(null),n=((x=M.find(r=>!r.done(t)))==null?void 0:x.id)??null;function i(r){navigator.clipboard.writeText(r.command).catch(()=>{}),a(r.id),setTimeout(()=>a(l=>l===r.id?null:l),2e3)}return e.jsxs("div",{className:"flex flex-col gap-[var(--spacing-4)] px-[var(--spacing-6)] py-[var(--spacing-6)] h-full overflow-y-auto",children:[e.jsxs("div",{className:"flex flex-col gap-[var(--spacing-1)]",children:[e.jsx("h2",{className:"text-[length:var(--font-size-lg)] font-bold text-text-primary",children:"Project Setup"}),e.jsx("p",{className:"text-[length:var(--font-size-sm)] text-text-tertiary",children:"Run these commands to initialize your project"})]}),e.jsx("div",{className:"flex flex-col gap-[var(--spacing-3)]",children:M.map(r=>{const l=r.done(t),p=r.id===n,o=l?"rounded-[var(--radius-lg)] border border-border-divider bg-bg-primary p-[var(--spacing-4)] opacity-60":p?"rounded-[var(--radius-lg)] border border-border-focus bg-bg-secondary p-[var(--spacing-4)]":"rounded-[var(--radius-lg)] border border-border-divider bg-bg-primary p-[var(--spacing-4)]";return e.jsx("div",{className:o,children:e.jsxs("div",{className:"flex items-start gap-[var(--spacing-3)]",children:[e.jsx("div",{className:"flex-shrink-0 mt-[var(--spacing-0-5)]",children:l?e.jsx("span",{className:"text-[#5A9E78] text-[length:var(--font-size-base)] font-bold leading-none",children:"✓"}):e.jsx("span",{className:"text-text-tertiary text-[length:var(--font-size-base)] leading-none",children:"○"})}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-[var(--spacing-1-5)]",children:[e.jsx("span",{className:"text-[length:var(--font-size-base)] font-[var(--font-weight-semibold)] text-text-primary",children:r.label}),e.jsx("p",{className:"text-[length:var(--font-size-sm)] text-text-tertiary",children:r.description}),e.jsxs("div",{className:"flex items-center gap-[var(--spacing-2)]",children:[e.jsx("code",{className:"font-mono text-[length:var(--font-size-sm)] bg-bg-primary border border-border-divider rounded px-[var(--spacing-2)] py-[var(--spacing-0-5)] text-text-primary",children:r.command}),e.jsx("button",{type:"button",onClick:()=>i(r),className:"cursor-pointer text-text-tertiary hover:text-text-primary text-[length:var(--font-size-sm)] transition-colors",children:s===r.id?"Copied!":"Copy"})]})]})]})},r.id)})})]})}const U=["board","timeline","center","table"];function Qe(){const[t,s]=v.useState("board"),[a,n]=v.useState(null),{register:i,unregister:x}=v.useContext(J),{phases:r,board:l,selectedPhase:p,setSelectedPhase:o}=j(Z(u=>{var g;return{phases:((g=u.board)==null?void 0:g.phases)??[],board:u.board,selectedPhase:u.selectedPhase,setSelectedPhase:u.setSelectedPhase}})),c=v.useCallback(u=>{s(U[u]),o(null),n(null)},[o]),m=v.useCallback(u=>{n(u),o(null)},[o]),y=v.useMemo(()=>({items:[{label:"Board",icon:e.jsx(re,{size:14,strokeWidth:2}),shortcut:"1"},{label:"Timeline",icon:e.jsx(F,{size:14,strokeWidth:2}),shortcut:"2"},{label:"Center",icon:e.jsx(Y,{size:14,strokeWidth:2}),shortcut:"3"},{label:"Table",icon:e.jsx(ee,{size:14,strokeWidth:2}),shortcut:"4"}],activeIndex:U.indexOf(t),onSwitch:c}),[t,c]);v.useEffect(()=>{i(y)},[y,i]),v.useEffect(()=>()=>x(),[x]);const b=a??(p!==null?{type:"phase",phaseId:p}:null),d=b!==null,f=(b==null?void 0:b.type)==="task"?"Task Detail":"Phase Detail";return e.jsx("div",{className:"flex flex-col h-full overflow-hidden",children:e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[e.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:r.length===0?e.jsx(Re,{project:l==null?void 0:l.project}):e.jsxs(e.Fragment,{children:[t==="board"&&e.jsx(he,{onSelectTask:m}),t==="timeline"&&e.jsx(je,{onSelectPhase:u=>{n(null),o(p===u?null:u)},onSelectTask:m}),t==="center"&&e.jsx(We,{}),t==="table"&&e.jsx(Ie,{onSelectTask:m})]})}),e.jsx(te,{open:d,onClose:()=>{o(null),n(null)},title:f,children:b!==null&&e.jsx(se,{selectedItem:b})})]})})}export{Qe as WorkflowPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={kanban:"Issue Kanban",artifacts:"Artifacts",chat:"Chat",workflow:"Workflow Kanban",mcp:"MCP Manager",specs:"Specs Manager",wiki:"Wiki",teams:"Agents Team",collab:"Multi-User Collab",requirement:"Requirement",supervisor:"Supervisor",views:"Views"},t={phases:"Phases",no_phases_loaded:"No phases loaded"},s={toggle_sidebar:"Toggle sidebar",kanban_tooltip:"Kanban",artifacts_tooltip:"Artifacts",chat_tooltip:"Chat",workflow_tooltip:"Workflow",mcp_tooltip:"MCP Manager",specs_tooltip:"Specs Manager",wiki_tooltip:"Project Wiki",teams_tooltip:"Agents Team",collab_tooltip:"Multi-User Collab",requirement_tooltip:"Requirement",supervisor_tooltip:"Supervisor management",views_label:"Views",phases_label:"Phases",phase_dot_aria:"Phase {{phase}}: {{title}} — {{status}}"},o={main_content:"Main content area"},a={phase:"Phase",of:"/",connection:{connected:"Live",disconnected:"Offline",aria_connected:"Connected",aria_disconnected:"Disconnected"}},n={not_started:"Not Started",pending:"Pending",exploring:"Exploring",planning:"Planning",executing:"Executing",verifying:"Verifying",testing:"Testing",completed:"Completed",blocked:"Blocked"},i={pending:"Pending",in_progress:"In Progress",completed:"Done",failed:"Failed"},r={backlog:"Backlog",triage:"Triage",in_progress:"In Progress",review:"Review",done:"Done",deferred:"Deferred"},c={wave:"Wave",phase_aria:"Phase {{phase}}: {{title}}. Status: {{status}}. {{completed}} of {{total}} tasks completed.",task_aria:"{{type}}: {{title}}. Status: {{status}}",no_phases:"No phases",loading:"Loading board data..."},l={empty_title:"No file selected",empty_desc:"Select a file from the tree to view its contents",loading:"Loading...",breadcrumb_root:".workflow/",aria_viewer:"Artifact viewer",aria_breadcrumb:"Breadcrumb"},d="Cannot connect to dashboard server. Make sure it is running on port 3001.",u="Maestro v{{version}} is available. Run `maestro update` to upgrade.",_="Dismiss",p={en:"English",zh:"中文",aria_label:"Language switcher"},m={tabs:{overview:"Overview",commander:"Commander",executions:"Executions",coordinator:"Coordinator",schedules:"Schedules",learning:"Learning",prompts:"Prompts",extensions:"Extensions"},overview:{title:"System Overview",dispatched:"Dispatched",success_rate:"Success Rate",active_schedules:"Active Schedules",extensions:"Extensions",active:"active",completed:"completed",queued:"queued",enabled:"enabled",top_patterns:"Top Patterns",no_patterns:"No patterns recorded",suggestions:"Suggestions",no_suggestions:"No suggestions",new_count:"{{count}} new",active_executions:"Active Executions",running_count:"{{count}} running",recent_activity:"Recent Schedule Activity",view_all:"View all",no_tasks:"No scheduled tasks",th_task:"Task",th_type:"Type",th_last_run:"Last Run",th_status:"Status",event_log:"Event Log"},schedule:{title:"Schedules",new:"+ New",cancel:"Cancel",filter:"Filter schedules...",create:"Create",task_name:"Task name",select_detail:"Select a schedule to view details",run_now:"Run Now",delete:"Delete",total_runs:"Total Runs",success_rate:"Success Rate",next_run:"Next Run",configuration:"Configuration",schedule_label:"Schedule",type:"Type",last_run:"Last Run",never:"Never",run_history:"Run History",no_runs:"No runs yet",active:"active",paused:"paused"},learning:{title:"Learning",cmds_patterns:"{{cmds}} cmds / {{patterns}} patterns",search:"Search patterns & knowledge...",command_patterns:"Command Patterns",no_patterns:"No patterns",knowledge_base:"Knowledge Base",no_matches:"No matches",empty:"Empty",select_detail:"Select a pattern or knowledge entry",command_pattern:"Command Pattern",frequency:"Frequency",success_rate:"Success Rate",avg_duration:"Avg Duration",usage:"Usage",relative:"Relative",last_used:"Last Used",contexts:"Contexts",suggestions:"Suggestions",knowledge_entry:"Knowledge Entry",usage_count:"Usage Count",source:"Source",last_accessed:"Last Accessed",content:"Content",tags:"Tags",success_label:"success",used_count:"used {{count}}x"},prompts:{title:"Prompts",builders_count:"{{count}} builders",filter:"Filter builders...",no_matches:"No matches",no_modes:"No modes loaded",bound:"Bound",unbound:"Unbound",select_detail:"Select a prompt builder to view details",prompt_builder:"Prompt Builder",binding:"Binding",mode:"Mode",status:"Status",template:"Template",edit_placeholder:"Edit template...",preview:"Preview"},extensions:{title:"Extensions",loaded_count:"{{count}} loaded",filter:"Filter extensions...",no_matches:"No matches",no_extensions:"No extensions registered",select_detail:"Select an extension to view details",about:"About",no_description:"No description available",details:"Details",name:"Name",version:"Version",type:"Type",status:"Status"},executions:{title:"Active Executions",running:"Running",queued:"Queued",running_count:"{{count}} running",queued_count:"{{count}} queued",completed_today:"Completed Today",failed_today:"Failed Today",waiting_slot:"Waiting for slot",turn:"Turn"},coordinator:{title:"Coordinator",start:"Start",stop:"Stop",resume:"Resume",chain:"Chain",progress:"Progress",avg_quality:"Avg Quality",elapsed:"Elapsed",chain_steps:"Chain Steps",step_detail:"Step Detail",quality_score:"Quality Score",summary:"Summary",analysis:"Analysis",waiting_execute:"Waiting to Execute",pending_desc:"This step is pending. It will start automatically after the current step completes.",no_session:"No Active Session",no_session_desc:"Describe your intent above to start a coordination session.",clarification_needed:"Clarification Needed",send:"Send",type_response:"Type your response...",describe_intent:"Describe what you want to coordinate...",auto:"Auto",manual:"Manual",from_steps:"From {{count}} completed steps",steps_count:"{{count}} steps",tool_label:"Tool"},commander:{title:"Commander",start:"Start",pause:"Pause",stop:"Stop",resume:"Resume",metrics:"Metrics",ticks:"Ticks",workers:"Workers",session:"Session",last_tick:"Last Tick",latest_assessment:"Latest Assessment",observations:"Observations",risks:"Risks",decision_history:"Decision History",decisions_count:"{{count}} decisions",no_decisions:"No decisions yet",deferred_count:"{{count}} deferred",actions_count:"{{count}} action",actions_count_plural:"{{count}} actions",config:"Configuration",profile:"Profile",decision_model:"Model",auto_approve:"Auto Approve"},common:{just_now:"just now",minutes_ago:"{{count}}m ago",hours_ago:"{{count}}h ago"}},g={title:"Settings",loading:"Loading settings...",failed:"Failed to load settings",unsaved_confirm:"You have unsaved changes. Are you sure you want to close?",discard:"Discard",save:"Save changes",saving:"Saving...",nav:{general:"General",agents:"Agents",commander:"Commander",cli_tools:"CLI Tools",specs:"Specs",linear:"Linear",kanban:"Kanban"},general:{connection_card:"Connection",connection_desc:"WebSocket connection status to the dashboard server",connected:"Connected",disconnected:"Disconnected",appearance_card:"Appearance",appearance_desc:"Customize the dashboard look and feel",theme_label:"Theme",theme_desc:"Select the color theme for the dashboard",theme_system:"System",theme_dark:"Dark",theme_light:"Light",language_label:"Language",language_desc:"Dashboard display language",style_preset_label:"Style Preset",style_preset_desc:"Switch between visual style presets",style_default:"Default",style_cowork:"Cowork",search_tool_card:"Search Tool",search_tool_desc:"MCP tool name for semantic codebase search",search_tool_label:"Tool Name",response_lang_card:"Response Language",response_lang_desc:"Configure AI agents to respond in Chinese. Guidelines file: ~/.maestro/workflows/chinese-response.md",chinese_claude_label:"Chinese Response — Claude",chinese_claude_desc:"Add chinese-response reference to ~/.claude/CLAUDE.md",chinese_codex_label:"Chinese Response — Codex",chinese_codex_desc:"Add chinese-response content to ~/.codex/AGENTS.md",codex_migrate_hint:"Codex has old @ reference format. Toggle off and on to migrate to direct content format.",guidelines_missing:"Guidelines file not found at ~/.maestro/workflows/chinese-response.md"},agents:{show_config:"Show configuration",hide_config:"Hide configuration",model_label:"Model",model_desc:"Override the default model for this agent type",model_placeholder:"Default",approval_label:"Approval Mode",approval_desc:"How tool calls are approved",approval_suggest:"Suggest (manual)",approval_auto:"Auto-approve",base_url_label:"Base URL",base_url_desc:"Custom API endpoint (leave empty for default)",settings_file_label:"Settings File",settings_file_desc:"Path to settings JSON file",env_file_label:"Env File",env_file_desc:"Path to .env file for loading environment variables (supports ~)",claude_code_desc:"Anthropic Claude CLI agent",agent_sdk_desc:"Anthropic Agent SDK (supports custom endpoints)",codex_desc:"OpenAI Codex CLI agent",gemini_desc:"Google Gemini CLI agent",qwen_desc:"Alibaba Qwen CLI agent",opencode_desc:"Open-source code agent"},commander:{profile_card:"Profile",profile_desc:"Environment profile that presets key parameters for different deployment stages",environment_label:"Environment",environment_desc:"Select a profile preset (switch to Custom to override individual fields)",profile_development:"Development",profile_staging:"Staging",profile_production:"Production",profile_custom:"Custom",core_card:"Core Loop",core_desc:"Tick-based orchestration parameters controlling polling, concurrency, and retries",poll_interval_label:"Poll Interval (ms)",poll_interval_desc:"Time between decision loop ticks",max_workers_label:"Max Concurrent Workers",max_workers_desc:"Maximum parallel agent executions",stall_timeout_label:"Stall Timeout (ms)",stall_timeout_desc:"Marks a worker as stalled after this duration",max_retries_label:"Max Retries",max_retries_desc:"Maximum retries per issue on failure",retry_backoff_label:"Retry Backoff (ms)",retry_backoff_desc:"Delay between retry attempts",decision_card:"Decision",decision_desc:"Assessment and auto-approval settings controlling how Commander evaluates issues",decision_model_label:"Decision Model",decision_model_desc:"Model used for assessment queries",model_haiku:"Haiku (fast)",model_sonnet:"Sonnet (balanced)",model_opus:"Opus (thorough)",assess_turns_label:"Assess Max Turns",assess_turns_desc:"Max exploration turns for assessment",threshold_label:"Auto-Approve Threshold",threshold_desc:"Risk level below which actions are auto-approved",threshold_low:"Low (manual)",threshold_medium:"Medium",threshold_high:"High (fully auto)",executor_label:"Default Executor",executor_desc:"Agent type used for dispatched issues",safety_card:"Safety",safety_desc:"Protective constraints to prevent runaway loops and protect sensitive files",debounce_label:"Event Debounce (ms)",debounce_desc:"Minimum interval between processing events",circuit_breaker_label:"Circuit Breaker Threshold",circuit_breaker_desc:"Auto-pause after N consecutive failures",max_ticks_label:"Max Ticks per Hour",max_ticks_desc:"Prevent runaway decision loops",max_tokens_label:"Max Tokens per Hour",max_tokens_desc:"Token budget limit per hour",protected_paths_label:"Protected Paths",protected_paths_desc:"File globs Commander must not operate on (comma-separated)",workspace_card:"Workspace",workspace_desc:"Per-issue workspace isolation settings",workspace_enabled_label:"Enabled",workspace_enabled_desc:"Enable per-issue workspace isolation",workspace_worktree_label:"Use Worktree",workspace_worktree_desc:"Use git worktree for isolation (vs plain directory)",workspace_autocleanup_label:"Auto Cleanup",workspace_autocleanup_desc:"Automatically remove workspaces after completion",workspace_strict_label:"Strict",workspace_strict_desc:"Enforce strict workspace boundaries"},cli_tools:{config_card:"CLI Tools Configuration",config_desc:"Edit the cli-tools.json configuration file. This controls which CLI tools are available and their settings.",format_json:"Format JSON"},specs:{loading:"Loading specs...",error_card:"Specs",error_desc:"Could not load spec directory",empty_card:"Specifications",empty_desc:"No specifications found in .workflow/.spec/",empty_hint:"Run the spec-generate pipeline to create specifications.",created:"Created"},linear:{integration_card:"Linear Integration",integration_desc:"Connect to Linear for issue syncing and kanban board integration",api_key_label:"API Key",api_key_desc:"Your Linear personal API key. Get one from Linear Settings → API.",connected:"Connected",not_configured:"Not configured",checking:"Checking...",testing:"Testing...",test_connection:"Test Connection",teams_card:"Teams",teams_desc:"Linear teams accessible with this API key"},kanban:{create_card:"Issue Create Modal",create_desc:"Choose how the new issue form appears when you click + or press C",detail_card:"Issue Detail View",detail_desc:"Choose how issue details appear when you click on a card",preview_card:"Interaction Preview",preview_desc:"Click any style above to see an animated preview",create_command:"Command",create_command_desc:"Dark command palette, keyboard-first",create_form:"Form",create_form_desc:"Structured dialog with all fields",create_focus:"Focus",create_focus_desc:"Writing-first, distraction-free",detail_panel:"Panel",detail_panel_desc:"Slides in from the right side",detail_overlay:"Overlay",detail_overlay_desc:"Two-column centered modal",detail_page:"Page",detail_page_desc:"Full-screen with breadcrumb nav",preview_create:"Create Modal",preview_detail:"Detail View",create_caption_1:'Triggered by the "+" button or pressing C',create_caption_2:"Traditional form with all fields visible",create_caption_3:"Distraction-free writing experience",detail_caption_1:"Slides in from the right, board stays visible",detail_caption_2:"Centered overlay with two-column layout",detail_caption_3:"Full-screen takeover with breadcrumb navigation"}},h={nav:e,sidebar:t,dock:s,accessibility:o,topbar:a,status:n,taskStatus:i,columns:r,kanban:c,artifacts:l,connection_error:d,update_available:u,dismiss:_,language_switcher:p,supervisor:m,settings:g};export{o as accessibility,l as artifacts,r as columns,d as connection_error,h as default,_ as dismiss,s as dock,c as kanban,p as language_switcher,e as nav,g as settings,t as sidebar,n as status,m as supervisor,i as taskStatus,a as topbar,u as update_available};
|