@hashgraphonline/standards-sdk 0.1.189 → 0.1.191

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 (576) hide show
  1. package/dist/browser/hcs-25/adapters/agentverse.d.ts.map +1 -1
  2. package/dist/browser/hcs-25/adapters/ans-trust-discovery.d.ts +22 -0
  3. package/dist/browser/hcs-25/adapters/ans-trust-discovery.d.ts.map +1 -0
  4. package/dist/browser/hcs-25/adapters/availability.d.ts.map +1 -1
  5. package/dist/browser/hcs-25/adapters/connectivity.d.ts.map +1 -1
  6. package/dist/browser/hcs-25/adapters/ethos.d.ts.map +1 -1
  7. package/dist/browser/hcs-25/adapters/index.d.ts +1 -0
  8. package/dist/browser/hcs-25/adapters/index.d.ts.map +1 -1
  9. package/dist/browser/hcs-25/adapters/model-evals.d.ts.map +1 -1
  10. package/dist/browser/hcs-25/adapters/simple-evals.d.ts.map +1 -1
  11. package/dist/browser/hcs-25/adapters/x402.d.ts.map +1 -1
  12. package/dist/browser/hcs-25/collectors/acp.d.ts +42 -0
  13. package/dist/browser/hcs-25/collectors/acp.d.ts.map +1 -0
  14. package/dist/browser/hcs-25/collectors/agentverse.d.ts +37 -0
  15. package/dist/browser/hcs-25/collectors/agentverse.d.ts.map +1 -0
  16. package/dist/browser/hcs-25/collectors/ans-trust-discovery.d.ts +32 -0
  17. package/dist/browser/hcs-25/collectors/ans-trust-discovery.d.ts.map +1 -0
  18. package/dist/browser/hcs-25/collectors/availability.d.ts +29 -0
  19. package/dist/browser/hcs-25/collectors/availability.d.ts.map +1 -0
  20. package/dist/browser/hcs-25/collectors/catalog.d.ts +64 -0
  21. package/dist/browser/hcs-25/collectors/catalog.d.ts.map +1 -0
  22. package/dist/browser/hcs-25/collectors/connectivity.d.ts +49 -0
  23. package/dist/browser/hcs-25/collectors/connectivity.d.ts.map +1 -0
  24. package/dist/browser/hcs-25/collectors/endpoints.d.ts +9 -0
  25. package/dist/browser/hcs-25/collectors/endpoints.d.ts.map +1 -0
  26. package/dist/browser/hcs-25/collectors/erc8004.d.ts +104 -0
  27. package/dist/browser/hcs-25/collectors/erc8004.d.ts.map +1 -0
  28. package/dist/browser/hcs-25/collectors/ethos.d.ts +95 -0
  29. package/dist/browser/hcs-25/collectors/ethos.d.ts.map +1 -0
  30. package/dist/browser/hcs-25/collectors/freshness.d.ts +36 -0
  31. package/dist/browser/hcs-25/collectors/freshness.d.ts.map +1 -0
  32. package/dist/browser/hcs-25/collectors/http.d.ts +67 -0
  33. package/dist/browser/hcs-25/collectors/http.d.ts.map +1 -0
  34. package/dist/browser/hcs-25/collectors/index.d.ts +22 -0
  35. package/dist/browser/hcs-25/collectors/index.d.ts.map +1 -0
  36. package/dist/browser/hcs-25/collectors/merge.d.ts +11 -0
  37. package/dist/browser/hcs-25/collectors/merge.d.ts.map +1 -0
  38. package/dist/browser/hcs-25/collectors/model-evals.d.ts +315 -0
  39. package/dist/browser/hcs-25/collectors/model-evals.d.ts.map +1 -0
  40. package/dist/browser/hcs-25/collectors/oss-popularity.d.ts +51 -0
  41. package/dist/browser/hcs-25/collectors/oss-popularity.d.ts.map +1 -0
  42. package/dist/browser/hcs-25/collectors/output-verification.d.ts +37 -0
  43. package/dist/browser/hcs-25/collectors/output-verification.d.ts.map +1 -0
  44. package/dist/browser/hcs-25/collectors/pipeline.d.ts +19 -0
  45. package/dist/browser/hcs-25/collectors/pipeline.d.ts.map +1 -0
  46. package/dist/browser/hcs-25/collectors/runner.d.ts +20 -0
  47. package/dist/browser/hcs-25/collectors/runner.d.ts.map +1 -0
  48. package/dist/browser/hcs-25/collectors/simple-evals.d.ts +91 -0
  49. package/dist/browser/hcs-25/collectors/simple-evals.d.ts.map +1 -0
  50. package/dist/browser/hcs-25/collectors/types.d.ts +113 -0
  51. package/dist/browser/hcs-25/collectors/types.d.ts.map +1 -0
  52. package/dist/browser/hcs-25/collectors/x402-onchain.d.ts +105 -0
  53. package/dist/browser/hcs-25/collectors/x402-onchain.d.ts.map +1 -0
  54. package/dist/browser/hcs-25/collectors/x402.d.ts +48 -0
  55. package/dist/browser/hcs-25/collectors/x402.d.ts.map +1 -0
  56. package/dist/browser/hcs-25/index.d.ts +1 -0
  57. package/dist/browser/hcs-25/index.d.ts.map +1 -1
  58. package/dist/browser/hcs-25/signals/ans-trust-discovery.d.ts +50 -0
  59. package/dist/browser/hcs-25/signals/ans-trust-discovery.d.ts.map +1 -0
  60. package/dist/browser/hcs-25/signals/index.d.ts +1 -0
  61. package/dist/browser/hcs-25/signals/index.d.ts.map +1 -1
  62. package/dist/browser/hcs-25/signals/marketplace.d.ts +6 -6
  63. package/dist/browser/hcs-25/signals/marketplace.d.ts.map +1 -1
  64. package/dist/browser/hcs-25/signals/model-evals.d.ts +12 -12
  65. package/dist/browser/hcs-25/signals/model-evals.d.ts.map +1 -1
  66. package/dist/browser/hcs-25/signals/operational.d.ts +15 -12
  67. package/dist/browser/hcs-25/signals/operational.d.ts.map +1 -1
  68. package/dist/browser/hcs-25/signals/simple-evals.d.ts +1 -1
  69. package/dist/browser/hcs-25/signals/simple-evals.d.ts.map +1 -1
  70. package/dist/browser-root/hcs-25/adapters/agentverse.d.ts.map +1 -1
  71. package/dist/browser-root/hcs-25/adapters/ans-trust-discovery.d.ts +22 -0
  72. package/dist/browser-root/hcs-25/adapters/ans-trust-discovery.d.ts.map +1 -0
  73. package/dist/browser-root/hcs-25/adapters/availability.d.ts.map +1 -1
  74. package/dist/browser-root/hcs-25/adapters/connectivity.d.ts.map +1 -1
  75. package/dist/browser-root/hcs-25/adapters/ethos.d.ts.map +1 -1
  76. package/dist/browser-root/hcs-25/adapters/index.d.ts +1 -0
  77. package/dist/browser-root/hcs-25/adapters/index.d.ts.map +1 -1
  78. package/dist/browser-root/hcs-25/adapters/model-evals.d.ts.map +1 -1
  79. package/dist/browser-root/hcs-25/adapters/simple-evals.d.ts.map +1 -1
  80. package/dist/browser-root/hcs-25/adapters/x402.d.ts.map +1 -1
  81. package/dist/browser-root/hcs-25/collectors/acp.d.ts +42 -0
  82. package/dist/browser-root/hcs-25/collectors/acp.d.ts.map +1 -0
  83. package/dist/browser-root/hcs-25/collectors/agentverse.d.ts +37 -0
  84. package/dist/browser-root/hcs-25/collectors/agentverse.d.ts.map +1 -0
  85. package/dist/browser-root/hcs-25/collectors/ans-trust-discovery.d.ts +32 -0
  86. package/dist/browser-root/hcs-25/collectors/ans-trust-discovery.d.ts.map +1 -0
  87. package/dist/browser-root/hcs-25/collectors/availability.d.ts +29 -0
  88. package/dist/browser-root/hcs-25/collectors/availability.d.ts.map +1 -0
  89. package/dist/browser-root/hcs-25/collectors/catalog.d.ts +64 -0
  90. package/dist/browser-root/hcs-25/collectors/catalog.d.ts.map +1 -0
  91. package/dist/browser-root/hcs-25/collectors/connectivity.d.ts +49 -0
  92. package/dist/browser-root/hcs-25/collectors/connectivity.d.ts.map +1 -0
  93. package/dist/browser-root/hcs-25/collectors/endpoints.d.ts +9 -0
  94. package/dist/browser-root/hcs-25/collectors/endpoints.d.ts.map +1 -0
  95. package/dist/browser-root/hcs-25/collectors/erc8004.d.ts +104 -0
  96. package/dist/browser-root/hcs-25/collectors/erc8004.d.ts.map +1 -0
  97. package/dist/browser-root/hcs-25/collectors/ethos.d.ts +95 -0
  98. package/dist/browser-root/hcs-25/collectors/ethos.d.ts.map +1 -0
  99. package/dist/browser-root/hcs-25/collectors/freshness.d.ts +36 -0
  100. package/dist/browser-root/hcs-25/collectors/freshness.d.ts.map +1 -0
  101. package/dist/browser-root/hcs-25/collectors/http.d.ts +67 -0
  102. package/dist/browser-root/hcs-25/collectors/http.d.ts.map +1 -0
  103. package/dist/browser-root/hcs-25/collectors/index.d.ts +22 -0
  104. package/dist/browser-root/hcs-25/collectors/index.d.ts.map +1 -0
  105. package/dist/browser-root/hcs-25/collectors/merge.d.ts +11 -0
  106. package/dist/browser-root/hcs-25/collectors/merge.d.ts.map +1 -0
  107. package/dist/browser-root/hcs-25/collectors/model-evals.d.ts +315 -0
  108. package/dist/browser-root/hcs-25/collectors/model-evals.d.ts.map +1 -0
  109. package/dist/browser-root/hcs-25/collectors/oss-popularity.d.ts +51 -0
  110. package/dist/browser-root/hcs-25/collectors/oss-popularity.d.ts.map +1 -0
  111. package/dist/browser-root/hcs-25/collectors/output-verification.d.ts +37 -0
  112. package/dist/browser-root/hcs-25/collectors/output-verification.d.ts.map +1 -0
  113. package/dist/browser-root/hcs-25/collectors/pipeline.d.ts +19 -0
  114. package/dist/browser-root/hcs-25/collectors/pipeline.d.ts.map +1 -0
  115. package/dist/browser-root/hcs-25/collectors/runner.d.ts +20 -0
  116. package/dist/browser-root/hcs-25/collectors/runner.d.ts.map +1 -0
  117. package/dist/browser-root/hcs-25/collectors/simple-evals.d.ts +91 -0
  118. package/dist/browser-root/hcs-25/collectors/simple-evals.d.ts.map +1 -0
  119. package/dist/browser-root/hcs-25/collectors/types.d.ts +113 -0
  120. package/dist/browser-root/hcs-25/collectors/types.d.ts.map +1 -0
  121. package/dist/browser-root/hcs-25/collectors/x402-onchain.d.ts +105 -0
  122. package/dist/browser-root/hcs-25/collectors/x402-onchain.d.ts.map +1 -0
  123. package/dist/browser-root/hcs-25/collectors/x402.d.ts +48 -0
  124. package/dist/browser-root/hcs-25/collectors/x402.d.ts.map +1 -0
  125. package/dist/browser-root/hcs-25/index.d.ts +1 -0
  126. package/dist/browser-root/hcs-25/index.d.ts.map +1 -1
  127. package/dist/browser-root/hcs-25/signals/ans-trust-discovery.d.ts +50 -0
  128. package/dist/browser-root/hcs-25/signals/ans-trust-discovery.d.ts.map +1 -0
  129. package/dist/browser-root/hcs-25/signals/index.d.ts +1 -0
  130. package/dist/browser-root/hcs-25/signals/index.d.ts.map +1 -1
  131. package/dist/browser-root/hcs-25/signals/marketplace.d.ts +6 -6
  132. package/dist/browser-root/hcs-25/signals/marketplace.d.ts.map +1 -1
  133. package/dist/browser-root/hcs-25/signals/model-evals.d.ts +12 -12
  134. package/dist/browser-root/hcs-25/signals/model-evals.d.ts.map +1 -1
  135. package/dist/browser-root/hcs-25/signals/operational.d.ts +15 -12
  136. package/dist/browser-root/hcs-25/signals/operational.d.ts.map +1 -1
  137. package/dist/browser-root/hcs-25/signals/simple-evals.d.ts +1 -1
  138. package/dist/browser-root/hcs-25/signals/simple-evals.d.ts.map +1 -1
  139. package/dist/cjs/hcs-25/adapters/agentverse.d.ts.map +1 -1
  140. package/dist/cjs/hcs-25/adapters/ans-trust-discovery.d.ts +22 -0
  141. package/dist/cjs/hcs-25/adapters/ans-trust-discovery.d.ts.map +1 -0
  142. package/dist/cjs/hcs-25/adapters/availability.d.ts.map +1 -1
  143. package/dist/cjs/hcs-25/adapters/connectivity.d.ts.map +1 -1
  144. package/dist/cjs/hcs-25/adapters/ethos.d.ts.map +1 -1
  145. package/dist/cjs/hcs-25/adapters/index.d.ts +1 -0
  146. package/dist/cjs/hcs-25/adapters/index.d.ts.map +1 -1
  147. package/dist/cjs/hcs-25/adapters/model-evals.d.ts.map +1 -1
  148. package/dist/cjs/hcs-25/adapters/simple-evals.d.ts.map +1 -1
  149. package/dist/cjs/hcs-25/adapters/x402.d.ts.map +1 -1
  150. package/dist/cjs/hcs-25/collectors/acp.d.ts +42 -0
  151. package/dist/cjs/hcs-25/collectors/acp.d.ts.map +1 -0
  152. package/dist/cjs/hcs-25/collectors/agentverse.d.ts +37 -0
  153. package/dist/cjs/hcs-25/collectors/agentverse.d.ts.map +1 -0
  154. package/dist/cjs/hcs-25/collectors/ans-trust-discovery.d.ts +32 -0
  155. package/dist/cjs/hcs-25/collectors/ans-trust-discovery.d.ts.map +1 -0
  156. package/dist/cjs/hcs-25/collectors/availability.d.ts +29 -0
  157. package/dist/cjs/hcs-25/collectors/availability.d.ts.map +1 -0
  158. package/dist/cjs/hcs-25/collectors/catalog.d.ts +64 -0
  159. package/dist/cjs/hcs-25/collectors/catalog.d.ts.map +1 -0
  160. package/dist/cjs/hcs-25/collectors/connectivity.d.ts +49 -0
  161. package/dist/cjs/hcs-25/collectors/connectivity.d.ts.map +1 -0
  162. package/dist/cjs/hcs-25/collectors/endpoints.d.ts +9 -0
  163. package/dist/cjs/hcs-25/collectors/endpoints.d.ts.map +1 -0
  164. package/dist/cjs/hcs-25/collectors/erc8004.d.ts +104 -0
  165. package/dist/cjs/hcs-25/collectors/erc8004.d.ts.map +1 -0
  166. package/dist/cjs/hcs-25/collectors/ethos.d.ts +95 -0
  167. package/dist/cjs/hcs-25/collectors/ethos.d.ts.map +1 -0
  168. package/dist/cjs/hcs-25/collectors/freshness.d.ts +36 -0
  169. package/dist/cjs/hcs-25/collectors/freshness.d.ts.map +1 -0
  170. package/dist/cjs/hcs-25/collectors/http.d.ts +67 -0
  171. package/dist/cjs/hcs-25/collectors/http.d.ts.map +1 -0
  172. package/dist/cjs/hcs-25/collectors/index.d.ts +22 -0
  173. package/dist/cjs/hcs-25/collectors/index.d.ts.map +1 -0
  174. package/dist/cjs/hcs-25/collectors/merge.d.ts +11 -0
  175. package/dist/cjs/hcs-25/collectors/merge.d.ts.map +1 -0
  176. package/dist/cjs/hcs-25/collectors/model-evals.d.ts +315 -0
  177. package/dist/cjs/hcs-25/collectors/model-evals.d.ts.map +1 -0
  178. package/dist/cjs/hcs-25/collectors/oss-popularity.d.ts +51 -0
  179. package/dist/cjs/hcs-25/collectors/oss-popularity.d.ts.map +1 -0
  180. package/dist/cjs/hcs-25/collectors/output-verification.d.ts +37 -0
  181. package/dist/cjs/hcs-25/collectors/output-verification.d.ts.map +1 -0
  182. package/dist/cjs/hcs-25/collectors/pipeline.d.ts +19 -0
  183. package/dist/cjs/hcs-25/collectors/pipeline.d.ts.map +1 -0
  184. package/dist/cjs/hcs-25/collectors/runner.d.ts +20 -0
  185. package/dist/cjs/hcs-25/collectors/runner.d.ts.map +1 -0
  186. package/dist/cjs/hcs-25/collectors/simple-evals.d.ts +91 -0
  187. package/dist/cjs/hcs-25/collectors/simple-evals.d.ts.map +1 -0
  188. package/dist/cjs/hcs-25/collectors/types.d.ts +113 -0
  189. package/dist/cjs/hcs-25/collectors/types.d.ts.map +1 -0
  190. package/dist/cjs/hcs-25/collectors/x402-onchain.d.ts +105 -0
  191. package/dist/cjs/hcs-25/collectors/x402-onchain.d.ts.map +1 -0
  192. package/dist/cjs/hcs-25/collectors/x402.d.ts +48 -0
  193. package/dist/cjs/hcs-25/collectors/x402.d.ts.map +1 -0
  194. package/dist/cjs/hcs-25/index.d.ts +1 -0
  195. package/dist/cjs/hcs-25/index.d.ts.map +1 -1
  196. package/dist/cjs/hcs-25/signals/ans-trust-discovery.d.ts +50 -0
  197. package/dist/cjs/hcs-25/signals/ans-trust-discovery.d.ts.map +1 -0
  198. package/dist/cjs/hcs-25/signals/index.d.ts +1 -0
  199. package/dist/cjs/hcs-25/signals/index.d.ts.map +1 -1
  200. package/dist/cjs/hcs-25/signals/marketplace.d.ts +6 -6
  201. package/dist/cjs/hcs-25/signals/marketplace.d.ts.map +1 -1
  202. package/dist/cjs/hcs-25/signals/model-evals.d.ts +12 -12
  203. package/dist/cjs/hcs-25/signals/model-evals.d.ts.map +1 -1
  204. package/dist/cjs/hcs-25/signals/operational.d.ts +15 -12
  205. package/dist/cjs/hcs-25/signals/operational.d.ts.map +1 -1
  206. package/dist/cjs/hcs-25/signals/simple-evals.d.ts +1 -1
  207. package/dist/cjs/hcs-25/signals/simple-evals.d.ts.map +1 -1
  208. package/dist/cjs/standards-sdk.cjs +2 -2
  209. package/dist/cjs/standards-sdk.cjs.map +1 -1
  210. package/dist/es/hcs-25/adapters/agentverse.d.ts.map +1 -1
  211. package/dist/es/hcs-25/adapters/ans-trust-discovery.d.ts +22 -0
  212. package/dist/es/hcs-25/adapters/ans-trust-discovery.d.ts.map +1 -0
  213. package/dist/es/hcs-25/adapters/availability.d.ts.map +1 -1
  214. package/dist/es/hcs-25/adapters/connectivity.d.ts.map +1 -1
  215. package/dist/es/hcs-25/adapters/ethos.d.ts.map +1 -1
  216. package/dist/es/hcs-25/adapters/index.d.ts +1 -0
  217. package/dist/es/hcs-25/adapters/index.d.ts.map +1 -1
  218. package/dist/es/hcs-25/adapters/model-evals.d.ts.map +1 -1
  219. package/dist/es/hcs-25/adapters/simple-evals.d.ts.map +1 -1
  220. package/dist/es/hcs-25/adapters/x402.d.ts.map +1 -1
  221. package/dist/es/hcs-25/collectors/acp.d.ts +42 -0
  222. package/dist/es/hcs-25/collectors/acp.d.ts.map +1 -0
  223. package/dist/es/hcs-25/collectors/agentverse.d.ts +37 -0
  224. package/dist/es/hcs-25/collectors/agentverse.d.ts.map +1 -0
  225. package/dist/es/hcs-25/collectors/ans-trust-discovery.d.ts +32 -0
  226. package/dist/es/hcs-25/collectors/ans-trust-discovery.d.ts.map +1 -0
  227. package/dist/es/hcs-25/collectors/availability.d.ts +29 -0
  228. package/dist/es/hcs-25/collectors/availability.d.ts.map +1 -0
  229. package/dist/es/hcs-25/collectors/catalog.d.ts +64 -0
  230. package/dist/es/hcs-25/collectors/catalog.d.ts.map +1 -0
  231. package/dist/es/hcs-25/collectors/connectivity.d.ts +49 -0
  232. package/dist/es/hcs-25/collectors/connectivity.d.ts.map +1 -0
  233. package/dist/es/hcs-25/collectors/endpoints.d.ts +9 -0
  234. package/dist/es/hcs-25/collectors/endpoints.d.ts.map +1 -0
  235. package/dist/es/hcs-25/collectors/erc8004.d.ts +104 -0
  236. package/dist/es/hcs-25/collectors/erc8004.d.ts.map +1 -0
  237. package/dist/es/hcs-25/collectors/ethos.d.ts +95 -0
  238. package/dist/es/hcs-25/collectors/ethos.d.ts.map +1 -0
  239. package/dist/es/hcs-25/collectors/freshness.d.ts +36 -0
  240. package/dist/es/hcs-25/collectors/freshness.d.ts.map +1 -0
  241. package/dist/es/hcs-25/collectors/http.d.ts +67 -0
  242. package/dist/es/hcs-25/collectors/http.d.ts.map +1 -0
  243. package/dist/es/hcs-25/collectors/index.d.ts +22 -0
  244. package/dist/es/hcs-25/collectors/index.d.ts.map +1 -0
  245. package/dist/es/hcs-25/collectors/merge.d.ts +11 -0
  246. package/dist/es/hcs-25/collectors/merge.d.ts.map +1 -0
  247. package/dist/es/hcs-25/collectors/model-evals.d.ts +315 -0
  248. package/dist/es/hcs-25/collectors/model-evals.d.ts.map +1 -0
  249. package/dist/es/hcs-25/collectors/oss-popularity.d.ts +51 -0
  250. package/dist/es/hcs-25/collectors/oss-popularity.d.ts.map +1 -0
  251. package/dist/es/hcs-25/collectors/output-verification.d.ts +37 -0
  252. package/dist/es/hcs-25/collectors/output-verification.d.ts.map +1 -0
  253. package/dist/es/hcs-25/collectors/pipeline.d.ts +19 -0
  254. package/dist/es/hcs-25/collectors/pipeline.d.ts.map +1 -0
  255. package/dist/es/hcs-25/collectors/runner.d.ts +20 -0
  256. package/dist/es/hcs-25/collectors/runner.d.ts.map +1 -0
  257. package/dist/es/hcs-25/collectors/simple-evals.d.ts +91 -0
  258. package/dist/es/hcs-25/collectors/simple-evals.d.ts.map +1 -0
  259. package/dist/es/hcs-25/collectors/types.d.ts +113 -0
  260. package/dist/es/hcs-25/collectors/types.d.ts.map +1 -0
  261. package/dist/es/hcs-25/collectors/x402-onchain.d.ts +105 -0
  262. package/dist/es/hcs-25/collectors/x402-onchain.d.ts.map +1 -0
  263. package/dist/es/hcs-25/collectors/x402.d.ts +48 -0
  264. package/dist/es/hcs-25/collectors/x402.d.ts.map +1 -0
  265. package/dist/es/hcs-25/index.d.ts +1 -0
  266. package/dist/es/hcs-25/index.d.ts.map +1 -1
  267. package/dist/es/hcs-25/signals/ans-trust-discovery.d.ts +50 -0
  268. package/dist/es/hcs-25/signals/ans-trust-discovery.d.ts.map +1 -0
  269. package/dist/es/hcs-25/signals/index.d.ts +1 -0
  270. package/dist/es/hcs-25/signals/index.d.ts.map +1 -1
  271. package/dist/es/hcs-25/signals/marketplace.d.ts +6 -6
  272. package/dist/es/hcs-25/signals/marketplace.d.ts.map +1 -1
  273. package/dist/es/hcs-25/signals/model-evals.d.ts +12 -12
  274. package/dist/es/hcs-25/signals/model-evals.d.ts.map +1 -1
  275. package/dist/es/hcs-25/signals/operational.d.ts +15 -12
  276. package/dist/es/hcs-25/signals/operational.d.ts.map +1 -1
  277. package/dist/es/hcs-25/signals/simple-evals.d.ts +1 -1
  278. package/dist/es/hcs-25/signals/simple-evals.d.ts.map +1 -1
  279. package/dist/es/standards-sdk.es.js +144 -58
  280. package/dist/es/standards-sdk.es.js.map +1 -1
  281. package/dist/es/standards-sdk.es101.js +2 -2
  282. package/dist/es/standards-sdk.es103.js +2 -2
  283. package/dist/es/standards-sdk.es104.js +1 -1
  284. package/dist/es/standards-sdk.es106.js +1 -1
  285. package/dist/es/standards-sdk.es108.js +2 -2
  286. package/dist/es/standards-sdk.es11.js +1 -1
  287. package/dist/es/standards-sdk.es110.js +1 -1
  288. package/dist/es/standards-sdk.es111.js +2 -2
  289. package/dist/es/standards-sdk.es115.js +3 -3
  290. package/dist/es/standards-sdk.es116.js +4 -4
  291. package/dist/es/standards-sdk.es12.js +1 -1
  292. package/dist/es/standards-sdk.es120.js +22 -4
  293. package/dist/es/standards-sdk.es120.js.map +1 -1
  294. package/dist/es/standards-sdk.es121.js +15 -12
  295. package/dist/es/standards-sdk.es121.js.map +1 -1
  296. package/dist/es/standards-sdk.es122.js +176 -240
  297. package/dist/es/standards-sdk.es122.js.map +1 -1
  298. package/dist/es/standards-sdk.es123.js +42 -468
  299. package/dist/es/standards-sdk.es123.js.map +1 -1
  300. package/dist/es/standards-sdk.es124.js +29 -103
  301. package/dist/es/standards-sdk.es124.js.map +1 -1
  302. package/dist/es/standards-sdk.es125.js +185 -145
  303. package/dist/es/standards-sdk.es125.js.map +1 -1
  304. package/dist/es/standards-sdk.es126.js +13 -33
  305. package/dist/es/standards-sdk.es126.js.map +1 -1
  306. package/dist/es/standards-sdk.es127.js +45 -10
  307. package/dist/es/standards-sdk.es127.js.map +1 -1
  308. package/dist/es/standards-sdk.es128.js +120 -168
  309. package/dist/es/standards-sdk.es128.js.map +1 -1
  310. package/dist/es/standards-sdk.es129.js +158 -26
  311. package/dist/es/standards-sdk.es129.js.map +1 -1
  312. package/dist/es/standards-sdk.es13.js +1 -1
  313. package/dist/es/standards-sdk.es130.js +166 -19
  314. package/dist/es/standards-sdk.es130.js.map +1 -1
  315. package/dist/es/standards-sdk.es131.js +360 -140
  316. package/dist/es/standards-sdk.es131.js.map +1 -1
  317. package/dist/es/standards-sdk.es132.js +371 -180
  318. package/dist/es/standards-sdk.es132.js.map +1 -1
  319. package/dist/es/standards-sdk.es133.js +210 -766
  320. package/dist/es/standards-sdk.es133.js.map +1 -1
  321. package/dist/es/standards-sdk.es134.js +229 -11
  322. package/dist/es/standards-sdk.es134.js.map +1 -1
  323. package/dist/es/standards-sdk.es135.js +368 -556
  324. package/dist/es/standards-sdk.es135.js.map +1 -1
  325. package/dist/es/standards-sdk.es136.js +108 -612
  326. package/dist/es/standards-sdk.es136.js.map +1 -1
  327. package/dist/es/standards-sdk.es137.js +251 -12
  328. package/dist/es/standards-sdk.es137.js.map +1 -1
  329. package/dist/es/standards-sdk.es138.js +1330 -2
  330. package/dist/es/standards-sdk.es138.js.map +1 -1
  331. package/dist/es/standards-sdk.es139.js +126 -79
  332. package/dist/es/standards-sdk.es139.js.map +1 -1
  333. package/dist/es/standards-sdk.es14.js +1 -1
  334. package/dist/es/standards-sdk.es140.js +264 -32
  335. package/dist/es/standards-sdk.es140.js.map +1 -1
  336. package/dist/es/standards-sdk.es141.js +111 -2
  337. package/dist/es/standards-sdk.es141.js.map +1 -1
  338. package/dist/es/standards-sdk.es142.js +244 -227
  339. package/dist/es/standards-sdk.es142.js.map +1 -1
  340. package/dist/es/standards-sdk.es143.js +436 -1098
  341. package/dist/es/standards-sdk.es143.js.map +1 -1
  342. package/dist/es/standards-sdk.es144.js +92 -293
  343. package/dist/es/standards-sdk.es144.js.map +1 -1
  344. package/dist/es/standards-sdk.es145.js +157 -419
  345. package/dist/es/standards-sdk.es145.js.map +1 -1
  346. package/dist/es/standards-sdk.es146.js +30 -351
  347. package/dist/es/standards-sdk.es146.js.map +1 -1
  348. package/dist/es/standards-sdk.es147.js +9 -1119
  349. package/dist/es/standards-sdk.es147.js.map +1 -1
  350. package/dist/es/standards-sdk.es148.js +160 -186
  351. package/dist/es/standards-sdk.es148.js.map +1 -1
  352. package/dist/es/standards-sdk.es149.js +27 -1565
  353. package/dist/es/standards-sdk.es149.js.map +1 -1
  354. package/dist/es/standards-sdk.es15.js +1 -1
  355. package/dist/es/standards-sdk.es150.js +16 -1160
  356. package/dist/es/standards-sdk.es150.js.map +1 -1
  357. package/dist/es/standards-sdk.es151.js +157 -14
  358. package/dist/es/standards-sdk.es151.js.map +1 -1
  359. package/dist/es/standards-sdk.es152.js +191 -440
  360. package/dist/es/standards-sdk.es152.js.map +1 -1
  361. package/dist/es/standards-sdk.es153.js +764 -233
  362. package/dist/es/standards-sdk.es153.js.map +1 -1
  363. package/dist/es/standards-sdk.es154.js +13 -4
  364. package/dist/es/standards-sdk.es154.js.map +1 -1
  365. package/dist/es/standards-sdk.es155.js +567 -81
  366. package/dist/es/standards-sdk.es155.js.map +1 -1
  367. package/dist/es/standards-sdk.es156.js +617 -78
  368. package/dist/es/standards-sdk.es156.js.map +1 -1
  369. package/dist/es/standards-sdk.es157.js +13 -60
  370. package/dist/es/standards-sdk.es157.js.map +1 -1
  371. package/dist/es/standards-sdk.es158.js +2 -2547
  372. package/dist/es/standards-sdk.es158.js.map +1 -1
  373. package/dist/es/standards-sdk.es159.js +73 -145
  374. package/dist/es/standards-sdk.es159.js.map +1 -1
  375. package/dist/es/standards-sdk.es16.js +6 -6
  376. package/dist/es/standards-sdk.es160.js +40 -7
  377. package/dist/es/standards-sdk.es160.js.map +1 -1
  378. package/dist/es/standards-sdk.es161.js +2 -86
  379. package/dist/es/standards-sdk.es161.js.map +1 -1
  380. package/dist/es/standards-sdk.es162.js +225 -55
  381. package/dist/es/standards-sdk.es162.js.map +1 -1
  382. package/dist/es/standards-sdk.es163.js +1137 -191
  383. package/dist/es/standards-sdk.es163.js.map +1 -1
  384. package/dist/es/standards-sdk.es164.js +303 -23
  385. package/dist/es/standards-sdk.es164.js.map +1 -1
  386. package/dist/es/standards-sdk.es165.js +419 -55
  387. package/dist/es/standards-sdk.es165.js.map +1 -1
  388. package/dist/es/standards-sdk.es166.js +351 -91
  389. package/dist/es/standards-sdk.es166.js.map +1 -1
  390. package/dist/es/standards-sdk.es167.js +1113 -40
  391. package/dist/es/standards-sdk.es167.js.map +1 -1
  392. package/dist/es/standards-sdk.es168.js +200 -196
  393. package/dist/es/standards-sdk.es168.js.map +1 -1
  394. package/dist/es/standards-sdk.es169.js +1561 -50
  395. package/dist/es/standards-sdk.es169.js.map +1 -1
  396. package/dist/es/standards-sdk.es170.js +1161 -44
  397. package/dist/es/standards-sdk.es170.js.map +1 -1
  398. package/dist/es/standards-sdk.es171.js +14 -53
  399. package/dist/es/standards-sdk.es171.js.map +1 -1
  400. package/dist/es/standards-sdk.es172.js +443 -41
  401. package/dist/es/standards-sdk.es172.js.map +1 -1
  402. package/dist/es/standards-sdk.es173.js +242 -105
  403. package/dist/es/standards-sdk.es173.js.map +1 -1
  404. package/dist/es/standards-sdk.es174.js +4 -54
  405. package/dist/es/standards-sdk.es174.js.map +1 -1
  406. package/dist/es/standards-sdk.es175.js +79 -42
  407. package/dist/es/standards-sdk.es175.js.map +1 -1
  408. package/dist/es/standards-sdk.es176.js +87 -72
  409. package/dist/es/standards-sdk.es176.js.map +1 -1
  410. package/dist/es/standards-sdk.es177.js +60 -68
  411. package/dist/es/standards-sdk.es177.js.map +1 -1
  412. package/dist/es/standards-sdk.es178.js +2545 -42
  413. package/dist/es/standards-sdk.es178.js.map +1 -1
  414. package/dist/es/standards-sdk.es179.js +157 -34
  415. package/dist/es/standards-sdk.es179.js.map +1 -1
  416. package/dist/es/standards-sdk.es18.js +13 -13
  417. package/dist/es/standards-sdk.es180.js +7 -30
  418. package/dist/es/standards-sdk.es180.js.map +1 -1
  419. package/dist/es/standards-sdk.es181.js +86 -34
  420. package/dist/es/standards-sdk.es181.js.map +1 -1
  421. package/dist/es/standards-sdk.es182.js +65 -48
  422. package/dist/es/standards-sdk.es182.js.map +1 -1
  423. package/dist/es/standards-sdk.es183.js +27 -138
  424. package/dist/es/standards-sdk.es183.js.map +1 -1
  425. package/dist/es/standards-sdk.es184.js +191 -37
  426. package/dist/es/standards-sdk.es184.js.map +1 -1
  427. package/dist/es/standards-sdk.es185.js +17 -12473
  428. package/dist/es/standards-sdk.es185.js.map +1 -1
  429. package/dist/es/standards-sdk.es186.js +56 -53
  430. package/dist/es/standards-sdk.es186.js.map +1 -1
  431. package/dist/es/standards-sdk.es187.js +104 -100
  432. package/dist/es/standards-sdk.es187.js.map +1 -1
  433. package/dist/es/standards-sdk.es188.js +43 -75
  434. package/dist/es/standards-sdk.es188.js.map +1 -1
  435. package/dist/es/standards-sdk.es189.js +55 -197
  436. package/dist/es/standards-sdk.es189.js.map +1 -1
  437. package/dist/es/standards-sdk.es19.js +10 -10
  438. package/dist/es/standards-sdk.es190.js +229 -669
  439. package/dist/es/standards-sdk.es190.js.map +1 -1
  440. package/dist/es/standards-sdk.es191.js +67 -166
  441. package/dist/es/standards-sdk.es191.js.map +1 -1
  442. package/dist/es/standards-sdk.es192.js +45 -317
  443. package/dist/es/standards-sdk.es192.js.map +1 -1
  444. package/dist/es/standards-sdk.es193.js +59 -342
  445. package/dist/es/standards-sdk.es193.js.map +1 -1
  446. package/dist/es/standards-sdk.es194.js +45 -448
  447. package/dist/es/standards-sdk.es194.js.map +1 -1
  448. package/dist/es/standards-sdk.es195.js +117 -325
  449. package/dist/es/standards-sdk.es195.js.map +1 -1
  450. package/dist/es/standards-sdk.es196.js +51 -69
  451. package/dist/es/standards-sdk.es196.js.map +1 -1
  452. package/dist/es/standards-sdk.es197.js +54 -67
  453. package/dist/es/standards-sdk.es197.js.map +1 -1
  454. package/dist/es/standards-sdk.es198.js +72 -17
  455. package/dist/es/standards-sdk.es198.js.map +1 -1
  456. package/dist/es/standards-sdk.es199.js +75 -139
  457. package/dist/es/standards-sdk.es199.js.map +1 -1
  458. package/dist/es/standards-sdk.es2.js +2 -2
  459. package/dist/es/standards-sdk.es20.js +1 -1
  460. package/dist/es/standards-sdk.es200.js +44 -517
  461. package/dist/es/standards-sdk.es200.js.map +1 -1
  462. package/dist/es/standards-sdk.es201.js +33 -256
  463. package/dist/es/standards-sdk.es201.js.map +1 -1
  464. package/dist/es/standards-sdk.es202.js +30 -196
  465. package/dist/es/standards-sdk.es202.js.map +1 -1
  466. package/dist/es/standards-sdk.es203.js +34 -119
  467. package/dist/es/standards-sdk.es203.js.map +1 -1
  468. package/dist/es/standards-sdk.es204.js +48 -152
  469. package/dist/es/standards-sdk.es204.js.map +1 -1
  470. package/dist/es/standards-sdk.es205.js +126 -172
  471. package/dist/es/standards-sdk.es205.js.map +1 -1
  472. package/dist/es/standards-sdk.es206.js +34 -676
  473. package/dist/es/standards-sdk.es206.js.map +1 -1
  474. package/dist/es/standards-sdk.es207.js +12453 -156
  475. package/dist/es/standards-sdk.es207.js.map +1 -1
  476. package/dist/es/standards-sdk.es208.js +14 -232
  477. package/dist/es/standards-sdk.es208.js.map +1 -1
  478. package/dist/es/standards-sdk.es209.js +49 -232
  479. package/dist/es/standards-sdk.es209.js.map +1 -1
  480. package/dist/es/standards-sdk.es21.js +1 -1
  481. package/dist/es/standards-sdk.es210.js +114 -0
  482. package/dist/es/standards-sdk.es210.js.map +1 -0
  483. package/dist/es/standards-sdk.es211.js +84 -0
  484. package/dist/es/standards-sdk.es211.js.map +1 -0
  485. package/dist/es/standards-sdk.es212.js +203 -0
  486. package/dist/es/standards-sdk.es212.js.map +1 -0
  487. package/dist/es/standards-sdk.es213.js +76 -0
  488. package/dist/es/standards-sdk.es213.js.map +1 -0
  489. package/dist/es/standards-sdk.es214.js +675 -0
  490. package/dist/es/standards-sdk.es214.js.map +1 -0
  491. package/dist/es/standards-sdk.es215.js +175 -0
  492. package/dist/es/standards-sdk.es215.js.map +1 -0
  493. package/dist/es/standards-sdk.es216.js +325 -0
  494. package/dist/es/standards-sdk.es216.js.map +1 -0
  495. package/dist/es/standards-sdk.es217.js +349 -0
  496. package/dist/es/standards-sdk.es217.js.map +1 -0
  497. package/dist/es/standards-sdk.es218.js +456 -0
  498. package/dist/es/standards-sdk.es218.js.map +1 -0
  499. package/dist/es/standards-sdk.es219.js +334 -0
  500. package/dist/es/standards-sdk.es219.js.map +1 -0
  501. package/dist/es/standards-sdk.es22.js +1 -1
  502. package/dist/es/standards-sdk.es220.js +79 -0
  503. package/dist/es/standards-sdk.es220.js.map +1 -0
  504. package/dist/es/standards-sdk.es221.js +142 -0
  505. package/dist/es/standards-sdk.es221.js.map +1 -0
  506. package/dist/es/standards-sdk.es222.js +520 -0
  507. package/dist/es/standards-sdk.es222.js.map +1 -0
  508. package/dist/es/standards-sdk.es223.js +262 -0
  509. package/dist/es/standards-sdk.es223.js.map +1 -0
  510. package/dist/es/standards-sdk.es224.js +199 -0
  511. package/dist/es/standards-sdk.es224.js.map +1 -0
  512. package/dist/es/standards-sdk.es225.js +122 -0
  513. package/dist/es/standards-sdk.es225.js.map +1 -0
  514. package/dist/es/standards-sdk.es226.js +155 -0
  515. package/dist/es/standards-sdk.es226.js.map +1 -0
  516. package/dist/es/standards-sdk.es227.js +187 -0
  517. package/dist/es/standards-sdk.es227.js.map +1 -0
  518. package/dist/es/standards-sdk.es228.js +687 -0
  519. package/dist/es/standards-sdk.es228.js.map +1 -0
  520. package/dist/es/standards-sdk.es229.js +188 -0
  521. package/dist/es/standards-sdk.es229.js.map +1 -0
  522. package/dist/es/standards-sdk.es23.js +1 -1
  523. package/dist/es/standards-sdk.es230.js +238 -0
  524. package/dist/es/standards-sdk.es230.js.map +1 -0
  525. package/dist/es/standards-sdk.es231.js +242 -0
  526. package/dist/es/standards-sdk.es231.js.map +1 -0
  527. package/dist/es/standards-sdk.es24.js +1 -1
  528. package/dist/es/standards-sdk.es25.js +1 -1
  529. package/dist/es/standards-sdk.es26.js +1 -1
  530. package/dist/es/standards-sdk.es27.js +13 -13
  531. package/dist/es/standards-sdk.es30.js +2 -2
  532. package/dist/es/standards-sdk.es31.js +4 -4
  533. package/dist/es/standards-sdk.es32.js +1 -1
  534. package/dist/es/standards-sdk.es35.js +7 -7
  535. package/dist/es/standards-sdk.es36.js +4 -4
  536. package/dist/es/standards-sdk.es37.js +2 -2
  537. package/dist/es/standards-sdk.es38.js +2 -2
  538. package/dist/es/standards-sdk.es39.js +1 -1
  539. package/dist/es/standards-sdk.es4.js +2 -2
  540. package/dist/es/standards-sdk.es40.js +1 -1
  541. package/dist/es/standards-sdk.es41.js +2 -2
  542. package/dist/es/standards-sdk.es46.js +1 -1
  543. package/dist/es/standards-sdk.es5.js +2 -2
  544. package/dist/es/standards-sdk.es51.js +1 -1
  545. package/dist/es/standards-sdk.es53.js +1 -1
  546. package/dist/es/standards-sdk.es56.js +2 -2
  547. package/dist/es/standards-sdk.es59.js +1 -1
  548. package/dist/es/standards-sdk.es6.js +2 -2
  549. package/dist/es/standards-sdk.es60.js +1 -1
  550. package/dist/es/standards-sdk.es62.js +1 -1
  551. package/dist/es/standards-sdk.es63.js +2 -2
  552. package/dist/es/standards-sdk.es64.js +1 -1
  553. package/dist/es/standards-sdk.es65.js +1 -1
  554. package/dist/es/standards-sdk.es66.js +1 -1
  555. package/dist/es/standards-sdk.es67.js +8 -8
  556. package/dist/es/standards-sdk.es69.js +1 -1
  557. package/dist/es/standards-sdk.es7.js +1 -1
  558. package/dist/es/standards-sdk.es71.js +2 -2
  559. package/dist/es/standards-sdk.es72.js +3 -3
  560. package/dist/es/standards-sdk.es75.js +5 -5
  561. package/dist/es/standards-sdk.es76.js +3 -3
  562. package/dist/es/standards-sdk.es77.js +2 -2
  563. package/dist/es/standards-sdk.es78.js +1 -1
  564. package/dist/es/standards-sdk.es81.js +2 -2
  565. package/dist/es/standards-sdk.es83.js +2 -2
  566. package/dist/es/standards-sdk.es84.js +5 -5
  567. package/dist/es/standards-sdk.es85.js +1 -1
  568. package/dist/es/standards-sdk.es88.js +1 -1
  569. package/dist/es/standards-sdk.es89.js +2 -2
  570. package/dist/es/standards-sdk.es9.js +2 -2
  571. package/dist/es/standards-sdk.es90.js +4 -4
  572. package/dist/es/standards-sdk.es94.js +3 -3
  573. package/dist/es/standards-sdk.es96.js +2 -2
  574. package/dist/es/standards-sdk.es98.js +1 -1
  575. package/dist/es/standards-sdk.es99.js +3 -3
  576. package/package.json +1 -1
@@ -1,52 +1,1169 @@
1
- import { clampScore } from "./standards-sdk.es119.js";
2
- import { readMetadataRecord, readNumber } from "./standards-sdk.es179.js";
3
- import "./standards-sdk.es163.js";
4
- import "./standards-sdk.es176.js";
5
- import "./standards-sdk.es177.js";
6
- import "./standards-sdk.es178.js";
7
- import { clampUnit } from "./standards-sdk.es164.js";
8
- const DEFAULT_INCLUDED_REGISTRIES = ["erc-8004"];
9
- const MISSING = { value: 0, status: "missing" };
10
- function normalizeRating(subject) {
11
- const summary = readMetadataRecord(subject, "erc8004FeedbackSummary");
12
- const averageScore = summary ? readNumber(summary, "averageScore") : null;
13
- return averageScore === null ? MISSING : { value: clampScore(averageScore), status: "ok" };
14
- }
15
- function createErc8004FeedbackAdapter(options = {}) {
16
- const volumeWeight = options.volumeWeight ?? 10;
17
- const volumeCap = options.volumeCap ?? 20;
18
- return {
19
- id: "erc8004-feedback",
20
- weight: 1,
21
- contributionMode: "scoped",
22
- includeRegistries: options.includeRegistries ?? DEFAULT_INCLUDED_REGISTRIES,
23
- components: [
1
+ import { Buffer } from "buffer";
2
+ import { secp256k1 } from "@noble/curves/secp256k1.js";
3
+ import { ZodError } from "zod";
4
+ import { agentFeedbackResponseSchema, agentFeedbackIndexResponseSchema, agentFeedbackEntriesIndexResponseSchema, agentFeedbackEligibilityResponseSchema, agentFeedbackSubmissionResponseSchema, registerAgentResponseSchema } from "./standards-sdk.es178.js";
5
+ import { fetchHistorySnapshot, attachDecryptedHistory, registerConversationContextForEncryption, resolveDecryptionContext, decryptHistoryEntryFromContext } from "./standards-sdk.es221.js";
6
+ import { createAgentNetworkApi } from "./standards-sdk.es172.js";
7
+ import { createChatApi, createSession, resumeSession, checkChatReadiness, startChat, startConversation, acceptConversation, compactHistory, fetchEncryptionStatus, postEncryptionHandshake, sendMessage, retryMessage, cancelSession, endSession, createPlaintextConversationHandle } from "./standards-sdk.es222.js";
8
+ import { EncryptedChatManager } from "./standards-sdk.es223.js";
9
+ import { generateEncryptionKeyPair, bootstrapEncryptionOptions, createEncryptionApi } from "./standards-sdk.es224.js";
10
+ import { adapters, adaptersDetailed, adapterRegistryCategories, adapterRegistryAdapters, createAdapterRegistryCategory, submitAdapterRegistryAdapter, adapterRegistrySubmissionStatus } from "./standards-sdk.es225.js";
11
+ import { resolveUaid, getRegistrationQuote, updateAgent, getRegistrationProgress, waitForRegistrationCompletion, validateUaid, getUaidConnectionStatus, closeUaidConnection, dashboardStats } from "./standards-sdk.es173.js";
12
+ import { getRegisterStatus, registerOwnedMoltbookAgent, getVerificationStatus, createVerificationChallenge, getVerificationChallenge, verifyVerificationChallenge, getVerificationOwnership, verifySenderOwnership, verifyUaidDnsTxt, getVerificationDnsStatus } from "./standards-sdk.es226.js";
13
+ import { getCreditsBalance, getCreditProviders, createHbarPurchaseIntent, purchaseCreditsWithHbar, getX402Minimums, purchaseCreditsWithX402, buyCreditsWithX402 } from "./standards-sdk.es227.js";
14
+ import { getGuardSession, getGuardEntitlements, getGuardBillingBalance, getGuardFeed, getGuardOverview, getGuardTrustByHash, resolveGuardTrust, getGuardRevocations, fetchGuardAdvisories, fetchGuardPolicy, getGuardInventory, getGuardReceiptHistory, getGuardArtifactTimeline, getGuardInventoryDiff, exportGuardAbom, exportGuardArtifactAbom, exportGuardReceipts, getGuardDevices, getGuardAlertPreferences, updateGuardAlertPreferences, getGuardExceptions, getGuardWatchlist, lookupGuardWatchlist, getGuardPainSignals, getGuardAggregatedPainSignals, getGuardPreInstallVerdict, getGuardPreExecutionVerdict, addGuardWatchlistItem, removeGuardWatchlistItem, addGuardException, requestGuardException, removeGuardException, ingestGuardPainSignals, syncGuardReceipts, syncGuardInventory, submitGuardReceipts, getGuardTeamPolicyPack, updateGuardTeamPolicyPack } from "./standards-sdk.es228.js";
15
+ import { createLedgerChallenge, verifyLedgerChallenge, authenticateWithLedger, authenticateWithLedgerCredentials } from "./standards-sdk.es229.js";
16
+ import { search, delegate, stats, registries, getAdditionalRegistries, popularSearches, listProtocols, detectProtocol, registrySearchByNamespace, vectorSearch, searchStatus, websocketStats, metricsSummary, facets } from "./standards-sdk.es230.js";
17
+ import { skillsConfig, listSkills, getSkillsCatalog, listSkillVersions, listMySkills, getMySkillsList, quoteSkillPublish, quoteSkillPublishPreview, publishSkill, getSkillPublishJob, getSkillOwnership, getRecommendedSkillVersion, setRecommendedSkillVersion, getSkillDeprecations, setSkillDeprecation, getSkillBadge, getSkillStatus, getSkillSecurityBreakdown, getSkillStatusByRepo, getSkillConversionSignalsByRepo, uploadSkillPreviewFromGithubOidc, getSkillPreview, getSkillPreviewByRepo, getSkillPreviewById, getSkillInstall, recordSkillInstallCopy, listSkillTags, listSkillCategories, resolveSkillMarkdown, resolveSkillManifest, getSkillVoteStatus, setSkillVote, requestSkillVerification, getSkillVerificationStatus, createSkillDomainProofChallenge, verifySkillDomainProof } from "./standards-sdk.es214.js";
18
+ import { DEFAULT_BASE_URL, normaliseBaseUrl, normaliseHeaderName, isBrowserRuntime, DEFAULT_USER_AGENT, JSON_CONTENT_TYPE, serialiseAgentRegistrationRequest, MINIMUM_REGISTRATION_AUTO_TOP_UP_CREDITS, createAbortError, isJsonObject, DEFAULT_HISTORY_TOP_UP_HBAR } from "./standards-sdk.es231.js";
19
+ import { RegistryBrokerError, RegistryBrokerParseError } from "./standards-sdk.es171.js";
20
+ import { optionalImportSync } from "./standards-sdk.es210.js";
21
+ class RegistryBrokerClient {
22
+ constructor(options = {}) {
23
+ this.encryptionBootstrapPromise = null;
24
+ this.chatApi = null;
25
+ this.agentNetworkApi = null;
26
+ this.encryptedChatManager = null;
27
+ this.encryptionApi = null;
28
+ this.conversationContexts = /* @__PURE__ */ new Map();
29
+ const {
30
+ baseUrl = DEFAULT_BASE_URL,
31
+ fetchImplementation,
32
+ defaultHeaders,
33
+ apiKey,
34
+ accountId,
35
+ ledgerApiKey,
36
+ registrationAutoTopUp,
37
+ historyAutoTopUp,
38
+ encryption
39
+ } = options;
40
+ this.baseUrl = normaliseBaseUrl(baseUrl);
41
+ const resolvedFetch = fetchImplementation ?? (typeof globalThis.fetch === "function" ? globalThis.fetch : null);
42
+ if (!resolvedFetch) {
43
+ throw new Error(
44
+ "A fetch implementation is required for RegistryBrokerClient"
45
+ );
46
+ }
47
+ this.fetchImpl = resolvedFetch;
48
+ this.defaultHeaders = {
49
+ ...defaultHeaders ?? {}
50
+ };
51
+ Object.entries(this.defaultHeaders).forEach(([key, value]) => {
52
+ const headerName = normaliseHeaderName(key);
53
+ if (headerName !== key) {
54
+ delete this.defaultHeaders[key];
55
+ this.defaultHeaders[headerName] = value;
56
+ }
57
+ });
58
+ const existingLedgerHeader = this.defaultHeaders["x-ledger-api-key"]?.trim();
59
+ if (!this.defaultHeaders["x-api-key"] && existingLedgerHeader) {
60
+ this.defaultHeaders["x-api-key"] = existingLedgerHeader;
61
+ }
62
+ if (apiKey) {
63
+ this.defaultHeaders["x-api-key"] = apiKey;
64
+ }
65
+ if (typeof accountId === "string" && accountId.trim().length > 0) {
66
+ this.defaultHeaders["x-account-id"] = accountId.trim();
67
+ }
68
+ if (ledgerApiKey) {
69
+ if (!this.defaultHeaders["x-api-key"]) {
70
+ this.defaultHeaders["x-api-key"] = ledgerApiKey;
71
+ }
72
+ }
73
+ this.registrationAutoTopUp = registrationAutoTopUp;
74
+ this.historyAutoTopUp = historyAutoTopUp;
75
+ this.encryptionOptions = encryption;
76
+ if (this.encryptionOptions) {
77
+ this.encryptionBootstrapPromise = this.initializeEncryptionBootstrap(
78
+ this.encryptionOptions
79
+ );
80
+ }
81
+ }
82
+ static async initializeAgent(options) {
83
+ const { uaid, ensureEncryptionKey = true, ...clientOptions } = options;
84
+ const client = new RegistryBrokerClient(clientOptions);
85
+ let encryption = null;
86
+ if (ensureEncryptionKey) {
87
+ const ensureOptions = typeof ensureEncryptionKey === "object" ? ensureEncryptionKey : { generateIfMissing: true };
88
+ encryption = await client.encryption.ensureAgentKey({
89
+ uaid,
90
+ ...ensureOptions
91
+ });
92
+ }
93
+ return { client, encryption };
94
+ }
95
+ get chat() {
96
+ if (this.chatApi) {
97
+ return this.chatApi;
98
+ }
99
+ const api = createChatApi(this, this.getEncryptedChatManager());
100
+ this.chatApi = api;
101
+ return api;
102
+ }
103
+ /** Owner + bot mailbox surface; see ./agent-network.ts. */
104
+ get agentNetwork() {
105
+ if (!this.agentNetworkApi) {
106
+ this.agentNetworkApi = createAgentNetworkApi(this);
107
+ }
108
+ return this.agentNetworkApi;
109
+ }
110
+ get encryption() {
111
+ if (this.encryptionApi) {
112
+ return this.encryptionApi;
113
+ }
114
+ const api = createEncryptionApi(this);
115
+ this.encryptionApi = api;
116
+ return api;
117
+ }
118
+ setApiKey(apiKey) {
119
+ this.setDefaultHeader("x-api-key", apiKey);
120
+ }
121
+ setLedgerApiKey(apiKey) {
122
+ this.setDefaultHeader("x-api-key", apiKey);
123
+ delete this.defaultHeaders["x-ledger-api-key"];
124
+ }
125
+ setDefaultHeader(name, value) {
126
+ if (!name || name.trim().length === 0) {
127
+ return;
128
+ }
129
+ const headerName = normaliseHeaderName(name);
130
+ if (!value || value.trim().length === 0) {
131
+ delete this.defaultHeaders[headerName];
132
+ return;
133
+ }
134
+ this.defaultHeaders[headerName] = value.trim();
135
+ }
136
+ getDefaultHeaders() {
137
+ return { ...this.defaultHeaders };
138
+ }
139
+ async encryptionReady() {
140
+ if (!this.encryptionBootstrapPromise) {
141
+ return;
142
+ }
143
+ await this.encryptionBootstrapPromise;
144
+ }
145
+ buildUrl(path) {
146
+ const normalisedPath = path.startsWith("/") ? path : `/${path}`;
147
+ return `${this.baseUrl}${normalisedPath}`;
148
+ }
149
+ buildRequestInit(config) {
150
+ const headers = new Headers();
151
+ Object.entries(this.defaultHeaders).forEach(([key, value]) => {
152
+ headers.set(key, value);
153
+ });
154
+ if (config.headers) {
155
+ Object.entries(config.headers).forEach(([key, value]) => {
156
+ headers.set(key, value);
157
+ });
158
+ }
159
+ if (!headers.has("accept")) {
160
+ headers.set("accept", "application/json");
161
+ }
162
+ if (!headers.has("user-agent") && !isBrowserRuntime()) {
163
+ headers.set("user-agent", DEFAULT_USER_AGENT);
164
+ }
165
+ const init = {
166
+ method: config.method ?? "GET",
167
+ headers
168
+ };
169
+ if (config.body !== void 0) {
170
+ init.body = JSON.stringify(config.body);
171
+ if (!headers.has("content-type")) {
172
+ headers.set("content-type", "application/json");
173
+ }
174
+ }
175
+ return init;
176
+ }
177
+ async request(path, config) {
178
+ const init = this.buildRequestInit(config);
179
+ const response = await this.fetchImpl(this.buildUrl(path), init);
180
+ if (response.ok) {
181
+ return response;
182
+ }
183
+ const errorBody = await this.extractErrorBody(response);
184
+ throw new RegistryBrokerError("Registry broker request failed", {
185
+ status: response.status,
186
+ statusText: response.statusText,
187
+ body: errorBody
188
+ });
189
+ }
190
+ async requestAbsolute(url, config) {
191
+ const init = this.buildRequestInit(config);
192
+ const response = await this.fetchImpl(url, init);
193
+ if (response.ok) {
194
+ return response;
195
+ }
196
+ const errorBody = await this.extractErrorBody(response);
197
+ throw new RegistryBrokerError("Registry broker request failed", {
198
+ status: response.status,
199
+ statusText: response.statusText,
200
+ body: errorBody
201
+ });
202
+ }
203
+ async requestJson(path, config) {
204
+ const response = await this.request(path, config);
205
+ const contentType = response.headers?.get("content-type") ?? "";
206
+ if (!JSON_CONTENT_TYPE.test(contentType)) {
207
+ const body = await response.text();
208
+ throw new RegistryBrokerParseError(
209
+ "Expected JSON response from registry broker",
210
+ body
211
+ );
212
+ }
213
+ return await response.json();
214
+ }
215
+ async requestAbsoluteJson(url, config) {
216
+ const response = await this.requestAbsolute(url, config);
217
+ const contentType = response.headers?.get("content-type") ?? "";
218
+ if (!JSON_CONTENT_TYPE.test(contentType)) {
219
+ const body = await response.text();
220
+ throw new RegistryBrokerParseError(
221
+ "Expected JSON response from registry broker",
222
+ body
223
+ );
224
+ }
225
+ return await response.json();
226
+ }
227
+ async getAgentFeedback(uaid, options = {}) {
228
+ const normalized = uaid.trim();
229
+ if (!normalized) {
230
+ throw new Error("uaid is required");
231
+ }
232
+ const query = options.includeRevoked === true ? "?includeRevoked=true" : "";
233
+ const raw = await this.requestJson(
234
+ `/agents/${encodeURIComponent(normalized)}/feedback${query}`,
235
+ { method: "GET" }
236
+ );
237
+ return this.parseWithSchema(
238
+ raw,
239
+ agentFeedbackResponseSchema,
240
+ "agent feedback response"
241
+ );
242
+ }
243
+ async listAgentFeedbackIndex(options = {}) {
244
+ const params = new URLSearchParams();
245
+ if (typeof options.page === "number" && Number.isFinite(options.page)) {
246
+ params.set("page", String(Math.trunc(options.page)));
247
+ }
248
+ if (typeof options.limit === "number" && Number.isFinite(options.limit)) {
249
+ params.set("limit", String(Math.trunc(options.limit)));
250
+ }
251
+ if (options.registries?.length) {
252
+ params.set("registry", options.registries.join(","));
253
+ }
254
+ const suffix = params.size > 0 ? `?${params.toString()}` : "";
255
+ const raw = await this.requestJson(`/agents/feedback${suffix}`, {
256
+ method: "GET"
257
+ });
258
+ return this.parseWithSchema(
259
+ raw,
260
+ agentFeedbackIndexResponseSchema,
261
+ "agent feedback index response"
262
+ );
263
+ }
264
+ async listAgentFeedbackEntriesIndex(options = {}) {
265
+ const params = new URLSearchParams();
266
+ if (typeof options.page === "number" && Number.isFinite(options.page)) {
267
+ params.set("page", String(Math.trunc(options.page)));
268
+ }
269
+ if (typeof options.limit === "number" && Number.isFinite(options.limit)) {
270
+ params.set("limit", String(Math.trunc(options.limit)));
271
+ }
272
+ if (options.registries?.length) {
273
+ params.set("registry", options.registries.join(","));
274
+ }
275
+ const suffix = params.size > 0 ? `?${params.toString()}` : "";
276
+ const raw = await this.requestJson(
277
+ `/agents/feedback/entries${suffix}`,
278
+ { method: "GET" }
279
+ );
280
+ return this.parseWithSchema(
281
+ raw,
282
+ agentFeedbackEntriesIndexResponseSchema,
283
+ "agent feedback entries index response"
284
+ );
285
+ }
286
+ async checkAgentFeedbackEligibility(uaid, payload) {
287
+ const normalized = uaid.trim();
288
+ if (!normalized) {
289
+ throw new Error("uaid is required");
290
+ }
291
+ const raw = await this.requestJson(
292
+ `/agents/${encodeURIComponent(normalized)}/feedback/eligibility`,
24
293
  {
25
- name: "rating",
26
- normalize: ({ subject }) => normalizeRating(subject)
27
- },
294
+ method: "POST",
295
+ body: payload,
296
+ headers: { "content-type": "application/json" }
297
+ }
298
+ );
299
+ return this.parseWithSchema(
300
+ raw,
301
+ agentFeedbackEligibilityResponseSchema,
302
+ "agent feedback eligibility response"
303
+ );
304
+ }
305
+ async submitAgentFeedback(uaid, payload) {
306
+ const normalized = uaid.trim();
307
+ if (!normalized) {
308
+ throw new Error("uaid is required");
309
+ }
310
+ const raw = await this.requestJson(
311
+ `/agents/${encodeURIComponent(normalized)}/feedback`,
28
312
  {
29
- name: "volume",
30
- normalize: ({ subject }) => {
31
- const summary = readMetadataRecord(subject, "erc8004FeedbackSummary");
32
- const totalFeedbacks = summary ? readNumber(summary, "totalFeedbacks") : null;
33
- if (totalFeedbacks === null) {
34
- return MISSING;
35
- }
36
- const volumeRaw = Math.min(
37
- volumeCap,
38
- Math.log10(totalFeedbacks + 1) * volumeWeight
39
- );
40
- return {
41
- value: clampScore(100 * clampUnit(volumeRaw / volumeCap)),
42
- status: "ok"
43
- };
313
+ method: "POST",
314
+ body: payload,
315
+ headers: { "content-type": "application/json" }
316
+ }
317
+ );
318
+ return this.parseWithSchema(
319
+ raw,
320
+ agentFeedbackSubmissionResponseSchema,
321
+ "agent feedback submission response"
322
+ );
323
+ }
324
+ async search(params = {}) {
325
+ return search(this, params);
326
+ }
327
+ async delegate(request) {
328
+ return delegate(this, request);
329
+ }
330
+ async searchErc8004ByAgentId(params) {
331
+ const chainId = Math.floor(params.chainId);
332
+ if (!Number.isFinite(chainId) || chainId <= 0) {
333
+ throw new Error("chainId must be a positive integer");
334
+ }
335
+ const rawAgentId = typeof params.agentId === "bigint" ? params.agentId.toString() : String(params.agentId);
336
+ const agentId = rawAgentId.trim();
337
+ if (!agentId) {
338
+ throw new Error("agentId is required");
339
+ }
340
+ const nativeId = `${chainId}:${agentId}`;
341
+ return search(this, {
342
+ registries: ["erc-8004"],
343
+ limit: params.limit ?? 1,
344
+ ...typeof params.page === "number" ? { page: params.page } : {},
345
+ ...typeof params.sortBy === "string" ? { sortBy: params.sortBy } : {},
346
+ ...typeof params.sortOrder === "string" ? { sortOrder: params.sortOrder } : {},
347
+ metadata: {
348
+ nativeId: [nativeId],
349
+ networkKey: [`eip155:${chainId}`]
350
+ }
351
+ });
352
+ }
353
+ async stats() {
354
+ return stats(this);
355
+ }
356
+ async registries() {
357
+ return registries(this);
358
+ }
359
+ async getAdditionalRegistries() {
360
+ return getAdditionalRegistries(this);
361
+ }
362
+ async popularSearches() {
363
+ return popularSearches(this);
364
+ }
365
+ async listProtocols() {
366
+ return listProtocols(this);
367
+ }
368
+ async detectProtocol(message) {
369
+ return detectProtocol(this, message);
370
+ }
371
+ async registrySearchByNamespace(registry, query) {
372
+ return registrySearchByNamespace(this, registry, query);
373
+ }
374
+ async vectorSearch(request) {
375
+ return vectorSearch(this, request);
376
+ }
377
+ async searchStatus() {
378
+ return searchStatus(this);
379
+ }
380
+ async websocketStats() {
381
+ return websocketStats(this);
382
+ }
383
+ async metricsSummary() {
384
+ return metricsSummary(this);
385
+ }
386
+ async facets(adapter) {
387
+ return facets(this, adapter);
388
+ }
389
+ async adapters() {
390
+ return adapters(this);
391
+ }
392
+ async skillsConfig() {
393
+ return skillsConfig(this);
394
+ }
395
+ async listSkills(options) {
396
+ return listSkills(this, options);
397
+ }
398
+ async getSkillsCatalog(options) {
399
+ return getSkillsCatalog(this, options);
400
+ }
401
+ async listSkillVersions(params) {
402
+ return listSkillVersions(this, params);
403
+ }
404
+ async listMySkills(params) {
405
+ return listMySkills(this, params);
406
+ }
407
+ async getMySkillsList(params) {
408
+ return getMySkillsList(this, params);
409
+ }
410
+ async quoteSkillPublish(payload) {
411
+ return quoteSkillPublish(this, payload);
412
+ }
413
+ async quoteSkillPublishPreview(payload) {
414
+ return quoteSkillPublishPreview(this, payload);
415
+ }
416
+ async publishSkill(payload) {
417
+ return publishSkill(this, payload);
418
+ }
419
+ async getSkillPublishJob(jobId, params) {
420
+ return getSkillPublishJob(this, jobId, params);
421
+ }
422
+ async getSkillOwnership(params) {
423
+ return getSkillOwnership(this, params);
424
+ }
425
+ async getRecommendedSkillVersion(params) {
426
+ return getRecommendedSkillVersion(this, params);
427
+ }
428
+ async setRecommendedSkillVersion(payload) {
429
+ return setRecommendedSkillVersion(this, payload);
430
+ }
431
+ async getSkillDeprecations(params) {
432
+ return getSkillDeprecations(this, params);
433
+ }
434
+ async setSkillDeprecation(payload) {
435
+ return setSkillDeprecation(this, payload);
436
+ }
437
+ async getSkillBadge(params) {
438
+ return getSkillBadge(this, params);
439
+ }
440
+ async getSkillStatus(params) {
441
+ return getSkillStatus(this, params);
442
+ }
443
+ async getSkillSecurityBreakdown(params) {
444
+ return getSkillSecurityBreakdown(this, params);
445
+ }
446
+ async getSkillStatusByRepo(params) {
447
+ return getSkillStatusByRepo(this, params);
448
+ }
449
+ async getSkillConversionSignalsByRepo(params) {
450
+ return getSkillConversionSignalsByRepo(this, params);
451
+ }
452
+ async uploadSkillPreviewFromGithubOidc(payload) {
453
+ return uploadSkillPreviewFromGithubOidc(this, payload);
454
+ }
455
+ async getSkillPreview(params) {
456
+ return getSkillPreview(this, params);
457
+ }
458
+ async getSkillPreviewByRepo(params) {
459
+ return getSkillPreviewByRepo(this, params);
460
+ }
461
+ async getSkillPreviewById(previewId) {
462
+ return getSkillPreviewById(this, previewId);
463
+ }
464
+ async getSkillInstall(skillRef) {
465
+ return getSkillInstall(this, skillRef);
466
+ }
467
+ async recordSkillInstallCopy(skillRef, payload) {
468
+ return recordSkillInstallCopy(this, skillRef, payload);
469
+ }
470
+ async listSkillTags() {
471
+ return listSkillTags(this);
472
+ }
473
+ async listSkillCategories() {
474
+ return listSkillCategories(this);
475
+ }
476
+ async resolveSkillMarkdown(skillRef) {
477
+ return resolveSkillMarkdown(this, skillRef);
478
+ }
479
+ async resolveSkillManifest(skillRef) {
480
+ return resolveSkillManifest(this, skillRef);
481
+ }
482
+ async getSkillVoteStatus(params) {
483
+ return getSkillVoteStatus(this, params);
484
+ }
485
+ async setSkillVote(payload) {
486
+ return setSkillVote(this, payload);
487
+ }
488
+ async requestSkillVerification(payload) {
489
+ return requestSkillVerification(this, payload);
490
+ }
491
+ async getSkillVerificationStatus(params) {
492
+ return getSkillVerificationStatus(this, params);
493
+ }
494
+ async createSkillDomainProofChallenge(payload) {
495
+ return createSkillDomainProofChallenge(this, payload);
496
+ }
497
+ async verifySkillDomainProof(payload) {
498
+ return verifySkillDomainProof(this, payload);
499
+ }
500
+ async adaptersDetailed() {
501
+ return adaptersDetailed(this);
502
+ }
503
+ async adapterRegistryCategories() {
504
+ return adapterRegistryCategories(this);
505
+ }
506
+ async adapterRegistryAdapters(filters) {
507
+ return adapterRegistryAdapters(this, filters);
508
+ }
509
+ async createAdapterRegistryCategory(payload) {
510
+ return createAdapterRegistryCategory(this, payload);
511
+ }
512
+ async submitAdapterRegistryAdapter(payload) {
513
+ return submitAdapterRegistryAdapter(this, payload);
514
+ }
515
+ async adapterRegistrySubmissionStatus(submissionId) {
516
+ return adapterRegistrySubmissionStatus(this, submissionId);
517
+ }
518
+ async resolveUaid(uaid) {
519
+ return resolveUaid(this, uaid);
520
+ }
521
+ async performRegisterAgent(payload) {
522
+ const raw = await this.requestJson("/register", {
523
+ method: "POST",
524
+ body: serialiseAgentRegistrationRequest(payload),
525
+ headers: { "content-type": "application/json" }
526
+ });
527
+ return this.parseWithSchema(
528
+ raw,
529
+ registerAgentResponseSchema,
530
+ "register agent response"
531
+ );
532
+ }
533
+ calculateHbarAmount(creditsToPurchase, creditsPerHbar) {
534
+ if (creditsPerHbar <= 0) {
535
+ throw new Error("creditsPerHbar must be positive");
536
+ }
537
+ if (creditsToPurchase <= 0) {
538
+ throw new Error("creditsToPurchase must be positive");
539
+ }
540
+ const rawHbar = creditsToPurchase / creditsPerHbar;
541
+ const tinybars = Math.ceil(rawHbar * 1e8);
542
+ return tinybars / 1e8;
543
+ }
544
+ resolveCreditsToPurchase(shortfallCredits) {
545
+ if (!Number.isFinite(shortfallCredits) || shortfallCredits <= 0) {
546
+ return 0;
547
+ }
548
+ return Math.max(
549
+ Math.ceil(shortfallCredits),
550
+ MINIMUM_REGISTRATION_AUTO_TOP_UP_CREDITS
551
+ );
552
+ }
553
+ async ensureCreditsForRegistration(payload, autoTopUp) {
554
+ const details = autoTopUp ?? null;
555
+ if (!details) {
556
+ return;
557
+ }
558
+ if (!details.accountId || !details.accountId.trim()) {
559
+ throw new Error("autoTopUp.accountId is required");
560
+ }
561
+ if (!details.privateKey || !details.privateKey.trim()) {
562
+ throw new Error("autoTopUp.privateKey is required");
563
+ }
564
+ for (let attempt = 0; attempt < 3; attempt += 1) {
565
+ const quote = await this.getRegistrationQuote(payload);
566
+ const shortfall = quote.shortfallCredits ?? 0;
567
+ if (shortfall <= 0) {
568
+ return;
569
+ }
570
+ const creditsToPurchase = this.resolveCreditsToPurchase(shortfall);
571
+ if (creditsToPurchase <= 0) {
572
+ return;
573
+ }
574
+ const creditsPerHbar = quote.creditsPerHbar ?? null;
575
+ if (!creditsPerHbar || creditsPerHbar <= 0) {
576
+ throw new Error("Unable to determine credits per HBAR for auto top-up");
577
+ }
578
+ const hbarAmount = this.calculateHbarAmount(
579
+ creditsToPurchase,
580
+ creditsPerHbar
581
+ );
582
+ await this.purchaseCreditsWithHbar({
583
+ accountId: details.accountId.trim(),
584
+ privateKey: details.privateKey.trim(),
585
+ hbarAmount,
586
+ memo: details.memo ?? "Registry Broker auto top-up",
587
+ metadata: {
588
+ shortfallCredits: shortfall,
589
+ requiredCredits: quote.requiredCredits,
590
+ purchasedCredits: creditsToPurchase
591
+ }
592
+ });
593
+ }
594
+ const finalQuote = await this.getRegistrationQuote(payload);
595
+ if ((finalQuote.shortfallCredits ?? 0) > 0) {
596
+ throw new Error("Unable to purchase sufficient credits for registration");
597
+ }
598
+ }
599
+ async registerAgent(payload, options) {
600
+ const autoTopUp = options?.autoTopUp ?? this.registrationAutoTopUp;
601
+ if (!autoTopUp) {
602
+ return this.performRegisterAgent(payload);
603
+ }
604
+ await this.ensureCreditsForRegistration(payload, autoTopUp);
605
+ let retried = false;
606
+ while (true) {
607
+ try {
608
+ return await this.performRegisterAgent(payload);
609
+ } catch (error) {
610
+ const shortfall = this.extractInsufficientCreditsDetails(error);
611
+ if (shortfall && !retried) {
612
+ await this.ensureCreditsForRegistration(payload, autoTopUp);
613
+ retried = true;
614
+ continue;
44
615
  }
616
+ throw error;
617
+ }
618
+ }
619
+ }
620
+ async getRegistrationQuote(payload) {
621
+ return getRegistrationQuote(this, payload);
622
+ }
623
+ async updateAgent(uaid, payload) {
624
+ return updateAgent(this, uaid, payload);
625
+ }
626
+ async getRegisterStatus(uaid) {
627
+ return getRegisterStatus(this, uaid);
628
+ }
629
+ async registerOwnedMoltbookAgent(uaid, payload) {
630
+ return registerOwnedMoltbookAgent(this, uaid, payload);
631
+ }
632
+ async getRegistrationProgress(attemptId) {
633
+ return getRegistrationProgress(this, attemptId);
634
+ }
635
+ async waitForRegistrationCompletion(attemptId, options) {
636
+ return waitForRegistrationCompletion(this, attemptId, options);
637
+ }
638
+ async validateUaid(uaid) {
639
+ return validateUaid(this, uaid);
640
+ }
641
+ async getUaidConnectionStatus(uaid) {
642
+ return getUaidConnectionStatus(this, uaid);
643
+ }
644
+ async closeUaidConnection(uaid) {
645
+ return closeUaidConnection(this, uaid);
646
+ }
647
+ async dashboardStats() {
648
+ return dashboardStats(this);
649
+ }
650
+ async getCreditsBalance(params = {}) {
651
+ return getCreditsBalance(this, params);
652
+ }
653
+ async getCreditProviders() {
654
+ return getCreditProviders(this);
655
+ }
656
+ async getGuardSession() {
657
+ return getGuardSession(this);
658
+ }
659
+ async getGuardEntitlements() {
660
+ return getGuardEntitlements(this);
661
+ }
662
+ async getGuardBillingBalance() {
663
+ return getGuardBillingBalance(this);
664
+ }
665
+ async getGuardFeed(limit) {
666
+ return getGuardFeed(this, limit);
667
+ }
668
+ async getGuardOverview() {
669
+ return getGuardOverview(this);
670
+ }
671
+ async getGuardTrustByHash(sha256) {
672
+ return getGuardTrustByHash(this, sha256);
673
+ }
674
+ async resolveGuardTrust(query) {
675
+ return resolveGuardTrust(this, query);
676
+ }
677
+ async getGuardRevocations() {
678
+ return getGuardRevocations(this);
679
+ }
680
+ async fetchGuardAdvisories() {
681
+ return fetchGuardAdvisories(this);
682
+ }
683
+ async fetchGuardPolicy() {
684
+ return fetchGuardPolicy(this);
685
+ }
686
+ async getGuardInventory() {
687
+ return getGuardInventory(this);
688
+ }
689
+ async getGuardReceiptHistory() {
690
+ return getGuardReceiptHistory(this);
691
+ }
692
+ async getGuardArtifactTimeline(artifactId) {
693
+ return getGuardArtifactTimeline(this, artifactId);
694
+ }
695
+ async getGuardInventoryDiff() {
696
+ return getGuardInventoryDiff(this);
697
+ }
698
+ async exportGuardAbom() {
699
+ return exportGuardAbom(this);
700
+ }
701
+ async exportGuardArtifactAbom(artifactId) {
702
+ return exportGuardArtifactAbom(this, artifactId);
703
+ }
704
+ async exportGuardReceipts() {
705
+ return exportGuardReceipts(this);
706
+ }
707
+ async getGuardDevices() {
708
+ return getGuardDevices(this);
709
+ }
710
+ async getGuardAlertPreferences() {
711
+ return getGuardAlertPreferences(this);
712
+ }
713
+ async updateGuardAlertPreferences(payload) {
714
+ return updateGuardAlertPreferences(this, payload);
715
+ }
716
+ async getGuardExceptions() {
717
+ return getGuardExceptions(this);
718
+ }
719
+ async getGuardWatchlist() {
720
+ return getGuardWatchlist(this);
721
+ }
722
+ async lookupGuardWatchlist(payload) {
723
+ return lookupGuardWatchlist(this, payload);
724
+ }
725
+ async getGuardPainSignals() {
726
+ return getGuardPainSignals(this);
727
+ }
728
+ async getGuardAggregatedPainSignals() {
729
+ return getGuardAggregatedPainSignals(this);
730
+ }
731
+ async getGuardPreInstallVerdict(payload) {
732
+ return getGuardPreInstallVerdict(this, payload);
733
+ }
734
+ async getGuardPreExecutionVerdict(payload) {
735
+ return getGuardPreExecutionVerdict(this, payload);
736
+ }
737
+ async addGuardWatchlistItem(payload) {
738
+ return addGuardWatchlistItem(this, payload);
739
+ }
740
+ async removeGuardWatchlistItem(artifactId) {
741
+ return removeGuardWatchlistItem(this, artifactId);
742
+ }
743
+ async addGuardException(payload) {
744
+ return addGuardException(this, payload);
745
+ }
746
+ async requestGuardException(payload) {
747
+ return requestGuardException(this, payload);
748
+ }
749
+ async removeGuardException(exceptionId) {
750
+ return removeGuardException(this, exceptionId);
751
+ }
752
+ async ingestGuardPainSignals(items) {
753
+ return ingestGuardPainSignals(this, items);
754
+ }
755
+ async syncGuardReceipts(payload) {
756
+ return syncGuardReceipts(this, payload);
757
+ }
758
+ async syncGuardInventory(payload) {
759
+ return syncGuardInventory(this, payload);
760
+ }
761
+ async submitGuardReceipts(payload) {
762
+ return submitGuardReceipts(this, payload);
763
+ }
764
+ async getGuardTeamPolicyPack() {
765
+ return getGuardTeamPolicyPack(this);
766
+ }
767
+ async updateGuardTeamPolicyPack(payload) {
768
+ return updateGuardTeamPolicyPack(this, payload);
769
+ }
770
+ async createHbarPurchaseIntent(payload) {
771
+ return createHbarPurchaseIntent(this, payload);
772
+ }
773
+ async purchaseCreditsWithHbar(params) {
774
+ return purchaseCreditsWithHbar(this, params);
775
+ }
776
+ async getX402Minimums() {
777
+ return getX402Minimums(this);
778
+ }
779
+ async purchaseCreditsWithX402(params) {
780
+ return purchaseCreditsWithX402(this, params);
781
+ }
782
+ async buyCreditsWithX402(params) {
783
+ return buyCreditsWithX402(this, params);
784
+ }
785
+ async generateEncryptionKeyPair(options = {}) {
786
+ return generateEncryptionKeyPair(this, options);
787
+ }
788
+ async createLedgerChallenge(payload) {
789
+ return createLedgerChallenge(this, payload);
790
+ }
791
+ async verifyLedgerChallenge(payload) {
792
+ return verifyLedgerChallenge(this, payload);
793
+ }
794
+ async authenticateWithLedger(options) {
795
+ return authenticateWithLedger(this, options);
796
+ }
797
+ async authenticateWithLedgerCredentials(options) {
798
+ return authenticateWithLedgerCredentials(this, options);
799
+ }
800
+ async getVerificationStatus(uaid) {
801
+ return getVerificationStatus(this, uaid);
802
+ }
803
+ async createVerificationChallenge(uaid) {
804
+ return createVerificationChallenge(this, uaid);
805
+ }
806
+ async getVerificationChallenge(challengeId) {
807
+ return getVerificationChallenge(this, challengeId);
808
+ }
809
+ async verifyVerificationChallenge(params) {
810
+ return verifyVerificationChallenge(this, params);
811
+ }
812
+ async getVerificationOwnership(uaid) {
813
+ return getVerificationOwnership(this, uaid);
814
+ }
815
+ async verifySenderOwnership(uaid) {
816
+ return verifySenderOwnership(this, uaid);
817
+ }
818
+ async verifyUaidDnsTxt(payload) {
819
+ return verifyUaidDnsTxt(this, payload);
820
+ }
821
+ async getVerificationDnsStatus(uaid, query) {
822
+ return getVerificationDnsStatus(this, uaid, query);
823
+ }
824
+ async fetchHistorySnapshot(sessionId, options) {
825
+ return fetchHistorySnapshot(
826
+ this.conversationContexts,
827
+ this,
828
+ sessionId,
829
+ options
830
+ );
831
+ }
832
+ attachDecryptedHistory(sessionId, snapshot, options) {
833
+ return attachDecryptedHistory(
834
+ this.conversationContexts,
835
+ this,
836
+ sessionId,
837
+ snapshot,
838
+ options
839
+ );
840
+ }
841
+ registerConversationContextForEncryption(context) {
842
+ registerConversationContextForEncryption(
843
+ this.conversationContexts,
844
+ context
845
+ );
846
+ }
847
+ resolveDecryptionContext(sessionId, options) {
848
+ return resolveDecryptionContext(
849
+ this.conversationContexts,
850
+ this,
851
+ sessionId,
852
+ options
853
+ );
854
+ }
855
+ decryptHistoryEntryFromContext(_sessionId, entry, context) {
856
+ return decryptHistoryEntryFromContext(this, entry, context);
857
+ }
858
+ async createSession(payload, allowHistoryAutoTopUp = true) {
859
+ return createSession(this, payload, allowHistoryAutoTopUp);
860
+ }
861
+ async resumeSession(sessionId) {
862
+ return resumeSession(this, sessionId);
863
+ }
864
+ async checkChatReadiness(payload) {
865
+ return checkChatReadiness(this, payload);
866
+ }
867
+ async startChat(options) {
868
+ return startChat(this, this.getEncryptedChatManager(), options);
869
+ }
870
+ async startConversation(options) {
871
+ return startConversation(this, this.getEncryptedChatManager(), options);
872
+ }
873
+ async acceptConversation(options) {
874
+ return acceptConversation(
875
+ this,
876
+ this.getEncryptedChatManager(),
877
+ options
878
+ );
879
+ }
880
+ compactHistory(payload) {
881
+ return compactHistory(this, payload);
882
+ }
883
+ fetchEncryptionStatus(sessionId) {
884
+ return fetchEncryptionStatus(this, sessionId);
885
+ }
886
+ postEncryptionHandshake(sessionId, payload) {
887
+ return postEncryptionHandshake(this, sessionId, payload);
888
+ }
889
+ sendMessage(payload) {
890
+ return sendMessage(this, payload);
891
+ }
892
+ retryMessage(messageId, payload) {
893
+ return retryMessage(this, messageId, payload);
894
+ }
895
+ cancelSession(sessionId) {
896
+ return cancelSession(this, sessionId);
897
+ }
898
+ endSession(sessionId) {
899
+ return endSession(this, sessionId);
900
+ }
901
+ createPlaintextConversationHandle(sessionId, summary, defaultAuth, context) {
902
+ return createPlaintextConversationHandle(
903
+ this,
904
+ sessionId,
905
+ summary,
906
+ defaultAuth,
907
+ context
908
+ );
909
+ }
910
+ getEncryptedChatManager() {
911
+ if (this.encryptedChatManager) {
912
+ return this.encryptedChatManager;
913
+ }
914
+ const manager = new EncryptedChatManager(this);
915
+ this.encryptedChatManager = manager;
916
+ return manager;
917
+ }
918
+ async extractErrorBody(response) {
919
+ const contentType = response.headers?.get("content-type") ?? "";
920
+ if (JSON_CONTENT_TYPE.test(contentType)) {
921
+ try {
922
+ return await response.json();
923
+ } catch (error) {
924
+ return { parseError: String(error) };
925
+ }
926
+ }
927
+ try {
928
+ return await response.text();
929
+ } catch (error) {
930
+ return { parseError: String(error) };
931
+ }
932
+ }
933
+ parseWithSchema(value, schema, context) {
934
+ try {
935
+ return schema.parse(value);
936
+ } catch (error) {
937
+ throw new RegistryBrokerParseError(
938
+ `Failed to parse ${context}`,
939
+ error instanceof ZodError || error instanceof Error ? error : String(error),
940
+ value
941
+ );
942
+ }
943
+ }
944
+ async delay(ms, signal) {
945
+ if (ms <= 0) {
946
+ if (signal?.aborted) {
947
+ throw createAbortError();
948
+ }
949
+ return;
950
+ }
951
+ await new Promise((resolve, reject) => {
952
+ const timer = setTimeout(() => {
953
+ if (signal) {
954
+ signal.removeEventListener("abort", onAbort);
955
+ }
956
+ resolve();
957
+ }, ms);
958
+ const onAbort = () => {
959
+ clearTimeout(timer);
960
+ signal?.removeEventListener("abort", onAbort);
961
+ reject(createAbortError());
962
+ };
963
+ if (signal) {
964
+ if (signal.aborted) {
965
+ clearTimeout(timer);
966
+ reject(createAbortError());
967
+ return;
968
+ }
969
+ signal.addEventListener("abort", onAbort, { once: true });
970
+ }
971
+ });
972
+ }
973
+ assertNodeRuntime(feature) {
974
+ if (typeof process === "undefined" || !process.versions?.node) {
975
+ throw new Error(`${feature} is only available in Node.js environments`);
976
+ }
977
+ }
978
+ getNodeCrypto(feature) {
979
+ this.assertNodeRuntime(feature);
980
+ const nodeCrypto = optionalImportSync("node:crypto") ?? optionalImportSync("crypto");
981
+ if (!nodeCrypto) {
982
+ throw new Error(`${feature} requires the Node.js crypto module`);
983
+ }
984
+ return nodeCrypto;
985
+ }
986
+ getSecureRandomBytes(size, feature) {
987
+ const webCrypto = globalThis.crypto;
988
+ if (webCrypto && typeof webCrypto.getRandomValues === "function") {
989
+ const bytes = new Uint8Array(size);
990
+ webCrypto.getRandomValues(bytes);
991
+ return bytes;
992
+ }
993
+ return this.getNodeCrypto(feature).randomBytes(size);
994
+ }
995
+ createEphemeralKeyPair() {
996
+ const privateKeyBytes = this.getSecureRandomBytes(
997
+ 32,
998
+ "generateEphemeralKeyPair"
999
+ );
1000
+ const publicKey = secp256k1.getPublicKey(privateKeyBytes, true);
1001
+ return {
1002
+ privateKey: Buffer.from(privateKeyBytes).toString("hex"),
1003
+ publicKey: Buffer.from(publicKey).toString("hex")
1004
+ };
1005
+ }
1006
+ deriveSharedSecret(options) {
1007
+ const { createHash } = this.getNodeCrypto("deriveSharedSecret");
1008
+ const privateKey = this.hexToBuffer(options.privateKey);
1009
+ const peerPublicKey = this.hexToBuffer(options.peerPublicKey);
1010
+ const shared = secp256k1.getSharedSecret(privateKey, peerPublicKey, true);
1011
+ return createHash("sha256").update(Buffer.from(shared)).digest();
1012
+ }
1013
+ buildCipherEnvelope(options) {
1014
+ const { createCipheriv, randomBytes } = this.getNodeCrypto(
1015
+ "encryptCipherEnvelope"
1016
+ );
1017
+ const sharedSecret = this.normalizeSharedSecret(options.sharedSecret);
1018
+ const iv = randomBytes(12);
1019
+ const cipher = createCipheriv("aes-256-gcm", sharedSecret, iv);
1020
+ const aadSource = options.associatedData ?? options.sessionId;
1021
+ const associatedDataEncoded = aadSource ? Buffer.from(aadSource, "utf8").toString("base64") : void 0;
1022
+ if (aadSource) {
1023
+ cipher.setAAD(Buffer.from(aadSource, "utf8"));
1024
+ }
1025
+ const ciphertext = Buffer.concat([
1026
+ cipher.update(Buffer.from(options.plaintext, "utf8")),
1027
+ cipher.final()
1028
+ ]);
1029
+ const tag = cipher.getAuthTag();
1030
+ const payload = Buffer.concat([ciphertext, tag]);
1031
+ return {
1032
+ algorithm: "aes-256-gcm",
1033
+ ciphertext: payload.toString("base64"),
1034
+ nonce: iv.toString("base64"),
1035
+ associatedData: associatedDataEncoded,
1036
+ keyLocator: {
1037
+ sessionId: options.sessionId,
1038
+ revision: options.revision ?? 1
1039
+ },
1040
+ recipients: options.recipients.map((recipient) => ({
1041
+ ...recipient,
1042
+ encryptedShare: ""
1043
+ }))
1044
+ };
1045
+ }
1046
+ openCipherEnvelope(options) {
1047
+ const { createDecipheriv } = this.getNodeCrypto("decryptCipherEnvelope");
1048
+ const sharedSecret = this.normalizeSharedSecret(options.sharedSecret);
1049
+ const payload = Buffer.from(options.envelope.ciphertext, "base64");
1050
+ const nonce = Buffer.from(options.envelope.nonce, "base64");
1051
+ const ciphertext = payload.slice(0, payload.length - 16);
1052
+ const tag = payload.slice(payload.length - 16);
1053
+ const decipher = createDecipheriv("aes-256-gcm", sharedSecret, nonce);
1054
+ if (options.envelope.associatedData) {
1055
+ decipher.setAAD(Buffer.from(options.envelope.associatedData, "base64"));
1056
+ }
1057
+ decipher.setAuthTag(tag);
1058
+ const plaintext = Buffer.concat([
1059
+ decipher.update(ciphertext),
1060
+ decipher.final()
1061
+ ]);
1062
+ return plaintext.toString(options.encoding ?? "utf8");
1063
+ }
1064
+ normalizeSharedSecret(input) {
1065
+ if (Buffer.isBuffer(input)) {
1066
+ return Buffer.from(input);
1067
+ }
1068
+ if (input instanceof Uint8Array) {
1069
+ return Buffer.from(input);
1070
+ }
1071
+ if (typeof input === "string") {
1072
+ return this.bufferFromString(input);
1073
+ }
1074
+ throw new Error("Unsupported shared secret input");
1075
+ }
1076
+ bufferFromString(value) {
1077
+ const trimmed = value.trim();
1078
+ if (!trimmed) {
1079
+ throw new Error("sharedSecret string cannot be empty");
1080
+ }
1081
+ const normalized = trimmed.startsWith("0x") ? trimmed.slice(2) : trimmed;
1082
+ if (/^[0-9a-fA-F]+$/.test(normalized) && normalized.length % 2 === 0) {
1083
+ return Buffer.from(normalized, "hex");
1084
+ }
1085
+ return Buffer.from(trimmed, "base64");
1086
+ }
1087
+ hexToBuffer(value) {
1088
+ const normalized = value.startsWith("0x") ? value.slice(2) : value;
1089
+ if (!/^[0-9a-fA-F]+$/.test(normalized) || normalized.length % 2 !== 0) {
1090
+ throw new Error("Expected hex-encoded value");
1091
+ }
1092
+ return Buffer.from(normalized, "hex");
1093
+ }
1094
+ extractInsufficientCreditsDetails(error) {
1095
+ if (!(error instanceof RegistryBrokerError) || error.status !== 402) {
1096
+ return null;
1097
+ }
1098
+ const body = error.body;
1099
+ if (!body || typeof body !== "object" || Array.isArray(body)) {
1100
+ return null;
1101
+ }
1102
+ const maybeShortfall = body["shortfallCredits"];
1103
+ if (typeof maybeShortfall !== "number" || maybeShortfall <= 0) {
1104
+ return null;
1105
+ }
1106
+ return { shortfallCredits: maybeShortfall };
1107
+ }
1108
+ extractErrorMessage(body) {
1109
+ if (typeof body === "string") {
1110
+ return body;
1111
+ }
1112
+ if (isJsonObject(body) && typeof body.error === "string") {
1113
+ return body.error;
1114
+ }
1115
+ if (isJsonObject(body) && typeof body.message === "string") {
1116
+ return body.message;
1117
+ }
1118
+ return void 0;
1119
+ }
1120
+ shouldAutoTopUpHistory(payload, error) {
1121
+ if (!this.historyAutoTopUp || payload.historyTtlSeconds === void 0) {
1122
+ return false;
1123
+ }
1124
+ if (!(error instanceof RegistryBrokerError)) {
1125
+ return false;
1126
+ }
1127
+ if (error.status !== 402) {
1128
+ return false;
1129
+ }
1130
+ const message = this.extractErrorMessage(error.body);
1131
+ if (!message) {
1132
+ return true;
1133
+ }
1134
+ const normalised = message.toLowerCase();
1135
+ return normalised.includes("history") || normalised.includes("chat history");
1136
+ }
1137
+ async executeHistoryAutoTopUp(reason) {
1138
+ if (!this.historyAutoTopUp) {
1139
+ return;
1140
+ }
1141
+ const hbarAmount = this.historyAutoTopUp.hbarAmount && this.historyAutoTopUp.hbarAmount > 0 ? this.historyAutoTopUp.hbarAmount : DEFAULT_HISTORY_TOP_UP_HBAR;
1142
+ await this.purchaseCreditsWithHbar({
1143
+ accountId: this.historyAutoTopUp.accountId,
1144
+ privateKey: this.historyAutoTopUp.privateKey,
1145
+ hbarAmount,
1146
+ memo: this.historyAutoTopUp.memo ?? "registry-broker-client:chat-history-topup",
1147
+ metadata: {
1148
+ purpose: "chat-history",
1149
+ reason
45
1150
  }
46
- ]
47
- };
1151
+ });
1152
+ }
1153
+ initializeEncryptionBootstrap(options) {
1154
+ return this.bootstrapEncryptionOptions(options).then(() => void 0);
1155
+ }
1156
+ bootstrapEncryptionOptions(options) {
1157
+ return bootstrapEncryptionOptions(this, options);
1158
+ }
48
1159
  }
1160
+ const isPendingRegisterAgentResponse = (response) => response.status === "pending";
1161
+ const isPartialRegisterAgentResponse = (response) => response.status === "partial" && response.success === false;
1162
+ const isSuccessRegisterAgentResponse = (response) => response.success === true && response.status !== "pending";
49
1163
  export {
50
- createErc8004FeedbackAdapter
1164
+ RegistryBrokerClient,
1165
+ isPartialRegisterAgentResponse,
1166
+ isPendingRegisterAgentResponse,
1167
+ isSuccessRegisterAgentResponse
51
1168
  };
52
1169
  //# sourceMappingURL=standards-sdk.es170.js.map