@hashgraphonline/standards-agent-kit 0.2.1 → 0.2.102

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 (193) hide show
  1. package/dist/cjs/builders/hcs10/hcs10-builder.d.ts +4 -0
  2. package/dist/cjs/builders/hcs2/hcs2-builder.d.ts +50 -0
  3. package/dist/cjs/builders/hcs2/index.d.ts +1 -0
  4. package/dist/cjs/builders/index.d.ts +2 -0
  5. package/dist/cjs/builders/inscriber/index.d.ts +1 -0
  6. package/dist/cjs/builders/inscriber/inscriber-builder.d.ts +46 -0
  7. package/dist/cjs/index.d.ts +1 -1
  8. package/dist/cjs/standards-agent-kit.cjs +1 -1
  9. package/dist/cjs/standards-agent-kit.cjs.map +1 -1
  10. package/dist/cjs/tools/hcs10/FindRegistrationsTool.d.ts +4 -4
  11. package/dist/cjs/tools/hcs10/RegisterAgentTool.d.ts +24 -8
  12. package/dist/cjs/tools/hcs10/index.d.ts +1 -0
  13. package/dist/cjs/tools/hcs10/natural-language-mapper.d.ts +19 -0
  14. package/dist/cjs/tools/hcs2/CreateRegistryTool.d.ts +48 -0
  15. package/dist/cjs/tools/hcs2/DeleteEntryTool.d.ts +41 -0
  16. package/dist/cjs/tools/hcs2/MigrateRegistryTool.d.ts +47 -0
  17. package/dist/cjs/tools/hcs2/QueryRegistryTool.d.ts +47 -0
  18. package/dist/cjs/tools/hcs2/RegisterEntryTool.d.ts +47 -0
  19. package/dist/cjs/tools/hcs2/UpdateEntryTool.d.ts +53 -0
  20. package/dist/cjs/tools/hcs2/base-hcs2-tools.d.ts +28 -0
  21. package/dist/cjs/tools/hcs2/hcs2-tool-params.d.ts +18 -0
  22. package/dist/cjs/tools/hcs2/index.d.ts +8 -0
  23. package/dist/cjs/tools/index.d.ts +2 -0
  24. package/dist/cjs/tools/inscriber/InscribeFromBufferTool.d.ts +77 -0
  25. package/dist/cjs/tools/inscriber/InscribeFromFileTool.d.ts +65 -0
  26. package/dist/cjs/tools/inscriber/InscribeFromUrlTool.d.ts +65 -0
  27. package/dist/cjs/tools/inscriber/InscribeHashinalTool.d.ts +125 -0
  28. package/dist/cjs/tools/inscriber/RetrieveInscriptionTool.d.ts +35 -0
  29. package/dist/cjs/tools/inscriber/base-inscriber-tools.d.ts +28 -0
  30. package/dist/cjs/tools/inscriber/index.d.ts +7 -0
  31. package/dist/cjs/tools/inscriber/inscriber-tool-params.d.ts +18 -0
  32. package/dist/es/builders/hcs10/hcs10-builder.d.ts +4 -0
  33. package/dist/es/builders/hcs2/hcs2-builder.d.ts +50 -0
  34. package/dist/es/builders/hcs2/index.d.ts +1 -0
  35. package/dist/es/builders/index.d.ts +2 -0
  36. package/dist/es/builders/inscriber/index.d.ts +1 -0
  37. package/dist/es/builders/inscriber/inscriber-builder.d.ts +46 -0
  38. package/dist/es/index.d.ts +1 -1
  39. package/dist/es/standards-agent-kit.es.js +50 -16
  40. package/dist/es/standards-agent-kit.es.js.map +1 -1
  41. package/dist/es/standards-agent-kit.es10.js +17 -23
  42. package/dist/es/standards-agent-kit.es10.js.map +1 -1
  43. package/dist/es/standards-agent-kit.es11.js +36 -58
  44. package/dist/es/standards-agent-kit.es11.js.map +1 -1
  45. package/dist/es/standards-agent-kit.es12.js +43 -18
  46. package/dist/es/standards-agent-kit.es12.js.map +1 -1
  47. package/dist/es/standards-agent-kit.es13.js +53 -16
  48. package/dist/es/standards-agent-kit.es13.js.map +1 -1
  49. package/dist/es/standards-agent-kit.es14.js +18 -28
  50. package/dist/es/standards-agent-kit.es14.js.map +1 -1
  51. package/dist/es/standards-agent-kit.es15.js +26 -12
  52. package/dist/es/standards-agent-kit.es15.js.map +1 -1
  53. package/dist/es/standards-agent-kit.es16.js +37 -241
  54. package/dist/es/standards-agent-kit.es16.js.map +1 -1
  55. package/dist/es/standards-agent-kit.es17.js +16 -136
  56. package/dist/es/standards-agent-kit.es17.js.map +1 -1
  57. package/dist/es/standards-agent-kit.es18.js +154 -27
  58. package/dist/es/standards-agent-kit.es18.js.map +1 -1
  59. package/dist/es/standards-agent-kit.es19.js +26 -22
  60. package/dist/es/standards-agent-kit.es19.js.map +1 -1
  61. package/dist/es/standards-agent-kit.es2.js +27 -13
  62. package/dist/es/standards-agent-kit.es2.js.map +1 -1
  63. package/dist/es/standards-agent-kit.es20.js +42 -3
  64. package/dist/es/standards-agent-kit.es20.js.map +1 -1
  65. package/dist/es/standards-agent-kit.es21.js +48 -0
  66. package/dist/es/standards-agent-kit.es21.js.map +1 -0
  67. package/dist/es/standards-agent-kit.es22.js +51 -0
  68. package/dist/es/standards-agent-kit.es22.js.map +1 -0
  69. package/dist/es/standards-agent-kit.es23.js +45 -0
  70. package/dist/es/standards-agent-kit.es23.js.map +1 -0
  71. package/dist/es/standards-agent-kit.es24.js +48 -0
  72. package/dist/es/standards-agent-kit.es24.js.map +1 -0
  73. package/dist/es/standards-agent-kit.es25.js +45 -0
  74. package/dist/es/standards-agent-kit.es25.js.map +1 -0
  75. package/dist/es/standards-agent-kit.es26.js +32 -0
  76. package/dist/es/standards-agent-kit.es26.js.map +1 -0
  77. package/dist/es/standards-agent-kit.es27.js +71 -0
  78. package/dist/es/standards-agent-kit.es27.js.map +1 -0
  79. package/dist/es/standards-agent-kit.es28.js +71 -0
  80. package/dist/es/standards-agent-kit.es28.js.map +1 -0
  81. package/dist/es/standards-agent-kit.es29.js +79 -0
  82. package/dist/es/standards-agent-kit.es29.js.map +1 -0
  83. package/dist/es/standards-agent-kit.es3.js +59 -296
  84. package/dist/es/standards-agent-kit.es3.js.map +1 -1
  85. package/dist/es/standards-agent-kit.es30.js +90 -0
  86. package/dist/es/standards-agent-kit.es30.js.map +1 -0
  87. package/dist/es/standards-agent-kit.es31.js +45 -0
  88. package/dist/es/standards-agent-kit.es31.js.map +1 -0
  89. package/dist/es/standards-agent-kit.es32.js +249 -0
  90. package/dist/es/standards-agent-kit.es32.js.map +1 -0
  91. package/dist/es/standards-agent-kit.es33.js +141 -0
  92. package/dist/es/standards-agent-kit.es33.js.map +1 -0
  93. package/dist/es/standards-agent-kit.es34.js +33 -0
  94. package/dist/es/standards-agent-kit.es34.js.map +1 -0
  95. package/dist/es/standards-agent-kit.es35.js +28 -0
  96. package/dist/es/standards-agent-kit.es35.js.map +1 -0
  97. package/dist/es/standards-agent-kit.es36.js +7 -0
  98. package/dist/es/standards-agent-kit.es36.js.map +1 -0
  99. package/dist/es/standards-agent-kit.es4.js +44 -20
  100. package/dist/es/standards-agent-kit.es4.js.map +1 -1
  101. package/dist/es/standards-agent-kit.es5.js +312 -121
  102. package/dist/es/standards-agent-kit.es5.js.map +1 -1
  103. package/dist/es/standards-agent-kit.es6.js +24 -23
  104. package/dist/es/standards-agent-kit.es6.js.map +1 -1
  105. package/dist/es/standards-agent-kit.es7.js +220 -20
  106. package/dist/es/standards-agent-kit.es7.js.map +1 -1
  107. package/dist/es/standards-agent-kit.es8.js +20 -29
  108. package/dist/es/standards-agent-kit.es8.js.map +1 -1
  109. package/dist/es/standards-agent-kit.es9.js +26 -36
  110. package/dist/es/standards-agent-kit.es9.js.map +1 -1
  111. package/dist/es/tools/hcs10/FindRegistrationsTool.d.ts +4 -4
  112. package/dist/es/tools/hcs10/RegisterAgentTool.d.ts +24 -8
  113. package/dist/es/tools/hcs10/index.d.ts +1 -0
  114. package/dist/es/tools/hcs10/natural-language-mapper.d.ts +19 -0
  115. package/dist/es/tools/hcs2/CreateRegistryTool.d.ts +48 -0
  116. package/dist/es/tools/hcs2/DeleteEntryTool.d.ts +41 -0
  117. package/dist/es/tools/hcs2/MigrateRegistryTool.d.ts +47 -0
  118. package/dist/es/tools/hcs2/QueryRegistryTool.d.ts +47 -0
  119. package/dist/es/tools/hcs2/RegisterEntryTool.d.ts +47 -0
  120. package/dist/es/tools/hcs2/UpdateEntryTool.d.ts +53 -0
  121. package/dist/es/tools/hcs2/base-hcs2-tools.d.ts +28 -0
  122. package/dist/es/tools/hcs2/hcs2-tool-params.d.ts +18 -0
  123. package/dist/es/tools/hcs2/index.d.ts +8 -0
  124. package/dist/es/tools/index.d.ts +2 -0
  125. package/dist/es/tools/inscriber/InscribeFromBufferTool.d.ts +77 -0
  126. package/dist/es/tools/inscriber/InscribeFromFileTool.d.ts +65 -0
  127. package/dist/es/tools/inscriber/InscribeFromUrlTool.d.ts +65 -0
  128. package/dist/es/tools/inscriber/InscribeHashinalTool.d.ts +125 -0
  129. package/dist/es/tools/inscriber/RetrieveInscriptionTool.d.ts +35 -0
  130. package/dist/es/tools/inscriber/base-inscriber-tools.d.ts +28 -0
  131. package/dist/es/tools/inscriber/index.d.ts +7 -0
  132. package/dist/es/tools/inscriber/inscriber-tool-params.d.ts +18 -0
  133. package/dist/umd/builders/hcs10/hcs10-builder.d.ts +4 -0
  134. package/dist/umd/builders/hcs2/hcs2-builder.d.ts +50 -0
  135. package/dist/umd/builders/hcs2/index.d.ts +1 -0
  136. package/dist/umd/builders/index.d.ts +2 -0
  137. package/dist/umd/builders/inscriber/index.d.ts +1 -0
  138. package/dist/umd/builders/inscriber/inscriber-builder.d.ts +46 -0
  139. package/dist/umd/index.d.ts +1 -1
  140. package/dist/umd/standards-agent-kit.umd.js +1 -1
  141. package/dist/umd/standards-agent-kit.umd.js.map +1 -1
  142. package/dist/umd/tools/hcs10/FindRegistrationsTool.d.ts +4 -4
  143. package/dist/umd/tools/hcs10/RegisterAgentTool.d.ts +24 -8
  144. package/dist/umd/tools/hcs10/index.d.ts +1 -0
  145. package/dist/umd/tools/hcs10/natural-language-mapper.d.ts +19 -0
  146. package/dist/umd/tools/hcs2/CreateRegistryTool.d.ts +48 -0
  147. package/dist/umd/tools/hcs2/DeleteEntryTool.d.ts +41 -0
  148. package/dist/umd/tools/hcs2/MigrateRegistryTool.d.ts +47 -0
  149. package/dist/umd/tools/hcs2/QueryRegistryTool.d.ts +47 -0
  150. package/dist/umd/tools/hcs2/RegisterEntryTool.d.ts +47 -0
  151. package/dist/umd/tools/hcs2/UpdateEntryTool.d.ts +53 -0
  152. package/dist/umd/tools/hcs2/base-hcs2-tools.d.ts +28 -0
  153. package/dist/umd/tools/hcs2/hcs2-tool-params.d.ts +18 -0
  154. package/dist/umd/tools/hcs2/index.d.ts +8 -0
  155. package/dist/umd/tools/index.d.ts +2 -0
  156. package/dist/umd/tools/inscriber/InscribeFromBufferTool.d.ts +77 -0
  157. package/dist/umd/tools/inscriber/InscribeFromFileTool.d.ts +65 -0
  158. package/dist/umd/tools/inscriber/InscribeFromUrlTool.d.ts +65 -0
  159. package/dist/umd/tools/inscriber/InscribeHashinalTool.d.ts +125 -0
  160. package/dist/umd/tools/inscriber/RetrieveInscriptionTool.d.ts +35 -0
  161. package/dist/umd/tools/inscriber/base-inscriber-tools.d.ts +28 -0
  162. package/dist/umd/tools/inscriber/index.d.ts +7 -0
  163. package/dist/umd/tools/inscriber/inscriber-tool-params.d.ts +18 -0
  164. package/package.json +32 -30
  165. package/src/builders/hcs10/hcs10-builder.ts +37 -16
  166. package/src/builders/hcs2/hcs2-builder.ts +148 -0
  167. package/src/builders/hcs2/index.ts +1 -0
  168. package/src/builders/index.ts +3 -1
  169. package/src/builders/inscriber/index.ts +1 -0
  170. package/src/builders/inscriber/inscriber-builder.ts +112 -0
  171. package/src/index.ts +1 -1
  172. package/src/tools/hcs10/FindRegistrationsTool.ts +19 -4
  173. package/src/tools/hcs10/RegisterAgentTool.ts +147 -9
  174. package/src/tools/hcs10/index.ts +2 -1
  175. package/src/tools/hcs10/natural-language-mapper.ts +194 -0
  176. package/src/tools/hcs2/CreateRegistryTool.ts +63 -0
  177. package/src/tools/hcs2/DeleteEntryTool.ts +58 -0
  178. package/src/tools/hcs2/MigrateRegistryTool.ts +64 -0
  179. package/src/tools/hcs2/QueryRegistryTool.ts +70 -0
  180. package/src/tools/hcs2/RegisterEntryTool.ts +63 -0
  181. package/src/tools/hcs2/UpdateEntryTool.ts +68 -0
  182. package/src/tools/hcs2/base-hcs2-tools.ts +65 -0
  183. package/src/tools/hcs2/hcs2-tool-params.ts +21 -0
  184. package/src/tools/hcs2/index.ts +8 -0
  185. package/src/tools/index.ts +3 -2
  186. package/src/tools/inscriber/InscribeFromBufferTool.ts +105 -0
  187. package/src/tools/inscriber/InscribeFromFileTool.ts +93 -0
  188. package/src/tools/inscriber/InscribeFromUrlTool.ts +93 -0
  189. package/src/tools/inscriber/InscribeHashinalTool.ts +117 -0
  190. package/src/tools/inscriber/RetrieveInscriptionTool.ts +59 -0
  191. package/src/tools/inscriber/base-inscriber-tools.ts +65 -0
  192. package/src/tools/inscriber/index.ts +7 -0
  193. package/src/tools/inscriber/inscriber-tool-params.ts +21 -0
@@ -1,72 +1,50 @@
1
1
  import { z } from "zod";
2
- import { BaseHCS10TransactionTool } from "./standards-agent-kit.es4.js";
3
- const ConnectionMonitorZodSchema = z.object({
4
- acceptAll: z.boolean().optional().describe(
5
- "Whether to automatically accept all incoming connection requests. Default is false."
2
+ import { BaseHCS10QueryTool } from "./standards-agent-kit.es6.js";
3
+ const CheckMessagesZodSchema = z.object({
4
+ targetIdentifier: z.string().describe(
5
+ "The account ID (e.g., 0.0.12345) of the target agent OR the connection number (e.g., '1', '2') from the 'list_connections' tool to check messages for."
6
6
  ),
7
- targetAccountId: z.string().optional().describe(
8
- "If provided, only accept connection requests from this specific account ID."
7
+ fetchLatest: z.boolean().optional().default(false).describe(
8
+ "Set to true to fetch the latest messages even if they have been seen before, ignoring the last checked timestamp. Defaults to false (fetching only new messages)."
9
9
  ),
10
- hbarFees: z.array(
11
- z.object({
12
- amount: z.number(),
13
- collectorAccount: z.string().optional()
14
- })
15
- ).optional().describe(
16
- "Array of HBAR fee amounts to charge per message (with optional collector accounts)."
17
- ),
18
- tokenFees: z.array(
19
- z.object({
20
- amount: z.number(),
21
- tokenId: z.string(),
22
- collectorAccount: z.string().optional()
23
- })
24
- ).optional().describe(
25
- "Array of token fee amounts and IDs to charge per message (with optional collector accounts)."
26
- ),
27
- exemptAccountIds: z.array(z.string()).optional().describe(
28
- "Array of account IDs to exempt from ALL fees set in this request."
29
- ),
30
- monitorDurationSeconds: z.number().optional().describe(
31
- "How long to monitor for incoming requests in seconds. Default is 120."
32
- ),
33
- defaultCollectorAccount: z.string().optional().describe(
34
- "Default account to collect fees if not specified at the fee level. Defaults to the agent account."
10
+ lastMessagesCount: z.number().int().positive().optional().describe(
11
+ "When fetchLatest is true, specifies how many of the most recent messages to retrieve. Defaults to 1."
35
12
  )
36
13
  });
37
- class ConnectionMonitorTool extends BaseHCS10TransactionTool {
14
+ class CheckMessagesTool extends BaseHCS10QueryTool {
38
15
  constructor(params) {
39
16
  super(params);
40
- this.name = "monitor_connections";
41
- this.description = "Monitors for incoming connection requests and accepts them with optional fee settings. Use this to watch for connection requests and accept them, optionally setting HBAR or token fees on the connection. Note: When acceptAll=true, this tool requires multiple transactions and cannot be used in returnBytes mode.";
42
- this.specificInputSchema = ConnectionMonitorZodSchema;
43
- this.neverScheduleThisTool = true;
44
- this.requiresMultipleTransactions = true;
17
+ this.name = "check_messages";
18
+ this.description = `Checks for and retrieves messages from an active connection.
19
+ Identify the target agent using their account ID (e.g., 0.0.12345) or the connection number shown in 'list_connections'.
20
+ By default, it only retrieves messages newer than the last check.
21
+ Use 'fetchLatest: true' to get the most recent messages regardless of when they arrived.
22
+ Use 'lastMessagesCount' to specify how many latest messages to retrieve (default 1 when fetchLatest is true).`;
23
+ this.specificInputSchema = CheckMessagesZodSchema;
45
24
  }
46
- async callBuilderMethod(builder, specificArgs) {
47
- const hcs10Builder = builder;
48
- await hcs10Builder.monitorConnections({
49
- ...specificArgs.acceptAll !== void 0 && {
50
- acceptAll: specificArgs.acceptAll
51
- },
52
- ...specificArgs.targetAccountId !== void 0 && {
53
- targetAccountId: specificArgs.targetAccountId
54
- },
55
- ...specificArgs.monitorDurationSeconds !== void 0 && {
56
- monitorDurationSeconds: specificArgs.monitorDurationSeconds
57
- },
58
- hbarFees: specificArgs.hbarFees || [],
59
- tokenFees: specificArgs.tokenFees || [],
60
- ...specificArgs.exemptAccountIds !== void 0 && {
61
- exemptAccountIds: specificArgs.exemptAccountIds
62
- },
63
- ...specificArgs.defaultCollectorAccount !== void 0 && {
64
- defaultCollectorAccount: specificArgs.defaultCollectorAccount
65
- }
25
+ async executeQuery({
26
+ targetIdentifier,
27
+ fetchLatest,
28
+ lastMessagesCount
29
+ }) {
30
+ const hcs10Builder = this.hcs10Builder;
31
+ await hcs10Builder.checkMessages({
32
+ targetIdentifier,
33
+ fetchLatest,
34
+ lastMessagesCount: lastMessagesCount || 1
66
35
  });
36
+ const result = await hcs10Builder.execute();
37
+ if (result.success && "rawResult" in result && result.rawResult) {
38
+ const raw = result.rawResult;
39
+ return {
40
+ success: true,
41
+ data: raw.formattedOutput || raw.message || "Messages checked"
42
+ };
43
+ }
44
+ return result;
67
45
  }
68
46
  }
69
47
  export {
70
- ConnectionMonitorTool
48
+ CheckMessagesTool
71
49
  };
72
50
  //# sourceMappingURL=standards-agent-kit.es11.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standards-agent-kit.es11.js","sources":["../../src/tools/hcs10/ConnectionMonitorTool.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseHCS10TransactionTool } from './base-hcs10-tools';\nimport { HCS10Builder } from '../../builders/hcs10/hcs10-builder';\nimport { HCS10TransactionToolParams } from './hcs10-tool-params';\nimport { BaseServiceBuilder } from 'hedera-agent-kit';\n\nconst ConnectionMonitorZodSchema = z.object({\n acceptAll: z\n .boolean()\n .optional()\n .describe(\n 'Whether to automatically accept all incoming connection requests. Default is false.'\n ),\n targetAccountId: z\n .string()\n .optional()\n .describe(\n 'If provided, only accept connection requests from this specific account ID.'\n ),\n hbarFees: z\n .array(\n z.object({\n amount: z.number(),\n collectorAccount: z.string().optional(),\n })\n )\n .optional()\n .describe(\n 'Array of HBAR fee amounts to charge per message (with optional collector accounts).'\n ),\n tokenFees: z\n .array(\n z.object({\n amount: z.number(),\n tokenId: z.string(),\n collectorAccount: z.string().optional(),\n })\n )\n .optional()\n .describe(\n 'Array of token fee amounts and IDs to charge per message (with optional collector accounts).'\n ),\n exemptAccountIds: z\n .array(z.string())\n .optional()\n .describe(\n 'Array of account IDs to exempt from ALL fees set in this request.'\n ),\n monitorDurationSeconds: z\n .number()\n .optional()\n .describe(\n 'How long to monitor for incoming requests in seconds. Default is 120.'\n ),\n defaultCollectorAccount: z\n .string()\n .optional()\n .describe(\n 'Default account to collect fees if not specified at the fee level. Defaults to the agent account.'\n ),\n});\n\n/**\n * A tool for monitoring incoming connection requests and accepting them with optional fee settings.\n */\nexport class ConnectionMonitorTool extends BaseHCS10TransactionTool<\n typeof ConnectionMonitorZodSchema\n> {\n name = 'monitor_connections';\n description =\n 'Monitors for incoming connection requests and accepts them with optional fee settings. Use this to watch for connection requests and accept them, optionally setting HBAR or token fees on the connection. Note: When acceptAll=true, this tool requires multiple transactions and cannot be used in returnBytes mode.';\n specificInputSchema = ConnectionMonitorZodSchema;\n constructor(params: HCS10TransactionToolParams) {\n super(params);\n this.neverScheduleThisTool = true;\n this.requiresMultipleTransactions = true;\n }\n\n protected async callBuilderMethod(\n builder: BaseServiceBuilder,\n specificArgs: z.infer<typeof ConnectionMonitorZodSchema>\n ): Promise<void> {\n const hcs10Builder = builder as HCS10Builder;\n await hcs10Builder.monitorConnections({\n ...(specificArgs.acceptAll !== undefined && {\n acceptAll: specificArgs.acceptAll,\n }),\n ...(specificArgs.targetAccountId !== undefined && {\n targetAccountId: specificArgs.targetAccountId,\n }),\n ...(specificArgs.monitorDurationSeconds !== undefined && {\n monitorDurationSeconds: specificArgs.monitorDurationSeconds,\n }),\n hbarFees: (specificArgs.hbarFees || []) as Array<{\n amount: number;\n collectorAccount?: string;\n }>,\n tokenFees: (specificArgs.tokenFees || []) as Array<{\n amount: number;\n tokenId: string;\n collectorAccount?: string;\n }>,\n ...(specificArgs.exemptAccountIds !== undefined && {\n exemptAccountIds: specificArgs.exemptAccountIds,\n }),\n ...(specificArgs.defaultCollectorAccount !== undefined && {\n defaultCollectorAccount: specificArgs.defaultCollectorAccount,\n }),\n });\n }\n}\n"],"names":[],"mappings":";;AAMA,MAAM,6BAA6B,EAAE,OAAO;AAAA,EAC1C,WAAW,EACR,UACA,WACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,iBAAiB,EACd,SACA,WACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,UAAU,EACP;AAAA,IACC,EAAE,OAAO;AAAA,MACP,QAAQ,EAAE,OAAA;AAAA,MACV,kBAAkB,EAAE,OAAA,EAAS,SAAA;AAAA,IAAS,CACvC;AAAA,EAAA,EAEF,WACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,WAAW,EACR;AAAA,IACC,EAAE,OAAO;AAAA,MACP,QAAQ,EAAE,OAAA;AAAA,MACV,SAAS,EAAE,OAAA;AAAA,MACX,kBAAkB,EAAE,OAAA,EAAS,SAAA;AAAA,IAAS,CACvC;AAAA,EAAA,EAEF,WACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,kBAAkB,EACf,MAAM,EAAE,QAAQ,EAChB,WACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,wBAAwB,EACrB,SACA,WACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,yBAAyB,EACtB,SACA,WACA;AAAA,IACC;AAAA,EAAA;AAEN,CAAC;AAKM,MAAM,8BAA8B,yBAEzC;AAAA,EAKA,YAAY,QAAoC;AAC9C,UAAM,MAAM;AALd,SAAA,OAAO;AACP,SAAA,cACE;AACF,SAAA,sBAAsB;AAGpB,SAAK,wBAAwB;AAC7B,SAAK,+BAA+B;AAAA,EACtC;AAAA,EAEA,MAAgB,kBACd,SACA,cACe;AACf,UAAM,eAAe;AACrB,UAAM,aAAa,mBAAmB;AAAA,MACpC,GAAI,aAAa,cAAc,UAAa;AAAA,QAC1C,WAAW,aAAa;AAAA,MAAA;AAAA,MAE1B,GAAI,aAAa,oBAAoB,UAAa;AAAA,QAChD,iBAAiB,aAAa;AAAA,MAAA;AAAA,MAEhC,GAAI,aAAa,2BAA2B,UAAa;AAAA,QACvD,wBAAwB,aAAa;AAAA,MAAA;AAAA,MAEvC,UAAW,aAAa,YAAY,CAAA;AAAA,MAIpC,WAAY,aAAa,aAAa,CAAA;AAAA,MAKtC,GAAI,aAAa,qBAAqB,UAAa;AAAA,QACjD,kBAAkB,aAAa;AAAA,MAAA;AAAA,MAEjC,GAAI,aAAa,4BAA4B,UAAa;AAAA,QACxD,yBAAyB,aAAa;AAAA,MAAA;AAAA,IACxC,CACD;AAAA,EACH;AACF;"}
1
+ {"version":3,"file":"standards-agent-kit.es11.js","sources":["../../src/tools/hcs10/CheckMessagesTool.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseHCS10QueryTool } from './base-hcs10-tools';\nimport { HCS10QueryToolParams } from './hcs10-tool-params';\n\n/**\n * A tool to check for new messages on an active HCS-10 connection topic,\n * or optionally fetch the latest messages regardless of timestamp.\n */\nconst CheckMessagesZodSchema = z.object({\n targetIdentifier: z\n .string()\n .describe(\n \"The account ID (e.g., 0.0.12345) of the target agent OR the connection number (e.g., '1', '2') from the 'list_connections' tool to check messages for.\"\n ),\n fetchLatest: z\n .boolean()\n .optional()\n .default(false)\n .describe(\n 'Set to true to fetch the latest messages even if they have been seen before, ignoring the last checked timestamp. Defaults to false (fetching only new messages).'\n ),\n lastMessagesCount: z\n .number()\n .int()\n .positive()\n .optional()\n .describe(\n 'When fetchLatest is true, specifies how many of the most recent messages to retrieve. Defaults to 1.'\n ),\n});\n\nexport class CheckMessagesTool extends BaseHCS10QueryTool<\n typeof CheckMessagesZodSchema\n> {\n name = 'check_messages';\n description = `Checks for and retrieves messages from an active connection.\nIdentify the target agent using their account ID (e.g., 0.0.12345) or the connection number shown in 'list_connections'.\nBy default, it only retrieves messages newer than the last check.\nUse 'fetchLatest: true' to get the most recent messages regardless of when they arrived.\nUse 'lastMessagesCount' to specify how many latest messages to retrieve (default 1 when fetchLatest is true).`;\n specificInputSchema = CheckMessagesZodSchema;\n constructor(params: HCS10QueryToolParams) {\n super(params);\n }\n\n protected async executeQuery({\n targetIdentifier,\n fetchLatest,\n lastMessagesCount,\n }: z.infer<typeof CheckMessagesZodSchema>): Promise<unknown> {\n const hcs10Builder = this.hcs10Builder;\n await hcs10Builder.checkMessages({\n targetIdentifier,\n fetchLatest,\n lastMessagesCount: lastMessagesCount || 1,\n });\n\n const result = await hcs10Builder.execute();\n\n if (result.success && 'rawResult' in result && result.rawResult) {\n const raw = result.rawResult as {\n formattedOutput?: string;\n message?: string;\n };\n return {\n success: true,\n data: raw.formattedOutput || raw.message || 'Messages checked',\n };\n }\n\n return result;\n }\n}"],"names":[],"mappings":";;AAQA,MAAM,yBAAyB,EAAE,OAAO;AAAA,EACtC,kBAAkB,EACf,OAAA,EACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,aAAa,EACV,QAAA,EACA,WACA,QAAQ,KAAK,EACb;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,mBAAmB,EAChB,SACA,MACA,SAAA,EACA,SAAA,EACA;AAAA,IACC;AAAA,EAAA;AAEN,CAAC;AAEM,MAAM,0BAA0B,mBAErC;AAAA,EAQA,YAAY,QAA8B;AACxC,UAAM,MAAM;AARd,SAAA,OAAO;AACP,SAAA,cAAc;AAAA;AAAA;AAAA;AAAA;AAKd,SAAA,sBAAsB;AAAA,EAGtB;AAAA,EAEA,MAAgB,aAAa;AAAA,IAC3B;AAAA,IACA;AAAA,IACA;AAAA,EAAA,GAC2D;AAC3D,UAAM,eAAe,KAAK;AAC1B,UAAM,aAAa,cAAc;AAAA,MAC/B;AAAA,MACA;AAAA,MACA,mBAAmB,qBAAqB;AAAA,IAAA,CACzC;AAED,UAAM,SAAS,MAAM,aAAa,QAAA;AAElC,QAAI,OAAO,WAAW,eAAe,UAAU,OAAO,WAAW;AAC/D,YAAM,MAAM,OAAO;AAInB,aAAO;AAAA,QACL,SAAS;AAAA,QACT,MAAM,IAAI,mBAAmB,IAAI,WAAW;AAAA,MAAA;AAAA,IAEhD;AAEA,WAAO;AAAA,EACT;AACF;"}
@@ -1,35 +1,60 @@
1
1
  import { z } from "zod";
2
- import { BaseHCS10QueryTool } from "./standards-agent-kit.es4.js";
3
- const ManageConnectionRequestsZodSchema = z.object({
4
- action: z.enum(["list", "view", "reject"]).describe(
5
- "The action to perform: list all requests, view details of a specific request, or reject a request"
2
+ import { AIAgentCapability } from "@hashgraphonline/standards-sdk";
3
+ import { BaseHCS10QueryTool } from "./standards-agent-kit.es6.js";
4
+ import { NaturalLanguageMapper } from "./standards-agent-kit.es18.js";
5
+ const FindRegistrationsZodSchema = z.object({
6
+ accountId: z.string().optional().describe(
7
+ "Optional: Filter registrations by a specific Hedera account ID (e.g., 0.0.12345)."
6
8
  ),
7
- requestKey: z.string().optional().describe(
8
- "The unique request key to view or reject (required for view and reject actions)"
9
+ tags: z.union([
10
+ z.array(z.nativeEnum(AIAgentCapability)),
11
+ z.array(z.string()),
12
+ z.string()
13
+ ]).optional().transform((val) => {
14
+ if (!val) return void 0;
15
+ if (typeof val === "string") {
16
+ return NaturalLanguageMapper.parseCapabilities(val);
17
+ }
18
+ if (Array.isArray(val) && val.length > 0 && typeof val[0] === "string") {
19
+ return NaturalLanguageMapper.parseTagsOrCapabilities(val);
20
+ }
21
+ return val;
22
+ }).describe(
23
+ 'Optional: Filter by capabilities/tags like "ai", "data", "analytics". Can be natural language terms or capability numbers.'
9
24
  )
10
25
  });
11
- class ManageConnectionRequestsTool extends BaseHCS10QueryTool {
26
+ class FindRegistrationsTool extends BaseHCS10QueryTool {
12
27
  constructor(params) {
13
28
  super(params);
14
- this.name = "manage_connection_requests";
15
- this.description = 'Manage incoming connection requests. List pending requests, view details about requesting agents, and reject connection requests. Use the separate "accept_connection_request" tool to accept.';
16
- this.specificInputSchema = ManageConnectionRequestsZodSchema;
29
+ this.name = "find_registrations";
30
+ this.description = 'Searches the configured agent registry for HCS-10 agents. You can filter by account ID or tags/capabilities using natural language like "ai", "data processing", "analytics". Returns basic registration info.';
31
+ this.specificInputSchema = FindRegistrationsZodSchema;
17
32
  }
18
33
  async executeQuery({
19
- action,
20
- requestKey
34
+ accountId,
35
+ tags
21
36
  }) {
22
37
  const hcs10Builder = this.hcs10Builder;
23
- const params = { action };
24
- if (requestKey !== void 0) {
25
- params.requestKey = requestKey;
38
+ const params = {};
39
+ if (accountId) {
40
+ params.accountId = accountId;
26
41
  }
27
- await hcs10Builder.manageConnectionRequests(params);
42
+ if (tags) {
43
+ params.tags = tags;
44
+ }
45
+ await hcs10Builder.findRegistrations(params);
28
46
  const result = await hcs10Builder.execute();
29
- return "rawResult" in result ? result.rawResult : result;
47
+ if (result.success && "rawResult" in result && result.rawResult) {
48
+ const raw = result.rawResult;
49
+ return {
50
+ success: true,
51
+ data: raw.formattedOutput || raw.message || "Registrations searched"
52
+ };
53
+ }
54
+ return result;
30
55
  }
31
56
  }
32
57
  export {
33
- ManageConnectionRequestsTool
58
+ FindRegistrationsTool
34
59
  };
35
60
  //# sourceMappingURL=standards-agent-kit.es12.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standards-agent-kit.es12.js","sources":["../../src/tools/hcs10/ManageConnectionRequestsTool.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseHCS10QueryTool } from './base-hcs10-tools';\nimport { HCS10QueryToolParams } from './hcs10-tool-params';\n\nconst ManageConnectionRequestsZodSchema = z.object({\n action: z\n .enum(['list', 'view', 'reject'])\n .describe(\n 'The action to perform: list all requests, view details of a specific request, or reject a request'\n ),\n requestKey: z\n .string()\n .optional()\n .describe(\n 'The unique request key to view or reject (required for view and reject actions)'\n ),\n});\n\n/**\n * A tool for managing incoming connection requests in a LangChain-compatible way.\n * This tool allows an agent to list, view details of, and reject incoming connection requests.\n */\nexport class ManageConnectionRequestsTool extends BaseHCS10QueryTool<\n typeof ManageConnectionRequestsZodSchema\n> {\n name = 'manage_connection_requests';\n description =\n 'Manage incoming connection requests. List pending requests, view details about requesting agents, and reject connection requests. Use the separate \"accept_connection_request\" tool to accept.';\n specificInputSchema = ManageConnectionRequestsZodSchema;\n constructor(params: HCS10QueryToolParams) {\n super(params);\n }\n\n protected async executeQuery({\n action,\n requestKey,\n }: z.infer<typeof ManageConnectionRequestsZodSchema>): Promise<unknown> {\n const hcs10Builder = this.hcs10Builder;\n const params: { action: 'list' | 'view' | 'reject'; requestKey?: string } =\n { action };\n if (requestKey !== undefined) {\n params.requestKey = requestKey;\n }\n await hcs10Builder.manageConnectionRequests(params);\n const result = await hcs10Builder.execute();\n return 'rawResult' in result ? result.rawResult : result;\n }\n}\n"],"names":[],"mappings":";;AAIA,MAAM,oCAAoC,EAAE,OAAO;AAAA,EACjD,QAAQ,EACL,KAAK,CAAC,QAAQ,QAAQ,QAAQ,CAAC,EAC/B;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,YAAY,EACT,SACA,WACA;AAAA,IACC;AAAA,EAAA;AAEN,CAAC;AAMM,MAAM,qCAAqC,mBAEhD;AAAA,EAKA,YAAY,QAA8B;AACxC,UAAM,MAAM;AALd,SAAA,OAAO;AACP,SAAA,cACE;AACF,SAAA,sBAAsB;AAAA,EAGtB;AAAA,EAEA,MAAgB,aAAa;AAAA,IAC3B;AAAA,IACA;AAAA,EAAA,GACsE;AACtE,UAAM,eAAe,KAAK;AAC1B,UAAM,SACJ,EAAE,OAAA;AACJ,QAAI,eAAe,QAAW;AAC5B,aAAO,aAAa;AAAA,IACtB;AACA,UAAM,aAAa,yBAAyB,MAAM;AAClD,UAAM,SAAS,MAAM,aAAa,QAAA;AAClC,WAAO,eAAe,SAAS,OAAO,YAAY;AAAA,EACpD;AACF;"}
1
+ {"version":3,"file":"standards-agent-kit.es12.js","sources":["../../src/tools/hcs10/FindRegistrationsTool.ts"],"sourcesContent":["import { z } from 'zod';\nimport { AIAgentCapability } from '@hashgraphonline/standards-sdk';\nimport { BaseHCS10QueryTool } from './base-hcs10-tools';\nimport { HCS10QueryToolParams } from './hcs10-tool-params';\nimport { NaturalLanguageMapper } from './natural-language-mapper';\n\n/**\n * A tool to search for registered HCS-10 agents using the configured registry.\n */\nconst FindRegistrationsZodSchema = z.object({\n accountId: z\n .string()\n .optional()\n .describe(\n 'Optional: Filter registrations by a specific Hedera account ID (e.g., 0.0.12345).'\n ),\n tags: z\n .union([\n z.array(z.nativeEnum(AIAgentCapability)),\n z.array(z.string()),\n z.string(),\n ])\n .optional()\n .transform((val) => {\n if (!val) return undefined;\n if (typeof val === 'string') {\n return NaturalLanguageMapper.parseCapabilities(val);\n }\n if (Array.isArray(val) && val.length > 0 && typeof val[0] === 'string') {\n return NaturalLanguageMapper.parseTagsOrCapabilities(val);\n }\n return val as AIAgentCapability[];\n })\n .describe(\n 'Optional: Filter by capabilities/tags like \"ai\", \"data\", \"analytics\". Can be natural language terms or capability numbers.'\n ),\n});\n\nexport class FindRegistrationsTool extends BaseHCS10QueryTool<\n typeof FindRegistrationsZodSchema\n> {\n name = 'find_registrations';\n description =\n 'Searches the configured agent registry for HCS-10 agents. You can filter by account ID or tags/capabilities using natural language like \"ai\", \"data processing\", \"analytics\". Returns basic registration info.';\n specificInputSchema = FindRegistrationsZodSchema;\n constructor(params: HCS10QueryToolParams) {\n super(params);\n }\n\n protected async executeQuery({\n accountId,\n tags,\n }: z.infer<typeof FindRegistrationsZodSchema>): Promise<unknown> {\n const hcs10Builder = this.hcs10Builder;\n const params: { accountId?: string; tags?: number[] } = {};\n if (accountId) {\n params.accountId = accountId;\n }\n if (tags) {\n params.tags = tags as number[];\n }\n await hcs10Builder.findRegistrations(params);\n\n const result = await hcs10Builder.execute();\n\n if (result.success && 'rawResult' in result && result.rawResult) {\n const raw = result.rawResult as {\n formattedOutput?: string;\n message?: string;\n };\n return {\n success: true,\n data: raw.formattedOutput || raw.message || 'Registrations searched',\n };\n }\n\n return result;\n }\n}"],"names":[],"mappings":";;;;AASA,MAAM,6BAA6B,EAAE,OAAO;AAAA,EAC1C,WAAW,EACR,SACA,WACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,MAAM,EACH,MAAM;AAAA,IACL,EAAE,MAAM,EAAE,WAAW,iBAAiB,CAAC;AAAA,IACvC,EAAE,MAAM,EAAE,QAAQ;AAAA,IAClB,EAAE,OAAA;AAAA,EAAO,CACV,EACA,SAAA,EACA,UAAU,CAAC,QAAQ;AAClB,QAAI,CAAC,IAAK,QAAO;AACjB,QAAI,OAAO,QAAQ,UAAU;AAC3B,aAAO,sBAAsB,kBAAkB,GAAG;AAAA,IACpD;AACA,QAAI,MAAM,QAAQ,GAAG,KAAK,IAAI,SAAS,KAAK,OAAO,IAAI,CAAC,MAAM,UAAU;AACtE,aAAO,sBAAsB,wBAAwB,GAAG;AAAA,IAC1D;AACA,WAAO;AAAA,EACT,CAAC,EACA;AAAA,IACC;AAAA,EAAA;AAEN,CAAC;AAEM,MAAM,8BAA8B,mBAEzC;AAAA,EAKA,YAAY,QAA8B;AACxC,UAAM,MAAM;AALd,SAAA,OAAO;AACP,SAAA,cACE;AACF,SAAA,sBAAsB;AAAA,EAGtB;AAAA,EAEA,MAAgB,aAAa;AAAA,IAC3B;AAAA,IACA;AAAA,EAAA,GAC+D;AAC/D,UAAM,eAAe,KAAK;AAC1B,UAAM,SAAkD,CAAA;AACxD,QAAI,WAAW;AACb,aAAO,YAAY;AAAA,IACrB;AACA,QAAI,MAAM;AACR,aAAO,OAAO;AAAA,IAChB;AACA,UAAM,aAAa,kBAAkB,MAAM;AAE3C,UAAM,SAAS,MAAM,aAAa,QAAA;AAElC,QAAI,OAAO,WAAW,eAAe,UAAU,OAAO,WAAW;AAC/D,YAAM,MAAM,OAAO;AAInB,aAAO;AAAA,QACL,SAAS;AAAA,QACT,MAAM,IAAI,mBAAmB,IAAI,WAAW;AAAA,MAAA;AAAA,IAEhD;AAEA,WAAO;AAAA,EACT;AACF;"}
@@ -1,35 +1,72 @@
1
1
  import { z } from "zod";
2
- import { BaseHCS10TransactionTool } from "./standards-agent-kit.es4.js";
3
- const AcceptConnectionRequestZodSchema = z.object({
4
- requestKey: z.string().describe(
5
- 'The unique request key of the specific request to accept. Use the "manage_connection_requests" tool with action="list" first to get valid keys.'
2
+ import { BaseHCS10TransactionTool } from "./standards-agent-kit.es6.js";
3
+ const ConnectionMonitorZodSchema = z.object({
4
+ acceptAll: z.boolean().optional().describe(
5
+ "Whether to automatically accept all incoming connection requests. Default is false."
6
6
  ),
7
- hbarFee: z.number().optional().describe(
8
- "Optional HBAR fee amount to charge the connecting agent per message on the new connection topic."
7
+ targetAccountId: z.string().optional().describe(
8
+ "If provided, only accept connection requests from this specific account ID."
9
+ ),
10
+ hbarFees: z.array(
11
+ z.object({
12
+ amount: z.number(),
13
+ collectorAccount: z.string().optional()
14
+ })
15
+ ).optional().describe(
16
+ "Array of HBAR fee amounts to charge per message (with optional collector accounts)."
17
+ ),
18
+ tokenFees: z.array(
19
+ z.object({
20
+ amount: z.number(),
21
+ tokenId: z.string(),
22
+ collectorAccount: z.string().optional()
23
+ })
24
+ ).optional().describe(
25
+ "Array of token fee amounts and IDs to charge per message (with optional collector accounts)."
9
26
  ),
10
27
  exemptAccountIds: z.array(z.string()).optional().describe(
11
- "Optional list of account IDs to exempt from any configured fees on the new connection topic."
28
+ "Array of account IDs to exempt from ALL fees set in this request."
29
+ ),
30
+ monitorDurationSeconds: z.number().optional().describe(
31
+ "How long to monitor for incoming requests in seconds. Default is 120."
32
+ ),
33
+ defaultCollectorAccount: z.string().optional().describe(
34
+ "Default account to collect fees if not specified at the fee level. Defaults to the agent account."
12
35
  )
13
36
  });
14
- class AcceptConnectionRequestTool extends BaseHCS10TransactionTool {
37
+ class ConnectionMonitorTool extends BaseHCS10TransactionTool {
15
38
  constructor(params) {
16
39
  super(params);
17
- this.name = "accept_connection_request";
18
- this.description = "Accepts a pending HCS-10 connection request from another agent. Use list_unapproved_connection_requests to see pending requests.";
19
- this.specificInputSchema = AcceptConnectionRequestZodSchema;
40
+ this.name = "monitor_connections";
41
+ this.description = "Monitors for incoming connection requests and accepts them with optional fee settings. Use this to watch for connection requests and accept them, optionally setting HBAR or token fees on the connection. Note: When acceptAll=true, this tool requires multiple transactions and cannot be used in returnBytes mode.";
42
+ this.specificInputSchema = ConnectionMonitorZodSchema;
20
43
  this.neverScheduleThisTool = true;
21
44
  this.requiresMultipleTransactions = true;
22
45
  }
23
46
  async callBuilderMethod(builder, specificArgs) {
24
47
  const hcs10Builder = builder;
25
- await hcs10Builder.acceptConnection({
26
- requestKey: specificArgs.requestKey,
27
- hbarFee: specificArgs.hbarFee,
28
- exemptAccountIds: specificArgs.exemptAccountIds
48
+ await hcs10Builder.monitorConnections({
49
+ ...specificArgs.acceptAll !== void 0 && {
50
+ acceptAll: specificArgs.acceptAll
51
+ },
52
+ ...specificArgs.targetAccountId !== void 0 && {
53
+ targetAccountId: specificArgs.targetAccountId
54
+ },
55
+ ...specificArgs.monitorDurationSeconds !== void 0 && {
56
+ monitorDurationSeconds: specificArgs.monitorDurationSeconds
57
+ },
58
+ hbarFees: specificArgs.hbarFees || [],
59
+ tokenFees: specificArgs.tokenFees || [],
60
+ ...specificArgs.exemptAccountIds !== void 0 && {
61
+ exemptAccountIds: specificArgs.exemptAccountIds
62
+ },
63
+ ...specificArgs.defaultCollectorAccount !== void 0 && {
64
+ defaultCollectorAccount: specificArgs.defaultCollectorAccount
65
+ }
29
66
  });
30
67
  }
31
68
  }
32
69
  export {
33
- AcceptConnectionRequestTool
70
+ ConnectionMonitorTool
34
71
  };
35
72
  //# sourceMappingURL=standards-agent-kit.es13.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standards-agent-kit.es13.js","sources":["../../src/tools/hcs10/AcceptConnectionRequestTool.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseHCS10TransactionTool } from './base-hcs10-tools';\nimport { HCS10Builder } from '../../builders/hcs10/hcs10-builder';\nimport { HCS10TransactionToolParams } from './hcs10-tool-params';\nimport { BaseServiceBuilder } from 'hedera-agent-kit';\n\nconst AcceptConnectionRequestZodSchema = z.object({\n requestKey: z\n .string()\n .describe(\n 'The unique request key of the specific request to accept. Use the \"manage_connection_requests\" tool with action=\"list\" first to get valid keys.'\n ),\n hbarFee: z\n .number()\n .optional()\n .describe(\n 'Optional HBAR fee amount to charge the connecting agent per message on the new connection topic.'\n ),\n exemptAccountIds: z\n .array(z.string())\n .optional()\n .describe(\n 'Optional list of account IDs to exempt from any configured fees on the new connection topic.'\n ),\n});\n\n/**\n * Tool for accepting incoming HCS-10 connection requests\n */\nexport class AcceptConnectionRequestTool extends BaseHCS10TransactionTool<\n typeof AcceptConnectionRequestZodSchema\n> {\n name = 'accept_connection_request';\n description =\n 'Accepts a pending HCS-10 connection request from another agent. Use list_unapproved_connection_requests to see pending requests.';\n specificInputSchema = AcceptConnectionRequestZodSchema;\n\n constructor(params: HCS10TransactionToolParams) {\n super(params);\n this.neverScheduleThisTool = true;\n this.requiresMultipleTransactions = true;\n }\n\n protected async callBuilderMethod(\n builder: BaseServiceBuilder,\n specificArgs: z.infer<typeof AcceptConnectionRequestZodSchema>\n ): Promise<void> {\n const hcs10Builder = builder as HCS10Builder;\n\n await hcs10Builder.acceptConnection({\n requestKey: specificArgs.requestKey,\n hbarFee: specificArgs.hbarFee,\n exemptAccountIds: specificArgs.exemptAccountIds,\n });\n }\n}"],"names":[],"mappings":";;AAMA,MAAM,mCAAmC,EAAE,OAAO;AAAA,EAChD,YAAY,EACT,OAAA,EACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,SAAS,EACN,SACA,WACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,kBAAkB,EACf,MAAM,EAAE,QAAQ,EAChB,WACA;AAAA,IACC;AAAA,EAAA;AAEN,CAAC;AAKM,MAAM,oCAAoC,yBAE/C;AAAA,EAMA,YAAY,QAAoC;AAC9C,UAAM,MAAM;AANd,SAAA,OAAO;AACP,SAAA,cACE;AACF,SAAA,sBAAsB;AAIpB,SAAK,wBAAwB;AAC7B,SAAK,+BAA+B;AAAA,EACtC;AAAA,EAEA,MAAgB,kBACd,SACA,cACe;AACf,UAAM,eAAe;AAErB,UAAM,aAAa,iBAAiB;AAAA,MAClC,YAAY,aAAa;AAAA,MACzB,SAAS,aAAa;AAAA,MACtB,kBAAkB,aAAa;AAAA,IAAA,CAChC;AAAA,EACH;AACF;"}
1
+ {"version":3,"file":"standards-agent-kit.es13.js","sources":["../../src/tools/hcs10/ConnectionMonitorTool.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseHCS10TransactionTool } from './base-hcs10-tools';\nimport { HCS10Builder } from '../../builders/hcs10/hcs10-builder';\nimport { HCS10TransactionToolParams } from './hcs10-tool-params';\nimport { BaseServiceBuilder } from 'hedera-agent-kit';\n\nconst ConnectionMonitorZodSchema = z.object({\n acceptAll: z\n .boolean()\n .optional()\n .describe(\n 'Whether to automatically accept all incoming connection requests. Default is false.'\n ),\n targetAccountId: z\n .string()\n .optional()\n .describe(\n 'If provided, only accept connection requests from this specific account ID.'\n ),\n hbarFees: z\n .array(\n z.object({\n amount: z.number(),\n collectorAccount: z.string().optional(),\n })\n )\n .optional()\n .describe(\n 'Array of HBAR fee amounts to charge per message (with optional collector accounts).'\n ),\n tokenFees: z\n .array(\n z.object({\n amount: z.number(),\n tokenId: z.string(),\n collectorAccount: z.string().optional(),\n })\n )\n .optional()\n .describe(\n 'Array of token fee amounts and IDs to charge per message (with optional collector accounts).'\n ),\n exemptAccountIds: z\n .array(z.string())\n .optional()\n .describe(\n 'Array of account IDs to exempt from ALL fees set in this request.'\n ),\n monitorDurationSeconds: z\n .number()\n .optional()\n .describe(\n 'How long to monitor for incoming requests in seconds. Default is 120.'\n ),\n defaultCollectorAccount: z\n .string()\n .optional()\n .describe(\n 'Default account to collect fees if not specified at the fee level. Defaults to the agent account.'\n ),\n});\n\n/**\n * A tool for monitoring incoming connection requests and accepting them with optional fee settings.\n */\nexport class ConnectionMonitorTool extends BaseHCS10TransactionTool<\n typeof ConnectionMonitorZodSchema\n> {\n name = 'monitor_connections';\n description =\n 'Monitors for incoming connection requests and accepts them with optional fee settings. Use this to watch for connection requests and accept them, optionally setting HBAR or token fees on the connection. Note: When acceptAll=true, this tool requires multiple transactions and cannot be used in returnBytes mode.';\n specificInputSchema = ConnectionMonitorZodSchema;\n constructor(params: HCS10TransactionToolParams) {\n super(params);\n this.neverScheduleThisTool = true;\n this.requiresMultipleTransactions = true;\n }\n\n protected async callBuilderMethod(\n builder: BaseServiceBuilder,\n specificArgs: z.infer<typeof ConnectionMonitorZodSchema>\n ): Promise<void> {\n const hcs10Builder = builder as HCS10Builder;\n await hcs10Builder.monitorConnections({\n ...(specificArgs.acceptAll !== undefined && {\n acceptAll: specificArgs.acceptAll,\n }),\n ...(specificArgs.targetAccountId !== undefined && {\n targetAccountId: specificArgs.targetAccountId,\n }),\n ...(specificArgs.monitorDurationSeconds !== undefined && {\n monitorDurationSeconds: specificArgs.monitorDurationSeconds,\n }),\n hbarFees: (specificArgs.hbarFees || []) as Array<{\n amount: number;\n collectorAccount?: string;\n }>,\n tokenFees: (specificArgs.tokenFees || []) as Array<{\n amount: number;\n tokenId: string;\n collectorAccount?: string;\n }>,\n ...(specificArgs.exemptAccountIds !== undefined && {\n exemptAccountIds: specificArgs.exemptAccountIds,\n }),\n ...(specificArgs.defaultCollectorAccount !== undefined && {\n defaultCollectorAccount: specificArgs.defaultCollectorAccount,\n }),\n });\n }\n}\n"],"names":[],"mappings":";;AAMA,MAAM,6BAA6B,EAAE,OAAO;AAAA,EAC1C,WAAW,EACR,UACA,WACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,iBAAiB,EACd,SACA,WACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,UAAU,EACP;AAAA,IACC,EAAE,OAAO;AAAA,MACP,QAAQ,EAAE,OAAA;AAAA,MACV,kBAAkB,EAAE,OAAA,EAAS,SAAA;AAAA,IAAS,CACvC;AAAA,EAAA,EAEF,WACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,WAAW,EACR;AAAA,IACC,EAAE,OAAO;AAAA,MACP,QAAQ,EAAE,OAAA;AAAA,MACV,SAAS,EAAE,OAAA;AAAA,MACX,kBAAkB,EAAE,OAAA,EAAS,SAAA;AAAA,IAAS,CACvC;AAAA,EAAA,EAEF,WACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,kBAAkB,EACf,MAAM,EAAE,QAAQ,EAChB,WACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,wBAAwB,EACrB,SACA,WACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,yBAAyB,EACtB,SACA,WACA;AAAA,IACC;AAAA,EAAA;AAEN,CAAC;AAKM,MAAM,8BAA8B,yBAEzC;AAAA,EAKA,YAAY,QAAoC;AAC9C,UAAM,MAAM;AALd,SAAA,OAAO;AACP,SAAA,cACE;AACF,SAAA,sBAAsB;AAGpB,SAAK,wBAAwB;AAC7B,SAAK,+BAA+B;AAAA,EACtC;AAAA,EAEA,MAAgB,kBACd,SACA,cACe;AACf,UAAM,eAAe;AACrB,UAAM,aAAa,mBAAmB;AAAA,MACpC,GAAI,aAAa,cAAc,UAAa;AAAA,QAC1C,WAAW,aAAa;AAAA,MAAA;AAAA,MAE1B,GAAI,aAAa,oBAAoB,UAAa;AAAA,QAChD,iBAAiB,aAAa;AAAA,MAAA;AAAA,MAEhC,GAAI,aAAa,2BAA2B,UAAa;AAAA,QACvD,wBAAwB,aAAa;AAAA,MAAA;AAAA,MAEvC,UAAW,aAAa,YAAY,CAAA;AAAA,MAIpC,WAAY,aAAa,aAAa,CAAA;AAAA,MAKtC,GAAI,aAAa,qBAAqB,UAAa;AAAA,QACjD,kBAAkB,aAAa;AAAA,MAAA;AAAA,MAEjC,GAAI,aAAa,4BAA4B,UAAa;AAAA,QACxD,yBAAyB,aAAa;AAAA,MAAA;AAAA,IACxC,CACD;AAAA,EACH;AACF;"}
@@ -1,45 +1,35 @@
1
1
  import { z } from "zod";
2
- import { BaseHCS10QueryTool } from "./standards-agent-kit.es4.js";
3
- const RetrieveProfileZodSchema = z.object({
4
- accountId: z.string().describe(
5
- "The Hedera account ID of the agent whose profile you want to retrieve (e.g., 0.0.12345)."
2
+ import { BaseHCS10QueryTool } from "./standards-agent-kit.es6.js";
3
+ const ManageConnectionRequestsZodSchema = z.object({
4
+ action: z.enum(["list", "view", "reject"]).describe(
5
+ "The action to perform: list all requests, view details of a specific request, or reject a request"
6
6
  ),
7
- disableCache: z.boolean().optional().describe(
8
- "Optional: Force refresh from the network instead of using cache."
7
+ requestKey: z.string().optional().describe(
8
+ "The unique request key to view or reject (required for view and reject actions)"
9
9
  )
10
10
  });
11
- class RetrieveProfileTool extends BaseHCS10QueryTool {
11
+ class ManageConnectionRequestsTool extends BaseHCS10QueryTool {
12
12
  constructor(params) {
13
13
  super(params);
14
- this.name = "retrieve_profile";
15
- this.description = "Gets the detailed profile information for a specific HCS-10 agent by their account ID. Returns name, bio, capabilities, topics, and other metadata.";
16
- this.specificInputSchema = RetrieveProfileZodSchema;
14
+ this.name = "manage_connection_requests";
15
+ this.description = 'Manage incoming connection requests. List pending requests, view details about requesting agents, and reject connection requests. Use the separate "accept_connection_request" tool to accept.';
16
+ this.specificInputSchema = ManageConnectionRequestsZodSchema;
17
17
  }
18
18
  async executeQuery({
19
- accountId,
20
- disableCache
19
+ action,
20
+ requestKey
21
21
  }) {
22
22
  const hcs10Builder = this.hcs10Builder;
23
- const params = {
24
- accountId
25
- };
26
- if (disableCache !== void 0) {
27
- params.disableCache = disableCache;
23
+ const params = { action };
24
+ if (requestKey !== void 0) {
25
+ params.requestKey = requestKey;
28
26
  }
29
- await hcs10Builder.retrieveProfile(params);
27
+ await hcs10Builder.manageConnectionRequests(params);
30
28
  const result = await hcs10Builder.execute();
31
- if (result.success && "rawResult" in result && result.rawResult) {
32
- const raw = result.rawResult;
33
- return {
34
- success: true,
35
- data: raw.profileDetails || "Profile retrieved",
36
- rawProfile: raw.rawProfile
37
- };
38
- }
39
- return result;
29
+ return "rawResult" in result ? result.rawResult : result;
40
30
  }
41
31
  }
42
32
  export {
43
- RetrieveProfileTool
33
+ ManageConnectionRequestsTool
44
34
  };
45
35
  //# sourceMappingURL=standards-agent-kit.es14.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standards-agent-kit.es14.js","sources":["../../src/tools/hcs10/RetrieveProfileTool.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseHCS10QueryTool } from './base-hcs10-tools';\nimport { HCS10QueryToolParams } from './hcs10-tool-params';\nconst RetrieveProfileZodSchema = z.object({\n accountId: z\n .string()\n .describe(\n 'The Hedera account ID of the agent whose profile you want to retrieve (e.g., 0.0.12345).'\n ),\n disableCache: z\n .boolean()\n .optional()\n .describe(\n 'Optional: Force refresh from the network instead of using cache.'\n ),\n});\n\n/**\n * Tool to retrieve detailed profile information for a specific HCS-10 agent\n */\nexport class RetrieveProfileTool extends BaseHCS10QueryTool<\n typeof RetrieveProfileZodSchema\n> {\n name = 'retrieve_profile';\n description =\n 'Gets the detailed profile information for a specific HCS-10 agent by their account ID. Returns name, bio, capabilities, topics, and other metadata.';\n specificInputSchema = RetrieveProfileZodSchema;\n constructor(params: HCS10QueryToolParams) {\n super(params);\n }\n\n protected async executeQuery({\n accountId,\n disableCache,\n }: z.infer<typeof RetrieveProfileZodSchema>): Promise<unknown> {\n const hcs10Builder = this.hcs10Builder;\n const params: { accountId: string; disableCache?: boolean } = {\n accountId,\n };\n if (disableCache !== undefined) {\n params.disableCache = disableCache;\n }\n await hcs10Builder.retrieveProfile(params);\n\n const result = await hcs10Builder.execute();\n\n if (result.success && 'rawResult' in result && result.rawResult) {\n const raw = result.rawResult as {\n profileDetails?: string;\n rawProfile?: unknown;\n };\n return {\n success: true,\n data: raw.profileDetails || 'Profile retrieved',\n rawProfile: raw.rawProfile,\n };\n }\n\n return result;\n }\n}"],"names":[],"mappings":";;AAGA,MAAM,2BAA2B,EAAE,OAAO;AAAA,EACxC,WAAW,EACR,OAAA,EACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,cAAc,EACX,UACA,WACA;AAAA,IACC;AAAA,EAAA;AAEN,CAAC;AAKM,MAAM,4BAA4B,mBAEvC;AAAA,EAKA,YAAY,QAA8B;AACxC,UAAM,MAAM;AALd,SAAA,OAAO;AACP,SAAA,cACE;AACF,SAAA,sBAAsB;AAAA,EAGtB;AAAA,EAEA,MAAgB,aAAa;AAAA,IAC3B;AAAA,IACA;AAAA,EAAA,GAC6D;AAC7D,UAAM,eAAe,KAAK;AAC1B,UAAM,SAAwD;AAAA,MAC5D;AAAA,IAAA;AAEF,QAAI,iBAAiB,QAAW;AAC9B,aAAO,eAAe;AAAA,IACxB;AACA,UAAM,aAAa,gBAAgB,MAAM;AAEzC,UAAM,SAAS,MAAM,aAAa,QAAA;AAElC,QAAI,OAAO,WAAW,eAAe,UAAU,OAAO,WAAW;AAC/D,YAAM,MAAM,OAAO;AAInB,aAAO;AAAA,QACL,SAAS;AAAA,QACT,MAAM,IAAI,kBAAkB;AAAA,QAC5B,YAAY,IAAI;AAAA,MAAA;AAAA,IAEpB;AAEA,WAAO;AAAA,EACT;AACF;"}
1
+ {"version":3,"file":"standards-agent-kit.es14.js","sources":["../../src/tools/hcs10/ManageConnectionRequestsTool.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseHCS10QueryTool } from './base-hcs10-tools';\nimport { HCS10QueryToolParams } from './hcs10-tool-params';\n\nconst ManageConnectionRequestsZodSchema = z.object({\n action: z\n .enum(['list', 'view', 'reject'])\n .describe(\n 'The action to perform: list all requests, view details of a specific request, or reject a request'\n ),\n requestKey: z\n .string()\n .optional()\n .describe(\n 'The unique request key to view or reject (required for view and reject actions)'\n ),\n});\n\n/**\n * A tool for managing incoming connection requests in a LangChain-compatible way.\n * This tool allows an agent to list, view details of, and reject incoming connection requests.\n */\nexport class ManageConnectionRequestsTool extends BaseHCS10QueryTool<\n typeof ManageConnectionRequestsZodSchema\n> {\n name = 'manage_connection_requests';\n description =\n 'Manage incoming connection requests. List pending requests, view details about requesting agents, and reject connection requests. Use the separate \"accept_connection_request\" tool to accept.';\n specificInputSchema = ManageConnectionRequestsZodSchema;\n constructor(params: HCS10QueryToolParams) {\n super(params);\n }\n\n protected async executeQuery({\n action,\n requestKey,\n }: z.infer<typeof ManageConnectionRequestsZodSchema>): Promise<unknown> {\n const hcs10Builder = this.hcs10Builder;\n const params: { action: 'list' | 'view' | 'reject'; requestKey?: string } =\n { action };\n if (requestKey !== undefined) {\n params.requestKey = requestKey;\n }\n await hcs10Builder.manageConnectionRequests(params);\n const result = await hcs10Builder.execute();\n return 'rawResult' in result ? result.rawResult : result;\n }\n}\n"],"names":[],"mappings":";;AAIA,MAAM,oCAAoC,EAAE,OAAO;AAAA,EACjD,QAAQ,EACL,KAAK,CAAC,QAAQ,QAAQ,QAAQ,CAAC,EAC/B;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,YAAY,EACT,SACA,WACA;AAAA,IACC;AAAA,EAAA;AAEN,CAAC;AAMM,MAAM,qCAAqC,mBAEhD;AAAA,EAKA,YAAY,QAA8B;AACxC,UAAM,MAAM;AALd,SAAA,OAAO;AACP,SAAA,cACE;AACF,SAAA,sBAAsB;AAAA,EAGtB;AAAA,EAEA,MAAgB,aAAa;AAAA,IAC3B;AAAA,IACA;AAAA,EAAA,GACsE;AACtE,UAAM,eAAe,KAAK;AAC1B,UAAM,SACJ,EAAE,OAAA;AACJ,QAAI,eAAe,QAAW;AAC5B,aAAO,aAAa;AAAA,IACtB;AACA,UAAM,aAAa,yBAAyB,MAAM;AAClD,UAAM,SAAS,MAAM,aAAa,QAAA;AAClC,WAAO,eAAe,SAAS,OAAO,YAAY;AAAA,EACpD;AACF;"}
@@ -1,21 +1,35 @@
1
1
  import { z } from "zod";
2
- import { BaseHCS10QueryTool } from "./standards-agent-kit.es4.js";
3
- const ListUnapprovedConnectionRequestsZodSchema = z.object({});
4
- class ListUnapprovedConnectionRequestsTool extends BaseHCS10QueryTool {
2
+ import { BaseHCS10TransactionTool } from "./standards-agent-kit.es6.js";
3
+ const AcceptConnectionRequestZodSchema = z.object({
4
+ requestKey: z.string().describe(
5
+ 'The unique request key of the specific request to accept. Use the "manage_connection_requests" tool with action="list" first to get valid keys.'
6
+ ),
7
+ hbarFee: z.number().optional().describe(
8
+ "Optional HBAR fee amount to charge the connecting agent per message on the new connection topic."
9
+ ),
10
+ exemptAccountIds: z.array(z.string()).optional().describe(
11
+ "Optional list of account IDs to exempt from any configured fees on the new connection topic."
12
+ )
13
+ });
14
+ class AcceptConnectionRequestTool extends BaseHCS10TransactionTool {
5
15
  constructor(params) {
6
16
  super(params);
7
- this.name = "list_unapproved_connection_requests";
8
- this.description = "Lists all connection requests that are not fully established, including incoming requests needing approval and outgoing requests waiting for confirmation.";
9
- this.specificInputSchema = ListUnapprovedConnectionRequestsZodSchema;
17
+ this.name = "accept_connection_request";
18
+ this.description = "Accepts a pending HCS-10 connection request from another agent. Use list_unapproved_connection_requests to see pending requests.";
19
+ this.specificInputSchema = AcceptConnectionRequestZodSchema;
20
+ this.neverScheduleThisTool = true;
21
+ this.requiresMultipleTransactions = true;
10
22
  }
11
- async executeQuery() {
12
- const hcs10Builder = this.hcs10Builder;
13
- await hcs10Builder.listUnapprovedConnectionRequests();
14
- const result = await hcs10Builder.execute();
15
- return "rawResult" in result ? result.rawResult : result;
23
+ async callBuilderMethod(builder, specificArgs) {
24
+ const hcs10Builder = builder;
25
+ await hcs10Builder.acceptConnection({
26
+ requestKey: specificArgs.requestKey,
27
+ hbarFee: specificArgs.hbarFee,
28
+ exemptAccountIds: specificArgs.exemptAccountIds
29
+ });
16
30
  }
17
31
  }
18
32
  export {
19
- ListUnapprovedConnectionRequestsTool
33
+ AcceptConnectionRequestTool
20
34
  };
21
35
  //# sourceMappingURL=standards-agent-kit.es15.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standards-agent-kit.es15.js","sources":["../../src/tools/hcs10/ListUnapprovedConnectionRequestsTool.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseHCS10QueryTool } from './base-hcs10-tools';\nimport { HCS10QueryToolParams } from './hcs10-tool-params';\nconst ListUnapprovedConnectionRequestsZodSchema = z.object({});\n\n/**\n * Lists all connection requests that are not fully established\n */\nexport class ListUnapprovedConnectionRequestsTool extends BaseHCS10QueryTool<\n typeof ListUnapprovedConnectionRequestsZodSchema\n> {\n name = 'list_unapproved_connection_requests';\n description =\n 'Lists all connection requests that are not fully established, including incoming requests needing approval and outgoing requests waiting for confirmation.';\n specificInputSchema = ListUnapprovedConnectionRequestsZodSchema;\n constructor(params: HCS10QueryToolParams) {\n super(params);\n }\n\n protected async executeQuery(): Promise<unknown> {\n const hcs10Builder = this.hcs10Builder;\n await hcs10Builder.listUnapprovedConnectionRequests();\n const result = await hcs10Builder.execute();\n return 'rawResult' in result ? result.rawResult : result;\n }\n}"],"names":[],"mappings":";;AAGA,MAAM,4CAA4C,EAAE,OAAO,EAAE;AAKtD,MAAM,6CAA6C,mBAExD;AAAA,EAKA,YAAY,QAA8B;AACxC,UAAM,MAAM;AALd,SAAA,OAAO;AACP,SAAA,cACE;AACF,SAAA,sBAAsB;AAAA,EAGtB;AAAA,EAEA,MAAgB,eAAiC;AAC/C,UAAM,eAAe,KAAK;AAC1B,UAAM,aAAa,iCAAA;AACnB,UAAM,SAAS,MAAM,aAAa,QAAA;AAClC,WAAO,eAAe,SAAS,OAAO,YAAY;AAAA,EACpD;AACF;"}
1
+ {"version":3,"file":"standards-agent-kit.es15.js","sources":["../../src/tools/hcs10/AcceptConnectionRequestTool.ts"],"sourcesContent":["import { z } from 'zod';\nimport { BaseHCS10TransactionTool } from './base-hcs10-tools';\nimport { HCS10Builder } from '../../builders/hcs10/hcs10-builder';\nimport { HCS10TransactionToolParams } from './hcs10-tool-params';\nimport { BaseServiceBuilder } from 'hedera-agent-kit';\n\nconst AcceptConnectionRequestZodSchema = z.object({\n requestKey: z\n .string()\n .describe(\n 'The unique request key of the specific request to accept. Use the \"manage_connection_requests\" tool with action=\"list\" first to get valid keys.'\n ),\n hbarFee: z\n .number()\n .optional()\n .describe(\n 'Optional HBAR fee amount to charge the connecting agent per message on the new connection topic.'\n ),\n exemptAccountIds: z\n .array(z.string())\n .optional()\n .describe(\n 'Optional list of account IDs to exempt from any configured fees on the new connection topic.'\n ),\n});\n\n/**\n * Tool for accepting incoming HCS-10 connection requests\n */\nexport class AcceptConnectionRequestTool extends BaseHCS10TransactionTool<\n typeof AcceptConnectionRequestZodSchema\n> {\n name = 'accept_connection_request';\n description =\n 'Accepts a pending HCS-10 connection request from another agent. Use list_unapproved_connection_requests to see pending requests.';\n specificInputSchema = AcceptConnectionRequestZodSchema;\n\n constructor(params: HCS10TransactionToolParams) {\n super(params);\n this.neverScheduleThisTool = true;\n this.requiresMultipleTransactions = true;\n }\n\n protected async callBuilderMethod(\n builder: BaseServiceBuilder,\n specificArgs: z.infer<typeof AcceptConnectionRequestZodSchema>\n ): Promise<void> {\n const hcs10Builder = builder as HCS10Builder;\n\n await hcs10Builder.acceptConnection({\n requestKey: specificArgs.requestKey,\n hbarFee: specificArgs.hbarFee,\n exemptAccountIds: specificArgs.exemptAccountIds,\n });\n }\n}"],"names":[],"mappings":";;AAMA,MAAM,mCAAmC,EAAE,OAAO;AAAA,EAChD,YAAY,EACT,OAAA,EACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,SAAS,EACN,SACA,WACA;AAAA,IACC;AAAA,EAAA;AAAA,EAEJ,kBAAkB,EACf,MAAM,EAAE,QAAQ,EAChB,WACA;AAAA,IACC;AAAA,EAAA;AAEN,CAAC;AAKM,MAAM,oCAAoC,yBAE/C;AAAA,EAMA,YAAY,QAAoC;AAC9C,UAAM,MAAM;AANd,SAAA,OAAO;AACP,SAAA,cACE;AACF,SAAA,sBAAsB;AAIpB,SAAK,wBAAwB;AAC7B,SAAK,+BAA+B;AAAA,EACtC;AAAA,EAEA,MAAgB,kBACd,SACA,cACe;AACf,UAAM,eAAe;AAErB,UAAM,aAAa,iBAAiB;AAAA,MAClC,YAAY,aAAa;AAAA,MACzB,SAAS,aAAa;AAAA,MACtB,kBAAkB,aAAa;AAAA,IAAA,CAChC;AAAA,EACH;AACF;"}