@hashgraphonline/conversational-agent 0.2.216 → 0.2.217

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 (312) hide show
  1. package/cli/readme.md +181 -0
  2. package/dist/cjs/index.cjs +1 -1
  3. package/dist/cjs/index.cjs.map +1 -1
  4. package/dist/cjs/index.d.ts +1 -0
  5. package/dist/cjs/plugins/community/swarm/SwarmPlugin.d.ts +17 -0
  6. package/dist/cjs/plugins/community/swarm/__tests__/SwarmPlugin.mocks.d.ts +1 -0
  7. package/dist/cjs/plugins/community/swarm/__tests__/SwarmPlugin.test.d.ts +1 -0
  8. package/dist/cjs/plugins/community/swarm/__tests__/tools/CreatePostageStampTool.test.d.ts +1 -0
  9. package/dist/cjs/plugins/community/swarm/__tests__/tools/DownloadDataTool.test.d.ts +1 -0
  10. package/dist/cjs/plugins/community/swarm/__tests__/tools/DownloadFilesTool.test.d.ts +1 -0
  11. package/dist/cjs/plugins/community/swarm/__tests__/tools/ExtendPostageStampTool.test.d.ts +1 -0
  12. package/dist/cjs/plugins/community/swarm/__tests__/tools/GetPostageStampTool.test.d.ts +1 -0
  13. package/dist/cjs/plugins/community/swarm/__tests__/tools/ListPostageStampsTool.test.d.ts +1 -0
  14. package/dist/cjs/plugins/community/swarm/__tests__/tools/QueryUploadProgressTool.test.d.ts +1 -0
  15. package/dist/cjs/plugins/community/swarm/__tests__/tools/ReadFeedTool.test.d.ts +1 -0
  16. package/dist/cjs/plugins/community/swarm/__tests__/tools/SwarmTool.mocks.d.ts +14 -0
  17. package/dist/cjs/plugins/community/swarm/__tests__/tools/UpdateFeedTool.test.d.ts +1 -0
  18. package/dist/cjs/plugins/community/swarm/__tests__/tools/UploadDataTool.test.d.ts +1 -0
  19. package/dist/cjs/plugins/community/swarm/__tests__/tools/UploadFileTool.test.d.ts +1 -0
  20. package/dist/cjs/plugins/community/swarm/__tests__/tools/UploadFolderTool.test.d.ts +1 -0
  21. package/dist/cjs/plugins/community/swarm/config.d.ts +6 -0
  22. package/dist/cjs/plugins/community/swarm/constants.d.ts +8 -0
  23. package/dist/cjs/plugins/community/swarm/index.d.ts +2 -0
  24. package/dist/cjs/plugins/community/swarm/model.d.ts +23 -0
  25. package/dist/cjs/plugins/community/swarm/tools/CreatePostageStampTool.d.ts +47 -0
  26. package/dist/cjs/plugins/community/swarm/tools/DownloadDataTool.d.ts +35 -0
  27. package/dist/cjs/plugins/community/swarm/tools/DownloadFilesTool.d.ts +41 -0
  28. package/dist/cjs/plugins/community/swarm/tools/ExtendPostageStampTool.d.ts +47 -0
  29. package/dist/cjs/plugins/community/swarm/tools/GetPostageStampTool.d.ts +35 -0
  30. package/dist/cjs/plugins/community/swarm/tools/ListPostageStampsTool.d.ts +53 -0
  31. package/dist/cjs/plugins/community/swarm/tools/QueryUploadProgressTool.d.ts +35 -0
  32. package/dist/cjs/plugins/community/swarm/tools/ReadFeedTool.d.ts +41 -0
  33. package/dist/cjs/plugins/community/swarm/tools/UpdateFeedTool.d.ts +47 -0
  34. package/dist/cjs/plugins/community/swarm/tools/UploadDataTool.d.ts +47 -0
  35. package/dist/cjs/plugins/community/swarm/tools/UploadFileTool.d.ts +53 -0
  36. package/dist/cjs/plugins/community/swarm/tools/UploadFolderTool.d.ts +47 -0
  37. package/dist/cjs/plugins/community/swarm/utils.d.ts +22 -0
  38. package/dist/cjs/plugins/index.d.ts +1 -0
  39. package/dist/esm/index.js +33 -31
  40. package/dist/esm/index.js.map +1 -1
  41. package/dist/esm/index10.js +13 -677
  42. package/dist/esm/index10.js.map +1 -1
  43. package/dist/esm/index11.js +601 -234
  44. package/dist/esm/index11.js.map +1 -1
  45. package/dist/esm/index12.js +296 -136
  46. package/dist/esm/index12.js.map +1 -1
  47. package/dist/esm/index13.js +127 -235
  48. package/dist/esm/index13.js.map +1 -1
  49. package/dist/esm/index14.js +247 -84
  50. package/dist/esm/index14.js.map +1 -1
  51. package/dist/esm/index15.js +81 -159
  52. package/dist/esm/index15.js.map +1 -1
  53. package/dist/esm/index16.js +155 -229
  54. package/dist/esm/index16.js.map +1 -1
  55. package/dist/esm/index17.js +238 -140
  56. package/dist/esm/index17.js.map +1 -1
  57. package/dist/esm/index18.js +139 -493
  58. package/dist/esm/index18.js.map +1 -1
  59. package/dist/esm/index19.js +479 -91
  60. package/dist/esm/index19.js.map +1 -1
  61. package/dist/esm/index20.js +88 -147
  62. package/dist/esm/index20.js.map +1 -1
  63. package/dist/esm/index21.js +127 -666
  64. package/dist/esm/index21.js.map +1 -1
  65. package/dist/esm/index22.js +698 -44
  66. package/dist/esm/index22.js.map +1 -1
  67. package/dist/esm/index23.js +45 -304
  68. package/dist/esm/index23.js.map +1 -1
  69. package/dist/esm/index24.js +303 -153
  70. package/dist/esm/index24.js.map +1 -1
  71. package/dist/esm/index25.js +150 -117
  72. package/dist/esm/index25.js.map +1 -1
  73. package/dist/esm/index26.js +154 -18
  74. package/dist/esm/index26.js.map +1 -1
  75. package/dist/esm/index27.js +18 -22
  76. package/dist/esm/index27.js.map +1 -1
  77. package/dist/esm/index28.js +15 -74
  78. package/dist/esm/index28.js.map +1 -1
  79. package/dist/esm/index29.js +70 -295
  80. package/dist/esm/index29.js.map +1 -1
  81. package/dist/esm/index30.js +279 -100
  82. package/dist/esm/index30.js.map +1 -1
  83. package/dist/esm/index31.js +86 -922
  84. package/dist/esm/index31.js.map +1 -1
  85. package/dist/esm/index32.js +904 -189
  86. package/dist/esm/index32.js.map +1 -1
  87. package/dist/esm/index33.js +185 -1169
  88. package/dist/esm/index33.js.map +1 -1
  89. package/dist/esm/index34.js +1218 -112
  90. package/dist/esm/index34.js.map +1 -1
  91. package/dist/esm/index35.js +111 -99
  92. package/dist/esm/index35.js.map +1 -1
  93. package/dist/esm/index36.js +113 -8
  94. package/dist/esm/index36.js.map +1 -1
  95. package/dist/esm/index37.js +8 -45
  96. package/dist/esm/index37.js.map +1 -1
  97. package/dist/esm/index38.js +41 -102
  98. package/dist/esm/index38.js.map +1 -1
  99. package/dist/esm/index39.js +96 -55
  100. package/dist/esm/index39.js.map +1 -1
  101. package/dist/esm/index4.js +1 -1
  102. package/dist/esm/index40.js +58 -71
  103. package/dist/esm/index40.js.map +1 -1
  104. package/dist/esm/index41.js +79 -21
  105. package/dist/esm/index41.js.map +1 -1
  106. package/dist/esm/index42.js +21 -5
  107. package/dist/esm/index42.js.map +1 -1
  108. package/dist/esm/index43.js +4 -11
  109. package/dist/esm/index43.js.map +1 -1
  110. package/dist/esm/index44.js +12 -322
  111. package/dist/esm/index44.js.map +1 -1
  112. package/dist/esm/index45.js +280 -142
  113. package/dist/esm/index45.js.map +1 -1
  114. package/dist/esm/index46.js +181 -24
  115. package/dist/esm/index46.js.map +1 -1
  116. package/dist/esm/index47.js +7 -95
  117. package/dist/esm/index47.js.map +1 -1
  118. package/dist/esm/index48.js +77 -7
  119. package/dist/esm/index48.js.map +1 -1
  120. package/dist/esm/index49.js +75 -0
  121. package/dist/esm/index49.js.map +1 -0
  122. package/dist/esm/index5.js +2 -2
  123. package/dist/esm/index50.js +57 -0
  124. package/dist/esm/index50.js.map +1 -0
  125. package/dist/esm/index51.js +103 -0
  126. package/dist/esm/index51.js.map +1 -0
  127. package/dist/esm/index52.js +79 -0
  128. package/dist/esm/index52.js.map +1 -0
  129. package/dist/esm/index53.js +75 -0
  130. package/dist/esm/index53.js.map +1 -0
  131. package/dist/esm/index54.js +124 -0
  132. package/dist/esm/index54.js.map +1 -0
  133. package/dist/esm/index55.js +58 -0
  134. package/dist/esm/index55.js.map +1 -0
  135. package/dist/esm/index56.js +83 -0
  136. package/dist/esm/index56.js.map +1 -0
  137. package/dist/esm/index57.js +100 -0
  138. package/dist/esm/index57.js.map +1 -0
  139. package/dist/esm/index58.js +118 -0
  140. package/dist/esm/index58.js.map +1 -0
  141. package/dist/esm/index59.js +108 -0
  142. package/dist/esm/index59.js.map +1 -0
  143. package/dist/esm/index6.js +132 -833
  144. package/dist/esm/index6.js.map +1 -1
  145. package/dist/esm/index60.js +30 -0
  146. package/dist/esm/index60.js.map +1 -0
  147. package/dist/esm/index61.js +98 -0
  148. package/dist/esm/index61.js.map +1 -0
  149. package/dist/esm/index62.js +131 -0
  150. package/dist/esm/index62.js.map +1 -0
  151. package/dist/esm/index63.js +19 -0
  152. package/dist/esm/index63.js.map +1 -0
  153. package/dist/esm/index7.js +826 -75
  154. package/dist/esm/index7.js.map +1 -1
  155. package/dist/esm/index8.js +91 -13
  156. package/dist/esm/index8.js.map +1 -1
  157. package/dist/esm/index9.js +13 -17
  158. package/dist/esm/index9.js.map +1 -1
  159. package/dist/types/index.d.ts +1 -0
  160. package/dist/types/plugins/community/swarm/SwarmPlugin.d.ts +17 -0
  161. package/dist/types/plugins/community/swarm/__tests__/SwarmPlugin.mocks.d.ts +1 -0
  162. package/dist/types/plugins/community/swarm/__tests__/SwarmPlugin.test.d.ts +1 -0
  163. package/dist/types/plugins/community/swarm/__tests__/tools/CreatePostageStampTool.test.d.ts +1 -0
  164. package/dist/types/plugins/community/swarm/__tests__/tools/DownloadDataTool.test.d.ts +1 -0
  165. package/dist/types/plugins/community/swarm/__tests__/tools/DownloadFilesTool.test.d.ts +1 -0
  166. package/dist/types/plugins/community/swarm/__tests__/tools/ExtendPostageStampTool.test.d.ts +1 -0
  167. package/dist/types/plugins/community/swarm/__tests__/tools/GetPostageStampTool.test.d.ts +1 -0
  168. package/dist/types/plugins/community/swarm/__tests__/tools/ListPostageStampsTool.test.d.ts +1 -0
  169. package/dist/types/plugins/community/swarm/__tests__/tools/QueryUploadProgressTool.test.d.ts +1 -0
  170. package/dist/types/plugins/community/swarm/__tests__/tools/ReadFeedTool.test.d.ts +1 -0
  171. package/dist/types/plugins/community/swarm/__tests__/tools/SwarmTool.mocks.d.ts +14 -0
  172. package/dist/types/plugins/community/swarm/__tests__/tools/UpdateFeedTool.test.d.ts +1 -0
  173. package/dist/types/plugins/community/swarm/__tests__/tools/UploadDataTool.test.d.ts +1 -0
  174. package/dist/types/plugins/community/swarm/__tests__/tools/UploadFileTool.test.d.ts +1 -0
  175. package/dist/types/plugins/community/swarm/__tests__/tools/UploadFolderTool.test.d.ts +1 -0
  176. package/dist/types/plugins/community/swarm/config.d.ts +6 -0
  177. package/dist/types/plugins/community/swarm/constants.d.ts +8 -0
  178. package/dist/types/plugins/community/swarm/index.d.ts +2 -0
  179. package/dist/types/plugins/community/swarm/model.d.ts +23 -0
  180. package/dist/types/plugins/community/swarm/tools/CreatePostageStampTool.d.ts +47 -0
  181. package/dist/types/plugins/community/swarm/tools/DownloadDataTool.d.ts +35 -0
  182. package/dist/types/plugins/community/swarm/tools/DownloadFilesTool.d.ts +41 -0
  183. package/dist/types/plugins/community/swarm/tools/ExtendPostageStampTool.d.ts +47 -0
  184. package/dist/types/plugins/community/swarm/tools/GetPostageStampTool.d.ts +35 -0
  185. package/dist/types/plugins/community/swarm/tools/ListPostageStampsTool.d.ts +53 -0
  186. package/dist/types/plugins/community/swarm/tools/QueryUploadProgressTool.d.ts +35 -0
  187. package/dist/types/plugins/community/swarm/tools/ReadFeedTool.d.ts +41 -0
  188. package/dist/types/plugins/community/swarm/tools/UpdateFeedTool.d.ts +47 -0
  189. package/dist/types/plugins/community/swarm/tools/UploadDataTool.d.ts +47 -0
  190. package/dist/types/plugins/community/swarm/tools/UploadFileTool.d.ts +53 -0
  191. package/dist/types/plugins/community/swarm/tools/UploadFolderTool.d.ts +47 -0
  192. package/dist/types/plugins/community/swarm/utils.d.ts +22 -0
  193. package/dist/types/plugins/index.d.ts +1 -0
  194. package/package.json +36 -26
  195. package/src/index.ts +1 -0
  196. package/src/plugins/community/swarm/README.md +279 -0
  197. package/src/plugins/community/swarm/SwarmPlugin.ts +178 -0
  198. package/src/plugins/community/swarm/__tests__/SwarmPlugin.mocks.ts +105 -0
  199. package/src/plugins/community/swarm/__tests__/SwarmPlugin.test.ts +93 -0
  200. package/src/plugins/community/swarm/__tests__/tools/CreatePostageStampTool.test.ts +152 -0
  201. package/src/plugins/community/swarm/__tests__/tools/DownloadDataTool.test.ts +93 -0
  202. package/src/plugins/community/swarm/__tests__/tools/DownloadFilesTool.test.ts +163 -0
  203. package/src/plugins/community/swarm/__tests__/tools/ExtendPostageStampTool.test.ts +132 -0
  204. package/src/plugins/community/swarm/__tests__/tools/GetPostageStampTool.test.ts +83 -0
  205. package/src/plugins/community/swarm/__tests__/tools/ListPostageStampsTool.test.ts +219 -0
  206. package/src/plugins/community/swarm/__tests__/tools/QueryUploadProgressTool.test.ts +169 -0
  207. package/src/plugins/community/swarm/__tests__/tools/ReadFeedTool.test.ts +133 -0
  208. package/src/plugins/community/swarm/__tests__/tools/SwarmTool.mocks.ts +67 -0
  209. package/src/plugins/community/swarm/__tests__/tools/UpdateFeedTool.test.ts +148 -0
  210. package/src/plugins/community/swarm/__tests__/tools/UploadDataTool.test.ts +125 -0
  211. package/src/plugins/community/swarm/__tests__/tools/UploadFileTool.test.ts +194 -0
  212. package/src/plugins/community/swarm/__tests__/tools/UploadFolderTool.test.ts +118 -0
  213. package/src/plugins/community/swarm/config.ts +6 -0
  214. package/src/plugins/community/swarm/constants.ts +12 -0
  215. package/src/plugins/community/swarm/index.ts +2 -0
  216. package/src/plugins/community/swarm/model.ts +23 -0
  217. package/src/plugins/community/swarm/tools/CreatePostageStampTool.ts +137 -0
  218. package/src/plugins/community/swarm/tools/DownloadDataTool.ts +79 -0
  219. package/src/plugins/community/swarm/tools/DownloadFilesTool.ts +155 -0
  220. package/src/plugins/community/swarm/tools/ExtendPostageStampTool.ts +112 -0
  221. package/src/plugins/community/swarm/tools/GetPostageStampTool.ts +92 -0
  222. package/src/plugins/community/swarm/tools/ListPostageStampsTool.ts +124 -0
  223. package/src/plugins/community/swarm/tools/QueryUploadProgressTool.ts +109 -0
  224. package/src/plugins/community/swarm/tools/ReadFeedTool.ts +110 -0
  225. package/src/plugins/community/swarm/tools/UpdateFeedTool.ts +149 -0
  226. package/src/plugins/community/swarm/tools/UploadDataTool.ts +109 -0
  227. package/src/plugins/community/swarm/tools/UploadFileTool.ts +163 -0
  228. package/src/plugins/community/swarm/tools/UploadFolderTool.ts +150 -0
  229. package/src/plugins/community/swarm/utils.ts +172 -0
  230. package/src/plugins/index.ts +1 -0
  231. package/cli/dist/CLIApp.d.ts +0 -11
  232. package/cli/dist/CLIApp.d.ts.map +0 -1
  233. package/cli/dist/CLIApp.js +0 -128
  234. package/cli/dist/CLIApp.js.map +0 -1
  235. package/cli/dist/LocalConversationalAgent.d.ts +0 -37
  236. package/cli/dist/LocalConversationalAgent.js +0 -58
  237. package/cli/dist/app.d.ts +0 -18
  238. package/cli/dist/app.d.ts.map +0 -1
  239. package/cli/dist/app.js +0 -14
  240. package/cli/dist/app.js.map +0 -1
  241. package/cli/dist/cli.d.ts +0 -3
  242. package/cli/dist/cli.d.ts.map +0 -1
  243. package/cli/dist/cli.js +0 -87
  244. package/cli/dist/cli.js.map +0 -1
  245. package/cli/dist/components/AppContainer.d.ts +0 -16
  246. package/cli/dist/components/AppContainer.js +0 -24
  247. package/cli/dist/components/AppScreens.d.ts +0 -2
  248. package/cli/dist/components/AppScreens.js +0 -259
  249. package/cli/dist/components/ChatScreen.d.ts +0 -21
  250. package/cli/dist/components/ChatScreen.d.ts.map +0 -1
  251. package/cli/dist/components/ChatScreen.js +0 -40
  252. package/cli/dist/components/ChatScreen.js.map +0 -1
  253. package/cli/dist/components/DebugLoadingScreen.d.ts +0 -5
  254. package/cli/dist/components/DebugLoadingScreen.js +0 -31
  255. package/cli/dist/components/LoadingScreen.d.ts +0 -3
  256. package/cli/dist/components/LoadingScreen.d.ts.map +0 -1
  257. package/cli/dist/components/LoadingScreen.js +0 -17
  258. package/cli/dist/components/LoadingScreen.js.map +0 -1
  259. package/cli/dist/components/LoadingScreenDebug.d.ts +0 -5
  260. package/cli/dist/components/LoadingScreenDebug.js +0 -27
  261. package/cli/dist/components/MCPConfigScreen.d.ts +0 -28
  262. package/cli/dist/components/MCPConfigScreen.d.ts.map +0 -1
  263. package/cli/dist/components/MCPConfigScreen.js +0 -186
  264. package/cli/dist/components/MCPConfigScreen.js.map +0 -1
  265. package/cli/dist/components/ScreenRouter.d.ts +0 -13
  266. package/cli/dist/components/ScreenRouter.d.ts.map +0 -1
  267. package/cli/dist/components/ScreenRouter.js +0 -23
  268. package/cli/dist/components/ScreenRouter.js.map +0 -1
  269. package/cli/dist/components/SetupScreen.d.ts +0 -16
  270. package/cli/dist/components/SetupScreen.d.ts.map +0 -1
  271. package/cli/dist/components/SetupScreen.js +0 -67
  272. package/cli/dist/components/SetupScreen.js.map +0 -1
  273. package/cli/dist/components/SingleLoadingScreen.d.ts +0 -5
  274. package/cli/dist/components/SingleLoadingScreen.js +0 -27
  275. package/cli/dist/components/StatusBadge.d.ts +0 -10
  276. package/cli/dist/components/StatusBadge.d.ts.map +0 -1
  277. package/cli/dist/components/StatusBadge.js +0 -24
  278. package/cli/dist/components/StatusBadge.js.map +0 -1
  279. package/cli/dist/components/TerminalWindow.d.ts +0 -9
  280. package/cli/dist/components/TerminalWindow.d.ts.map +0 -1
  281. package/cli/dist/components/TerminalWindow.js +0 -19
  282. package/cli/dist/components/TerminalWindow.js.map +0 -1
  283. package/cli/dist/components/WelcomeScreen.d.ts +0 -12
  284. package/cli/dist/components/WelcomeScreen.d.ts.map +0 -1
  285. package/cli/dist/components/WelcomeScreen.js +0 -47
  286. package/cli/dist/components/WelcomeScreen.js.map +0 -1
  287. package/cli/dist/context/AppContext.d.ts +0 -68
  288. package/cli/dist/context/AppContext.js +0 -363
  289. package/cli/dist/headless-runner.d.ts +0 -17
  290. package/cli/dist/headless-runner.d.ts.map +0 -1
  291. package/cli/dist/headless-runner.js +0 -128
  292. package/cli/dist/headless-runner.js.map +0 -1
  293. package/cli/dist/hooks/useInitializeAgent.d.ts +0 -19
  294. package/cli/dist/hooks/useInitializeAgent.d.ts.map +0 -1
  295. package/cli/dist/hooks/useInitializeAgent.js +0 -29
  296. package/cli/dist/hooks/useInitializeAgent.js.map +0 -1
  297. package/cli/dist/hooks/useStableState.d.ts +0 -38
  298. package/cli/dist/hooks/useStableState.d.ts.map +0 -1
  299. package/cli/dist/hooks/useStableState.js +0 -69
  300. package/cli/dist/hooks/useStableState.js.map +0 -1
  301. package/cli/dist/managers/AgentManager.d.ts +0 -58
  302. package/cli/dist/managers/AgentManager.d.ts.map +0 -1
  303. package/cli/dist/managers/AgentManager.js +0 -121
  304. package/cli/dist/managers/AgentManager.js.map +0 -1
  305. package/cli/dist/managers/ConfigManager.d.ts +0 -54
  306. package/cli/dist/managers/ConfigManager.d.ts.map +0 -1
  307. package/cli/dist/managers/ConfigManager.js +0 -188
  308. package/cli/dist/managers/ConfigManager.js.map +0 -1
  309. package/cli/dist/types.d.ts +0 -52
  310. package/cli/dist/types.d.ts.map +0 -1
  311. package/cli/dist/types.js +0 -34
  312. package/cli/dist/types.js.map +0 -1
package/cli/dist/cli.js DELETED
@@ -1,87 +0,0 @@
1
- #!/usr/bin/env node
2
- import React from 'react';
3
- import { render } from 'ink';
4
- import meow from 'meow';
5
- import App from './app';
6
- import { runHeadless } from './headless-runner';
7
- const cli = meow(`
8
- Usage
9
- $ conversational-agent
10
-
11
- Options
12
- --account-id Hedera account ID (e.g., 0.0.12345)
13
- --private-key Private key for the account
14
- --network Network to connect to (mainnet or testnet) [default: testnet]
15
- --openai-api-key OpenAI API key for the LLM
16
- --command Execute a single command in headless mode
17
-
18
- Examples
19
- $ conversational-agent
20
- Interactive mode - will prompt for configuration
21
-
22
- $ conversational-agent --account-id=0.0.12345 --private-key=... --openai-api-key=sk-...
23
- Start with provided configuration
24
-
25
- $ export HEDERA_ACCOUNT_ID=0.0.12345
26
- $ export HEDERA_PRIVATE_KEY=...
27
- $ export OPENAI_API_KEY=sk-...
28
- $ conversational-agent
29
- Uses environment variables for Hedera credentials
30
- `, {
31
- importMeta: import.meta,
32
- flags: {
33
- accountId: {
34
- type: 'string',
35
- default: process.env['HEDERA_ACCOUNT_ID'] || '',
36
- },
37
- privateKey: {
38
- type: 'string',
39
- default: process.env['HEDERA_PRIVATE_KEY'] || '',
40
- },
41
- network: {
42
- type: 'string',
43
- default: process.env['HEDERA_NETWORK'] || 'testnet',
44
- choices: ['testnet', 'mainnet'],
45
- },
46
- openaiApiKey: {
47
- type: 'string',
48
- default: process.env['OPENAI_API_KEY'] || '',
49
- },
50
- command: {
51
- type: 'string',
52
- default: '',
53
- },
54
- },
55
- });
56
- const commandInput = (cli.flags.command || cli.input.join(' ')).trim();
57
- const shouldRunHeadless = commandInput.length > 0 || !process.stdin.isTTY;
58
- const parseNetwork = (value) => value === 'mainnet' ? 'mainnet' : 'testnet';
59
- const selectedNetwork = parseNetwork(cli.flags.network);
60
- if (shouldRunHeadless) {
61
- (async () => {
62
- try {
63
- const result = await runHeadless({
64
- accountId: cli.flags.accountId,
65
- privateKey: cli.flags.privateKey,
66
- network: selectedNetwork,
67
- openAIApiKey: cli.flags.openaiApiKey,
68
- command: commandInput,
69
- });
70
- if (result.stdout) {
71
- const output = result.stdout.endsWith('\n') ? result.stdout : `${result.stdout}\n`;
72
- process.stdout.write(output);
73
- }
74
- process.exit(result.exitCode);
75
- }
76
- catch (error) {
77
- const message = error instanceof Error ? error.message : String(error);
78
- process.stderr.write(`${message}\n`);
79
- process.exit(1);
80
- }
81
- })();
82
- }
83
- else {
84
- const { waitUntilExit } = render(React.createElement(App, { accountId: cli.flags.accountId, privateKey: cli.flags.privateKey, network: selectedNetwork, openAIApiKey: cli.flags.openaiApiKey }));
85
- waitUntilExit().then(() => process.exit(0));
86
- }
87
- //# sourceMappingURL=cli.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,KAAK,CAAC;AAC3B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CA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C;IAEF,aAAa,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC"}
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { type Config } from '../types.js';
3
- import { type AppState } from '../hooks/useStableState.js';
4
- interface Props {
5
- state: AppState;
6
- currentConfig: Config;
7
- actions: any;
8
- stableHandlers: any;
9
- exit: () => void;
10
- }
11
- /**
12
- * App container that keeps all screens mounted but only displays one
13
- * This prevents unmounting/remounting which causes double renders
14
- */
15
- export declare const AppContainer: React.FC<Props>;
16
- export {};
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import { Box } from 'ink';
3
- import { WelcomeScreen } from './WelcomeScreen.js';
4
- import { ChatScreen } from './ChatScreen.js';
5
- import { LoadingScreen } from './LoadingScreen.js';
6
- import { SetupScreen } from './SetupScreen.js';
7
- import { MCPConfigScreen } from './MCPConfigScreen.js';
8
- /**
9
- * App container that keeps all screens mounted but only displays one
10
- * This prevents unmounting/remounting which causes double renders
11
- */
12
- export const AppContainer = ({ state, currentConfig, actions, stableHandlers, exit, }) => {
13
- return (React.createElement(React.Fragment, null,
14
- React.createElement(Box, { display: state.screen === 'welcome' ? 'flex' : 'none' },
15
- React.createElement(WelcomeScreen, { config: currentConfig, onExit: exit, onInitializeAgent: stableHandlers.initializeAgent, onSetScreen: actions.setScreen })),
16
- React.createElement(Box, { display: state.screen === 'loading' ? 'flex' : 'none' },
17
- React.createElement(LoadingScreen, null)),
18
- React.createElement(Box, { display: state.screen === 'setup' ? 'flex' : 'none' },
19
- React.createElement(SetupScreen, { config: currentConfig, currentField: state.currentField, error: state.error, onUpdateConfig: stableHandlers.updateConfig, onSetCurrentField: actions.setCurrentField, onInitializeAgent: stableHandlers.initializeAgent })),
20
- React.createElement(Box, { display: state.screen === 'mcp-config' ? 'flex' : 'none' },
21
- React.createElement(MCPConfigScreen, { mcpConfig: state.mcpConfig, editingFilesystemPath: state.editingFilesystemPath, onSetMcpConfig: actions.setMcpConfig, onSetEditingFilesystemPath: actions.setEditingFilesystemPath, onSetScreen: actions.setScreen, onSaveMCPConfig: stableHandlers.saveMCPConfig, getMCPConfigPath: stableHandlers.getMCPConfigPath })),
22
- React.createElement(Box, { display: state.screen === 'chat' ? 'flex' : 'none' },
23
- React.createElement(ChatScreen, { config: currentConfig, messages: state.messages, input: state.input, isLoading: state.isLoading, setInput: actions.setInput, sendMessage: stableHandlers.sendMessage, showLogs: false, logs: state.logs }))));
24
- };
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const AppScreens: React.FC;
@@ -1,259 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { Box, Text, useApp, useInput } from 'ink';
3
- import TextInput from 'ink-text-input';
4
- import SelectInput from 'ink-select-input';
5
- import { WelcomeScreen } from './WelcomeScreen.js';
6
- import { ChatScreen } from './ChatScreen.js';
7
- import { LoadingScreen } from './LoadingScreen.js';
8
- import { TerminalWindow } from './TerminalWindow.js';
9
- import { StatusBadge } from './StatusBadge.js';
10
- import { BRAND_COLORS } from '../types.js';
11
- import { useAppContext } from '../context/AppContext.js';
12
- import { saveMCPConfig, getMCPConfigPath } from '../context/AppContext.js';
13
- import { MCPServers } from '@hashgraphonline/conversational-agent';
14
- export const AppScreens = () => {
15
- const { state, actions } = useAppContext();
16
- const { exit } = useApp();
17
- const [showLogs] = useState(false);
18
- const fields = ['accountId', 'privateKey', 'network', 'openAIApiKey'];
19
- useInput((_, key) => {
20
- if (state.screen === 'mcp-config' && key.escape) {
21
- if (state.mcpConfig.addingCustom) {
22
- actions.setMcpConfig({
23
- addingCustom: false,
24
- newServerName: '',
25
- newServerCommand: '',
26
- newServerArgs: '',
27
- newServerEnv: '',
28
- currentField: 0,
29
- });
30
- }
31
- else if (state.editingFilesystemPath) {
32
- actions.setEditingFilesystemPath(false);
33
- }
34
- }
35
- });
36
- if (state.screen === 'loading') {
37
- return React.createElement(LoadingScreen, null);
38
- }
39
- if (state.screen === 'setup') {
40
- return (React.createElement(TerminalWindow, { title: "Configuration" },
41
- React.createElement(Box, { flexDirection: "column" },
42
- React.createElement(Box, { marginBottom: 1 },
43
- React.createElement(StatusBadge, { status: "info" }),
44
- React.createElement(Text, null, "Configure your Hedera account credentials")),
45
- fields.map((field, index) => (React.createElement(Box, { key: field, marginY: 1 },
46
- React.createElement(Box, { width: 20 },
47
- React.createElement(Text, { color: state.currentField === index
48
- ? BRAND_COLORS.blue
49
- : BRAND_COLORS.hedera.smoke },
50
- field === 'accountId' && 'Account ID:',
51
- field === 'privateKey' && 'Private Key:',
52
- field === 'network' && 'Network:',
53
- field === 'openAIApiKey' && 'OpenAI Key:')),
54
- state.currentField === index ? (field === 'network' ? (React.createElement(SelectInput, { items: [
55
- { label: 'Testnet', value: 'testnet' },
56
- { label: 'Mainnet', value: 'mainnet' },
57
- ], initialIndex: state.config.network === 'testnet' ? 0 : 1, onSelect: item => {
58
- actions.updateConfigField('network', item.value);
59
- if (state.currentField < fields.length - 1) {
60
- actions.setCurrentField(state.currentField + 1);
61
- }
62
- } })) : (React.createElement(TextInput, { value: state.config[field], onChange: value => actions.updateConfigField(field, value), onSubmit: () => {
63
- if (state.currentField < fields.length - 1) {
64
- actions.setCurrentField(state.currentField + 1);
65
- }
66
- else {
67
- actions.initializeAgent();
68
- }
69
- }, mask: field === 'privateKey' || field === 'openAIApiKey'
70
- ? '*'
71
- : undefined }))) : (React.createElement(Text, { color: BRAND_COLORS.hedera.smoke }, field === 'network'
72
- ? state.config[field]
73
- : state.config[field]
74
- ? '••••••••'
75
- : '(not set)'))))),
76
- state.error && (React.createElement(Box, { marginTop: 2 },
77
- React.createElement(StatusBadge, { status: "error" }),
78
- React.createElement(Text, { color: "red" }, state.error))),
79
- React.createElement(Box, { marginTop: 2 },
80
- React.createElement(Text, { dimColor: true }, "Press Tab to navigate fields, Enter to submit"),
81
- React.createElement(Text, { dimColor: true }, "Complete all fields and press Enter on the last field to save and start")))));
82
- }
83
- if (state.screen === 'mcp-config') {
84
- if (state.editingFilesystemPath) {
85
- return (React.createElement(TerminalWindow, { title: "Edit Filesystem Path" },
86
- React.createElement(Box, { flexDirection: "column" },
87
- React.createElement(Box, { marginBottom: 2 },
88
- React.createElement(Text, null, "Enter the directory path for the filesystem server:")),
89
- React.createElement(TextInput, { value: state.mcpConfig.filesystemPath, onChange: value => actions.setMcpConfig({ filesystemPath: value }), onSubmit: () => {
90
- actions.setEditingFilesystemPath(false);
91
- const servers = [];
92
- if (state.mcpConfig.enableFilesystem) {
93
- servers.push(MCPServers.filesystem(state.mcpConfig.filesystemPath));
94
- }
95
- servers.push(...state.mcpConfig.customServers);
96
- saveMCPConfig(servers);
97
- }, placeholder: process.cwd() }),
98
- React.createElement(Box, { marginTop: 2 },
99
- React.createElement(Text, { dimColor: true }, "Press Enter to save, Escape to cancel")))));
100
- }
101
- if (state.mcpConfig.addingCustom) {
102
- const customFields = [
103
- 'newServerName',
104
- 'newServerCommand',
105
- 'newServerArgs',
106
- 'newServerEnv',
107
- ];
108
- const fieldLabels = [
109
- 'Server Name:',
110
- 'Command:',
111
- 'Arguments (comma-separated):',
112
- 'Environment Variables (KEY=value, comma-separated):',
113
- ];
114
- const placeholders = [
115
- 'my-server',
116
- 'npx',
117
- '-y, @modelcontextprotocol/server-github',
118
- 'MCP_LOG_LEVEL=info, GIT_SIGN_COMMITS=false',
119
- ];
120
- return (React.createElement(TerminalWindow, { title: "Add Custom MCP Server" },
121
- React.createElement(Box, { flexDirection: "column" },
122
- customFields.map((field, index) => (React.createElement(Box, { key: field, marginY: 1 },
123
- React.createElement(Text, { color: state.mcpConfig.currentField === index
124
- ? BRAND_COLORS.blue
125
- : BRAND_COLORS.hedera.smoke }, fieldLabels[index]),
126
- state.mcpConfig.currentField === index ? (React.createElement(TextInput, { value: state.mcpConfig[field], onChange: value => actions.setMcpConfig({ [field]: value }), onSubmit: () => {
127
- if (index < customFields.length - 1) {
128
- actions.setMcpConfig({ currentField: index + 1 });
129
- }
130
- else if (state.mcpConfig.newServerName &&
131
- state.mcpConfig.newServerCommand) {
132
- const env = {};
133
- if (state.mcpConfig.newServerEnv) {
134
- state.mcpConfig.newServerEnv.split(',').forEach(envVar => {
135
- const [key, value] = envVar.trim().split('=');
136
- if (key && value) {
137
- env[key] = value;
138
- }
139
- });
140
- }
141
- const newServer = {
142
- name: state.mcpConfig.newServerName,
143
- command: state.mcpConfig.newServerCommand,
144
- args: state.mcpConfig.newServerArgs
145
- .split(',')
146
- .map(arg => arg.trim())
147
- .filter(Boolean),
148
- transport: 'stdio',
149
- autoConnect: true,
150
- ...(Object.keys(env).length > 0 && { env }),
151
- };
152
- const newCustomServers = [...state.mcpConfig.customServers, newServer];
153
- actions.setMcpConfig({
154
- customServers: newCustomServers,
155
- addingCustom: false,
156
- newServerName: '',
157
- newServerCommand: '',
158
- newServerArgs: '',
159
- newServerEnv: '',
160
- currentField: 0,
161
- });
162
- const servers = [];
163
- if (state.mcpConfig.enableFilesystem) {
164
- servers.push(MCPServers.filesystem(state.mcpConfig.filesystemPath));
165
- }
166
- servers.push(...newCustomServers);
167
- saveMCPConfig(servers);
168
- }
169
- }, placeholder: placeholders[index] })) : (React.createElement(Text, { color: BRAND_COLORS.hedera.smoke }, state.mcpConfig[field] ||
170
- `(${placeholders[index]})`))))),
171
- React.createElement(Box, { marginTop: 2 },
172
- React.createElement(Text, { dimColor: true }, "Press Tab or Enter to move between fields"),
173
- React.createElement(Text, { dimColor: true }, "Press Enter on the last field to add the server"),
174
- React.createElement(Text, { dimColor: true }, "Press Escape to cancel")))));
175
- }
176
- const menuItems = [
177
- {
178
- label: `Filesystem Server: ${state.mcpConfig.enableFilesystem ? 'Enabled' : 'Disabled'}`,
179
- value: 'filesystem',
180
- },
181
- ];
182
- if (state.mcpConfig.enableFilesystem) {
183
- menuItems.push({
184
- label: `Filesystem Path: ${state.mcpConfig.filesystemPath}`,
185
- value: 'filesystem-path',
186
- });
187
- }
188
- state.mcpConfig.customServers.forEach((server, index) => {
189
- menuItems.push({
190
- label: `${server.name} (${server.command})`,
191
- value: `custom-${index}`,
192
- });
193
- });
194
- menuItems.push({ label: 'Add Custom Server', value: 'add-custom' }, { label: 'Done (changes auto-saved)', value: 'save' }, { label: 'Back to Menu', value: 'back' });
195
- return (React.createElement(TerminalWindow, { title: "MCP Server Configuration" },
196
- React.createElement(Box, { flexDirection: "column" },
197
- React.createElement(Box, { marginBottom: 2 },
198
- React.createElement(StatusBadge, { status: "info" }),
199
- React.createElement(Text, null, "Configure Model Context Protocol servers")),
200
- React.createElement(SelectInput, { items: menuItems, onSelect: item => {
201
- if (item.value === 'filesystem') {
202
- const enableFilesystem = !state.mcpConfig.enableFilesystem;
203
- actions.setMcpConfig({ enableFilesystem });
204
- const servers = [];
205
- if (enableFilesystem) {
206
- servers.push(MCPServers.filesystem(state.mcpConfig.filesystemPath));
207
- }
208
- servers.push(...state.mcpConfig.customServers);
209
- saveMCPConfig(servers);
210
- }
211
- else if (item.value === 'filesystem-path') {
212
- actions.setEditingFilesystemPath(true);
213
- }
214
- else if (item.value === 'add-custom') {
215
- actions.setMcpConfig({ addingCustom: true });
216
- }
217
- else if (item.value === 'save') {
218
- const servers = [];
219
- if (state.mcpConfig.enableFilesystem) {
220
- servers.push(MCPServers.filesystem(state.mcpConfig.filesystemPath));
221
- }
222
- servers.push(...state.mcpConfig.customServers);
223
- saveMCPConfig(servers);
224
- const updatedConfig = {
225
- ...state.config,
226
- mcpServers: servers,
227
- };
228
- actions.setConfig(updatedConfig);
229
- actions.setScreen('welcome');
230
- }
231
- else if (item.value === 'back') {
232
- actions.setScreen('welcome');
233
- }
234
- else if (item.value.startsWith('custom-')) {
235
- const index = parseInt(item.value.replace('custom-', ''));
236
- const newCustomServers = state.mcpConfig.customServers.filter((_, i) => i !== index);
237
- actions.setMcpConfig({ customServers: newCustomServers });
238
- const servers = [];
239
- if (state.mcpConfig.enableFilesystem) {
240
- servers.push(MCPServers.filesystem(state.mcpConfig.filesystemPath));
241
- }
242
- servers.push(...newCustomServers);
243
- saveMCPConfig(servers);
244
- }
245
- } }),
246
- React.createElement(Box, { marginY: 2 },
247
- React.createElement(Text, { dimColor: true }, "Press Enter to toggle/edit servers, or select actions"),
248
- state.mcpConfig.enableFilesystem && (React.createElement(Text, { dimColor: true },
249
- "Filesystem path: ",
250
- state.mcpConfig.filesystemPath)),
251
- React.createElement(Text, { dimColor: true },
252
- "Config saved to: ",
253
- getMCPConfigPath())))));
254
- }
255
- if (state.screen === 'chat') {
256
- return (React.createElement(ChatScreen, { config: state.config, messages: state.messages, input: state.input, isLoading: state.isLoading, setInput: actions.setInput, sendMessage: actions.sendMessage, showLogs: showLogs, logs: state.logs }));
257
- }
258
- return (React.createElement(WelcomeScreen, { config: state.config, onExit: exit, onInitializeAgent: actions.initializeAgent, onSetScreen: actions.setScreen, isLoading: state.isLoading, agent: state.agent }));
259
- };
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import { type Config, type Message } from '../types';
3
- /**
4
- * Props for the ChatScreen component
5
- */
6
- interface ChatScreenProps {
7
- config: Config;
8
- messages: Message[];
9
- input: string;
10
- isLoading: boolean;
11
- setInput: (value: string) => void;
12
- sendMessage: (message: string) => void;
13
- showLogs: boolean;
14
- logs: string[];
15
- }
16
- /**
17
- * Chat screen component
18
- */
19
- export declare const ChatScreen: React.FC<ChatScreenProps>;
20
- export {};
21
- //# sourceMappingURL=ChatScreen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatScreen.d.ts","sourceRoot":"","sources":["../../src/components/ChatScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAe,KAAK,MAAM,EAAE,KAAK,OAAO,EAAC,MAAM,UAAU,CAAC;AAEjE;;GAEG;AACH,UAAU,eAAe;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,EAAE,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAsHhD,CAAC"}
@@ -1,40 +0,0 @@
1
- import React from 'react';
2
- import { Box, Text } from 'ink';
3
- import TextInput from 'ink-text-input';
4
- import Spinner from 'ink-spinner';
5
- import { TerminalWindow } from './TerminalWindow';
6
- import { StatusBadge } from './StatusBadge';
7
- import { BRAND_COLORS } from '../types';
8
- /**
9
- * Chat screen component
10
- */
11
- export const ChatScreen = React.memo(({ config, messages, input, isLoading, setInput, sendMessage, showLogs, logs, }) => {
12
- return (React.createElement(TerminalWindow, { title: `Conversational Agent Chat (${config.network})` },
13
- React.createElement(Box, { flexDirection: "column", minHeight: 25 },
14
- showLogs && (React.createElement(Box, { borderStyle: "single", borderColor: BRAND_COLORS.dark, marginBottom: 1, padding: 1, height: 10, flexDirection: "column", overflow: "hidden" },
15
- React.createElement(Box, { marginBottom: 1 },
16
- React.createElement(Text, { color: BRAND_COLORS.hedera.smoke, bold: true }, "\uD83D\uDCCB Logs")),
17
- React.createElement(Box, { flexDirection: "column", overflow: "hidden" }, logs.slice(-8).map((log, i) => (React.createElement(Text, { key: i, color: BRAND_COLORS.comments, dimColor: true, wrap: "truncate" }, log)))))),
18
- React.createElement(Box, { flexDirection: "column", flexGrow: 1, marginBottom: 1, overflow: "hidden" }, messages.slice(-15).map((msg, index) => (React.createElement(Box, { key: `${msg.timestamp.getTime()}-${index}`, marginBottom: 1 },
19
- msg.role === 'user' && (React.createElement(Box, { flexDirection: "column" },
20
- React.createElement(Box, null,
21
- React.createElement(Text, { color: BRAND_COLORS.green }, "$ "),
22
- React.createElement(Text, { wrap: "wrap" }, msg.content)))),
23
- msg.role === 'assistant' && (React.createElement(Box, { flexDirection: "column" },
24
- React.createElement(Box, null,
25
- React.createElement(Text, { color: BRAND_COLORS.blue }, "\u2192 "),
26
- React.createElement(Text, { wrap: "wrap" }, msg.content)))),
27
- msg.role === 'system' && (React.createElement(Box, { flexDirection: "column" },
28
- React.createElement(Box, null,
29
- React.createElement(StatusBadge, { status: "info" }),
30
- React.createElement(Text, { color: BRAND_COLORS.hedera.smoke, wrap: "wrap" }, msg.content)))))))),
31
- React.createElement(Box, { borderStyle: "single", borderTop: true, borderColor: BRAND_COLORS.dark, paddingTop: 1, paddingX: 1 }, isLoading ? (React.createElement(Box, null,
32
- React.createElement(Spinner, { type: "dots" }),
33
- React.createElement(Text, { color: BRAND_COLORS.hedera.smoke }, " Processing..."))) : (React.createElement(Box, { flexDirection: "row", width: "100%" },
34
- React.createElement(Text, { color: BRAND_COLORS.green }, "$ "),
35
- React.createElement(Box, { flexGrow: 1 },
36
- React.createElement(TextInput, { value: input, onChange: setInput, onSubmit: sendMessage, placeholder: "Type your message..." }))))),
37
- React.createElement(Box, { marginTop: 1, paddingX: 1 },
38
- React.createElement(Text, { dimColor: true }, "Ctrl+C to exit, ESC to return to menu, L to toggle logs")))));
39
- });
40
- //# sourceMappingURL=ChatScreen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatScreen.js","sourceRoot":"","sources":["../../src/components/ChatScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,GAAG,EAAE,IAAI,EAAC,MAAM,KAAK,CAAC;AAC9B,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,YAAY,EAA4B,MAAM,UAAU,CAAC;AA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gBACvB,oBAAC,IAAI,IAAC,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,qBAAuB,CACxD,CACN,CAAC,CAAC,CAAC,CACH,oBAAC,GAAG,IAAC,aAAa,EAAC,KAAK,EAAC,KAAK,EAAC,MAAM;gBACpC,oBAAC,IAAI,IAAC,KAAK,EAAE,YAAY,CAAC,KAAK,SAAW;gBAC1C,oBAAC,GAAG,IAAC,QAAQ,EAAE,CAAC;oBACf,oBAAC,SAAS,IACT,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,WAAW,EACrB,WAAW,EAAC,sBAAsB,GACjC,CACG,CACD,CACN,CACI;YACN,oBAAC,GAAG,IAAC,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC;gBAC7B,oBAAC,IAAI,IAAC,QAAQ,oEAEP,CACF,CACD,CACU,CACjB,CAAC;AACH,CAAC,CACD,CAAC"}
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * Debug loading screen to trace double rendering issue
4
- */
5
- export declare const DebugLoadingScreen: React.FC;
@@ -1,31 +0,0 @@
1
- import React, { useEffect, useRef } from 'react';
2
- import { Box, Text } from 'ink';
3
- import Spinner from 'ink-spinner';
4
- import { BRAND_COLORS } from '../types.js';
5
- let globalRenderCount = 0;
6
- let globalInstanceCount = 0;
7
- /**
8
- * Debug loading screen to trace double rendering issue
9
- */
10
- export const DebugLoadingScreen = () => {
11
- const instanceId = useRef(++globalInstanceCount);
12
- const renderCount = useRef(0);
13
- const mountTime = useRef(Date.now());
14
- renderCount.current++;
15
- globalRenderCount++;
16
- console.error(`[LOADING-${instanceId.current}] Render #${renderCount.current} (Global: ${globalRenderCount}) at ${Date.now() - mountTime.current}ms`);
17
- useEffect(() => {
18
- console.error(`[LOADING-${instanceId.current}] MOUNTED`);
19
- console.error(new Error('Mount Stack Trace').stack);
20
- return () => {
21
- console.error(`[LOADING-${instanceId.current}] UNMOUNTED after ${renderCount.current} renders`);
22
- };
23
- }, []);
24
- return (React.createElement(Box, { flexDirection: "column", alignItems: "center", paddingY: 4 },
25
- React.createElement(Box, { marginBottom: 2 },
26
- React.createElement(Text, { color: BRAND_COLORS.blue }, "Initializing "),
27
- React.createElement(Text, { color: BRAND_COLORS.purple }, "Hashgraph "),
28
- React.createElement(Text, { color: BRAND_COLORS.green }, "Online "),
29
- React.createElement(Text, { color: BRAND_COLORS.blue }, "Agent...")),
30
- React.createElement(Spinner, { type: "dots" })));
31
- };
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const LoadingScreen: React.FC;
3
- //# sourceMappingURL=LoadingScreen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LoadingScreen.d.ts","sourceRoot":"","sources":["../../src/components/LoadingScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAiBjC,CAAC"}
@@ -1,17 +0,0 @@
1
- import React, { useEffect } from 'react';
2
- import { Box, Text, useStdout } from 'ink';
3
- import Spinner from 'ink-spinner';
4
- import { BRAND_COLORS } from '../types';
5
- export const LoadingScreen = () => {
6
- const { write } = useStdout();
7
- useEffect(() => {
8
- write('\x1Bc');
9
- }, [write]);
10
- return (React.createElement(Box, { flexDirection: "column", alignItems: "center", paddingY: 4 },
11
- React.createElement(Box, { marginBottom: 2 },
12
- React.createElement(Text, { color: BRAND_COLORS.blue }, "Initializing "),
13
- React.createElement(Text, { color: BRAND_COLORS.purple }, "Conversational "),
14
- React.createElement(Text, { color: BRAND_COLORS.green }, "Agent...")),
15
- React.createElement(Spinner, { type: "dots" })));
16
- };
17
- //# sourceMappingURL=LoadingScreen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LoadingScreen.js","sourceRoot":"","sources":["../../src/components/LoadingScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACvC,OAAO,EAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAC,MAAM,KAAK,CAAC;AACzC,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AAEtC,MAAM,CAAC,MAAM,aAAa,GAAa,GAAG,EAAE;IAC3C,MAAM,EAAC,KAAK,EAAC,GAAG,SAAS,EAAE,CAAC;IAE5B,SAAS,CAAC,GAAG,EAAE;QACd,KAAK,CAAC,OAAO,CAAC,CAAC;IAChB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,CACN,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,UAAU,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC;QAC1D,oBAAC,GAAG,IAAC,YAAY,EAAE,CAAC;YACnB,oBAAC,IAAI,IAAC,KAAK,EAAE,YAAY,CAAC,IAAI,oBAAsB;YACpD,oBAAC,IAAI,IAAC,KAAK,EAAE,YAAY,CAAC,MAAM,sBAAwB;YACxD,oBAAC,IAAI,IAAC,KAAK,EAAE,YAAY,CAAC,KAAK,eAAiB,CAC3C;QACN,oBAAC,OAAO,IAAC,IAAI,EAAC,MAAM,GAAG,CAClB,CACN,CAAC;AACH,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * Loading screen component with debug logging
4
- */
5
- export declare const LoadingScreenDebug: React.FC;
@@ -1,27 +0,0 @@
1
- import React, { useEffect } from 'react';
2
- import { Box, Text, Static } from 'ink';
3
- import Spinner from 'ink-spinner';
4
- import { BRAND_COLORS } from '../types.js';
5
- let renderCount = 0;
6
- /**
7
- * Loading screen component with debug logging
8
- */
9
- export const LoadingScreenDebug = () => {
10
- renderCount++;
11
- useEffect(() => {
12
- console.error(`[LOADING] Mounted - render #${renderCount}`);
13
- return () => {
14
- console.error(`[LOADING] Unmounted - after ${renderCount} renders`);
15
- };
16
- }, []);
17
- useEffect(() => {
18
- console.error(`[LOADING] Render #${renderCount}`);
19
- });
20
- return (React.createElement(Box, { flexDirection: "column", alignItems: "center", paddingY: 4 },
21
- React.createElement(Static, { items: [{ id: '1' }] }, () => (React.createElement(Box, { marginBottom: 2 },
22
- React.createElement(Text, { color: BRAND_COLORS.blue }, "Initializing "),
23
- React.createElement(Text, { color: BRAND_COLORS.purple }, "Hashgraph "),
24
- React.createElement(Text, { color: BRAND_COLORS.green }, "Online "),
25
- React.createElement(Text, { color: BRAND_COLORS.blue }, "Agent...")))),
26
- React.createElement(Spinner, { type: "dots" })));
27
- };
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- import { type Screen, type MCPServerConfig } from '../types';
3
- interface MCPConfig {
4
- enableFilesystem: boolean;
5
- filesystemPath: string;
6
- customServers: MCPServerConfig[];
7
- addingCustom: boolean;
8
- newServerName: string;
9
- newServerCommand: string;
10
- newServerArgs: string;
11
- newServerEnv: string;
12
- currentField: number;
13
- }
14
- interface Props {
15
- mcpConfig: MCPConfig;
16
- editingFilesystemPath: boolean;
17
- onSetMcpConfig: (config: Partial<MCPConfig>) => void;
18
- onSetEditingFilesystemPath: (editing: boolean) => void;
19
- onSetScreen: (screen: Screen) => void;
20
- onSaveMCPConfig: () => void;
21
- getMCPConfigPath: () => string;
22
- }
23
- /**
24
- * MCP Configuration screen
25
- */
26
- export declare const MCPConfigScreen: React.FC<Props>;
27
- export {};
28
- //# sourceMappingURL=MCPConfigScreen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MCPConfigScreen.d.ts","sourceRoot":"","sources":["../../src/components/MCPConfigScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAEL,KAAK,MAAM,EACX,KAAK,eAAe,EAErB,MAAM,UAAU,CAAC;AAElB,UAAU,SAAS;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,eAAe,EAAE,CAAC;IACjC,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAuCD,UAAU,KAAK;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,cAAc,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;IACrD,0BAA0B,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACvD,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,gBAAgB,EAAE,MAAM,MAAM,CAAC;CAChC;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAsO3C,CAAC"}