rax-flow 0.1.9 → 0.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 (223) hide show
  1. package/dist/bin.js +8 -6
  2. package/dist/bin.js.map +1 -1
  3. package/dist/hub/commands/index.d.ts.map +1 -1
  4. package/dist/hub/commands/index.js +7 -4
  5. package/dist/hub/commands/index.js.map +1 -1
  6. package/dist/hub/event-listener.d.ts +6 -0
  7. package/dist/hub/event-listener.d.ts.map +1 -1
  8. package/dist/hub/event-listener.js +10 -6
  9. package/dist/hub/event-listener.js.map +1 -1
  10. package/dist/hub/index.d.ts.map +1 -1
  11. package/dist/hub/index.js +12 -0
  12. package/dist/hub/index.js.map +1 -1
  13. package/dist/setup/components/ApiKeyInput.d.ts +25 -0
  14. package/dist/setup/components/ApiKeyInput.d.ts.map +1 -0
  15. package/dist/setup/components/ApiKeyInput.js +54 -0
  16. package/dist/setup/components/ApiKeyInput.js.map +1 -0
  17. package/dist/setup/components/AsciiBanner.d.ts +22 -0
  18. package/dist/setup/components/AsciiBanner.d.ts.map +1 -0
  19. package/dist/setup/components/AsciiBanner.js +55 -0
  20. package/dist/setup/components/AsciiBanner.js.map +1 -0
  21. package/dist/setup/components/CliDetector.d.ts +17 -0
  22. package/dist/setup/components/CliDetector.d.ts.map +1 -0
  23. package/dist/setup/components/CliDetector.js +79 -0
  24. package/dist/setup/components/CliDetector.js.map +1 -0
  25. package/dist/setup/components/ModeSelector.d.ts +8 -0
  26. package/dist/setup/components/ModeSelector.d.ts.map +1 -0
  27. package/dist/setup/components/ModeSelector.js +76 -0
  28. package/dist/setup/components/ModeSelector.js.map +1 -0
  29. package/dist/setup/components/ProviderSelector.d.ts +18 -0
  30. package/dist/setup/components/ProviderSelector.d.ts.map +1 -0
  31. package/dist/setup/components/ProviderSelector.js +97 -0
  32. package/dist/setup/components/ProviderSelector.js.map +1 -0
  33. package/dist/setup/components/SetupWizard.d.ts +2 -0
  34. package/dist/setup/components/SetupWizard.d.ts.map +1 -0
  35. package/dist/setup/components/SetupWizard.js +212 -0
  36. package/dist/setup/components/SetupWizard.js.map +1 -0
  37. package/dist/setup/components/StepIndicator.d.ts +13 -0
  38. package/dist/setup/components/StepIndicator.d.ts.map +1 -0
  39. package/dist/setup/components/StepIndicator.js +18 -0
  40. package/dist/setup/components/StepIndicator.js.map +1 -0
  41. package/dist/setup/components/SuccessScreen.d.ts +18 -0
  42. package/dist/setup/components/SuccessScreen.d.ts.map +1 -0
  43. package/dist/setup/components/SuccessScreen.js +38 -0
  44. package/dist/setup/components/SuccessScreen.js.map +1 -0
  45. package/dist/setup/index.d.ts +12 -0
  46. package/dist/setup/index.d.ts.map +1 -0
  47. package/dist/setup/index.js +29 -0
  48. package/dist/setup/index.js.map +1 -0
  49. package/dist/setup/utils/cli-detection.d.ts +12 -0
  50. package/dist/setup/utils/cli-detection.d.ts.map +1 -0
  51. package/dist/setup/utils/cli-detection.js +83 -0
  52. package/dist/setup/utils/cli-detection.js.map +1 -0
  53. package/dist/setup/utils/config-writer.d.ts +43 -0
  54. package/dist/setup/utils/config-writer.d.ts.map +1 -0
  55. package/dist/setup/utils/config-writer.js +180 -0
  56. package/dist/setup/utils/config-writer.js.map +1 -0
  57. package/dist/tui/App.d.ts +2 -1
  58. package/dist/tui/App.d.ts.map +1 -1
  59. package/dist/tui/App.js +78 -18
  60. package/dist/tui/App.js.map +1 -1
  61. package/dist/tui/components/AgentStateIcon.d.ts +18 -0
  62. package/dist/tui/components/AgentStateIcon.d.ts.map +1 -0
  63. package/dist/tui/components/AgentStateIcon.js +57 -0
  64. package/dist/tui/components/AgentStateIcon.js.map +1 -0
  65. package/dist/tui/components/AnimatedBranch.d.ts +39 -0
  66. package/dist/tui/components/AnimatedBranch.d.ts.map +1 -0
  67. package/dist/tui/components/AnimatedBranch.js +64 -0
  68. package/dist/tui/components/AnimatedBranch.js.map +1 -0
  69. package/dist/tui/components/ChatPanel.d.ts +2 -1
  70. package/dist/tui/components/ChatPanel.d.ts.map +1 -1
  71. package/dist/tui/components/ChatPanel.js +47 -28
  72. package/dist/tui/components/ChatPanel.js.map +1 -1
  73. package/dist/tui/components/DAGPanel.d.ts +14 -2
  74. package/dist/tui/components/DAGPanel.d.ts.map +1 -1
  75. package/dist/tui/components/DAGPanel.js +48 -27
  76. package/dist/tui/components/DAGPanel.js.map +1 -1
  77. package/dist/tui/components/ExecutionTimeline.d.ts +34 -0
  78. package/dist/tui/components/ExecutionTimeline.d.ts.map +1 -0
  79. package/dist/tui/components/ExecutionTimeline.js +67 -0
  80. package/dist/tui/components/ExecutionTimeline.js.map +1 -0
  81. package/dist/tui/components/Header.d.ts +2 -1
  82. package/dist/tui/components/Header.d.ts.map +1 -1
  83. package/dist/tui/components/Header.js +23 -20
  84. package/dist/tui/components/Header.js.map +1 -1
  85. package/dist/tui/components/HelpOverlay.d.ts +2 -1
  86. package/dist/tui/components/HelpOverlay.d.ts.map +1 -1
  87. package/dist/tui/components/HelpOverlay.js +59 -41
  88. package/dist/tui/components/HelpOverlay.js.map +1 -1
  89. package/dist/tui/components/InputBar.d.ts +3 -1
  90. package/dist/tui/components/InputBar.d.ts.map +1 -1
  91. package/dist/tui/components/InputBar.js +12 -7
  92. package/dist/tui/components/InputBar.js.map +1 -1
  93. package/dist/tui/components/LogsPanel.d.ts +3 -1
  94. package/dist/tui/components/LogsPanel.d.ts.map +1 -1
  95. package/dist/tui/components/LogsPanel.js +52 -3
  96. package/dist/tui/components/LogsPanel.js.map +1 -1
  97. package/dist/tui/components/MemoryPanel.d.ts +8 -6
  98. package/dist/tui/components/MemoryPanel.d.ts.map +1 -1
  99. package/dist/tui/components/MemoryPanel.js +37 -10
  100. package/dist/tui/components/MemoryPanel.js.map +1 -1
  101. package/dist/tui/components/MetricsPanel.d.ts +12 -7
  102. package/dist/tui/components/MetricsPanel.d.ts.map +1 -1
  103. package/dist/tui/components/MetricsPanel.js +24 -11
  104. package/dist/tui/components/MetricsPanel.js.map +1 -1
  105. package/dist/tui/components/StatusPanel.d.ts +3 -1
  106. package/dist/tui/components/StatusPanel.d.ts.map +1 -1
  107. package/dist/tui/components/StatusPanel.js +20 -18
  108. package/dist/tui/components/StatusPanel.js.map +1 -1
  109. package/dist/tui/components/TaskTree.d.ts +28 -0
  110. package/dist/tui/components/TaskTree.d.ts.map +1 -0
  111. package/dist/tui/components/TaskTree.js +29 -0
  112. package/dist/tui/components/TaskTree.js.map +1 -0
  113. package/dist/tui/components/animations/ProgressBar.d.ts +39 -0
  114. package/dist/tui/components/animations/ProgressBar.d.ts.map +1 -0
  115. package/dist/tui/components/animations/ProgressBar.js +39 -0
  116. package/dist/tui/components/animations/ProgressBar.js.map +1 -0
  117. package/dist/tui/components/animations/Pulse.d.ts +17 -0
  118. package/dist/tui/components/animations/Pulse.d.ts.map +1 -0
  119. package/dist/tui/components/animations/Pulse.js +47 -0
  120. package/dist/tui/components/animations/Pulse.js.map +1 -0
  121. package/dist/tui/components/animations/Spinner.d.ts +13 -0
  122. package/dist/tui/components/animations/Spinner.d.ts.map +1 -0
  123. package/dist/tui/components/animations/Spinner.js +36 -0
  124. package/dist/tui/components/animations/Spinner.js.map +1 -0
  125. package/dist/tui/components/animations/StatusAnimator.d.ts +27 -0
  126. package/dist/tui/components/animations/StatusAnimator.d.ts.map +1 -0
  127. package/dist/tui/components/animations/StatusAnimator.js +85 -0
  128. package/dist/tui/components/animations/StatusAnimator.js.map +1 -0
  129. package/dist/tui/components/animations/TypingEffect.d.ts +26 -0
  130. package/dist/tui/components/animations/TypingEffect.d.ts.map +1 -0
  131. package/dist/tui/components/animations/TypingEffect.js +59 -0
  132. package/dist/tui/components/animations/TypingEffect.js.map +1 -0
  133. package/dist/tui/components/animations/index.d.ts +8 -0
  134. package/dist/tui/components/animations/index.d.ts.map +1 -0
  135. package/dist/tui/components/animations/index.js +6 -0
  136. package/dist/tui/components/animations/index.js.map +1 -0
  137. package/dist/tui/hooks/useAnimation.d.ts +42 -0
  138. package/dist/tui/hooks/useAnimation.d.ts.map +1 -0
  139. package/dist/tui/hooks/useAnimation.js +212 -0
  140. package/dist/tui/hooks/useAnimation.js.map +1 -0
  141. package/dist/tui/hooks/useAppState.d.ts +9 -6
  142. package/dist/tui/hooks/useAppState.d.ts.map +1 -1
  143. package/dist/tui/hooks/useAppState.js +84 -69
  144. package/dist/tui/hooks/useAppState.js.map +1 -1
  145. package/dist/tui/services/orchestrator.d.ts.map +1 -1
  146. package/dist/tui/services/orchestrator.js +47 -3
  147. package/dist/tui/services/orchestrator.js.map +1 -1
  148. package/dist/tui/styles/borders.d.ts +31 -0
  149. package/dist/tui/styles/borders.d.ts.map +1 -0
  150. package/dist/tui/styles/borders.js +47 -0
  151. package/dist/tui/styles/borders.js.map +1 -0
  152. package/dist/tui/styles/colors.d.ts +18 -0
  153. package/dist/tui/styles/colors.d.ts.map +1 -0
  154. package/dist/tui/styles/colors.js +18 -0
  155. package/dist/tui/styles/colors.js.map +1 -0
  156. package/dist/tui/styles/index.d.ts +6 -0
  157. package/dist/tui/styles/index.d.ts.map +1 -0
  158. package/dist/tui/styles/index.js +6 -0
  159. package/dist/tui/styles/index.js.map +1 -0
  160. package/dist/tui/styles/indicators.d.ts +67 -0
  161. package/dist/tui/styles/indicators.d.ts.map +1 -0
  162. package/dist/tui/styles/indicators.js +42 -0
  163. package/dist/tui/styles/indicators.js.map +1 -0
  164. package/dist/tui/styles/layout.d.ts +21 -0
  165. package/dist/tui/styles/layout.d.ts.map +1 -0
  166. package/dist/tui/styles/layout.js +42 -0
  167. package/dist/tui/styles/layout.js.map +1 -0
  168. package/dist/tui/styles/providers.d.ts +77 -0
  169. package/dist/tui/styles/providers.d.ts.map +1 -0
  170. package/dist/tui/styles/providers.js +31 -0
  171. package/dist/tui/styles/providers.js.map +1 -0
  172. package/dist/tui/utils/animation.d.ts +44 -0
  173. package/dist/tui/utils/animation.d.ts.map +1 -0
  174. package/dist/tui/utils/animation.js +107 -0
  175. package/dist/tui/utils/animation.js.map +1 -0
  176. package/package.json +8 -8
  177. package/src/bin.ts +8 -5
  178. package/src/hub/commands/index.ts +7 -4
  179. package/src/hub/event-listener.ts +14 -10
  180. package/src/hub/index.ts +14 -2
  181. package/src/setup/components/ApiKeyInput.tsx +158 -0
  182. package/src/setup/components/AsciiBanner.tsx +125 -0
  183. package/src/setup/components/CliDetector.tsx +230 -0
  184. package/src/setup/components/ModeSelector.tsx +137 -0
  185. package/src/setup/components/ProviderSelector.tsx +174 -0
  186. package/src/setup/components/SetupWizard.tsx +368 -0
  187. package/src/setup/components/StepIndicator.tsx +74 -0
  188. package/src/setup/components/SuccessScreen.tsx +229 -0
  189. package/src/setup/index.ts +34 -0
  190. package/src/setup/utils/cli-detection.ts +99 -0
  191. package/src/setup/utils/config-writer.ts +249 -0
  192. package/src/tui/App.tsx +95 -64
  193. package/src/tui/components/AgentStateIcon.tsx +84 -0
  194. package/src/tui/components/AnimatedBranch.tsx +134 -0
  195. package/src/tui/components/ChatPanel.tsx +85 -43
  196. package/src/tui/components/DAGPanel.tsx +150 -58
  197. package/src/tui/components/ExecutionTimeline.tsx +225 -0
  198. package/src/tui/components/Header.tsx +67 -43
  199. package/src/tui/components/HelpOverlay.tsx +118 -61
  200. package/src/tui/components/InputBar.tsx +33 -19
  201. package/src/tui/components/LogsPanel.tsx +106 -14
  202. package/src/tui/components/MemoryPanel.tsx +106 -42
  203. package/src/tui/components/MetricsPanel.tsx +102 -61
  204. package/src/tui/components/StatusPanel.tsx +84 -37
  205. package/src/tui/components/TaskTree.tsx +159 -0
  206. package/src/tui/components/animations/ProgressBar.tsx +160 -0
  207. package/src/tui/components/animations/Pulse.tsx +73 -0
  208. package/src/tui/components/animations/Spinner.tsx +54 -0
  209. package/src/tui/components/animations/StatusAnimator.tsx +153 -0
  210. package/src/tui/components/animations/TypingEffect.tsx +119 -0
  211. package/src/tui/components/animations/index.ts +16 -0
  212. package/src/tui/hooks/useAnimation.ts +290 -0
  213. package/src/tui/hooks/useAppState.ts +52 -32
  214. package/src/tui/services/orchestrator.ts +57 -4
  215. package/src/tui/styles/borders.ts +51 -0
  216. package/src/tui/styles/colors.ts +19 -0
  217. package/src/tui/styles/index.ts +20 -0
  218. package/src/tui/styles/indicators.ts +54 -0
  219. package/src/tui/styles/layout.ts +44 -0
  220. package/src/tui/styles/providers.ts +32 -0
  221. package/src/tui/utils/animation.ts +124 -0
  222. package/LICENSE +0 -21
  223. package/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,21 @@
1
+ export declare const layout: {
2
+ defaultWidth: number;
3
+ panelWidth: {
4
+ chat: number;
5
+ dag: number;
6
+ status: number;
7
+ logs: number;
8
+ metrics: number;
9
+ memory: number;
10
+ };
11
+ padding: {
12
+ x: number;
13
+ y: number;
14
+ };
15
+ progressWidth: number;
16
+ };
17
+ export declare function formatTimestamp(date: Date): string;
18
+ export declare function formatTimestampMs(date: Date): string;
19
+ export declare function padRight(text: string, width: number): string;
20
+ export declare function truncate(text: string, maxLength: number): string;
21
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/tui/styles/layout.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;CAelB,CAAC;AAEF,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAMlD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAQpD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAG5D;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAGhE"}
@@ -0,0 +1,42 @@
1
+ export const layout = {
2
+ defaultWidth: 80,
3
+ panelWidth: {
4
+ chat: 40,
5
+ dag: 38,
6
+ status: 28,
7
+ logs: 32,
8
+ metrics: 28,
9
+ memory: 30,
10
+ },
11
+ padding: {
12
+ x: 1,
13
+ y: 0,
14
+ },
15
+ progressWidth: 16,
16
+ };
17
+ export function formatTimestamp(date) {
18
+ return date.toLocaleTimeString("fr-FR", {
19
+ hour: "2-digit",
20
+ minute: "2-digit",
21
+ second: "2-digit",
22
+ });
23
+ }
24
+ export function formatTimestampMs(date) {
25
+ const time = date.toLocaleTimeString("fr-FR", {
26
+ hour: "2-digit",
27
+ minute: "2-digit",
28
+ second: "2-digit",
29
+ });
30
+ const ms = String(date.getMilliseconds()).padStart(3, "0");
31
+ return `${time}.${ms}`;
32
+ }
33
+ export function padRight(text, width) {
34
+ const padding = Math.max(0, width - text.length);
35
+ return text + " ".repeat(padding);
36
+ }
37
+ export function truncate(text, maxLength) {
38
+ if (text.length <= maxLength)
39
+ return text;
40
+ return text.slice(0, maxLength - 3) + "...";
41
+ }
42
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/tui/styles/layout.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,YAAY,EAAE,EAAE;IAChB,UAAU,EAAE;QACV,IAAI,EAAE,EAAE;QACR,GAAG,EAAE,EAAE;QACP,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,EAAE;QACR,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,EAAE;KACX;IACD,OAAO,EAAE;QACP,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;KACL;IACD,aAAa,EAAE,EAAE;CAClB,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,IAAU;IACxC,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE;QACtC,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAU;IAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE;QAC5C,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;IACH,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,OAAO,GAAG,IAAI,IAAI,EAAE,EAAE,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,KAAa;IAClD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,SAAiB;IACtD,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS;QAAE,OAAO,IAAI,CAAC;IAC1C,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,77 @@
1
+ export declare const providerTags: {
2
+ host: {
3
+ code: string;
4
+ name: string;
5
+ };
6
+ claude: {
7
+ code: string;
8
+ name: string;
9
+ };
10
+ opencode: {
11
+ code: string;
12
+ name: string;
13
+ };
14
+ kilo: {
15
+ code: string;
16
+ name: string;
17
+ };
18
+ anthropic: {
19
+ code: string;
20
+ name: string;
21
+ };
22
+ gemini: {
23
+ code: string;
24
+ name: string;
25
+ };
26
+ mistral: {
27
+ code: string;
28
+ name: string;
29
+ };
30
+ groq: {
31
+ code: string;
32
+ name: string;
33
+ };
34
+ openai: {
35
+ code: string;
36
+ name: string;
37
+ };
38
+ };
39
+ export declare function getProviderTag(provider: string): {
40
+ code: string;
41
+ name: string;
42
+ };
43
+ export declare const logStatusTags: {
44
+ run: {
45
+ tag: string;
46
+ color: string;
47
+ };
48
+ success: {
49
+ tag: string;
50
+ color: string;
51
+ };
52
+ warn: {
53
+ tag: string;
54
+ color: string;
55
+ };
56
+ error: {
57
+ tag: string;
58
+ color: string;
59
+ };
60
+ info: {
61
+ tag: string;
62
+ color: string;
63
+ };
64
+ mutate: {
65
+ tag: string;
66
+ color: string;
67
+ };
68
+ done: {
69
+ tag: string;
70
+ color: string;
71
+ };
72
+ start: {
73
+ tag: string;
74
+ color: string;
75
+ };
76
+ };
77
+ //# sourceMappingURL=providers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../../src/tui/styles/providers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUxB,CAAC;AAEF,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAQ/E;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASzB,CAAC"}
@@ -0,0 +1,31 @@
1
+ export const providerTags = {
2
+ host: { code: "[H]", name: "Host-Native" },
3
+ claude: { code: "[C]", name: "Claude Code" },
4
+ opencode: { code: "[O]", name: "OpenCode" },
5
+ kilo: { code: "[K]", name: "Kilo" },
6
+ anthropic: { code: "[A]", name: "Anthropic API" },
7
+ gemini: { code: "[G]", name: "Gemini" },
8
+ mistral: { code: "[M]", name: "Mistral" },
9
+ groq: { code: "[Q]", name: "Groq" },
10
+ openai: { code: "[O]", name: "OpenAI" },
11
+ };
12
+ export function getProviderTag(provider) {
13
+ const normalized = provider.toLowerCase().replace(/[-_\s]/g, "");
14
+ for (const [key, value] of Object.entries(providerTags)) {
15
+ if (normalized.includes(key)) {
16
+ return value;
17
+ }
18
+ }
19
+ return { code: "[?]", name: provider };
20
+ }
21
+ export const logStatusTags = {
22
+ run: { tag: "[RUN]", color: "#f97316" },
23
+ success: { tag: "[SUCCESS]", color: "#22c55e" },
24
+ warn: { tag: "[WARN]", color: "#f59e0b" },
25
+ error: { tag: "[ERROR]", color: "#ef4444" },
26
+ info: { tag: "[INFO]", color: "#a1a1aa" },
27
+ mutate: { tag: "[MUTATE]", color: "#f59e0b" },
28
+ done: { tag: "[DONE]", color: "#22c55e" },
29
+ start: { tag: "[START]", color: "#f97316" },
30
+ };
31
+ //# sourceMappingURL=providers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"providers.js","sourceRoot":"","sources":["../../../src/tui/styles/providers.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE;IAC1C,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE;IAC5C,QAAQ,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE;IAC3C,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE;IACnC,SAAS,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE;IACjD,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE;IACvC,OAAO,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE;IACzC,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE;IACnC,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE;CACxC,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC7C,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IACjE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QACxD,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC7B,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AACzC,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE;IACvC,OAAO,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE;IAC/C,IAAI,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE;IACzC,KAAK,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IAC3C,IAAI,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE;IACzC,MAAM,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE;IAC7C,IAAI,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE;IACzC,KAAK,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;CAC5C,CAAC"}
@@ -0,0 +1,44 @@
1
+ export declare const spinnerSequences: {
2
+ dots: string[];
3
+ line: string[];
4
+ circle: string[];
5
+ pulse: string[];
6
+ bounce: string[];
7
+ triangle: string[];
8
+ square: string[];
9
+ };
10
+ export declare const glowChars: string[];
11
+ export declare const progressChars: {
12
+ empty: string;
13
+ quarter: string;
14
+ half: string;
15
+ full: string;
16
+ head: string;
17
+ marker: string;
18
+ };
19
+ export declare const scanlineChars: string[];
20
+ export declare function getSpinnerFrame(tick: number, type?: keyof typeof spinnerSequences): string;
21
+ export declare function getGlowChar(intensity: number): string;
22
+ export declare function easeIn(t: number): number;
23
+ export declare function easeOut(t: number): number;
24
+ export declare function easeInOut(t: number): number;
25
+ export declare function linear(t: number): number;
26
+ export declare function pingPong(t: number, min?: number, max?: number): number;
27
+ export declare function breathe(t: number, min?: number, max?: number): number;
28
+ export declare function clamp(value: number, min: number, max: number): number;
29
+ export declare function lerp(a: number, b: number, t: number): number;
30
+ export declare const bracketProgress: {
31
+ empty: (width?: number) => string;
32
+ progress: (progress: number, width?: number) => string;
33
+ animated: (progress: number, tick: number, width?: number) => string;
34
+ };
35
+ export declare function createTypewriterEffect(text: string, progress: number): string;
36
+ export declare const statusTransitionAnims: {
37
+ idle_to_running: string[];
38
+ running_to_done: string[];
39
+ running_to_error: string[];
40
+ pending_to_running: string[];
41
+ };
42
+ export declare function getStatusTransitionFrame(from: string, to: string, progress: number): string;
43
+ export declare function generateGridOverlay(width: number, height: number, cellSize?: number): string[];
44
+ //# sourceMappingURL=animation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../../src/tui/utils/animation.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;CAQ5B,CAAC;AAEF,eAAO,MAAM,SAAS,UAAuB,CAAC;AAE9C,eAAO,MAAM,aAAa;;;;;;;CAOzB,CAAC;AAEF,eAAO,MAAM,aAAa,UAAuB,CAAC;AAElD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,OAAO,gBAAyB,GAAG,MAAM,CAGlG;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAExC;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED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["◐", "◓", "◑", "◒"],
5
+ pulse: ["●", "◐", "○", "◐"],
6
+ bounce: ["⠁", "⠃", "⠇", "⡇", "⣇", "⣧", "⣷", "⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣭", "⣩", "⣈", "⡈", "⠈"],
7
+ triangle: ["◢", "◣", "◤", "◥"],
8
+ square: ["◰", "◳", "◲", "◱"],
9
+ };
10
+ export const glowChars = ["░", "▒", "▓", "█"];
11
+ export const progressChars = {
12
+ empty: "░",
13
+ quarter: "▒",
14
+ half: "▓",
15
+ full: "█",
16
+ head: "▶",
17
+ marker: "↑",
18
+ };
19
+ export const scanlineChars = ["─", "━", "═", "━"];
20
+ export function getSpinnerFrame(tick, type = "dots") {
21
+ const frames = spinnerSequences[type];
22
+ return frames[tick % frames.length];
23
+ }
24
+ export function getGlowChar(intensity) {
25
+ const index = Math.min(3, Math.max(0, Math.floor(intensity * 4)));
26
+ return glowChars[index];
27
+ }
28
+ export function easeIn(t) {
29
+ return t * t;
30
+ }
31
+ export function easeOut(t) {
32
+ return 1 - (1 - t) * (1 - t);
33
+ }
34
+ export function easeInOut(t) {
35
+ return t < 0.5 ? 2 * t * t : 1 - Math.pow(-2 * t + 2, 2) / 2;
36
+ }
37
+ export function linear(t) {
38
+ return t;
39
+ }
40
+ export function pingPong(t, min = 0, max = 1) {
41
+ const cycle = t % 2;
42
+ return min + (cycle < 1 ? cycle : 2 - cycle) * (max - min);
43
+ }
44
+ export function breathe(t, min = 0.3, max = 1) {
45
+ return min + (Math.sin(t * Math.PI * 2) + 1) / 2 * (max - min);
46
+ }
47
+ export function clamp(value, min, max) {
48
+ return Math.min(max, Math.max(min, value));
49
+ }
50
+ export function lerp(a, b, t) {
51
+ return a + (b - a) * clamp(t, 0, 1);
52
+ }
53
+ export const bracketProgress = {
54
+ empty: (width = 10) => `[${".".repeat(width)}]`,
55
+ progress: (progress, width = 10) => {
56
+ const filled = Math.round(progress * width);
57
+ const empty = width - filled;
58
+ return `[${"=".repeat(filled)}${empty > 0 ? ".".repeat(empty) : ""}]`;
59
+ },
60
+ animated: (progress, tick, width = 10) => {
61
+ const filled = Math.round(progress * width);
62
+ const empty = width - filled;
63
+ const head = filled < width ? [">", "=", "-"][tick % 3] : "";
64
+ return `[${"=".repeat(Math.max(0, filled - 1))}${head}${empty > 0 ? ".".repeat(empty) : ""}]`;
65
+ },
66
+ };
67
+ export function createTypewriterEffect(text, progress) {
68
+ const chars = Math.floor(progress * text.length);
69
+ return text.slice(0, chars);
70
+ }
71
+ export const statusTransitionAnims = {
72
+ idle_to_running: ["○", "◐", "◑", "●", "▶"],
73
+ running_to_done: ["▶", "●", "✓"],
74
+ running_to_error: ["▶", "◐", "✗"],
75
+ pending_to_running: ["○", "◐", "▶"],
76
+ };
77
+ export function getStatusTransitionFrame(from, to, progress) {
78
+ const key = `${from}_to_${to}`;
79
+ const frames = statusTransitionAnims[key];
80
+ if (!frames)
81
+ return "●";
82
+ const index = Math.min(frames.length - 1, Math.floor(progress * frames.length));
83
+ return frames[index];
84
+ }
85
+ export function generateGridOverlay(width, height, cellSize = 10) {
86
+ const lines = [];
87
+ for (let y = 0; y < height; y++) {
88
+ let line = "";
89
+ for (let x = 0; x < width; x++) {
90
+ if (y % cellSize === 0 && x % cellSize === 0) {
91
+ line += "┼";
92
+ }
93
+ else if (y % cellSize === 0) {
94
+ line += "─";
95
+ }
96
+ else if (x % cellSize === 0) {
97
+ line += "│";
98
+ }
99
+ else {
100
+ line += " ";
101
+ }
102
+ }
103
+ lines.push(line);
104
+ }
105
+ return lines;
106
+ }
107
+ //# sourceMappingURL=animation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animation.js","sourceRoot":"","sources":["../../../src/tui/utils/animation.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,E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C,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAChF,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAAa,EAAE,MAAc,EAAE,WAAmB,EAAE;IACtF,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/B,IAAI,CAAC,GAAG,QAAQ,KAAK,CAAC,IAAI,CAAC,GAAG,QAAQ,KAAK,CAAC,EAAE,CAAC;gBAC7C,IAAI,IAAI,GAAG,CAAC;YACd,CAAC;iBAAM,IAAI,CAAC,GAAG,QAAQ,KAAK,CAAC,EAAE,CAAC;gBAC9B,IAAI,IAAI,GAAG,CAAC;YACd,CAAC;iBAAM,IAAI,CAAC,GAAG,QAAQ,KAAK,CAAC,EAAE,CAAC;gBAC9B,IAAI,IAAI,GAAG,CAAC;YACd,CAAC;iBAAM,CAAC;gBACN,IAAI,IAAI,GAAG,CAAC;YACd,CAAC;QACH,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
package/package.json CHANGED
@@ -1,12 +1,18 @@
1
1
  {
2
2
  "name": "rax-flow",
3
- "version": "0.1.9",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "bin": {
8
8
  "rax-flow": "dist/bin.js"
9
9
  },
10
+ "scripts": {
11
+ "build": "tsc -p tsconfig.json",
12
+ "dev": "tsx src/bin.ts",
13
+ "test": "vitest run --passWithNoTests",
14
+ "typecheck": "tsc -p tsconfig.json --noEmit"
15
+ },
10
16
  "dependencies": {
11
17
  "ink": "^6.8.0",
12
18
  "ink-box": "^2.0.0",
@@ -24,11 +30,5 @@
24
30
  "devDependencies": {
25
31
  "@types/react": "^19.2.14",
26
32
  "@types/ws": "^8.18.1"
27
- },
28
- "scripts": {
29
- "build": "tsc -p tsconfig.json",
30
- "dev": "tsx src/bin.ts",
31
- "test": "vitest run --passWithNoTests",
32
- "typecheck": "tsc -p tsconfig.json --noEmit"
33
33
  }
34
- }
34
+ }
package/src/bin.ts CHANGED
@@ -8,6 +8,7 @@ import { runInitHost } from "./init-host.js";
8
8
  import { runWorkflow } from "./run.js";
9
9
  import { runDashboard } from "./dashboard.js";
10
10
  import { startHubOneShot } from "./hub/index.js";
11
+ import { runSetup } from "./setup/index.js";
11
12
 
12
13
  function getFlag(args: string[], flag: string): string | undefined {
13
14
  const index = args.indexOf(flag);
@@ -46,8 +47,11 @@ async function main() {
46
47
  console.log(" hub Launch interactive hub");
47
48
  console.log(" --run <prompt> One-shot mode (execute and exit)");
48
49
  console.log("");
49
- console.log("Legacy Commands:");
50
- console.log(" install [--ui] Setup project, providers and .raxrc");
50
+ console.log("Setup:");
51
+ console.log(" setup Interactive setup wizard (TUI)");
52
+ console.log(" install [--ui] Legacy setup (alias for setup)");
53
+ console.log("");
54
+ console.log("Commands:");
51
55
  console.log(" run --prompt <text> [--workflow path] [--json] [--stream] [--max-parallel N] [--no-cache-persist]");
52
56
  console.log(" Execute workflow");
53
57
  console.log(" Optional: [--provider host|openai|claude|rest] [--bridge-command \"node bridge.mjs\"]");
@@ -61,9 +65,8 @@ async function main() {
61
65
  process.exit(0);
62
66
  }
63
67
 
64
- if (command === "install") {
65
- const openUi = args.includes("--ui");
66
- const code = await runInstall({ cwd: process.cwd(), openUi });
68
+ if (command === "install" || command === "setup") {
69
+ const code = await runSetup();
67
70
  process.exit(code);
68
71
  }
69
72
 
@@ -7,6 +7,7 @@ import { listWorkflows } from "./workflows.js";
7
7
  import { showLogs } from "./logs.js";
8
8
  import { showMetrics } from "./metrics.js";
9
9
  import { showMemory } from "./memory.js";
10
+ import { startTUI } from "../../tui/index.js";
10
11
 
11
12
  const commands = new Map<string, CommandDefinition>();
12
13
 
@@ -107,8 +108,9 @@ registerCommand({
107
108
  name: "ui",
108
109
  description: "Lance le mode TUI plein écran",
109
110
  handler: async () => {
110
- console.log("⚠️ Mode TUI non disponible - nécessite l'installation de react et ink");
111
- console.log(" npm install react ink");
111
+ console.log("\n🎬 Lancement du mode TUI...\n");
112
+ const { waitUntilExit } = startTUI();
113
+ await waitUntilExit();
112
114
  },
113
115
  });
114
116
 
@@ -116,8 +118,9 @@ registerCommand({
116
118
  name: "chat",
117
119
  description: "Lance le mode conversationnel",
118
120
  handler: async () => {
119
- console.log("⚠️ Mode Chat non disponible - nécessite l'installation de react et ink");
120
- console.log(" npm install react ink");
121
+ console.log("\n💬 Lancement du mode Chat (TUI)...\n");
122
+ const { waitUntilExit } = startTUI();
123
+ await waitUntilExit();
121
124
  },
122
125
  });
123
126
 
@@ -1,13 +1,17 @@
1
- export interface RuntimeEvent {
2
- type: string;
3
- timestamp: number;
4
- payload: unknown;
1
+ import { RuntimeEventBus, RuntimeEvent } from "rax-flow-core";
2
+
3
+ const globalEventBus = new RuntimeEventBus();
4
+
5
+ export type { RuntimeEvent };
6
+
7
+ export function getEventBus(): RuntimeEventBus {
8
+ return globalEventBus;
9
+ }
10
+
11
+ export function subscribeToEvents(callback: (event: RuntimeEvent) => void): () => void {
12
+ return globalEventBus.onEvent(callback);
5
13
  }
6
14
 
7
- export function subscribeToEvents(_callback: (event: RuntimeEvent) => void): () => void {
8
- // TODO: Integrate with RuntimeEventBus from core
9
- // For now, return a no-op unsubscribe
10
- return () => {
11
- // Cleanup
12
- };
15
+ export function emitEvent(event: RuntimeEvent): void {
16
+ globalEventBus.emit(event);
13
17
  }
package/src/hub/index.ts CHANGED
@@ -2,7 +2,7 @@ import * as readline from "readline";
2
2
  import { HubOptions, HubContext, Command } from "./types.js";
3
3
  import { parseCommand, getCompletions } from "./parser.js";
4
4
  import { CommandHistory } from "./history.js";
5
- import { subscribeToEvents } from "./event-listener.js";
5
+ import { subscribeToEvents, RuntimeEvent } from "./event-listener.js";
6
6
  import { getCommandRegistry } from "./commands/index.js";
7
7
  import { loadConfig } from "./config-loader.js";
8
8
 
@@ -41,7 +41,19 @@ export async function startHub(options: HubOptions): Promise<void> {
41
41
  },
42
42
  });
43
43
 
44
- const unsubscribe = subscribeToEvents((event) => {
44
+ const unsubscribe = subscribeToEvents((event: RuntimeEvent) => {
45
+ const timeStr = new Date().toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
46
+ switch (event.type) {
47
+ case "run_start":
48
+ console.log(`[${timeStr}] ▶ Task started: ${event.taskId}`);
49
+ break;
50
+ case "run_end":
51
+ console.log(`[${timeStr}] ✓ Task completed: ${event.taskId} (confidence: ${event.metrics.confidence.toFixed(2)})`);
52
+ break;
53
+ case "node_error":
54
+ console.log(`[${timeStr}] ⚠ Node error: ${event.agent} - ${event.message}`);
55
+ break;
56
+ }
45
57
  });
46
58
 
47
59
  rl.on("line", async (input: string) => {