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
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.computeEdgePath = computeEdgePath;
4
+ exports.computeLabelPosition = computeLabelPosition;
5
+ function computeEdgePath(from, to) {
6
+ const path = [];
7
+ const midX = Math.floor((from.x + to.x) / 2);
8
+ if (from.y === to.y) {
9
+ const dir = to.x > from.x ? 1 : -1;
10
+ for (let x = from.x; x !== to.x; x += dir) {
11
+ path.push({ x, y: from.y, char: '─' });
12
+ }
13
+ path.push({ x: to.x, y: to.y, char: dir > 0 ? '▸' : '◂' });
14
+ }
15
+ else if (from.x === to.x) {
16
+ const dir = to.y > from.y ? 1 : -1;
17
+ for (let y = from.y; y !== to.y; y += dir) {
18
+ path.push({ x: from.x, y, char: '│' });
19
+ }
20
+ path.push({ x: to.x, y: to.y, char: dir > 0 ? '▾' : '▴' });
21
+ }
22
+ else {
23
+ const dirX = midX > from.x ? 1 : midX < from.x ? -1 : 0;
24
+ if (dirX !== 0) {
25
+ for (let x = from.x; x !== midX; x += dirX) {
26
+ path.push({ x, y: from.y, char: '─' });
27
+ }
28
+ }
29
+ const dirY = to.y > from.y ? 1 : -1;
30
+ path.push({
31
+ x: midX,
32
+ y: from.y,
33
+ char: dirX >= 0 ? (dirY > 0 ? '╮' : '╯') : dirY > 0 ? '╭' : '╰',
34
+ });
35
+ for (let y = from.y + dirY; y !== to.y; y += dirY) {
36
+ path.push({ x: midX, y, char: '│' });
37
+ }
38
+ const dirX2 = to.x > midX ? 1 : to.x < midX ? -1 : 0;
39
+ path.push({
40
+ x: midX,
41
+ y: to.y,
42
+ char: dirY > 0 ? (dirX2 >= 0 ? '╰' : '╯') : dirX2 >= 0 ? '╭' : '╮',
43
+ });
44
+ if (dirX2 !== 0) {
45
+ for (let x = midX + dirX2; x !== to.x; x += dirX2) {
46
+ path.push({ x, y: to.y, char: '─' });
47
+ }
48
+ }
49
+ if (to.x !== midX) {
50
+ path.push({ x: to.x, y: to.y, char: dirX2 >= 0 ? '▸' : '◂' });
51
+ }
52
+ else {
53
+ path[path.length - 1].char = dirY > 0 ? '▾' : '▴';
54
+ }
55
+ }
56
+ return path;
57
+ }
58
+ function computeLabelPosition(path, label) {
59
+ const hSegments = path.filter(p => p.char === '─');
60
+ if (hSegments.length < label.length + 2)
61
+ return null;
62
+ const startIdx = Math.floor((hSegments.length - label.length) / 2);
63
+ return { x: hSegments[startIdx].x, y: hSegments[startIdx].y };
64
+ }
65
+ //# sourceMappingURL=edge-router.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edge-router.js","sourceRoot":"","sources":["../../../../src/tui/utils/edge-router.ts"],"names":[],"mappings":";;AAqBA,0CA4DC;AAKD,oDAKC;AAtED,SAAgB,eAAe,CAAC,IAAW,EAAE,EAAS;IACpD,MAAM,IAAI,GAAkB,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAE7C,IAAI,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC;QAEpB,MAAM,GAAG,GAAG,EAAE,CAAC,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CAAC;AACd,CAAC;AAKD,SAAgB,oBAAoB,CAAC,IAAmB,EAAE,KAAa;IACrE,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;IACnD,IAAI,SAAS,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACrD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACnE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;AAChE,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export { isNerdFontEnabled, getAgentIcon, AGENT_ICONS, type AgentIconEntry } from './icons';
2
2
  export { STATUS_COLORS, getStatusColor, getColorDepth, type ColorDepth } from './colors';
3
- export { MODE_COLORS, getModeColor } from './constants';
3
+ export { getModeColor } from './theme';
4
4
  export { estimateDisplayWidth, truncateToDisplayWidth, padEndDisplayWidth } from './display-width';
5
+ export { ColorBuffer, groupByStyle, type CellStyle, type ColorCell, type StyledSegment, } from './color-buffer';
6
+ export { NEON_COLORS, STATUS_STYLES, STATUS_ICONS, MODE_LABEL_STYLES, STAGE_LABEL_STYLES, EDGE_STYLES, SECTION_DIVIDER_STYLE, LEGEND_STYLE, PROGRESS_BAR_STYLES, GLOBAL_STATE_ICONS, GLOBAL_STATE_COLORS, getStatusStyle, getModeLabelStyle, getStageLabelStyle, } from './theme';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.padEndDisplayWidth = exports.truncateToDisplayWidth = exports.estimateDisplayWidth = exports.getModeColor = exports.MODE_COLORS = exports.getColorDepth = exports.getStatusColor = exports.STATUS_COLORS = exports.AGENT_ICONS = exports.getAgentIcon = exports.isNerdFontEnabled = void 0;
3
+ exports.getStageLabelStyle = exports.getModeLabelStyle = exports.getStatusStyle = exports.GLOBAL_STATE_COLORS = exports.GLOBAL_STATE_ICONS = exports.PROGRESS_BAR_STYLES = exports.LEGEND_STYLE = exports.SECTION_DIVIDER_STYLE = exports.EDGE_STYLES = exports.STAGE_LABEL_STYLES = exports.MODE_LABEL_STYLES = exports.STATUS_ICONS = exports.STATUS_STYLES = exports.NEON_COLORS = exports.groupByStyle = exports.ColorBuffer = exports.padEndDisplayWidth = exports.truncateToDisplayWidth = exports.estimateDisplayWidth = exports.getModeColor = exports.getColorDepth = exports.getStatusColor = exports.STATUS_COLORS = exports.AGENT_ICONS = exports.getAgentIcon = exports.isNerdFontEnabled = void 0;
4
4
  var icons_1 = require("./icons");
5
5
  Object.defineProperty(exports, "isNerdFontEnabled", { enumerable: true, get: function () { return icons_1.isNerdFontEnabled; } });
6
6
  Object.defineProperty(exports, "getAgentIcon", { enumerable: true, get: function () { return icons_1.getAgentIcon; } });
@@ -9,11 +9,28 @@ var colors_1 = require("./colors");
9
9
  Object.defineProperty(exports, "STATUS_COLORS", { enumerable: true, get: function () { return colors_1.STATUS_COLORS; } });
10
10
  Object.defineProperty(exports, "getStatusColor", { enumerable: true, get: function () { return colors_1.getStatusColor; } });
11
11
  Object.defineProperty(exports, "getColorDepth", { enumerable: true, get: function () { return colors_1.getColorDepth; } });
12
- var constants_1 = require("./constants");
13
- Object.defineProperty(exports, "MODE_COLORS", { enumerable: true, get: function () { return constants_1.MODE_COLORS; } });
14
- Object.defineProperty(exports, "getModeColor", { enumerable: true, get: function () { return constants_1.getModeColor; } });
12
+ var theme_1 = require("./theme");
13
+ Object.defineProperty(exports, "getModeColor", { enumerable: true, get: function () { return theme_1.getModeColor; } });
15
14
  var display_width_1 = require("./display-width");
16
15
  Object.defineProperty(exports, "estimateDisplayWidth", { enumerable: true, get: function () { return display_width_1.estimateDisplayWidth; } });
17
16
  Object.defineProperty(exports, "truncateToDisplayWidth", { enumerable: true, get: function () { return display_width_1.truncateToDisplayWidth; } });
18
17
  Object.defineProperty(exports, "padEndDisplayWidth", { enumerable: true, get: function () { return display_width_1.padEndDisplayWidth; } });
18
+ var color_buffer_1 = require("./color-buffer");
19
+ Object.defineProperty(exports, "ColorBuffer", { enumerable: true, get: function () { return color_buffer_1.ColorBuffer; } });
20
+ Object.defineProperty(exports, "groupByStyle", { enumerable: true, get: function () { return color_buffer_1.groupByStyle; } });
21
+ var theme_2 = require("./theme");
22
+ Object.defineProperty(exports, "NEON_COLORS", { enumerable: true, get: function () { return theme_2.NEON_COLORS; } });
23
+ Object.defineProperty(exports, "STATUS_STYLES", { enumerable: true, get: function () { return theme_2.STATUS_STYLES; } });
24
+ Object.defineProperty(exports, "STATUS_ICONS", { enumerable: true, get: function () { return theme_2.STATUS_ICONS; } });
25
+ Object.defineProperty(exports, "MODE_LABEL_STYLES", { enumerable: true, get: function () { return theme_2.MODE_LABEL_STYLES; } });
26
+ Object.defineProperty(exports, "STAGE_LABEL_STYLES", { enumerable: true, get: function () { return theme_2.STAGE_LABEL_STYLES; } });
27
+ Object.defineProperty(exports, "EDGE_STYLES", { enumerable: true, get: function () { return theme_2.EDGE_STYLES; } });
28
+ Object.defineProperty(exports, "SECTION_DIVIDER_STYLE", { enumerable: true, get: function () { return theme_2.SECTION_DIVIDER_STYLE; } });
29
+ Object.defineProperty(exports, "LEGEND_STYLE", { enumerable: true, get: function () { return theme_2.LEGEND_STYLE; } });
30
+ Object.defineProperty(exports, "PROGRESS_BAR_STYLES", { enumerable: true, get: function () { return theme_2.PROGRESS_BAR_STYLES; } });
31
+ Object.defineProperty(exports, "GLOBAL_STATE_ICONS", { enumerable: true, get: function () { return theme_2.GLOBAL_STATE_ICONS; } });
32
+ Object.defineProperty(exports, "GLOBAL_STATE_COLORS", { enumerable: true, get: function () { return theme_2.GLOBAL_STATE_COLORS; } });
33
+ Object.defineProperty(exports, "getStatusStyle", { enumerable: true, get: function () { return theme_2.getStatusStyle; } });
34
+ Object.defineProperty(exports, "getModeLabelStyle", { enumerable: true, get: function () { return theme_2.getModeLabelStyle; } });
35
+ Object.defineProperty(exports, "getStageLabelStyle", { enumerable: true, get: function () { return theme_2.getStageLabelStyle; } });
19
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tui/utils/index.ts"],"names":[],"mappings":";;;AAAA,iCAA4F;AAAnF,0GAAA,iBAAiB,OAAA;AAAE,qGAAA,YAAY,OAAA;AAAE,oGAAA,WAAW,OAAA;AAErD,mCAAyF;AAAhF,uGAAA,aAAa,OAAA;AAAE,wGAAA,cAAc,OAAA;AAAE,uGAAA,aAAa,OAAA;AAErD,yCAAwD;AAA/C,wGAAA,WAAW,OAAA;AAAE,yGAAA,YAAY,OAAA;AAElC,iDAAmG;AAA1F,qHAAA,oBAAoB,OAAA;AAAE,uHAAA,sBAAsB,OAAA;AAAE,mHAAA,kBAAkB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tui/utils/index.ts"],"names":[],"mappings":";;;AAAA,iCAA4F;AAAnF,0GAAA,iBAAiB,OAAA;AAAE,qGAAA,YAAY,OAAA;AAAE,oGAAA,WAAW,OAAA;AAErD,mCAAyF;AAAhF,uGAAA,aAAa,OAAA;AAAE,wGAAA,cAAc,OAAA;AAAE,uGAAA,aAAa,OAAA;AAErD,iCAAuC;AAA9B,qGAAA,YAAY,OAAA;AAErB,iDAAmG;AAA1F,qHAAA,oBAAoB,OAAA;AAAE,uHAAA,sBAAsB,OAAA;AAAE,mHAAA,kBAAkB,OAAA;AAEzE,+CAMwB;AALtB,2GAAA,WAAW,OAAA;AACX,4GAAA,YAAY,OAAA;AAMd,iCAeiB;AAdf,oGAAA,WAAW,OAAA;AACX,sGAAA,aAAa,OAAA;AACb,qGAAA,YAAY,OAAA;AACZ,0GAAA,iBAAiB,OAAA;AACjB,2GAAA,kBAAkB,OAAA;AAClB,oGAAA,WAAW,OAAA;AACX,8GAAA,qBAAqB,OAAA;AACrB,qGAAA,YAAY,OAAA;AACZ,4GAAA,mBAAmB,OAAA;AACnB,2GAAA,kBAAkB,OAAA;AAClB,4GAAA,mBAAmB,OAAA;AACnB,uGAAA,cAAc,OAAA;AACd,0GAAA,iBAAiB,OAAA;AACjB,2GAAA,kBAAkB,OAAA"}
@@ -0,0 +1,50 @@
1
+ import type { DashboardNodeStatus, GlobalRunState } from '../dashboard-types';
2
+ import type { Mode } from '../types';
3
+ import type { CellStyle } from './color-buffer';
4
+ export type { CellStyle };
5
+ export declare const NEON_COLORS: Readonly<{
6
+ readonly primary: "cyan";
7
+ readonly secondary: "magenta";
8
+ readonly running: "green";
9
+ readonly warning: "yellow";
10
+ readonly error: "red";
11
+ readonly done: "green";
12
+ readonly inactive: "gray";
13
+ readonly content: "white";
14
+ }>;
15
+ export declare const BORDER_COLORS: Readonly<{
16
+ readonly panel: "cyan";
17
+ }>;
18
+ export declare const STATUS_STYLES: Readonly<Record<DashboardNodeStatus, CellStyle>>;
19
+ export declare const MODE_LABEL_STYLES: Readonly<Record<Mode, CellStyle>>;
20
+ export declare const STAGE_LABEL_STYLES: Readonly<Record<Mode, CellStyle>>;
21
+ export declare const EDGE_STYLES: Readonly<{
22
+ path: CellStyle;
23
+ arrow: CellStyle;
24
+ label: CellStyle;
25
+ }>;
26
+ export declare const SECTION_DIVIDER_STYLE: CellStyle;
27
+ export declare const LEGEND_STYLE: CellStyle;
28
+ export declare const PROGRESS_BAR_STYLES: Readonly<{
29
+ filled: CellStyle;
30
+ empty: CellStyle;
31
+ }>;
32
+ export declare const GLOW_STYLE: CellStyle;
33
+ export declare const PIPELINE_STYLES: Readonly<{
34
+ arrow: CellStyle;
35
+ connector: CellStyle;
36
+ }>;
37
+ export declare const PROGRESS_BAR_CHARS: Readonly<{
38
+ filled: "█";
39
+ empty: "░";
40
+ }>;
41
+ export declare const STATUS_ICONS: Readonly<Record<DashboardNodeStatus, string>>;
42
+ export declare function getStatusStyle(status: DashboardNodeStatus): CellStyle;
43
+ export declare function getModeLabelStyle(mode: Mode, active?: boolean): CellStyle;
44
+ export declare function getStageLabelStyle(stage: Mode): CellStyle;
45
+ export declare const GLOBAL_STATE_ICONS: Readonly<Record<GlobalRunState, string>>;
46
+ export declare const GLOBAL_STATE_COLORS: Readonly<Record<GlobalRunState, string>>;
47
+ export declare function getNodeStatusColor(status: DashboardNodeStatus): string;
48
+ export declare function getModeColor(mode: Mode): string;
49
+ export declare const AGENT_AVATARS: Readonly<Record<string, string>>;
50
+ export declare function getAgentAvatar(agentName: string): string;
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AGENT_AVATARS = exports.GLOBAL_STATE_COLORS = exports.GLOBAL_STATE_ICONS = exports.STATUS_ICONS = exports.PROGRESS_BAR_CHARS = exports.PIPELINE_STYLES = exports.GLOW_STYLE = exports.PROGRESS_BAR_STYLES = exports.LEGEND_STYLE = exports.SECTION_DIVIDER_STYLE = exports.EDGE_STYLES = exports.STAGE_LABEL_STYLES = exports.MODE_LABEL_STYLES = exports.STATUS_STYLES = exports.BORDER_COLORS = exports.NEON_COLORS = void 0;
4
+ exports.getStatusStyle = getStatusStyle;
5
+ exports.getModeLabelStyle = getModeLabelStyle;
6
+ exports.getStageLabelStyle = getStageLabelStyle;
7
+ exports.getNodeStatusColor = getNodeStatusColor;
8
+ exports.getModeColor = getModeColor;
9
+ exports.getAgentAvatar = getAgentAvatar;
10
+ exports.NEON_COLORS = Object.freeze({
11
+ primary: 'cyan',
12
+ secondary: 'magenta',
13
+ running: 'green',
14
+ warning: 'yellow',
15
+ error: 'red',
16
+ done: 'green',
17
+ inactive: 'gray',
18
+ content: 'white',
19
+ });
20
+ exports.BORDER_COLORS = Object.freeze({
21
+ panel: exports.NEON_COLORS.primary,
22
+ });
23
+ exports.STATUS_STYLES = Object.freeze({
24
+ running: { fg: 'green', bold: true },
25
+ idle: { fg: 'gray', dim: true },
26
+ blocked: { fg: 'yellow' },
27
+ error: { fg: 'red', bold: true },
28
+ done: { fg: 'green' },
29
+ });
30
+ exports.MODE_LABEL_STYLES = Object.freeze({
31
+ PLAN: { fg: 'cyan', bold: true },
32
+ ACT: { fg: 'magenta', bold: true },
33
+ EVAL: { fg: 'yellow', bold: true },
34
+ AUTO: { fg: 'green', bold: true },
35
+ });
36
+ exports.STAGE_LABEL_STYLES = exports.MODE_LABEL_STYLES;
37
+ exports.EDGE_STYLES = Object.freeze({
38
+ path: { fg: 'cyan', dim: true },
39
+ arrow: { fg: 'magenta', bold: true },
40
+ label: { fg: 'magenta' },
41
+ });
42
+ exports.SECTION_DIVIDER_STYLE = Object.freeze({ fg: 'magenta' });
43
+ exports.LEGEND_STYLE = Object.freeze({ fg: 'gray', dim: true });
44
+ exports.PROGRESS_BAR_STYLES = Object.freeze({
45
+ filled: { fg: 'magenta' },
46
+ empty: { fg: 'gray', dim: true },
47
+ });
48
+ exports.GLOW_STYLE = Object.freeze({ fg: 'green', dim: true });
49
+ exports.PIPELINE_STYLES = Object.freeze({
50
+ arrow: { fg: 'magenta', bold: true },
51
+ connector: { fg: 'gray', dim: true },
52
+ });
53
+ exports.PROGRESS_BAR_CHARS = Object.freeze({
54
+ filled: '█',
55
+ empty: '░',
56
+ });
57
+ exports.STATUS_ICONS = Object.freeze({
58
+ running: '●',
59
+ idle: '○',
60
+ blocked: '⏸',
61
+ error: '!',
62
+ done: '✓',
63
+ });
64
+ function getStatusStyle(status) {
65
+ return exports.STATUS_STYLES[status] ?? exports.STATUS_STYLES.idle;
66
+ }
67
+ function getModeLabelStyle(mode, active) {
68
+ const base = exports.MODE_LABEL_STYLES[mode] ?? exports.MODE_LABEL_STYLES.PLAN;
69
+ if (active === false) {
70
+ return { fg: base.fg, dim: true };
71
+ }
72
+ return base;
73
+ }
74
+ function getStageLabelStyle(stage) {
75
+ return exports.STAGE_LABEL_STYLES[stage] ?? exports.STAGE_LABEL_STYLES.PLAN;
76
+ }
77
+ exports.GLOBAL_STATE_ICONS = Object.freeze({
78
+ RUNNING: '●',
79
+ IDLE: '○',
80
+ ERROR: '!',
81
+ });
82
+ exports.GLOBAL_STATE_COLORS = Object.freeze({
83
+ RUNNING: 'green',
84
+ IDLE: 'gray',
85
+ ERROR: 'red',
86
+ });
87
+ function getNodeStatusColor(status) {
88
+ return exports.STATUS_STYLES[status]?.fg ?? 'gray';
89
+ }
90
+ function getModeColor(mode) {
91
+ return exports.MODE_LABEL_STYLES[mode]?.fg ?? 'cyan';
92
+ }
93
+ exports.AGENT_AVATARS = Object.freeze({
94
+ 'solution-architect': '🏛️',
95
+ architect: '🏗️',
96
+ frontend: '🎨',
97
+ backend: '⚙️',
98
+ security: '🔒',
99
+ test: '🧪',
100
+ performance: '⚡',
101
+ 'code-quality': '📏',
102
+ devops: '🚀',
103
+ documentation: '📝',
104
+ accessibility: '♿',
105
+ seo: '🔍',
106
+ observability: '📊',
107
+ migration: '🔄',
108
+ integration: '🔗',
109
+ 'event-architecture': '📨',
110
+ mobile: '📱',
111
+ data: '🗄️',
112
+ 'ui-ux': '🎯',
113
+ i18n: '🌐',
114
+ 'plan-mode': '📋',
115
+ 'act-mode': '🔨',
116
+ 'eval-mode': '🔬',
117
+ 'auto-mode': '🤖',
118
+ });
119
+ function getAgentAvatar(agentName) {
120
+ const lower = agentName.toLowerCase();
121
+ const sortedEntries = Object.entries(exports.AGENT_AVATARS).sort(([a], [b]) => b.length - a.length);
122
+ for (const [keyword, avatar] of sortedEntries) {
123
+ if (lower.includes(keyword))
124
+ return avatar;
125
+ }
126
+ return '🤖';
127
+ }
128
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../../src/tui/utils/theme.ts"],"names":[],"mappings":";;;AA8HA,wCAEC;AAKD,8CAMC;AAKD,gDAEC;AA0BD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