@hashgraphonline/standards-sdk 0.1.188 → 0.1.190

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 (548) hide show
  1. package/dist/browser/hcs-25/adapters/agentverse.d.ts.map +1 -1
  2. package/dist/browser/hcs-25/adapters/availability.d.ts.map +1 -1
  3. package/dist/browser/hcs-25/adapters/connectivity.d.ts.map +1 -1
  4. package/dist/browser/hcs-25/adapters/ethos.d.ts.map +1 -1
  5. package/dist/browser/hcs-25/adapters/model-evals.d.ts.map +1 -1
  6. package/dist/browser/hcs-25/adapters/simple-evals.d.ts.map +1 -1
  7. package/dist/browser/hcs-25/adapters/x402.d.ts.map +1 -1
  8. package/dist/browser/hcs-25/collectors/acp.d.ts +42 -0
  9. package/dist/browser/hcs-25/collectors/acp.d.ts.map +1 -0
  10. package/dist/browser/hcs-25/collectors/agentverse.d.ts +37 -0
  11. package/dist/browser/hcs-25/collectors/agentverse.d.ts.map +1 -0
  12. package/dist/browser/hcs-25/collectors/availability.d.ts +29 -0
  13. package/dist/browser/hcs-25/collectors/availability.d.ts.map +1 -0
  14. package/dist/browser/hcs-25/collectors/catalog.d.ts +57 -0
  15. package/dist/browser/hcs-25/collectors/catalog.d.ts.map +1 -0
  16. package/dist/browser/hcs-25/collectors/connectivity.d.ts +49 -0
  17. package/dist/browser/hcs-25/collectors/connectivity.d.ts.map +1 -0
  18. package/dist/browser/hcs-25/collectors/endpoints.d.ts +9 -0
  19. package/dist/browser/hcs-25/collectors/endpoints.d.ts.map +1 -0
  20. package/dist/browser/hcs-25/collectors/erc8004.d.ts +104 -0
  21. package/dist/browser/hcs-25/collectors/erc8004.d.ts.map +1 -0
  22. package/dist/browser/hcs-25/collectors/ethos.d.ts +95 -0
  23. package/dist/browser/hcs-25/collectors/ethos.d.ts.map +1 -0
  24. package/dist/browser/hcs-25/collectors/freshness.d.ts +36 -0
  25. package/dist/browser/hcs-25/collectors/freshness.d.ts.map +1 -0
  26. package/dist/browser/hcs-25/collectors/http.d.ts +67 -0
  27. package/dist/browser/hcs-25/collectors/http.d.ts.map +1 -0
  28. package/dist/browser/hcs-25/collectors/index.d.ts +21 -0
  29. package/dist/browser/hcs-25/collectors/index.d.ts.map +1 -0
  30. package/dist/browser/hcs-25/collectors/merge.d.ts +11 -0
  31. package/dist/browser/hcs-25/collectors/merge.d.ts.map +1 -0
  32. package/dist/browser/hcs-25/collectors/model-evals.d.ts +315 -0
  33. package/dist/browser/hcs-25/collectors/model-evals.d.ts.map +1 -0
  34. package/dist/browser/hcs-25/collectors/oss-popularity.d.ts +51 -0
  35. package/dist/browser/hcs-25/collectors/oss-popularity.d.ts.map +1 -0
  36. package/dist/browser/hcs-25/collectors/output-verification.d.ts +37 -0
  37. package/dist/browser/hcs-25/collectors/output-verification.d.ts.map +1 -0
  38. package/dist/browser/hcs-25/collectors/pipeline.d.ts +19 -0
  39. package/dist/browser/hcs-25/collectors/pipeline.d.ts.map +1 -0
  40. package/dist/browser/hcs-25/collectors/runner.d.ts +20 -0
  41. package/dist/browser/hcs-25/collectors/runner.d.ts.map +1 -0
  42. package/dist/browser/hcs-25/collectors/simple-evals.d.ts +91 -0
  43. package/dist/browser/hcs-25/collectors/simple-evals.d.ts.map +1 -0
  44. package/dist/browser/hcs-25/collectors/types.d.ts +113 -0
  45. package/dist/browser/hcs-25/collectors/types.d.ts.map +1 -0
  46. package/dist/browser/hcs-25/collectors/x402-onchain.d.ts +105 -0
  47. package/dist/browser/hcs-25/collectors/x402-onchain.d.ts.map +1 -0
  48. package/dist/browser/hcs-25/collectors/x402.d.ts +48 -0
  49. package/dist/browser/hcs-25/collectors/x402.d.ts.map +1 -0
  50. package/dist/browser/hcs-25/index.d.ts +1 -0
  51. package/dist/browser/hcs-25/index.d.ts.map +1 -1
  52. package/dist/browser/hcs-25/signals/marketplace.d.ts +6 -6
  53. package/dist/browser/hcs-25/signals/marketplace.d.ts.map +1 -1
  54. package/dist/browser/hcs-25/signals/model-evals.d.ts +12 -12
  55. package/dist/browser/hcs-25/signals/model-evals.d.ts.map +1 -1
  56. package/dist/browser/hcs-25/signals/operational.d.ts +15 -12
  57. package/dist/browser/hcs-25/signals/operational.d.ts.map +1 -1
  58. package/dist/browser/hcs-25/signals/simple-evals.d.ts +1 -1
  59. package/dist/browser/hcs-25/signals/simple-evals.d.ts.map +1 -1
  60. package/dist/browser/services/registry-broker/client/agent-network.d.ts +210 -66
  61. package/dist/browser/services/registry-broker/client/agent-network.d.ts.map +1 -1
  62. package/dist/browser/services/registry-broker/client.d.ts +1 -1
  63. package/dist/browser/services/registry-broker/client.d.ts.map +1 -1
  64. package/dist/browser/standards-sdk.browser.js +37 -10
  65. package/dist/browser/standards-sdk.browser.js.map +1 -1
  66. package/dist/browser-root/hcs-25/adapters/agentverse.d.ts.map +1 -1
  67. package/dist/browser-root/hcs-25/adapters/availability.d.ts.map +1 -1
  68. package/dist/browser-root/hcs-25/adapters/connectivity.d.ts.map +1 -1
  69. package/dist/browser-root/hcs-25/adapters/ethos.d.ts.map +1 -1
  70. package/dist/browser-root/hcs-25/adapters/model-evals.d.ts.map +1 -1
  71. package/dist/browser-root/hcs-25/adapters/simple-evals.d.ts.map +1 -1
  72. package/dist/browser-root/hcs-25/adapters/x402.d.ts.map +1 -1
  73. package/dist/browser-root/hcs-25/collectors/acp.d.ts +42 -0
  74. package/dist/browser-root/hcs-25/collectors/acp.d.ts.map +1 -0
  75. package/dist/browser-root/hcs-25/collectors/agentverse.d.ts +37 -0
  76. package/dist/browser-root/hcs-25/collectors/agentverse.d.ts.map +1 -0
  77. package/dist/browser-root/hcs-25/collectors/availability.d.ts +29 -0
  78. package/dist/browser-root/hcs-25/collectors/availability.d.ts.map +1 -0
  79. package/dist/browser-root/hcs-25/collectors/catalog.d.ts +57 -0
  80. package/dist/browser-root/hcs-25/collectors/catalog.d.ts.map +1 -0
  81. package/dist/browser-root/hcs-25/collectors/connectivity.d.ts +49 -0
  82. package/dist/browser-root/hcs-25/collectors/connectivity.d.ts.map +1 -0
  83. package/dist/browser-root/hcs-25/collectors/endpoints.d.ts +9 -0
  84. package/dist/browser-root/hcs-25/collectors/endpoints.d.ts.map +1 -0
  85. package/dist/browser-root/hcs-25/collectors/erc8004.d.ts +104 -0
  86. package/dist/browser-root/hcs-25/collectors/erc8004.d.ts.map +1 -0
  87. package/dist/browser-root/hcs-25/collectors/ethos.d.ts +95 -0
  88. package/dist/browser-root/hcs-25/collectors/ethos.d.ts.map +1 -0
  89. package/dist/browser-root/hcs-25/collectors/freshness.d.ts +36 -0
  90. package/dist/browser-root/hcs-25/collectors/freshness.d.ts.map +1 -0
  91. package/dist/browser-root/hcs-25/collectors/http.d.ts +67 -0
  92. package/dist/browser-root/hcs-25/collectors/http.d.ts.map +1 -0
  93. package/dist/browser-root/hcs-25/collectors/index.d.ts +21 -0
  94. package/dist/browser-root/hcs-25/collectors/index.d.ts.map +1 -0
  95. package/dist/browser-root/hcs-25/collectors/merge.d.ts +11 -0
  96. package/dist/browser-root/hcs-25/collectors/merge.d.ts.map +1 -0
  97. package/dist/browser-root/hcs-25/collectors/model-evals.d.ts +315 -0
  98. package/dist/browser-root/hcs-25/collectors/model-evals.d.ts.map +1 -0
  99. package/dist/browser-root/hcs-25/collectors/oss-popularity.d.ts +51 -0
  100. package/dist/browser-root/hcs-25/collectors/oss-popularity.d.ts.map +1 -0
  101. package/dist/browser-root/hcs-25/collectors/output-verification.d.ts +37 -0
  102. package/dist/browser-root/hcs-25/collectors/output-verification.d.ts.map +1 -0
  103. package/dist/browser-root/hcs-25/collectors/pipeline.d.ts +19 -0
  104. package/dist/browser-root/hcs-25/collectors/pipeline.d.ts.map +1 -0
  105. package/dist/browser-root/hcs-25/collectors/runner.d.ts +20 -0
  106. package/dist/browser-root/hcs-25/collectors/runner.d.ts.map +1 -0
  107. package/dist/browser-root/hcs-25/collectors/simple-evals.d.ts +91 -0
  108. package/dist/browser-root/hcs-25/collectors/simple-evals.d.ts.map +1 -0
  109. package/dist/browser-root/hcs-25/collectors/types.d.ts +113 -0
  110. package/dist/browser-root/hcs-25/collectors/types.d.ts.map +1 -0
  111. package/dist/browser-root/hcs-25/collectors/x402-onchain.d.ts +105 -0
  112. package/dist/browser-root/hcs-25/collectors/x402-onchain.d.ts.map +1 -0
  113. package/dist/browser-root/hcs-25/collectors/x402.d.ts +48 -0
  114. package/dist/browser-root/hcs-25/collectors/x402.d.ts.map +1 -0
  115. package/dist/browser-root/hcs-25/index.d.ts +1 -0
  116. package/dist/browser-root/hcs-25/index.d.ts.map +1 -1
  117. package/dist/browser-root/hcs-25/signals/marketplace.d.ts +6 -6
  118. package/dist/browser-root/hcs-25/signals/marketplace.d.ts.map +1 -1
  119. package/dist/browser-root/hcs-25/signals/model-evals.d.ts +12 -12
  120. package/dist/browser-root/hcs-25/signals/model-evals.d.ts.map +1 -1
  121. package/dist/browser-root/hcs-25/signals/operational.d.ts +15 -12
  122. package/dist/browser-root/hcs-25/signals/operational.d.ts.map +1 -1
  123. package/dist/browser-root/hcs-25/signals/simple-evals.d.ts +1 -1
  124. package/dist/browser-root/hcs-25/signals/simple-evals.d.ts.map +1 -1
  125. package/dist/browser-root/services/registry-broker/client/agent-network.d.ts +210 -66
  126. package/dist/browser-root/services/registry-broker/client/agent-network.d.ts.map +1 -1
  127. package/dist/browser-root/services/registry-broker/client.d.ts +1 -1
  128. package/dist/browser-root/services/registry-broker/client.d.ts.map +1 -1
  129. package/dist/browser-root/standards-sdk.root-browser.js +78 -11
  130. package/dist/browser-root/standards-sdk.root-browser.js.map +1 -1
  131. package/dist/cjs/hcs-25/adapters/agentverse.d.ts.map +1 -1
  132. package/dist/cjs/hcs-25/adapters/availability.d.ts.map +1 -1
  133. package/dist/cjs/hcs-25/adapters/connectivity.d.ts.map +1 -1
  134. package/dist/cjs/hcs-25/adapters/ethos.d.ts.map +1 -1
  135. package/dist/cjs/hcs-25/adapters/model-evals.d.ts.map +1 -1
  136. package/dist/cjs/hcs-25/adapters/simple-evals.d.ts.map +1 -1
  137. package/dist/cjs/hcs-25/adapters/x402.d.ts.map +1 -1
  138. package/dist/cjs/hcs-25/collectors/acp.d.ts +42 -0
  139. package/dist/cjs/hcs-25/collectors/acp.d.ts.map +1 -0
  140. package/dist/cjs/hcs-25/collectors/agentverse.d.ts +37 -0
  141. package/dist/cjs/hcs-25/collectors/agentverse.d.ts.map +1 -0
  142. package/dist/cjs/hcs-25/collectors/availability.d.ts +29 -0
  143. package/dist/cjs/hcs-25/collectors/availability.d.ts.map +1 -0
  144. package/dist/cjs/hcs-25/collectors/catalog.d.ts +57 -0
  145. package/dist/cjs/hcs-25/collectors/catalog.d.ts.map +1 -0
  146. package/dist/cjs/hcs-25/collectors/connectivity.d.ts +49 -0
  147. package/dist/cjs/hcs-25/collectors/connectivity.d.ts.map +1 -0
  148. package/dist/cjs/hcs-25/collectors/endpoints.d.ts +9 -0
  149. package/dist/cjs/hcs-25/collectors/endpoints.d.ts.map +1 -0
  150. package/dist/cjs/hcs-25/collectors/erc8004.d.ts +104 -0
  151. package/dist/cjs/hcs-25/collectors/erc8004.d.ts.map +1 -0
  152. package/dist/cjs/hcs-25/collectors/ethos.d.ts +95 -0
  153. package/dist/cjs/hcs-25/collectors/ethos.d.ts.map +1 -0
  154. package/dist/cjs/hcs-25/collectors/freshness.d.ts +36 -0
  155. package/dist/cjs/hcs-25/collectors/freshness.d.ts.map +1 -0
  156. package/dist/cjs/hcs-25/collectors/http.d.ts +67 -0
  157. package/dist/cjs/hcs-25/collectors/http.d.ts.map +1 -0
  158. package/dist/cjs/hcs-25/collectors/index.d.ts +21 -0
  159. package/dist/cjs/hcs-25/collectors/index.d.ts.map +1 -0
  160. package/dist/cjs/hcs-25/collectors/merge.d.ts +11 -0
  161. package/dist/cjs/hcs-25/collectors/merge.d.ts.map +1 -0
  162. package/dist/cjs/hcs-25/collectors/model-evals.d.ts +315 -0
  163. package/dist/cjs/hcs-25/collectors/model-evals.d.ts.map +1 -0
  164. package/dist/cjs/hcs-25/collectors/oss-popularity.d.ts +51 -0
  165. package/dist/cjs/hcs-25/collectors/oss-popularity.d.ts.map +1 -0
  166. package/dist/cjs/hcs-25/collectors/output-verification.d.ts +37 -0
  167. package/dist/cjs/hcs-25/collectors/output-verification.d.ts.map +1 -0
  168. package/dist/cjs/hcs-25/collectors/pipeline.d.ts +19 -0
  169. package/dist/cjs/hcs-25/collectors/pipeline.d.ts.map +1 -0
  170. package/dist/cjs/hcs-25/collectors/runner.d.ts +20 -0
  171. package/dist/cjs/hcs-25/collectors/runner.d.ts.map +1 -0
  172. package/dist/cjs/hcs-25/collectors/simple-evals.d.ts +91 -0
  173. package/dist/cjs/hcs-25/collectors/simple-evals.d.ts.map +1 -0
  174. package/dist/cjs/hcs-25/collectors/types.d.ts +113 -0
  175. package/dist/cjs/hcs-25/collectors/types.d.ts.map +1 -0
  176. package/dist/cjs/hcs-25/collectors/x402-onchain.d.ts +105 -0
  177. package/dist/cjs/hcs-25/collectors/x402-onchain.d.ts.map +1 -0
  178. package/dist/cjs/hcs-25/collectors/x402.d.ts +48 -0
  179. package/dist/cjs/hcs-25/collectors/x402.d.ts.map +1 -0
  180. package/dist/cjs/hcs-25/index.d.ts +1 -0
  181. package/dist/cjs/hcs-25/index.d.ts.map +1 -1
  182. package/dist/cjs/hcs-25/signals/marketplace.d.ts +6 -6
  183. package/dist/cjs/hcs-25/signals/marketplace.d.ts.map +1 -1
  184. package/dist/cjs/hcs-25/signals/model-evals.d.ts +12 -12
  185. package/dist/cjs/hcs-25/signals/model-evals.d.ts.map +1 -1
  186. package/dist/cjs/hcs-25/signals/operational.d.ts +15 -12
  187. package/dist/cjs/hcs-25/signals/operational.d.ts.map +1 -1
  188. package/dist/cjs/hcs-25/signals/simple-evals.d.ts +1 -1
  189. package/dist/cjs/hcs-25/signals/simple-evals.d.ts.map +1 -1
  190. package/dist/cjs/services/registry-broker/client/agent-network.d.ts +210 -66
  191. package/dist/cjs/services/registry-broker/client/agent-network.d.ts.map +1 -1
  192. package/dist/cjs/services/registry-broker/client.d.ts +1 -1
  193. package/dist/cjs/services/registry-broker/client.d.ts.map +1 -1
  194. package/dist/cjs/standards-sdk.cjs +2 -2
  195. package/dist/cjs/standards-sdk.cjs.map +1 -1
  196. package/dist/es/hcs-25/adapters/agentverse.d.ts.map +1 -1
  197. package/dist/es/hcs-25/adapters/availability.d.ts.map +1 -1
  198. package/dist/es/hcs-25/adapters/connectivity.d.ts.map +1 -1
  199. package/dist/es/hcs-25/adapters/ethos.d.ts.map +1 -1
  200. package/dist/es/hcs-25/adapters/model-evals.d.ts.map +1 -1
  201. package/dist/es/hcs-25/adapters/simple-evals.d.ts.map +1 -1
  202. package/dist/es/hcs-25/adapters/x402.d.ts.map +1 -1
  203. package/dist/es/hcs-25/collectors/acp.d.ts +42 -0
  204. package/dist/es/hcs-25/collectors/acp.d.ts.map +1 -0
  205. package/dist/es/hcs-25/collectors/agentverse.d.ts +37 -0
  206. package/dist/es/hcs-25/collectors/agentverse.d.ts.map +1 -0
  207. package/dist/es/hcs-25/collectors/availability.d.ts +29 -0
  208. package/dist/es/hcs-25/collectors/availability.d.ts.map +1 -0
  209. package/dist/es/hcs-25/collectors/catalog.d.ts +57 -0
  210. package/dist/es/hcs-25/collectors/catalog.d.ts.map +1 -0
  211. package/dist/es/hcs-25/collectors/connectivity.d.ts +49 -0
  212. package/dist/es/hcs-25/collectors/connectivity.d.ts.map +1 -0
  213. package/dist/es/hcs-25/collectors/endpoints.d.ts +9 -0
  214. package/dist/es/hcs-25/collectors/endpoints.d.ts.map +1 -0
  215. package/dist/es/hcs-25/collectors/erc8004.d.ts +104 -0
  216. package/dist/es/hcs-25/collectors/erc8004.d.ts.map +1 -0
  217. package/dist/es/hcs-25/collectors/ethos.d.ts +95 -0
  218. package/dist/es/hcs-25/collectors/ethos.d.ts.map +1 -0
  219. package/dist/es/hcs-25/collectors/freshness.d.ts +36 -0
  220. package/dist/es/hcs-25/collectors/freshness.d.ts.map +1 -0
  221. package/dist/es/hcs-25/collectors/http.d.ts +67 -0
  222. package/dist/es/hcs-25/collectors/http.d.ts.map +1 -0
  223. package/dist/es/hcs-25/collectors/index.d.ts +21 -0
  224. package/dist/es/hcs-25/collectors/index.d.ts.map +1 -0
  225. package/dist/es/hcs-25/collectors/merge.d.ts +11 -0
  226. package/dist/es/hcs-25/collectors/merge.d.ts.map +1 -0
  227. package/dist/es/hcs-25/collectors/model-evals.d.ts +315 -0
  228. package/dist/es/hcs-25/collectors/model-evals.d.ts.map +1 -0
  229. package/dist/es/hcs-25/collectors/oss-popularity.d.ts +51 -0
  230. package/dist/es/hcs-25/collectors/oss-popularity.d.ts.map +1 -0
  231. package/dist/es/hcs-25/collectors/output-verification.d.ts +37 -0
  232. package/dist/es/hcs-25/collectors/output-verification.d.ts.map +1 -0
  233. package/dist/es/hcs-25/collectors/pipeline.d.ts +19 -0
  234. package/dist/es/hcs-25/collectors/pipeline.d.ts.map +1 -0
  235. package/dist/es/hcs-25/collectors/runner.d.ts +20 -0
  236. package/dist/es/hcs-25/collectors/runner.d.ts.map +1 -0
  237. package/dist/es/hcs-25/collectors/simple-evals.d.ts +91 -0
  238. package/dist/es/hcs-25/collectors/simple-evals.d.ts.map +1 -0
  239. package/dist/es/hcs-25/collectors/types.d.ts +113 -0
  240. package/dist/es/hcs-25/collectors/types.d.ts.map +1 -0
  241. package/dist/es/hcs-25/collectors/x402-onchain.d.ts +105 -0
  242. package/dist/es/hcs-25/collectors/x402-onchain.d.ts.map +1 -0
  243. package/dist/es/hcs-25/collectors/x402.d.ts +48 -0
  244. package/dist/es/hcs-25/collectors/x402.d.ts.map +1 -0
  245. package/dist/es/hcs-25/index.d.ts +1 -0
  246. package/dist/es/hcs-25/index.d.ts.map +1 -1
  247. package/dist/es/hcs-25/signals/marketplace.d.ts +6 -6
  248. package/dist/es/hcs-25/signals/marketplace.d.ts.map +1 -1
  249. package/dist/es/hcs-25/signals/model-evals.d.ts +12 -12
  250. package/dist/es/hcs-25/signals/model-evals.d.ts.map +1 -1
  251. package/dist/es/hcs-25/signals/operational.d.ts +15 -12
  252. package/dist/es/hcs-25/signals/operational.d.ts.map +1 -1
  253. package/dist/es/hcs-25/signals/simple-evals.d.ts +1 -1
  254. package/dist/es/hcs-25/signals/simple-evals.d.ts.map +1 -1
  255. package/dist/es/services/registry-broker/client/agent-network.d.ts +210 -66
  256. package/dist/es/services/registry-broker/client/agent-network.d.ts.map +1 -1
  257. package/dist/es/services/registry-broker/client.d.ts +1 -1
  258. package/dist/es/services/registry-broker/client.d.ts.map +1 -1
  259. package/dist/es/standards-sdk.es.js +141 -58
  260. package/dist/es/standards-sdk.es.js.map +1 -1
  261. package/dist/es/standards-sdk.es101.js +2 -2
  262. package/dist/es/standards-sdk.es103.js +2 -2
  263. package/dist/es/standards-sdk.es104.js +1 -1
  264. package/dist/es/standards-sdk.es106.js +1 -1
  265. package/dist/es/standards-sdk.es108.js +2 -2
  266. package/dist/es/standards-sdk.es11.js +1 -1
  267. package/dist/es/standards-sdk.es110.js +1 -1
  268. package/dist/es/standards-sdk.es111.js +2 -2
  269. package/dist/es/standards-sdk.es115.js +3 -3
  270. package/dist/es/standards-sdk.es116.js +4 -4
  271. package/dist/es/standards-sdk.es12.js +1 -1
  272. package/dist/es/standards-sdk.es120.js +4 -4
  273. package/dist/es/standards-sdk.es121.js +11 -11
  274. package/dist/es/standards-sdk.es122.js +176 -240
  275. package/dist/es/standards-sdk.es122.js.map +1 -1
  276. package/dist/es/standards-sdk.es123.js +41 -468
  277. package/dist/es/standards-sdk.es123.js.map +1 -1
  278. package/dist/es/standards-sdk.es124.js +28 -103
  279. package/dist/es/standards-sdk.es124.js.map +1 -1
  280. package/dist/es/standards-sdk.es125.js +185 -145
  281. package/dist/es/standards-sdk.es125.js.map +1 -1
  282. package/dist/es/standards-sdk.es126.js +13 -33
  283. package/dist/es/standards-sdk.es126.js.map +1 -1
  284. package/dist/es/standards-sdk.es127.js +44 -10
  285. package/dist/es/standards-sdk.es127.js.map +1 -1
  286. package/dist/es/standards-sdk.es128.js +150 -172
  287. package/dist/es/standards-sdk.es128.js.map +1 -1
  288. package/dist/es/standards-sdk.es129.js +166 -26
  289. package/dist/es/standards-sdk.es129.js.map +1 -1
  290. package/dist/es/standards-sdk.es13.js +1 -1
  291. package/dist/es/standards-sdk.es130.js +375 -18
  292. package/dist/es/standards-sdk.es130.js.map +1 -1
  293. package/dist/es/standards-sdk.es131.js +371 -139
  294. package/dist/es/standards-sdk.es131.js.map +1 -1
  295. package/dist/es/standards-sdk.es132.js +211 -180
  296. package/dist/es/standards-sdk.es132.js.map +1 -1
  297. package/dist/es/standards-sdk.es133.js +210 -770
  298. package/dist/es/standards-sdk.es133.js.map +1 -1
  299. package/dist/es/standards-sdk.es134.js +376 -10
  300. package/dist/es/standards-sdk.es134.js.map +1 -1
  301. package/dist/es/standards-sdk.es135.js +118 -564
  302. package/dist/es/standards-sdk.es135.js.map +1 -1
  303. package/dist/es/standards-sdk.es136.js +233 -608
  304. package/dist/es/standards-sdk.es136.js.map +1 -1
  305. package/dist/es/standards-sdk.es137.js +1328 -12
  306. package/dist/es/standards-sdk.es137.js.map +1 -1
  307. package/dist/es/standards-sdk.es138.js +133 -2
  308. package/dist/es/standards-sdk.es138.js.map +1 -1
  309. package/dist/es/standards-sdk.es139.js +258 -74
  310. package/dist/es/standards-sdk.es139.js.map +1 -1
  311. package/dist/es/standards-sdk.es14.js +1 -1
  312. package/dist/es/standards-sdk.es140.js +104 -38
  313. package/dist/es/standards-sdk.es140.js.map +1 -1
  314. package/dist/es/standards-sdk.es141.js +252 -2
  315. package/dist/es/standards-sdk.es141.js.map +1 -1
  316. package/dist/es/standards-sdk.es142.js +446 -203
  317. package/dist/es/standards-sdk.es142.js.map +1 -1
  318. package/dist/es/standards-sdk.es143.js +104 -1139
  319. package/dist/es/standards-sdk.es143.js.map +1 -1
  320. package/dist/es/standards-sdk.es144.js +144 -290
  321. package/dist/es/standards-sdk.es144.js.map +1 -1
  322. package/dist/es/standards-sdk.es145.js +31 -419
  323. package/dist/es/standards-sdk.es145.js.map +1 -1
  324. package/dist/es/standards-sdk.es146.js +10 -353
  325. package/dist/es/standards-sdk.es146.js.map +1 -1
  326. package/dist/es/standards-sdk.es147.js +144 -1084
  327. package/dist/es/standards-sdk.es147.js.map +1 -1
  328. package/dist/es/standards-sdk.es148.js +25 -204
  329. package/dist/es/standards-sdk.es148.js.map +1 -1
  330. package/dist/es/standards-sdk.es149.js +17 -1562
  331. package/dist/es/standards-sdk.es149.js.map +1 -1
  332. package/dist/es/standards-sdk.es15.js +1 -1
  333. package/dist/es/standards-sdk.es150.js +128 -1134
  334. package/dist/es/standards-sdk.es150.js.map +1 -1
  335. package/dist/es/standards-sdk.es151.js +199 -14
  336. package/dist/es/standards-sdk.es151.js.map +1 -1
  337. package/dist/es/standards-sdk.es152.js +774 -367
  338. package/dist/es/standards-sdk.es152.js.map +1 -1
  339. package/dist/es/standards-sdk.es153.js +10 -256
  340. package/dist/es/standards-sdk.es153.js.map +1 -1
  341. package/dist/es/standards-sdk.es154.js +567 -4
  342. package/dist/es/standards-sdk.es154.js.map +1 -1
  343. package/dist/es/standards-sdk.es155.js +619 -74
  344. package/dist/es/standards-sdk.es155.js.map +1 -1
  345. package/dist/es/standards-sdk.es156.js +12 -86
  346. package/dist/es/standards-sdk.es156.js.map +1 -1
  347. package/dist/es/standards-sdk.es157.js +2 -60
  348. package/dist/es/standards-sdk.es157.js.map +1 -1
  349. package/dist/es/standards-sdk.es158.js +87 -2547
  350. package/dist/es/standards-sdk.es158.js.map +1 -1
  351. package/dist/es/standards-sdk.es159.js +36 -155
  352. package/dist/es/standards-sdk.es159.js.map +1 -1
  353. package/dist/es/standards-sdk.es16.js +6 -6
  354. package/dist/es/standards-sdk.es160.js +2 -7
  355. package/dist/es/standards-sdk.es160.js.map +1 -1
  356. package/dist/es/standards-sdk.es161.js +223 -74
  357. package/dist/es/standards-sdk.es161.js.map +1 -1
  358. package/dist/es/standards-sdk.es162.js +1122 -47
  359. package/dist/es/standards-sdk.es162.js.map +1 -1
  360. package/dist/es/standards-sdk.es163.js +299 -187
  361. package/dist/es/standards-sdk.es163.js.map +1 -1
  362. package/dist/es/standards-sdk.es164.js +419 -23
  363. package/dist/es/standards-sdk.es164.js.map +1 -1
  364. package/dist/es/standards-sdk.es165.js +352 -55
  365. package/dist/es/standards-sdk.es165.js.map +1 -1
  366. package/dist/es/standards-sdk.es166.js +1113 -86
  367. package/dist/es/standards-sdk.es166.js.map +1 -1
  368. package/dist/es/standards-sdk.es167.js +200 -41
  369. package/dist/es/standards-sdk.es167.js.map +1 -1
  370. package/dist/es/standards-sdk.es168.js +1551 -188
  371. package/dist/es/standards-sdk.es168.js.map +1 -1
  372. package/dist/es/standards-sdk.es169.js +1161 -51
  373. package/dist/es/standards-sdk.es169.js.map +1 -1
  374. package/dist/es/standards-sdk.es170.js +15 -47
  375. package/dist/es/standards-sdk.es170.js.map +1 -1
  376. package/dist/es/standards-sdk.es171.js +445 -50
  377. package/dist/es/standards-sdk.es171.js.map +1 -1
  378. package/dist/es/standards-sdk.es172.js +255 -45
  379. package/dist/es/standards-sdk.es172.js.map +1 -1
  380. package/dist/es/standards-sdk.es173.js +4 -122
  381. package/dist/es/standards-sdk.es173.js.map +1 -1
  382. package/dist/es/standards-sdk.es174.js +77 -50
  383. package/dist/es/standards-sdk.es174.js.map +1 -1
  384. package/dist/es/standards-sdk.es175.js +85 -42
  385. package/dist/es/standards-sdk.es175.js.map +1 -1
  386. package/dist/es/standards-sdk.es176.js +60 -72
  387. package/dist/es/standards-sdk.es176.js.map +1 -1
  388. package/dist/es/standards-sdk.es177.js +2544 -65
  389. package/dist/es/standards-sdk.es177.js.map +1 -1
  390. package/dist/es/standards-sdk.es178.js +159 -44
  391. package/dist/es/standards-sdk.es178.js.map +1 -1
  392. package/dist/es/standards-sdk.es179.js +7 -36
  393. package/dist/es/standards-sdk.es179.js.map +1 -1
  394. package/dist/es/standards-sdk.es18.js +13 -13
  395. package/dist/es/standards-sdk.es180.js +86 -30
  396. package/dist/es/standards-sdk.es180.js.map +1 -1
  397. package/dist/es/standards-sdk.es181.js +65 -34
  398. package/dist/es/standards-sdk.es181.js.map +1 -1
  399. package/dist/es/standards-sdk.es182.js +196 -48
  400. package/dist/es/standards-sdk.es182.js.map +1 -1
  401. package/dist/es/standards-sdk.es183.js +23 -135
  402. package/dist/es/standards-sdk.es183.js.map +1 -1
  403. package/dist/es/standards-sdk.es184.js +54 -38
  404. package/dist/es/standards-sdk.es184.js.map +1 -1
  405. package/dist/es/standards-sdk.es185.js +102 -12470
  406. package/dist/es/standards-sdk.es185.js.map +1 -1
  407. package/dist/es/standards-sdk.es186.js +53 -52
  408. package/dist/es/standards-sdk.es186.js.map +1 -1
  409. package/dist/es/standards-sdk.es187.js +223 -103
  410. package/dist/es/standards-sdk.es187.js.map +1 -1
  411. package/dist/es/standards-sdk.es188.js +66 -75
  412. package/dist/es/standards-sdk.es188.js.map +1 -1
  413. package/dist/es/standards-sdk.es189.js +46 -197
  414. package/dist/es/standards-sdk.es189.js.map +1 -1
  415. package/dist/es/standards-sdk.es19.js +10 -10
  416. package/dist/es/standards-sdk.es190.js +60 -15
  417. package/dist/es/standards-sdk.es190.js.map +1 -1
  418. package/dist/es/standards-sdk.es191.js +47 -670
  419. package/dist/es/standards-sdk.es191.js.map +1 -1
  420. package/dist/es/standards-sdk.es192.js +112 -162
  421. package/dist/es/standards-sdk.es192.js.map +1 -1
  422. package/dist/es/standards-sdk.es193.js +53 -318
  423. package/dist/es/standards-sdk.es193.js.map +1 -1
  424. package/dist/es/standards-sdk.es194.js +54 -341
  425. package/dist/es/standards-sdk.es194.js.map +1 -1
  426. package/dist/es/standards-sdk.es195.js +72 -453
  427. package/dist/es/standards-sdk.es195.js.map +1 -1
  428. package/dist/es/standards-sdk.es196.js +75 -331
  429. package/dist/es/standards-sdk.es196.js.map +1 -1
  430. package/dist/es/standards-sdk.es197.js +44 -76
  431. package/dist/es/standards-sdk.es197.js.map +1 -1
  432. package/dist/es/standards-sdk.es198.js +30 -67
  433. package/dist/es/standards-sdk.es198.js.map +1 -1
  434. package/dist/es/standards-sdk.es199.js +30 -139
  435. package/dist/es/standards-sdk.es199.js.map +1 -1
  436. package/dist/es/standards-sdk.es2.js +2 -2
  437. package/dist/es/standards-sdk.es20.js +1 -1
  438. package/dist/es/standards-sdk.es200.js +34 -517
  439. package/dist/es/standards-sdk.es200.js.map +1 -1
  440. package/dist/es/standards-sdk.es201.js +48 -259
  441. package/dist/es/standards-sdk.es201.js.map +1 -1
  442. package/dist/es/standards-sdk.es202.js +127 -185
  443. package/dist/es/standards-sdk.es202.js.map +1 -1
  444. package/dist/es/standards-sdk.es203.js +36 -113
  445. package/dist/es/standards-sdk.es203.js.map +1 -1
  446. package/dist/es/standards-sdk.es204.js +12464 -134
  447. package/dist/es/standards-sdk.es204.js.map +1 -1
  448. package/dist/es/standards-sdk.es205.js +14 -181
  449. package/dist/es/standards-sdk.es205.js.map +1 -1
  450. package/dist/es/standards-sdk.es206.js +55 -683
  451. package/dist/es/standards-sdk.es206.js.map +1 -1
  452. package/dist/es/standards-sdk.es207.js +93 -167
  453. package/dist/es/standards-sdk.es207.js.map +1 -1
  454. package/dist/es/standards-sdk.es208.js +71 -225
  455. package/dist/es/standards-sdk.es208.js.map +1 -1
  456. package/dist/es/standards-sdk.es209.js +176 -215
  457. package/dist/es/standards-sdk.es209.js.map +1 -1
  458. package/dist/es/standards-sdk.es21.js +1 -1
  459. package/dist/es/standards-sdk.es210.js +675 -0
  460. package/dist/es/standards-sdk.es210.js.map +1 -0
  461. package/dist/es/standards-sdk.es211.js +76 -0
  462. package/dist/es/standards-sdk.es211.js.map +1 -0
  463. package/dist/es/standards-sdk.es212.js +175 -0
  464. package/dist/es/standards-sdk.es212.js.map +1 -0
  465. package/dist/es/standards-sdk.es213.js +325 -0
  466. package/dist/es/standards-sdk.es213.js.map +1 -0
  467. package/dist/es/standards-sdk.es214.js +349 -0
  468. package/dist/es/standards-sdk.es214.js.map +1 -0
  469. package/dist/es/standards-sdk.es215.js +456 -0
  470. package/dist/es/standards-sdk.es215.js.map +1 -0
  471. package/dist/es/standards-sdk.es216.js +334 -0
  472. package/dist/es/standards-sdk.es216.js.map +1 -0
  473. package/dist/es/standards-sdk.es217.js +79 -0
  474. package/dist/es/standards-sdk.es217.js.map +1 -0
  475. package/dist/es/standards-sdk.es218.js +142 -0
  476. package/dist/es/standards-sdk.es218.js.map +1 -0
  477. package/dist/es/standards-sdk.es219.js +520 -0
  478. package/dist/es/standards-sdk.es219.js.map +1 -0
  479. package/dist/es/standards-sdk.es22.js +1 -1
  480. package/dist/es/standards-sdk.es220.js +262 -0
  481. package/dist/es/standards-sdk.es220.js.map +1 -0
  482. package/dist/es/standards-sdk.es221.js +199 -0
  483. package/dist/es/standards-sdk.es221.js.map +1 -0
  484. package/dist/es/standards-sdk.es222.js +122 -0
  485. package/dist/es/standards-sdk.es222.js.map +1 -0
  486. package/dist/es/standards-sdk.es223.js +155 -0
  487. package/dist/es/standards-sdk.es223.js.map +1 -0
  488. package/dist/es/standards-sdk.es224.js +187 -0
  489. package/dist/es/standards-sdk.es224.js.map +1 -0
  490. package/dist/es/standards-sdk.es225.js +687 -0
  491. package/dist/es/standards-sdk.es225.js.map +1 -0
  492. package/dist/es/standards-sdk.es226.js +188 -0
  493. package/dist/es/standards-sdk.es226.js.map +1 -0
  494. package/dist/es/standards-sdk.es227.js +238 -0
  495. package/dist/es/standards-sdk.es227.js.map +1 -0
  496. package/dist/es/standards-sdk.es228.js +242 -0
  497. package/dist/es/standards-sdk.es228.js.map +1 -0
  498. package/dist/es/standards-sdk.es23.js +1 -1
  499. package/dist/es/standards-sdk.es24.js +1 -1
  500. package/dist/es/standards-sdk.es25.js +1 -1
  501. package/dist/es/standards-sdk.es26.js +1 -1
  502. package/dist/es/standards-sdk.es27.js +13 -13
  503. package/dist/es/standards-sdk.es30.js +2 -2
  504. package/dist/es/standards-sdk.es31.js +4 -4
  505. package/dist/es/standards-sdk.es32.js +1 -1
  506. package/dist/es/standards-sdk.es35.js +7 -7
  507. package/dist/es/standards-sdk.es36.js +4 -4
  508. package/dist/es/standards-sdk.es37.js +2 -2
  509. package/dist/es/standards-sdk.es38.js +2 -2
  510. package/dist/es/standards-sdk.es39.js +1 -1
  511. package/dist/es/standards-sdk.es4.js +2 -2
  512. package/dist/es/standards-sdk.es40.js +1 -1
  513. package/dist/es/standards-sdk.es41.js +2 -2
  514. package/dist/es/standards-sdk.es46.js +1 -1
  515. package/dist/es/standards-sdk.es5.js +2 -2
  516. package/dist/es/standards-sdk.es51.js +1 -1
  517. package/dist/es/standards-sdk.es53.js +1 -1
  518. package/dist/es/standards-sdk.es56.js +2 -2
  519. package/dist/es/standards-sdk.es59.js +1 -1
  520. package/dist/es/standards-sdk.es6.js +2 -2
  521. package/dist/es/standards-sdk.es60.js +1 -1
  522. package/dist/es/standards-sdk.es62.js +1 -1
  523. package/dist/es/standards-sdk.es63.js +2 -2
  524. package/dist/es/standards-sdk.es64.js +1 -1
  525. package/dist/es/standards-sdk.es65.js +1 -1
  526. package/dist/es/standards-sdk.es66.js +1 -1
  527. package/dist/es/standards-sdk.es67.js +8 -8
  528. package/dist/es/standards-sdk.es69.js +1 -1
  529. package/dist/es/standards-sdk.es7.js +1 -1
  530. package/dist/es/standards-sdk.es71.js +2 -2
  531. package/dist/es/standards-sdk.es72.js +3 -3
  532. package/dist/es/standards-sdk.es75.js +5 -5
  533. package/dist/es/standards-sdk.es76.js +3 -3
  534. package/dist/es/standards-sdk.es77.js +2 -2
  535. package/dist/es/standards-sdk.es78.js +1 -1
  536. package/dist/es/standards-sdk.es81.js +2 -2
  537. package/dist/es/standards-sdk.es83.js +2 -2
  538. package/dist/es/standards-sdk.es84.js +5 -5
  539. package/dist/es/standards-sdk.es85.js +1 -1
  540. package/dist/es/standards-sdk.es88.js +1 -1
  541. package/dist/es/standards-sdk.es89.js +2 -2
  542. package/dist/es/standards-sdk.es9.js +2 -2
  543. package/dist/es/standards-sdk.es90.js +4 -4
  544. package/dist/es/standards-sdk.es94.js +3 -3
  545. package/dist/es/standards-sdk.es96.js +2 -2
  546. package/dist/es/standards-sdk.es98.js +1 -1
  547. package/dist/es/standards-sdk.es99.js +3 -3
  548. package/package.json +1 -1
@@ -1,1169 +1,163 @@
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.es158.js";
5
- import { fetchHistorySnapshot, attachDecryptedHistory, registerConversationContextForEncryption, resolveDecryptionContext, decryptHistoryEntryFromContext } from "./standards-sdk.es199.js";
6
- import { createAgentNetworkApi } from "./standards-sdk.es152.js";
7
- import { createChatApi, createSession, resumeSession, checkChatReadiness, startChat, startConversation, acceptConversation, compactHistory, fetchEncryptionStatus, postEncryptionHandshake, sendMessage, retryMessage, cancelSession, endSession, createPlaintextConversationHandle } from "./standards-sdk.es200.js";
8
- import { EncryptedChatManager } from "./standards-sdk.es201.js";
9
- import { generateEncryptionKeyPair, bootstrapEncryptionOptions, createEncryptionApi } from "./standards-sdk.es202.js";
10
- import { adapters, adaptersDetailed, adapterRegistryCategories, adapterRegistryAdapters, createAdapterRegistryCategory, submitAdapterRegistryAdapter, adapterRegistrySubmissionStatus } from "./standards-sdk.es203.js";
11
- import { resolveUaid, getRegistrationQuote, updateAgent, getRegistrationProgress, waitForRegistrationCompletion, validateUaid, getUaidConnectionStatus, closeUaidConnection, dashboardStats } from "./standards-sdk.es153.js";
12
- import { getRegisterStatus, registerOwnedMoltbookAgent, getVerificationStatus, createVerificationChallenge, getVerificationChallenge, verifyVerificationChallenge, getVerificationOwnership, verifySenderOwnership, verifyUaidDnsTxt, getVerificationDnsStatus } from "./standards-sdk.es204.js";
13
- import { getCreditsBalance, getCreditProviders, createHbarPurchaseIntent, purchaseCreditsWithHbar, getX402Minimums, purchaseCreditsWithX402, buyCreditsWithX402 } from "./standards-sdk.es205.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.es206.js";
15
- import { createLedgerChallenge, verifyLedgerChallenge, authenticateWithLedger, authenticateWithLedgerCredentials } from "./standards-sdk.es207.js";
16
- import { search, delegate, stats, registries, getAdditionalRegistries, popularSearches, listProtocols, detectProtocol, registrySearchByNamespace, vectorSearch, searchStatus, websocketStats, metricsSummary, facets } from "./standards-sdk.es208.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.es191.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.es209.js";
19
- import { RegistryBrokerError, RegistryBrokerParseError } from "./standards-sdk.es151.js";
20
- import { optionalImportSync } from "./standards-sdk.es187.js";
21
- class RegistryBrokerClient {
1
+ import { Logger } from "./standards-sdk.es147.js";
2
+ class ProgressReporter {
22
3
  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
- }
4
+ this.module = options.module || "Progress";
5
+ this.callback = options.callback;
6
+ this.logger = options.logger || new Logger({
7
+ level: "info",
8
+ module: "ProgressReporter"
57
9
  });
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;
10
+ this.logProgress = options.logProgress ?? true;
11
+ this.minPercent = options.minPercent ?? 0;
12
+ this.maxPercent = options.maxPercent ?? 100;
13
+ this.lastReportedPercent = -1;
14
+ this.lastReportedTime = 0;
15
+ this.throttleMs = 100;
16
+ }
17
+ static getInstance(options = {}) {
18
+ if (!ProgressReporter.instance) {
19
+ ProgressReporter.instance = new ProgressReporter(options);
20
+ } else {
21
+ if (options.callback) {
22
+ ProgressReporter.instance.setCallback(options.callback);
71
23
  }
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");
24
+ if (options.module) {
25
+ ProgressReporter.instance.setModule(options.module);
173
26
  }
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`,
293
- {
294
- method: "POST",
295
- body: payload,
296
- headers: { "content-type": "application/json" }
27
+ if (options.logger) {
28
+ ProgressReporter.instance.setLogger(options.logger);
297
29
  }
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`,
312
- {
313
- method: "POST",
314
- body: payload,
315
- headers: { "content-type": "application/json" }
30
+ if (options.minPercent !== void 0) {
31
+ ProgressReporter.instance.setMinPercent(options.minPercent);
316
32
  }
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}`]
33
+ if (options.maxPercent !== void 0) {
34
+ ProgressReporter.instance.setMaxPercent(options.maxPercent);
350
35
  }
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);
36
+ }
37
+ return ProgressReporter.instance;
505
38
  }
506
- async adapterRegistryAdapters(filters) {
507
- return adapterRegistryAdapters(this, filters);
39
+ setCallback(callback) {
40
+ this.callback = callback;
508
41
  }
509
- async createAdapterRegistryCategory(payload) {
510
- return createAdapterRegistryCategory(this, payload);
42
+ setModule(module) {
43
+ this.module = module;
511
44
  }
512
- async submitAdapterRegistryAdapter(payload) {
513
- return submitAdapterRegistryAdapter(this, payload);
45
+ setLogger(logger) {
46
+ this.logger = logger;
514
47
  }
515
- async adapterRegistrySubmissionStatus(submissionId) {
516
- return adapterRegistrySubmissionStatus(this, submissionId);
48
+ setMinPercent(minPercent) {
49
+ this.minPercent = minPercent;
517
50
  }
518
- async resolveUaid(uaid) {
519
- return resolveUaid(this, uaid);
51
+ setMaxPercent(maxPercent) {
52
+ this.maxPercent = maxPercent;
520
53
  }
521
- async performRegisterAgent(payload) {
522
- const raw = await this.requestJson("/register", {
523
- method: "POST",
524
- body: serialiseAgentRegistrationRequest(payload),
525
- headers: { "content-type": "application/json" }
54
+ createSubProgress(options) {
55
+ const subReporter = new ProgressReporter({
56
+ module: this.module,
57
+ logger: this.logger,
58
+ logProgress: this.logProgress,
59
+ minPercent: options.minPercent,
60
+ maxPercent: options.maxPercent
526
61
  });
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
62
+ const logPrefix = options.logPrefix || "";
63
+ subReporter.setCallback((data) => {
64
+ const scaledPercent = this.scalePercent(
65
+ data.progressPercent,
66
+ options.minPercent,
67
+ options.maxPercent
581
68
  );
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;
615
- }
616
- throw error;
69
+ let formattedMessage = data.message;
70
+ if (logPrefix && !formattedMessage.startsWith(logPrefix)) {
71
+ formattedMessage = `${logPrefix}: ${formattedMessage}`;
617
72
  }
73
+ this.report({
74
+ stage: data.stage,
75
+ message: formattedMessage,
76
+ progressPercent: scaledPercent,
77
+ details: data.details
78
+ });
79
+ });
80
+ return subReporter;
81
+ }
82
+ report(data) {
83
+ const rawPercent = data.progressPercent;
84
+ const percent = Math.max(0, Math.min(100, rawPercent));
85
+ const scaledPercent = this.scalePercent(percent, 0, 100);
86
+ const now = Date.now();
87
+ if (scaledPercent === this.lastReportedPercent && now - this.lastReportedTime < this.throttleMs && data.stage !== "completed" && data.stage !== "failed") {
88
+ return;
618
89
  }
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;
90
+ this.lastReportedPercent = scaledPercent;
91
+ this.lastReportedTime = now;
92
+ const progressData = {
93
+ ...data,
94
+ progressPercent: scaledPercent
95
+ };
96
+ if (this.logProgress) {
97
+ this.logger.debug(
98
+ `[${this.module}] [${data.stage.toUpperCase()}] ${data.message} (${scaledPercent.toFixed(1)}%)`,
99
+ data.details
100
+ );
913
101
  }
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)) {
102
+ if (this.callback) {
921
103
  try {
922
- return await response.json();
923
- } catch (error) {
924
- return { parseError: String(error) };
104
+ this.callback(progressData);
105
+ } catch (err) {
106
+ this.logger.warn(`Error in progress callback: ${err}`);
925
107
  }
926
108
  }
927
- try {
928
- return await response.text();
929
- } catch (error) {
930
- return { parseError: String(error) };
931
- }
932
109
  }
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
- }
110
+ scalePercent(percent, sourceMin, sourceMax) {
111
+ const range = this.maxPercent - this.minPercent;
112
+ const sourceRange = sourceMax - sourceMin;
113
+ const scaleFactor = range / sourceRange;
114
+ return this.minPercent + (percent - sourceMin) * scaleFactor;
943
115
  }
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
- }
116
+ preparing(message, percent, details) {
117
+ this.report({
118
+ stage: "preparing",
119
+ message,
120
+ progressPercent: percent,
121
+ details
971
122
  });
972
123
  }
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;
124
+ submitting(message, percent, details) {
125
+ this.report({
126
+ stage: "submitting",
127
+ message,
128
+ progressPercent: percent,
129
+ details
130
+ });
1119
131
  }
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");
132
+ confirming(message, percent, details) {
133
+ this.report({
134
+ stage: "confirming",
135
+ message,
136
+ progressPercent: percent,
137
+ details
138
+ });
1136
139
  }
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
1150
- }
140
+ verifying(message, percent, details) {
141
+ this.report({
142
+ stage: "verifying",
143
+ message,
144
+ progressPercent: percent,
145
+ details
1151
146
  });
1152
147
  }
1153
- initializeEncryptionBootstrap(options) {
1154
- return this.bootstrapEncryptionOptions(options).then(() => void 0);
148
+ completed(message, details) {
149
+ this.report({ stage: "completed", message, progressPercent: 100, details });
1155
150
  }
1156
- bootstrapEncryptionOptions(options) {
1157
- return bootstrapEncryptionOptions(this, options);
151
+ failed(message, details) {
152
+ this.report({
153
+ stage: "failed",
154
+ message,
155
+ progressPercent: this.lastReportedPercent,
156
+ details
157
+ });
1158
158
  }
1159
159
  }
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";
1163
160
  export {
1164
- RegistryBrokerClient,
1165
- isPartialRegisterAgentResponse,
1166
- isPendingRegisterAgentResponse,
1167
- isSuccessRegisterAgentResponse
161
+ ProgressReporter
1168
162
  };
1169
163
  //# sourceMappingURL=standards-sdk.es150.js.map