@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,22 +1,21 @@
1
- import { HCS10Client, StandardNetworkType } from '../hcs10/HCS10Client';
2
- import { RegisterAgentTool } from '../tools/RegisterAgentTool';
3
- import { SendMessageTool } from '../tools/SendMessageTool';
4
- import { ConnectionTool } from '../tools/ConnectionTool';
1
+ import { HederaAgentKit } from 'hedera-agent-kit';
2
+ import { HCS10Builder } from '../builders/hcs10/hcs10-builder';
3
+ import { RegisterAgentTool } from '../tools/hcs10/RegisterAgentTool';
4
+ import { FindRegistrationsTool } from '../tools/hcs10/FindRegistrationsTool';
5
+ import { InitiateConnectionTool } from '../tools/hcs10/InitiateConnectionTool';
6
+ import { ListConnectionsTool } from '../tools/hcs10/ListConnectionsTool';
7
+ import { SendMessageToConnectionTool } from '../tools/hcs10/SendMessageToConnectionTool';
8
+ import { CheckMessagesTool } from '../tools/hcs10/CheckMessagesTool';
9
+ import { ConnectionMonitorTool } from '../tools/hcs10/ConnectionMonitorTool';
10
+ import { ManageConnectionRequestsTool } from '../tools/hcs10/ManageConnectionRequestsTool';
11
+ import { AcceptConnectionRequestTool } from '../tools/hcs10/AcceptConnectionRequestTool';
12
+ import { RetrieveProfileTool } from '../tools/hcs10/RetrieveProfileTool';
13
+ import { ListUnapprovedConnectionRequestsTool } from '../tools/hcs10/ListUnapprovedConnectionRequestsTool';
5
14
  import { IStateManager } from '../state/state-types';
6
- import { FindRegistrationsTool } from '../tools/FindRegistrationsTool';
7
- import { InitiateConnectionTool } from '../tools/InitiateConnectionTool';
8
- import { ListConnectionsTool } from '../tools/ListConnectionsTool';
9
- import { SendMessageToConnectionTool } from '../tools/SendMessageToConnectionTool';
10
- import { CheckMessagesTool } from '../tools/CheckMessagesTool';
11
- import { ConnectionMonitorTool } from '../tools/ConnectionMonitorTool';
12
- import { ManageConnectionRequestsTool } from '../tools/ManageConnectionRequestsTool';
13
- import { AcceptConnectionRequestTool } from '../tools/AcceptConnectionRequestTool';
14
- import { RetrieveProfileTool } from '../tools/RetrieveProfileTool';
15
- import { ListUnapprovedConnectionRequestsTool } from '../tools/ListUnapprovedConnectionRequestsTool';
16
15
  export interface HCS10ClientConfig {
17
16
  operatorId?: string;
18
17
  operatorKey?: string;
19
- network?: StandardNetworkType;
18
+ network?: 'mainnet' | 'testnet';
20
19
  useEncryption?: boolean;
21
20
  registryUrl?: string;
22
21
  logLevel?: 'debug' | 'info' | 'warn' | 'error';
@@ -38,8 +37,6 @@ export interface HCS10Tools {
38
37
  listConnectionsTool: ListConnectionsTool;
39
38
  sendMessageToConnectionTool: SendMessageToConnectionTool;
40
39
  checkMessagesTool: CheckMessagesTool;
41
- sendMessageTool: SendMessageTool;
42
- connectionTool: ConnectionTool;
43
40
  connectionMonitorTool: ConnectionMonitorTool;
44
41
  manageConnectionRequestsTool: ManageConnectionRequestsTool;
45
42
  acceptConnectionRequestTool: AcceptConnectionRequestTool;
@@ -49,11 +46,13 @@ export interface HCS10Tools {
49
46
  * Initializes the HCS10 client and returns pre-registered LangChain tools.
50
47
  *
51
48
  * @param options - Initialization options
52
- * @returns Object containing hcs10Client and requested tools
49
+ * @returns Object containing hederaKit, hcs10Builder and requested tools
53
50
  */
54
- export declare const initializeStandardsAgentKit: (options?: HCS10InitializationOptions) => {
55
- hcs10Client: HCS10Client;
56
- monitoringClient?: HCS10Client;
51
+ export declare const initializeStandardsAgentKit: (options?: HCS10InitializationOptions) => Promise<{
52
+ hederaKit: HederaAgentKit;
53
+ hcs10Builder: HCS10Builder;
54
+ monitoringHederaKit?: HederaAgentKit;
55
+ monitoringHcs10Builder?: HCS10Builder;
57
56
  tools: Partial<HCS10Tools>;
58
57
  stateManager: IStateManager;
59
- };
58
+ }>;
@@ -1,49 +1,12 @@
1
- import { StructuredTool } from '@langchain/core/tools';
2
1
  import { HCS10Client } from '../hcs10/HCS10Client';
3
2
  import { IStateManager } from '../state/state-types';
4
- import { Logger } from '@hashgraphonline/standards-sdk';
5
- /**
6
- * Basic client interface required by plugins
7
- */
8
- export interface IPluginClient {
9
- getNetwork(): string;
10
- }
11
- /**
12
- * Basic state manager interface required by plugins
13
- */
14
- export interface IPluginStateManager {
15
- getCurrentAgent?(): unknown;
16
- }
17
- /**
18
- * Base context provided to all plugins during initialization
19
- */
20
- export interface BasePluginContext {
21
- /**
22
- * Logger instance
23
- */
24
- logger: Logger;
25
- /**
26
- * Configuration options
27
- */
28
- config: Record<string, unknown>;
29
- }
30
- /**
31
- * Context provided to platform-agnostic plugins during initialization
32
- */
33
- export interface GenericPluginContext extends BasePluginContext {
34
- /**
35
- * Generic client interface
36
- */
37
- client: IPluginClient;
38
- /**
39
- * Optional generic state manager
40
- */
41
- stateManager?: IPluginStateManager;
42
- }
3
+ import { BasePluginContext } from 'hedera-agent-kit';
4
+ export { BasePlugin } from 'hedera-agent-kit';
5
+ export type { IPlugin, BasePluginContext, GenericPluginContext, PluginContext, IPluginClient, IPluginStateManager, HederaTool, } from 'hedera-agent-kit';
43
6
  /**
44
7
  * Context provided to HCS10-specific plugins during initialization
45
8
  */
46
- export interface PluginContext extends BasePluginContext {
9
+ export interface HCS10PluginContext extends BasePluginContext {
47
10
  /**
48
11
  * The HCS10Client instance
49
12
  */
@@ -53,42 +16,3 @@ export interface PluginContext extends BasePluginContext {
53
16
  */
54
17
  stateManager?: IStateManager;
55
18
  }
56
- /**
57
- * Standard interface that all plugins must implement
58
- */
59
- export interface IPlugin<T extends BasePluginContext = BasePluginContext> {
60
- /**
61
- * Unique identifier for the plugin
62
- */
63
- id: string;
64
- /**
65
- * Human-readable name of the plugin
66
- */
67
- name: string;
68
- /**
69
- * Description of what the plugin does
70
- */
71
- description: string;
72
- /**
73
- * Version of the plugin
74
- */
75
- version: string;
76
- /**
77
- * Author of the plugin
78
- */
79
- author: string;
80
- /**
81
- * Initialize the plugin with the provided context
82
- * @param context The context containing shared resources
83
- */
84
- initialize(context: T): Promise<void>;
85
- /**
86
- * Get the tools provided by this plugin
87
- * @returns Array of tools provided by this plugin
88
- */
89
- getTools(): StructuredTool[];
90
- /**
91
- * Clean up resources when the plugin is unloaded
92
- */
93
- cleanup?(): Promise<void>;
94
- }
@@ -1,47 +1 @@
1
- import { IPlugin, PluginContext } from './PluginInterface';
2
- import { StructuredTool } from '@langchain/core/tools';
3
- /**
4
- * Registry for managing plugins in the Standards Agent Kit
5
- */
6
- export declare class PluginRegistry {
7
- private plugins;
8
- private context;
9
- private logger;
10
- /**
11
- * Creates a new PluginRegistry instance
12
- * @param context The context to provide to plugins during initialization
13
- */
14
- constructor(context: PluginContext);
15
- /**
16
- * Register a plugin with the registry
17
- * @param plugin The plugin to register
18
- * @throws Error if a plugin with the same ID is already registered
19
- */
20
- registerPlugin(plugin: IPlugin): Promise<void>;
21
- /**
22
- * Get a plugin by ID
23
- * @param id The ID of the plugin to retrieve
24
- * @returns The plugin, or undefined if not found
25
- */
26
- getPlugin(id: string): IPlugin | undefined;
27
- /**
28
- * Get all registered plugins
29
- * @returns Array of all registered plugins
30
- */
31
- getAllPlugins(): IPlugin[];
32
- /**
33
- * Get all tools from all registered plugins
34
- * @returns Array of all tools provided by registered plugins
35
- */
36
- getAllTools(): StructuredTool[];
37
- /**
38
- * Unregister a plugin
39
- * @param id The ID of the plugin to unregister
40
- * @returns true if the plugin was unregistered, false if it wasn't found
41
- */
42
- unregisterPlugin(id: string): Promise<boolean>;
43
- /**
44
- * Unregister all plugins
45
- */
46
- unregisterAllPlugins(): Promise<void>;
47
- }
1
+ export { PluginRegistry } from 'hedera-agent-kit';
@@ -1,13 +1,16 @@
1
- import { HCS10Plugin } from '../../../src/plugins/HCS10Plugin';
2
- import { StructuredTool } from '@langchain/core/tools';
1
+ import { BasePlugin, GenericPluginContext, HederaTool } from 'hedera-agent-kit';
3
2
  /**
4
3
  * DeFi Integration Plugin for the Standards Agent Kit
4
+ * Uses built-in Hedera token tools from hedera-agent-kit
5
5
  */
6
- export default class DeFiPlugin extends HCS10Plugin {
6
+ export default class DeFiPlugin extends BasePlugin<GenericPluginContext> {
7
7
  id: string;
8
8
  name: string;
9
9
  description: string;
10
10
  version: string;
11
11
  author: string;
12
- getTools(): StructuredTool[];
12
+ private tools;
13
+ initialize(context: GenericPluginContext): Promise<void>;
14
+ private initializeTools;
15
+ getTools(): HederaTool[];
13
16
  }
@@ -1,45 +1,17 @@
1
- import { StructuredTool } from '@langchain/core/tools';
2
- import { z } from 'zod';
3
- import { IPlugin } from '../PluginInterface';
1
+ import { BasePlugin, GenericPluginContext, HederaTool } from 'hedera-agent-kit';
2
+ export { HederaGetHbarPriceTool as GetHbarPriceTool } from 'hedera-agent-kit';
4
3
  /**
5
- * A Langchain tool to get the current HBAR price in USD.
6
- */
7
- export declare class GetHbarPriceTool extends StructuredTool {
8
- name: string;
9
- description: string;
10
- schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
11
- /**
12
- * DISCLAIMER: THIS TOOL USES THE EXCHANGE RATE ENDPOINT FROM THE MIRROR NODE, AND IT IS NOT GUARANTEED TO BE ACCURATE.
13
- * USE AN ORACLE OR OTHER SOURCES FOR PRODUCTION USE WHERE PRICE IS IMPORTANT.
14
- * Retrieves the current price of HBAR in USD from the Hedera Mirror Node.
15
- * @returns A promise that resolves to a string containing the current HBAR price in USD.
16
- */
17
- protected _call(): Promise<string>;
18
- }
19
- /**
20
- * DISCLAIMER: THIS PLUGIN USES THE EXCHANGE RATE ENDPOINT FROM THE MIRROR NODE, AND IT IS NOT GUARANTEED TO BE ACCURATE.
21
- * USE AN ORACLE OR OTHER SOURCES FOR PRODUCTION USE WHERE PRICE IS IMPORTANT.
22
4
  * Plugin to provide tools related to Hedera network information, like HBAR price.
5
+ * Uses the built-in HederaGetHbarPriceTool from hedera-agent-kit.
23
6
  */
24
- export declare class HbarPricePlugin implements IPlugin {
7
+ export declare class HbarPricePlugin extends BasePlugin<GenericPluginContext> {
25
8
  id: string;
26
9
  name: string;
27
10
  description: string;
28
11
  version: string;
29
12
  author: string;
30
13
  private tools;
31
- constructor();
32
- /**
33
- * Initializes the plugin. Currently no specific initialization needed.
34
- */
35
- initialize(): Promise<void>;
36
- /**
37
- * Returns the tools provided by this plugin.
38
- * @returns An array containing the GetHbarPriceTool.
39
- */
40
- getTools(): StructuredTool[];
41
- /**
42
- * Cleans up resources. Currently no cleanup needed.
43
- */
44
- cleanup(): Promise<void>;
14
+ initialize(context: GenericPluginContext): Promise<void>;
15
+ private initializeTools;
16
+ getTools(): HederaTool[];
45
17
  }
@@ -1,8 +1,3 @@
1
1
  export * from './PluginInterface';
2
2
  export * from './PluginRegistry';
3
- export * from './BasePlugin';
4
- export * from './PluginLoader';
5
3
  export * from './hedera/HbarPricePlugin';
6
- export * from './GenericPlugin';
7
- export * from './openconvai';
8
- export * from './HCS10Plugin';
@@ -1,16 +1,17 @@
1
- import { GenericPlugin, GenericPluginContext } from '../../../src/plugins';
2
- import { StructuredTool } from '@langchain/core/tools';
1
+ import { BasePlugin, GenericPluginContext, HederaTool } from 'hedera-agent-kit';
3
2
  /**
4
3
  * Weather API Plugin for the Standards Agent Kit
4
+ * Uses BaseHederaQueryTool for consistent tool architecture
5
5
  */
6
- export default class WeatherPlugin extends GenericPlugin {
6
+ export default class WeatherPlugin extends BasePlugin<GenericPluginContext> {
7
7
  id: string;
8
8
  name: string;
9
9
  description: string;
10
10
  version: string;
11
11
  author: string;
12
- namespace: string;
13
12
  private apiKey?;
13
+ private tools;
14
14
  initialize(context: GenericPluginContext): Promise<void>;
15
- getTools(): StructuredTool[];
15
+ private initializeTools;
16
+ getTools(): HederaTool[];
16
17
  }