codingbuddy 4.1.0 → 4.2.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 (308) hide show
  1. package/dist/src/agent/agent-summary.utils.d.ts +2 -1
  2. package/dist/src/analyzer/conventions.schemas.d.ts +0 -4
  3. package/dist/src/analyzer/conventions.schemas.js.map +1 -1
  4. package/dist/src/analyzer/conventions.types.d.ts +5 -7
  5. package/dist/src/analyzer/conventions.types.js.map +1 -1
  6. package/dist/src/analyzer/directory.analyzer.d.ts +1 -1
  7. package/dist/src/checklist/checklist.schema.d.ts +2 -1
  8. package/dist/src/cli/cli.d.ts +0 -1
  9. package/dist/src/cli/cli.js +0 -1
  10. package/dist/src/cli/cli.js.map +1 -1
  11. package/dist/src/cli/init/claude-settings.utils.d.ts +2 -1
  12. package/dist/src/cli/init/config.generator.d.ts +0 -2
  13. package/dist/src/cli/init/config.generator.js +0 -2
  14. package/dist/src/cli/init/config.generator.js.map +1 -1
  15. package/dist/src/cli/init/config.writer.d.ts +0 -1
  16. package/dist/src/cli/init/config.writer.js +0 -1
  17. package/dist/src/cli/init/config.writer.js.map +1 -1
  18. package/dist/src/cli/init/init.constants.js +1 -0
  19. package/dist/src/cli/init/init.constants.js.map +1 -1
  20. package/dist/src/cli/init/init.wizard.d.ts +2 -1
  21. package/dist/src/cli/run-tui.d.ts +0 -2
  22. package/dist/src/cli/run-tui.js +19 -57
  23. package/dist/src/cli/run-tui.js.map +1 -1
  24. package/dist/src/config/config.loader.d.ts +0 -2
  25. package/dist/src/config/config.loader.js +0 -2
  26. package/dist/src/config/config.loader.js.map +1 -1
  27. package/dist/src/config/config.schema.d.ts +0 -16
  28. package/dist/src/config/config.schema.js +7 -7
  29. package/dist/src/config/config.schema.js.map +1 -1
  30. package/dist/src/context/context-document.types.d.ts +0 -8
  31. package/dist/src/context/context-document.types.js +9 -9
  32. package/dist/src/context/context-document.types.js.map +1 -1
  33. package/dist/src/context/context-parser.utils.d.ts +1 -9
  34. package/dist/src/context/context-parser.utils.js +0 -36
  35. package/dist/src/context/context-parser.utils.js.map +1 -1
  36. package/dist/src/keyword/keyword.service.js +5 -1
  37. package/dist/src/keyword/keyword.service.js.map +1 -1
  38. package/dist/src/keyword/keyword.types.d.ts +0 -4
  39. package/dist/src/keyword/keyword.types.js.map +1 -1
  40. package/dist/src/keyword/srp-template.d.ts +0 -2
  41. package/dist/src/keyword/srp-template.js +0 -2
  42. package/dist/src/keyword/srp-template.js.map +1 -1
  43. package/dist/src/main.js +30 -9
  44. package/dist/src/main.js.map +1 -1
  45. package/dist/src/rules/rules.types.d.ts +3 -2
  46. package/dist/src/rules/skill.schema.d.ts +0 -5
  47. package/dist/src/rules/skill.schema.js +3 -3
  48. package/dist/src/rules/skill.schema.js.map +1 -1
  49. package/dist/src/shared/async.utils.d.ts +3 -2
  50. package/dist/src/shared/file.utils.d.ts +3 -2
  51. package/dist/src/shared/filesystem.interface.d.ts +0 -10
  52. package/dist/src/shared/filesystem.interface.js +1 -10
  53. package/dist/src/shared/filesystem.interface.js.map +1 -1
  54. package/dist/src/shared/keyword-core.d.ts +2 -1
  55. package/dist/src/shared/keyword-core.js +3 -1
  56. package/dist/src/shared/keyword-core.js.map +1 -1
  57. package/dist/src/shared/language.types.d.ts +2 -1
  58. package/dist/src/shared/lru-cache.d.ts +2 -6
  59. package/dist/src/shared/path.utils.d.ts +0 -1
  60. package/dist/src/shared/path.utils.js +0 -1
  61. package/dist/src/shared/path.utils.js.map +1 -1
  62. package/dist/src/shared/pattern-matcher.d.ts +2 -1
  63. package/dist/src/shared/rules-core.d.ts +3 -2
  64. package/dist/src/shared/security.utils.d.ts +4 -3
  65. package/dist/src/shared/validation.constants.d.ts +2 -3
  66. package/dist/src/shared/validation.constants.js +3 -3
  67. package/dist/src/shared/validation.constants.js.map +1 -1
  68. package/dist/src/shared/verbosity.types.d.ts +2 -1
  69. package/dist/src/skill/skill-content.utils.d.ts +0 -1
  70. package/dist/src/skill/skill-content.utils.js +4 -4
  71. package/dist/src/skill/skill-content.utils.js.map +1 -1
  72. package/dist/src/tui/__perf__/memory-stability.spec.js +8 -8
  73. package/dist/src/tui/__perf__/memory-stability.spec.js.map +1 -1
  74. package/dist/src/tui/__perf__/rendering-performance.spec.js +9 -9
  75. package/dist/src/tui/__perf__/rendering-performance.spec.js.map +1 -1
  76. package/dist/src/tui/components/ActivityVisualizer.d.ts +10 -0
  77. package/dist/src/tui/components/ActivityVisualizer.js +22 -0
  78. package/dist/src/tui/components/ActivityVisualizer.js.map +1 -0
  79. package/dist/src/tui/components/ActivityVisualizer.spec.js +45 -0
  80. package/dist/src/tui/components/ActivityVisualizer.spec.js.map +1 -0
  81. package/dist/src/tui/components/ContextSection.d.ts +7 -0
  82. package/dist/src/tui/components/ContextSection.js +24 -0
  83. package/dist/src/tui/components/ContextSection.js.map +1 -0
  84. package/dist/src/tui/components/FlowMap.d.ts +12 -0
  85. package/dist/src/tui/components/FlowMap.js +55 -0
  86. package/dist/src/tui/components/FlowMap.js.map +1 -0
  87. package/dist/src/tui/components/FlowMap.spec.js +59 -0
  88. package/dist/src/tui/components/FlowMap.spec.js.map +1 -0
  89. package/dist/src/tui/components/FocusedAgentPanel.d.ts +19 -0
  90. package/dist/src/tui/components/FocusedAgentPanel.js +74 -0
  91. package/dist/src/tui/components/FocusedAgentPanel.js.map +1 -0
  92. package/dist/src/tui/components/FocusedAgentPanel.spec.js +140 -0
  93. package/dist/src/tui/components/FocusedAgentPanel.spec.js.map +1 -0
  94. package/dist/src/tui/components/HeaderBar.d.ts +12 -0
  95. package/dist/src/tui/components/HeaderBar.js +55 -0
  96. package/dist/src/tui/components/HeaderBar.js.map +1 -0
  97. package/dist/src/tui/components/HeaderBar.spec.js +78 -0
  98. package/dist/src/tui/components/HeaderBar.spec.js.map +1 -0
  99. package/dist/src/tui/components/SessionTabBar.d.ts +9 -0
  100. package/dist/src/tui/components/SessionTabBar.js +15 -0
  101. package/dist/src/tui/components/SessionTabBar.js.map +1 -0
  102. package/dist/src/tui/components/SessionTabBar.spec.js +59 -0
  103. package/dist/src/tui/components/SessionTabBar.spec.js.map +1 -0
  104. package/dist/src/tui/components/StageHealthBar.d.ts +10 -0
  105. package/dist/src/tui/components/StageHealthBar.js +63 -0
  106. package/dist/src/tui/components/StageHealthBar.js.map +1 -0
  107. package/dist/src/tui/components/StageHealthBar.spec.js +63 -0
  108. package/dist/src/tui/components/StageHealthBar.spec.js.map +1 -0
  109. package/dist/src/tui/components/activity-visualizer.pure.d.ts +9 -0
  110. package/dist/src/tui/components/activity-visualizer.pure.js +70 -0
  111. package/dist/src/tui/components/activity-visualizer.pure.js.map +1 -0
  112. package/dist/src/tui/components/context-section.pure.d.ts +3 -0
  113. package/dist/src/tui/components/context-section.pure.js +38 -0
  114. package/dist/src/tui/components/context-section.pure.js.map +1 -0
  115. package/dist/src/tui/components/flow-map.pure.d.ts +26 -0
  116. package/dist/src/tui/components/flow-map.pure.js +263 -0
  117. package/dist/src/tui/components/flow-map.pure.js.map +1 -0
  118. package/dist/src/tui/components/focused-agent.pure.d.ts +23 -0
  119. package/dist/src/tui/components/focused-agent.pure.js +87 -0
  120. package/dist/src/tui/components/focused-agent.pure.js.map +1 -0
  121. package/dist/src/tui/components/grid-layout.pure.d.ts +2 -0
  122. package/dist/src/tui/components/grid-layout.pure.js +50 -0
  123. package/dist/src/tui/components/grid-layout.pure.js.map +1 -0
  124. package/dist/src/tui/components/header-bar.pure.d.ts +1 -0
  125. package/dist/src/tui/components/{header.pure.js → header-bar.pure.js} +1 -7
  126. package/dist/src/tui/components/header-bar.pure.js.map +1 -0
  127. package/dist/src/tui/components/index.d.ts +12 -15
  128. package/dist/src/tui/components/index.js +35 -49
  129. package/dist/src/tui/components/index.js.map +1 -1
  130. package/dist/src/tui/components/session-tab-bar.pure.d.ts +9 -0
  131. package/dist/src/tui/components/session-tab-bar.pure.js +45 -0
  132. package/dist/src/tui/components/session-tab-bar.pure.js.map +1 -0
  133. package/dist/src/tui/components/stage-health.pure.d.ts +4 -0
  134. package/dist/src/tui/components/stage-health.pure.js +59 -0
  135. package/dist/src/tui/components/stage-health.pure.js.map +1 -0
  136. package/dist/src/tui/dashboard-app.d.ts +8 -0
  137. package/dist/src/tui/dashboard-app.js +43 -0
  138. package/dist/src/tui/dashboard-app.js.map +1 -0
  139. package/dist/src/tui/dashboard-app.spec.js +136 -0
  140. package/dist/src/tui/dashboard-app.spec.js.map +1 -0
  141. package/dist/src/tui/dashboard-types.d.ts +88 -0
  142. package/dist/src/tui/dashboard-types.js +32 -0
  143. package/dist/src/tui/dashboard-types.js.map +1 -0
  144. package/dist/src/tui/eventbus-ui.integration.spec.js +132 -167
  145. package/dist/src/tui/eventbus-ui.integration.spec.js.map +1 -1
  146. package/dist/src/tui/events/event-bus.js +1 -1
  147. package/dist/src/tui/events/event-bus.js.map +1 -1
  148. package/dist/src/tui/events/index.d.ts +1 -1
  149. package/dist/src/tui/events/index.js.map +1 -1
  150. package/dist/src/tui/events/parse-agent.js +2 -1
  151. package/dist/src/tui/events/parse-agent.js.map +1 -1
  152. package/dist/src/tui/events/response-event-extractor.d.ts +16 -1
  153. package/dist/src/tui/events/response-event-extractor.js +154 -1
  154. package/dist/src/tui/events/response-event-extractor.js.map +1 -1
  155. package/dist/src/tui/events/tui-interceptor.d.ts +3 -0
  156. package/dist/src/tui/events/tui-interceptor.js +67 -7
  157. package/dist/src/tui/events/tui-interceptor.js.map +1 -1
  158. package/dist/src/tui/events/types.d.ts +46 -2
  159. package/dist/src/tui/events/types.js +6 -0
  160. package/dist/src/tui/events/types.js.map +1 -1
  161. package/dist/src/tui/hooks/index.d.ts +7 -4
  162. package/dist/src/tui/hooks/index.js +12 -7
  163. package/dist/src/tui/hooks/index.js.map +1 -1
  164. package/dist/src/tui/hooks/use-clock.js +3 -3
  165. package/dist/src/tui/hooks/use-clock.js.map +1 -1
  166. package/dist/src/tui/hooks/use-dashboard-state.d.ts +46 -0
  167. package/dist/src/tui/hooks/use-dashboard-state.js +249 -0
  168. package/dist/src/tui/hooks/use-dashboard-state.js.map +1 -0
  169. package/dist/src/tui/hooks/use-focus-agent.d.ts +2 -0
  170. package/dist/src/tui/hooks/use-focus-agent.js +26 -0
  171. package/dist/src/tui/hooks/use-focus-agent.js.map +1 -0
  172. package/dist/src/tui/hooks/use-multi-session-state.d.ts +16 -0
  173. package/dist/src/tui/hooks/use-multi-session-state.js +163 -0
  174. package/dist/src/tui/hooks/use-multi-session-state.js.map +1 -0
  175. package/dist/src/tui/hooks/use-terminal-size.d.ts +9 -0
  176. package/dist/src/tui/hooks/use-terminal-size.js +31 -0
  177. package/dist/src/tui/hooks/use-terminal-size.js.map +1 -0
  178. package/dist/src/tui/index.d.ts +12 -4
  179. package/dist/src/tui/index.js +18 -7
  180. package/dist/src/tui/index.js.map +1 -1
  181. package/dist/src/tui/ipc/index.d.ts +5 -2
  182. package/dist/src/tui/ipc/index.js +5 -5
  183. package/dist/src/tui/ipc/index.js.map +1 -1
  184. package/dist/src/tui/ipc/ipc-state-cache.d.ts +1 -0
  185. package/dist/src/tui/ipc/ipc-state-cache.js +7 -0
  186. package/dist/src/tui/ipc/ipc-state-cache.js.map +1 -1
  187. package/dist/src/tui/ipc/multi-session-manager.d.ts +39 -0
  188. package/dist/src/tui/ipc/multi-session-manager.js +143 -0
  189. package/dist/src/tui/ipc/multi-session-manager.js.map +1 -0
  190. package/dist/src/tui/ipc/tui-auto-launcher.d.ts +22 -0
  191. package/dist/src/tui/ipc/tui-auto-launcher.js +113 -0
  192. package/dist/src/tui/ipc/tui-auto-launcher.js.map +1 -0
  193. package/dist/src/tui/multi-session-app.d.ts +6 -0
  194. package/dist/src/tui/multi-session-app.js +55 -0
  195. package/dist/src/tui/multi-session-app.js.map +1 -0
  196. package/dist/src/tui/multi-session-app.spec.js +95 -0
  197. package/dist/src/tui/multi-session-app.spec.js.map +1 -0
  198. package/dist/src/tui/transport-tui.integration.spec.js +15 -15
  199. package/dist/src/tui/transport-tui.integration.spec.js.map +1 -1
  200. package/dist/src/tui/tui-config.d.ts +3 -2
  201. package/dist/src/tui/types.d.ts +1 -1
  202. package/dist/src/tui/types.js +3 -0
  203. package/dist/src/tui/types.js.map +1 -1
  204. package/dist/src/tui/utils/color-buffer.d.ts +31 -0
  205. package/dist/src/tui/utils/color-buffer.js +86 -0
  206. package/dist/src/tui/utils/color-buffer.js.map +1 -0
  207. package/dist/src/tui/utils/colors.js.map +1 -1
  208. package/dist/src/tui/utils/edge-router.d.ts +9 -0
  209. package/dist/src/tui/utils/edge-router.js +65 -0
  210. package/dist/src/tui/utils/edge-router.js.map +1 -0
  211. package/dist/src/tui/utils/index.d.ts +3 -1
  212. package/dist/src/tui/utils/index.js +21 -4
  213. package/dist/src/tui/utils/index.js.map +1 -1
  214. package/dist/src/tui/utils/theme.d.ts +50 -0
  215. package/dist/src/tui/utils/theme.js +128 -0
  216. package/dist/src/tui/utils/theme.js.map +1 -0
  217. package/dist/src/tui-bundle.mjs +5755 -0
  218. package/dist/tsconfig.build.tsbuildinfo +1 -1
  219. package/package.json +9 -9
  220. package/dist/src/shared/token-counter.d.ts +0 -13
  221. package/dist/src/shared/token-counter.js +0 -41
  222. package/dist/src/shared/token-counter.js.map +0 -1
  223. package/dist/src/tui/app.d.ts +0 -6
  224. package/dist/src/tui/app.js +0 -20
  225. package/dist/src/tui/app.js.map +0 -1
  226. package/dist/src/tui/app.spec.js +0 -226
  227. package/dist/src/tui/app.spec.js.map +0 -1
  228. package/dist/src/tui/components/AgentCard.d.ts +0 -6
  229. package/dist/src/tui/components/AgentCard.js +0 -18
  230. package/dist/src/tui/components/AgentCard.js.map +0 -1
  231. package/dist/src/tui/components/AgentCard.spec.js +0 -118
  232. package/dist/src/tui/components/AgentCard.spec.js.map +0 -1
  233. package/dist/src/tui/components/AgentGrid.d.ts +0 -7
  234. package/dist/src/tui/components/AgentGrid.js +0 -20
  235. package/dist/src/tui/components/AgentGrid.js.map +0 -1
  236. package/dist/src/tui/components/AgentGrid.spec.js +0 -52
  237. package/dist/src/tui/components/AgentGrid.spec.js.map +0 -1
  238. package/dist/src/tui/components/AgentTree.d.ts +0 -7
  239. package/dist/src/tui/components/AgentTree.js +0 -24
  240. package/dist/src/tui/components/AgentTree.js.map +0 -1
  241. package/dist/src/tui/components/AgentTree.spec.js +0 -146
  242. package/dist/src/tui/components/AgentTree.spec.js.map +0 -1
  243. package/dist/src/tui/components/CategoryRow.d.ts +0 -9
  244. package/dist/src/tui/components/CategoryRow.js +0 -15
  245. package/dist/src/tui/components/CategoryRow.js.map +0 -1
  246. package/dist/src/tui/components/CategoryRow.spec.js +0 -58
  247. package/dist/src/tui/components/CategoryRow.spec.js.map +0 -1
  248. package/dist/src/tui/components/Header.d.ts +0 -6
  249. package/dist/src/tui/components/Header.js +0 -18
  250. package/dist/src/tui/components/Header.js.map +0 -1
  251. package/dist/src/tui/components/Header.spec.js +0 -38
  252. package/dist/src/tui/components/Header.spec.js.map +0 -1
  253. package/dist/src/tui/components/ProgressBar.d.ts +0 -7
  254. package/dist/src/tui/components/ProgressBar.js +0 -12
  255. package/dist/src/tui/components/ProgressBar.js.map +0 -1
  256. package/dist/src/tui/components/ProgressBar.spec.js +0 -37
  257. package/dist/src/tui/components/ProgressBar.spec.js.map +0 -1
  258. package/dist/src/tui/components/StatusBar.d.ts +0 -8
  259. package/dist/src/tui/components/StatusBar.js +0 -29
  260. package/dist/src/tui/components/StatusBar.js.map +0 -1
  261. package/dist/src/tui/components/StatusBar.spec.js +0 -93
  262. package/dist/src/tui/components/StatusBar.spec.js.map +0 -1
  263. package/dist/src/tui/components/agent-card.pure.d.ts +0 -7
  264. package/dist/src/tui/components/agent-card.pure.js +0 -65
  265. package/dist/src/tui/components/agent-card.pure.js.map +0 -1
  266. package/dist/src/tui/components/agent-grid.pure.d.ts +0 -3
  267. package/dist/src/tui/components/agent-grid.pure.js +0 -35
  268. package/dist/src/tui/components/agent-grid.pure.js.map +0 -1
  269. package/dist/src/tui/components/agent-mini-card.pure.d.ts +0 -2
  270. package/dist/src/tui/components/agent-mini-card.pure.js +0 -17
  271. package/dist/src/tui/components/agent-mini-card.pure.js.map +0 -1
  272. package/dist/src/tui/components/agent-tree.pure.d.ts +0 -18
  273. package/dist/src/tui/components/agent-tree.pure.js +0 -41
  274. package/dist/src/tui/components/agent-tree.pure.js.map +0 -1
  275. package/dist/src/tui/components/category-row.pure.d.ts +0 -3
  276. package/dist/src/tui/components/category-row.pure.js +0 -26
  277. package/dist/src/tui/components/category-row.pure.js.map +0 -1
  278. package/dist/src/tui/components/header.pure.d.ts +0 -4
  279. package/dist/src/tui/components/header.pure.js.map +0 -1
  280. package/dist/src/tui/components/progress-bar.pure.d.ts +0 -2
  281. package/dist/src/tui/components/progress-bar.pure.js +0 -21
  282. package/dist/src/tui/components/progress-bar.pure.js.map +0 -1
  283. package/dist/src/tui/components/status-bar.pure.d.ts +0 -15
  284. package/dist/src/tui/components/status-bar.pure.js +0 -83
  285. package/dist/src/tui/components/status-bar.pure.js.map +0 -1
  286. package/dist/src/tui/hooks/use-agent-state.d.ts +0 -7
  287. package/dist/src/tui/hooks/use-agent-state.js +0 -13
  288. package/dist/src/tui/hooks/use-agent-state.js.map +0 -1
  289. package/dist/src/tui/hooks/use-agent-state.spec.d.ts +0 -1
  290. package/dist/src/tui/hooks/use-agent-state.spec.js +0 -167
  291. package/dist/src/tui/hooks/use-agent-state.spec.js.map +0 -1
  292. package/dist/src/tui/hooks/use-event-bus.d.ts +0 -34
  293. package/dist/src/tui/hooks/use-event-bus.js +0 -91
  294. package/dist/src/tui/hooks/use-event-bus.js.map +0 -1
  295. package/dist/src/tui/hooks/use-event-bus.spec.d.ts +0 -1
  296. package/dist/src/tui/hooks/use-event-bus.spec.js +0 -362
  297. package/dist/src/tui/hooks/use-event-bus.spec.js.map +0 -1
  298. package/dist/src/tui/utils/constants.d.ts +0 -3
  299. package/dist/src/tui/utils/constants.js +0 -15
  300. package/dist/src/tui/utils/constants.js.map +0 -1
  301. /package/dist/src/tui/{app.spec.d.ts → components/ActivityVisualizer.spec.d.ts} +0 -0
  302. /package/dist/src/tui/components/{AgentCard.spec.d.ts → FlowMap.spec.d.ts} +0 -0
  303. /package/dist/src/tui/components/{AgentGrid.spec.d.ts → FocusedAgentPanel.spec.d.ts} +0 -0
  304. /package/dist/src/tui/components/{AgentTree.spec.d.ts → HeaderBar.spec.d.ts} +0 -0
  305. /package/dist/src/tui/components/{CategoryRow.spec.d.ts → SessionTabBar.spec.d.ts} +0 -0
  306. /package/dist/src/tui/components/{Header.spec.d.ts → StageHealthBar.spec.d.ts} +0 -0
  307. /package/dist/src/tui/{components/ProgressBar.spec.d.ts → dashboard-app.spec.d.ts} +0 -0
  308. /package/dist/src/tui/{components/StatusBar.spec.d.ts → multi-session-app.spec.d.ts} +0 -0
@@ -1,65 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.INLINE_NAME_COL_WIDTH = void 0;
4
- exports.resolveProgress = resolveProgress;
5
- exports.abbreviateName = abbreviateName;
6
- exports.buildStatusLabel = buildStatusLabel;
7
- exports.resolveIcon = resolveIcon;
8
- exports.buildInlineCard = buildInlineCard;
9
- const progress_bar_pure_1 = require("./progress-bar.pure");
10
- const display_width_1 = require("../utils/display-width");
11
- exports.INLINE_NAME_COL_WIDTH = 22;
12
- const INLINE_BAR_WIDTH = 10;
13
- const INLINE_FILLED = '\u2593';
14
- const INLINE_EMPTY = '\u2591';
15
- const RUNNING_MIN_PROGRESS = 10;
16
- const ELLIPSIS = '\u2026';
17
- function resolveProgress(status, progress) {
18
- const safeProgress = Number.isNaN(progress) ? 0 : progress;
19
- switch (status) {
20
- case 'idle':
21
- return 0;
22
- case 'running':
23
- return Math.max(safeProgress, RUNNING_MIN_PROGRESS);
24
- case 'completed':
25
- return 100;
26
- case 'failed':
27
- return safeProgress;
28
- }
29
- }
30
- function abbreviateName(name, maxWidth) {
31
- if (maxWidth <= 0)
32
- return '';
33
- if ((0, display_width_1.estimateDisplayWidth)(name) <= maxWidth)
34
- return name;
35
- return (0, display_width_1.truncateToDisplayWidth)(name, maxWidth - 1) + ELLIPSIS;
36
- }
37
- const STATUS_LABELS = {
38
- idle: 'Idle',
39
- running: 'Running',
40
- completed: 'Done',
41
- failed: 'Failed',
42
- };
43
- function buildStatusLabel(status) {
44
- return STATUS_LABELS[status];
45
- }
46
- const COMPLETED_ICON = '\u2713';
47
- const FAILED_ICON = '\u2717';
48
- function resolveIcon(status, icon) {
49
- switch (status) {
50
- case 'completed':
51
- return COMPLETED_ICON;
52
- case 'failed':
53
- return FAILED_ICON;
54
- case 'idle':
55
- case 'running':
56
- return icon;
57
- }
58
- }
59
- function buildInlineCard(icon, name, progress, statusLabel) {
60
- const displayName = (0, display_width_1.padEndDisplayWidth)(abbreviateName(name, exports.INLINE_NAME_COL_WIDTH), exports.INLINE_NAME_COL_WIDTH);
61
- const bar = (0, progress_bar_pure_1.buildProgressBar)(progress, INLINE_BAR_WIDTH, INLINE_FILLED, INLINE_EMPTY);
62
- const pct = `${progress}%`.padStart(4);
63
- return `${icon} ${displayName} ${bar} ${pct} ${statusLabel}`;
64
- }
65
- //# sourceMappingURL=agent-card.pure.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-card.pure.js","sourceRoot":"","sources":["../../../../src/tui/components/agent-card.pure.ts"],"names":[],"mappings":";;;AAgBA,0CAYC;AAED,wCAIC;AASD,4CAEC;AAKD,kCAUC;AAED,0CAaC;AA1ED,2DAAuD;AACvD,0DAIgC;AAEnB,QAAA,qBAAqB,GAAG,EAAE,CAAC;AACxC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,aAAa,GAAG,QAAQ,CAAC;AAC/B,MAAM,YAAY,GAAG,QAAQ,CAAC;AAE9B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAE1B,SAAgB,eAAe,CAAC,MAAmB,EAAE,QAAgB;IACnE,MAAM,YAAY,GAAG,MAAM,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AAgB,EAChB,WAAmB;IAEnB,MAAM,WAAW,GAAG,IAAA,kCAAkB,EACpC,cAAc,CAAC,IAAI,EAAE,6BAAqB,CAAC,EAC3C,6BAAqB,CACtB,CAAC;IACF,MAAM,GAAG,GAAG,IAAA,oCAAgB,EAAC,QAAQ,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;IACtF,MAAM,GAAG,GAAG,GAAG,QAAQ,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACvC,OAAO,GAAG,IAAI,IAAI,WAAW,IAAI,GAAG,IAAI,GAAG,KAAK,WAAW,EAAE,CAAC;AAChE,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { AgentMetadata, AgentCategory } from '../events';
2
- export declare function groupByCategory(agents: AgentMetadata[]): Map<AgentCategory, AgentMetadata[]>;
3
- export declare function sortCategoriesByActivity(categories: AgentCategory[], activeAgentIds: Set<string>, agentsByCategory: Map<AgentCategory, AgentMetadata[]>): AgentCategory[];
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.groupByCategory = groupByCategory;
4
- exports.sortCategoriesByActivity = sortCategoriesByActivity;
5
- function groupByCategory(agents) {
6
- const map = new Map();
7
- for (const agent of agents) {
8
- const list = map.get(agent.category);
9
- if (list) {
10
- list.push(agent);
11
- }
12
- else {
13
- map.set(agent.category, [agent]);
14
- }
15
- }
16
- return map;
17
- }
18
- function sortCategoriesByActivity(categories, activeAgentIds, agentsByCategory) {
19
- const hasActive = (cat) => {
20
- const agents = agentsByCategory.get(cat) ?? [];
21
- return agents.some(a => activeAgentIds.has(a.id));
22
- };
23
- const active = [];
24
- const inactive = [];
25
- for (const cat of categories) {
26
- if (hasActive(cat)) {
27
- active.push(cat);
28
- }
29
- else {
30
- inactive.push(cat);
31
- }
32
- }
33
- return [...active, ...inactive];
34
- }
35
- //# sourceMappingURL=agent-grid.pure.js.map
@@ -1 +0,0 @@
1
- {"version":3,"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M,EAAE,GAAG,QAAQ,CAAC,CAAC;AAClC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function buildInlineAgentTag(name: string): string;
2
- export declare function joinAgentTags(names: string[]): string;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildInlineAgentTag = buildInlineAgentTag;
4
- exports.joinAgentTags = joinAgentTags;
5
- const display_width_1 = require("../utils/display-width");
6
- const ELLIPSIS = '\u2026';
7
- const TAG_NAME_MAX = 20;
8
- const TAG_SEPARATOR = ' \u00b7 ';
9
- function buildInlineAgentTag(name) {
10
- if ((0, display_width_1.estimateDisplayWidth)(name) <= TAG_NAME_MAX)
11
- return name;
12
- return (0, display_width_1.truncateToDisplayWidth)(name, TAG_NAME_MAX - 1) + ELLIPSIS;
13
- }
14
- function joinAgentTags(names) {
15
- return names.map(buildInlineAgentTag).join(TAG_SEPARATOR);
16
- }
17
- //# sourceMappingURL=agent-mini-card.pure.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-mini-card.pure.js","sourceRoot":"","sources":["../../../../src/tui/components/agent-mini-card.pure.ts"],"names":[],"mappings":";;AAOA,kDAGC;AAED,sCAEC;AAdD,0DAAsF;AAEtF,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAE1B,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,aAAa,GAAG,UAAU,CAAC;AAEjC,SAAgB,mBAAmB,CAAC,IAAY;IAC9C,IAAI,IAAA,oCAAoB,EAAC,IAAI,CAAC,IAAI,YAAY;QAAE,OAAO,IAAI,CAAC;IAC5D,OAAO,IAAA,sCAAsB,EAAC,IAAI,EAAE,YAAY,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;AACnE,CAAC;AAED,SAAgB,aAAa,CAAC,KAAe;IAC3C,OAAO,KAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAC5D,CAAC"}
@@ -1,18 +0,0 @@
1
- export declare const TREE_CHARS: {
2
- readonly VERTICAL: "│";
3
- readonly HORIZONTAL: "─";
4
- readonly TOP_LEFT: "┌";
5
- readonly BOTTOM_LEFT: "└";
6
- readonly TEE_RIGHT: "├";
7
- };
8
- export interface CompactAgentLine {
9
- icon: string;
10
- name: string;
11
- progress: number;
12
- statusLabel: string;
13
- }
14
- export interface TreeLine {
15
- key: string;
16
- content: string;
17
- }
18
- export declare function buildCompactTree(primary: CompactAgentLine, parallel: CompactAgentLine[]): TreeLine[];
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TREE_CHARS = void 0;
4
- exports.buildCompactTree = buildCompactTree;
5
- const agent_card_pure_1 = require("./agent-card.pure");
6
- exports.TREE_CHARS = {
7
- VERTICAL: '│',
8
- HORIZONTAL: '─',
9
- TOP_LEFT: '┌',
10
- BOTTOM_LEFT: '└',
11
- TEE_RIGHT: '├',
12
- };
13
- function buildCompactTree(primary, parallel) {
14
- const lines = [];
15
- const primaryCard = (0, agent_card_pure_1.buildInlineCard)(primary.icon, primary.name, primary.progress, primary.statusLabel);
16
- const { TOP_LEFT, BOTTOM_LEFT, VERTICAL, TEE_RIGHT, HORIZONTAL } = exports.TREE_CHARS;
17
- lines.push({ key: 'primary-header', content: `${TOP_LEFT} Primary` });
18
- if (parallel.length === 0) {
19
- lines.push({
20
- key: 'primary-card',
21
- content: `${BOTTOM_LEFT} ${primaryCard}`,
22
- });
23
- return lines;
24
- }
25
- lines.push({ key: 'primary-card', content: `${VERTICAL} ${primaryCard}` });
26
- lines.push({
27
- key: 'parallel-header',
28
- content: `${TEE_RIGHT}${HORIZONTAL} Parallel`,
29
- });
30
- for (let i = 0; i < parallel.length; i++) {
31
- const agent = parallel[i];
32
- const card = (0, agent_card_pure_1.buildInlineCard)(agent.icon, agent.name, agent.progress, agent.statusLabel);
33
- lines.push({
34
- key: `parallel-${agent.name}`,
35
- content: `${VERTICAL} ${card}`,
36
- });
37
- }
38
- lines.push({ key: 'footer', content: BOTTOM_LEFT });
39
- return lines;
40
- }
41
- //# sourceMappingURL=agent-tree.pure.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-tree.pure.js","sourceRoot":"","sources":["../../../../src/tui/components/agent-tree.pure.ts"],"names":[],"mappings":";;;AAsBA,4CAuCC;AA7DD,uDAAoD;AAEvC,QAAA,UAAU,GAAG;IACxB,QAAQ,EAAE,GAAG;IACb,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,GAAG;IACb,WAAW,EAAE,GAAG;IAChB,SAAS,EAAE,GAAG;CACN,CAAC;AAcX,SAAgB,gBAAgB,CAC9B,OAAyB,EACzB,QAA4B;IAE5B,MAAM,KAAK,GAAe,EAAE,CAAC;IAC7B,MAAM,WAAW,GAAG,IAAA,iCAAe,EACjC,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,IAAI,EACZ,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,WAAW,CACpB,CAAC;IAEF,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,kBAAU,CAAC;IAE9E,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,gBAAgB,EAAE,OAAO,EAAE,GAAG,QAAQ,UAAU,EAAE,CAAC,CAAC;IAEtE,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,KAAK,CAAC,IAAI,CAAC;YACT,GAAG,EAAE,cAAc;YACnB,OAAO,EAAE,GAAG,WAAW,IAAI,WAAW,EAAE;SACzC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,QAAQ,IAAI,WAAW,EAAE,EAAE,CAAC,CAAC;IAC3E,KAAK,CAAC,IAAI,CAAC;QACT,GAAG,EAAE,iBAAiB;QACtB,OAAO,EAAE,GAAG,SAAS,GAAG,UAAU,WAAW;KAC9C,CAAC,CAAC;IACH,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC1B,MAAM,IAAI,GAAG,IAAA,iCAAe,EAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;QACxF,KAAK,CAAC,IAAI,CAAC;YACT,GAAG,EAAE,YAAY,KAAK,CAAC,IAAI,EAAE;YAC7B,OAAO,EAAE,GAAG,QAAQ,KAAK,IAAI,EAAE;SAChC,CAAC,CAAC;IACL,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;IACpD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const LABEL_WIDTH = 18;
2
- export declare function buildCategoryLabel(icon: string, categoryName: string): string;
3
- export declare function buildCompactCategoryRow(icon: string, categoryName: string, agentNames: string[], maxWidth?: number): string;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LABEL_WIDTH = void 0;
4
- exports.buildCategoryLabel = buildCategoryLabel;
5
- exports.buildCompactCategoryRow = buildCompactCategoryRow;
6
- const agent_mini_card_pure_1 = require("./agent-mini-card.pure");
7
- const display_width_1 = require("../utils/display-width");
8
- exports.LABEL_WIDTH = 18;
9
- const ELLIPSIS = '\u2026';
10
- function buildCategoryLabel(icon, categoryName) {
11
- return icon ? `${icon} ${categoryName}` : categoryName;
12
- }
13
- function buildCompactCategoryRow(icon, categoryName, agentNames, maxWidth = 80) {
14
- const rawLabel = buildCategoryLabel(icon, categoryName);
15
- const label = (0, display_width_1.padEndDisplayWidth)(rawLabel, exports.LABEL_WIDTH);
16
- const labelWidth = Math.max(exports.LABEL_WIDTH, (0, display_width_1.estimateDisplayWidth)(rawLabel));
17
- const remainingWidth = maxWidth - labelWidth - 1;
18
- const fullTags = (0, agent_mini_card_pure_1.joinAgentTags)(agentNames);
19
- if (remainingWidth <= 0)
20
- return label;
21
- const tags = (0, display_width_1.estimateDisplayWidth)(fullTags) <= remainingWidth
22
- ? fullTags
23
- : (0, display_width_1.truncateToDisplayWidth)(fullTags, remainingWidth - 1) + ELLIPSIS;
24
- return `${label} ${tags}`;
25
- }
26
- //# sourceMappingURL=category-row.pure.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"category-row.pure.js","sourceRoot":"","sources":["../../../../src/tui/components/category-row.pure.ts"],"names":[],"mappings":";;;AAUA,gDAEC;AAED,0DAmBC;AAjCD,iEAAuD;AACvD,0DAIgC;AAEnB,QAAA,WAAW,GAAG,EAAE,CAAC;AAC9B,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAE1B,SAAgB,kBAAkB,CAAC,IAAY,EAAE,YAAoB;IACnE,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,YAAY,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC;AACzD,CAAC;AAED,SAAgB,uBAAuB,CACrC,IAAY,EACZ,YAAoB,EACpB,UAAoB,EACpB,WAAmB,EAAE;IAErB,MAAM,QAAQ,GAAG,kBAAkB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,IAAA,kCAAkB,EAAC,QAAQ,EAAE,mBAAW,CAAC,CAAC;IAGxD,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,mBAAW,EAAE,IAAA,oCAAoB,EAAC,QAAQ,CAAC,CAAC,CAAC;IACzE,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,GAAG,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,IAAA,oCAAa,EAAC,UAAU,CAAC,CAAC;IAC3C,IAAI,cAAc,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACtC,MAAM,IAAI,GACR,IAAA,oCAAoB,EAAC,QAAQ,CAAC,IAAI,cAAc;QAC9C,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,IAAA,sCAAsB,EAAC,QAAQ,EAAE,cAAc,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IACtE,OAAO,GAAG,KAAK,IAAI,IAAI,EAAE,CAAC;AAC5B,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { Mode } from '../types';
2
- export declare const MODE_INDICATOR = "\u25CF";
3
- export declare function formatTime(date: Date): string;
4
- export declare function buildModeIndicator(mode: Mode): string;
@@ -1 +0,0 @@
1
- {"version":3,"file":"header.pure.js","sourceRoot":"","sources":["../../../../src/tui/components/header.pure.ts"],"names":[],"mappings":";;;AAIA,gCAIC;AAED,gDAEC;AAVY,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC,SAAgB,UAAU,CAAC,IAAU;IACnC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACvD,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,OAAO,GAAG,KAAK,IAAI,OAAO,EAAE,CAAC;AAC/B,CAAC;AAED,SAAgB,kBAAkB,CAAC,IAAU;IAC3C,OAAO,GAAG,sBAAc,IAAI,IAAI,EAAE,CAAC;AACrC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function clampValue(value: number): number;
2
- export declare function buildProgressBar(value: number, width: number, filledChar?: string, emptyChar?: string): string;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.clampValue = clampValue;
4
- exports.buildProgressBar = buildProgressBar;
5
- const FILLED_CHAR = '█';
6
- const EMPTY_CHAR = '░';
7
- function clampValue(value) {
8
- if (Number.isNaN(value))
9
- return 0;
10
- return Math.max(0, Math.min(100, value));
11
- }
12
- function buildProgressBar(value, width, filledChar = FILLED_CHAR, emptyChar = EMPTY_CHAR) {
13
- const safeWidth = Math.max(0, Math.floor(width));
14
- if (safeWidth === 0)
15
- return '';
16
- const clamped = clampValue(value);
17
- const filledCount = Math.round((clamped / 100) * safeWidth);
18
- const emptyCount = safeWidth - filledCount;
19
- return filledChar.repeat(filledCount) + emptyChar.repeat(emptyCount);
20
- }
21
- //# sourceMappingURL=progress-bar.pure.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"progress-bar.pure.js","sourceRoot":"","sources":["../../../../src/tui/components/progress-bar.pure.ts"],"names":[],"mappings":";;AAGA,gCAGC;AAED,4CAYC;AApBD,MAAM,WAAW,GAAG,GAAG,CAAC;AACxB,MAAM,UAAU,GAAG,GAAG,CAAC;AAEvB,SAAgB,UAAU,CAAC,KAAa;IACtC,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAClC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAC3C,CAAC;AAED,SAAgB,gBAAgB,CAC9B,KAAa,EACb,KAAa,EACb,aAAqB,WAAW,EAChC,YAAoB,UAAU;IAE9B,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACjD,IAAI,SAAS,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,GAAG,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC;IAC5D,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,CAAC;IAC3C,OAAO,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACvE,CAAC"}
@@ -1,15 +0,0 @@
1
- import type { AgentState } from '../types';
2
- import type { SkillRecommendedEvent } from '../events';
3
- export declare function countActiveAgents(agents: AgentState[]): number;
4
- export declare function calculateOverallProgress(agents: AgentState[]): number;
5
- export type Phase = 'Parallel' | 'Sequential' | 'Waiting';
6
- export declare function determinePhase(agents: AgentState[]): Phase;
7
- export declare function buildSkillsDisplay(skills: SkillRecommendedEvent[]): string;
8
- export declare function getPhaseColor(phase: Phase): string;
9
- export interface CompactStatusParts {
10
- leftDivider: string;
11
- mainContent: string;
12
- phaseContent: string;
13
- rightDivider: string;
14
- }
15
- export declare function buildCompactStatusParts(activeCount: number, skillsText: string, progress: number, phase: Phase, terminalWidth: number): CompactStatusParts;
@@ -1,83 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.countActiveAgents = countActiveAgents;
4
- exports.calculateOverallProgress = calculateOverallProgress;
5
- exports.determinePhase = determinePhase;
6
- exports.buildSkillsDisplay = buildSkillsDisplay;
7
- exports.getPhaseColor = getPhaseColor;
8
- exports.buildCompactStatusParts = buildCompactStatusParts;
9
- const progress_bar_pure_1 = require("./progress-bar.pure");
10
- const display_width_1 = require("../utils/display-width");
11
- function countActiveAgents(agents) {
12
- return agents.filter(a => a.status === 'running').length;
13
- }
14
- function calculateOverallProgress(agents) {
15
- const running = agents.filter(a => a.status === 'running');
16
- if (running.length === 0)
17
- return 0;
18
- const sum = running.reduce((acc, a) => acc + a.progress, 0);
19
- return Math.round(sum / running.length);
20
- }
21
- function determinePhase(agents) {
22
- const runningCount = countActiveAgents(agents);
23
- if (runningCount >= 2)
24
- return 'Parallel';
25
- if (runningCount === 1)
26
- return 'Sequential';
27
- return 'Waiting';
28
- }
29
- function buildSkillsDisplay(skills) {
30
- if (skills.length === 0)
31
- return '-';
32
- return skills.map(s => s.skillName).join(', ');
33
- }
34
- const COMPACT_FILLED = '▓';
35
- const COMPACT_EMPTY = '░';
36
- const DIVIDER_CHAR = '─';
37
- const SEPARATOR = ' │ ';
38
- const PHASE_COLORS = {
39
- Parallel: 'cyan',
40
- Sequential: 'green',
41
- Waiting: 'gray',
42
- };
43
- function getPhaseColor(phase) {
44
- return PHASE_COLORS[phase];
45
- }
46
- function buildCompactStatusParts(activeCount, skillsText, progress, phase, terminalWidth) {
47
- const safeWidth = Math.max(0, terminalWidth);
48
- const bar = (0, progress_bar_pure_1.buildProgressBar)(progress, 7, COMPACT_FILLED, COMPACT_EMPTY);
49
- const mainContent = `🤖 ${activeCount} active${SEPARATOR}` +
50
- `🎹 ${skillsText}${SEPARATOR}` +
51
- `${bar} ${progress}%${SEPARATOR}`;
52
- const phaseContent = `⚡ ${phase}`;
53
- const content = mainContent + phaseContent;
54
- const contentWidth = (0, display_width_1.estimateDisplayWidth)(content);
55
- const remaining = safeWidth - contentWidth - 2;
56
- if (remaining <= 0) {
57
- const maxContent = safeWidth - 4;
58
- if (maxContent <= 0) {
59
- return {
60
- leftDivider: DIVIDER_CHAR.repeat(safeWidth),
61
- mainContent: '',
62
- phaseContent: '',
63
- rightDivider: '',
64
- };
65
- }
66
- const truncated = (0, display_width_1.truncateToDisplayWidth)(content, maxContent);
67
- return {
68
- leftDivider: DIVIDER_CHAR,
69
- mainContent: truncated,
70
- phaseContent: '',
71
- rightDivider: DIVIDER_CHAR,
72
- };
73
- }
74
- const leftLen = Math.floor(remaining / 2);
75
- const rightLen = remaining - leftLen;
76
- return {
77
- leftDivider: DIVIDER_CHAR.repeat(leftLen),
78
- mainContent,
79
- phaseContent,
80
- rightDivider: DIVIDER_CHAR.repeat(rightLen),
81
- };
82
- }
83
- //# sourceMappingURL=status-bar.pure.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":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BACf,YAAY,EAAE,EAAE;gBAChB,YAAY,EAAE,EAAE;aACjB,CAAC;QACJ,CAAC;QACD,MAAM,SAAS,GAAG,IAAA,sCAAsB,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC9D,OAAO;YACL,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,SAAS;YACtB,YAAY,EAAE,EAAE;YAChB,YAAY,EAAE,YAAY;SAC3B,CAAC;IACJ,CAAC;IACD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IAC1C,MAAM,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;IACrC,OAAO;QACL,WAAW,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC;QACzC,WAAW;QACX,YAAY;QACZ,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC;KAC5C,CAAC;AACJ,CAAC"}
@@ -1,7 +0,0 @@
1
- import type { AgentState } from '../types';
2
- export interface AgentStateView {
3
- activeAgents: AgentState[];
4
- idleAgents: AgentState[];
5
- primaryAgent: AgentState | null;
6
- }
7
- export declare function useAgentState(agents: AgentState[]): AgentStateView;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAgentState = useAgentState;
4
- const react_1 = require("react");
5
- function useAgentState(agents) {
6
- return (0, react_1.useMemo)(() => {
7
- const activeAgents = agents.filter(a => a.status === 'running');
8
- const idleAgents = agents.filter(a => a.status !== 'running');
9
- const primaryAgent = activeAgents.find(a => a.isPrimary) ?? null;
10
- return { activeAgents, idleAgents, primaryAgent };
11
- }, [agents]);
12
- }
13
- //# sourceMappingURL=use-agent-state.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-agent-state.js","sourceRoot":"","sources":["../../../../src/tui/hooks/use-agent-state.ts"],"names":[],"mappings":";;AASA,sCAOC;AAhBD,iCAAgC;AAShC,SAAgB,aAAa,CAAC,MAAoB;IAChD,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE;QAClB,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC;QAChE,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC;QAC9D,MAAM,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC;QACjE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;IACpD,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;AACf,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,167 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const react_1 = require("react");
4
- const vitest_1 = require("vitest");
5
- const ink_testing_library_1 = require("ink-testing-library");
6
- const ink_1 = require("ink");
7
- const use_agent_state_1 = require("./use-agent-state");
8
- function TestComponent({ agents }) {
9
- const { activeAgents, idleAgents, primaryAgent } = (0, use_agent_state_1.useAgentState)(agents);
10
- return (react_1.default.createElement(ink_1.Text, null, JSON.stringify({
11
- active: activeAgents.length,
12
- idle: idleAgents.length,
13
- primary: primaryAgent?.name ?? null,
14
- activeNames: activeAgents.map(a => a.name),
15
- idleNames: idleAgents.map(a => a.name),
16
- })));
17
- }
18
- (0, vitest_1.describe)('useAgentState', () => {
19
- (0, vitest_1.it)('should return empty arrays when no agents', () => {
20
- const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(TestComponent, { agents: [] }));
21
- (0, vitest_1.expect)(lastFrame()).toContain('"active":0');
22
- (0, vitest_1.expect)(lastFrame()).toContain('"idle":0');
23
- (0, vitest_1.expect)(lastFrame()).toContain('"primary":null');
24
- });
25
- (0, vitest_1.it)('should classify running agents as active', () => {
26
- const agents = [
27
- {
28
- id: 'a1',
29
- name: 'security',
30
- role: 'specialist',
31
- status: 'running',
32
- progress: 0,
33
- isPrimary: false,
34
- },
35
- ];
36
- const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(TestComponent, { agents: agents }));
37
- (0, vitest_1.expect)(lastFrame()).toContain('"active":1');
38
- (0, vitest_1.expect)(lastFrame()).toContain('"idle":0');
39
- });
40
- (0, vitest_1.it)('should classify completed agents as idle', () => {
41
- const agents = [
42
- {
43
- id: 'a1',
44
- name: 'security',
45
- role: 'specialist',
46
- status: 'completed',
47
- progress: 100,
48
- isPrimary: false,
49
- },
50
- ];
51
- const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(TestComponent, { agents: agents }));
52
- (0, vitest_1.expect)(lastFrame()).toContain('"active":0');
53
- (0, vitest_1.expect)(lastFrame()).toContain('"idle":1');
54
- });
55
- (0, vitest_1.it)('should classify failed agents as idle', () => {
56
- const agents = [
57
- {
58
- id: 'a1',
59
- name: 'security',
60
- role: 'specialist',
61
- status: 'failed',
62
- progress: 0,
63
- isPrimary: false,
64
- },
65
- ];
66
- const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(TestComponent, { agents: agents }));
67
- (0, vitest_1.expect)(lastFrame()).toContain('"active":0');
68
- (0, vitest_1.expect)(lastFrame()).toContain('"idle":1');
69
- });
70
- (0, vitest_1.it)('should classify idle-status agents as idle', () => {
71
- const agents = [
72
- {
73
- id: 'a1',
74
- name: 'security',
75
- role: 'specialist',
76
- status: 'idle',
77
- progress: 0,
78
- isPrimary: false,
79
- },
80
- ];
81
- const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(TestComponent, { agents: agents }));
82
- (0, vitest_1.expect)(lastFrame()).toContain('"active":0');
83
- (0, vitest_1.expect)(lastFrame()).toContain('"idle":1');
84
- });
85
- (0, vitest_1.it)('should separate active and idle agents', () => {
86
- const agents = [
87
- {
88
- id: 'a1',
89
- name: 'security',
90
- role: 'specialist',
91
- status: 'running',
92
- progress: 0,
93
- isPrimary: false,
94
- },
95
- {
96
- id: 'a2',
97
- name: 'perf',
98
- role: 'specialist',
99
- status: 'completed',
100
- progress: 100,
101
- isPrimary: false,
102
- },
103
- {
104
- id: 'a3',
105
- name: 'quality',
106
- role: 'specialist',
107
- status: 'idle',
108
- progress: 0,
109
- isPrimary: false,
110
- },
111
- ];
112
- const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(TestComponent, { agents: agents }));
113
- (0, vitest_1.expect)(lastFrame()).toContain('"active":1');
114
- (0, vitest_1.expect)(lastFrame()).toContain('"idle":2');
115
- });
116
- (0, vitest_1.it)('should track primary agent when running', () => {
117
- const agents = [
118
- {
119
- id: 'a1',
120
- name: 'security',
121
- role: 'specialist',
122
- status: 'running',
123
- progress: 0,
124
- isPrimary: true,
125
- },
126
- {
127
- id: 'a2',
128
- name: 'perf',
129
- role: 'specialist',
130
- status: 'running',
131
- progress: 0,
132
- isPrimary: false,
133
- },
134
- ];
135
- const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(TestComponent, { agents: agents }));
136
- (0, vitest_1.expect)(lastFrame()).toContain('"primary":"security"');
137
- });
138
- (0, vitest_1.it)('should return null primary when primary agent is not running', () => {
139
- const agents = [
140
- {
141
- id: 'a1',
142
- name: 'security',
143
- role: 'specialist',
144
- status: 'completed',
145
- progress: 100,
146
- isPrimary: true,
147
- },
148
- ];
149
- const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(TestComponent, { agents: agents }));
150
- (0, vitest_1.expect)(lastFrame()).toContain('"primary":null');
151
- });
152
- (0, vitest_1.it)('should return null primary when no agents have isPrimary', () => {
153
- const agents = [
154
- {
155
- id: 'a1',
156
- name: 'security',
157
- role: 'specialist',
158
- status: 'running',
159
- progress: 0,
160
- isPrimary: false,
161
- },
162
- ];
163
- const { lastFrame } = (0, ink_testing_library_1.render)(react_1.default.createElement(TestComponent, { agents: agents }));
164
- (0, vitest_1.expect)(lastFrame()).toContain('"primary":null');
165
- });
166
- });
167
- //# sourceMappingURL=use-agent-state.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-agent-state.spec.js","sourceRoot":"","sources":["../../../../src/tui/hooks/use-agent-state.spec.tsx"],"names":[],"mappings":";;AAAA,iCAA0B;AAC1B,mCAA8C;AAC9C,6DAA6C;AAC7C,6BAA2B;AAC3B,uDAAkD;AAGlD,SAAS,aAAa,CAAC,EAAE,MAAM,EAA4B;IACzD,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,IAAA,+BAAa,EAAC,MAAM,CAAC,CAAC;IACzE,OAAO,CACL,8BAAC,UAAI,QACF,IAAI,CAAC,SAAS,CAAC;QACd,MAAM,EAAE,YAAY,CAAC,MAAM;QAC3B,IAAI,EAAE,UAAU,CAAC,MAAM;QACvB,OAAO,EAAE,YAAY,EAAE,IAAI,IAAI,IAAI;QACnC,WAAW,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QAC1C,SAAS,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KACvC,CAAC,CACG,CACR,CAAC;AACJ,CAAC;AAED,IAAA,iBAAQ,EAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,IAAA,WAAE,EAAC,2CAA2C,EAAE,GAAG,EAAE;QACnD,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,4BAAM,EAAC,8BAAC,aAAa,IAAC,MAAM,EAAE,EAAE,GAAI,CAAC,CAAC;QAE5D,IAAA,eAAM,EAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAC5C,IAAA,eAAM,EAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC1C,IAAA,eAAM,EAAC,SAAS,EAA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,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,IAAA,WAAE,EAAC,8DAA8D,EAAE,GAAG,EAAE;QACtE,MAAM,MAAM,GAAiB;YAC3B;gBACE,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,YAAY;gBAClB,MAAM,EAAE,WAAW;gBACnB,QAAQ,EAAE,GAAG;gBACb,SAAS,EAAE,IAAI;aAChB;SACF,CAAC;QACF,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,4BAAM,EAAC,8BAAC,aAAa,IAAC,MAAM,EAAE,MAAM,GAAI,CAAC,CAAC;QAEhE,IAAA,eAAM,EAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,IAAA,WAAE,EAAC,0DAA0D,EAAE,GAAG,EAAE;QAClE,MAAM,MAAM,GAAiB;YAC3B;gBACE,EAAE,EAAE,IAAI;gBACR,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,YAAY;gBAClB,MAAM,EAAE,SAAS;gBACjB,QAAQ,EAAE,CAAC;gBACX,SAAS,EAAE,KAAK;aACjB;SACF,CAAC;QACF,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,4BAAM,EAAC,8BAAC,aAAa,IAAC,MAAM,EAAE,MAAM,GAAI,CAAC,CAAC;QAEhE,IAAA,eAAM,EAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,34 +0,0 @@
1
- import type { TuiEventBus } from '../events';
2
- import { type AgentActivatedEvent, type AgentDeactivatedEvent, type ModeChangedEvent, type SkillRecommendedEvent, type ParallelStartedEvent, type ParallelCompletedEvent, type AgentsLoadedEvent, type AgentMetadata } from '../events';
3
- import type { AgentState, Mode } from '../types';
4
- export interface EventBusState {
5
- agents: AgentState[];
6
- mode: Mode | null;
7
- skills: SkillRecommendedEvent[];
8
- allAgents: AgentMetadata[];
9
- }
10
- export type EventBusAction = {
11
- type: 'AGENT_ACTIVATED';
12
- payload: AgentActivatedEvent;
13
- } | {
14
- type: 'AGENT_DEACTIVATED';
15
- payload: AgentDeactivatedEvent;
16
- } | {
17
- type: 'MODE_CHANGED';
18
- payload: ModeChangedEvent;
19
- } | {
20
- type: 'SKILL_RECOMMENDED';
21
- payload: SkillRecommendedEvent;
22
- } | {
23
- type: 'PARALLEL_STARTED';
24
- payload: ParallelStartedEvent;
25
- } | {
26
- type: 'PARALLEL_COMPLETED';
27
- payload: ParallelCompletedEvent;
28
- } | {
29
- type: 'AGENTS_LOADED';
30
- payload: AgentsLoadedEvent;
31
- };
32
- export declare const initialState: EventBusState;
33
- export declare function eventBusReducer(state: EventBusState, action: EventBusAction): EventBusState;
34
- export declare function useEventBus(eventBus: TuiEventBus | undefined): EventBusState;