@hashgraphonline/standards-agent-kit 0.0.18 → 0.0.19

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 (430) hide show
  1. package/README.md +83 -0
  2. package/dist/_virtual/_commonjsHelpers.js +7 -0
  3. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  4. package/dist/_virtual/index.js +8 -0
  5. package/dist/_virtual/index.js.map +1 -0
  6. package/dist/_virtual/index10.js +5 -0
  7. package/dist/_virtual/index10.js.map +1 -0
  8. package/dist/_virtual/index11.js +5 -0
  9. package/dist/_virtual/index11.js.map +1 -0
  10. package/dist/_virtual/index12.js +8 -0
  11. package/dist/_virtual/index12.js.map +1 -0
  12. package/dist/_virtual/index13.js +5 -0
  13. package/dist/_virtual/index13.js.map +1 -0
  14. package/dist/_virtual/index14.js +5 -0
  15. package/dist/_virtual/index14.js.map +1 -0
  16. package/dist/_virtual/index2.js +3 -0
  17. package/dist/_virtual/index2.js.map +1 -0
  18. package/dist/_virtual/index3.js +8 -0
  19. package/dist/_virtual/index3.js.map +1 -0
  20. package/dist/_virtual/index4.js +8 -0
  21. package/dist/_virtual/index4.js.map +1 -0
  22. package/dist/_virtual/index5.js +6 -0
  23. package/dist/_virtual/index5.js.map +1 -0
  24. package/dist/_virtual/index6.js +8 -0
  25. package/dist/_virtual/index6.js.map +1 -0
  26. package/dist/_virtual/index7.js +5 -0
  27. package/dist/_virtual/index7.js.map +1 -0
  28. package/dist/_virtual/index8.js +5 -0
  29. package/dist/_virtual/index8.js.map +1 -0
  30. package/dist/_virtual/index9.js +5 -0
  31. package/dist/_virtual/index9.js.map +1 -0
  32. package/dist/_virtual/lower-bound.js +5 -0
  33. package/dist/_virtual/lower-bound.js.map +1 -0
  34. package/dist/_virtual/priority-queue.js +5 -0
  35. package/dist/_virtual/priority-queue.js.map +1 -0
  36. package/dist/_virtual/re.js +5 -0
  37. package/dist/_virtual/re.js.map +1 -0
  38. package/dist/_virtual/retry.js +5 -0
  39. package/dist/_virtual/retry.js.map +1 -0
  40. package/dist/agents/index.d.ts +0 -0
  41. package/dist/hcs10/HCS10Client.d.ts +117 -0
  42. package/dist/hcs10/HCS10Client.js +251 -0
  43. package/dist/hcs10/HCS10Client.js.map +1 -0
  44. package/dist/hcs10/index.d.ts +1 -0
  45. package/dist/hcs10/types.d.ts +35 -0
  46. package/dist/index.d.ts +5 -2
  47. package/dist/index.es.js +9747 -11699
  48. package/dist/index.es.js.map +1 -1
  49. package/dist/index.js +44 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/init.d.ts +59 -0
  52. package/dist/init.js +92 -0
  53. package/dist/init.js.map +1 -0
  54. package/dist/node_modules/@langchain/core/dist/callbacks/base.js +98 -0
  55. package/dist/node_modules/@langchain/core/dist/callbacks/base.js.map +1 -0
  56. package/dist/node_modules/@langchain/core/dist/callbacks/manager.js +419 -0
  57. package/dist/node_modules/@langchain/core/dist/callbacks/manager.js.map +1 -0
  58. package/dist/node_modules/@langchain/core/dist/callbacks/promises.js +16 -0
  59. package/dist/node_modules/@langchain/core/dist/callbacks/promises.js.map +1 -0
  60. package/dist/node_modules/@langchain/core/dist/language_models/base.js +42 -0
  61. package/dist/node_modules/@langchain/core/dist/language_models/base.js.map +1 -0
  62. package/dist/node_modules/@langchain/core/dist/load/map_keys.js +16 -0
  63. package/dist/node_modules/@langchain/core/dist/load/map_keys.js.map +1 -0
  64. package/dist/node_modules/@langchain/core/dist/load/serializable.js +121 -0
  65. package/dist/node_modules/@langchain/core/dist/load/serializable.js.map +1 -0
  66. package/dist/node_modules/@langchain/core/dist/messages/ai.js +95 -0
  67. package/dist/node_modules/@langchain/core/dist/messages/ai.js.map +1 -0
  68. package/dist/node_modules/@langchain/core/dist/messages/base.js +112 -0
  69. package/dist/node_modules/@langchain/core/dist/messages/base.js.map +1 -0
  70. package/dist/node_modules/@langchain/core/dist/messages/utils.js +30 -0
  71. package/dist/node_modules/@langchain/core/dist/messages/utils.js.map +1 -0
  72. package/dist/node_modules/@langchain/core/dist/runnables/base.js +1277 -0
  73. package/dist/node_modules/@langchain/core/dist/runnables/base.js.map +1 -0
  74. package/dist/node_modules/@langchain/core/dist/runnables/config.js +83 -0
  75. package/dist/node_modules/@langchain/core/dist/runnables/config.js.map +1 -0
  76. package/dist/node_modules/@langchain/core/dist/runnables/graph.js +106 -0
  77. package/dist/node_modules/@langchain/core/dist/runnables/graph.js.map +1 -0
  78. package/dist/node_modules/@langchain/core/dist/runnables/iter.js +33 -0
  79. package/dist/node_modules/@langchain/core/dist/runnables/iter.js.map +1 -0
  80. package/dist/node_modules/@langchain/core/dist/runnables/utils.js +54 -0
  81. package/dist/node_modules/@langchain/core/dist/runnables/utils.js.map +1 -0
  82. package/dist/node_modules/@langchain/core/dist/runnables/wrappers.js +20 -0
  83. package/dist/node_modules/@langchain/core/dist/runnables/wrappers.js.map +1 -0
  84. package/dist/node_modules/@langchain/core/dist/singletons/index.js +34 -0
  85. package/dist/node_modules/@langchain/core/dist/singletons/index.js.map +1 -0
  86. package/dist/node_modules/@langchain/core/dist/tools.js +69 -0
  87. package/dist/node_modules/@langchain/core/dist/tools.js.map +1 -0
  88. package/dist/node_modules/@langchain/core/dist/tracers/base.js +299 -0
  89. package/dist/node_modules/@langchain/core/dist/tracers/base.js.map +1 -0
  90. package/dist/node_modules/@langchain/core/dist/tracers/console.js +193 -0
  91. package/dist/node_modules/@langchain/core/dist/tracers/console.js.map +1 -0
  92. package/dist/node_modules/@langchain/core/dist/tracers/initialize.js +10 -0
  93. package/dist/node_modules/@langchain/core/dist/tracers/initialize.js.map +1 -0
  94. package/dist/node_modules/@langchain/core/dist/tracers/log_stream.js +284 -0
  95. package/dist/node_modules/@langchain/core/dist/tracers/log_stream.js.map +1 -0
  96. package/dist/node_modules/@langchain/core/dist/tracers/root_listener.js +54 -0
  97. package/dist/node_modules/@langchain/core/dist/tracers/root_listener.js.map +1 -0
  98. package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain.js +68 -0
  99. package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain.js.map +1 -0
  100. package/dist/node_modules/@langchain/core/dist/utils/async_caller.js +86 -0
  101. package/dist/node_modules/@langchain/core/dist/utils/async_caller.js.map +1 -0
  102. package/dist/node_modules/@langchain/core/dist/utils/env.js +33 -0
  103. package/dist/node_modules/@langchain/core/dist/utils/env.js.map +1 -0
  104. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/core.js +218 -0
  105. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/core.js.map +1 -0
  106. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/helpers.js +117 -0
  107. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/helpers.js.map +1 -0
  108. package/dist/node_modules/@langchain/core/dist/utils/json.js +40 -0
  109. package/dist/node_modules/@langchain/core/dist/utils/json.js.map +1 -0
  110. package/dist/node_modules/@langchain/core/dist/utils/stream.js +164 -0
  111. package/dist/node_modules/@langchain/core/dist/utils/stream.js.map +1 -0
  112. package/dist/node_modules/@langchain/core/node_modules/ansi-styles/index.js +111 -0
  113. package/dist/node_modules/@langchain/core/node_modules/ansi-styles/index.js.map +1 -0
  114. package/dist/node_modules/@langchain/core/node_modules/camelcase/index.js +30 -0
  115. package/dist/node_modules/@langchain/core/node_modules/camelcase/index.js.map +1 -0
  116. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/client.js +2002 -0
  117. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/client.js.map +1 -0
  118. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/index.js +8 -0
  119. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/index.js.map +1 -0
  120. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/fetch.js +5 -0
  121. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/fetch.js.map +1 -0
  122. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_uuid.js +12 -0
  123. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_uuid.js.map +1 -0
  124. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/async_caller.js +94 -0
  125. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/async_caller.js.map +1 -0
  126. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/env.js +96 -0
  127. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/env.js.map +1 -0
  128. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/error.js +20 -0
  129. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/error.js.map +1 -0
  130. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js +82 -0
  131. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js.map +1 -0
  132. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/messages.js +15 -0
  133. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/messages.js.map +1 -0
  134. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts.js +27 -0
  135. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts.js.map +1 -0
  136. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/warn.js +8 -0
  137. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/warn.js.map +1 -0
  138. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/native.js +8 -0
  139. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
  140. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/regex.js +5 -0
  141. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
  142. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/rng.js +10 -0
  143. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/rng.js.map +1 -0
  144. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/stringify.js +10 -0
  145. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -0
  146. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v4.js +14 -0
  147. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v4.js.map +1 -0
  148. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/validate.js +8 -0
  149. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
  150. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/native.js +7 -0
  151. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
  152. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/regex.js +5 -0
  153. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
  154. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/rng.js +11 -0
  155. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/rng.js.map +1 -0
  156. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/stringify.js +10 -0
  157. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -0
  158. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v4.js +14 -0
  159. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v4.js.map +1 -0
  160. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/validate.js +8 -0
  161. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
  162. package/dist/node_modules/base64-js/index.js +53 -0
  163. package/dist/node_modules/base64-js/index.js.map +1 -0
  164. package/dist/node_modules/decamelize/index.js +12 -0
  165. package/dist/node_modules/decamelize/index.js.map +1 -0
  166. package/dist/node_modules/eventemitter3/index.js +112 -0
  167. package/dist/node_modules/eventemitter3/index.js.map +1 -0
  168. package/dist/node_modules/js-tiktoken/dist/chunk-Z5MDQTGX.js +117 -0
  169. package/dist/node_modules/js-tiktoken/dist/chunk-Z5MDQTGX.js.map +1 -0
  170. package/dist/node_modules/p-finally/index.js +18 -0
  171. package/dist/node_modules/p-finally/index.js.map +1 -0
  172. package/dist/node_modules/p-queue/dist/index.js +198 -0
  173. package/dist/node_modules/p-queue/dist/index.js.map +1 -0
  174. package/dist/node_modules/p-queue/dist/lower-bound.js +20 -0
  175. package/dist/node_modules/p-queue/dist/lower-bound.js.map +1 -0
  176. package/dist/node_modules/p-queue/dist/priority-queue.js +41 -0
  177. package/dist/node_modules/p-queue/dist/priority-queue.js.map +1 -0
  178. package/dist/node_modules/p-retry/index.js +63 -0
  179. package/dist/node_modules/p-retry/index.js.map +1 -0
  180. package/dist/node_modules/p-timeout/index.js +45 -0
  181. package/dist/node_modules/p-timeout/index.js.map +1 -0
  182. package/dist/node_modules/retry/index.js +9 -0
  183. package/dist/node_modules/retry/index.js.map +1 -0
  184. package/dist/node_modules/retry/lib/retry.js +59 -0
  185. package/dist/node_modules/retry/lib/retry.js.map +1 -0
  186. package/dist/node_modules/retry/lib/retry_operation.js +58 -0
  187. package/dist/node_modules/retry/lib/retry_operation.js.map +1 -0
  188. package/dist/node_modules/semver/classes/comparator.js +57 -0
  189. package/dist/node_modules/semver/classes/comparator.js.map +1 -0
  190. package/dist/node_modules/semver/classes/range.js +149 -0
  191. package/dist/node_modules/semver/classes/range.js.map +1 -0
  192. package/dist/node_modules/semver/classes/semver.js +170 -0
  193. package/dist/node_modules/semver/classes/semver.js.map +1 -0
  194. package/dist/node_modules/semver/functions/clean.js +15 -0
  195. package/dist/node_modules/semver/functions/clean.js.map +1 -0
  196. package/dist/node_modules/semver/functions/cmp.js +40 -0
  197. package/dist/node_modules/semver/functions/cmp.js.map +1 -0
  198. package/dist/node_modules/semver/functions/coerce.js +34 -0
  199. package/dist/node_modules/semver/functions/coerce.js.map +1 -0
  200. package/dist/node_modules/semver/functions/compare-build.js +15 -0
  201. package/dist/node_modules/semver/functions/compare-build.js.map +1 -0
  202. package/dist/node_modules/semver/functions/compare-loose.js +12 -0
  203. package/dist/node_modules/semver/functions/compare-loose.js.map +1 -0
  204. package/dist/node_modules/semver/functions/compare.js +12 -0
  205. package/dist/node_modules/semver/functions/compare.js.map +1 -0
  206. package/dist/node_modules/semver/functions/diff.js +25 -0
  207. package/dist/node_modules/semver/functions/diff.js.map +1 -0
  208. package/dist/node_modules/semver/functions/eq.js +12 -0
  209. package/dist/node_modules/semver/functions/eq.js.map +1 -0
  210. package/dist/node_modules/semver/functions/gt.js +12 -0
  211. package/dist/node_modules/semver/functions/gt.js.map +1 -0
  212. package/dist/node_modules/semver/functions/gte.js +12 -0
  213. package/dist/node_modules/semver/functions/gte.js.map +1 -0
  214. package/dist/node_modules/semver/functions/inc.js +22 -0
  215. package/dist/node_modules/semver/functions/inc.js.map +1 -0
  216. package/dist/node_modules/semver/functions/lt.js +12 -0
  217. package/dist/node_modules/semver/functions/lt.js.map +1 -0
  218. package/dist/node_modules/semver/functions/lte.js +12 -0
  219. package/dist/node_modules/semver/functions/lte.js.map +1 -0
  220. package/dist/node_modules/semver/functions/major.js +12 -0
  221. package/dist/node_modules/semver/functions/major.js.map +1 -0
  222. package/dist/node_modules/semver/functions/minor.js +12 -0
  223. package/dist/node_modules/semver/functions/minor.js.map +1 -0
  224. package/dist/node_modules/semver/functions/neq.js +12 -0
  225. package/dist/node_modules/semver/functions/neq.js.map +1 -0
  226. package/dist/node_modules/semver/functions/parse.js +22 -0
  227. package/dist/node_modules/semver/functions/parse.js.map +1 -0
  228. package/dist/node_modules/semver/functions/patch.js +12 -0
  229. package/dist/node_modules/semver/functions/patch.js.map +1 -0
  230. package/dist/node_modules/semver/functions/prerelease.js +15 -0
  231. package/dist/node_modules/semver/functions/prerelease.js.map +1 -0
  232. package/dist/node_modules/semver/functions/rcompare.js +12 -0
  233. package/dist/node_modules/semver/functions/rcompare.js.map +1 -0
  234. package/dist/node_modules/semver/functions/rsort.js +12 -0
  235. package/dist/node_modules/semver/functions/rsort.js.map +1 -0
  236. package/dist/node_modules/semver/functions/satisfies.js +19 -0
  237. package/dist/node_modules/semver/functions/satisfies.js.map +1 -0
  238. package/dist/node_modules/semver/functions/sort.js +12 -0
  239. package/dist/node_modules/semver/functions/sort.js.map +1 -0
  240. package/dist/node_modules/semver/functions/valid.js +15 -0
  241. package/dist/node_modules/semver/functions/valid.js.map +1 -0
  242. package/dist/node_modules/semver/index.js +98 -0
  243. package/dist/node_modules/semver/index.js.map +1 -0
  244. package/dist/node_modules/semver/internal/constants.js +29 -0
  245. package/dist/node_modules/semver/internal/constants.js.map +1 -0
  246. package/dist/node_modules/semver/internal/debug.js +9 -0
  247. package/dist/node_modules/semver/internal/debug.js.map +1 -0
  248. package/dist/node_modules/semver/internal/identifiers.js +17 -0
  249. package/dist/node_modules/semver/internal/identifiers.js.map +1 -0
  250. package/dist/node_modules/semver/internal/lrucache.js +33 -0
  251. package/dist/node_modules/semver/internal/lrucache.js.map +1 -0
  252. package/dist/node_modules/semver/internal/parse-options.js +11 -0
  253. package/dist/node_modules/semver/internal/parse-options.js.map +1 -0
  254. package/dist/node_modules/semver/internal/re.js +33 -0
  255. package/dist/node_modules/semver/internal/re.js.map +1 -0
  256. package/dist/node_modules/semver/ranges/gtr.js +12 -0
  257. package/dist/node_modules/semver/ranges/gtr.js.map +1 -0
  258. package/dist/node_modules/semver/ranges/intersects.js +12 -0
  259. package/dist/node_modules/semver/ranges/intersects.js.map +1 -0
  260. package/dist/node_modules/semver/ranges/ltr.js +12 -0
  261. package/dist/node_modules/semver/ranges/ltr.js.map +1 -0
  262. package/dist/node_modules/semver/ranges/max-satisfying.js +23 -0
  263. package/dist/node_modules/semver/ranges/max-satisfying.js.map +1 -0
  264. package/dist/node_modules/semver/ranges/min-satisfying.js +23 -0
  265. package/dist/node_modules/semver/ranges/min-satisfying.js.map +1 -0
  266. package/dist/node_modules/semver/ranges/min-version.js +43 -0
  267. package/dist/node_modules/semver/ranges/min-version.js.map +1 -0
  268. package/dist/node_modules/semver/ranges/outside.js +45 -0
  269. package/dist/node_modules/semver/ranges/outside.js.map +1 -0
  270. package/dist/node_modules/semver/ranges/simplify.js +25 -0
  271. package/dist/node_modules/semver/ranges/simplify.js.map +1 -0
  272. package/dist/node_modules/semver/ranges/subset.js +95 -0
  273. package/dist/node_modules/semver/ranges/subset.js.map +1 -0
  274. package/dist/node_modules/semver/ranges/to-comparators.js +12 -0
  275. package/dist/node_modules/semver/ranges/to-comparators.js.map +1 -0
  276. package/dist/node_modules/semver/ranges/valid.js +18 -0
  277. package/dist/node_modules/semver/ranges/valid.js.map +1 -0
  278. package/dist/node_modules/zod-to-json-schema/dist/esm/Options.js +32 -0
  279. package/dist/node_modules/zod-to-json-schema/dist/esm/Options.js.map +1 -0
  280. package/dist/node_modules/zod-to-json-schema/dist/esm/Refs.js +22 -0
  281. package/dist/node_modules/zod-to-json-schema/dist/esm/Refs.js.map +1 -0
  282. package/dist/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +14 -0
  283. package/dist/node_modules/zod-to-json-schema/dist/esm/errorMessages.js.map +1 -0
  284. package/dist/node_modules/zod-to-json-schema/dist/esm/parseDef.js +44 -0
  285. package/dist/node_modules/zod-to-json-schema/dist/esm/parseDef.js.map +1 -0
  286. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +7 -0
  287. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/any.js.map +1 -0
  288. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +17 -0
  289. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/array.js.map +1 -0
  290. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +26 -0
  291. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js.map +1 -0
  292. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +9 -0
  293. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js.map +1 -0
  294. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +8 -0
  295. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js.map +1 -0
  296. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +6 -0
  297. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js.map +1 -0
  298. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +59 -0
  299. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/date.js.map +1 -0
  300. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +11 -0
  301. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/default.js.map +1 -0
  302. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +8 -0
  303. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js.map +1 -0
  304. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +10 -0
  305. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js.map +1 -0
  306. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +36 -0
  307. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js.map +1 -0
  308. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +16 -0
  309. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js.map +1 -0
  310. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +27 -0
  311. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/map.js.map +1 -0
  312. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +11 -0
  313. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js.map +1 -0
  314. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +9 -0
  315. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/never.js.map +1 -0
  316. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +12 -0
  317. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/null.js.map +1 -0
  318. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +30 -0
  319. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js.map +1 -0
  320. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +28 -0
  321. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/number.js.map +1 -0
  322. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +50 -0
  323. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/object.js.map +1 -0
  324. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +22 -0
  325. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js.map +1 -0
  326. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +21 -0
  327. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js.map +1 -0
  328. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +8 -0
  329. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js.map +1 -0
  330. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +6 -0
  331. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js.map +1 -0
  332. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +56 -0
  333. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/record.js.map +1 -0
  334. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +17 -0
  335. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/set.js.map +1 -0
  336. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +245 -0
  337. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +1 -0
  338. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +27 -0
  339. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js.map +1 -0
  340. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +9 -0
  341. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js.map +1 -0
  342. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +69 -0
  343. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/union.js.map +1 -0
  344. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +7 -0
  345. package/dist/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js.map +1 -0
  346. package/dist/node_modules/zod-to-json-schema/dist/esm/selectParser.js +110 -0
  347. package/dist/node_modules/zod-to-json-schema/dist/esm/selectParser.js.map +1 -0
  348. package/dist/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +26 -0
  349. package/dist/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js.map +1 -0
  350. package/dist/plugins/BasePlugin.d.ts +28 -0
  351. package/dist/plugins/BasePlugin.js +19 -0
  352. package/dist/plugins/BasePlugin.js.map +1 -0
  353. package/dist/plugins/PluginInterface.d.ts +64 -0
  354. package/dist/plugins/PluginLoader.d.ts +38 -0
  355. package/dist/plugins/PluginLoader.js +60 -0
  356. package/dist/plugins/PluginLoader.js.map +1 -0
  357. package/dist/plugins/PluginRegistry.d.ts +47 -0
  358. package/dist/plugins/PluginRegistry.js +71 -0
  359. package/dist/plugins/PluginRegistry.js.map +1 -0
  360. package/dist/plugins/__tests__/BasePlugin.test.d.ts +1 -0
  361. package/dist/plugins/__tests__/PluginLoader.test.d.ts +1 -0
  362. package/dist/plugins/__tests__/PluginRegistry.test.d.ts +1 -0
  363. package/dist/plugins/defi/index.d.ts +13 -0
  364. package/dist/plugins/hedera/HbarPricePlugin.d.ts +45 -0
  365. package/dist/plugins/hedera/HbarPricePlugin.js +70 -0
  366. package/dist/plugins/hedera/HbarPricePlugin.js.map +1 -0
  367. package/dist/plugins/hedera/__tests__/HbarPricePlugin.test.d.ts +1 -0
  368. package/dist/plugins/index.d.ts +5 -0
  369. package/dist/plugins/weather/index.d.ts +15 -0
  370. package/dist/src/agents/index.d.ts +0 -0
  371. package/dist/src/plugins/hedera/HbarPricePlugin.d.ts +45 -0
  372. package/dist/src/plugins/index.d.ts +1 -0
  373. package/dist/src/tools/CheckMessagesTool.d.ts +9 -2
  374. package/dist/src/utils/state-tools.d.ts +23 -0
  375. package/dist/state/index.d.ts +2 -0
  376. package/dist/state/open-convai-state.d.ts +84 -0
  377. package/dist/state/open-convai-state.js +132 -0
  378. package/dist/state/open-convai-state.js.map +1 -0
  379. package/dist/state/state-types.d.ts +143 -0
  380. package/dist/tools/AcceptConnectionRequestTool.d.ts +33 -0
  381. package/dist/tools/AcceptConnectionRequestTool.js +116 -0
  382. package/dist/tools/AcceptConnectionRequestTool.js.map +1 -0
  383. package/dist/tools/CheckMessagesTool.d.ts +34 -0
  384. package/dist/tools/CheckMessagesTool.js +96 -0
  385. package/dist/tools/CheckMessagesTool.js.map +1 -0
  386. package/dist/tools/ConnectionMonitorTool.d.ts +96 -0
  387. package/dist/tools/ConnectionMonitorTool.js +289 -0
  388. package/dist/tools/ConnectionMonitorTool.js.map +1 -0
  389. package/dist/tools/ConnectionTool.d.ts +40 -0
  390. package/dist/tools/ConnectionTool.js +114 -0
  391. package/dist/tools/ConnectionTool.js.map +1 -0
  392. package/dist/tools/FindRegistrationsTool.d.ts +27 -0
  393. package/dist/tools/FindRegistrationsTool.js +64 -0
  394. package/dist/tools/FindRegistrationsTool.js.map +1 -0
  395. package/dist/tools/InitiateConnectionTool.d.ts +30 -0
  396. package/dist/tools/InitiateConnectionTool.js +79 -0
  397. package/dist/tools/InitiateConnectionTool.js.map +1 -0
  398. package/dist/tools/ListConnectionsTool.d.ts +33 -0
  399. package/dist/tools/ListConnectionsTool.js +327 -0
  400. package/dist/tools/ListConnectionsTool.js.map +1 -0
  401. package/dist/tools/ListUnapprovedConnectionRequestsTool.d.ts +53 -0
  402. package/dist/tools/ListUnapprovedConnectionRequestsTool.js +177 -0
  403. package/dist/tools/ListUnapprovedConnectionRequestsTool.js.map +1 -0
  404. package/dist/tools/ManageConnectionRequestsTool.d.ts +39 -0
  405. package/dist/tools/ManageConnectionRequestsTool.js +161 -0
  406. package/dist/tools/ManageConnectionRequestsTool.js.map +1 -0
  407. package/dist/tools/RegisterAgentTool.d.ts +188 -0
  408. package/dist/tools/RegisterAgentTool.js +331 -0
  409. package/dist/tools/RegisterAgentTool.js.map +1 -0
  410. package/dist/tools/RetrieveProfileTool.d.ts +34 -0
  411. package/dist/tools/RetrieveProfileTool.js +53 -0
  412. package/dist/tools/RetrieveProfileTool.js.map +1 -0
  413. package/dist/tools/SendMessageToConnectionTool.d.ts +31 -0
  414. package/dist/tools/SendMessageToConnectionTool.js +74 -0
  415. package/dist/tools/SendMessageToConnectionTool.js.map +1 -0
  416. package/dist/tools/SendMessageTool.d.ts +44 -0
  417. package/dist/tools/SendMessageTool.js +75 -0
  418. package/dist/tools/SendMessageTool.js.map +1 -0
  419. package/dist/tools/index.d.ts +13 -0
  420. package/dist/utils/Encryption.d.ts +7 -0
  421. package/dist/utils/Encryption.js +7 -0
  422. package/dist/utils/Encryption.js.map +1 -0
  423. package/dist/utils/HederaClient.d.ts +18 -0
  424. package/dist/utils/connectionUtils.d.ts +15 -0
  425. package/dist/utils/connectionUtils.js +64 -0
  426. package/dist/utils/connectionUtils.js.map +1 -0
  427. package/dist/utils/state-tools.d.ts +23 -0
  428. package/dist/utils/state-tools.js +90 -0
  429. package/dist/utils/state-tools.js.map +1 -0
  430. package/package.json +20 -10
@@ -0,0 +1,251 @@
1
+ import { HCS10Client as s, Logger as g, AgentBuilder as a, AIAgentCapability as l, InboundTopicType as c } from "@hashgraphonline/standards-sdk";
2
+ import { encryptMessage as u } from "../utils/Encryption.js";
3
+ class h {
4
+ constructor(e, r, n, t) {
5
+ this.standardClient = new s({
6
+ network: n,
7
+ operatorId: e,
8
+ operatorPrivateKey: r,
9
+ guardedRegistryBaseUrl: t == null ? void 0 : t.registryUrl,
10
+ logLevel: t == null ? void 0 : t.logLevel
11
+ }), this.guardedRegistryBaseUrl = (t == null ? void 0 : t.registryUrl) || "", this.useEncryption = (t == null ? void 0 : t.useEncryption) || !1, this.logger = new g({
12
+ level: (t == null ? void 0 : t.logLevel) || "info"
13
+ });
14
+ }
15
+ getOperatorId() {
16
+ const e = this.standardClient.getClient().operatorAccountId;
17
+ if (!e)
18
+ throw new Error("Operator Account ID not configured in standard client.");
19
+ return e.toString();
20
+ }
21
+ getNetwork() {
22
+ return this.standardClient.getNetwork();
23
+ }
24
+ async handleConnectionRequest(e, r, n, t) {
25
+ try {
26
+ return await this.standardClient.handleConnectionRequest(
27
+ e,
28
+ r,
29
+ n,
30
+ t
31
+ );
32
+ } catch (o) {
33
+ throw this.logger.error(
34
+ `Error handling connection request #${n} for topic ${e}:`,
35
+ o
36
+ ), new Error(
37
+ `Failed to handle connection request: ${o instanceof Error ? o.message : String(o)}`
38
+ );
39
+ }
40
+ }
41
+ /**
42
+ * Retrieves the profile for a given account ID using the standard SDK.
43
+ */
44
+ async getAgentProfile(e) {
45
+ return this.standardClient.retrieveProfile(e);
46
+ }
47
+ /**
48
+ * Exposes the standard SDK's submitConnectionRequest method.
49
+ */
50
+ async submitConnectionRequest(e, r) {
51
+ return this.standardClient.submitConnectionRequest(
52
+ e,
53
+ r
54
+ );
55
+ }
56
+ /**
57
+ * Exposes the standard SDK's waitForConnectionConfirmation method.
58
+ */
59
+ async waitForConnectionConfirmation(e, r, n = 60, t = 2e3) {
60
+ return this.standardClient.waitForConnectionConfirmation(
61
+ e,
62
+ r,
63
+ n,
64
+ t
65
+ );
66
+ }
67
+ /**
68
+ * Creates and registers an agent using the standard SDK's HCS10Client.
69
+ * This handles account creation, key generation, topic setup, and registration.
70
+ *
71
+ * When metadata includes fee configuration:
72
+ * 1. The properties.feeConfig will be passed to the AgentBuilder
73
+ * 2. The properties.inboundTopicType will be set to FEE_BASED
74
+ * 3. The SDK's createAndRegisterAgent will apply the fees to the agent's inbound topic
75
+ *
76
+ * @param metadata - The agent's metadata, potentially including pfpBuffer, pfpFileName,
77
+ * and fee configuration in properties.feeConfig
78
+ * @returns The registration result from the standard SDK, containing accountId, keys, topics etc.
79
+ */
80
+ async createAndRegisterAgent(e) {
81
+ var n, t;
82
+ const r = new a().setName(e.name).setBio(e.description || "").setCapabilities(
83
+ e.capabilities ? e.capabilities : [l.TEXT_GENERATION]
84
+ ).setType(e.type || "autonomous").setModel(e.model || "agent-model-2024").setNetwork(this.getNetwork()).setInboundTopicType(c.PUBLIC);
85
+ e != null && e.feeConfig && (r.setInboundTopicType(c.FEE_BASED), r.setFeeConfig(e.feeConfig)), e.pfpBuffer && e.pfpFileName ? e.pfpBuffer.byteLength === 0 ? this.logger.warn("Provided PFP buffer is empty. Skipping profile picture.") : (this.logger.info(
86
+ `Setting profile picture: ${e.pfpFileName} (${e.pfpBuffer.byteLength} bytes)`
87
+ ), r.setProfilePicture(e.pfpBuffer, e.pfpFileName)) : this.logger.warn(
88
+ "Profile picture not provided in metadata. Agent creation might fail if required by the underlying SDK builder."
89
+ ), e.social && Object.entries(e.social).forEach(([o, i]) => {
90
+ r.addSocial(o, i);
91
+ }), e.properties && Object.entries(e.properties).forEach(([o, i]) => {
92
+ r.addProperty(o, i);
93
+ });
94
+ try {
95
+ const o = !!(e != null && e.feeConfig), i = await this.standardClient.createAndRegisterAgent(r, {
96
+ initialBalance: o ? 50 : void 0
97
+ });
98
+ return (n = i == null ? void 0 : i.metadata) != null && n.inboundTopicId && ((t = i == null ? void 0 : i.metadata) != null && t.outboundTopicId) && (this.agentChannels = {
99
+ inboundTopicId: i.metadata.inboundTopicId,
100
+ outboundTopicId: i.metadata.outboundTopicId
101
+ }), i;
102
+ } catch (o) {
103
+ throw this.logger.error("Error during agent creation/registration:", o), new Error(
104
+ `Failed to create/register agent: ${o instanceof Error ? o.message : String(o)}`
105
+ );
106
+ }
107
+ }
108
+ /**
109
+ * Sends a structured HCS-10 message to the specified topic using the standard SDK client.
110
+ * Handles potential inscription for large messages.
111
+ *
112
+ * @param topicId - The target topic ID (likely a connection topic).
113
+ * @param operatorId - The operator ID string (e.g., "inboundTopic@accountId").
114
+ * @param data - The actual message content/data.
115
+ * @param memo - Optional memo for the message.
116
+ * @param submitKey - Optional private key for topics requiring specific submit keys.
117
+ * @returns A confirmation status string from the transaction receipt.
118
+ */
119
+ async sendMessage(e, r, n, t) {
120
+ var o;
121
+ this.useEncryption && (r = u(r));
122
+ try {
123
+ return (o = (await this.standardClient.sendMessage(
124
+ e,
125
+ r,
126
+ n,
127
+ t
128
+ )).topicSequenceNumber) == null ? void 0 : o.toNumber();
129
+ } catch (i) {
130
+ throw this.logger.error(`Error sending message to topic ${e}:`, i), new Error(
131
+ `Failed to send message: ${i instanceof Error ? i.message : String(i)}`
132
+ );
133
+ }
134
+ }
135
+ /**
136
+ * Retrieves messages from a topic using the standard SDK client.
137
+ *
138
+ * @param topicId - The topic ID to get messages from.
139
+ * @returns Messages from the topic, mapped to the expected format.
140
+ */
141
+ async getMessages(e) {
142
+ try {
143
+ const n = (await this.standardClient.getMessages(e)).messages.map((t) => {
144
+ var i;
145
+ const o = ((i = t == null ? void 0 : t.created) == null ? void 0 : i.getTime()) || 0;
146
+ return {
147
+ ...t,
148
+ timestamp: o,
149
+ data: t.data,
150
+ sequence_number: t.sequence_number
151
+ };
152
+ });
153
+ return n.sort(
154
+ (t, o) => t.timestamp - o.timestamp
155
+ ), { messages: n };
156
+ } catch (r) {
157
+ return this.logger.error(`Error getting messages from topic ${e}:`, r), { messages: [] };
158
+ }
159
+ }
160
+ async getMessageStream(e) {
161
+ return this.standardClient.getMessageStream(e);
162
+ }
163
+ /**
164
+ * Retrieves content from an inscribed message using the standard SDK client.
165
+ * @param inscriptionIdOrData - The inscription ID (hcs://...) or potentially raw data string.
166
+ * @returns The resolved message content.
167
+ */
168
+ async getMessageContent(e) {
169
+ try {
170
+ return await this.standardClient.getMessageContent(
171
+ e
172
+ );
173
+ } catch (r) {
174
+ throw this.logger.error(
175
+ `Error retrieving message content for: ${e}`,
176
+ r
177
+ ), new Error(
178
+ `Failed to retrieve message content: ${r instanceof Error ? r.message : String(r)}`
179
+ );
180
+ }
181
+ }
182
+ /**
183
+ * Retrieves the inbound topic ID associated with the current operator.
184
+ * This typically involves fetching the operator's own HCS-10 profile.
185
+ * @returns A promise that resolves to the operator's inbound topic ID.
186
+ * @throws {Error} If the operator ID cannot be determined or the profile/topic cannot be retrieved.
187
+ */
188
+ async getInboundTopicId() {
189
+ var e;
190
+ try {
191
+ const r = this.getOperatorId();
192
+ this.logger.info(
193
+ `[HCS10Client] Retrieving profile for operator ${r} to find inbound topic...`
194
+ );
195
+ const n = await this.getAgentProfile(r);
196
+ if (n.success && ((e = n.topicInfo) != null && e.inboundTopic))
197
+ return this.logger.info(
198
+ `[HCS10Client] Found inbound topic for operator ${r}: ${n.topicInfo.inboundTopic}`
199
+ ), n.topicInfo.inboundTopic;
200
+ throw new Error(
201
+ `Could not retrieve inbound topic from profile for ${r}. Profile success: ${n.success}, Error: ${n.error}`
202
+ );
203
+ } catch (r) {
204
+ this.logger.error(
205
+ `[HCS10Client] Error fetching operator's inbound topic ID (${this.getOperatorId()}):`,
206
+ r
207
+ );
208
+ const n = this.getOperatorId();
209
+ let t = `Failed to get inbound topic ID for operator ${n}.`;
210
+ throw r instanceof Error && r.message.includes("does not have a valid HCS-11 memo") ? t += ` The account profile may not exist or is invalid. Please ensure this operator account (${n}) is registered as an HCS-10 agent. You might need to register it first (e.g., using the 'register_agent' tool or SDK function).` : r instanceof Error ? t += ` Reason: ${r.message}` : t += ` Unexpected error: ${String(r)}`, new Error(t);
211
+ }
212
+ }
213
+ /**
214
+ * Retrieves the configured operator account ID and private key.
215
+ * Required by tools needing to identify the current agent instance.
216
+ */
217
+ getAccountAndSigner() {
218
+ const e = this.standardClient.getAccountAndSigner();
219
+ return {
220
+ accountId: e.accountId,
221
+ signer: e.signer
222
+ };
223
+ }
224
+ /**
225
+ * Retrieves the outbound topic ID for the current operator.
226
+ * Fetches the operator's profile if necessary.
227
+ * @returns The outbound topic ID string.
228
+ * @throws If the outbound topic cannot be determined.
229
+ */
230
+ async getOutboundTopicId() {
231
+ var n;
232
+ const e = this.getOperatorId(), r = await this.getAgentProfile(e);
233
+ if (r.success && ((n = r.topicInfo) != null && n.outboundTopic))
234
+ return r.topicInfo.outboundTopic;
235
+ throw new Error(
236
+ `Could not retrieve outbound topic from profile for ${e}. Profile success: ${r.success}, Error: ${r.error}`
237
+ );
238
+ }
239
+ setClient(e, r) {
240
+ return this.standardClient = new s({
241
+ network: this.getNetwork(),
242
+ operatorId: e,
243
+ operatorPrivateKey: r,
244
+ guardedRegistryBaseUrl: this.guardedRegistryBaseUrl
245
+ }), this.standardClient;
246
+ }
247
+ }
248
+ export {
249
+ h as HCS10Client
250
+ };
251
+ //# sourceMappingURL=HCS10Client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HCS10Client.js","sources":["../../src/hcs10/HCS10Client.ts"],"sourcesContent":["import {\n TransactionReceipt,\n PrivateKey,\n TopicMessageQuery,\n} from '@hashgraph/sdk';\nimport {\n HCS10Client as StandardSDKClient,\n AgentBuilder,\n InboundTopicType as StandardInboundTopicType,\n AIAgentCapability as StandardAIAgentCapability,\n AgentRegistrationResult,\n WaitForConnectionConfirmationResponse,\n ProfileResponse as SDKProfileResponse,\n HCSMessage,\n LogLevel,\n Logger,\n FeeConfigBuilderInterface,\n SocialPlatform,\n} from '@hashgraphonline/standards-sdk';\nimport { AgentMetadata, AgentChannels } from './types';\nimport { encryptMessage } from '../utils/Encryption';\n\n// Keep type alias as they were removed accidentally\ntype StandardHandleConnectionRequest =\n InstanceType<typeof StandardSDKClient>['handleConnectionRequest'];\ntype HandleConnectionRequestResponse = Awaited<\n ReturnType<StandardHandleConnectionRequest>\n>;\nexport type StandardNetworkType = 'mainnet' | 'testnet';\n\nexport interface HCSMessageWithTimestamp extends HCSMessage {\n timestamp: number;\n data: string;\n sequence_number: number;\n}\n\nexport interface ExtendedAgentMetadata extends AgentMetadata {\n pfpBuffer?: Buffer;\n pfpFileName?: string;\n feeConfig?: FeeConfigBuilderInterface;\n}\n\n/**\n * HCS10Client wraps the HCS-10 functionalities using the @hashgraphonline/standards-sdk.\n * - Creates and registers agents using the standard SDK flow.\n * - Manages agent communication channels (handled by standard SDK).\n * - Sends messages on Hedera topics (currently manual, potential for standard SDK integration).\n */\nexport class HCS10Client {\n public standardClient: StandardSDKClient;\n private useEncryption: boolean;\n public agentChannels?: AgentChannels;\n public guardedRegistryBaseUrl: string;\n public logger: Logger;\n\n constructor(\n operatorId: string,\n operatorPrivateKey: string,\n network: StandardNetworkType,\n options?: {\n useEncryption?: boolean;\n registryUrl?: string;\n logLevel?: LogLevel;\n }\n ) {\n this.standardClient = new StandardSDKClient({\n network: network,\n operatorId: operatorId,\n operatorPrivateKey: operatorPrivateKey,\n guardedRegistryBaseUrl: options?.registryUrl,\n logLevel: options?.logLevel,\n });\n this.guardedRegistryBaseUrl = options?.registryUrl || '';\n this.useEncryption = options?.useEncryption || false;\n this.logger = new Logger({\n level: options?.logLevel || 'info',\n });\n }\n\n public getOperatorId(): string {\n const operator = this.standardClient.getClient().operatorAccountId;\n if (!operator) {\n throw new Error('Operator Account ID not configured in standard client.');\n }\n return operator.toString();\n }\n\n public getNetwork(): StandardNetworkType {\n return this.standardClient.getNetwork() as StandardNetworkType;\n }\n\n public async handleConnectionRequest(\n inboundTopicId: string,\n requestingAccountId: string,\n connectionRequestId: number,\n feeConfig?: FeeConfigBuilderInterface\n ): Promise<HandleConnectionRequestResponse> {\n try {\n const result = await this.standardClient.handleConnectionRequest(\n inboundTopicId,\n requestingAccountId,\n connectionRequestId,\n feeConfig\n );\n return result;\n } catch (error) {\n this.logger.error(\n `Error handling connection request #${connectionRequestId} for topic ${inboundTopicId}:`,\n error\n );\n throw new Error(\n `Failed to handle connection request: ${\n error instanceof Error ? error.message : String(error)\n }`\n );\n }\n }\n\n /**\n * Retrieves the profile for a given account ID using the standard SDK.\n */\n public async getAgentProfile(accountId: string): Promise<SDKProfileResponse> {\n return this.standardClient.retrieveProfile(accountId);\n }\n\n /**\n * Exposes the standard SDK's submitConnectionRequest method.\n */\n public async submitConnectionRequest(\n inboundTopicId: string,\n memo: string\n ): Promise<TransactionReceipt> {\n return this.standardClient.submitConnectionRequest(\n inboundTopicId,\n memo\n ) as Promise<TransactionReceipt>;\n }\n\n /**\n * Exposes the standard SDK's waitForConnectionConfirmation method.\n */\n public async waitForConnectionConfirmation(\n outboundTopicId: string,\n connectionRequestId: number,\n maxAttempts = 60,\n delayMs = 2000\n ): Promise<WaitForConnectionConfirmationResponse> {\n return this.standardClient.waitForConnectionConfirmation(\n outboundTopicId,\n connectionRequestId,\n maxAttempts,\n delayMs\n );\n }\n\n /**\n * Creates and registers an agent using the standard SDK's HCS10Client.\n * This handles account creation, key generation, topic setup, and registration.\n *\n * When metadata includes fee configuration:\n * 1. The properties.feeConfig will be passed to the AgentBuilder\n * 2. The properties.inboundTopicType will be set to FEE_BASED\n * 3. The SDK's createAndRegisterAgent will apply the fees to the agent's inbound topic\n *\n * @param metadata - The agent's metadata, potentially including pfpBuffer, pfpFileName,\n * and fee configuration in properties.feeConfig\n * @returns The registration result from the standard SDK, containing accountId, keys, topics etc.\n */\n public async createAndRegisterAgent(\n metadata: ExtendedAgentMetadata\n ): Promise<AgentRegistrationResult> {\n const builder = new AgentBuilder()\n .setName(metadata.name)\n .setBio(metadata.description || '')\n .setCapabilities(\n metadata.capabilities\n ? metadata.capabilities\n : [StandardAIAgentCapability.TEXT_GENERATION]\n )\n .setType((metadata.type || 'autonomous') as 'autonomous' | 'manual')\n .setModel(metadata.model || 'agent-model-2024')\n .setNetwork(this.getNetwork())\n .setInboundTopicType(StandardInboundTopicType.PUBLIC);\n\n if (metadata?.feeConfig) {\n builder.setInboundTopicType(StandardInboundTopicType.FEE_BASED);\n builder.setFeeConfig(metadata.feeConfig);\n }\n\n if (metadata.pfpBuffer && metadata.pfpFileName) {\n if (metadata.pfpBuffer.byteLength === 0) {\n this.logger.warn('Provided PFP buffer is empty. Skipping profile picture.');\n } else {\n this.logger.info(\n `Setting profile picture: ${metadata.pfpFileName} (${metadata.pfpBuffer.byteLength} bytes)`\n );\n builder.setProfilePicture(metadata.pfpBuffer, metadata.pfpFileName);\n }\n } else {\n this.logger.warn(\n 'Profile picture not provided in metadata. Agent creation might fail if required by the underlying SDK builder.'\n );\n }\n\n if (metadata.social) {\n Object.entries(metadata.social).forEach(([platform, handle]) => {\n builder.addSocial(platform as SocialPlatform, handle);\n });\n }\n\n if (metadata.properties) {\n Object.entries(metadata.properties).forEach(([key, value]) => {\n builder.addProperty(key, value);\n });\n }\n\n try {\n const hasFees = Boolean(metadata?.feeConfig);\n const result = await this.standardClient.createAndRegisterAgent(builder, {\n initialBalance: hasFees ? 50 : undefined,\n });\n if (\n result?.metadata?.inboundTopicId &&\n result?.metadata?.outboundTopicId\n ) {\n this.agentChannels = {\n inboundTopicId: result.metadata.inboundTopicId,\n outboundTopicId: result.metadata.outboundTopicId,\n };\n }\n return result;\n } catch (error) {\n this.logger.error('Error during agent creation/registration:', error);\n throw new Error(\n `Failed to create/register agent: ${\n error instanceof Error ? error.message : String(error)\n }`\n );\n }\n }\n\n /**\n * Sends a structured HCS-10 message to the specified topic using the standard SDK client.\n * Handles potential inscription for large messages.\n *\n * @param topicId - The target topic ID (likely a connection topic).\n * @param operatorId - The operator ID string (e.g., \"inboundTopic@accountId\").\n * @param data - The actual message content/data.\n * @param memo - Optional memo for the message.\n * @param submitKey - Optional private key for topics requiring specific submit keys.\n * @returns A confirmation status string from the transaction receipt.\n */\n public async sendMessage(\n topicId: string,\n data: string,\n memo?: string,\n submitKey?: any\n ): Promise<number | undefined> {\n if (this.useEncryption) {\n data = encryptMessage(data);\n }\n\n try {\n const messageResponse = await this.standardClient.sendMessage(\n topicId,\n data,\n memo,\n submitKey\n );\n return messageResponse.topicSequenceNumber?.toNumber();\n } catch (error) {\n this.logger.error(`Error sending message to topic ${topicId}:`, error);\n throw new Error(\n `Failed to send message: ${\n error instanceof Error ? error.message : String(error)\n }`\n );\n }\n }\n\n /**\n * Retrieves messages from a topic using the standard SDK client.\n *\n * @param topicId - The topic ID to get messages from.\n * @returns Messages from the topic, mapped to the expected format.\n */\n public async getMessages(topicId: string): Promise<{\n messages: HCSMessageWithTimestamp[];\n }> {\n try {\n const result = await this.standardClient.getMessages(topicId);\n\n const mappedMessages = result.messages.map((sdkMessage) => {\n const timestamp = sdkMessage?.created?.getTime() || 0;\n\n return {\n ...sdkMessage,\n timestamp: timestamp,\n data: sdkMessage.data,\n sequence_number: sdkMessage.sequence_number,\n };\n });\n mappedMessages.sort(\n (a: { timestamp: number }, b: { timestamp: number }) =>\n a.timestamp - b.timestamp\n );\n return { messages: mappedMessages };\n } catch (error) {\n this.logger.error(`Error getting messages from topic ${topicId}:`, error);\n return { messages: [] };\n }\n }\n\n public async getMessageStream(topicId: string): Promise<{\n messages: HCSMessage[];\n }> {\n return this.standardClient.getMessageStream(topicId);\n }\n\n /**\n * Retrieves content from an inscribed message using the standard SDK client.\n * @param inscriptionIdOrData - The inscription ID (hcs://...) or potentially raw data string.\n * @returns The resolved message content.\n */\n public async getMessageContent(inscriptionIdOrData: string): Promise<string> {\n try {\n const content = await this.standardClient.getMessageContent(\n inscriptionIdOrData\n );\n return content;\n } catch (error) {\n this.logger.error(\n `Error retrieving message content for: ${inscriptionIdOrData}`,\n error\n );\n throw new Error(\n `Failed to retrieve message content: ${\n error instanceof Error ? error.message : String(error)\n }`\n );\n }\n }\n\n /**\n * Retrieves the inbound topic ID associated with the current operator.\n * This typically involves fetching the operator's own HCS-10 profile.\n * @returns A promise that resolves to the operator's inbound topic ID.\n * @throws {Error} If the operator ID cannot be determined or the profile/topic cannot be retrieved.\n */\n public async getInboundTopicId(): Promise<string> {\n try {\n const operatorId = this.getOperatorId();\n this.logger.info(\n `[HCS10Client] Retrieving profile for operator ${operatorId} to find inbound topic...`\n );\n const profileResponse = await this.getAgentProfile(operatorId);\n if (profileResponse.success && profileResponse.topicInfo?.inboundTopic) {\n this.logger.info(\n `[HCS10Client] Found inbound topic for operator ${operatorId}: ${profileResponse.topicInfo.inboundTopic}`\n );\n return profileResponse.topicInfo.inboundTopic;\n } else {\n throw new Error(\n `Could not retrieve inbound topic from profile for ${operatorId}. Profile success: ${profileResponse.success}, Error: ${profileResponse.error}`\n );\n }\n } catch (error) {\n this.logger.error(\n `[HCS10Client] Error fetching operator's inbound topic ID (${this.getOperatorId()}):`,\n error\n );\n const operatorId = this.getOperatorId();\n let detailedMessage = `Failed to get inbound topic ID for operator ${operatorId}.`;\n if (\n error instanceof Error &&\n error.message.includes('does not have a valid HCS-11 memo')\n ) {\n detailedMessage += ` The account profile may not exist or is invalid. Please ensure this operator account (${operatorId}) is registered as an HCS-10 agent. You might need to register it first (e.g., using the 'register_agent' tool or SDK function).`;\n } else if (error instanceof Error) {\n detailedMessage += ` Reason: ${error.message}`;\n } else {\n detailedMessage += ` Unexpected error: ${String(error)}`;\n }\n throw new Error(detailedMessage);\n }\n }\n\n /**\n * Retrieves the configured operator account ID and private key.\n * Required by tools needing to identify the current agent instance.\n */\n public getAccountAndSigner(): { accountId: string; signer: PrivateKey } {\n const result = this.standardClient.getAccountAndSigner();\n return {\n accountId: result.accountId,\n signer: result.signer as unknown as PrivateKey,\n };\n }\n\n /**\n * Retrieves the outbound topic ID for the current operator.\n * Fetches the operator's profile if necessary.\n * @returns The outbound topic ID string.\n * @throws If the outbound topic cannot be determined.\n */\n public async getOutboundTopicId(): Promise<string> {\n const operatorId = this.getOperatorId();\n const profile = await this.getAgentProfile(operatorId);\n if (profile.success && profile.topicInfo?.outboundTopic) {\n return profile.topicInfo.outboundTopic;\n } else {\n throw new Error(\n `Could not retrieve outbound topic from profile for ${operatorId}. Profile success: ${profile.success}, Error: ${profile.error}`\n );\n }\n }\n\n public setClient(accountId: string, privateKey: string): StandardSDKClient {\n this.standardClient = new StandardSDKClient({\n network: this.getNetwork(),\n operatorId: accountId,\n operatorPrivateKey: privateKey,\n guardedRegistryBaseUrl: this.guardedRegistryBaseUrl,\n });\n return this.standardClient;\n }\n}\n"],"names":["HCS10Client","operatorId","operatorPrivateKey","network","options","StandardSDKClient","Logger","operator","inboundTopicId","requestingAccountId","connectionRequestId","feeConfig","error","accountId","memo","outboundTopicId","maxAttempts","delayMs","metadata","builder","AgentBuilder","StandardAIAgentCapability","StandardInboundTopicType","platform","handle","key","value","hasFees","result","_a","_b","topicId","data","submitKey","encryptMessage","mappedMessages","sdkMessage","timestamp","a","b","inscriptionIdOrData","profileResponse","detailedMessage","profile","privateKey"],"mappings":";;AAgDO,MAAMA,EAAY;AAAA,EAOvB,YACEC,GACAC,GACAC,GACAC,GAKA;AACK,SAAA,iBAAiB,IAAIC,EAAkB;AAAA,MAC1C,SAAAF;AAAA,MACA,YAAAF;AAAA,MACA,oBAAAC;AAAA,MACA,wBAAwBE,KAAA,gBAAAA,EAAS;AAAA,MACjC,UAAUA,KAAA,gBAAAA,EAAS;AAAA,IAAA,CACpB,GACI,KAAA,0BAAyBA,KAAA,gBAAAA,EAAS,gBAAe,IACjD,KAAA,iBAAgBA,KAAA,gBAAAA,EAAS,kBAAiB,IAC1C,KAAA,SAAS,IAAIE,EAAO;AAAA,MACvB,QAAOF,KAAA,gBAAAA,EAAS,aAAY;AAAA,IAAA,CAC7B;AAAA,EAAA;AAAA,EAGI,gBAAwB;AAC7B,UAAMG,IAAW,KAAK,eAAe,UAAY,EAAA;AACjD,QAAI,CAACA;AACG,YAAA,IAAI,MAAM,wDAAwD;AAE1E,WAAOA,EAAS,SAAS;AAAA,EAAA;AAAA,EAGpB,aAAkC;AAChC,WAAA,KAAK,eAAe,WAAW;AAAA,EAAA;AAAA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AAAA,MAClB,QAAQA,EAAO;AAAA,IACjB;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASF,MAAa,qBAAsC;;AAC3C,UAAA3B,IAAa,KAAK,cAAc,GAChC0C,IAAU,MAAM,KAAK,gBAAgB1C,CAAU;AACrD,QAAI0C,EAAQ,aAAWd,IAAAc,EAAQ,cAAR,QAAAd,EAAmB;AACxC,aAAOc,EAAQ,UAAU;AAEzB,UAAM,IAAI;AAAA,MACR,sDAAsD1C,CAAU,sBAAsB0C,EAAQ,OAAO,YAAYA,EAAQ,KAAK;AAAA,IAChI;AAAA,EACF;AAAA,EAGK,UAAU9B,GAAmB+B,GAAuC;AACpE,gBAAA,iBAAiB,IAAIvC,EAAkB;AAAA,MAC1C,SAAS,KAAK,WAAW;AAAA,MACzB,YAAYQ;AAAA,MACZ,oBAAoB+B;AAAA,MACpB,wBAAwB,KAAK;AAAA,IAAA,CAC9B,GACM,KAAK;AAAA,EAAA;AAEhB;"}
@@ -0,0 +1 @@
1
+ export * from './HCS10Client';
@@ -0,0 +1,35 @@
1
+ import { FeeConfigBuilderInterface } from '@hashgraphonline/standards-sdk';
2
+ /**
3
+ * Agent metadata interface used during registration.
4
+ */
5
+ export interface AgentMetadata {
6
+ name: string;
7
+ description?: string;
8
+ contact?: string;
9
+ type?: 'autonomous' | 'manual';
10
+ model?: string;
11
+ capabilities?: number[];
12
+ social?: Record<string, string>;
13
+ properties?: Record<string, unknown>;
14
+ socials?: Record<string, string>;
15
+ creator?: string;
16
+ feeConfig?: FeeConfigBuilderInterface;
17
+ }
18
+ /**
19
+ * AgentChannels represents the communication topics for an agent.
20
+ */
21
+ export interface AgentChannels {
22
+ inboundTopicId: string;
23
+ outboundTopicId: string;
24
+ }
25
+ /**
26
+ * Represents a message in the HCS-10 protocol
27
+ */
28
+ export interface HCS10Message {
29
+ sender: string;
30
+ recipient: string;
31
+ content: string;
32
+ timestamp: number;
33
+ messageId: string;
34
+ metadata?: Record<string, unknown>;
35
+ }
package/dist/index.d.ts CHANGED
@@ -1,2 +1,5 @@
1
- export * from './src/index'
2
- export {}
1
+ export * from './hcs10';
2
+ export * from './tools';
3
+ export * from './state';
4
+ export * from './init';
5
+ export * from './plugins';