@ranker/raxflow 0.2.2 → 0.2.3

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 (378) hide show
  1. package/dist/benchmark.d.ts +10 -0
  2. package/dist/benchmark.d.ts.map +1 -0
  3. package/dist/benchmark.js +123 -0
  4. package/dist/benchmark.js.map +1 -0
  5. package/dist/bin.d.ts +3 -0
  6. package/dist/bin.d.ts.map +1 -0
  7. package/dist/bin.js +141 -0
  8. package/dist/bin.js.map +1 -0
  9. package/dist/bootstrap.d.ts +8 -0
  10. package/dist/bootstrap.d.ts.map +1 -0
  11. package/dist/bootstrap.js +22 -0
  12. package/dist/bootstrap.js.map +1 -0
  13. package/dist/bridge-adapter-templates.d.ts +4 -0
  14. package/dist/bridge-adapter-templates.d.ts.map +1 -0
  15. package/dist/bridge-adapter-templates.js +185 -0
  16. package/dist/bridge-adapter-templates.js.map +1 -0
  17. package/dist/bridge-test.d.ts +7 -0
  18. package/dist/bridge-test.d.ts.map +1 -0
  19. package/dist/bridge-test.js +89 -0
  20. package/dist/bridge-test.js.map +1 -0
  21. package/dist/dashboard.d.ts +4 -0
  22. package/dist/dashboard.d.ts.map +1 -0
  23. package/{src/dashboard.ts → dist/dashboard.js} +8 -10
  24. package/dist/dashboard.js.map +1 -0
  25. package/dist/doctor.d.ts +6 -0
  26. package/dist/doctor.d.ts.map +1 -0
  27. package/dist/doctor.js +70 -0
  28. package/dist/doctor.js.map +1 -0
  29. package/dist/evolve.d.ts +7 -0
  30. package/dist/evolve.d.ts.map +1 -0
  31. package/{src/evolve.ts → dist/evolve.js} +7 -33
  32. package/dist/evolve.js.map +1 -0
  33. package/dist/host-init-templates.d.ts +16 -0
  34. package/dist/host-init-templates.d.ts.map +1 -0
  35. package/dist/host-init-templates.js +119 -0
  36. package/dist/host-init-templates.js.map +1 -0
  37. package/dist/hub/__tests__/commands.test.d.ts +2 -0
  38. package/dist/hub/__tests__/commands.test.d.ts.map +1 -0
  39. package/dist/hub/__tests__/commands.test.js +72 -0
  40. package/dist/hub/__tests__/commands.test.js.map +1 -0
  41. package/dist/hub/__tests__/history.test.d.ts +2 -0
  42. package/dist/hub/__tests__/history.test.d.ts.map +1 -0
  43. package/dist/hub/__tests__/history.test.js +119 -0
  44. package/dist/hub/__tests__/history.test.js.map +1 -0
  45. package/dist/hub/__tests__/parser.test.d.ts +2 -0
  46. package/dist/hub/__tests__/parser.test.d.ts.map +1 -0
  47. package/dist/hub/__tests__/parser.test.js +92 -0
  48. package/dist/hub/__tests__/parser.test.js.map +1 -0
  49. package/dist/hub/commands/agents.d.ts +3 -0
  50. package/dist/hub/commands/agents.d.ts.map +1 -0
  51. package/dist/hub/commands/agents.js +36 -0
  52. package/dist/hub/commands/agents.js.map +1 -0
  53. package/dist/hub/commands/index.d.ts +4 -0
  54. package/dist/hub/commands/index.d.ts.map +1 -0
  55. package/dist/hub/commands/index.js +123 -0
  56. package/dist/hub/commands/index.js.map +1 -0
  57. package/dist/hub/commands/logs.d.ts +3 -0
  58. package/dist/hub/commands/logs.d.ts.map +1 -0
  59. package/dist/hub/commands/logs.js +53 -0
  60. package/dist/hub/commands/logs.js.map +1 -0
  61. package/dist/hub/commands/memory.d.ts +3 -0
  62. package/dist/hub/commands/memory.d.ts.map +1 -0
  63. package/dist/hub/commands/memory.js +40 -0
  64. package/dist/hub/commands/memory.js.map +1 -0
  65. package/dist/hub/commands/metrics.d.ts +3 -0
  66. package/dist/hub/commands/metrics.d.ts.map +1 -0
  67. package/dist/hub/commands/metrics.js +35 -0
  68. package/dist/hub/commands/metrics.js.map +1 -0
  69. package/dist/hub/commands/providers.d.ts +3 -0
  70. package/dist/hub/commands/providers.d.ts.map +1 -0
  71. package/dist/hub/commands/providers.js +26 -0
  72. package/dist/hub/commands/providers.js.map +1 -0
  73. package/dist/hub/commands/run.d.ts +3 -0
  74. package/dist/hub/commands/run.d.ts.map +1 -0
  75. package/dist/hub/commands/run.js +31 -0
  76. package/dist/hub/commands/run.js.map +1 -0
  77. package/dist/hub/commands/status.d.ts +3 -0
  78. package/dist/hub/commands/status.d.ts.map +1 -0
  79. package/dist/hub/commands/status.js +61 -0
  80. package/dist/hub/commands/status.js.map +1 -0
  81. package/dist/hub/commands/workflows.d.ts +3 -0
  82. package/dist/hub/commands/workflows.d.ts.map +1 -0
  83. package/dist/hub/commands/workflows.js +45 -0
  84. package/dist/hub/commands/workflows.js.map +1 -0
  85. package/dist/hub/config-loader.d.ts +4 -0
  86. package/dist/hub/config-loader.d.ts.map +1 -0
  87. package/dist/hub/config-loader.js +27 -0
  88. package/dist/hub/config-loader.js.map +1 -0
  89. package/dist/hub/event-listener.d.ts +6 -0
  90. package/dist/hub/event-listener.d.ts.map +1 -0
  91. package/dist/hub/event-listener.js +12 -0
  92. package/dist/hub/event-listener.js.map +1 -0
  93. package/dist/hub/history.d.ts +13 -0
  94. package/dist/hub/history.d.ts.map +1 -0
  95. package/dist/hub/history.js +59 -0
  96. package/dist/hub/history.js.map +1 -0
  97. package/dist/hub/index.d.ts +4 -0
  98. package/dist/hub/index.d.ts.map +1 -0
  99. package/dist/hub/index.js +114 -0
  100. package/dist/hub/index.js.map +1 -0
  101. package/dist/hub/parser.d.ts +4 -0
  102. package/dist/hub/parser.d.ts.map +1 -0
  103. package/dist/hub/parser.js +98 -0
  104. package/dist/hub/parser.js.map +1 -0
  105. package/dist/hub/styles/borders.d.ts +23 -0
  106. package/dist/hub/styles/borders.d.ts.map +1 -0
  107. package/dist/hub/styles/borders.js +64 -0
  108. package/dist/hub/styles/borders.js.map +1 -0
  109. package/dist/hub/styles/colors.d.ts +63 -0
  110. package/dist/hub/styles/colors.d.ts.map +1 -0
  111. package/dist/hub/styles/colors.js +115 -0
  112. package/dist/hub/styles/colors.js.map +1 -0
  113. package/dist/hub/styles/typography.d.ts +34 -0
  114. package/dist/hub/styles/typography.d.ts.map +1 -0
  115. package/dist/hub/styles/typography.js +60 -0
  116. package/dist/hub/styles/typography.js.map +1 -0
  117. package/dist/hub/types.d.ts +27 -0
  118. package/dist/hub/types.d.ts.map +1 -0
  119. package/dist/hub/types.js +2 -0
  120. package/dist/hub/types.js.map +1 -0
  121. package/dist/index.d.ts +11 -0
  122. package/dist/index.d.ts.map +1 -0
  123. package/{src/index.ts → dist/index.js} +1 -0
  124. package/dist/index.js.map +1 -0
  125. package/dist/init-host.d.ts +10 -0
  126. package/dist/init-host.d.ts.map +1 -0
  127. package/dist/init-host.js +232 -0
  128. package/dist/init-host.js.map +1 -0
  129. package/dist/install.d.ts +8 -0
  130. package/dist/install.d.ts.map +1 -0
  131. package/dist/install.js +99 -0
  132. package/dist/install.js.map +1 -0
  133. package/dist/run.d.ts +16 -0
  134. package/dist/run.d.ts.map +1 -0
  135. package/dist/run.js +238 -0
  136. package/dist/run.js.map +1 -0
  137. package/dist/setup/components/ApiKeyInput.d.ts +25 -0
  138. package/dist/setup/components/ApiKeyInput.d.ts.map +1 -0
  139. package/dist/setup/components/ApiKeyInput.js +54 -0
  140. package/dist/setup/components/ApiKeyInput.js.map +1 -0
  141. package/dist/setup/components/AsciiBanner.d.ts +22 -0
  142. package/dist/setup/components/AsciiBanner.d.ts.map +1 -0
  143. package/{src/setup/components/AsciiBanner.tsx → dist/setup/components/AsciiBanner.js} +24 -94
  144. package/dist/setup/components/AsciiBanner.js.map +1 -0
  145. package/dist/setup/components/CliDetector.d.ts +17 -0
  146. package/dist/setup/components/CliDetector.d.ts.map +1 -0
  147. package/dist/setup/components/CliDetector.js +79 -0
  148. package/dist/setup/components/CliDetector.js.map +1 -0
  149. package/dist/setup/components/ModeSelector.d.ts +8 -0
  150. package/dist/setup/components/ModeSelector.d.ts.map +1 -0
  151. package/dist/setup/components/ModeSelector.js +76 -0
  152. package/dist/setup/components/ModeSelector.js.map +1 -0
  153. package/dist/setup/components/ProviderSelector.d.ts +18 -0
  154. package/dist/setup/components/ProviderSelector.d.ts.map +1 -0
  155. package/dist/setup/components/ProviderSelector.js +98 -0
  156. package/dist/setup/components/ProviderSelector.js.map +1 -0
  157. package/dist/setup/components/SetupWizard.d.ts +2 -0
  158. package/dist/setup/components/SetupWizard.d.ts.map +1 -0
  159. package/dist/setup/components/SetupWizard.js +212 -0
  160. package/dist/setup/components/SetupWizard.js.map +1 -0
  161. package/dist/setup/components/StepIndicator.d.ts +13 -0
  162. package/dist/setup/components/StepIndicator.d.ts.map +1 -0
  163. package/dist/setup/components/StepIndicator.js +18 -0
  164. package/dist/setup/components/StepIndicator.js.map +1 -0
  165. package/dist/setup/components/SuccessScreen.d.ts +18 -0
  166. package/dist/setup/components/SuccessScreen.d.ts.map +1 -0
  167. package/dist/setup/components/SuccessScreen.js +38 -0
  168. package/dist/setup/components/SuccessScreen.js.map +1 -0
  169. package/dist/setup/index.d.ts +12 -0
  170. package/dist/setup/index.d.ts.map +1 -0
  171. package/{src/setup/index.ts → dist/setup/index.js} +14 -19
  172. package/dist/setup/index.js.map +1 -0
  173. package/dist/setup/utils/cli-detection.d.ts +12 -0
  174. package/dist/setup/utils/cli-detection.d.ts.map +1 -0
  175. package/dist/setup/utils/cli-detection.js +83 -0
  176. package/dist/setup/utils/cli-detection.js.map +1 -0
  177. package/dist/setup/utils/config-writer.d.ts +43 -0
  178. package/dist/setup/utils/config-writer.d.ts.map +1 -0
  179. package/dist/setup/utils/config-writer.js +180 -0
  180. package/dist/setup/utils/config-writer.js.map +1 -0
  181. package/dist/styles.d.ts +12 -0
  182. package/dist/styles.d.ts.map +1 -0
  183. package/dist/styles.js +12 -0
  184. package/dist/styles.js.map +1 -0
  185. package/dist/tui/App.d.ts +3 -0
  186. package/dist/tui/App.d.ts.map +1 -0
  187. package/dist/tui/App.js +136 -0
  188. package/dist/tui/App.js.map +1 -0
  189. package/dist/tui/components/AgentStateIcon.d.ts +18 -0
  190. package/dist/tui/components/AgentStateIcon.d.ts.map +1 -0
  191. package/dist/tui/components/AgentStateIcon.js +57 -0
  192. package/dist/tui/components/AgentStateIcon.js.map +1 -0
  193. package/dist/tui/components/AnimatedBranch.d.ts +39 -0
  194. package/dist/tui/components/AnimatedBranch.d.ts.map +1 -0
  195. package/dist/tui/components/AnimatedBranch.js +64 -0
  196. package/dist/tui/components/AnimatedBranch.js.map +1 -0
  197. package/dist/tui/components/ChatPanel.d.ts +17 -0
  198. package/dist/tui/components/ChatPanel.d.ts.map +1 -0
  199. package/dist/tui/components/ChatPanel.js +51 -0
  200. package/dist/tui/components/ChatPanel.js.map +1 -0
  201. package/dist/tui/components/DAGPanel.d.ts +37 -0
  202. package/dist/tui/components/DAGPanel.d.ts.map +1 -0
  203. package/dist/tui/components/DAGPanel.js +52 -0
  204. package/dist/tui/components/DAGPanel.js.map +1 -0
  205. package/dist/tui/components/ExecutionTimeline.d.ts +34 -0
  206. package/dist/tui/components/ExecutionTimeline.d.ts.map +1 -0
  207. package/dist/tui/components/ExecutionTimeline.js +67 -0
  208. package/dist/tui/components/ExecutionTimeline.js.map +1 -0
  209. package/dist/tui/components/Header.d.ts +12 -0
  210. package/dist/tui/components/Header.d.ts.map +1 -0
  211. package/dist/tui/components/Header.js +32 -0
  212. package/dist/tui/components/Header.js.map +1 -0
  213. package/dist/tui/components/HelpOverlay.d.ts +7 -0
  214. package/dist/tui/components/HelpOverlay.d.ts.map +1 -0
  215. package/dist/tui/components/HelpOverlay.js +60 -0
  216. package/dist/tui/components/HelpOverlay.js.map +1 -0
  217. package/dist/tui/components/InputBar.d.ts +10 -0
  218. package/dist/tui/components/InputBar.d.ts.map +1 -0
  219. package/dist/tui/components/InputBar.js +21 -0
  220. package/dist/tui/components/InputBar.js.map +1 -0
  221. package/dist/tui/components/LogsPanel.d.ts +10 -0
  222. package/dist/tui/components/MemoryPanel.d.ts +22 -0
  223. package/dist/tui/components/MetricsPanel.d.ts +19 -0
  224. package/dist/tui/components/StatusPanel.d.ts +24 -0
  225. package/dist/tui/components/TaskTree.d.ts +28 -0
  226. package/dist/tui/components/TaskTree.d.ts.map +1 -0
  227. package/dist/tui/components/TaskTree.js +29 -0
  228. package/dist/tui/components/TaskTree.js.map +1 -0
  229. package/dist/tui/components/animations/ProgressBar.d.ts +39 -0
  230. package/dist/tui/components/animations/ProgressBar.d.ts.map +1 -0
  231. package/dist/tui/components/animations/ProgressBar.js +39 -0
  232. package/dist/tui/components/animations/ProgressBar.js.map +1 -0
  233. package/dist/tui/components/animations/Pulse.d.ts +17 -0
  234. package/dist/tui/components/animations/Pulse.d.ts.map +1 -0
  235. package/dist/tui/components/animations/Pulse.js +47 -0
  236. package/dist/tui/components/animations/Pulse.js.map +1 -0
  237. package/dist/tui/components/animations/Spinner.d.ts +13 -0
  238. package/dist/tui/components/animations/Spinner.d.ts.map +1 -0
  239. package/dist/tui/components/animations/Spinner.js +36 -0
  240. package/dist/tui/components/animations/Spinner.js.map +1 -0
  241. package/dist/tui/components/animations/StatusAnimator.d.ts +27 -0
  242. package/dist/tui/components/animations/StatusAnimator.d.ts.map +1 -0
  243. package/dist/tui/components/animations/StatusAnimator.js +85 -0
  244. package/dist/tui/components/animations/StatusAnimator.js.map +1 -0
  245. package/dist/tui/components/animations/TypingEffect.d.ts +26 -0
  246. package/dist/tui/components/animations/TypingEffect.d.ts.map +1 -0
  247. package/dist/tui/components/animations/TypingEffect.js +59 -0
  248. package/dist/tui/components/animations/TypingEffect.js.map +1 -0
  249. package/{src/tui/components/animations/index.ts → dist/tui/components/animations/index.d.ts} +2 -10
  250. package/dist/tui/components/animations/index.d.ts.map +1 -0
  251. package/dist/tui/components/animations/index.js +6 -0
  252. package/dist/tui/components/animations/index.js.map +1 -0
  253. package/dist/tui/hooks/useAnimation.d.ts +42 -0
  254. package/dist/tui/hooks/useAnimation.d.ts.map +1 -0
  255. package/dist/tui/hooks/useAnimation.js +212 -0
  256. package/dist/tui/hooks/useAnimation.js.map +1 -0
  257. package/dist/tui/hooks/useAppState.d.ts +65 -0
  258. package/dist/tui/hooks/useAppState.d.ts.map +1 -0
  259. package/dist/tui/hooks/useAppState.js +293 -0
  260. package/dist/tui/hooks/useAppState.js.map +1 -0
  261. package/dist/tui/index.d.ts +3 -0
  262. package/dist/tui/index.d.ts.map +1 -0
  263. package/{src/tui/index.ts → dist/tui/index.js} +2 -3
  264. package/dist/tui/index.js.map +1 -0
  265. package/dist/tui/services/orchestrator.d.ts +16 -0
  266. package/dist/tui/services/orchestrator.d.ts.map +1 -0
  267. package/dist/tui/services/orchestrator.js +152 -0
  268. package/dist/tui/services/orchestrator.js.map +1 -0
  269. package/dist/tui/styles/borders.d.ts +31 -0
  270. package/dist/tui/styles/borders.d.ts.map +1 -0
  271. package/dist/tui/styles/borders.js +47 -0
  272. package/dist/tui/styles/borders.js.map +1 -0
  273. package/dist/tui/styles/colors.d.ts +18 -0
  274. package/dist/tui/styles/colors.d.ts.map +1 -0
  275. package/dist/tui/styles/colors.js +18 -0
  276. package/dist/tui/styles/colors.js.map +1 -0
  277. package/dist/tui/styles/index.d.ts +6 -0
  278. package/dist/tui/styles/index.d.ts.map +1 -0
  279. package/dist/tui/styles/index.js +6 -0
  280. package/dist/tui/styles/index.js.map +1 -0
  281. package/dist/tui/styles/indicators.d.ts +67 -0
  282. package/dist/tui/styles/indicators.d.ts.map +1 -0
  283. package/dist/tui/styles/indicators.js +42 -0
  284. package/dist/tui/styles/indicators.js.map +1 -0
  285. package/dist/tui/styles/layout.d.ts +21 -0
  286. package/dist/tui/styles/layout.d.ts.map +1 -0
  287. package/dist/tui/styles/layout.js +42 -0
  288. package/dist/tui/styles/layout.js.map +1 -0
  289. package/dist/tui/styles/providers.d.ts +77 -0
  290. package/dist/tui/styles/providers.d.ts.map +1 -0
  291. package/dist/tui/styles/providers.js +31 -0
  292. package/dist/tui/styles/providers.js.map +1 -0
  293. package/dist/tui/utils/animation.d.ts +44 -0
  294. package/dist/tui/utils/animation.d.ts.map +1 -0
  295. package/dist/tui/utils/animation.js +107 -0
  296. package/dist/tui/utils/animation.js.map +1 -0
  297. package/dist/vendor-manifests.d.ts +22 -0
  298. package/dist/vendor-manifests.d.ts.map +1 -0
  299. package/dist/vendor-manifests.js +94 -0
  300. package/dist/vendor-manifests.js.map +1 -0
  301. package/dist/ws-relay.d.ts +12 -0
  302. package/dist/ws-relay.d.ts.map +1 -0
  303. package/{src/ws-relay.ts → dist/ws-relay.js} +39 -47
  304. package/dist/ws-relay.js.map +1 -0
  305. package/package.json +5 -1
  306. package/dashboard/index.html +0 -420
  307. package/src/benchmark.ts +0 -156
  308. package/src/bin.ts +0 -156
  309. package/src/bootstrap.ts +0 -36
  310. package/src/bridge-adapter-templates.ts +0 -181
  311. package/src/bridge-test.ts +0 -107
  312. package/src/doctor.ts +0 -92
  313. package/src/host-init-templates.ts +0 -134
  314. package/src/hub/__tests__/commands.test.ts +0 -84
  315. package/src/hub/__tests__/history.test.ts +0 -137
  316. package/src/hub/__tests__/parser.test.ts +0 -105
  317. package/src/hub/commands/agents.ts +0 -53
  318. package/src/hub/commands/index.ts +0 -140
  319. package/src/hub/commands/logs.ts +0 -70
  320. package/src/hub/commands/memory.ts +0 -47
  321. package/src/hub/commands/metrics.ts +0 -49
  322. package/src/hub/commands/providers.ts +0 -39
  323. package/src/hub/commands/run.ts +0 -37
  324. package/src/hub/commands/status.ts +0 -69
  325. package/src/hub/commands/workflows.ts +0 -64
  326. package/src/hub/config-loader.ts +0 -37
  327. package/src/hub/event-listener.ts +0 -17
  328. package/src/hub/history.ts +0 -66
  329. package/src/hub/index.ts +0 -132
  330. package/src/hub/parser.ts +0 -107
  331. package/src/hub/styles/borders.ts +0 -74
  332. package/src/hub/styles/colors.ts +0 -129
  333. package/src/hub/styles/typography.ts +0 -68
  334. package/src/hub/types.ts +0 -31
  335. package/src/init-host.ts +0 -285
  336. package/src/install.ts +0 -118
  337. package/src/run.ts +0 -317
  338. package/src/setup/components/ApiKeyInput.tsx +0 -158
  339. package/src/setup/components/CliDetector.tsx +0 -230
  340. package/src/setup/components/ModeSelector.tsx +0 -137
  341. package/src/setup/components/ProviderSelector.tsx +0 -175
  342. package/src/setup/components/SetupWizard.tsx +0 -368
  343. package/src/setup/components/StepIndicator.tsx +0 -74
  344. package/src/setup/components/SuccessScreen.tsx +0 -229
  345. package/src/setup/utils/cli-detection.ts +0 -99
  346. package/src/setup/utils/config-writer.ts +0 -249
  347. package/src/styles.ts +0 -12
  348. package/src/tui/App.tsx +0 -183
  349. package/src/tui/components/AgentStateIcon.tsx +0 -84
  350. package/src/tui/components/AnimatedBranch.tsx +0 -134
  351. package/src/tui/components/ChatPanel.tsx +0 -128
  352. package/src/tui/components/DAGPanel.tsx +0 -212
  353. package/src/tui/components/ExecutionTimeline.tsx +0 -225
  354. package/src/tui/components/Header.tsx +0 -109
  355. package/src/tui/components/HelpOverlay.tsx +0 -140
  356. package/src/tui/components/InputBar.tsx +0 -69
  357. package/src/tui/components/LogsPanel.tsx +0 -132
  358. package/src/tui/components/MemoryPanel.tsx +0 -166
  359. package/src/tui/components/MetricsPanel.tsx +0 -152
  360. package/src/tui/components/StatusPanel.tsx +0 -140
  361. package/src/tui/components/TaskTree.tsx +0 -159
  362. package/src/tui/components/animations/ProgressBar.tsx +0 -160
  363. package/src/tui/components/animations/Pulse.tsx +0 -73
  364. package/src/tui/components/animations/Spinner.tsx +0 -54
  365. package/src/tui/components/animations/StatusAnimator.tsx +0 -153
  366. package/src/tui/components/animations/TypingEffect.tsx +0 -119
  367. package/src/tui/hooks/useAnimation.ts +0 -290
  368. package/src/tui/hooks/useAppState.ts +0 -403
  369. package/src/tui/services/orchestrator.ts +0 -195
  370. package/src/tui/styles/borders.ts +0 -51
  371. package/src/tui/styles/colors.ts +0 -19
  372. package/src/tui/styles/index.ts +0 -20
  373. package/src/tui/styles/indicators.ts +0 -54
  374. package/src/tui/styles/layout.ts +0 -44
  375. package/src/tui/styles/providers.ts +0 -32
  376. package/src/tui/utils/animation.ts +0 -124
  377. package/src/vendor-manifests.ts +0 -113
  378. package/tsconfig.json +0 -28
@@ -0,0 +1,180 @@
1
+ import { mkdir, writeFile, access } from "node:fs/promises";
2
+ import { constants } from "node:fs";
3
+ import path from "node:path";
4
+ import os from "node:os";
5
+ const ENV_VAR_MAP = {
6
+ anthropic: "ANTHROPIC_API_KEY",
7
+ openai: "OPENAI_API_KEY",
8
+ gemini: "GOOGLE_API_KEY",
9
+ mistral: "MISTRAL_API_KEY",
10
+ groq: "GROQ_API_KEY",
11
+ };
12
+ const MODEL_MAP = {
13
+ anthropic: "claude-3-5-sonnet-latest",
14
+ openai: "gpt-4o",
15
+ gemini: "gemini-2.0-flash",
16
+ mistral: "mistral-large-latest",
17
+ groq: "llama-3.3-70b-versatile",
18
+ };
19
+ export async function ensureDirectory(dir) {
20
+ try {
21
+ await access(dir, constants.F_OK);
22
+ }
23
+ catch {
24
+ await mkdir(dir, { recursive: true });
25
+ }
26
+ }
27
+ export async function writeRaxrc(targetDir, config) {
28
+ const raxrc = {
29
+ version: 1,
30
+ defaultProvider: config.defaultProvider,
31
+ providers: {},
32
+ privacyMode: true,
33
+ verifyFixLoops: 3,
34
+ };
35
+ // Add host provider if hub mode
36
+ if (config.mode === "hub" || config.mode === "both") {
37
+ const primaryTarget = config.hubTargets[0] || "claude-code";
38
+ raxrc.providers.host = {
39
+ model: primaryTarget,
40
+ mode: "auto",
41
+ bridgeCommand: primaryTarget,
42
+ bridgeCommandEnv: "RAX_HOST_BRIDGE_COMMAND",
43
+ };
44
+ }
45
+ // Add configured providers
46
+ for (const provider of config.providers) {
47
+ if (provider.id === "host")
48
+ continue;
49
+ raxrc.providers[provider.id] = {
50
+ model: provider.model || MODEL_MAP[provider.id] || "unknown",
51
+ apiKeyEnv: ENV_VAR_MAP[provider.id] || `${provider.id.toUpperCase()}_API_KEY`,
52
+ };
53
+ if (provider.apiKey) {
54
+ raxrc.providers[provider.id].apiKey = provider.apiKey;
55
+ }
56
+ }
57
+ // Ensure at least one fallback
58
+ if (!raxrc.providers.openai) {
59
+ raxrc.providers.openai = {
60
+ model: "gpt-4o",
61
+ apiKeyEnv: "OPENAI_API_KEY",
62
+ };
63
+ }
64
+ if (!raxrc.providers.anthropic) {
65
+ raxrc.providers.anthropic = {
66
+ model: "claude-3-5-sonnet-latest",
67
+ apiKeyEnv: "ANTHROPIC_API_KEY",
68
+ };
69
+ }
70
+ const filePath = path.join(targetDir, ".raxrc");
71
+ await writeFile(filePath, JSON.stringify(raxrc, null, 2) + "\n", "utf-8");
72
+ return filePath;
73
+ }
74
+ export async function writeHubBootstrap(targetCli, configPath, projectPath) {
75
+ const bootstrapFileName = getBootstrapFileName(targetCli);
76
+ const raxFlowDir = path.join(configPath, ".raxflow");
77
+ await ensureDirectory(raxFlowDir);
78
+ await ensureDirectory(path.join(raxFlowDir, "workflows"));
79
+ const bootstrapContent = generateBootstrapContent(targetCli, projectPath);
80
+ const bootstrapPath = path.join(configPath, bootstrapFileName);
81
+ await writeFile(bootstrapPath, bootstrapContent, "utf-8");
82
+ // Create example workflow
83
+ const exampleWorkflow = {
84
+ id: "default-workflow",
85
+ nodes: [
86
+ { id: "analyze", agent: "IntentClassifierAgent", dependsOn: [] },
87
+ { id: "spec", agent: "SpecAgent", dependsOn: ["analyze"] },
88
+ { id: "implement", agent: "CodeGeneratorAgent", dependsOn: ["spec"] },
89
+ { id: "verify", agent: "ValidatorAgent", dependsOn: ["implement"] },
90
+ ],
91
+ };
92
+ const workflowPath = path.join(raxFlowDir, "workflows", "default.json");
93
+ await writeFile(workflowPath, JSON.stringify(exampleWorkflow, null, 2) + "\n", "utf-8");
94
+ return bootstrapPath;
95
+ }
96
+ function getBootstrapFileName(cliId) {
97
+ const map = {
98
+ "claude-code": "CLAUDE.md",
99
+ codex: "CODEX.md",
100
+ opencode: "OPENCODE.md",
101
+ kilo: "KILO.md",
102
+ };
103
+ return map[cliId] || "RAXFLOW.md";
104
+ }
105
+ function generateBootstrapContent(cliId, projectPath) {
106
+ return `# RAXFLOW Bootstrap Configuration
107
+
108
+ This project is configured to work with RAXFLOW orchestration.
109
+
110
+ ## Project Context
111
+ - Path: ${projectPath}
112
+ - CLI: ${cliId}
113
+
114
+ ## Available Commands
115
+ - \`raxflow run --prompt "..." --stream\` - Execute orchestrated workflow
116
+ - \`raxflow doctor\` - Check system health
117
+ - \`raxflow status\` - View current state
118
+
119
+ ## Workflows
120
+ Workflows are stored in \`.raxflow/workflows/\` directory.
121
+
122
+ ## Provider Configuration
123
+ See \`.raxrc\` in the project root for provider settings.
124
+ `;
125
+ }
126
+ export async function writeStandaloneConfig(projectPath) {
127
+ const raxFlowDir = path.join(projectPath, ".raxflow");
128
+ const workflowsDir = path.join(raxFlowDir, "workflows");
129
+ const globalDir = path.join(os.homedir(), ".raxflow");
130
+ await ensureDirectory(raxFlowDir);
131
+ await ensureDirectory(workflowsDir);
132
+ await ensureDirectory(globalDir);
133
+ // Create default workflow
134
+ const defaultWorkflow = {
135
+ id: "default",
136
+ name: "Default Workflow",
137
+ nodes: [
138
+ { id: "classify", agent: "IntentClassifierAgent", dependsOn: [] },
139
+ { id: "plan", agent: "TaskPlannerAgent", dependsOn: ["classify"] },
140
+ { id: "code", agent: "CodeGeneratorAgent", dependsOn: ["plan"] },
141
+ { id: "test", agent: "TestAgent", dependsOn: ["code"] },
142
+ { id: "fix", agent: "FixAgent", dependsOn: ["test"] },
143
+ ],
144
+ };
145
+ const workflowPath = path.join(workflowsDir, "default.json");
146
+ await writeFile(workflowPath, JSON.stringify(defaultWorkflow, null, 2) + "\n", "utf-8");
147
+ // Create global config
148
+ const globalConfigPath = path.join(globalDir, "config.json");
149
+ const globalConfig = {
150
+ version: 1,
151
+ createdAt: new Date().toISOString(),
152
+ lastUsed: new Date().toISOString(),
153
+ };
154
+ await writeFile(globalConfigPath, JSON.stringify(globalConfig, null, 2) + "\n", "utf-8");
155
+ return { raxFlowDir, workflowsDir, globalDir };
156
+ }
157
+ export async function validateSetup(projectPath) {
158
+ const errors = [];
159
+ const warnings = [];
160
+ // Check .raxrc exists
161
+ try {
162
+ await access(path.join(projectPath, ".raxrc"), constants.F_OK);
163
+ }
164
+ catch {
165
+ errors.push(".raxrc configuration file not found");
166
+ }
167
+ // Check .raxflow directory
168
+ try {
169
+ await access(path.join(projectPath, ".raxflow"), constants.F_OK);
170
+ }
171
+ catch {
172
+ warnings.push(".raxflow directory not found (optional for hub mode)");
173
+ }
174
+ return {
175
+ valid: errors.length === 0,
176
+ errors,
177
+ warnings,
178
+ };
179
+ }
180
+ //# sourceMappingURL=config-writer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-writer.js","sourceRoot":"","sources":["../../../src/setup/utils/config-writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AAkCzB,MAAM,WAAW,GAA2B;IAC1C,SAAS,EAAE,mBAAmB;IAC9B,MAAM,EAAE,gBAAgB;IACxB,MAAM,EAAE,gBAAgB;IACxB,OAAO,EAAE,iBAAiB;IAC1B,IAAI,EAAE,cAAc;CACrB,CAAC;AAEF,MAAM,SAAS,GAA2B;IACxC,SAAS,EAAE,0BAA0B;IACrC,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,kBAAkB;IAC1B,OAAO,EAAE,sBAAsB;IAC/B,IAAI,EAAE,yBAAyB;CAChC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,GAAW;IAC/C,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACxC,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,SAAiB,EAAE,MAAmB;IACrE,MAAM,KAAK,GAAgB;QACzB,OAAO,EAAE,CAAC;QACV,eAAe,EAAE,MA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G,IAAI,EAAE,OAAO,CAAC,CAAC;IAEzF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;AACjD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,WAAmB;IAKrD,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,sBAAsB;IACtB,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IACjE,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;IACrD,CAAC;IAED,2BAA2B;IAC3B,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IACnE,CAAC;IAAC,MAAM,CAAC;QACP,QAAQ,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC;IACxE,CAAC;IAED,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;QAC1B,MAAM;QACN,QAAQ;KACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ export declare const c: {
2
+ blue: (s: string) => string;
3
+ green: (s: string) => string;
4
+ yellow: (s: string) => string;
5
+ red: (s: string) => string;
6
+ magenta: (s: string) => string;
7
+ cyan: (s: string) => string;
8
+ white: (s: string) => string;
9
+ gray: (s: string) => string;
10
+ bold: (s: string) => string;
11
+ };
12
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,CAAC;cACF,MAAM;eACL,MAAM;gBACL,MAAM;aACT,MAAM;iBACF,MAAM;cACT,MAAM;eACL,MAAM;cACP,MAAM;cACN,MAAM;CACjB,CAAC"}
package/dist/styles.js ADDED
@@ -0,0 +1,12 @@
1
+ export const c = {
2
+ blue: (s) => `\u001b[34m${s}\u001b[0m`,
3
+ green: (s) => `\u001b[32m${s}\u001b[0m`,
4
+ yellow: (s) => `\u001b[33m${s}\u001b[0m`,
5
+ red: (s) => `\u001b[31m${s}\u001b[0m`,
6
+ magenta: (s) => `\u001b[35m${s}\u001b[0m`,
7
+ cyan: (s) => `\u001b[36m${s}\u001b[0m`,
8
+ white: (s) => `\u001b[37m${s}\u001b[0m`,
9
+ gray: (s) => `\u001b[90m${s}\u001b[0m`,
10
+ bold: (s) => `\u001b[1m${s}\u001b[22m`
11
+ };
12
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,CAAC,GAAG;IACf,IAAI,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,aAAa,CAAC,WAAW;IAC9C,KAAK,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,aAAa,CAAC,WAAW;IAC/C,MAAM,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,aAAa,CAAC,WAAW;IAChD,GAAG,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,aAAa,CAAC,WAAW;IAC7C,OAAO,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,aAAa,CAAC,WAAW;IACjD,IAAI,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,aAAa,CAAC,WAAW;IAC9C,KAAK,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,aAAa,CAAC,WAAW;IAC/C,IAAI,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,aAAa,CAAC,WAAW;IAC9C,IAAI,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY;CAC/C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ export declare const App: React.NamedExoticComponent<object>;
3
+ //# sourceMappingURL=App.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/tui/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAkBjF,eAAO,MAAM,GAAG,oCAoKd,CAAC"}
@@ -0,0 +1,136 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import React, { useState, useEffect, useRef, useMemo, useCallback } from "react";
3
+ import { Box, useApp, useInput, useStdout } from "ink";
4
+ import { Header } from "./components/Header.js";
5
+ import { ChatPanel } from "./components/ChatPanel.js";
6
+ import { StatusPanel } from "./components/StatusPanel.js";
7
+ import { DAGPanel } from "./components/DAGPanel.js";
8
+ import { LogsPanel } from "./components/LogsPanel.js";
9
+ import { MetricsPanel } from "./components/MetricsPanel.js";
10
+ import { MemoryPanel } from "./components/MemoryPanel.js";
11
+ import { InputBar } from "./components/InputBar.js";
12
+ import { HelpOverlay } from "./components/HelpOverlay.js";
13
+ import { useAppState } from "./hooks/useAppState.js";
14
+ const PANEL_ORDER = ["chat", "dag", "status", "logs", "metrics", "memory"];
15
+ const TICK_INTERVAL = 200;
16
+ export const App = React.memo(function App() {
17
+ const { exit } = useApp();
18
+ const { stdout } = useStdout();
19
+ const { state, processCommand } = useAppState();
20
+ const [activePanel, setActivePanel] = useState("chat");
21
+ const [showHelp, setShowHelp] = useState(false);
22
+ const [tick, setTick] = useState(0);
23
+ const [viewMode, setViewMode] = useState("full");
24
+ const intervalRef = useRef(null);
25
+ const terminalHeight = stdout?.rows || 24;
26
+ const headerHeight = 5;
27
+ const inputBarHeight = 4;
28
+ const availableHeight = Math.max(8, terminalHeight - headerHeight - inputBarHeight);
29
+ useEffect(() => {
30
+ intervalRef.current = setInterval(() => {
31
+ setTick((t) => t + 1);
32
+ }, TICK_INTERVAL);
33
+ return () => {
34
+ if (intervalRef.current)
35
+ clearInterval(intervalRef.current);
36
+ };
37
+ }, []);
38
+ const handleTab = useCallback(() => {
39
+ setActivePanel((current) => {
40
+ const currentIndex = PANEL_ORDER.indexOf(current);
41
+ return PANEL_ORDER[(currentIndex + 1) % PANEL_ORDER.length];
42
+ });
43
+ }, []);
44
+ useInput((input, key) => {
45
+ if (key.ctrl && (input === "c" || input === "d")) {
46
+ exit();
47
+ return;
48
+ }
49
+ if (key.escape) {
50
+ if (showHelp) {
51
+ setShowHelp(false);
52
+ }
53
+ return;
54
+ }
55
+ if (input === "?" && !showHelp) {
56
+ setShowHelp(true);
57
+ return;
58
+ }
59
+ if (showHelp)
60
+ return;
61
+ if (key.tab) {
62
+ handleTab();
63
+ return;
64
+ }
65
+ if (key.leftArrow) {
66
+ setViewMode((v) => (v === "full" ? "compact" : "full"));
67
+ }
68
+ });
69
+ const handleSubmit = useCallback((input) => {
70
+ const trimmed = input.trim();
71
+ if (!trimmed)
72
+ return;
73
+ if (trimmed === "exit" || trimmed === "quit") {
74
+ exit();
75
+ return;
76
+ }
77
+ if (trimmed === "?" || trimmed === "/help") {
78
+ setShowHelp((s) => !s);
79
+ return;
80
+ }
81
+ processCommand(trimmed);
82
+ }, [exit, processCommand]);
83
+ const handleDismissHelp = useCallback(() => setShowHelp(false), []);
84
+ const headerProps = useMemo(() => ({
85
+ projectName: state.projectName,
86
+ agentCount: state.agentCount,
87
+ provider: state.provider,
88
+ status: state.status,
89
+ tick,
90
+ activePanel,
91
+ }), [state.projectName, state.agentCount, state.provider, state.status, tick, activePanel]);
92
+ const chatPanelProps = useMemo(() => ({
93
+ messages: state.messages,
94
+ isProcessing: state.isProcessing,
95
+ isActive: activePanel === "chat",
96
+ }), [state.messages, state.isProcessing, activePanel]);
97
+ const dagPanelProps = useMemo(() => ({
98
+ workflowState: state.workflowState,
99
+ tick,
100
+ isActive: activePanel === "dag",
101
+ }), [state.workflowState, tick, activePanel]);
102
+ const logsPanelProps = useMemo(() => ({
103
+ logs: state.logs,
104
+ isActive: activePanel === "logs",
105
+ }), [state.logs, activePanel]);
106
+ const metricsPanelProps = useMemo(() => ({
107
+ metrics: state.metrics,
108
+ fitness: state.fitness,
109
+ isActive: activePanel === "metrics",
110
+ tick,
111
+ }), [state.metrics, state.fitness, activePanel, tick]);
112
+ const memoryPanelProps = useMemo(() => ({
113
+ nodes: [],
114
+ edges: [],
115
+ nodeCount: 247,
116
+ cacheHitRate: 94,
117
+ isActive: activePanel === "memory",
118
+ tick,
119
+ }), [activePanel, tick]);
120
+ const statusPanelProps = useMemo(() => ({
121
+ agents: state.agents,
122
+ providers: state.providers,
123
+ fitness: state.fitness,
124
+ currentWorkflow: state.currentWorkflow,
125
+ isActive: activePanel === "status",
126
+ tick,
127
+ }), [state.agents, state.providers, state.fitness, state.currentWorkflow, activePanel, tick]);
128
+ const inputBarProps = useMemo(() => ({
129
+ onSubmit: handleSubmit,
130
+ suggestions: state.suggestions,
131
+ isProcessing: state.isProcessing,
132
+ projectName: state.projectName,
133
+ }), [handleSubmit, state.suggestions, state.isProcessing, state.projectName]);
134
+ return (_jsxs(Box, { flexDirection: "column", height: terminalHeight, width: "100%", children: [_jsx(Header, { ...headerProps }), showHelp ? (_jsx(HelpOverlay, { onDismiss: handleDismissHelp })) : (_jsxs(_Fragment, { children: [_jsxs(Box, { flexDirection: "row", width: "100%", height: availableHeight, children: [_jsx(ChatPanel, { ...chatPanelProps, maxHeight: availableHeight }), _jsx(DAGPanel, { ...dagPanelProps, maxHeight: availableHeight }), viewMode === "full" && (_jsxs(_Fragment, { children: [_jsx(LogsPanel, { ...logsPanelProps, maxHeight: availableHeight }), _jsxs(Box, { flexDirection: "column", children: [_jsx(MetricsPanel, { ...metricsPanelProps, maxHeight: Math.floor(availableHeight / 2) }), _jsx(MemoryPanel, { ...memoryPanelProps, maxHeight: Math.floor(availableHeight / 2) })] })] })), viewMode === "compact" && (_jsx(StatusPanel, { ...statusPanelProps, maxHeight: availableHeight }))] }), _jsx(InputBar, { ...inputBarProps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from "react";
2
+ export type AgentState = 'idle' | 'thinking' | 'processing' | 'running' | 'success' | 'error' | 'waiting';
3
+ interface AgentStateIconProps {
4
+ state: AgentState;
5
+ animated?: boolean;
6
+ tick?: number;
7
+ }
8
+ export declare const AgentStateIcon: React.NamedExoticComponent<AgentStateIconProps>;
9
+ export declare function useAgentStateFrame(state: AgentState, tick: number): string;
10
+ interface AgentStateWithLabelProps {
11
+ state: AgentState;
12
+ label: string;
13
+ tick: number;
14
+ }
15
+ export declare const AgentStateWithLabel: React.NamedExoticComponent<AgentStateWithLabelProps>;
16
+ export declare const agentStateColors: Record<AgentState, string>;
17
+ export {};
18
+ //# sourceMappingURL=AgentStateIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentStateIcon.d.ts","sourceRoot":"","sources":["../../../src/tui/components/AgentStateIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAS7C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE1G,UAAU,mBAAmB;IAC3B,KAAK,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAYD,eAAO,MAAM,cAAc,iDAYzB,CAAC;AAEH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAM1E;AAYD,UAAU,wBAAwB;IAChC,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,mBAAmB,sDAQ9B,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAQvD,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { memo, useMemo } from "react";
3
+ import { Text } from "ink";
4
+ import { tuiColors } from "../styles/index.js";
5
+ const THINKING_FRAMES = ["◠", "◡", "◠", "◡"];
6
+ const PROCESSING_FRAMES = ["▶", "▷", "▶", "▷"];
7
+ const RUNNING_FRAMES = ["●", "◉", "●", "○"];
8
+ const WAITING_FRAMES = ["◐", "◓", "◐", "◓"];
9
+ const STATE_CONFIG = {
10
+ idle: { icon: "○", color: tuiColors.textTertiary, animated: false },
11
+ thinking: { icon: "◠", color: tuiColors.warning, animated: true, frames: THINKING_FRAMES },
12
+ processing: { icon: "▶", color: tuiColors.primary, animated: true, frames: PROCESSING_FRAMES },
13
+ running: { icon: "●", color: tuiColors.success, animated: true, frames: RUNNING_FRAMES },
14
+ success: { icon: "✓", color: tuiColors.success, animated: false },
15
+ error: { icon: "✗", color: tuiColors.error, animated: false },
16
+ waiting: { icon: "◐", color: tuiColors.warning, animated: true, frames: WAITING_FRAMES },
17
+ };
18
+ export const AgentStateIcon = memo(function AgentStateIcon({ state, animated = true, tick = 0 }) {
19
+ const config = STATE_CONFIG[state];
20
+ const showAnimation = animated && config.animated && config.frames;
21
+ const icon = useMemo(() => {
22
+ if (showAnimation && config.frames) {
23
+ return config.frames[tick % config.frames.length];
24
+ }
25
+ return config.icon;
26
+ }, [showAnimation, config.frames, config.icon, tick]);
27
+ return _jsx(Text, { color: config.color, children: icon });
28
+ });
29
+ export function useAgentStateFrame(state, tick) {
30
+ const config = STATE_CONFIG[state];
31
+ if (config.frames) {
32
+ return config.frames[tick % config.frames.length];
33
+ }
34
+ return config.icon;
35
+ }
36
+ const STATE_LABELS = {
37
+ idle: "pending",
38
+ thinking: "thinking...",
39
+ processing: "processing",
40
+ running: "running",
41
+ success: "done",
42
+ error: "error",
43
+ waiting: "waiting",
44
+ };
45
+ export const AgentStateWithLabel = memo(function AgentStateWithLabel({ state, label, tick }) {
46
+ return (_jsxs(_Fragment, { children: [_jsx(AgentStateIcon, { state: state, tick: tick }), _jsxs(Text, { color: tuiColors.textSecondary, children: [" ", label] }), _jsxs(Text, { color: tuiColors.textTertiary, children: [" ", STATE_LABELS[state]] })] }));
47
+ });
48
+ export const agentStateColors = {
49
+ idle: tuiColors.textTertiary,
50
+ thinking: tuiColors.warning,
51
+ processing: tuiColors.primary,
52
+ running: tuiColors.success,
53
+ success: tuiColors.success,
54
+ error: tuiColors.error,
55
+ waiting: tuiColors.warning,
56
+ };
57
+ //# sourceMappingURL=AgentStateIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentStateIcon.js","sourceRoot":"","sources":["../../../src/tui/components/AgentStateIcon.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC7C,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC/C,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAC5C,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAU5C,MAAM,YAAY,GAA8F;IAC9G,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE;IACnE,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE;IAC1F,UAAU,E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AC1B,OAAO,EAAE,SAAS,CAAC,OAAO;IAC1B,KAAK,EAAE,SAAS,CAAC,KAAK;IACtB,OAAO,EAAE,SAAS,CAAC,OAAO;CAC3B,CAAC"}
@@ -0,0 +1,39 @@
1
+ import React from "react";
2
+ export type BranchType = 'vertical' | 'horizontal' | 'corner-left' | 'corner-right' | 'branch' | 'last-branch' | 'flow';
3
+ interface AnimatedBranchProps {
4
+ type: BranchType;
5
+ tick?: number;
6
+ animated?: boolean;
7
+ length?: number;
8
+ color?: string;
9
+ }
10
+ export declare const AnimatedBranch: React.NamedExoticComponent<AnimatedBranchProps>;
11
+ interface BranchLineProps {
12
+ tick: number;
13
+ animated?: boolean;
14
+ length?: number;
15
+ color?: string;
16
+ }
17
+ export declare const VerticalBranch: React.NamedExoticComponent<BranchLineProps>;
18
+ export declare const HorizontalBranch: React.NamedExoticComponent<BranchLineProps>;
19
+ export declare const BranchConnector: React.NamedExoticComponent<BranchLineProps>;
20
+ export declare const LastBranchConnector: React.NamedExoticComponent<BranchLineProps>;
21
+ export declare const FlowIndicator: React.NamedExoticComponent<BranchLineProps>;
22
+ interface TaskBranchProps {
23
+ tick: number;
24
+ depth: number;
25
+ isLast: boolean;
26
+ hasChildren?: boolean;
27
+ isExpanded?: boolean;
28
+ color?: string;
29
+ }
30
+ export declare const TaskBranch: React.NamedExoticComponent<TaskBranchProps>;
31
+ interface AnimatedConnectorProps {
32
+ tick: number;
33
+ fromLevel: number;
34
+ toLevel: number;
35
+ isActive: boolean;
36
+ }
37
+ export declare const AnimatedConnector: React.NamedExoticComponent<AnimatedConnectorProps>;
38
+ export {};
39
+ //# sourceMappingURL=AnimatedBranch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnimatedBranch.d.ts","sourceRoot":"","sources":["../../../src/tui/components/AnimatedBranch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAQ7C,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,YAAY,GAAG,aAAa,GAAG,cAAc,GAAG,QAAQ,GAAG,aAAa,GAAG,MAAM,CAAC;AAExH,UAAU,mBAAmB;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,cAAc,iDAmCzB,CAAC;AAEH,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,cAAc,6CAEzB,CAAC;AAEH,eAAO,MAAM,gBAAgB,6CAE3B,CAAC;AAEH,eAAO,MAAM,eAAe,6CAE1B,CAAC;AAEH,eAAO,MAAM,mBAAmB,6CAE9B,CAAC;AAEH,eAAO,MAAM,aAAa,6CAExB,CAAC;AAEH,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,UAAU,6CAerB,CAAC;AAEH,UAAU,sBAAsB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,iBAAiB,oDAkB5B,CAAC"}
@@ -0,0 +1,64 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { memo, useMemo } from "react";
3
+ import { Box, Text } from "ink";
4
+ import { tuiColors } from "../styles/index.js";
5
+ const VERTICAL_PULSE_FRAMES = ["│", "┃", "│", "┃"];
6
+ const HORIZONTAL_PULSE_FRAMES = ["─", "━", "─", "━"];
7
+ const FLOW_FRAMES = ["◀═══▶", "═◀═══▶", "══◀══▶", "═══◀═▶", "════◀▶", "═▶═══◀", "══▶══◀", "═══▶═◀"];
8
+ export const AnimatedBranch = memo(function AnimatedBranch({ type, tick = 0, animated = true, length = 1, color }) {
9
+ const branchColor = color || tuiColors.textTertiary;
10
+ const getFrame = (frames) => {
11
+ return frames[tick % frames.length];
12
+ };
13
+ const renderBranch = () => {
14
+ switch (type) {
15
+ case 'vertical':
16
+ return animated ? getFrame(VERTICAL_PULSE_FRAMES) : "│";
17
+ case 'horizontal':
18
+ return animated ? getFrame(HORIZONTAL_PULSE_FRAMES).repeat(length) : "─".repeat(length);
19
+ case 'corner-left':
20
+ return "┌";
21
+ case 'corner-right':
22
+ return "┐";
23
+ case 'branch':
24
+ return "├─";
25
+ case 'last-branch':
26
+ return "└─";
27
+ case 'flow':
28
+ return animated ? getFrame(FLOW_FRAMES) : "◀═══▶";
29
+ default:
30
+ return "│";
31
+ }
32
+ };
33
+ return _jsx(Text, { color: branchColor, children: renderBranch() });
34
+ });
35
+ export const VerticalBranch = memo(function VerticalBranch({ tick, animated = true, length = 1, color }) {
36
+ return _jsx(AnimatedBranch, { type: "vertical", tick: tick, animated: animated, color: color });
37
+ });
38
+ export const HorizontalBranch = memo(function HorizontalBranch({ tick, animated = true, length = 1, color }) {
39
+ return _jsx(AnimatedBranch, { type: "horizontal", tick: tick, animated: animated, length: length, color: color });
40
+ });
41
+ export const BranchConnector = memo(function BranchConnector({ tick, animated = true, color }) {
42
+ return _jsx(AnimatedBranch, { type: "branch", tick: tick, animated: animated, color: color });
43
+ });
44
+ export const LastBranchConnector = memo(function LastBranchConnector({ tick, animated = true, color }) {
45
+ return _jsx(AnimatedBranch, { type: "last-branch", tick: tick, animated: animated, color: color });
46
+ });
47
+ export const FlowIndicator = memo(function FlowIndicator({ tick, animated = true, color }) {
48
+ return _jsx(AnimatedBranch, { type: "flow", tick: tick, animated: animated, color: color });
49
+ });
50
+ export const TaskBranch = memo(function TaskBranch({ tick, depth, isLast, hasChildren = false, isExpanded = true, color }) {
51
+ const branchColor = color || tuiColors.textTertiary;
52
+ if (depth === 0) {
53
+ return null;
54
+ }
55
+ const indent = " ".repeat(depth - 1);
56
+ return (_jsxs(Box, { flexDirection: "row", children: [_jsx(Text, { color: branchColor, children: indent }), _jsx(AnimatedBranch, { type: isLast ? "last-branch" : "branch", tick: tick, color: branchColor })] }));
57
+ });
58
+ export const AnimatedConnector = memo(function AnimatedConnector({ tick, fromLevel, toLevel, isActive }) {
59
+ const color = isActive ? tuiColors.primary : tuiColors.textTertiary;
60
+ const rows = toLevel - fromLevel;
61
+ const connectorElements = useMemo(() => Array.from({ length: rows }).map((_, idx) => (_jsx(Box, { paddingLeft: 2, children: _jsx(AnimatedBranch, { type: "vertical", tick: tick, animated: isActive, color: color }) }, idx))), [rows, tick, isActive, color]);
62
+ return (_jsx(Box, { flexDirection: "column", children: connectorElements }));
63
+ });
64
+ //# sourceMappingURL=AnimatedBranch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnimatedBranch.js","sourceRoot":"","sources":["../../../src/tui/components/AnimatedBranch.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACnD,MAAM,uBAAuB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACrD,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,QAAQ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,OAAO,GAAG,SAAS,CAAC;IAEjC,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,EAAE,CACrC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,CAC3C,KAAC,GAAG,IAAW,WAAW,EAAE,CAAC,YAC3B,KAAC,cAAc,IAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,GAAI,IADxE,GAAG,CAEP,CACP,CAAC,EACF,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,CAC9B,CAAC;IAEF,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,YACxB,iBAAiB,GACd,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ interface Message {
3
+ id: string;
4
+ type: "user" | "system" | "agent" | "error" | "success";
5
+ content: string;
6
+ timestamp: Date;
7
+ agent?: string;
8
+ }
9
+ interface ChatPanelProps {
10
+ messages: Message[];
11
+ isProcessing: boolean;
12
+ isActive: boolean;
13
+ maxHeight?: number;
14
+ }
15
+ export declare const ChatPanel: React.NamedExoticComponent<ChatPanelProps>;
16
+ export {};
17
+ //# sourceMappingURL=ChatPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatPanel.d.ts","sourceRoot":"","sources":["../../../src/tui/components/ChatPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAK/E,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,cAAc;IACtB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAgDD,eAAO,MAAM,SAAS,4CA6DpB,CAAC"}