@hashgraphonline/standards-agent-kit 0.0.37 → 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 (251) hide show
  1. package/dist/cjs/builders/hcs10/hcs10-builder.d.ts +262 -0
  2. package/dist/cjs/builders/index.d.ts +2 -0
  3. package/dist/cjs/builders/types.d.ts +10 -0
  4. package/dist/cjs/index.d.ts +3 -1
  5. package/dist/cjs/init/init.d.ts +21 -22
  6. package/dist/cjs/plugins/PluginInterface.d.ts +4 -80
  7. package/dist/cjs/plugins/PluginRegistry.d.ts +1 -47
  8. package/dist/cjs/plugins/defi/index.d.ts +7 -4
  9. package/dist/cjs/plugins/hedera/HbarPricePlugin.d.ts +7 -35
  10. package/dist/cjs/plugins/index.d.ts +0 -5
  11. package/dist/cjs/plugins/weather/index.d.ts +6 -5
  12. package/dist/cjs/standards-agent-kit.cjs +1 -1
  13. package/dist/cjs/standards-agent-kit.cjs.map +1 -1
  14. package/dist/cjs/state/state-types.d.ts +8 -8
  15. package/dist/cjs/tools/hcs10/AcceptConnectionRequestTool.d.ts +40 -0
  16. package/dist/cjs/tools/hcs10/CheckMessagesTool.d.ts +40 -0
  17. package/dist/cjs/tools/hcs10/ConnectionMonitorTool.d.ts +134 -0
  18. package/dist/cjs/tools/hcs10/FindRegistrationsTool.d.ts +34 -0
  19. package/dist/cjs/tools/hcs10/InitiateConnectionTool.d.ts +43 -0
  20. package/dist/cjs/tools/hcs10/ListConnectionsTool.d.ts +34 -0
  21. package/dist/cjs/tools/hcs10/ListUnapprovedConnectionRequestsTool.d.ts +15 -0
  22. package/dist/cjs/tools/hcs10/ManageConnectionRequestsTool.d.ts +34 -0
  23. package/dist/cjs/tools/hcs10/RegisterAgentTool.d.ts +218 -0
  24. package/dist/cjs/tools/hcs10/RetrieveProfileTool.d.ts +33 -0
  25. package/dist/cjs/tools/hcs10/SendMessageToConnectionTool.d.ts +40 -0
  26. package/dist/cjs/tools/hcs10/base-hcs10-tools.d.ts +28 -0
  27. package/dist/cjs/tools/hcs10/hcs10-tool-params.d.ts +18 -0
  28. package/dist/cjs/tools/hcs10/index.d.ts +13 -0
  29. package/dist/cjs/tools/index.d.ts +1 -13
  30. package/dist/es/builders/hcs10/hcs10-builder.d.ts +262 -0
  31. package/dist/es/builders/index.d.ts +2 -0
  32. package/dist/es/builders/types.d.ts +10 -0
  33. package/dist/es/index.d.ts +3 -1
  34. package/dist/es/init/init.d.ts +21 -22
  35. package/dist/es/plugins/PluginInterface.d.ts +4 -80
  36. package/dist/es/plugins/PluginRegistry.d.ts +1 -47
  37. package/dist/es/plugins/defi/index.d.ts +7 -4
  38. package/dist/es/plugins/hedera/HbarPricePlugin.d.ts +7 -35
  39. package/dist/es/plugins/index.d.ts +0 -5
  40. package/dist/es/plugins/weather/index.d.ts +6 -5
  41. package/dist/es/standards-agent-kit.es.js +10 -18
  42. package/dist/es/standards-agent-kit.es.js.map +1 -1
  43. package/dist/es/standards-agent-kit.es10.js +29 -76
  44. package/dist/es/standards-agent-kit.es10.js.map +1 -1
  45. package/dist/es/standards-agent-kit.es11.js +61 -384
  46. package/dist/es/standards-agent-kit.es11.js.map +1 -1
  47. package/dist/es/standards-agent-kit.es12.js +22 -190
  48. package/dist/es/standards-agent-kit.es12.js.map +1 -1
  49. package/dist/es/standards-agent-kit.es13.js +26 -138
  50. package/dist/es/standards-agent-kit.es13.js.map +1 -1
  51. package/dist/es/standards-agent-kit.es14.js +35 -59
  52. package/dist/es/standards-agent-kit.es14.js.map +1 -1
  53. package/dist/es/standards-agent-kit.es15.js +11 -117
  54. package/dist/es/standards-agent-kit.es15.js.map +1 -1
  55. package/dist/es/standards-agent-kit.es16.js +1 -1
  56. package/dist/es/standards-agent-kit.es16.js.map +1 -1
  57. package/dist/es/standards-agent-kit.es17.js +63 -46
  58. package/dist/es/standards-agent-kit.es17.js.map +1 -1
  59. package/dist/es/standards-agent-kit.es18.js +25 -74
  60. package/dist/es/standards-agent-kit.es18.js.map +1 -1
  61. package/dist/es/standards-agent-kit.es19.js +22 -13
  62. package/dist/es/standards-agent-kit.es19.js.map +1 -1
  63. package/dist/es/standards-agent-kit.es2.js +1381 -188
  64. package/dist/es/standards-agent-kit.es2.js.map +1 -1
  65. package/dist/es/standards-agent-kit.es20.js +3 -67
  66. package/dist/es/standards-agent-kit.es20.js.map +1 -1
  67. package/dist/es/standards-agent-kit.es3.js +285 -347
  68. package/dist/es/standards-agent-kit.es3.js.map +1 -1
  69. package/dist/es/standards-agent-kit.es4.js +22 -74
  70. package/dist/es/standards-agent-kit.es4.js.map +1 -1
  71. package/dist/es/standards-agent-kit.es5.js +127 -154
  72. package/dist/es/standards-agent-kit.es5.js.map +1 -1
  73. package/dist/es/standards-agent-kit.es6.js +21 -88
  74. package/dist/es/standards-agent-kit.es6.js.map +1 -1
  75. package/dist/es/standards-agent-kit.es7.js +28 -86
  76. package/dist/es/standards-agent-kit.es7.js.map +1 -1
  77. package/dist/es/standards-agent-kit.es8.js +27 -100
  78. package/dist/es/standards-agent-kit.es8.js.map +1 -1
  79. package/dist/es/standards-agent-kit.es9.js +35 -117
  80. package/dist/es/standards-agent-kit.es9.js.map +1 -1
  81. package/dist/es/state/state-types.d.ts +8 -8
  82. package/dist/es/tools/hcs10/AcceptConnectionRequestTool.d.ts +40 -0
  83. package/dist/es/tools/hcs10/CheckMessagesTool.d.ts +40 -0
  84. package/dist/es/tools/hcs10/ConnectionMonitorTool.d.ts +134 -0
  85. package/dist/es/tools/hcs10/FindRegistrationsTool.d.ts +34 -0
  86. package/dist/es/tools/hcs10/InitiateConnectionTool.d.ts +43 -0
  87. package/dist/es/tools/hcs10/ListConnectionsTool.d.ts +34 -0
  88. package/dist/es/tools/hcs10/ListUnapprovedConnectionRequestsTool.d.ts +15 -0
  89. package/dist/es/tools/hcs10/ManageConnectionRequestsTool.d.ts +34 -0
  90. package/dist/es/tools/hcs10/RegisterAgentTool.d.ts +218 -0
  91. package/dist/es/tools/hcs10/RetrieveProfileTool.d.ts +33 -0
  92. package/dist/es/tools/hcs10/SendMessageToConnectionTool.d.ts +40 -0
  93. package/dist/es/tools/hcs10/base-hcs10-tools.d.ts +28 -0
  94. package/dist/es/tools/hcs10/hcs10-tool-params.d.ts +18 -0
  95. package/dist/es/tools/hcs10/index.d.ts +13 -0
  96. package/dist/es/tools/index.d.ts +1 -13
  97. package/dist/umd/builders/hcs10/hcs10-builder.d.ts +262 -0
  98. package/dist/umd/builders/index.d.ts +2 -0
  99. package/dist/umd/builders/types.d.ts +10 -0
  100. package/dist/umd/index.d.ts +3 -1
  101. package/dist/umd/init/init.d.ts +21 -22
  102. package/dist/umd/plugins/PluginInterface.d.ts +4 -80
  103. package/dist/umd/plugins/PluginRegistry.d.ts +1 -47
  104. package/dist/umd/plugins/defi/index.d.ts +7 -4
  105. package/dist/umd/plugins/hedera/HbarPricePlugin.d.ts +7 -35
  106. package/dist/umd/plugins/index.d.ts +0 -5
  107. package/dist/umd/plugins/weather/index.d.ts +6 -5
  108. package/dist/umd/standards-agent-kit.umd.js +1 -164
  109. package/dist/umd/standards-agent-kit.umd.js.map +1 -1
  110. package/dist/umd/state/state-types.d.ts +8 -8
  111. package/dist/umd/tools/hcs10/AcceptConnectionRequestTool.d.ts +40 -0
  112. package/dist/umd/tools/hcs10/CheckMessagesTool.d.ts +40 -0
  113. package/dist/umd/tools/hcs10/ConnectionMonitorTool.d.ts +134 -0
  114. package/dist/umd/tools/hcs10/FindRegistrationsTool.d.ts +34 -0
  115. package/dist/umd/tools/hcs10/InitiateConnectionTool.d.ts +43 -0
  116. package/dist/umd/tools/hcs10/ListConnectionsTool.d.ts +34 -0
  117. package/dist/umd/tools/hcs10/ListUnapprovedConnectionRequestsTool.d.ts +15 -0
  118. package/dist/umd/tools/hcs10/ManageConnectionRequestsTool.d.ts +34 -0
  119. package/dist/umd/tools/hcs10/RegisterAgentTool.d.ts +218 -0
  120. package/dist/umd/tools/hcs10/RetrieveProfileTool.d.ts +33 -0
  121. package/dist/umd/tools/hcs10/SendMessageToConnectionTool.d.ts +40 -0
  122. package/dist/umd/tools/hcs10/base-hcs10-tools.d.ts +28 -0
  123. package/dist/umd/tools/hcs10/hcs10-tool-params.d.ts +18 -0
  124. package/dist/umd/tools/hcs10/index.d.ts +13 -0
  125. package/dist/umd/tools/index.d.ts +1 -13
  126. package/package.json +41 -41
  127. package/src/builders/hcs10/hcs10-builder.ts +2108 -0
  128. package/src/builders/index.ts +2 -0
  129. package/src/builders/types.ts +11 -0
  130. package/src/hcs10/HCS10Client.ts +3 -2
  131. package/src/index.ts +4 -2
  132. package/src/init/init.ts +85 -63
  133. package/src/plugins/PluginInterface.ts +15 -94
  134. package/src/plugins/PluginRegistry.ts +2 -98
  135. package/src/plugins/defi/index.ts +31 -118
  136. package/src/plugins/hedera/HbarPricePlugin.ts +19 -100
  137. package/src/plugins/index.ts +0 -5
  138. package/src/plugins/weather/index.ts +56 -40
  139. package/src/state/state-types.ts +9 -11
  140. package/src/tools/hcs10/AcceptConnectionRequestTool.ts +56 -0
  141. package/src/tools/hcs10/CheckMessagesTool.ts +73 -0
  142. package/src/tools/hcs10/ConnectionMonitorTool.ts +111 -0
  143. package/src/tools/hcs10/FindRegistrationsTool.ts +64 -0
  144. package/src/tools/hcs10/InitiateConnectionTool.ts +66 -0
  145. package/src/tools/hcs10/ListConnectionsTool.ts +58 -0
  146. package/src/tools/hcs10/ListUnapprovedConnectionRequestsTool.ts +26 -0
  147. package/src/tools/hcs10/ManageConnectionRequestsTool.ts +48 -0
  148. package/src/tools/hcs10/RegisterAgentTool.ts +213 -0
  149. package/src/tools/hcs10/RetrieveProfileTool.ts +61 -0
  150. package/src/tools/hcs10/SendMessageToConnectionTool.ts +45 -0
  151. package/src/tools/hcs10/base-hcs10-tools.ts +65 -0
  152. package/src/tools/hcs10/hcs10-tool-params.ts +21 -0
  153. package/src/tools/hcs10/index.ts +13 -0
  154. package/src/tools/index.ts +2 -13
  155. package/src/utils/HederaClient.ts +2 -2
  156. package/src/utils/ensure-agent-has-hbar.ts +3 -4
  157. package/dist/cjs/agents/index.d.ts +0 -0
  158. package/dist/cjs/plugins/BasePlugin.d.ts +0 -28
  159. package/dist/cjs/plugins/GenericPlugin.d.ts +0 -17
  160. package/dist/cjs/plugins/HCS10Plugin.d.ts +0 -13
  161. package/dist/cjs/plugins/PluginLoader.d.ts +0 -38
  162. package/dist/cjs/plugins/openconvai/OpenConvAIPlugin.d.ts +0 -23
  163. package/dist/cjs/plugins/openconvai/index.d.ts +0 -1
  164. package/dist/cjs/tools/AcceptConnectionRequestTool.d.ts +0 -33
  165. package/dist/cjs/tools/CheckMessagesTool.d.ts +0 -34
  166. package/dist/cjs/tools/ConnectionMonitorTool.d.ts +0 -100
  167. package/dist/cjs/tools/ConnectionTool.d.ts +0 -40
  168. package/dist/cjs/tools/FindRegistrationsTool.d.ts +0 -28
  169. package/dist/cjs/tools/InitiateConnectionTool.d.ts +0 -30
  170. package/dist/cjs/tools/ListConnectionsTool.d.ts +0 -33
  171. package/dist/cjs/tools/ListUnapprovedConnectionRequestsTool.d.ts +0 -41
  172. package/dist/cjs/tools/ManageConnectionRequestsTool.d.ts +0 -38
  173. package/dist/cjs/tools/RegisterAgentTool.d.ts +0 -188
  174. package/dist/cjs/tools/RetrieveProfileTool.d.ts +0 -34
  175. package/dist/cjs/tools/SendMessageToConnectionTool.d.ts +0 -34
  176. package/dist/cjs/tools/SendMessageTool.d.ts +0 -40
  177. package/dist/es/agents/index.d.ts +0 -0
  178. package/dist/es/plugins/BasePlugin.d.ts +0 -28
  179. package/dist/es/plugins/GenericPlugin.d.ts +0 -17
  180. package/dist/es/plugins/HCS10Plugin.d.ts +0 -13
  181. package/dist/es/plugins/PluginLoader.d.ts +0 -38
  182. package/dist/es/plugins/openconvai/OpenConvAIPlugin.d.ts +0 -23
  183. package/dist/es/plugins/openconvai/index.d.ts +0 -1
  184. package/dist/es/standards-agent-kit.es21.js +0 -92
  185. package/dist/es/standards-agent-kit.es21.js.map +0 -1
  186. package/dist/es/standards-agent-kit.es22.js +0 -7
  187. package/dist/es/standards-agent-kit.es22.js.map +0 -1
  188. package/dist/es/standards-agent-kit.es23.js +0 -106
  189. package/dist/es/standards-agent-kit.es23.js.map +0 -1
  190. package/dist/es/standards-agent-kit.es24.js +0 -7
  191. package/dist/es/standards-agent-kit.es24.js.map +0 -1
  192. package/dist/es/standards-agent-kit.es25.js +0 -7
  193. package/dist/es/standards-agent-kit.es25.js.map +0 -1
  194. package/dist/es/standards-agent-kit.es26.js +0 -85
  195. package/dist/es/standards-agent-kit.es26.js.map +0 -1
  196. package/dist/es/standards-agent-kit.es27.js +0 -28
  197. package/dist/es/standards-agent-kit.es27.js.map +0 -1
  198. package/dist/es/tools/AcceptConnectionRequestTool.d.ts +0 -33
  199. package/dist/es/tools/CheckMessagesTool.d.ts +0 -34
  200. package/dist/es/tools/ConnectionMonitorTool.d.ts +0 -100
  201. package/dist/es/tools/ConnectionTool.d.ts +0 -40
  202. package/dist/es/tools/FindRegistrationsTool.d.ts +0 -28
  203. package/dist/es/tools/InitiateConnectionTool.d.ts +0 -30
  204. package/dist/es/tools/ListConnectionsTool.d.ts +0 -33
  205. package/dist/es/tools/ListUnapprovedConnectionRequestsTool.d.ts +0 -41
  206. package/dist/es/tools/ManageConnectionRequestsTool.d.ts +0 -38
  207. package/dist/es/tools/RegisterAgentTool.d.ts +0 -188
  208. package/dist/es/tools/RetrieveProfileTool.d.ts +0 -34
  209. package/dist/es/tools/SendMessageToConnectionTool.d.ts +0 -34
  210. package/dist/es/tools/SendMessageTool.d.ts +0 -40
  211. package/dist/umd/agents/index.d.ts +0 -0
  212. package/dist/umd/plugins/BasePlugin.d.ts +0 -28
  213. package/dist/umd/plugins/GenericPlugin.d.ts +0 -17
  214. package/dist/umd/plugins/HCS10Plugin.d.ts +0 -13
  215. package/dist/umd/plugins/PluginLoader.d.ts +0 -38
  216. package/dist/umd/plugins/openconvai/OpenConvAIPlugin.d.ts +0 -23
  217. package/dist/umd/plugins/openconvai/index.d.ts +0 -1
  218. package/dist/umd/tools/AcceptConnectionRequestTool.d.ts +0 -33
  219. package/dist/umd/tools/CheckMessagesTool.d.ts +0 -34
  220. package/dist/umd/tools/ConnectionMonitorTool.d.ts +0 -100
  221. package/dist/umd/tools/ConnectionTool.d.ts +0 -40
  222. package/dist/umd/tools/FindRegistrationsTool.d.ts +0 -28
  223. package/dist/umd/tools/InitiateConnectionTool.d.ts +0 -30
  224. package/dist/umd/tools/ListConnectionsTool.d.ts +0 -33
  225. package/dist/umd/tools/ListUnapprovedConnectionRequestsTool.d.ts +0 -41
  226. package/dist/umd/tools/ManageConnectionRequestsTool.d.ts +0 -38
  227. package/dist/umd/tools/RegisterAgentTool.d.ts +0 -188
  228. package/dist/umd/tools/RetrieveProfileTool.d.ts +0 -34
  229. package/dist/umd/tools/SendMessageToConnectionTool.d.ts +0 -34
  230. package/dist/umd/tools/SendMessageTool.d.ts +0 -40
  231. package/src/agents/index.ts +0 -1
  232. package/src/plugins/BasePlugin.ts +0 -37
  233. package/src/plugins/GenericPlugin.ts +0 -19
  234. package/src/plugins/HCS10Plugin.ts +0 -14
  235. package/src/plugins/PluginLoader.ts +0 -121
  236. package/src/plugins/README.md +0 -113
  237. package/src/plugins/openconvai/OpenConvAIPlugin.ts +0 -124
  238. package/src/plugins/openconvai/index.ts +0 -1
  239. package/src/tools/AcceptConnectionRequestTool.ts +0 -196
  240. package/src/tools/CheckMessagesTool.ts +0 -194
  241. package/src/tools/ConnectionMonitorTool.ts +0 -550
  242. package/src/tools/ConnectionTool.ts +0 -231
  243. package/src/tools/FindRegistrationsTool.ts +0 -114
  244. package/src/tools/InitiateConnectionTool.ts +0 -137
  245. package/src/tools/ListConnectionsTool.ts +0 -158
  246. package/src/tools/ListUnapprovedConnectionRequestsTool.ts +0 -173
  247. package/src/tools/ManageConnectionRequestsTool.ts +0 -275
  248. package/src/tools/RegisterAgentTool.ts +0 -590
  249. package/src/tools/RetrieveProfileTool.ts +0 -94
  250. package/src/tools/SendMessageToConnectionTool.ts +0 -142
  251. package/src/tools/SendMessageTool.ts +0 -116
@@ -1,188 +0,0 @@
1
- import { HCS10Client } from '../hcs10/HCS10Client';
2
- import { StructuredTool } from '@langchain/core/tools';
3
- import { z } from 'zod';
4
- import { IStateManager } from '../state/state-types';
5
- /**
6
- * RegisterAgentTool wraps the createAndRegisterAgent() function of HCS10Client.
7
- * It creates and registers an agent on Hedera using the HCS-10 standard SDK flow.
8
- * On success, returns a JSON string containing the new agent's details (including private key).
9
- */
10
- export declare class RegisterAgentTool extends StructuredTool {
11
- name: string;
12
- description: string;
13
- private client;
14
- private stateManager?;
15
- schema: z.ZodObject<{
16
- name: z.ZodString;
17
- description: z.ZodOptional<z.ZodString>;
18
- type: z.ZodOptional<z.ZodEnum<["autonomous", "manual"]>>;
19
- model: z.ZodOptional<z.ZodString>;
20
- capabilities: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
21
- profilePicture: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
22
- url: z.ZodString;
23
- filename: z.ZodString;
24
- }, "strip", z.ZodTypeAny, {
25
- url?: string;
26
- filename?: string;
27
- }, {
28
- url?: string;
29
- filename?: string;
30
- }>, z.ZodObject<{
31
- path: z.ZodString;
32
- filename: z.ZodOptional<z.ZodString>;
33
- }, "strip", z.ZodTypeAny, {
34
- path?: string;
35
- filename?: string;
36
- }, {
37
- path?: string;
38
- filename?: string;
39
- }>]>>;
40
- feeCollectorAccountId: z.ZodOptional<z.ZodString>;
41
- hbarFee: z.ZodOptional<z.ZodNumber>;
42
- tokenFee: z.ZodOptional<z.ZodObject<{
43
- amount: z.ZodNumber;
44
- tokenId: z.ZodString;
45
- }, "strip", z.ZodTypeAny, {
46
- amount?: number;
47
- tokenId?: string;
48
- }, {
49
- amount?: number;
50
- tokenId?: string;
51
- }>>;
52
- hbarFees: z.ZodOptional<z.ZodArray<z.ZodObject<{
53
- amount: z.ZodNumber;
54
- collectorAccount: z.ZodOptional<z.ZodString>;
55
- }, "strip", z.ZodTypeAny, {
56
- amount?: number;
57
- collectorAccount?: string;
58
- }, {
59
- amount?: number;
60
- collectorAccount?: string;
61
- }>, "many">>;
62
- tokenFees: z.ZodOptional<z.ZodArray<z.ZodObject<{
63
- amount: z.ZodNumber;
64
- tokenId: z.ZodString;
65
- collectorAccount: z.ZodOptional<z.ZodString>;
66
- }, "strip", z.ZodTypeAny, {
67
- amount?: number;
68
- tokenId?: string;
69
- collectorAccount?: string;
70
- }, {
71
- amount?: number;
72
- tokenId?: string;
73
- collectorAccount?: string;
74
- }>, "many">>;
75
- exemptAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
76
- setAsCurrent: z.ZodOptional<z.ZodBoolean>;
77
- persistence: z.ZodOptional<z.ZodObject<{
78
- prefix: z.ZodOptional<z.ZodString>;
79
- }, "strip", z.ZodTypeAny, {
80
- prefix?: string;
81
- }, {
82
- prefix?: string;
83
- }>>;
84
- }, "strip", z.ZodTypeAny, {
85
- capabilities?: number[];
86
- type?: "autonomous" | "manual";
87
- name?: string;
88
- description?: string;
89
- model?: string;
90
- profilePicture?: string | {
91
- url?: string;
92
- filename?: string;
93
- } | {
94
- path?: string;
95
- filename?: string;
96
- };
97
- feeCollectorAccountId?: string;
98
- hbarFee?: number;
99
- tokenFee?: {
100
- amount?: number;
101
- tokenId?: string;
102
- };
103
- hbarFees?: {
104
- amount?: number;
105
- collectorAccount?: string;
106
- }[];
107
- tokenFees?: {
108
- amount?: number;
109
- tokenId?: string;
110
- collectorAccount?: string;
111
- }[];
112
- exemptAccountIds?: string[];
113
- setAsCurrent?: boolean;
114
- persistence?: {
115
- prefix?: string;
116
- };
117
- }, {
118
- capabilities?: number[];
119
- type?: "autonomous" | "manual";
120
- name?: string;
121
- description?: string;
122
- model?: string;
123
- profilePicture?: string | {
124
- url?: string;
125
- filename?: string;
126
- } | {
127
- path?: string;
128
- filename?: string;
129
- };
130
- feeCollectorAccountId?: string;
131
- hbarFee?: number;
132
- tokenFee?: {
133
- amount?: number;
134
- tokenId?: string;
135
- };
136
- hbarFees?: {
137
- amount?: number;
138
- collectorAccount?: string;
139
- }[];
140
- tokenFees?: {
141
- amount?: number;
142
- tokenId?: string;
143
- collectorAccount?: string;
144
- }[];
145
- exemptAccountIds?: string[];
146
- setAsCurrent?: boolean;
147
- persistence?: {
148
- prefix?: string;
149
- };
150
- }>;
151
- /**
152
- * Creates a new RegisterAgentTool instance
153
- * @param client - Instance of HCS10Client (already configured with operator/network)
154
- * @param stateManager - Optional state manager to store agent details
155
- */
156
- constructor(client: HCS10Client, stateManager?: IStateManager);
157
- /**
158
- * Loads a profile picture from a local file or URL and returns a buffer
159
- * @param profilePicture - Local file path or URL
160
- * @returns Object containing buffer and filename
161
- */
162
- private loadProfilePicture;
163
- /**
164
- * Calls createAndRegisterAgent() with the provided metadata.
165
- * Returns a JSON string with agent details on success, or an error string.
166
- */
167
- _call(input: z.infer<typeof this.schema>): Promise<string>;
168
- /**
169
- * Checks if the token fee configuration is valid
170
- */
171
- private hasValidTokenFee;
172
- /**
173
- * Processes the registration result and returns formatted output
174
- */
175
- private processRegistrationResult;
176
- /**
177
- * Ensures the agent has enough HBAR for operations
178
- */
179
- private ensureAgentHasFunds;
180
- /**
181
- * Validates that all required fields are present in the registration result
182
- */
183
- private validateRegistrationResult;
184
- /**
185
- * Creates a description of the fees configured for the agent
186
- */
187
- private createFeeDescription;
188
- }
@@ -1,34 +0,0 @@
1
- import { StructuredTool } from '@langchain/core/tools';
2
- import { z } from 'zod';
3
- import { HCS10Client } from '../hcs10/HCS10Client';
4
- /**
5
- * Tool for retrieving the HCS-11 profile associated with a Hedera account ID.
6
- * Utilizes the HCS10Client's retrieveProfile method, which handles fetching.
7
- */
8
- export declare class RetrieveProfileTool extends StructuredTool {
9
- name: string;
10
- description: string;
11
- private client;
12
- private logger;
13
- schema: z.ZodObject<{
14
- accountId: z.ZodOptional<z.ZodString>;
15
- disableCache: z.ZodOptional<z.ZodBoolean>;
16
- }, "strip", z.ZodTypeAny, {
17
- accountId?: string;
18
- disableCache?: boolean;
19
- }, {
20
- accountId?: string;
21
- disableCache?: boolean;
22
- }>;
23
- /**
24
- * Creates a new RetrieveProfileTool instance.
25
- * @param client - An instance of HCS10Client.
26
- */
27
- constructor(client: HCS10Client);
28
- /**
29
- * Executes the profile retrieval.
30
- * @param input - The input object containing accountId and optional disableCache flag.
31
- * @returns A JSON string of the profile on success, or an error message string.
32
- */
33
- _call(input: z.infer<typeof this.schema>): Promise<string>;
34
- }
@@ -1,34 +0,0 @@
1
- import { StructuredTool, ToolParams } from '@langchain/core/tools';
2
- import { z } from 'zod';
3
- import { HCS10Client } from '../hcs10/HCS10Client';
4
- import { IStateManager } from '../state/state-types';
5
- export interface SendMessageToConnectionToolParams extends ToolParams {
6
- hcsClient: HCS10Client;
7
- stateManager: IStateManager;
8
- }
9
- /**
10
- * A tool to send a message to an agent over an established HCS-10 connection.
11
- */
12
- export declare class SendMessageToConnectionTool extends StructuredTool {
13
- name: string;
14
- description: string;
15
- schema: z.ZodObject<{
16
- targetIdentifier: z.ZodString;
17
- message: z.ZodString;
18
- disableMonitoring: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
19
- }, "strip", z.ZodTypeAny, {
20
- message?: string;
21
- disableMonitoring?: boolean;
22
- targetIdentifier?: string;
23
- }, {
24
- message?: string;
25
- disableMonitoring?: boolean;
26
- targetIdentifier?: string;
27
- }>;
28
- private hcsClient;
29
- private stateManager;
30
- private logger;
31
- constructor({ hcsClient, stateManager, ...rest }: SendMessageToConnectionToolParams);
32
- protected _call({ targetIdentifier, message, disableMonitoring, }: z.infer<this['schema']>): Promise<string>;
33
- private monitorResponses;
34
- }
@@ -1,40 +0,0 @@
1
- import { HCS10Client } from '../hcs10/HCS10Client';
2
- import { StructuredTool } from '@langchain/core/tools';
3
- import { z } from 'zod';
4
- /**
5
- * SendMessageTool wraps the sendMessage() function of HCS10Client.
6
- * It sends a message to a specified Hedera topic and monitors for responses.
7
- */
8
- export declare class SendMessageTool extends StructuredTool {
9
- name: string;
10
- description: string;
11
- private client;
12
- private lastProcessedTimestamp;
13
- private logger;
14
- schema: z.ZodObject<{
15
- topicId: z.ZodString;
16
- message: z.ZodString;
17
- disableMonitoring: z.ZodOptional<z.ZodBoolean>;
18
- }, "strip", z.ZodTypeAny, {
19
- message?: string;
20
- topicId?: string;
21
- disableMonitoring?: boolean;
22
- }, {
23
- message?: string;
24
- topicId?: string;
25
- disableMonitoring?: boolean;
26
- }>;
27
- /**
28
- * @param client - Instance of HCS10Client.
29
- */
30
- constructor(client: HCS10Client);
31
- /**
32
- * Calls sendMessage() with the provided parameters.
33
- */
34
- _call(input: {
35
- topicId: string;
36
- message: string;
37
- disableMonitoring: boolean;
38
- }): Promise<string>;
39
- private monitorResponses;
40
- }
File without changes
@@ -1,28 +0,0 @@
1
- import { IPlugin, BasePluginContext } from './PluginInterface';
2
- import { StructuredTool } from '@langchain/core/tools';
3
- /**
4
- * Base class for plugins to simplify implementation
5
- */
6
- export declare abstract class BasePlugin<T extends BasePluginContext = BasePluginContext> implements IPlugin<T> {
7
- abstract id: string;
8
- abstract name: string;
9
- abstract description: string;
10
- abstract version: string;
11
- abstract author: string;
12
- protected context: T;
13
- /**
14
- * Initialize the plugin with the provided context
15
- * @param context The context containing shared resources
16
- */
17
- initialize(context: T): Promise<void>;
18
- /**
19
- * Get the tools provided by this plugin
20
- * @returns Array of tools provided by this plugin
21
- */
22
- abstract getTools(): StructuredTool[];
23
- /**
24
- * Clean up resources when the plugin is unloaded
25
- * Default implementation does nothing
26
- */
27
- cleanup(): Promise<void>;
28
- }
@@ -1,17 +0,0 @@
1
- import { BasePlugin } from './BasePlugin';
2
- import { GenericPluginContext } from './PluginInterface';
3
- import { StructuredTool } from '@langchain/core/tools';
4
- /**
5
- * Base class for platform-agnostic plugins that can be used across different implementations
6
- */
7
- export declare abstract class GenericPlugin extends BasePlugin<GenericPluginContext> {
8
- /**
9
- * Namespace for the plugin, used for organizing and categorizing plugins
10
- */
11
- abstract namespace: string;
12
- /**
13
- * Get the tools provided by this plugin
14
- * @returns Array of tools provided by this plugin
15
- */
16
- abstract getTools(): StructuredTool[];
17
- }
@@ -1,13 +0,0 @@
1
- import { BasePlugin } from './BasePlugin';
2
- import { PluginContext } from './PluginInterface';
3
- import { StructuredTool } from '@langchain/core/tools';
4
- /**
5
- * Base class for plugins that require HCS10 specific functionality
6
- */
7
- export declare abstract class HCS10Plugin extends BasePlugin<PluginContext> {
8
- /**
9
- * Get the tools provided by this plugin
10
- * @returns Array of tools provided by this plugin
11
- */
12
- abstract getTools(): StructuredTool[];
13
- }
@@ -1,38 +0,0 @@
1
- import { PluginContext, IPlugin } from './PluginInterface';
2
- /**
3
- * Configuration for loading a plugin
4
- */
5
- export interface PluginLoadOptions {
6
- /**
7
- * Whether to initialize the plugin after loading
8
- * @default true
9
- */
10
- initialize?: boolean;
11
- }
12
- /**
13
- * Utility for loading plugins from different sources
14
- */
15
- export declare class PluginLoader {
16
- /**
17
- * Load a plugin from a directory
18
- * @param directory Path to the directory containing the plugin
19
- * @param context Context to provide to the plugin during initialization
20
- * @param options Options for loading the plugin
21
- * @returns The loaded plugin instance
22
- */
23
- static loadFromDirectory(directory: string, context: PluginContext, options?: PluginLoadOptions): Promise<IPlugin>;
24
- /**
25
- * Load a plugin from an npm package
26
- * @param packageName Name of the npm package containing the plugin
27
- * @param context Context to provide to the plugin during initialization
28
- * @param options Options for loading the plugin
29
- * @returns The loaded plugin instance
30
- */
31
- static loadFromPackage(packageName: string, context: PluginContext, options?: PluginLoadOptions): Promise<IPlugin>;
32
- /**
33
- * Check if an object implements the IPlugin interface
34
- * @param obj Object to check
35
- * @returns true if the object implements IPlugin, false otherwise
36
- */
37
- private static isValidPlugin;
38
- }
@@ -1,23 +0,0 @@
1
- import { GenericPlugin } from '../GenericPlugin';
2
- import { GenericPluginContext } from '../PluginInterface';
3
- import { StructuredTool } from '@langchain/core/tools';
4
- /**
5
- * OpenConvAI Plugin that provides all the tools from standards-agent-kit
6
- * This plugin enables full HCS-10 agent functionality including registration,
7
- * connection management, and messaging capabilities.
8
- */
9
- export declare class OpenConvAIPlugin extends GenericPlugin {
10
- id: string;
11
- name: string;
12
- description: string;
13
- version: string;
14
- author: string;
15
- namespace: string;
16
- private hcs10Client?;
17
- private stateManager?;
18
- private tools;
19
- initialize(context: GenericPluginContext): Promise<void>;
20
- private initializeTools;
21
- getTools(): StructuredTool[];
22
- cleanup(): Promise<void>;
23
- }
@@ -1 +0,0 @@
1
- export * from './OpenConvAIPlugin';
@@ -1,33 +0,0 @@
1
- import { StructuredTool, ToolParams } from '@langchain/core/tools';
2
- import { z } from 'zod';
3
- import { HCS10Client } from '../hcs10/HCS10Client';
4
- import { IStateManager } from '../state/state-types';
5
- export interface AcceptConnectionRequestToolParams extends ToolParams {
6
- hcsClient: HCS10Client;
7
- stateManager: IStateManager;
8
- }
9
- /**
10
- * A tool specifically for accepting incoming connection requests.
11
- */
12
- export declare class AcceptConnectionRequestTool extends StructuredTool {
13
- name: string;
14
- description: string;
15
- schema: z.ZodObject<{
16
- requestKey: z.ZodString;
17
- hbarFee: z.ZodOptional<z.ZodNumber>;
18
- exemptAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
19
- }, "strip", z.ZodTypeAny, {
20
- hbarFee?: number;
21
- exemptAccountIds?: string[];
22
- requestKey?: string;
23
- }, {
24
- hbarFee?: number;
25
- exemptAccountIds?: string[];
26
- requestKey?: string;
27
- }>;
28
- private hcsClient;
29
- private stateManager;
30
- private logger;
31
- constructor({ hcsClient, stateManager, ...rest }: AcceptConnectionRequestToolParams);
32
- protected _call({ requestKey, hbarFee, exemptAccountIds, }: z.infer<this['schema']>): Promise<string>;
33
- }
@@ -1,34 +0,0 @@
1
- import { StructuredTool, ToolParams } from '@langchain/core/tools';
2
- import { z } from 'zod';
3
- import { HCS10Client } from '../hcs10/HCS10Client';
4
- import { IStateManager } from '../state/state-types';
5
- export interface CheckMessagesToolParams extends ToolParams {
6
- hcsClient: HCS10Client;
7
- stateManager: IStateManager;
8
- }
9
- /**
10
- * A tool to check for new messages on an active HCS-10 connection topic,
11
- * or optionally fetch the latest messages regardless of timestamp.
12
- */
13
- export declare class CheckMessagesTool extends StructuredTool {
14
- name: string;
15
- description: string;
16
- schema: z.ZodObject<{
17
- targetIdentifier: z.ZodString;
18
- fetchLatest: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
19
- lastMessagesCount: z.ZodOptional<z.ZodNumber>;
20
- }, "strip", z.ZodTypeAny, {
21
- targetIdentifier?: string;
22
- fetchLatest?: boolean;
23
- lastMessagesCount?: number;
24
- }, {
25
- targetIdentifier?: string;
26
- fetchLatest?: boolean;
27
- lastMessagesCount?: number;
28
- }>;
29
- hcsClient: HCS10Client;
30
- private stateManager;
31
- private logger;
32
- constructor({ hcsClient, stateManager, ...rest }: CheckMessagesToolParams);
33
- protected _call({ targetIdentifier, fetchLatest, lastMessagesCount, }: z.infer<this['schema']>): Promise<string>;
34
- }
@@ -1,100 +0,0 @@
1
- import { StructuredTool, ToolParams } from '@langchain/core/tools';
2
- import { z } from 'zod';
3
- import { HCS10Client } from '../hcs10/HCS10Client';
4
- import { IStateManager } from '../state/state-types';
5
- export interface FeeDefinition {
6
- amount: number;
7
- collectorAccount?: string;
8
- }
9
- export interface TokenFeeDefinition extends FeeDefinition {
10
- tokenId: string;
11
- }
12
- export interface ConnectionMonitorToolParams extends ToolParams {
13
- hcsClient: HCS10Client;
14
- stateManager: IStateManager;
15
- }
16
- /**
17
- * A tool for monitoring incoming connection requests and accepting them with optional fee settings.
18
- */
19
- export declare class ConnectionMonitorTool extends StructuredTool {
20
- name: string;
21
- description: string;
22
- schema: z.ZodObject<{
23
- acceptAll: z.ZodOptional<z.ZodBoolean>;
24
- targetAccountId: z.ZodOptional<z.ZodString>;
25
- hbarFees: z.ZodOptional<z.ZodArray<z.ZodObject<{
26
- amount: z.ZodNumber;
27
- collectorAccount: z.ZodOptional<z.ZodString>;
28
- }, "strip", z.ZodTypeAny, {
29
- amount?: number;
30
- collectorAccount?: string;
31
- }, {
32
- amount?: number;
33
- collectorAccount?: string;
34
- }>, "many">>;
35
- tokenFees: z.ZodOptional<z.ZodArray<z.ZodObject<{
36
- amount: z.ZodNumber;
37
- tokenId: z.ZodString;
38
- collectorAccount: z.ZodOptional<z.ZodString>;
39
- }, "strip", z.ZodTypeAny, {
40
- amount?: number;
41
- tokenId?: string;
42
- collectorAccount?: string;
43
- }, {
44
- amount?: number;
45
- tokenId?: string;
46
- collectorAccount?: string;
47
- }>, "many">>;
48
- exemptAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
49
- monitorDurationSeconds: z.ZodOptional<z.ZodNumber>;
50
- defaultCollectorAccount: z.ZodOptional<z.ZodString>;
51
- }, "strip", z.ZodTypeAny, {
52
- hbarFees?: {
53
- amount?: number;
54
- collectorAccount?: string;
55
- }[];
56
- tokenFees?: {
57
- amount?: number;
58
- tokenId?: string;
59
- collectorAccount?: string;
60
- }[];
61
- exemptAccountIds?: string[];
62
- targetAccountId?: string;
63
- acceptAll?: boolean;
64
- monitorDurationSeconds?: number;
65
- defaultCollectorAccount?: string;
66
- }, {
67
- hbarFees?: {
68
- amount?: number;
69
- collectorAccount?: string;
70
- }[];
71
- tokenFees?: {
72
- amount?: number;
73
- tokenId?: string;
74
- collectorAccount?: string;
75
- }[];
76
- exemptAccountIds?: string[];
77
- targetAccountId?: string;
78
- acceptAll?: boolean;
79
- monitorDurationSeconds?: number;
80
- defaultCollectorAccount?: string;
81
- }>;
82
- private hcsClient;
83
- private stateManager;
84
- private logger;
85
- private isMonitoring;
86
- private listConnectionsTool;
87
- constructor({ hcsClient, stateManager, ...rest }: ConnectionMonitorToolParams);
88
- updateClient(newClient: HCS10Client): void;
89
- protected _call({ acceptAll, targetAccountId, hbarFees, tokenFees, exemptAccountIds, monitorDurationSeconds, defaultCollectorAccount, }: z.infer<this['schema']>): Promise<string>;
90
- private createFeeConfig;
91
- private extractAccountId;
92
- private acceptConnectionRequest;
93
- private formatFeeString;
94
- /**
95
- * Updates the ConnectionsManager with latest connection data
96
- * This method is meant to be called when changes to connections happen
97
- * outside this tool's monitoring process
98
- */
99
- update(): void;
100
- }
@@ -1,40 +0,0 @@
1
- import { HCS10Client } from '../hcs10/HCS10Client';
2
- import { StructuredTool, ToolParams } from '@langchain/core/tools';
3
- import { z } from 'zod';
4
- import { Logger } from '@hashgraphonline/standards-sdk';
5
- import { IStateManager } from '../state/state-types';
6
- export interface ConnectionToolParams extends ToolParams {
7
- client: HCS10Client;
8
- stateManager: IStateManager;
9
- }
10
- /**
11
- * ConnectionTool monitors the *current* agent's inbound topic for connection requests
12
- * and automatically handles them using the HCS-10 standard SDK flow.
13
- * Use this ONLY to passively LISTEN for other agents trying to connect TO YOU.
14
- * This tool takes NO arguments and does NOT start outgoing connections.
15
- */
16
- export declare class ConnectionTool extends StructuredTool {
17
- name: string;
18
- description: string;
19
- client: HCS10Client;
20
- logger: Logger;
21
- private stateManager;
22
- private isMonitoring;
23
- private monitoringTopic;
24
- schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
25
- /**
26
- * @param client - Instance of HCS10Client.
27
- * @param stateManager - Instance of StateManager for shared state management.
28
- */
29
- constructor({ client, stateManager, ...rest }: ConnectionToolParams);
30
- /**
31
- * Initiates the connection request monitoring process in the background.
32
- * Gets the inbound topic ID from the configured client.
33
- */
34
- _call(): Promise<string>;
35
- /**
36
- * The core monitoring loop.
37
- */
38
- private monitorIncomingRequests;
39
- stopMonitoring(): void;
40
- }
@@ -1,28 +0,0 @@
1
- import { StructuredTool, ToolParams } from '@langchain/core/tools';
2
- import { z } from 'zod';
3
- import { HCS10Client } from '../hcs10/HCS10Client';
4
- import { AIAgentCapability } from '@hashgraphonline/standards-sdk';
5
- export interface FindRegistrationsToolParams extends ToolParams {
6
- hcsClient: HCS10Client;
7
- }
8
- /**
9
- * A tool to search for registered HCS-10 agents using the configured registry.
10
- */
11
- export declare class FindRegistrationsTool extends StructuredTool {
12
- name: string;
13
- description: string;
14
- schema: z.ZodObject<{
15
- accountId: z.ZodOptional<z.ZodString>;
16
- tags: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AIAgentCapability>, "many">>;
17
- }, "strip", z.ZodTypeAny, {
18
- accountId?: string;
19
- tags?: AIAgentCapability[];
20
- }, {
21
- accountId?: string;
22
- tags?: AIAgentCapability[];
23
- }>;
24
- private hcsClient;
25
- private logger;
26
- constructor({ hcsClient, ...rest }: FindRegistrationsToolParams);
27
- protected _call({ accountId, tags, }: z.infer<this['schema']>): Promise<string>;
28
- }