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.
Files changed (390) hide show
  1. package/.claude/agents/workflow-planner.md +24 -8
  2. package/.claude/commands/maestro-amend.md +300 -0
  3. package/.claude/commands/maestro-analyze.md +1 -49
  4. package/.claude/commands/maestro-execute.md +2 -56
  5. package/.claude/commands/maestro-fork.md +3 -50
  6. package/.claude/commands/maestro-merge.md +2 -26
  7. package/.claude/commands/maestro-milestone-audit.md +1 -5
  8. package/.claude/commands/maestro-milestone-complete.md +1 -7
  9. package/.claude/commands/maestro-plan.md +6 -127
  10. package/.claude/commands/maestro-roadmap.md +3 -101
  11. package/.claude/commands/maestro-spec-generate.md +1 -25
  12. package/.claude/commands/maestro-ui-design.md +14 -73
  13. package/.claude/commands/maestro-verify.md +1 -32
  14. package/.claude/commands/maestro.md +13 -30
  15. package/.claude/commands/manage-harvest.md +7 -44
  16. package/.claude/commands/manage-knowhow-capture.md +193 -0
  17. package/.claude/commands/{manage-memory.md → manage-knowhow.md} +77 -88
  18. package/.claude/commands/manage-learn.md +3 -28
  19. package/.claude/commands/manage-status.md +1 -20
  20. package/.claude/commands/manage-wiki.md +1 -1
  21. package/.claude/commands/quality-business-test.md +1 -1
  22. package/.claude/commands/quality-debug.md +3 -18
  23. package/.claude/commands/quality-integration-test.md +3 -23
  24. package/.claude/commands/quality-retrospective.md +1 -28
  25. package/.claude/commands/quality-review.md +3 -52
  26. package/.claude/commands/quality-test-gen.md +1 -10
  27. package/.claude/commands/quality-test.md +3 -25
  28. package/.claude/commands/spec-add.md +1 -21
  29. package/.claude/commands/spec-load.md +1 -16
  30. package/.claude/commands/wiki-connect.md +2 -112
  31. package/.claude/commands/wiki-digest.md +2 -141
  32. package/.codex/skills/learn-decompose/SKILL.md +2 -8
  33. package/.codex/skills/maestro/SKILL.md +60 -146
  34. package/.codex/skills/maestro-analyze/SKILL.md +52 -150
  35. package/.codex/skills/maestro-brainstorm/SKILL.md +36 -91
  36. package/.codex/skills/maestro-composer/SKILL.md +4 -76
  37. package/.codex/skills/maestro-execute/SKILL.md +46 -177
  38. package/.codex/skills/maestro-init/SKILL.md +7 -51
  39. package/.codex/skills/maestro-link-coordinate/SKILL.md +56 -229
  40. package/.codex/skills/maestro-milestone-audit/SKILL.md +7 -36
  41. package/.codex/skills/maestro-milestone-complete/SKILL.md +11 -93
  42. package/.codex/skills/maestro-overlay/SKILL.md +23 -92
  43. package/.codex/skills/maestro-plan/SKILL.md +70 -166
  44. package/.codex/skills/maestro-player/SKILL.md +24 -149
  45. package/.codex/skills/maestro-quick/SKILL.md +5 -48
  46. package/.codex/skills/maestro-roadmap/SKILL.md +21 -66
  47. package/.codex/skills/maestro-spec-generate/SKILL.md +20 -56
  48. package/.codex/skills/maestro-ui-design/SKILL.md +6 -53
  49. package/.codex/skills/maestro-verify/SKILL.md +39 -136
  50. package/.codex/skills/manage-codebase-rebuild/SKILL.md +25 -75
  51. package/.codex/skills/manage-codebase-refresh/SKILL.md +5 -32
  52. package/.codex/skills/manage-issue/SKILL.md +1 -6
  53. package/.codex/skills/manage-issue-discover/SKILL.md +33 -93
  54. package/.codex/skills/{manage-memory → manage-knowhow}/SKILL.md +95 -95
  55. package/.codex/skills/manage-knowhow-capture/SKILL.md +110 -0
  56. package/.codex/skills/manage-learn/SKILL.md +17 -71
  57. package/.codex/skills/manage-status/SKILL.md +4 -35
  58. package/.codex/skills/manage-wiki/SKILL.md +1 -1
  59. package/.codex/skills/quality-business-test/SKILL.md +2 -14
  60. package/.codex/skills/quality-debug/SKILL.md +41 -133
  61. package/.codex/skills/quality-integration-test/SKILL.md +36 -145
  62. package/.codex/skills/quality-refactor/SKILL.md +6 -59
  63. package/.codex/skills/quality-retrospective/SKILL.md +292 -531
  64. package/.codex/skills/quality-review/SKILL.md +30 -65
  65. package/.codex/skills/quality-sync/SKILL.md +2 -11
  66. package/.codex/skills/quality-test/SKILL.md +4 -45
  67. package/.codex/skills/quality-test-gen/SKILL.md +33 -121
  68. package/.codex/skills/spec-add/SKILL.md +2 -9
  69. package/.codex/skills/spec-load/SKILL.md +4 -14
  70. package/.codex/skills/spec-map/SKILL.md +4 -37
  71. package/.codex/skills/spec-remove/SKILL.md +3 -35
  72. package/.codex/skills/spec-setup/SKILL.md +2 -19
  73. package/.codex/skills/team-coordinate/SKILL.md +20 -132
  74. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +61 -215
  75. package/.codex/skills/team-executor/SKILL.md +7 -66
  76. package/.codex/skills/team-executor/roles/executor/commands/monitor.md +60 -182
  77. package/.codex/skills/team-executor/specs/session-schema.md +22 -56
  78. package/.codex/skills/team-lifecycle-v4/SKILL.md +22 -143
  79. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +31 -223
  80. package/.codex/skills/team-quality-assurance/SKILL.md +14 -88
  81. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +46 -186
  82. package/.codex/skills/team-review/SKILL.md +12 -86
  83. package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +49 -187
  84. package/.codex/skills/team-tech-debt/SKILL.md +11 -50
  85. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +50 -239
  86. package/.codex/skills/team-testing/SKILL.md +14 -99
  87. package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +52 -228
  88. package/.codex/skills/wiki-connect/SKILL.md +2 -5
  89. package/README.md +6 -0
  90. package/README.zh-CN.md +6 -0
  91. package/chains/_intent-map.json +7 -7
  92. package/chains/singles/{memory-capture.json → knowhow-capture.json} +5 -5
  93. package/chains/singles/{memory.json → knowhow.json} +6 -6
  94. package/dashboard/dist/assets/{ArtifactsPage-CUrrDGgN.js → ArtifactsPage-iJZtYsmR.js} +6 -6
  95. package/dashboard/dist/assets/ChatInput-DNnDLdQF.js +6 -0
  96. package/dashboard/dist/assets/ChatPage-BjBibfE4.js +22 -0
  97. package/dashboard/dist/assets/{CollabPage-DIUXeazv.js → CollabPage-8lUMUol_.js} +1 -1
  98. package/dashboard/dist/assets/{ExecutionPanel-VmYeADFj.js → ExecutionPanel-BKV3GZ7Q.js} +1 -1
  99. package/dashboard/dist/assets/{KanbanPage-DLq8v7hg.js → KanbanPage-diY3QmGd.js} +2 -2
  100. package/dashboard/dist/assets/{MarkdownRenderer-D7AehrnR.js → MarkdownRenderer-cYFfe1uX.js} +1 -1
  101. package/dashboard/dist/assets/McpPage-COjuIf7U.js +21 -0
  102. package/dashboard/dist/assets/MeetingRoomPage-wnvT7wlB.js +85 -0
  103. package/dashboard/dist/assets/{OutputPanel-B-Rjwgmv.js → OutputPanel-DDL90Idy.js} +1 -1
  104. package/dashboard/dist/assets/{ProblemsPanel-GEpF-oi4.js → ProblemsPanel-zFN9IIs0.js} +1 -1
  105. package/dashboard/dist/assets/{RequirementBoardPage-xs8uDM7I.js → RequirementBoardPage-DOPJoT0I.js} +2 -2
  106. package/dashboard/dist/assets/{RequirementPage-BKDSFwjA.js → RequirementPage-CEVquRgM.js} +1 -1
  107. package/dashboard/dist/assets/RoomsPage-D5USEWDh.js +1 -0
  108. package/dashboard/dist/assets/{SpecsPage-DLFb9ZH0.js → SpecsPage-BOwBin_o.js} +1 -1
  109. package/dashboard/dist/assets/{SupervisorPage-SOki_kgz.js → SupervisorPage-5iRyMU5T.js} +1 -1
  110. package/dashboard/dist/assets/TeamsPage-DlcEmr_Q.js +1 -0
  111. package/dashboard/dist/assets/{TreeBrowser-B9DHdULE.js → TreeBrowser-Y48Wz-QY.js} +1 -1
  112. package/dashboard/dist/assets/WorkflowPage-CmQaRVgL.js +6 -0
  113. package/dashboard/dist/assets/arrow-left-NCUOENvg.js +6 -0
  114. package/dashboard/dist/assets/{check-DJDk3A2a.js → check-o7nfGNHf.js} +1 -1
  115. package/dashboard/dist/assets/{chevron-right-C7bVDreZ.js → chevron-right-BXySK2fn.js} +1 -1
  116. package/dashboard/dist/assets/{circle-alert-Na1vf6qQ.js → circle-alert-DcSBokh4.js} +1 -1
  117. package/dashboard/dist/assets/{circle-check-CEGgy3NV.js → circle-check-Cd-jce4j.js} +1 -1
  118. package/dashboard/dist/assets/{circle-check-big-3JB8zRYj.js → circle-check-big-BN7Mdp4i.js} +1 -1
  119. package/dashboard/dist/assets/{circle-Qfgy4LB_.js → circle-cooAwnAR.js} +1 -1
  120. package/dashboard/dist/assets/{code-Ble63Idz.js → code-BQa9oL1n.js} +1 -1
  121. package/dashboard/dist/assets/{columns-3-BUcKlxve.js → columns-3-BzgxelGx.js} +1 -1
  122. package/dashboard/dist/assets/{download-CMqkfn8x.js → download-swRJnate.js} +1 -1
  123. package/dashboard/dist/assets/en-C_BD3UCD.js +1 -0
  124. package/dashboard/dist/assets/{folder-B9ewx9LL.js → folder-DbGbLNFN.js} +1 -1
  125. package/dashboard/dist/assets/index-BEUaOz_b.css +1 -0
  126. package/dashboard/dist/assets/{index-JTmGteaT.js → index-DIoMBMbv.js} +1 -1
  127. package/dashboard/dist/assets/index-DLBN_7fb.js +44 -0
  128. package/dashboard/dist/assets/index-uIqUCT8y.js +236 -0
  129. package/dashboard/dist/assets/{list-DI8Wn2aT.js → list-BTRAIvDq.js} +1 -1
  130. package/dashboard/dist/assets/loader-NHtB6Mdn.js +6 -0
  131. package/dashboard/dist/assets/{minus-Lp_BfctG.js → minus-BjMxRTET.js} +1 -1
  132. package/dashboard/dist/assets/{pen-line-Ch7sphzZ.js → pen-line-C4_O16H0.js} +1 -1
  133. package/dashboard/dist/assets/{pencil-_yRMHmGT.js → pencil-DTmKhyDY.js} +1 -1
  134. package/dashboard/dist/assets/{proxy-D72Y8a4Y.js → proxy-Dtx5p6IO.js} +1 -1
  135. package/dashboard/dist/assets/rows-2-GR1dZtRu.js +6 -0
  136. package/dashboard/dist/assets/{search-BS6fI6Bg.js → search-DVtgy2W7.js} +1 -1
  137. package/dashboard/dist/assets/{shallow-BXasQBvr.js → shallow-BOmvDNsv.js} +1 -1
  138. package/dashboard/dist/assets/{table-CeGlFjlP.js → table-DCzuJAFh.js} +1 -1
  139. package/dashboard/dist/assets/team-types-BPeOvVdA.js +6 -0
  140. package/dashboard/dist/assets/{terminal-BJic2yW-.js → terminal-CzogW4cl.js} +1 -1
  141. package/dashboard/dist/assets/{trash-2-Czz4X8Fb.js → trash-2-52LATVfW.js} +1 -1
  142. package/dashboard/dist/assets/users-DLFE2voE.js +6 -0
  143. package/dashboard/dist/assets/{zap-C3H0jVFA.js → zap-DhiYlgyZ.js} +1 -1
  144. package/dashboard/dist/assets/zh-CN-DvQKfow3.js +1 -0
  145. package/dashboard/dist/index.html +2 -2
  146. package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.d.ts +2 -0
  147. package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.js +19 -11
  148. package/dashboard/dist-server/dashboard/src/server/agents/agent-manager.js.map +1 -1
  149. package/dashboard/dist-server/dashboard/src/server/agents/agent-sdk-adapter.js +5 -0
  150. package/dashboard/dist-server/dashboard/src/server/agents/agent-sdk-adapter.js.map +1 -1
  151. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.d.ts +1 -0
  152. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +21 -4
  153. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
  154. package/dashboard/dist-server/dashboard/src/server/agents/env-cleanup.js +8 -0
  155. package/dashboard/dist-server/dashboard/src/server/agents/env-cleanup.js.map +1 -1
  156. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js +6 -6
  157. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.js.map +1 -1
  158. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.test.js +2 -2
  159. package/dashboard/dist-server/dashboard/src/server/coordinator/chain-map.test.js.map +1 -1
  160. package/dashboard/dist-server/dashboard/src/server/index.js +14 -3
  161. package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
  162. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/mcp-config-builder.d.ts +24 -0
  163. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/mcp-config-builder.js +220 -0
  164. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/mcp-config-builder.js.map +1 -0
  165. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/mcp-config-builder.test.d.ts +1 -0
  166. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/mcp-config-builder.test.js +115 -0
  167. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/mcp-config-builder.test.js.map +1 -0
  168. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/meeting-room-mcp-server.d.ts +44 -0
  169. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/meeting-room-mcp-server.js +260 -0
  170. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/meeting-room-mcp-server.js.map +1 -0
  171. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/meeting-room-mcp-server.test.d.ts +1 -0
  172. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/meeting-room-mcp-server.test.js +194 -0
  173. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/meeting-room-mcp-server.test.js.map +1 -0
  174. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/stdio-bridge.d.ts +2 -0
  175. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/stdio-bridge.js +279 -0
  176. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/stdio-bridge.js.map +1 -0
  177. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/tcp-helpers.d.ts +14 -0
  178. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/tcp-helpers.js +131 -0
  179. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/tcp-helpers.js.map +1 -0
  180. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/tcp-helpers.test.d.ts +1 -0
  181. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/tcp-helpers.test.js +134 -0
  182. package/dashboard/dist-server/dashboard/src/server/rooms/mcp-server/tcp-helpers.test.js.map +1 -0
  183. package/dashboard/dist-server/dashboard/src/server/rooms/meeting-room-session.d.ts +51 -0
  184. package/dashboard/dist-server/dashboard/src/server/rooms/meeting-room-session.js +185 -0
  185. package/dashboard/dist-server/dashboard/src/server/rooms/meeting-room-session.js.map +1 -0
  186. package/dashboard/dist-server/dashboard/src/server/rooms/room-agent-registry.d.ts +29 -0
  187. package/dashboard/dist-server/dashboard/src/server/rooms/room-agent-registry.js +125 -0
  188. package/dashboard/dist-server/dashboard/src/server/rooms/room-agent-registry.js.map +1 -0
  189. package/dashboard/dist-server/dashboard/src/server/rooms/room-mailbox.d.ts +18 -0
  190. package/dashboard/dist-server/dashboard/src/server/rooms/room-mailbox.js +63 -0
  191. package/dashboard/dist-server/dashboard/src/server/rooms/room-mailbox.js.map +1 -0
  192. package/dashboard/dist-server/dashboard/src/server/rooms/room-session-manager.d.ts +19 -0
  193. package/dashboard/dist-server/dashboard/src/server/rooms/room-session-manager.js +45 -0
  194. package/dashboard/dist-server/dashboard/src/server/rooms/room-session-manager.js.map +1 -0
  195. package/dashboard/dist-server/dashboard/src/server/rooms/room-task-board.d.ts +25 -0
  196. package/dashboard/dist-server/dashboard/src/server/rooms/room-task-board.js +115 -0
  197. package/dashboard/dist-server/dashboard/src/server/rooms/room-task-board.js.map +1 -0
  198. package/dashboard/dist-server/dashboard/src/server/rooms/room-types.d.ts +53 -0
  199. package/dashboard/dist-server/dashboard/src/server/rooms/room-types.js +5 -0
  200. package/dashboard/dist-server/dashboard/src/server/rooms/room-types.js.map +1 -0
  201. package/dashboard/dist-server/dashboard/src/server/routes/agents.js +6 -0
  202. package/dashboard/dist-server/dashboard/src/server/routes/agents.js.map +1 -1
  203. package/dashboard/dist-server/dashboard/src/server/routes/cli-history.js +20 -1
  204. package/dashboard/dist-server/dashboard/src/server/routes/cli-history.js.map +1 -1
  205. package/dashboard/dist-server/dashboard/src/server/routes/index.d.ts +2 -1
  206. package/dashboard/dist-server/dashboard/src/server/routes/index.js +8 -1
  207. package/dashboard/dist-server/dashboard/src/server/routes/index.js.map +1 -1
  208. package/dashboard/dist-server/dashboard/src/server/routes/install.js +1 -1
  209. package/dashboard/dist-server/dashboard/src/server/routes/install.js.map +1 -1
  210. package/dashboard/dist-server/dashboard/src/server/routes/mcp.js +2 -2
  211. package/dashboard/dist-server/dashboard/src/server/routes/mcp.js.map +1 -1
  212. package/dashboard/dist-server/dashboard/src/server/routes/room-mcp.d.ts +3 -0
  213. package/dashboard/dist-server/dashboard/src/server/routes/room-mcp.js +246 -0
  214. package/dashboard/dist-server/dashboard/src/server/routes/room-mcp.js.map +1 -0
  215. package/dashboard/dist-server/dashboard/src/server/routes/rooms.d.ts +3 -0
  216. package/dashboard/dist-server/dashboard/src/server/routes/rooms.js +38 -0
  217. package/dashboard/dist-server/dashboard/src/server/routes/rooms.js.map +1 -0
  218. package/dashboard/dist-server/dashboard/src/server/routes/wiki.integration.test.js +7 -7
  219. package/dashboard/dist-server/dashboard/src/server/routes/wiki.integration.test.js.map +1 -1
  220. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +1 -1
  221. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
  222. package/dashboard/dist-server/dashboard/src/server/state/event-bus.d.ts +39 -1
  223. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +12 -0
  224. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
  225. package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js +1 -1
  226. package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js.map +1 -1
  227. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +25 -14
  228. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  229. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js +6 -6
  230. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.test.js.map +1 -1
  231. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +1 -1
  232. package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js +17 -16
  233. package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js.map +1 -1
  234. package/dashboard/dist-server/dashboard/src/server/wiki/writer.d.ts +1 -1
  235. package/dashboard/dist-server/dashboard/src/server/wiki/writer.js +18 -7
  236. package/dashboard/dist-server/dashboard/src/server/wiki/writer.js.map +1 -1
  237. package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.d.ts +3 -1
  238. package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js +75 -1
  239. package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js.map +1 -1
  240. package/dashboard/dist-server/dashboard/src/server/ws/handlers/room-handler.d.ts +17 -0
  241. package/dashboard/dist-server/dashboard/src/server/ws/handlers/room-handler.js +192 -0
  242. package/dashboard/dist-server/dashboard/src/server/ws/handlers/room-handler.js.map +1 -0
  243. package/dashboard/dist-server/dashboard/src/server/ws/session-scoped-event-filter.d.ts +13 -0
  244. package/dashboard/dist-server/dashboard/src/server/ws/session-scoped-event-filter.js +37 -0
  245. package/dashboard/dist-server/dashboard/src/server/ws/session-scoped-event-filter.js.map +1 -0
  246. package/dashboard/dist-server/dashboard/src/server/ws/ws-manager.d.ts +7 -1
  247. package/dashboard/dist-server/dashboard/src/server/ws/ws-manager.js +39 -2
  248. package/dashboard/dist-server/dashboard/src/server/ws/ws-manager.js.map +1 -1
  249. package/dashboard/dist-server/dashboard/src/shared/constants.js +12 -0
  250. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  251. package/dashboard/dist-server/dashboard/src/shared/room-leader-prompt.d.ts +1 -0
  252. package/dashboard/dist-server/dashboard/src/shared/room-leader-prompt.js +38 -0
  253. package/dashboard/dist-server/dashboard/src/shared/room-leader-prompt.js.map +1 -0
  254. package/dashboard/dist-server/dashboard/src/shared/team-types.d.ts +66 -0
  255. package/dashboard/dist-server/dashboard/src/shared/team-types.js.map +1 -1
  256. package/dashboard/dist-server/dashboard/src/shared/types.d.ts +24 -3
  257. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +76 -2
  258. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
  259. package/dashboard/dist-server/shared/agent-types.d.ts +2 -0
  260. package/dashboard/dist-server/src/commands/delegate.js +11 -8
  261. package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
  262. package/dist/shared/agent-types.d.ts +2 -0
  263. package/dist/shared/agent-types.d.ts.map +1 -1
  264. package/dist/src/cli.js +2 -2
  265. package/dist/src/cli.js.map +1 -1
  266. package/dist/src/commands/delegate.d.ts.map +1 -1
  267. package/dist/src/commands/delegate.js +11 -8
  268. package/dist/src/commands/delegate.js.map +1 -1
  269. package/dist/src/commands/install-backend.d.ts +1 -1
  270. package/dist/src/commands/install-backend.d.ts.map +1 -1
  271. package/dist/src/commands/install-backend.js +1 -1
  272. package/dist/src/commands/install-backend.js.map +1 -1
  273. package/dist/src/commands/install-ui/ExecutionView.d.ts.map +1 -1
  274. package/dist/src/commands/install-ui/ExecutionView.js +4 -1
  275. package/dist/src/commands/install-ui/ExecutionView.js.map +1 -1
  276. package/dist/src/commands/install-ui/InstallExecution.d.ts.map +1 -1
  277. package/dist/src/commands/install-ui/InstallExecution.js +4 -1
  278. package/dist/src/commands/install-ui/InstallExecution.js.map +1 -1
  279. package/dist/src/commands/install.js +5 -5
  280. package/dist/src/commands/install.js.map +1 -1
  281. package/dist/src/commands/knowhow.d.ts +10 -0
  282. package/dist/src/commands/knowhow.d.ts.map +1 -0
  283. package/dist/src/commands/knowhow.js +217 -0
  284. package/dist/src/commands/knowhow.js.map +1 -0
  285. package/dist/src/commands/overlay-ui/OverlayList.d.ts +2 -0
  286. package/dist/src/commands/overlay-ui/OverlayList.d.ts.map +1 -1
  287. package/dist/src/commands/overlay-ui/OverlayList.js +6 -3
  288. package/dist/src/commands/overlay-ui/OverlayList.js.map +1 -1
  289. package/dist/src/commands/overlay-ui/index.d.ts.map +1 -1
  290. package/dist/src/commands/overlay-ui/index.js +70 -44
  291. package/dist/src/commands/overlay-ui/index.js.map +1 -1
  292. package/dist/src/commands/overlay.d.ts.map +1 -1
  293. package/dist/src/commands/overlay.js +4 -3
  294. package/dist/src/commands/overlay.js.map +1 -1
  295. package/dist/src/commands/update.d.ts.map +1 -1
  296. package/dist/src/commands/update.js +31 -21
  297. package/dist/src/commands/update.js.map +1 -1
  298. package/dist/src/core/manifest.d.ts +8 -1
  299. package/dist/src/core/manifest.d.ts.map +1 -1
  300. package/dist/src/core/manifest.js +3 -1
  301. package/dist/src/core/manifest.js.map +1 -1
  302. package/dist/src/core/overlay/applier.d.ts +1 -1
  303. package/dist/src/core/overlay/applier.d.ts.map +1 -1
  304. package/dist/src/core/overlay/applier.js +40 -13
  305. package/dist/src/core/overlay/applier.js.map +1 -1
  306. package/dist/src/core/overlay/loader.d.ts.map +1 -1
  307. package/dist/src/core/overlay/loader.js +6 -0
  308. package/dist/src/core/overlay/loader.js.map +1 -1
  309. package/dist/src/core/overlay/types.d.ts +5 -1
  310. package/dist/src/core/overlay/types.d.ts.map +1 -1
  311. package/dist/src/core/overlay/types.js +1 -1
  312. package/dist/src/core/overlay/types.js.map +1 -1
  313. package/dist/src/hooks/context-monitor.js +1 -1
  314. package/dist/src/hooks/context-monitor.js.map +1 -1
  315. package/dist/src/hooks/skill-context.js +1 -1
  316. package/dist/src/hooks/skill-context.js.map +1 -1
  317. package/dist/src/mcp/delegate-channel-relay.d.ts +4 -0
  318. package/dist/src/mcp/delegate-channel-relay.d.ts.map +1 -1
  319. package/dist/src/mcp/delegate-channel-relay.js +73 -4
  320. package/dist/src/mcp/delegate-channel-relay.js.map +1 -1
  321. package/dist/src/tools/index.js +2 -2
  322. package/dist/src/tools/index.js.map +1 -1
  323. package/dist/src/tools/store-knowhow.d.ts +21 -0
  324. package/dist/src/tools/store-knowhow.d.ts.map +1 -0
  325. package/dist/src/tools/store-knowhow.js +295 -0
  326. package/dist/src/tools/store-knowhow.js.map +1 -0
  327. package/package.json +1 -1
  328. package/shared/agent-types.ts +2 -0
  329. package/workflows/analyze.md +61 -185
  330. package/workflows/brainstorm.md +3 -23
  331. package/workflows/codebase-rebuild.md +79 -191
  332. package/workflows/codebase-refresh.md +26 -124
  333. package/workflows/debug.md +21 -141
  334. package/workflows/execute.md +183 -350
  335. package/workflows/fork.md +72 -230
  336. package/workflows/harvest.md +12 -79
  337. package/workflows/init.md +3 -17
  338. package/workflows/integration-test.md +21 -190
  339. package/workflows/issue-analyze.md +35 -153
  340. package/workflows/issue-discover.md +88 -263
  341. package/workflows/issue-execute.md +29 -208
  342. package/workflows/issue-plan.md +33 -154
  343. package/workflows/issue.md +44 -202
  344. package/workflows/knowhow.md +374 -0
  345. package/workflows/learn.md +30 -177
  346. package/workflows/maestro-coordinate.codex.md +77 -362
  347. package/workflows/maestro-link-coordinate.md +12 -61
  348. package/workflows/maestro.codex.md +124 -457
  349. package/workflows/maestro.md +562 -976
  350. package/workflows/map.md +16 -53
  351. package/workflows/merge.md +42 -197
  352. package/workflows/milestone-audit.md +5 -43
  353. package/workflows/milestone-complete.md +11 -60
  354. package/workflows/plan.md +188 -387
  355. package/workflows/quick.md +25 -174
  356. package/workflows/refactor.md +28 -221
  357. package/workflows/retrospective.md +104 -443
  358. package/workflows/review.md +87 -299
  359. package/workflows/roadmap.md +117 -97
  360. package/workflows/spec-generate.md +22 -118
  361. package/workflows/specs-add.md +5 -25
  362. package/workflows/specs-load.md +1 -5
  363. package/workflows/specs-remove.md +0 -11
  364. package/workflows/specs-setup.md +11 -47
  365. package/workflows/status.md +58 -200
  366. package/workflows/sync.md +28 -141
  367. package/workflows/test-gen.md +23 -100
  368. package/workflows/test.md +15 -125
  369. package/workflows/ui-design.md +139 -465
  370. package/workflows/ui-style.md +36 -228
  371. package/workflows/verify.md +52 -273
  372. package/workflows/wiki-connect.md +9 -46
  373. package/workflows/wiki-digest.md +7 -50
  374. package/workflows/wiki-manage.md +11 -108
  375. package/.claude/commands/maestro-coordinate.md +0 -63
  376. package/.claude/commands/manage-memory-capture.md +0 -59
  377. package/.codex/skills/maestro-coordinate/SKILL.md +0 -213
  378. package/.codex/skills/manage-memory-capture/SKILL.md +0 -93
  379. package/dashboard/dist/assets/ChatInput-pUOLJIKE.js +0 -49
  380. package/dashboard/dist/assets/ChatPage-B8Xqkt0v.js +0 -27
  381. package/dashboard/dist/assets/McpPage-BY0SjTgw.js +0 -21
  382. package/dashboard/dist/assets/TeamsPage-BO2kP70F.js +0 -11
  383. package/dashboard/dist/assets/WorkflowPage-C8hWbYim.js +0 -6
  384. package/dashboard/dist/assets/en-ZbRpfzuP.js +0 -1
  385. package/dashboard/dist/assets/index-C2Mcb4TJ.js +0 -231
  386. package/dashboard/dist/assets/index-DyBbPc18.css +0 -1
  387. package/dashboard/dist/assets/loader-B5F6PzFT.js +0 -11
  388. package/dashboard/dist/assets/zh-CN-CoXBFuny.js +0 -1
  389. package/workflows/maestro-coordinate.md +0 -582
  390. package/workflows/memory.md +0 -451
@@ -0,0 +1 @@
1
+ import{r as c,j as e,p as se,a8 as re,M as ae,aa as g,X as M,ab as Q,ac as Y,F as R,k as U,s as ne,V as ie,n as oe}from"./index-uIqUCT8y.js";import{L as le}from"./list-BTRAIvDq.js";import{S as ce}from"./search-DVtgy2W7.js";import{C as de}from"./chevron-right-BXySK2fn.js";import{T as xe}from"./trash-2-52LATVfW.js";import{P as B,T as I,R as pe,A as q,S as me}from"./team-types-BPeOvVdA.js";import{A as J}from"./arrow-left-NCUOENvg.js";import{U as W}from"./users-DLFE2voE.js";import{L as ue}from"./loader-NHtB6Mdn.js";import{u as he,f as fe,L as H,m as T}from"./proxy-Dtx5p6IO.js";import{A as O}from"./index-DIoMBMbv.js";const be=t=>!t.isLayoutDirty&&t.willUpdate(!1);function G(){const t=new Set,s=new WeakMap,r=()=>t.forEach(be);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 ge=c.createContext(null);function ye(){const t=c.useRef(!1);return he(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function ve(){const t=ye(),[s,r]=c.useState(0),i=c.useCallback(()=>{t.current&&r(s+1)},[s]);return[c.useCallback(()=>fe.postRender(i),[i]),s]}const Z=t=>t===!0,je=t=>Z(t===!0)||t==="id",Ne=({children:t,id:s,inherit:r=!0})=>{const i=c.useContext(H),a=c.useContext(ge),[f,h]=ve(),x=c.useRef(null),m=i.id||a;x.current===null&&(je(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})},we={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"},ke={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 Se({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 Ce({session:t,onClick:s,onDelete:r}){const i=we[t.skill]??"#A09D97",a=ke[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(Se,{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(xe,{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:B[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(se,{size:11,strokeWidth:2}),t.taskProgress.completed,"/",t.taskProgress.total," tasks"]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(re,{size:11,strokeWidth:2}),t.duration||"--"]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(ae,{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(de,{size:14,className:"text-text-placeholder group-hover:text-accent-blue transition-colors"})]})]})}const Ae=["all","active","completed","failed","archived"];function Le({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(ce,{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:Ae.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(Ce,{session:n,onClick:()=>void u(n.sessionId),onDelete:p=>void o(p)},n.sessionId))}),t==="table"&&b.length>0&&e.jsx(De,{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 De({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 ee({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(M,{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(Te,{waves:t.pipeline.waves}):e.jsx("div",{className:"flex gap-1.5 flex-wrap",children:t.pipelineStages.map(a=>e.jsx(Be,{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(Ie,{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(Re,{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 Te({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),D=b,L=E.y+N.nodeH/2;w.push(e.jsx("line",{x1:p+2,y1:j,x2:D-2,y2:L,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=B[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:Ee(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 Ee(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 Be({node:t}){const s=B[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 Ie({role:t}){const s=pe[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 Re({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 Oe(){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=`${Q.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 D=I[t.status],L=new Map;for(const l of t.files){const y=l.category;L.has(y)||L.set(y,[]),L.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:`${D}18`,color:D},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: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:()=>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:`${D}18`,color:D},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:B[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:`${B[l.status]}18`,color:B[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(L.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(Y,{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(M,{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(ee,{session:t,open:a,onClose:()=>f(!1)})]})}function ze(){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 Fe={idle:"Idle",active:"Active",busy:"Busy",error:"Error",offline:"Offline"},$e=new Set(["active","busy"]);function Pe({status:t,role:s}){const r=ze(),i=q[t],a=$e.has(t);return e.jsxs("div",{className:"inline-flex items-center gap-1.5",children:[e.jsxs(T.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(T.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:Fe[t]},t)})]})]})}function Me(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 _e(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 We({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=Me(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&&(ne({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=q[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(Pe,{status:r,role:t}),e.jsx("div",{className:"flex-1"}),u&&e.jsx(ue,{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(T.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:_e(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(me,{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"}],P={initialization:"#4A90D9",planning:"#8B6BBF",execution:"#B89540",review:"#3D9B6F",completion:"#5A9E78"};function Ue(){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 He(){const t=g(x=>x.phaseState),s=Ue(),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:`${P[r]}18`,color:P[r]},children:r})]}),e.jsx(Ne,{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=P[x.key];return e.jsxs("div",{className:"flex items-center",children:[e.jsxs(T.div,{layout:!0,className:"flex flex-col items-center gap-1",transition:{duration:h,ease:"easeOut"},children:[e.jsxs(T.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(T.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(T.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:P[$[m+1].key]}})]})]},x.key)})})})]})}function Ge(){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=`${Q.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 te=await A.json();k(JSON.stringify(te,null,2))}else k(await A.text())}catch{k("// Failed to load file content")}p(!1)}},[s]),D=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 L=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(He,{})}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[10px] font-semibold",style:{background:`${L}18`,color:L},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:L}}),e.jsx("span",{className:"relative inline-flex rounded-full w-1.5 h-1.5",style:{backgroundColor:L}})]}),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(T.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(We,{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(T.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(M,{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:()=>D(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(Y,{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(M,{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(ee,{session:t,open:h,onClose:()=>x(!1)})]})}const Xe=[{label:"Cards",icon:e.jsx(oe,{size:14,strokeWidth:1.8}),shortcut:"1"},{label:"Table",icon:e.jsx(le,{size:14,strokeWidth:1.8}),shortcut:"2"}],K=["cards","table"],Ve={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(ie),u=c.useCallback(o=>s(K[o]),[s]);return c.useEffect(()=>{r?m():x({items:Xe.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(Ge,{}):e.jsx(Oe,{}):e.jsx("div",{className:"flex flex-col h-full overflow-hidden",children:e.jsx(O,{mode:"wait",children:e.jsx(T.div,{className:"flex-1 flex flex-col overflow-hidden",variants:Ve,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.25,ease:[.34,1.56,.64,1]},children:e.jsx(Le,{viewMode:t})},t)})})}export{it as TeamsPage};
@@ -1,4 +1,4 @@
1
- import{d as m,r as p,j as t,F as v}from"./index-C2Mcb4TJ.js";import{S as g}from"./search-BS6fI6Bg.js";import{F as b,a as y,D as j}from"./folder-B9ewx9LL.js";/**
1
+ import{d as m,r as p,j as t,F as v}from"./index-uIqUCT8y.js";import{S as g}from"./search-DVtgy2W7.js";import{F as b,a as y,D as j}from"./folder-DbGbLNFN.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1,6 @@
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-uIqUCT8y.js";import{u as Z}from"./shallow-BOmvDNsv.js";import{c as E,S as T,P as $,b as ee,D as te,K as se}from"./table-DCzuJAFh.js";import{C as A}from"./check-o7nfGNHf.js";import{L as F}from"./list-BTRAIvDq.js";import{C as O}from"./circle-check-Cd-jce4j.js";import{C as ae}from"./circle-alert-DcSBokh4.js";import{C as re}from"./columns-3-BzgxelGx.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-milestone-audit",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};
@@ -0,0 +1,6 @@
1
+ import{d as o}from"./index-uIqUCT8y.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 e=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],r=o("arrow-left",e);export{r as A};
@@ -1,4 +1,4 @@
1
- import{d as c}from"./index-C2Mcb4TJ.js";/**
1
+ import{d as c}from"./index-uIqUCT8y.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{d as o}from"./index-C2Mcb4TJ.js";/**
1
+ import{d as o}from"./index-uIqUCT8y.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{d as e}from"./index-C2Mcb4TJ.js";/**
1
+ import{d as e}from"./index-uIqUCT8y.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{d as c}from"./index-C2Mcb4TJ.js";/**
1
+ import{d as c}from"./index-uIqUCT8y.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{d as c}from"./index-C2Mcb4TJ.js";/**
1
+ import{d as c}from"./index-uIqUCT8y.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{d as c}from"./index-C2Mcb4TJ.js";/**
1
+ import{d as c}from"./index-uIqUCT8y.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{d as o}from"./index-C2Mcb4TJ.js";/**
1
+ import{d as o}from"./index-uIqUCT8y.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{d as t}from"./index-C2Mcb4TJ.js";/**
1
+ import{d as t}from"./index-uIqUCT8y.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{d as o}from"./index-C2Mcb4TJ.js";/**
1
+ import{d as o}from"./index-uIqUCT8y.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1 @@
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",rooms:"Meeting Room",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",rooms_tooltip:"Meeting Room",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};
@@ -1,4 +1,4 @@
1
- import{d as a}from"./index-C2Mcb4TJ.js";/**
1
+ import{d as a}from"./index-uIqUCT8y.js";/**
2
2
  * @license lucide-react v0.577.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.