@hashgraphonline/conversational-agent 0.1.217 → 0.1.218

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 (286) hide show
  1. package/cli/readme.md +181 -0
  2. package/dist/cjs/constants/entity-references.d.ts +18 -0
  3. package/dist/cjs/constants/form-priorities.d.ts +24 -0
  4. package/dist/cjs/constants/index.d.ts +4 -0
  5. package/dist/cjs/constants/messages.d.ts +19 -0
  6. package/dist/cjs/constants/test-constants.d.ts +42 -0
  7. package/dist/cjs/conversational-agent.d.ts +3 -8
  8. package/dist/cjs/core/{ToolRegistry.d.ts → tool-registry.d.ts} +10 -7
  9. package/dist/{types/execution/ExecutionPipeline.d.ts → cjs/execution/execution-pipeline.d.ts} +3 -3
  10. package/dist/cjs/forms/field-guidance-registry.d.ts +108 -0
  11. package/dist/cjs/forms/form-generator.d.ts +2 -7
  12. package/dist/cjs/forms/index.d.ts +3 -0
  13. package/dist/cjs/forms/types.d.ts +9 -1
  14. package/dist/cjs/index.cjs +1 -1
  15. package/dist/cjs/index.cjs.map +1 -1
  16. package/dist/cjs/index.d.ts +7 -12
  17. package/dist/cjs/langchain/external-tool-wrapper.d.ts +101 -0
  18. package/dist/{types/langchain/FormAwareAgentExecutor.d.ts → cjs/langchain/form-aware-agent-executor.d.ts} +19 -12
  19. package/dist/cjs/langchain/index.d.ts +2 -0
  20. package/dist/{types → cjs/langchain}/langchain-agent.d.ts +15 -7
  21. package/dist/cjs/mcp/adapters/index.d.ts +1 -0
  22. package/dist/cjs/mcp/adapters/langchain.d.ts +1 -1
  23. package/dist/{types/mcp/ContentProcessor.d.ts → cjs/mcp/content-processor.d.ts} +1 -1
  24. package/dist/cjs/mcp/index.d.ts +5 -0
  25. package/dist/{types/mcp/MCPClientManager.d.ts → cjs/mcp/mcp-client-manager.d.ts} +1 -1
  26. package/dist/cjs/memory/{ContentStorage.d.ts → content-storage.d.ts} +4 -4
  27. package/dist/cjs/memory/index.d.ts +5 -7
  28. package/dist/{types/memory/MemoryWindow.d.ts → cjs/memory/memory-window.d.ts} +1 -1
  29. package/dist/{types/memory/SmartMemoryManager.d.ts → cjs/memory/smart-memory-manager.d.ts} +1 -1
  30. package/dist/cjs/services/{ContentStoreManager.d.ts → content-store-manager.d.ts} +6 -6
  31. package/dist/cjs/services/context/resolution-context.d.ts +49 -0
  32. package/dist/cjs/services/entity-resolver.d.ts +58 -0
  33. package/dist/cjs/services/formatters/converters/index.d.ts +2 -0
  34. package/dist/cjs/services/formatters/converters/string-normalization-converter.d.ts +13 -0
  35. package/dist/cjs/services/formatters/converters/topic-id-to-hrl-converter.d.ts +17 -0
  36. package/dist/cjs/services/formatters/format-converter-registry.d.ts +66 -0
  37. package/dist/cjs/services/formatters/index.d.ts +3 -0
  38. package/dist/cjs/services/formatters/types.d.ts +29 -0
  39. package/dist/cjs/services/index.d.ts +3 -0
  40. package/dist/cjs/services/resolution/resolution-pipeline.d.ts +44 -0
  41. package/dist/cjs/tools/index.d.ts +1 -0
  42. package/dist/cjs/utils/index.d.ts +1 -0
  43. package/dist/esm/index.js +40 -16
  44. package/dist/esm/index.js.map +1 -1
  45. package/dist/esm/index10.js +669 -13
  46. package/dist/esm/index10.js.map +1 -1
  47. package/dist/esm/index11.js +310 -95
  48. package/dist/esm/index11.js.map +1 -1
  49. package/dist/esm/index12.js +130 -95
  50. package/dist/esm/index12.js.map +1 -1
  51. package/dist/esm/index13.js +262 -153
  52. package/dist/esm/index13.js.map +1 -1
  53. package/dist/esm/index14.js +100 -664
  54. package/dist/esm/index14.js.map +1 -1
  55. package/dist/esm/index15.js +135 -408
  56. package/dist/esm/index15.js.map +1 -1
  57. package/dist/esm/index16.js +240 -122
  58. package/dist/esm/index16.js.map +1 -1
  59. package/dist/esm/index17.js +147 -135
  60. package/dist/esm/index17.js.map +1 -1
  61. package/dist/esm/index18.js +376 -533
  62. package/dist/esm/index18.js.map +1 -1
  63. package/dist/esm/index19.js +87 -214
  64. package/dist/esm/index19.js.map +1 -1
  65. package/dist/esm/index2.js +21 -4
  66. package/dist/esm/index2.js.map +1 -1
  67. package/dist/esm/index20.js +158 -92
  68. package/dist/esm/index20.js.map +1 -1
  69. package/dist/esm/index21.js +717 -44
  70. package/dist/esm/index21.js.map +1 -1
  71. package/dist/esm/index22.js +58 -96
  72. package/dist/esm/index22.js.map +1 -1
  73. package/dist/esm/index23.js +324 -34
  74. package/dist/esm/index23.js.map +1 -1
  75. package/dist/esm/index24.js +125 -712
  76. package/dist/esm/index24.js.map +1 -1
  77. package/dist/esm/index25.js +113 -133
  78. package/dist/esm/index25.js.map +1 -1
  79. package/dist/esm/index26.js +18 -152
  80. package/dist/esm/index26.js.map +1 -1
  81. package/dist/esm/index27.js +14 -210
  82. package/dist/esm/index27.js.map +1 -1
  83. package/dist/esm/index28.js +70 -173
  84. package/dist/esm/index28.js.map +1 -1
  85. package/dist/esm/index29.js +811 -224
  86. package/dist/esm/index29.js.map +1 -1
  87. package/dist/esm/index30.js +1245 -122
  88. package/dist/esm/index30.js.map +1 -1
  89. package/dist/esm/index31.js +126 -56
  90. package/dist/esm/index31.js.map +1 -1
  91. package/dist/esm/index32.js +111 -24
  92. package/dist/esm/index32.js.map +1 -1
  93. package/dist/esm/index33.js +41 -87
  94. package/dist/esm/index33.js.map +1 -1
  95. package/dist/esm/index34.js +88 -227
  96. package/dist/esm/index34.js.map +1 -1
  97. package/dist/esm/index35.js +24 -0
  98. package/dist/esm/index35.js.map +1 -0
  99. package/dist/esm/index36.js +15 -0
  100. package/dist/esm/index36.js.map +1 -0
  101. package/dist/esm/index37.js +10 -0
  102. package/dist/esm/index37.js.map +1 -0
  103. package/dist/esm/index38.js +8 -0
  104. package/dist/esm/index38.js.map +1 -0
  105. package/dist/esm/index39.js +227 -0
  106. package/dist/esm/index39.js.map +1 -0
  107. package/dist/esm/index40.js +187 -0
  108. package/dist/esm/index40.js.map +1 -0
  109. package/dist/esm/index41.js +30 -0
  110. package/dist/esm/index41.js.map +1 -0
  111. package/dist/esm/index42.js +95 -0
  112. package/dist/esm/index42.js.map +1 -0
  113. package/dist/esm/index5.js +2 -2
  114. package/dist/esm/index5.js.map +1 -1
  115. package/dist/esm/index6.js +44 -67
  116. package/dist/esm/index6.js.map +1 -1
  117. package/dist/esm/index7.js +9 -0
  118. package/dist/esm/index7.js.map +1 -1
  119. package/dist/esm/index8.js +13 -1095
  120. package/dist/esm/index8.js.map +1 -1
  121. package/dist/esm/index9.js +17 -13
  122. package/dist/esm/index9.js.map +1 -1
  123. package/dist/types/constants/entity-references.d.ts +18 -0
  124. package/dist/types/constants/form-priorities.d.ts +24 -0
  125. package/dist/types/constants/index.d.ts +4 -0
  126. package/dist/types/constants/messages.d.ts +19 -0
  127. package/dist/types/constants/test-constants.d.ts +42 -0
  128. package/dist/types/conversational-agent.d.ts +3 -8
  129. package/dist/types/core/{ToolRegistry.d.ts → tool-registry.d.ts} +10 -7
  130. package/dist/{cjs/execution/ExecutionPipeline.d.ts → types/execution/execution-pipeline.d.ts} +3 -3
  131. package/dist/types/forms/field-guidance-registry.d.ts +108 -0
  132. package/dist/types/forms/form-generator.d.ts +2 -7
  133. package/dist/types/forms/index.d.ts +3 -0
  134. package/dist/types/forms/types.d.ts +9 -1
  135. package/dist/types/index.d.ts +7 -12
  136. package/dist/types/langchain/external-tool-wrapper.d.ts +101 -0
  137. package/dist/{cjs/langchain/FormAwareAgentExecutor.d.ts → types/langchain/form-aware-agent-executor.d.ts} +19 -12
  138. package/dist/types/langchain/index.d.ts +2 -0
  139. package/dist/{cjs → types/langchain}/langchain-agent.d.ts +15 -7
  140. package/dist/types/mcp/adapters/index.d.ts +1 -0
  141. package/dist/types/mcp/adapters/langchain.d.ts +1 -1
  142. package/dist/{cjs/mcp/ContentProcessor.d.ts → types/mcp/content-processor.d.ts} +1 -1
  143. package/dist/types/mcp/index.d.ts +5 -0
  144. package/dist/{cjs/mcp/MCPClientManager.d.ts → types/mcp/mcp-client-manager.d.ts} +1 -1
  145. package/dist/types/memory/{ContentStorage.d.ts → content-storage.d.ts} +4 -4
  146. package/dist/types/memory/index.d.ts +5 -7
  147. package/dist/{cjs/memory/MemoryWindow.d.ts → types/memory/memory-window.d.ts} +1 -1
  148. package/dist/{cjs/memory/SmartMemoryManager.d.ts → types/memory/smart-memory-manager.d.ts} +1 -1
  149. package/dist/types/services/{ContentStoreManager.d.ts → content-store-manager.d.ts} +6 -6
  150. package/dist/types/services/context/resolution-context.d.ts +49 -0
  151. package/dist/types/services/entity-resolver.d.ts +58 -0
  152. package/dist/types/services/formatters/converters/index.d.ts +2 -0
  153. package/dist/types/services/formatters/converters/string-normalization-converter.d.ts +13 -0
  154. package/dist/types/services/formatters/converters/topic-id-to-hrl-converter.d.ts +17 -0
  155. package/dist/types/services/formatters/format-converter-registry.d.ts +66 -0
  156. package/dist/types/services/formatters/index.d.ts +3 -0
  157. package/dist/types/services/formatters/types.d.ts +29 -0
  158. package/dist/types/services/index.d.ts +3 -0
  159. package/dist/types/services/resolution/resolution-pipeline.d.ts +44 -0
  160. package/dist/types/tools/index.d.ts +1 -0
  161. package/dist/types/utils/index.d.ts +1 -0
  162. package/package.json +30 -27
  163. package/src/agent-factory.ts +1 -1
  164. package/src/base-agent.ts +9 -0
  165. package/src/config/system-message.ts +2 -15
  166. package/src/constants/entity-references.ts +23 -0
  167. package/src/constants/form-priorities.ts +25 -0
  168. package/src/constants/index.ts +4 -0
  169. package/src/constants/messages.ts +20 -0
  170. package/src/constants/test-constants.ts +49 -0
  171. package/src/conversational-agent.ts +42 -69
  172. package/src/core/{ToolRegistry.ts → tool-registry.ts} +70 -44
  173. package/src/examples/external-tool-wrapper-example.ts +56 -0
  174. package/src/execution/{ExecutionPipeline.ts → execution-pipeline.ts} +3 -3
  175. package/src/forms/field-guidance-registry.ts +415 -0
  176. package/src/forms/field-type-registry.ts +49 -48
  177. package/src/forms/{FormEngine.ts → form-engine.ts} +66 -43
  178. package/src/forms/form-generator.ts +91 -17
  179. package/src/forms/index.ts +4 -1
  180. package/src/forms/types.ts +9 -1
  181. package/src/index.ts +7 -37
  182. package/src/langchain/external-tool-wrapper.ts +90 -0
  183. package/src/langchain/{FormAwareAgentExecutor.ts → form-aware-agent-executor.ts} +579 -351
  184. package/src/langchain/index.ts +2 -0
  185. package/src/{langchain-agent.ts → langchain/langchain-agent.ts} +389 -113
  186. package/src/mcp/adapters/index.ts +1 -0
  187. package/src/mcp/adapters/langchain.ts +27 -18
  188. package/src/mcp/{ContentProcessor.ts → content-processor.ts} +71 -47
  189. package/src/mcp/index.ts +5 -0
  190. package/src/mcp/{MCPClientManager.ts → mcp-client-manager.ts} +2 -2
  191. package/src/memory/{ContentStorage.ts → content-storage.ts} +263 -167
  192. package/src/memory/index.ts +5 -8
  193. package/src/memory/{MemoryWindow.ts → memory-window.ts} +47 -24
  194. package/src/memory/{SmartMemoryManager.ts → smart-memory-manager.ts} +49 -22
  195. package/src/plugins/hbar/HbarPlugin.ts +1 -1
  196. package/src/plugins/hcs-10/HCS10Plugin.ts +46 -28
  197. package/src/scripts/test-external-tool-wrapper.ts +6 -6
  198. package/src/scripts/test-inscribe-form-generation.ts +22 -21
  199. package/src/scripts/test-inscribe-wrapper-verification.ts +5 -4
  200. package/src/services/{ContentStoreManager.ts → content-store-manager.ts} +75 -33
  201. package/src/services/context/resolution-context.ts +80 -0
  202. package/src/services/entity-resolver.ts +425 -0
  203. package/src/services/formatters/converters/index.ts +2 -0
  204. package/src/services/formatters/converters/string-normalization-converter.ts +106 -0
  205. package/src/services/formatters/converters/topic-id-to-hrl-converter.ts +25 -0
  206. package/src/services/formatters/format-converter-registry.ts +229 -0
  207. package/src/services/formatters/index.ts +3 -0
  208. package/src/services/formatters/types.ts +31 -0
  209. package/src/services/index.ts +3 -0
  210. package/src/services/resolution/resolution-pipeline.ts +106 -0
  211. package/src/tools/index.ts +1 -0
  212. package/src/types/content-reference.ts +87 -60
  213. package/src/utils/index.ts +1 -0
  214. package/cli/dist/CLIApp.d.ts +0 -9
  215. package/cli/dist/CLIApp.js +0 -127
  216. package/cli/dist/LocalConversationalAgent.d.ts +0 -37
  217. package/cli/dist/LocalConversationalAgent.js +0 -58
  218. package/cli/dist/app.d.ts +0 -16
  219. package/cli/dist/app.js +0 -13
  220. package/cli/dist/cli.d.ts +0 -2
  221. package/cli/dist/cli.js +0 -51
  222. package/cli/dist/components/AppContainer.d.ts +0 -16
  223. package/cli/dist/components/AppContainer.js +0 -24
  224. package/cli/dist/components/AppScreens.d.ts +0 -2
  225. package/cli/dist/components/AppScreens.js +0 -259
  226. package/cli/dist/components/ChatScreen.d.ts +0 -15
  227. package/cli/dist/components/ChatScreen.js +0 -39
  228. package/cli/dist/components/DebugLoadingScreen.d.ts +0 -5
  229. package/cli/dist/components/DebugLoadingScreen.js +0 -31
  230. package/cli/dist/components/LoadingScreen.d.ts +0 -2
  231. package/cli/dist/components/LoadingScreen.js +0 -16
  232. package/cli/dist/components/LoadingScreenDebug.d.ts +0 -5
  233. package/cli/dist/components/LoadingScreenDebug.js +0 -27
  234. package/cli/dist/components/MCPConfigScreen.d.ts +0 -28
  235. package/cli/dist/components/MCPConfigScreen.js +0 -168
  236. package/cli/dist/components/ScreenRouter.d.ts +0 -12
  237. package/cli/dist/components/ScreenRouter.js +0 -22
  238. package/cli/dist/components/SetupScreen.d.ts +0 -15
  239. package/cli/dist/components/SetupScreen.js +0 -65
  240. package/cli/dist/components/SingleLoadingScreen.d.ts +0 -5
  241. package/cli/dist/components/SingleLoadingScreen.js +0 -27
  242. package/cli/dist/components/StatusBadge.d.ts +0 -7
  243. package/cli/dist/components/StatusBadge.js +0 -28
  244. package/cli/dist/components/TerminalWindow.d.ts +0 -8
  245. package/cli/dist/components/TerminalWindow.js +0 -24
  246. package/cli/dist/components/WelcomeScreen.d.ts +0 -11
  247. package/cli/dist/components/WelcomeScreen.js +0 -47
  248. package/cli/dist/context/AppContext.d.ts +0 -68
  249. package/cli/dist/context/AppContext.js +0 -363
  250. package/cli/dist/hooks/useInitializeAgent.d.ts +0 -19
  251. package/cli/dist/hooks/useInitializeAgent.js +0 -28
  252. package/cli/dist/hooks/useStableState.d.ts +0 -38
  253. package/cli/dist/hooks/useStableState.js +0 -68
  254. package/cli/dist/managers/AgentManager.d.ts +0 -57
  255. package/cli/dist/managers/AgentManager.js +0 -119
  256. package/cli/dist/managers/ConfigManager.d.ts +0 -53
  257. package/cli/dist/managers/ConfigManager.js +0 -173
  258. package/cli/dist/types.d.ts +0 -31
  259. package/cli/dist/types.js +0 -19
  260. package/dist/cjs/context/ReferenceContextManager.d.ts +0 -84
  261. package/dist/cjs/context/ReferenceResponseProcessor.d.ts +0 -76
  262. package/dist/cjs/langchain/FormValidatingToolWrapper.d.ts +0 -81
  263. package/dist/cjs/services/EntityResolver.d.ts +0 -26
  264. package/dist/types/context/ReferenceContextManager.d.ts +0 -84
  265. package/dist/types/context/ReferenceResponseProcessor.d.ts +0 -76
  266. package/dist/types/langchain/FormValidatingToolWrapper.d.ts +0 -81
  267. package/dist/types/services/EntityResolver.d.ts +0 -26
  268. package/src/context/ReferenceContextManager.ts +0 -350
  269. package/src/context/ReferenceResponseProcessor.ts +0 -295
  270. package/src/langchain/FormValidatingToolWrapper.ts +0 -355
  271. package/src/scripts/test-hedera-kit-wrapper.ts +0 -265
  272. package/src/services/EntityResolver.ts +0 -128
  273. /package/dist/cjs/forms/{FormEngine.d.ts → form-engine.d.ts} +0 -0
  274. /package/dist/cjs/memory/{ReferenceIdGenerator.d.ts → reference-id-generator.d.ts} +0 -0
  275. /package/dist/cjs/memory/{TokenCounter.d.ts → token-counter.d.ts} +0 -0
  276. /package/dist/cjs/tools/{EntityResolverTool.d.ts → entity-resolver-tool.d.ts} +0 -0
  277. /package/dist/cjs/utils/{ResponseFormatter.d.ts → response-formatter.d.ts} +0 -0
  278. /package/dist/types/forms/{FormEngine.d.ts → form-engine.d.ts} +0 -0
  279. /package/dist/types/memory/{ReferenceIdGenerator.d.ts → reference-id-generator.d.ts} +0 -0
  280. /package/dist/types/memory/{TokenCounter.d.ts → token-counter.d.ts} +0 -0
  281. /package/dist/types/tools/{EntityResolverTool.d.ts → entity-resolver-tool.d.ts} +0 -0
  282. /package/dist/types/utils/{ResponseFormatter.d.ts → response-formatter.d.ts} +0 -0
  283. /package/src/memory/{ReferenceIdGenerator.ts → reference-id-generator.ts} +0 -0
  284. /package/src/memory/{TokenCounter.ts → token-counter.ts} +0 -0
  285. /package/src/tools/{EntityResolverTool.ts → entity-resolver-tool.ts} +0 -0
  286. /package/src/utils/{ResponseFormatter.ts → response-formatter.ts} +0 -0
package/cli/readme.md ADDED
@@ -0,0 +1,181 @@
1
+ # Hedera Conversational Agent CLI
2
+
3
+ A beautiful command-line interface for the Hedera Conversational Agent, built with [Ink](https://github.com/vadimdemedes/ink) and styled following Hashgraph Online design patterns.
4
+
5
+ ## Features
6
+
7
+ - 🎨 **Beautiful Terminal UI** - Styled with HCS improvement proposals design patterns
8
+ - 💬 **Interactive Chat** - Chat with your Hedera agent in a clean terminal interface
9
+ - 🔐 **Secure Configuration** - Masked input for sensitive credentials
10
+ - 🌈 **Gradient Text & Colors** - Brand-consistent color scheme
11
+ - 🚀 **Fast & Responsive** - Built with React for smooth interactions
12
+ - 📊 **Transaction Details** - See transaction IDs and network responses
13
+ - 🎯 **HCS-10 Support** - Full support for agent connections and messaging
14
+ - 🔧 **MCP Integration** - Configure Model Context Protocol servers for extended capabilities
15
+ - 📁 **File Operations** - Built-in filesystem MCP server for file management
16
+ - ⚙️ **Custom MCP Servers** - Add your own MCP servers for specialized tools
17
+
18
+ ## Installation
19
+
20
+ For local development, the CLI uses the actual ConversationalAgent from the parent package:
21
+
22
+ ```bash
23
+ # 1. Build the parent package first
24
+ cd /path/to/conversational-agent
25
+ pnpm install
26
+ pnpm build
27
+
28
+ # 2. The CLI will be built automatically via postinstall hook
29
+ # Or build manually:
30
+ cd cli
31
+ pnpm install
32
+ pnpm build
33
+ ```
34
+
35
+ ## Usage
36
+
37
+ ### Interactive Mode (Recommended)
38
+
39
+ ```bash
40
+ # From the parent conversational-agent directory
41
+ pnpm cli
42
+
43
+ # This automatically builds if needed and runs the CLI
44
+ ```
45
+
46
+ ### With Command Line Arguments
47
+
48
+ ```bash
49
+ conversational-agent \
50
+ --account-id=0.0.12345 \
51
+ --private-key=your-private-key \
52
+ --network=testnet \
53
+ --openai-api-key=sk-...
54
+ ```
55
+
56
+ ### Using Environment Variables
57
+
58
+ The CLI automatically loads configuration from `.env` in the conversational-agent root:
59
+
60
+ ```bash
61
+ # .env file in conversational-agent directory
62
+ HEDERA_ACCOUNT_ID=0.0.12345
63
+ HEDERA_PRIVATE_KEY=your-private-key
64
+ HEDERA_NETWORK=testnet
65
+ OPENAI_API_KEY=sk-...
66
+ MCP_SERVERS=[{"name":"filesystem","command":"npx","args":["-y","@modelcontextprotocol/server-filesystem","/tmp"]}]
67
+ ```
68
+
69
+ Then simply run: `pnpm cli`
70
+
71
+ ## Interface Overview
72
+
73
+ ### Welcome Screen
74
+ - Beautiful ASCII art logo with gradient colors
75
+ - Simple menu navigation with arrow keys
76
+ - Options: Start Chat, Configure, MCP Servers, Exit
77
+
78
+ ### Configuration Screen
79
+ - Terminal-style window with macOS-like controls
80
+ - Secure input masking for sensitive data
81
+ - Tab navigation between fields
82
+ - Real-time validation
83
+
84
+ ### MCP Servers Screen
85
+ - Configure Model Context Protocol servers
86
+ - Enable/disable filesystem server with custom path
87
+ - Add custom MCP servers with command and arguments
88
+ - Live preview of available tools
89
+ - Save configuration to environment
90
+
91
+ ### Chat Interface
92
+ - Clean terminal aesthetic with prompt symbols
93
+ - Color-coded messages (user, assistant, system)
94
+ - Loading indicators with spinners
95
+ - Transaction ID display
96
+ - MCP server status and available tools
97
+ - Escape key to return to menu
98
+
99
+ ## Design Features
100
+
101
+ The CLI follows Hashgraph Online's design system:
102
+
103
+ - **Brand Colors**: Primary blue (#5599fe), Green (#48df7b), Purple (#b56cff)
104
+ - **Hedera Colors**: Purple (#8259ef), Blue (#2d84eb), Green (#3ec878)
105
+ - **Terminal Window**: Rounded borders with window control dots
106
+ - **Status Badges**: Color-coded status indicators
107
+ - **Typography**: Monospace throughout with clear hierarchy
108
+
109
+ ## Keyboard Shortcuts
110
+
111
+ - `↑/↓` - Navigate menus
112
+ - `Enter` - Select/Submit
113
+ - `Tab` - Next field (in configuration)
114
+ - `Escape` - Return to main menu (from chat)
115
+ - `Ctrl+C` - Exit application
116
+
117
+ ## Development
118
+
119
+ ```bash
120
+ # Watch mode for development
121
+ pnpm dev
122
+
123
+ # Run tests
124
+ pnpm test
125
+
126
+ # Build for production
127
+ pnpm build
128
+ ```
129
+
130
+ ## Examples
131
+
132
+ ### Basic Chat Interaction
133
+
134
+ ```
135
+ $ Find all AI agents on the network
136
+ → I'll search for AI agents registered on the Hedera network...
137
+
138
+ [INFO] Found 5 agents with AI capabilities
139
+ → Here are the AI agents I found:
140
+ 1. Agent: 0.0.12345 - "GPT Assistant"
141
+ 2. Agent: 0.0.23456 - "Code Helper"
142
+ ...
143
+
144
+ $ Connect to agent 0.0.12345
145
+ → Initiating connection to agent 0.0.12345...
146
+ [INFO] Transaction ID: 0.0.98765@1234567890.123
147
+ → Successfully connected! You can now send messages to this agent.
148
+ ```
149
+
150
+ ### MCP File Operations
151
+
152
+ With filesystem MCP server enabled:
153
+
154
+ ```
155
+ $ Create a new file called notes.txt with my meeting notes
156
+ → I'll create a notes.txt file for you with meeting notes...
157
+
158
+ [INFO] MCP servers enabled: filesystem
159
+ → I've created notes.txt in your configured directory with the meeting notes.
160
+
161
+ $ List all files in the current directory
162
+ → Here are the files in /tmp:
163
+ - notes.txt (created just now)
164
+ - data.json
165
+ - config.yaml
166
+ ```
167
+
168
+ ### Custom MCP Server
169
+
170
+ ```
171
+ $ Add GitHub repository operations
172
+ → I can help you interact with GitHub repositories...
173
+
174
+ [INFO] MCP servers enabled: filesystem, github
175
+ → I now have access to GitHub operations. I can help you create issues,
176
+ manage repositories, and work with pull requests.
177
+ ```
178
+
179
+ ## License
180
+
181
+ Apache-2.0
@@ -0,0 +1,18 @@
1
+ import { EntityFormat } from '../services/formatters/types';
2
+ /**
3
+ * Common entity reference patterns used across the application
4
+ */
5
+ export declare const ENTITY_PATTERNS: {
6
+ readonly TOPIC_REFERENCE: "the topic";
7
+ readonly TOKEN_REFERENCE: "the token";
8
+ readonly ACCOUNT_REFERENCE: "the account";
9
+ readonly TRANSACTION_REFERENCE: "the transaction";
10
+ readonly CONTRACT_REFERENCE: "the contract";
11
+ };
12
+ export declare const ENTITY_TYPES: {
13
+ readonly TOPIC: EntityFormat.TOPIC_ID;
14
+ readonly TOKEN: EntityFormat.TOKEN_ID;
15
+ readonly ACCOUNT: EntityFormat.ACCOUNT_ID;
16
+ readonly TRANSACTION: "transaction";
17
+ readonly CONTRACT: EntityFormat.CONTRACT_ID;
18
+ };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Form field priorities for progressive disclosure
3
+ */
4
+ export declare const FIELD_PRIORITIES: {
5
+ readonly ESSENTIAL: "essential";
6
+ readonly COMMON: "common";
7
+ readonly ADVANCED: "advanced";
8
+ readonly EXPERT: "expert";
9
+ };
10
+ /**
11
+ * Form field types
12
+ */
13
+ export declare const FORM_FIELD_TYPES: {
14
+ readonly TEXT: "text";
15
+ readonly NUMBER: "number";
16
+ readonly SELECT: "select";
17
+ readonly CHECKBOX: "checkbox";
18
+ readonly TEXTAREA: "textarea";
19
+ readonly FILE: "file";
20
+ readonly ARRAY: "array";
21
+ readonly OBJECT: "object";
22
+ readonly CURRENCY: "currency";
23
+ readonly PERCENTAGE: "percentage";
24
+ };
@@ -0,0 +1,4 @@
1
+ export { ERROR_MESSAGES, STATUS_MESSAGES } from './messages';
2
+ export { ENTITY_PATTERNS, ENTITY_TYPES } from './entity-references';
3
+ export { FIELD_PRIORITIES, FORM_FIELD_TYPES } from './form-priorities';
4
+ export { TEST_ACCOUNT_IDS, TEST_NETWORK_CONFIGS, TEST_MESSAGES, TEST_TOOL_NAMES, TEST_KEYS, TEST_ERRORS, MOCK_FORM_DATA } from './test-constants';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Common error messages and user feedback strings
3
+ */
4
+ export declare const ERROR_MESSAGES: {
5
+ readonly TOO_MANY_REQUESTS: "Too many requests. Please wait a moment and try again.";
6
+ readonly RATE_LIMITED: "I'm receiving too many requests right now. Please wait a moment and try again.";
7
+ readonly SYSTEM_ERROR: "System error occurred";
8
+ readonly INVALID_INPUT: "Invalid input provided";
9
+ readonly NETWORK_ERROR: "Network error occurred";
10
+ };
11
+ /**
12
+ * Common success and status messages
13
+ */
14
+ export declare const STATUS_MESSAGES: {
15
+ readonly OPERATION_SUCCESSFUL: "Operation completed successfully";
16
+ readonly PROCESSING: "Processing your request...";
17
+ readonly READY: "Ready to process requests";
18
+ readonly INITIALIZING: "Initializing...";
19
+ };
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Common test constants to reduce string duplication in test files
3
+ */
4
+ export declare const TEST_ACCOUNT_IDS: {
5
+ readonly OPERATOR: "0.0.12345";
6
+ readonly TARGET: "0.0.67890";
7
+ readonly SENDER: "0.0.800";
8
+ readonly RECEIVER: "0.0.801";
9
+ };
10
+ export declare const TEST_NETWORK_CONFIGS: {
11
+ readonly TESTNET: "testnet";
12
+ readonly MAINNET: "mainnet";
13
+ readonly PREVIEWNET: "previewnet";
14
+ };
15
+ export declare const TEST_MESSAGES: {
16
+ readonly SIMPLE_QUERY: "test message";
17
+ readonly AGENT_NOT_INITIALIZED: "Agent not initialized. Call boot() first.";
18
+ readonly PROCESSING_ERROR: "Error processing message";
19
+ readonly TEST_RESPONSE: "Test response";
20
+ };
21
+ export declare const TEST_TOOL_NAMES: {
22
+ readonly MOCK_TOOL: "mock-tool";
23
+ readonly HEDERA_GET_ACCOUNT: "hedera_get_account_info";
24
+ readonly HEDERA_TRANSFER: "hedera-account-transfer-hbar";
25
+ readonly INSCRIBE_HASHINAL: "inscribeHashinal";
26
+ };
27
+ export declare const TEST_KEYS: {
28
+ readonly OPENAI_API_KEY: "test-openai-key";
29
+ readonly PRIVATE_KEY: "mock-private-key";
30
+ readonly OPERATOR_KEY: "test-operator-key";
31
+ };
32
+ export declare const TEST_ERRORS: {
33
+ readonly INITIALIZATION_ERROR: "Initialization error";
34
+ readonly NETWORK_ERROR: "Network error";
35
+ readonly VALIDATION_ERROR: "Validation error";
36
+ };
37
+ export declare const MOCK_FORM_DATA: {
38
+ readonly FORM_ID: "mock-form-id";
39
+ readonly TOOL_NAME: "mock-tool";
40
+ readonly FIELD_NAME: "test-field";
41
+ readonly FIELD_TYPE: "text";
42
+ };
@@ -8,7 +8,7 @@ import { InscribePlugin } from './plugins/inscribe/InscribePlugin';
8
8
  import { HbarPlugin } from './plugins/hbar/HbarPlugin';
9
9
  import { IStateManager } from '@hashgraphonline/standards-agent-kit';
10
10
  import { MCPServerConfig, MCPConnectionStatus } from './mcp/types';
11
- import { ContentStoreManager } from './services/ContentStoreManager';
11
+ import { ContentStoreManager } from './services/content-store-manager';
12
12
  import { SmartMemoryManager, SmartMemoryConfig } from './memory';
13
13
  import { FormSubmission } from './forms/types';
14
14
 
@@ -17,7 +17,7 @@ export type ToolDescriptor = {
17
17
  namespace?: string;
18
18
  };
19
19
  export type ChatHistoryItem = {
20
- type: 'human' | 'ai';
20
+ type: 'human' | 'ai' | 'system';
21
21
  content: string;
22
22
  };
23
23
  export type AgentInstance = ReturnType<typeof createAgent>;
@@ -60,6 +60,7 @@ export interface ConversationalAgentOptions {
60
60
  * @returns A new instance of the ConversationalAgent class.
61
61
  */
62
62
  export declare class ConversationalAgent {
63
+ private static readonly NOT_INITIALIZED_ERROR;
63
64
  protected agent?: AgentInstance;
64
65
  hcs10Plugin: HCS10Plugin;
65
66
  hcs2Plugin: HCS2Plugin;
@@ -192,12 +193,6 @@ export declare class ConversationalAgent {
192
193
  * Create a ConversationalAgent with MCP servers configured
193
194
  */
194
195
  static withMCP(options: ConversationalAgentOptions, mcpServers: MCPServerConfig[]): ConversationalAgent;
195
- /**
196
- * Resolve entity references using LLM-based resolver
197
- * @param content - Message content to resolve
198
- * @returns Resolved message content with entity IDs replaced
199
- */
200
- private resolveEntitiesInMessage;
201
196
  /**
202
197
  * Extract and store entities from agent responses
203
198
  * @param response - Agent response containing potential entity information
@@ -1,7 +1,5 @@
1
1
  import { StructuredTool } from '@langchain/core/tools';
2
- import { z } from 'zod';
3
2
  import { Logger } from '@hashgraphonline/standards-sdk';
4
- import { FormValidatingToolWrapper } from '../langchain/FormValidatingToolWrapper';
5
3
 
6
4
  /**
7
5
  * Tool capabilities configuration for registry entries
@@ -12,6 +10,15 @@ export interface ToolCapabilities {
12
10
  priority: 'low' | 'medium' | 'high' | 'critical';
13
11
  category: 'core' | 'extension' | 'mcp';
14
12
  }
13
+ /**
14
+ * Entity resolution format preferences for tools
15
+ */
16
+ export interface EntityResolutionPreferences {
17
+ inscription?: 'hrl' | 'topicId' | 'metadata' | 'any';
18
+ token?: 'tokenId' | 'address' | 'symbol' | 'any';
19
+ nft?: 'serialNumber' | 'metadata' | 'hrl' | 'any';
20
+ account?: 'accountId' | 'alias' | 'evmAddress' | 'any';
21
+ }
15
22
  /**
16
23
  * Tool metadata for comprehensive tool information
17
24
  */
@@ -23,6 +30,7 @@ export interface ToolMetadata {
23
30
  capabilities: ToolCapabilities;
24
31
  dependencies: string[];
25
32
  schema: unknown;
33
+ entityResolutionPreferences?: EntityResolutionPreferences;
26
34
  }
27
35
  /**
28
36
  * Registry entry containing tool instance and metadata
@@ -30,7 +38,6 @@ export interface ToolMetadata {
30
38
  export interface ToolRegistryEntry {
31
39
  tool: StructuredTool;
32
40
  metadata: ToolMetadata;
33
- wrapper?: FormValidatingToolWrapper<z.ZodObject<z.ZodRawShape>> | undefined;
34
41
  originalTool: StructuredTool;
35
42
  }
36
43
  /**
@@ -109,10 +116,6 @@ export declare class ToolRegistry {
109
116
  * Check if tool has render configuration
110
117
  */
111
118
  private hasRenderConfig;
112
- /**
113
- * Determine if tool should be wrapped
114
- */
115
- private shouldWrapTool;
116
119
  /**
117
120
  * Check if schema is ZodObject-like
118
121
  */
@@ -1,7 +1,7 @@
1
1
  import { Logger } from '@hashgraphonline/standards-sdk';
2
- import { SmartMemoryManager } from '../memory/SmartMemoryManager';
3
- import { FormEngine, ToolExecutionResult } from '../forms/FormEngine';
4
- import { ToolRegistry, ToolRegistryEntry } from '../core/ToolRegistry';
2
+ import { SmartMemoryManager } from '../memory/smart-memory-manager';
3
+ import { FormEngine, ToolExecutionResult } from '../forms/form-engine';
4
+ import { ToolRegistry, ToolRegistryEntry } from '../core/tool-registry';
5
5
 
6
6
  /**
7
7
  * Session context for tool execution
@@ -0,0 +1,108 @@
1
+ import { FormFieldType, FieldOption } from './types';
2
+
3
+ /**
4
+ * Field guidance configuration for providing contextual help and suggestions
5
+ */
6
+ export interface FieldGuidance {
7
+ /**
8
+ * Suggestions to show as placeholder or examples
9
+ */
10
+ suggestions?: string[];
11
+ /**
12
+ * Predefined options for select fields
13
+ */
14
+ predefinedOptions?: FieldOption[];
15
+ /**
16
+ * Warning messages for specific patterns to avoid
17
+ */
18
+ warnings?: {
19
+ pattern: RegExp;
20
+ message: string;
21
+ }[];
22
+ /**
23
+ * Validation rules specific to the field context
24
+ */
25
+ validationRules?: {
26
+ /**
27
+ * Patterns that should be rejected
28
+ */
29
+ rejectPatterns?: {
30
+ pattern: RegExp;
31
+ reason: string;
32
+ }[];
33
+ /**
34
+ * Minimum quality requirements
35
+ */
36
+ qualityChecks?: {
37
+ minNonTechnicalWords?: number;
38
+ requireSpecificTerms?: string[];
39
+ forbidTechnicalTerms?: string[];
40
+ };
41
+ };
42
+ /**
43
+ * Field type override for specific contexts
44
+ */
45
+ fieldTypeOverride?: FormFieldType;
46
+ /**
47
+ * Help text specific to the tool context
48
+ */
49
+ contextualHelpText?: string;
50
+ }
51
+ /**
52
+ * Tool-specific field configurations
53
+ */
54
+ export interface ToolFieldConfiguration {
55
+ /**
56
+ * Tool name or pattern to match
57
+ */
58
+ toolPattern: string | RegExp;
59
+ /**
60
+ * Field-specific guidance
61
+ */
62
+ fields: Record<string, FieldGuidance>;
63
+ /**
64
+ * Global guidance for all fields in this tool
65
+ */
66
+ globalGuidance?: {
67
+ /**
68
+ * General warnings to show
69
+ */
70
+ warnings?: string[];
71
+ /**
72
+ * Quality standards for this tool
73
+ */
74
+ qualityStandards?: string[];
75
+ };
76
+ }
77
+ /**
78
+ * Registry for field guidance configurations
79
+ */
80
+ declare class FieldGuidanceRegistry {
81
+ private configurations;
82
+ /**
83
+ * Register field guidance for a specific tool
84
+ */
85
+ registerToolConfiguration(config: ToolFieldConfiguration): void;
86
+ /**
87
+ * Get field guidance for a specific tool and field
88
+ */
89
+ getFieldGuidance(toolName: string, fieldName: string): FieldGuidance | null;
90
+ /**
91
+ * Get global guidance for a tool
92
+ */
93
+ getGlobalGuidance(toolName: string): ToolFieldConfiguration['globalGuidance'] | null;
94
+ /**
95
+ * Validate field value against guidance rules
96
+ */
97
+ validateFieldValue(toolName: string, fieldName: string, value: unknown): {
98
+ isValid: boolean;
99
+ warnings: string[];
100
+ errors: string[];
101
+ };
102
+ /**
103
+ * Clear all configurations (useful for testing)
104
+ */
105
+ clear(): void;
106
+ }
107
+ export declare const fieldGuidanceRegistry: FieldGuidanceRegistry;
108
+ export {};
@@ -112,12 +112,7 @@ export declare class FormGenerator {
112
112
  * @returns Object containing jsonSchema and uiSchema
113
113
  */
114
114
  generateJsonSchemaForm(zodSchema: z.ZodObject<z.ZodRawShape>, partialInput?: Record<string, unknown>, missingFields?: Set<string>): {
115
- jsonSchema: import('zod-to-json-schema').JsonSchema7Type & {
116
- $schema?: string | undefined;
117
- definitions?: {
118
- [key: string]: import('zod-to-json-schema').JsonSchema7Type;
119
- } | undefined;
120
- };
121
- uiSchema: Record<string, Record<string, unknown>>;
115
+ jsonSchema: Record<string, unknown>;
116
+ uiSchema: Record<string, unknown>;
122
117
  };
123
118
  }
@@ -1,2 +1,5 @@
1
1
  export * from './types';
2
2
  export * from './form-generator';
3
+ export * from './form-engine';
4
+ export * from './field-type-registry';
5
+ export * from './field-guidance-registry';
@@ -48,6 +48,13 @@ export interface FormField {
48
48
  options?: FieldOption[];
49
49
  renderConfig?: RenderConfigSchema;
50
50
  priority?: 'essential' | 'common' | 'advanced' | 'expert';
51
+ suggestions?: string[];
52
+ warnings?: string[];
53
+ contextualGuidance?: {
54
+ qualityStandards?: string[];
55
+ examples?: string[];
56
+ avoidPatterns?: string[];
57
+ };
51
58
  }
52
59
  /**
53
60
  * Form field types supported by the UI
@@ -71,6 +78,7 @@ export interface FieldOption {
71
78
  value: string;
72
79
  label: string;
73
80
  description?: string;
81
+ disabled?: boolean;
74
82
  }
75
83
  /**
76
84
  * Validation error from Zod
@@ -92,7 +100,7 @@ export interface FormSubmission {
92
100
  originalPrompt?: string;
93
101
  partialInput?: Record<string, unknown>;
94
102
  chatHistory?: Array<{
95
- type: 'human' | 'ai';
103
+ type: 'human' | 'ai' | 'system';
96
104
  content: string;
97
105
  }>;
98
106
  };