@mcp-graph-workflow/mcp-graph 3.0.0

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 (606) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +157 -0
  3. package/dist/api/middleware/error-handler.d.ts +3 -0
  4. package/dist/api/middleware/error-handler.d.ts.map +1 -0
  5. package/dist/api/middleware/error-handler.js +48 -0
  6. package/dist/api/middleware/error-handler.js.map +1 -0
  7. package/dist/api/middleware/request-logger.d.ts +6 -0
  8. package/dist/api/middleware/request-logger.d.ts.map +1 -0
  9. package/dist/api/middleware/request-logger.js +19 -0
  10. package/dist/api/middleware/request-logger.js.map +1 -0
  11. package/dist/api/middleware/validate.d.ts +5 -0
  12. package/dist/api/middleware/validate.d.ts.map +1 -0
  13. package/dist/api/middleware/validate.js +23 -0
  14. package/dist/api/middleware/validate.js.map +1 -0
  15. package/dist/api/router.d.ts +11 -0
  16. package/dist/api/router.d.ts.map +1 -0
  17. package/dist/api/router.js +51 -0
  18. package/dist/api/router.js.map +1 -0
  19. package/dist/api/routes/benchmark.d.ts +4 -0
  20. package/dist/api/routes/benchmark.d.ts.map +1 -0
  21. package/dist/api/routes/benchmark.js +86 -0
  22. package/dist/api/routes/benchmark.js.map +1 -0
  23. package/dist/api/routes/capture.d.ts +3 -0
  24. package/dist/api/routes/capture.d.ts.map +1 -0
  25. package/dist/api/routes/capture.js +31 -0
  26. package/dist/api/routes/capture.js.map +1 -0
  27. package/dist/api/routes/context.d.ts +4 -0
  28. package/dist/api/routes/context.d.ts.map +1 -0
  29. package/dist/api/routes/context.js +25 -0
  30. package/dist/api/routes/context.js.map +1 -0
  31. package/dist/api/routes/docs-cache.d.ts +4 -0
  32. package/dist/api/routes/docs-cache.d.ts.map +1 -0
  33. package/dist/api/routes/docs-cache.js +79 -0
  34. package/dist/api/routes/docs-cache.js.map +1 -0
  35. package/dist/api/routes/edges.d.ts +4 -0
  36. package/dist/api/routes/edges.d.ts.map +1 -0
  37. package/dist/api/routes/edges.js +50 -0
  38. package/dist/api/routes/edges.js.map +1 -0
  39. package/dist/api/routes/events.d.ts +4 -0
  40. package/dist/api/routes/events.d.ts.map +1 -0
  41. package/dist/api/routes/events.js +37 -0
  42. package/dist/api/routes/events.js.map +1 -0
  43. package/dist/api/routes/gitnexus.d.ts +12 -0
  44. package/dist/api/routes/gitnexus.d.ts.map +1 -0
  45. package/dist/api/routes/gitnexus.js +162 -0
  46. package/dist/api/routes/gitnexus.js.map +1 -0
  47. package/dist/api/routes/graph.d.ts +4 -0
  48. package/dist/api/routes/graph.d.ts.map +1 -0
  49. package/dist/api/routes/graph.js +39 -0
  50. package/dist/api/routes/graph.js.map +1 -0
  51. package/dist/api/routes/import.d.ts +4 -0
  52. package/dist/api/routes/import.d.ts.map +1 -0
  53. package/dist/api/routes/import.js +92 -0
  54. package/dist/api/routes/import.js.map +1 -0
  55. package/dist/api/routes/insights.d.ts +4 -0
  56. package/dist/api/routes/insights.d.ts.map +1 -0
  57. package/dist/api/routes/insights.js +40 -0
  58. package/dist/api/routes/insights.js.map +1 -0
  59. package/dist/api/routes/integrations.d.ts +4 -0
  60. package/dist/api/routes/integrations.d.ts.map +1 -0
  61. package/dist/api/routes/integrations.js +85 -0
  62. package/dist/api/routes/integrations.js.map +1 -0
  63. package/dist/api/routes/knowledge.d.ts +8 -0
  64. package/dist/api/routes/knowledge.d.ts.map +1 -0
  65. package/dist/api/routes/knowledge.js +144 -0
  66. package/dist/api/routes/knowledge.js.map +1 -0
  67. package/dist/api/routes/nodes.d.ts +4 -0
  68. package/dist/api/routes/nodes.d.ts.map +1 -0
  69. package/dist/api/routes/nodes.js +123 -0
  70. package/dist/api/routes/nodes.js.map +1 -0
  71. package/dist/api/routes/project.d.ts +4 -0
  72. package/dist/api/routes/project.d.ts.map +1 -0
  73. package/dist/api/routes/project.js +70 -0
  74. package/dist/api/routes/project.js.map +1 -0
  75. package/dist/api/routes/rag.d.ts +8 -0
  76. package/dist/api/routes/rag.d.ts.map +1 -0
  77. package/dist/api/routes/rag.js +70 -0
  78. package/dist/api/routes/rag.js.map +1 -0
  79. package/dist/api/routes/search.d.ts +4 -0
  80. package/dist/api/routes/search.d.ts.map +1 -0
  81. package/dist/api/routes/search.js +25 -0
  82. package/dist/api/routes/search.js.map +1 -0
  83. package/dist/api/routes/skills.d.ts +3 -0
  84. package/dist/api/routes/skills.d.ts.map +1 -0
  85. package/dist/api/routes/skills.js +16 -0
  86. package/dist/api/routes/skills.js.map +1 -0
  87. package/dist/api/routes/stats.d.ts +4 -0
  88. package/dist/api/routes/stats.d.ts.map +1 -0
  89. package/dist/api/routes/stats.js +14 -0
  90. package/dist/api/routes/stats.js.map +1 -0
  91. package/dist/cli/commands/import-cmd.d.ts +3 -0
  92. package/dist/cli/commands/import-cmd.d.ts.map +1 -0
  93. package/dist/cli/commands/import-cmd.js +38 -0
  94. package/dist/cli/commands/import-cmd.js.map +1 -0
  95. package/dist/cli/commands/index-cmd.d.ts +3 -0
  96. package/dist/cli/commands/index-cmd.d.ts.map +1 -0
  97. package/dist/cli/commands/index-cmd.js +50 -0
  98. package/dist/cli/commands/index-cmd.js.map +1 -0
  99. package/dist/cli/commands/init.d.ts +3 -0
  100. package/dist/cli/commands/init.d.ts.map +1 -0
  101. package/dist/cli/commands/init.js +24 -0
  102. package/dist/cli/commands/init.js.map +1 -0
  103. package/dist/cli/commands/serve.d.ts +3 -0
  104. package/dist/cli/commands/serve.d.ts.map +1 -0
  105. package/dist/cli/commands/serve.js +18 -0
  106. package/dist/cli/commands/serve.js.map +1 -0
  107. package/dist/cli/commands/stats.d.ts +3 -0
  108. package/dist/cli/commands/stats.d.ts.map +1 -0
  109. package/dist/cli/commands/stats.js +39 -0
  110. package/dist/cli/commands/stats.js.map +1 -0
  111. package/dist/cli/index.d.ts +3 -0
  112. package/dist/cli/index.d.ts.map +1 -0
  113. package/dist/cli/index.js +30 -0
  114. package/dist/cli/index.js.map +1 -0
  115. package/dist/core/capture/content-extractor.d.ts +21 -0
  116. package/dist/core/capture/content-extractor.d.ts.map +1 -0
  117. package/dist/core/capture/content-extractor.js +74 -0
  118. package/dist/core/capture/content-extractor.js.map +1 -0
  119. package/dist/core/capture/validate-runner.d.ts +28 -0
  120. package/dist/core/capture/validate-runner.d.ts.map +1 -0
  121. package/dist/core/capture/validate-runner.js +42 -0
  122. package/dist/core/capture/validate-runner.js.map +1 -0
  123. package/dist/core/capture/web-capture.d.ts +20 -0
  124. package/dist/core/capture/web-capture.d.ts.map +1 -0
  125. package/dist/core/capture/web-capture.js +51 -0
  126. package/dist/core/capture/web-capture.js.map +1 -0
  127. package/dist/core/config/ai-memory-generator.d.ts +14 -0
  128. package/dist/core/config/ai-memory-generator.d.ts.map +1 -0
  129. package/dist/core/config/ai-memory-generator.js +130 -0
  130. package/dist/core/config/ai-memory-generator.js.map +1 -0
  131. package/dist/core/config/config-loader.d.ts +3 -0
  132. package/dist/core/config/config-loader.d.ts.map +1 -0
  133. package/dist/core/config/config-loader.js +48 -0
  134. package/dist/core/config/config-loader.js.map +1 -0
  135. package/dist/core/config/config-schema.d.ts +12 -0
  136. package/dist/core/config/config-schema.d.ts.map +1 -0
  137. package/dist/core/config/config-schema.js +13 -0
  138. package/dist/core/config/config-schema.js.map +1 -0
  139. package/dist/core/context/bm25-compressor.d.ts +21 -0
  140. package/dist/core/context/bm25-compressor.d.ts.map +1 -0
  141. package/dist/core/context/bm25-compressor.js +87 -0
  142. package/dist/core/context/bm25-compressor.js.map +1 -0
  143. package/dist/core/context/compact-context.d.ts +56 -0
  144. package/dist/core/context/compact-context.d.ts.map +1 -0
  145. package/dist/core/context/compact-context.js +170 -0
  146. package/dist/core/context/compact-context.js.map +1 -0
  147. package/dist/core/context/context-assembler.d.ts +43 -0
  148. package/dist/core/context/context-assembler.d.ts.map +1 -0
  149. package/dist/core/context/context-assembler.js +113 -0
  150. package/dist/core/context/context-assembler.js.map +1 -0
  151. package/dist/core/context/rag-context.d.ts +44 -0
  152. package/dist/core/context/rag-context.d.ts.map +1 -0
  153. package/dist/core/context/rag-context.js +93 -0
  154. package/dist/core/context/rag-context.js.map +1 -0
  155. package/dist/core/context/tiered-context.d.ts +35 -0
  156. package/dist/core/context/tiered-context.d.ts.map +1 -0
  157. package/dist/core/context/tiered-context.js +92 -0
  158. package/dist/core/context/tiered-context.js.map +1 -0
  159. package/dist/core/context/token-estimator.d.ts +7 -0
  160. package/dist/core/context/token-estimator.d.ts.map +1 -0
  161. package/dist/core/context/token-estimator.js +9 -0
  162. package/dist/core/context/token-estimator.js.map +1 -0
  163. package/dist/core/docs/docs-cache-store.d.ts +24 -0
  164. package/dist/core/docs/docs-cache-store.d.ts.map +1 -0
  165. package/dist/core/docs/docs-cache-store.js +61 -0
  166. package/dist/core/docs/docs-cache-store.js.map +1 -0
  167. package/dist/core/docs/docs-syncer.d.ts +13 -0
  168. package/dist/core/docs/docs-syncer.d.ts.map +1 -0
  169. package/dist/core/docs/docs-syncer.js +38 -0
  170. package/dist/core/docs/docs-syncer.js.map +1 -0
  171. package/dist/core/docs/mcp-context7-fetcher.d.ts +17 -0
  172. package/dist/core/docs/mcp-context7-fetcher.d.ts.map +1 -0
  173. package/dist/core/docs/mcp-context7-fetcher.js +87 -0
  174. package/dist/core/docs/mcp-context7-fetcher.js.map +1 -0
  175. package/dist/core/docs/stack-detector.d.ts +21 -0
  176. package/dist/core/docs/stack-detector.d.ts.map +1 -0
  177. package/dist/core/docs/stack-detector.js +101 -0
  178. package/dist/core/docs/stack-detector.js.map +1 -0
  179. package/dist/core/events/event-bus.d.ts +26 -0
  180. package/dist/core/events/event-bus.d.ts.map +1 -0
  181. package/dist/core/events/event-bus.js +47 -0
  182. package/dist/core/events/event-bus.js.map +1 -0
  183. package/dist/core/events/event-types.d.ts +71 -0
  184. package/dist/core/events/event-types.d.ts.map +1 -0
  185. package/dist/core/events/event-types.js +2 -0
  186. package/dist/core/events/event-types.js.map +1 -0
  187. package/dist/core/graph/graph-indexes.d.ts +3 -0
  188. package/dist/core/graph/graph-indexes.d.ts.map +1 -0
  189. package/dist/core/graph/graph-indexes.js +28 -0
  190. package/dist/core/graph/graph-indexes.js.map +1 -0
  191. package/dist/core/graph/graph-types.d.ts +72 -0
  192. package/dist/core/graph/graph-types.d.ts.map +1 -0
  193. package/dist/core/graph/graph-types.js +2 -0
  194. package/dist/core/graph/graph-types.js.map +1 -0
  195. package/dist/core/graph/mermaid-export.d.ts +9 -0
  196. package/dist/core/graph/mermaid-export.d.ts.map +1 -0
  197. package/dist/core/graph/mermaid-export.js +80 -0
  198. package/dist/core/graph/mermaid-export.js.map +1 -0
  199. package/dist/core/importer/import-prd.d.ts +7 -0
  200. package/dist/core/importer/import-prd.d.ts.map +1 -0
  201. package/dist/core/importer/import-prd.js +7 -0
  202. package/dist/core/importer/import-prd.js.map +1 -0
  203. package/dist/core/importer/prd-to-graph.d.ts +18 -0
  204. package/dist/core/importer/prd-to-graph.d.ts.map +1 -0
  205. package/dist/core/importer/prd-to-graph.js +195 -0
  206. package/dist/core/importer/prd-to-graph.js.map +1 -0
  207. package/dist/core/insights/bottleneck-detector.d.ts +31 -0
  208. package/dist/core/insights/bottleneck-detector.d.ts.map +1 -0
  209. package/dist/core/insights/bottleneck-detector.js +84 -0
  210. package/dist/core/insights/bottleneck-detector.js.map +1 -0
  211. package/dist/core/insights/metrics-calculator.d.ts +31 -0
  212. package/dist/core/insights/metrics-calculator.d.ts.map +1 -0
  213. package/dist/core/insights/metrics-calculator.js +78 -0
  214. package/dist/core/insights/metrics-calculator.js.map +1 -0
  215. package/dist/core/insights/skill-recommender.d.ts +21 -0
  216. package/dist/core/insights/skill-recommender.d.ts.map +1 -0
  217. package/dist/core/insights/skill-recommender.js +129 -0
  218. package/dist/core/insights/skill-recommender.js.map +1 -0
  219. package/dist/core/integrations/enriched-context.d.ts +24 -0
  220. package/dist/core/integrations/enriched-context.d.ts.map +1 -0
  221. package/dist/core/integrations/enriched-context.js +89 -0
  222. package/dist/core/integrations/enriched-context.js.map +1 -0
  223. package/dist/core/integrations/gitnexus-launcher.d.ts +62 -0
  224. package/dist/core/integrations/gitnexus-launcher.d.ts.map +1 -0
  225. package/dist/core/integrations/gitnexus-launcher.js +241 -0
  226. package/dist/core/integrations/gitnexus-launcher.js.map +1 -0
  227. package/dist/core/integrations/gitnexus-queries.d.ts +55 -0
  228. package/dist/core/integrations/gitnexus-queries.d.ts.map +1 -0
  229. package/dist/core/integrations/gitnexus-queries.js +168 -0
  230. package/dist/core/integrations/gitnexus-queries.js.map +1 -0
  231. package/dist/core/integrations/integration-orchestrator.d.ts +51 -0
  232. package/dist/core/integrations/integration-orchestrator.d.ts.map +1 -0
  233. package/dist/core/integrations/integration-orchestrator.js +118 -0
  234. package/dist/core/integrations/integration-orchestrator.js.map +1 -0
  235. package/dist/core/integrations/mcp-deps-installer.d.ts +21 -0
  236. package/dist/core/integrations/mcp-deps-installer.d.ts.map +1 -0
  237. package/dist/core/integrations/mcp-deps-installer.js +114 -0
  238. package/dist/core/integrations/mcp-deps-installer.js.map +1 -0
  239. package/dist/core/integrations/mcp-servers-config.d.ts +21 -0
  240. package/dist/core/integrations/mcp-servers-config.d.ts.map +1 -0
  241. package/dist/core/integrations/mcp-servers-config.js +58 -0
  242. package/dist/core/integrations/mcp-servers-config.js.map +1 -0
  243. package/dist/core/integrations/serena-reader.d.ts +18 -0
  244. package/dist/core/integrations/serena-reader.d.ts.map +1 -0
  245. package/dist/core/integrations/serena-reader.js +68 -0
  246. package/dist/core/integrations/serena-reader.js.map +1 -0
  247. package/dist/core/integrations/tool-status.d.ts +18 -0
  248. package/dist/core/integrations/tool-status.d.ts.map +1 -0
  249. package/dist/core/integrations/tool-status.js +97 -0
  250. package/dist/core/integrations/tool-status.js.map +1 -0
  251. package/dist/core/parser/classify.d.ts +31 -0
  252. package/dist/core/parser/classify.d.ts.map +1 -0
  253. package/dist/core/parser/classify.js +128 -0
  254. package/dist/core/parser/classify.js.map +1 -0
  255. package/dist/core/parser/extract.d.ts +21 -0
  256. package/dist/core/parser/extract.d.ts.map +1 -0
  257. package/dist/core/parser/extract.js +66 -0
  258. package/dist/core/parser/extract.js.map +1 -0
  259. package/dist/core/parser/file-reader.d.ts +13 -0
  260. package/dist/core/parser/file-reader.d.ts.map +1 -0
  261. package/dist/core/parser/file-reader.js +52 -0
  262. package/dist/core/parser/file-reader.js.map +1 -0
  263. package/dist/core/parser/normalize.d.ts +9 -0
  264. package/dist/core/parser/normalize.d.ts.map +1 -0
  265. package/dist/core/parser/normalize.js +22 -0
  266. package/dist/core/parser/normalize.js.map +1 -0
  267. package/dist/core/parser/read-file.d.ts +7 -0
  268. package/dist/core/parser/read-file.d.ts.map +1 -0
  269. package/dist/core/parser/read-file.js +17 -0
  270. package/dist/core/parser/read-file.js.map +1 -0
  271. package/dist/core/parser/read-html.d.ts +7 -0
  272. package/dist/core/parser/read-html.d.ts.map +1 -0
  273. package/dist/core/parser/read-html.js +51 -0
  274. package/dist/core/parser/read-html.js.map +1 -0
  275. package/dist/core/parser/read-pdf.d.ts +10 -0
  276. package/dist/core/parser/read-pdf.d.ts.map +1 -0
  277. package/dist/core/parser/read-pdf.js +16 -0
  278. package/dist/core/parser/read-pdf.js.map +1 -0
  279. package/dist/core/parser/segment.d.ts +13 -0
  280. package/dist/core/parser/segment.d.ts.map +1 -0
  281. package/dist/core/parser/segment.js +53 -0
  282. package/dist/core/parser/segment.js.map +1 -0
  283. package/dist/core/planner/decompose.d.ts +25 -0
  284. package/dist/core/planner/decompose.d.ts.map +1 -0
  285. package/dist/core/planner/decompose.js +100 -0
  286. package/dist/core/planner/decompose.js.map +1 -0
  287. package/dist/core/planner/dependency-chain.d.ts +20 -0
  288. package/dist/core/planner/dependency-chain.d.ts.map +1 -0
  289. package/dist/core/planner/dependency-chain.js +163 -0
  290. package/dist/core/planner/dependency-chain.js.map +1 -0
  291. package/dist/core/planner/enhanced-next.d.ts +25 -0
  292. package/dist/core/planner/enhanced-next.d.ts.map +1 -0
  293. package/dist/core/planner/enhanced-next.js +88 -0
  294. package/dist/core/planner/enhanced-next.js.map +1 -0
  295. package/dist/core/planner/lifecycle-phase.d.ts +21 -0
  296. package/dist/core/planner/lifecycle-phase.d.ts.map +1 -0
  297. package/dist/core/planner/lifecycle-phase.js +93 -0
  298. package/dist/core/planner/lifecycle-phase.js.map +1 -0
  299. package/dist/core/planner/next-task.d.ts +16 -0
  300. package/dist/core/planner/next-task.d.ts.map +1 -0
  301. package/dist/core/planner/next-task.js +146 -0
  302. package/dist/core/planner/next-task.js.map +1 -0
  303. package/dist/core/planner/planning-report.d.ts +38 -0
  304. package/dist/core/planner/planning-report.d.ts.map +1 -0
  305. package/dist/core/planner/planning-report.js +140 -0
  306. package/dist/core/planner/planning-report.js.map +1 -0
  307. package/dist/core/planner/velocity.d.ts +38 -0
  308. package/dist/core/planner/velocity.d.ts.map +1 -0
  309. package/dist/core/planner/velocity.js +92 -0
  310. package/dist/core/planner/velocity.js.map +1 -0
  311. package/dist/core/rag/capture-indexer.d.ts +16 -0
  312. package/dist/core/rag/capture-indexer.d.ts.map +1 -0
  313. package/dist/core/rag/capture-indexer.js +37 -0
  314. package/dist/core/rag/capture-indexer.js.map +1 -0
  315. package/dist/core/rag/chunk-text.d.ts +27 -0
  316. package/dist/core/rag/chunk-text.d.ts.map +1 -0
  317. package/dist/core/rag/chunk-text.js +112 -0
  318. package/dist/core/rag/chunk-text.js.map +1 -0
  319. package/dist/core/rag/docs-indexer.d.ts +18 -0
  320. package/dist/core/rag/docs-indexer.d.ts.map +1 -0
  321. package/dist/core/rag/docs-indexer.js +57 -0
  322. package/dist/core/rag/docs-indexer.js.map +1 -0
  323. package/dist/core/rag/embedding-store.d.ts +51 -0
  324. package/dist/core/rag/embedding-store.d.ts.map +1 -0
  325. package/dist/core/rag/embedding-store.js +134 -0
  326. package/dist/core/rag/embedding-store.js.map +1 -0
  327. package/dist/core/rag/rag-pipeline.d.ts +48 -0
  328. package/dist/core/rag/rag-pipeline.d.ts.map +1 -0
  329. package/dist/core/rag/rag-pipeline.js +276 -0
  330. package/dist/core/rag/rag-pipeline.js.map +1 -0
  331. package/dist/core/rag/serena-indexer.d.ts +16 -0
  332. package/dist/core/rag/serena-indexer.d.ts.map +1 -0
  333. package/dist/core/rag/serena-indexer.js +50 -0
  334. package/dist/core/rag/serena-indexer.js.map +1 -0
  335. package/dist/core/rag/serena-rag-query.d.ts +34 -0
  336. package/dist/core/rag/serena-rag-query.d.ts.map +1 -0
  337. package/dist/core/rag/serena-rag-query.js +83 -0
  338. package/dist/core/rag/serena-rag-query.js.map +1 -0
  339. package/dist/core/search/fts-search.d.ts +16 -0
  340. package/dist/core/search/fts-search.d.ts.map +1 -0
  341. package/dist/core/search/fts-search.js +62 -0
  342. package/dist/core/search/fts-search.js.map +1 -0
  343. package/dist/core/search/tfidf.d.ts +32 -0
  344. package/dist/core/search/tfidf.d.ts.map +1 -0
  345. package/dist/core/search/tfidf.js +67 -0
  346. package/dist/core/search/tfidf.js.map +1 -0
  347. package/dist/core/search/tokenizer.d.ts +9 -0
  348. package/dist/core/search/tokenizer.d.ts.map +1 -0
  349. package/dist/core/search/tokenizer.js +37 -0
  350. package/dist/core/search/tokenizer.js.map +1 -0
  351. package/dist/core/store/knowledge-store.d.ts +72 -0
  352. package/dist/core/store/knowledge-store.d.ts.map +1 -0
  353. package/dist/core/store/knowledge-store.js +166 -0
  354. package/dist/core/store/knowledge-store.js.map +1 -0
  355. package/dist/core/store/migrations.d.ts +4 -0
  356. package/dist/core/store/migrations.d.ts.map +1 -0
  357. package/dist/core/store/migrations.js +223 -0
  358. package/dist/core/store/migrations.js.map +1 -0
  359. package/dist/core/store/sqlite-store.d.ts +86 -0
  360. package/dist/core/store/sqlite-store.d.ts.map +1 -0
  361. package/dist/core/store/sqlite-store.js +707 -0
  362. package/dist/core/store/sqlite-store.js.map +1 -0
  363. package/dist/core/utils/constants.d.ts +10 -0
  364. package/dist/core/utils/constants.d.ts.map +1 -0
  365. package/dist/core/utils/constants.js +10 -0
  366. package/dist/core/utils/constants.js.map +1 -0
  367. package/dist/core/utils/errors.d.ts +20 -0
  368. package/dist/core/utils/errors.d.ts.map +1 -0
  369. package/dist/core/utils/errors.js +39 -0
  370. package/dist/core/utils/errors.js.map +1 -0
  371. package/dist/core/utils/fs.d.ts +2 -0
  372. package/dist/core/utils/fs.d.ts.map +1 -0
  373. package/dist/core/utils/fs.js +11 -0
  374. package/dist/core/utils/fs.js.map +1 -0
  375. package/dist/core/utils/id.d.ts +2 -0
  376. package/dist/core/utils/id.d.ts.map +1 -0
  377. package/dist/core/utils/id.js +6 -0
  378. package/dist/core/utils/id.js.map +1 -0
  379. package/dist/core/utils/logger.d.ts +8 -0
  380. package/dist/core/utils/logger.d.ts.map +1 -0
  381. package/dist/core/utils/logger.js +28 -0
  382. package/dist/core/utils/logger.js.map +1 -0
  383. package/dist/core/utils/platform.d.ts +18 -0
  384. package/dist/core/utils/platform.d.ts.map +1 -0
  385. package/dist/core/utils/platform.js +43 -0
  386. package/dist/core/utils/platform.js.map +1 -0
  387. package/dist/core/utils/time.d.ts +2 -0
  388. package/dist/core/utils/time.d.ts.map +1 -0
  389. package/dist/core/utils/time.js +4 -0
  390. package/dist/core/utils/time.js.map +1 -0
  391. package/dist/index.d.ts +10 -0
  392. package/dist/index.d.ts.map +1 -0
  393. package/dist/index.js +9 -0
  394. package/dist/index.js.map +1 -0
  395. package/dist/mcp/init-project.d.ts +2 -0
  396. package/dist/mcp/init-project.d.ts.map +1 -0
  397. package/dist/mcp/init-project.js +144 -0
  398. package/dist/mcp/init-project.js.map +1 -0
  399. package/dist/mcp/lifecycle-wrapper.d.ts +26 -0
  400. package/dist/mcp/lifecycle-wrapper.d.ts.map +1 -0
  401. package/dist/mcp/lifecycle-wrapper.js +67 -0
  402. package/dist/mcp/lifecycle-wrapper.js.map +1 -0
  403. package/dist/mcp/server.d.ts +3 -0
  404. package/dist/mcp/server.d.ts.map +1 -0
  405. package/dist/mcp/server.js +73 -0
  406. package/dist/mcp/server.js.map +1 -0
  407. package/dist/mcp/stdio.d.ts +3 -0
  408. package/dist/mcp/stdio.d.ts.map +1 -0
  409. package/dist/mcp/stdio.js +20 -0
  410. package/dist/mcp/stdio.js.map +1 -0
  411. package/dist/mcp/tools/add-node.d.ts +4 -0
  412. package/dist/mcp/tools/add-node.d.ts.map +1 -0
  413. package/dist/mcp/tools/add-node.js +83 -0
  414. package/dist/mcp/tools/add-node.js.map +1 -0
  415. package/dist/mcp/tools/bulk-update-status.d.ts +4 -0
  416. package/dist/mcp/tools/bulk-update-status.d.ts.map +1 -0
  417. package/dist/mcp/tools/bulk-update-status.js +22 -0
  418. package/dist/mcp/tools/bulk-update-status.js.map +1 -0
  419. package/dist/mcp/tools/clone-node.d.ts +4 -0
  420. package/dist/mcp/tools/clone-node.d.ts.map +1 -0
  421. package/dist/mcp/tools/clone-node.js +111 -0
  422. package/dist/mcp/tools/clone-node.js.map +1 -0
  423. package/dist/mcp/tools/context.d.ts +4 -0
  424. package/dist/mcp/tools/context.d.ts.map +1 -0
  425. package/dist/mcp/tools/context.js +30 -0
  426. package/dist/mcp/tools/context.js.map +1 -0
  427. package/dist/mcp/tools/decompose.d.ts +4 -0
  428. package/dist/mcp/tools/decompose.d.ts.map +1 -0
  429. package/dist/mcp/tools/decompose.js +25 -0
  430. package/dist/mcp/tools/decompose.js.map +1 -0
  431. package/dist/mcp/tools/delete-node.d.ts +4 -0
  432. package/dist/mcp/tools/delete-node.d.ts.map +1 -0
  433. package/dist/mcp/tools/delete-node.js +29 -0
  434. package/dist/mcp/tools/delete-node.js.map +1 -0
  435. package/dist/mcp/tools/dependencies.d.ts +4 -0
  436. package/dist/mcp/tools/dependencies.d.ts.map +1 -0
  437. package/dist/mcp/tools/dependencies.js +47 -0
  438. package/dist/mcp/tools/dependencies.js.map +1 -0
  439. package/dist/mcp/tools/edge.d.ts +4 -0
  440. package/dist/mcp/tools/edge.d.ts.map +1 -0
  441. package/dist/mcp/tools/edge.js +140 -0
  442. package/dist/mcp/tools/edge.js.map +1 -0
  443. package/dist/mcp/tools/export.d.ts +4 -0
  444. package/dist/mcp/tools/export.d.ts.map +1 -0
  445. package/dist/mcp/tools/export.js +38 -0
  446. package/dist/mcp/tools/export.js.map +1 -0
  447. package/dist/mcp/tools/import-prd.d.ts +4 -0
  448. package/dist/mcp/tools/import-prd.d.ts.map +1 -0
  449. package/dist/mcp/tools/import-prd.js +81 -0
  450. package/dist/mcp/tools/import-prd.js.map +1 -0
  451. package/dist/mcp/tools/index.d.ts +4 -0
  452. package/dist/mcp/tools/index.d.ts.map +1 -0
  453. package/dist/mcp/tools/index.js +58 -0
  454. package/dist/mcp/tools/index.js.map +1 -0
  455. package/dist/mcp/tools/init.d.ts +4 -0
  456. package/dist/mcp/tools/init.d.ts.map +1 -0
  457. package/dist/mcp/tools/init.js +18 -0
  458. package/dist/mcp/tools/init.js.map +1 -0
  459. package/dist/mcp/tools/list.d.ts +4 -0
  460. package/dist/mcp/tools/list.d.ts.map +1 -0
  461. package/dist/mcp/tools/list.js +56 -0
  462. package/dist/mcp/tools/list.js.map +1 -0
  463. package/dist/mcp/tools/move-node.d.ts +4 -0
  464. package/dist/mcp/tools/move-node.d.ts.map +1 -0
  465. package/dist/mcp/tools/move-node.js +110 -0
  466. package/dist/mcp/tools/move-node.js.map +1 -0
  467. package/dist/mcp/tools/next.d.ts +4 -0
  468. package/dist/mcp/tools/next.d.ts.map +1 -0
  469. package/dist/mcp/tools/next.js +32 -0
  470. package/dist/mcp/tools/next.js.map +1 -0
  471. package/dist/mcp/tools/plan-sprint.d.ts +4 -0
  472. package/dist/mcp/tools/plan-sprint.d.ts.map +1 -0
  473. package/dist/mcp/tools/plan-sprint.js +54 -0
  474. package/dist/mcp/tools/plan-sprint.js.map +1 -0
  475. package/dist/mcp/tools/rag-context.d.ts +4 -0
  476. package/dist/mcp/tools/rag-context.d.ts.map +1 -0
  477. package/dist/mcp/tools/rag-context.js +51 -0
  478. package/dist/mcp/tools/rag-context.js.map +1 -0
  479. package/dist/mcp/tools/reindex-knowledge.d.ts +4 -0
  480. package/dist/mcp/tools/reindex-knowledge.d.ts.map +1 -0
  481. package/dist/mcp/tools/reindex-knowledge.js +49 -0
  482. package/dist/mcp/tools/reindex-knowledge.js.map +1 -0
  483. package/dist/mcp/tools/search.d.ts +4 -0
  484. package/dist/mcp/tools/search.d.ts.map +1 -0
  485. package/dist/mcp/tools/search.js +41 -0
  486. package/dist/mcp/tools/search.js.map +1 -0
  487. package/dist/mcp/tools/show.d.ts +4 -0
  488. package/dist/mcp/tools/show.d.ts.map +1 -0
  489. package/dist/mcp/tools/show.js +42 -0
  490. package/dist/mcp/tools/show.js.map +1 -0
  491. package/dist/mcp/tools/snapshot.d.ts +4 -0
  492. package/dist/mcp/tools/snapshot.d.ts.map +1 -0
  493. package/dist/mcp/tools/snapshot.js +45 -0
  494. package/dist/mcp/tools/snapshot.js.map +1 -0
  495. package/dist/mcp/tools/stats.d.ts +4 -0
  496. package/dist/mcp/tools/stats.d.ts.map +1 -0
  497. package/dist/mcp/tools/stats.js +46 -0
  498. package/dist/mcp/tools/stats.js.map +1 -0
  499. package/dist/mcp/tools/sync-stack-docs.d.ts +4 -0
  500. package/dist/mcp/tools/sync-stack-docs.d.ts.map +1 -0
  501. package/dist/mcp/tools/sync-stack-docs.js +77 -0
  502. package/dist/mcp/tools/sync-stack-docs.js.map +1 -0
  503. package/dist/mcp/tools/update-node.d.ts +4 -0
  504. package/dist/mcp/tools/update-node.d.ts.map +1 -0
  505. package/dist/mcp/tools/update-node.js +45 -0
  506. package/dist/mcp/tools/update-node.js.map +1 -0
  507. package/dist/mcp/tools/update-status.d.ts +4 -0
  508. package/dist/mcp/tools/update-status.d.ts.map +1 -0
  509. package/dist/mcp/tools/update-status.js +33 -0
  510. package/dist/mcp/tools/update-status.js.map +1 -0
  511. package/dist/mcp/tools/validate-task.d.ts +4 -0
  512. package/dist/mcp/tools/validate-task.d.ts.map +1 -0
  513. package/dist/mcp/tools/validate-task.js +57 -0
  514. package/dist/mcp/tools/validate-task.js.map +1 -0
  515. package/dist/mcp/tools/velocity.d.ts +4 -0
  516. package/dist/mcp/tools/velocity.d.ts.map +1 -0
  517. package/dist/mcp/tools/velocity.js +25 -0
  518. package/dist/mcp/tools/velocity.js.map +1 -0
  519. package/dist/schemas/edge.schema.d.ts +31 -0
  520. package/dist/schemas/edge.schema.d.ts.map +1 -0
  521. package/dist/schemas/edge.schema.js +16 -0
  522. package/dist/schemas/edge.schema.js.map +1 -0
  523. package/dist/schemas/graph.schema.d.ts +102 -0
  524. package/dist/schemas/graph.schema.d.ts.map +1 -0
  525. package/dist/schemas/graph.schema.js +28 -0
  526. package/dist/schemas/graph.schema.js.map +1 -0
  527. package/dist/schemas/knowledge.schema.d.ts +29 -0
  528. package/dist/schemas/knowledge.schema.d.ts.map +1 -0
  529. package/dist/schemas/knowledge.schema.js +17 -0
  530. package/dist/schemas/knowledge.schema.js.map +1 -0
  531. package/dist/schemas/node.schema.d.ts +80 -0
  532. package/dist/schemas/node.schema.d.ts.map +1 -0
  533. package/dist/schemas/node.schema.js +38 -0
  534. package/dist/schemas/node.schema.js.map +1 -0
  535. package/dist/web/dashboard/dist/assets/benchmark-tab-BTKW3REK.js +1 -0
  536. package/dist/web/dashboard/dist/assets/benchmark-tab-BhbUvjLM.js +1 -0
  537. package/dist/web/dashboard/dist/assets/benchmark-tab-CESZcCtO.js +1 -0
  538. package/dist/web/dashboard/dist/assets/benchmark-tab-D64Ala80.js +1 -0
  539. package/dist/web/dashboard/dist/assets/benchmark-tab-DJ7HyF-u.js +1 -0
  540. package/dist/web/dashboard/dist/assets/benchmark-tab-DVyzQZ2d.js +1 -0
  541. package/dist/web/dashboard/dist/assets/benchmark-tab-XUH7yQNv.js +1 -0
  542. package/dist/web/dashboard/dist/assets/benchmark-tab-ZfJu1pxc.js +1 -0
  543. package/dist/web/dashboard/dist/assets/constants-BIEJOBya.js +1 -0
  544. package/dist/web/dashboard/dist/assets/gitnexus-tab-BFHEXsJm.js +312 -0
  545. package/dist/web/dashboard/dist/assets/gitnexus-tab-Bbp91fom.js +312 -0
  546. package/dist/web/dashboard/dist/assets/gitnexus-tab-C3fPSzYi.js +312 -0
  547. package/dist/web/dashboard/dist/assets/gitnexus-tab-Cd0k8qk3.js +312 -0
  548. package/dist/web/dashboard/dist/assets/gitnexus-tab-ClNGphK5.js +312 -0
  549. package/dist/web/dashboard/dist/assets/gitnexus-tab-Cuc-KSII.js +312 -0
  550. package/dist/web/dashboard/dist/assets/gitnexus-tab-DEqMBSbC.css +1 -0
  551. package/dist/web/dashboard/dist/assets/gitnexus-tab-DEwJXSnD.js +312 -0
  552. package/dist/web/dashboard/dist/assets/gitnexus-tab-DOD7xwmm.js +312 -0
  553. package/dist/web/dashboard/dist/assets/graph-tab-AD7csRcc.js +1 -0
  554. package/dist/web/dashboard/dist/assets/graph-tab-BKyDCyHH.js +1 -0
  555. package/dist/web/dashboard/dist/assets/graph-tab-BUAkTto0.js +1 -0
  556. package/dist/web/dashboard/dist/assets/graph-tab-D0F0WJES.js +1 -0
  557. package/dist/web/dashboard/dist/assets/graph-tab-DA16nThT.js +1 -0
  558. package/dist/web/dashboard/dist/assets/graph-tab-DJknUhrl.js +1 -0
  559. package/dist/web/dashboard/dist/assets/graph-tab-DRPfelKw.js +1 -0
  560. package/dist/web/dashboard/dist/assets/graph-tab-lJ2rPS4Z.js +1 -0
  561. package/dist/web/dashboard/dist/assets/graph-utils-BN7tt0ZS.js +23 -0
  562. package/dist/web/dashboard/dist/assets/graph-utils-BTV1KGUM.js +23 -0
  563. package/dist/web/dashboard/dist/assets/graph-utils-BZV40eAE.css +1 -0
  564. package/dist/web/dashboard/dist/assets/graph-utils-BkfAOVJ9.js +23 -0
  565. package/dist/web/dashboard/dist/assets/graph-utils-Bo7cD1sx.js +23 -0
  566. package/dist/web/dashboard/dist/assets/graph-utils-CI4znRl5.js +23 -0
  567. package/dist/web/dashboard/dist/assets/graph-utils-DrCx5m7q.js +23 -0
  568. package/dist/web/dashboard/dist/assets/graph-utils-KQmzMFXM.js +23 -0
  569. package/dist/web/dashboard/dist/assets/graph-utils-M7iOhRI-.js +23 -0
  570. package/dist/web/dashboard/dist/assets/index-BGMP3W6f.css +1 -0
  571. package/dist/web/dashboard/dist/assets/index-BVXu3x9W.js +53 -0
  572. package/dist/web/dashboard/dist/assets/index-B_T9j86O.js +53 -0
  573. package/dist/web/dashboard/dist/assets/index-Bga9WW2A.css +1 -0
  574. package/dist/web/dashboard/dist/assets/index-BnLPCC8R.css +1 -0
  575. package/dist/web/dashboard/dist/assets/index-BonF71I0.js +53 -0
  576. package/dist/web/dashboard/dist/assets/index-CSyjxREL.js +53 -0
  577. package/dist/web/dashboard/dist/assets/index-CbUKe2Fv.js +53 -0
  578. package/dist/web/dashboard/dist/assets/index-D9i2aVjo.js +53 -0
  579. package/dist/web/dashboard/dist/assets/index-DzM6oBA3.js +53 -0
  580. package/dist/web/dashboard/dist/assets/index-IK005MzD.js +53 -0
  581. package/dist/web/dashboard/dist/assets/insights-tab-B9R3HsMU.js +1 -0
  582. package/dist/web/dashboard/dist/assets/insights-tab-BO_cxLyV.js +1 -0
  583. package/dist/web/dashboard/dist/assets/insights-tab-Brn6IMfQ.js +1 -0
  584. package/dist/web/dashboard/dist/assets/insights-tab-C6x-aJ8p.js +1 -0
  585. package/dist/web/dashboard/dist/assets/insights-tab-CWUU6eDi.js +1 -0
  586. package/dist/web/dashboard/dist/assets/insights-tab-CapL1jP-.js +1 -0
  587. package/dist/web/dashboard/dist/assets/insights-tab-CeWM6zgV.js +1 -0
  588. package/dist/web/dashboard/dist/assets/insights-tab-xQj5e61M.js +1 -0
  589. package/dist/web/dashboard/dist/assets/prd-backlog-tab-0oOO63rA.js +1 -0
  590. package/dist/web/dashboard/dist/assets/prd-backlog-tab-BcWoplsM.js +1 -0
  591. package/dist/web/dashboard/dist/assets/prd-backlog-tab-Bjj5KccG.js +1 -0
  592. package/dist/web/dashboard/dist/assets/prd-backlog-tab-C7cKQyup.js +1 -0
  593. package/dist/web/dashboard/dist/assets/prd-backlog-tab-CT4ja7Ay.js +1 -0
  594. package/dist/web/dashboard/dist/assets/prd-backlog-tab-CmPHHBDQ.js +1 -0
  595. package/dist/web/dashboard/dist/assets/prd-backlog-tab-DAHBiRO-.js +1 -0
  596. package/dist/web/dashboard/dist/assets/prd-backlog-tab-_jmBe3MU.js +1 -0
  597. package/dist/web/dashboard/dist/assets/serena-tab-BVyBTaHC.js +1 -0
  598. package/dist/web/dashboard/dist/assets/serena-tab-CVI1GGRk.js +1 -0
  599. package/dist/web/dashboard/dist/assets/serena-tab-D1ki2NjT.js +1 -0
  600. package/dist/web/dashboard/dist/assets/serena-tab-DRrRfjpO.js +1 -0
  601. package/dist/web/dashboard/dist/assets/serena-tab-DvYbwR4Z.js +1 -0
  602. package/dist/web/dashboard/dist/assets/serena-tab-DwiZ6Jm3.js +1 -0
  603. package/dist/web/dashboard/dist/assets/serena-tab-L6isY0iT.js +1 -0
  604. package/dist/web/dashboard/dist/assets/serena-tab-ba2n0AOh.js +1 -0
  605. package/dist/web/dashboard/dist/index.html +13 -0
  606. package/package.json +86 -0
@@ -0,0 +1 @@
1
+ import{r as c,j as e,a as o}from"./index-DzM6oBA3.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
@@ -0,0 +1 @@
1
+ import{r as c,j as e,a as o}from"./index-IK005MzD.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
@@ -0,0 +1 @@
1
+ import{r as c,j as e,a as o}from"./index-CSyjxREL.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
@@ -0,0 +1 @@
1
+ import{r as c,j as e,a as o}from"./index-BonF71I0.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
@@ -0,0 +1 @@
1
+ import{r as c,j as e,a as o}from"./index-D9i2aVjo.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
@@ -0,0 +1 @@
1
+ import{r as c,j as e,a as o}from"./index-CbUKe2Fv.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
@@ -0,0 +1 @@
1
+ import{r as c,j as e,a as o}from"./index-BVXu3x9W.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
@@ -0,0 +1 @@
1
+ import{r as c,j as e,a as o}from"./index-B_T9j86O.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
@@ -0,0 +1 @@
1
+ import{r as f,j as e}from"./index-B_T9j86O.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-Bo7cD1sx.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
@@ -0,0 +1 @@
1
+ import{r as f,j as e}from"./index-BonF71I0.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-BN7tt0ZS.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
@@ -0,0 +1 @@
1
+ import{r as f,j as e}from"./index-IK005MzD.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-DrCx5m7q.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
@@ -0,0 +1 @@
1
+ import{r as f,j as e}from"./index-BVXu3x9W.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-BTV1KGUM.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
@@ -0,0 +1 @@
1
+ import{r as f,j as e}from"./index-CSyjxREL.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-KQmzMFXM.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
@@ -0,0 +1 @@
1
+ import{r as f,j as e}from"./index-CbUKe2Fv.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-BkfAOVJ9.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
@@ -0,0 +1 @@
1
+ import{r as f,j as e}from"./index-D9i2aVjo.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-M7iOhRI-.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
@@ -0,0 +1 @@
1
+ import{r as f,j as e}from"./index-DzM6oBA3.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-CI4znRl5.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
@@ -0,0 +1 @@
1
+ import{r as i,a as b,j as e}from"./index-CbUKe2Fv.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
@@ -0,0 +1 @@
1
+ import{r as i,a as b,j as e}from"./index-BonF71I0.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
@@ -0,0 +1 @@
1
+ import{r as i,a as b,j as e}from"./index-BVXu3x9W.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
@@ -0,0 +1 @@
1
+ import{r as i,a as b,j as e}from"./index-B_T9j86O.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
@@ -0,0 +1 @@
1
+ import{r as i,a as b,j as e}from"./index-IK005MzD.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
@@ -0,0 +1 @@
1
+ import{r as i,a as b,j as e}from"./index-D9i2aVjo.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
@@ -0,0 +1 @@
1
+ import{r as i,a as b,j as e}from"./index-DzM6oBA3.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
@@ -0,0 +1 @@
1
+ import{r as i,a as b,j as e}from"./index-CSyjxREL.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>mcp-graph Workstation</title>
7
+ <script type="module" crossorigin src="/assets/index-D9i2aVjo.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/assets/index-BnLPCC8R.css">
9
+ </head>
10
+ <body>
11
+ <div id="root"></div>
12
+ </body>
13
+ </html>
package/package.json ADDED
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "@mcp-graph-workflow/mcp-graph",
3
+ "version": "3.0.0",
4
+ "description": "MCP local-first PRD to task graph — transforms text into executable structure",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "mcp-graph": "dist/cli/index.js",
9
+ "mcp-graph-stdio": "dist/mcp/stdio.js",
10
+ "mcp-graph-server": "dist/mcp/server.js"
11
+ },
12
+ "scripts": {
13
+ "prepublishOnly": "npm run build",
14
+ "dev": "tsx src/mcp/server.ts",
15
+ "dev:stdio": "tsx src/mcp/stdio.ts",
16
+ "dashboard:install": "cd src/web/dashboard && npm install",
17
+ "dashboard:dev": "cd src/web/dashboard && npm run dev",
18
+ "dashboard:build": "cd src/web/dashboard && npm run build",
19
+ "build": "tsc && npm run dashboard:build && npm run copy-dashboard",
20
+ "copy-dashboard": "mkdir -p dist/web/dashboard && cp -r src/web/dashboard/dist dist/web/dashboard/",
21
+ "start": "node dist/mcp/server.js",
22
+ "test": "vitest run",
23
+ "test:watch": "vitest",
24
+ "test:e2e": "playwright test",
25
+ "test:bench": "vitest bench",
26
+ "test:coverage": "vitest run --coverage",
27
+ "test:all": "vitest run && playwright test",
28
+ "typecheck": "tsc --noEmit",
29
+ "lint": "tsc --noEmit",
30
+ "setup:mcp": "bash scripts/setup-mcp.sh"
31
+ },
32
+ "keywords": [
33
+ "mcp",
34
+ "prd",
35
+ "task-graph",
36
+ "local-first",
37
+ "agent-tooling"
38
+ ],
39
+ "files": [
40
+ "dist/",
41
+ "README.md",
42
+ "LICENSE"
43
+ ],
44
+ "author": "Diego Nogueira (https://github.com/DiegoNogueiraDev)",
45
+ "license": "MIT",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/DiegoNogueiraDev/mcp-graph-workflow.git"
49
+ },
50
+ "homepage": "https://github.com/DiegoNogueiraDev/mcp-graph-workflow#readme",
51
+ "bugs": {
52
+ "url": "https://github.com/DiegoNogueiraDev/mcp-graph-workflow/issues"
53
+ },
54
+ "publishConfig": {
55
+ "access": "public"
56
+ },
57
+ "engines": {
58
+ "node": ">=20.0.0"
59
+ },
60
+ "devDependencies": {
61
+ "@playwright/test": "^1.58.2",
62
+ "@types/better-sqlite3": "^7.6.13",
63
+ "@types/express": "^5.0.6",
64
+ "@types/multer": "^2.1.0",
65
+ "@types/node": "^25.3.3",
66
+ "@types/supertest": "^7.2.0",
67
+ "@vitest/coverage-v8": "^4.0.0",
68
+ "gitnexus": "^1.3.11",
69
+ "supertest": "^7.2.2",
70
+ "tsx": "^4.21.0",
71
+ "typescript": "^5.9.3",
72
+ "vitest": "^4.0.18"
73
+ },
74
+ "dependencies": {
75
+ "@modelcontextprotocol/sdk": "^1.27.1",
76
+ "better-sqlite3": "^12.6.2",
77
+ "cheerio": "^1.2.0",
78
+ "commander": "^14.0.3",
79
+ "express": "^5.2.1",
80
+ "multer": "^2.1.1",
81
+ "pdf-parse": "^2.4.5",
82
+ "playwright": "^1.58.2",
83
+ "yaml": "^2.8.2",
84
+ "zod": "^4.3.6"
85
+ }
86
+ }