@1claw/mcp 0.61.0 → 0.63.1

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 (468) hide show
  1. package/README.md +42 -2
  2. package/dist/client/admin.d.ts +96 -0
  3. package/dist/client/admin.d.ts.map +1 -0
  4. package/dist/client/admin.js +67 -0
  5. package/dist/client/admin.js.map +1 -0
  6. package/dist/client/approvals.d.ts +52 -0
  7. package/dist/client/approvals.d.ts.map +1 -0
  8. package/dist/client/approvals.js +40 -0
  9. package/dist/client/approvals.js.map +1 -0
  10. package/dist/client/automations.d.ts +15 -0
  11. package/dist/client/automations.d.ts.map +1 -0
  12. package/dist/client/automations.js +21 -0
  13. package/dist/client/automations.js.map +1 -0
  14. package/dist/client/cards.d.ts +20 -0
  15. package/dist/client/cards.d.ts.map +1 -0
  16. package/dist/client/cards.js +23 -0
  17. package/dist/client/cards.js.map +1 -0
  18. package/dist/client/chat.d.ts +26 -0
  19. package/dist/client/chat.d.ts.map +1 -0
  20. package/dist/client/chat.js +31 -0
  21. package/dist/client/chat.js.map +1 -0
  22. package/dist/client/core.d.ts +96 -0
  23. package/dist/client/core.d.ts.map +1 -0
  24. package/dist/client/core.js +281 -0
  25. package/dist/client/core.js.map +1 -0
  26. package/dist/client/delegation.d.ts +17 -0
  27. package/dist/client/delegation.d.ts.map +1 -0
  28. package/dist/client/delegation.js +18 -0
  29. package/dist/client/delegation.js.map +1 -0
  30. package/dist/client/directory.d.ts +18 -0
  31. package/dist/client/directory.d.ts.map +1 -0
  32. package/dist/client/directory.js +37 -0
  33. package/dist/client/directory.js.map +1 -0
  34. package/dist/client/error.d.ts +7 -0
  35. package/dist/client/error.d.ts.map +1 -0
  36. package/dist/client/error.js +12 -0
  37. package/dist/client/error.js.map +1 -0
  38. package/dist/client/execute.d.ts +37 -0
  39. package/dist/client/execute.d.ts.map +1 -0
  40. package/dist/client/execute.js +57 -0
  41. package/dist/client/execute.js.map +1 -0
  42. package/dist/client/index.d.ts +44 -0
  43. package/dist/client/index.d.ts.map +1 -0
  44. package/dist/client/index.js +40 -0
  45. package/dist/client/index.js.map +1 -0
  46. package/dist/client/intents.d.ts +148 -0
  47. package/dist/client/intents.d.ts.map +1 -0
  48. package/dist/client/intents.js +110 -0
  49. package/dist/client/intents.js.map +1 -0
  50. package/dist/client/memory.d.ts +18 -0
  51. package/dist/client/memory.d.ts.map +1 -0
  52. package/dist/client/memory.js +24 -0
  53. package/dist/client/memory.js.map +1 -0
  54. package/dist/client/platform.d.ts +157 -0
  55. package/dist/client/platform.d.ts.map +1 -0
  56. package/dist/client/platform.js +211 -0
  57. package/dist/client/platform.js.map +1 -0
  58. package/dist/client/runtimes.d.ts +15 -0
  59. package/dist/client/runtimes.d.ts.map +1 -0
  60. package/dist/client/runtimes.js +19 -0
  61. package/dist/client/runtimes.js.map +1 -0
  62. package/dist/client/secrets.d.ts +41 -0
  63. package/dist/client/secrets.d.ts.map +1 -0
  64. package/dist/client/secrets.js +68 -0
  65. package/dist/client/secrets.js.map +1 -0
  66. package/dist/client/treasury.d.ts +19 -0
  67. package/dist/client/treasury.d.ts.map +1 -0
  68. package/dist/client/treasury.js +16 -0
  69. package/dist/client/treasury.js.map +1 -0
  70. package/dist/client/vault-facade.d.ts +14 -0
  71. package/dist/client/vault-facade.d.ts.map +1 -0
  72. package/dist/client/vault-facade.js +24 -0
  73. package/dist/client/vault-facade.js.map +1 -0
  74. package/dist/client.d.ts +5 -642
  75. package/dist/client.d.ts.map +1 -1
  76. package/dist/client.js +3 -909
  77. package/dist/client.js.map +1 -1
  78. package/dist/core/server.d.ts +27 -0
  79. package/dist/core/server.d.ts.map +1 -0
  80. package/dist/core/server.js +594 -0
  81. package/dist/core/server.js.map +1 -0
  82. package/dist/core/session.d.ts +79 -0
  83. package/dist/core/session.d.ts.map +1 -0
  84. package/dist/core/session.js +205 -0
  85. package/dist/core/session.js.map +1 -0
  86. package/dist/index.d.ts +5 -1
  87. package/dist/index.d.ts.map +1 -1
  88. package/dist/index.js +11 -754
  89. package/dist/index.js.map +1 -1
  90. package/dist/security/index.d.ts +7 -1
  91. package/dist/security/index.d.ts.map +1 -1
  92. package/dist/security/index.js +26 -11
  93. package/dist/security/index.js.map +1 -1
  94. package/dist/tools/cancel_automation_run.d.ts +1 -1
  95. package/dist/tools/cancel_automation_run.d.ts.map +1 -1
  96. package/dist/tools/cancel_automation_run.js +1 -1
  97. package/dist/tools/cancel_automation_run.js.map +1 -1
  98. package/dist/tools/create_agent_automation.d.ts +1 -1
  99. package/dist/tools/create_agent_automation.d.ts.map +1 -1
  100. package/dist/tools/create_agent_automation.js +1 -1
  101. package/dist/tools/create_agent_automation.js.map +1 -1
  102. package/dist/tools/create_binding.d.ts +3 -3
  103. package/dist/tools/create_binding.d.ts.map +1 -1
  104. package/dist/tools/create_binding.js +1 -1
  105. package/dist/tools/create_binding.js.map +1 -1
  106. package/dist/tools/create_channel.d.ts +3 -3
  107. package/dist/tools/create_channel.d.ts.map +1 -1
  108. package/dist/tools/create_channel.js +1 -1
  109. package/dist/tools/create_channel.js.map +1 -1
  110. package/dist/tools/create_sub_org.d.ts +1 -1
  111. package/dist/tools/create_sub_org.d.ts.map +1 -1
  112. package/dist/tools/create_sub_org.js +1 -1
  113. package/dist/tools/create_sub_org.js.map +1 -1
  114. package/dist/tools/delegate_task.d.ts +1 -1
  115. package/dist/tools/delegate_task.d.ts.map +1 -1
  116. package/dist/tools/delegate_task.js +1 -1
  117. package/dist/tools/delegate_task.js.map +1 -1
  118. package/dist/tools/delegation.d.ts +1 -1
  119. package/dist/tools/delegation.d.ts.map +1 -1
  120. package/dist/tools/delegation.js +1 -1
  121. package/dist/tools/delegation.js.map +1 -1
  122. package/dist/tools/delete_memory.d.ts +3 -3
  123. package/dist/tools/delete_memory.d.ts.map +1 -1
  124. package/dist/tools/delete_memory.js +1 -1
  125. package/dist/tools/delete_memory.js.map +1 -1
  126. package/dist/tools/delete_secret.d.ts +1 -1
  127. package/dist/tools/delete_secret.d.ts.map +1 -1
  128. package/dist/tools/delete_secret.js +1 -1
  129. package/dist/tools/delete_secret.js.map +1 -1
  130. package/dist/tools/describe_secret.d.ts +1 -1
  131. package/dist/tools/describe_secret.d.ts.map +1 -1
  132. package/dist/tools/describe_secret.js +1 -1
  133. package/dist/tools/describe_secret.js.map +1 -1
  134. package/dist/tools/directory_jobs.d.ts +2 -2
  135. package/dist/tools/env.d.ts +43 -0
  136. package/dist/tools/env.d.ts.map +1 -0
  137. package/dist/tools/env.js +62 -0
  138. package/dist/tools/env.js.map +1 -0
  139. package/dist/tools/execute_http.d.ts +1 -1
  140. package/dist/tools/execute_http.d.ts.map +1 -1
  141. package/dist/tools/execute_http.js +1 -1
  142. package/dist/tools/execute_http.js.map +1 -1
  143. package/dist/tools/execute_intent.d.ts +3 -3
  144. package/dist/tools/execute_intent.d.ts.map +1 -1
  145. package/dist/tools/execute_intent.js +1 -1
  146. package/dist/tools/execute_intent.js.map +1 -1
  147. package/dist/tools/get_approval.d.ts +1 -1
  148. package/dist/tools/get_approval.d.ts.map +1 -1
  149. package/dist/tools/get_approval.js +1 -1
  150. package/dist/tools/get_approval.js.map +1 -1
  151. package/dist/tools/get_approval_status.d.ts +1 -1
  152. package/dist/tools/get_approval_status.d.ts.map +1 -1
  153. package/dist/tools/get_approval_status.js +1 -1
  154. package/dist/tools/get_approval_status.js.map +1 -1
  155. package/dist/tools/get_memory.d.ts +3 -3
  156. package/dist/tools/get_memory.d.ts.map +1 -1
  157. package/dist/tools/get_memory.js +1 -1
  158. package/dist/tools/get_memory.js.map +1 -1
  159. package/dist/tools/get_peer_context.d.ts +1 -1
  160. package/dist/tools/get_peer_context.d.ts.map +1 -1
  161. package/dist/tools/get_peer_context.js +1 -1
  162. package/dist/tools/get_peer_context.js.map +1 -1
  163. package/dist/tools/get_secret.d.ts +1 -1
  164. package/dist/tools/get_secret.d.ts.map +1 -1
  165. package/dist/tools/get_secret.js +1 -1
  166. package/dist/tools/get_secret.js.map +1 -1
  167. package/dist/tools/get_signing_key_balance.d.ts +1 -1
  168. package/dist/tools/get_signing_key_balance.d.ts.map +1 -1
  169. package/dist/tools/get_signing_key_balance.js +1 -1
  170. package/dist/tools/get_signing_key_balance.js.map +1 -1
  171. package/dist/tools/get_transaction.d.ts +2 -2
  172. package/dist/tools/get_transaction.d.ts.map +1 -1
  173. package/dist/tools/get_transaction.js +1 -1
  174. package/dist/tools/get_transaction.js.map +1 -1
  175. package/dist/tools/import_signing_key.d.ts +1 -1
  176. package/dist/tools/import_signing_key.d.ts.map +1 -1
  177. package/dist/tools/import_signing_key.js +1 -1
  178. package/dist/tools/import_signing_key.js.map +1 -1
  179. package/dist/tools/import_smart_account.d.ts +1 -1
  180. package/dist/tools/import_smart_account.d.ts.map +1 -1
  181. package/dist/tools/import_smart_account.js +1 -1
  182. package/dist/tools/import_smart_account.js.map +1 -1
  183. package/dist/tools/lease_bankr_key.d.ts +1 -1
  184. package/dist/tools/lease_bankr_key.d.ts.map +1 -1
  185. package/dist/tools/lease_bankr_key.js +1 -1
  186. package/dist/tools/lease_bankr_key.js.map +1 -1
  187. package/dist/tools/list_approvals.d.ts +1 -1
  188. package/dist/tools/list_approvals.d.ts.map +1 -1
  189. package/dist/tools/list_approvals.js +1 -1
  190. package/dist/tools/list_approvals.js.map +1 -1
  191. package/dist/tools/list_automation_presets.d.ts +1 -1
  192. package/dist/tools/list_automation_presets.d.ts.map +1 -1
  193. package/dist/tools/list_automation_presets.js +1 -1
  194. package/dist/tools/list_automation_presets.js.map +1 -1
  195. package/dist/tools/list_automations.d.ts +1 -1
  196. package/dist/tools/list_automations.d.ts.map +1 -1
  197. package/dist/tools/list_automations.js +1 -1
  198. package/dist/tools/list_automations.js.map +1 -1
  199. package/dist/tools/list_bindings.d.ts +1 -1
  200. package/dist/tools/list_bindings.d.ts.map +1 -1
  201. package/dist/tools/list_bindings.js +1 -1
  202. package/dist/tools/list_bindings.js.map +1 -1
  203. package/dist/tools/list_cards.d.ts +3 -3
  204. package/dist/tools/list_cards.d.ts.map +1 -1
  205. package/dist/tools/list_cards.js +1 -1
  206. package/dist/tools/list_cards.js.map +1 -1
  207. package/dist/tools/list_channels.d.ts +1 -1
  208. package/dist/tools/list_channels.d.ts.map +1 -1
  209. package/dist/tools/list_channels.js +1 -1
  210. package/dist/tools/list_channels.js.map +1 -1
  211. package/dist/tools/list_chat_conversations.d.ts +1 -1
  212. package/dist/tools/list_chat_conversations.d.ts.map +1 -1
  213. package/dist/tools/list_chat_conversations.js +1 -1
  214. package/dist/tools/list_chat_conversations.js.map +1 -1
  215. package/dist/tools/list_connector_presets.d.ts +1 -1
  216. package/dist/tools/list_connector_presets.d.ts.map +1 -1
  217. package/dist/tools/list_connector_presets.js +1 -1
  218. package/dist/tools/list_connector_presets.js.map +1 -1
  219. package/dist/tools/list_executions.d.ts +1 -1
  220. package/dist/tools/list_executions.d.ts.map +1 -1
  221. package/dist/tools/list_executions.js +1 -1
  222. package/dist/tools/list_executions.js.map +1 -1
  223. package/dist/tools/list_installed_connectors.d.ts +1 -1
  224. package/dist/tools/list_installed_connectors.d.ts.map +1 -1
  225. package/dist/tools/list_installed_connectors.js +1 -1
  226. package/dist/tools/list_installed_connectors.js.map +1 -1
  227. package/dist/tools/list_memory.d.ts +1 -1
  228. package/dist/tools/list_memory.d.ts.map +1 -1
  229. package/dist/tools/list_memory.js +1 -1
  230. package/dist/tools/list_memory.js.map +1 -1
  231. package/dist/tools/list_notification_targets.d.ts +1 -1
  232. package/dist/tools/list_notification_targets.d.ts.map +1 -1
  233. package/dist/tools/list_notification_targets.js +1 -1
  234. package/dist/tools/list_notification_targets.js.map +1 -1
  235. package/dist/tools/list_oauth_connections.d.ts +1 -1
  236. package/dist/tools/list_oauth_connections.d.ts.map +1 -1
  237. package/dist/tools/list_oauth_connections.js +1 -1
  238. package/dist/tools/list_oauth_connections.js.map +1 -1
  239. package/dist/tools/list_oauth_providers.d.ts +1 -1
  240. package/dist/tools/list_oauth_providers.d.ts.map +1 -1
  241. package/dist/tools/list_oauth_providers.js +1 -1
  242. package/dist/tools/list_oauth_providers.js.map +1 -1
  243. package/dist/tools/list_runtimes.d.ts +1 -1
  244. package/dist/tools/list_runtimes.d.ts.map +1 -1
  245. package/dist/tools/list_runtimes.js +1 -1
  246. package/dist/tools/list_runtimes.js.map +1 -1
  247. package/dist/tools/list_signing_keys.d.ts +1 -1
  248. package/dist/tools/list_signing_keys.d.ts.map +1 -1
  249. package/dist/tools/list_signing_keys.js +1 -1
  250. package/dist/tools/list_signing_keys.js.map +1 -1
  251. package/dist/tools/list_transactions.d.ts +1 -1
  252. package/dist/tools/list_transactions.d.ts.map +1 -1
  253. package/dist/tools/list_transactions.js +1 -1
  254. package/dist/tools/list_transactions.js.map +1 -1
  255. package/dist/tools/manage_runtime.d.ts +1 -1
  256. package/dist/tools/manage_runtime.d.ts.map +1 -1
  257. package/dist/tools/manage_runtime.js +1 -1
  258. package/dist/tools/manage_runtime.js.map +1 -1
  259. package/dist/tools/oauth_revoke_consent.d.ts +1 -1
  260. package/dist/tools/oauth_revoke_consent.d.ts.map +1 -1
  261. package/dist/tools/oauth_revoke_consent.js +1 -1
  262. package/dist/tools/oauth_revoke_consent.js.map +1 -1
  263. package/dist/tools/oauth_revoke_token.d.ts +1 -1
  264. package/dist/tools/oauth_revoke_token.d.ts.map +1 -1
  265. package/dist/tools/oauth_revoke_token.js +1 -1
  266. package/dist/tools/oauth_revoke_token.js.map +1 -1
  267. package/dist/tools/order_card.d.ts +1 -1
  268. package/dist/tools/order_card.d.ts.map +1 -1
  269. package/dist/tools/order_card.js +1 -1
  270. package/dist/tools/order_card.js.map +1 -1
  271. package/dist/tools/platform_app_stats.d.ts +1 -1
  272. package/dist/tools/platform_app_stats.d.ts.map +1 -1
  273. package/dist/tools/platform_app_stats.js +1 -1
  274. package/dist/tools/platform_app_stats.js.map +1 -1
  275. package/dist/tools/platform_bootstrap_user.d.ts +1 -1
  276. package/dist/tools/platform_bootstrap_user.d.ts.map +1 -1
  277. package/dist/tools/platform_bootstrap_user.js +1 -1
  278. package/dist/tools/platform_bootstrap_user.js.map +1 -1
  279. package/dist/tools/platform_create_app.d.ts +1 -1
  280. package/dist/tools/platform_create_app.d.ts.map +1 -1
  281. package/dist/tools/platform_create_app.js +1 -1
  282. package/dist/tools/platform_create_app.js.map +1 -1
  283. package/dist/tools/platform_create_template.d.ts +1 -1
  284. package/dist/tools/platform_create_template.d.ts.map +1 -1
  285. package/dist/tools/platform_create_template.js +1 -1
  286. package/dist/tools/platform_create_template.js.map +1 -1
  287. package/dist/tools/platform_expansion.d.ts +81 -17
  288. package/dist/tools/platform_expansion.d.ts.map +1 -1
  289. package/dist/tools/platform_expansion.js +86 -1
  290. package/dist/tools/platform_expansion.js.map +1 -1
  291. package/dist/tools/platform_fleet.d.ts +6 -6
  292. package/dist/tools/platform_grant_access.d.ts +1 -1
  293. package/dist/tools/platform_grant_access.d.ts.map +1 -1
  294. package/dist/tools/platform_grant_access.js +1 -1
  295. package/dist/tools/platform_grant_access.js.map +1 -1
  296. package/dist/tools/platform_marketplace.d.ts +2 -2
  297. package/dist/tools/platform_reissue_claim.d.ts +1 -1
  298. package/dist/tools/platform_reissue_claim.d.ts.map +1 -1
  299. package/dist/tools/platform_reissue_claim.js +1 -1
  300. package/dist/tools/platform_reissue_claim.js.map +1 -1
  301. package/dist/tools/platform_rotate_key.d.ts +1 -1
  302. package/dist/tools/platform_rotate_key.d.ts.map +1 -1
  303. package/dist/tools/platform_rotate_key.js +1 -1
  304. package/dist/tools/platform_rotate_key.js.map +1 -1
  305. package/dist/tools/platform_rotate_webhook_secret.d.ts +1 -1
  306. package/dist/tools/platform_rotate_webhook_secret.d.ts.map +1 -1
  307. package/dist/tools/platform_rotate_webhook_secret.js +1 -1
  308. package/dist/tools/platform_rotate_webhook_secret.js.map +1 -1
  309. package/dist/tools/provision_signing_key.d.ts +1 -1
  310. package/dist/tools/provision_signing_key.d.ts.map +1 -1
  311. package/dist/tools/provision_signing_key.js +1 -1
  312. package/dist/tools/provision_signing_key.js.map +1 -1
  313. package/dist/tools/put_memory.d.ts +3 -3
  314. package/dist/tools/put_memory.d.ts.map +1 -1
  315. package/dist/tools/put_memory.js +1 -1
  316. package/dist/tools/put_memory.js.map +1 -1
  317. package/dist/tools/request_approval.d.ts +5 -5
  318. package/dist/tools/request_approval.d.ts.map +1 -1
  319. package/dist/tools/request_approval.js +1 -1
  320. package/dist/tools/request_approval.js.map +1 -1
  321. package/dist/tools/runtime_logs.d.ts +1 -1
  322. package/dist/tools/runtime_logs.d.ts.map +1 -1
  323. package/dist/tools/runtime_logs.js +1 -1
  324. package/dist/tools/runtime_logs.js.map +1 -1
  325. package/dist/tools/runtime_status.d.ts +1 -1
  326. package/dist/tools/runtime_status.d.ts.map +1 -1
  327. package/dist/tools/runtime_status.js +1 -1
  328. package/dist/tools/runtime_status.js.map +1 -1
  329. package/dist/tools/safe_accounts.js +1 -1
  330. package/dist/tools/safe_accounts.js.map +1 -1
  331. package/dist/tools/search_memory.d.ts +1 -1
  332. package/dist/tools/search_memory.d.ts.map +1 -1
  333. package/dist/tools/search_memory.js +1 -1
  334. package/dist/tools/search_memory.js.map +1 -1
  335. package/dist/tools/secret_versions.d.ts +73 -0
  336. package/dist/tools/secret_versions.d.ts.map +1 -0
  337. package/dist/tools/secret_versions.js +52 -0
  338. package/dist/tools/secret_versions.js.map +1 -0
  339. package/dist/tools/send_channel_message.d.ts +3 -3
  340. package/dist/tools/send_channel_message.d.ts.map +1 -1
  341. package/dist/tools/send_channel_message.js +1 -1
  342. package/dist/tools/send_channel_message.js.map +1 -1
  343. package/dist/tools/send_chat_message.d.ts +3 -3
  344. package/dist/tools/send_chat_message.d.ts.map +1 -1
  345. package/dist/tools/send_chat_message.js +1 -1
  346. package/dist/tools/send_chat_message.js.map +1 -1
  347. package/dist/tools/sign_digest.d.ts +1 -1
  348. package/dist/tools/sign_digest.d.ts.map +1 -1
  349. package/dist/tools/sign_digest.js +1 -1
  350. package/dist/tools/sign_digest.js.map +1 -1
  351. package/dist/tools/sign_message.d.ts +1 -1
  352. package/dist/tools/sign_message.d.ts.map +1 -1
  353. package/dist/tools/sign_message.js +1 -1
  354. package/dist/tools/sign_message.js.map +1 -1
  355. package/dist/tools/sign_transaction.d.ts +7 -7
  356. package/dist/tools/sign_transaction.d.ts.map +1 -1
  357. package/dist/tools/sign_transaction.js +1 -1
  358. package/dist/tools/sign_transaction.js.map +1 -1
  359. package/dist/tools/sign_typed_data.d.ts +1 -1
  360. package/dist/tools/sign_typed_data.d.ts.map +1 -1
  361. package/dist/tools/sign_typed_data.js +1 -1
  362. package/dist/tools/sign_typed_data.js.map +1 -1
  363. package/dist/tools/simulate_bundle.d.ts +13 -13
  364. package/dist/tools/simulate_bundle.d.ts.map +1 -1
  365. package/dist/tools/simulate_bundle.js +1 -1
  366. package/dist/tools/simulate_bundle.js.map +1 -1
  367. package/dist/tools/simulate_transaction.d.ts +5 -5
  368. package/dist/tools/simulate_transaction.d.ts.map +1 -1
  369. package/dist/tools/simulate_transaction.js +1 -1
  370. package/dist/tools/simulate_transaction.js.map +1 -1
  371. package/dist/tools/spend_from_passkey_safe.d.ts +40 -0
  372. package/dist/tools/spend_from_passkey_safe.d.ts.map +1 -0
  373. package/dist/tools/spend_from_passkey_safe.js +50 -0
  374. package/dist/tools/spend_from_passkey_safe.js.map +1 -0
  375. package/dist/tools/submit_transaction.d.ts +7 -7
  376. package/dist/tools/submit_transaction.d.ts.map +1 -1
  377. package/dist/tools/submit_transaction.js +1 -1
  378. package/dist/tools/submit_transaction.js.map +1 -1
  379. package/dist/tools/test_binding.d.ts +1 -1
  380. package/dist/tools/test_binding.d.ts.map +1 -1
  381. package/dist/tools/test_binding.js +1 -1
  382. package/dist/tools/test_binding.js.map +1 -1
  383. package/dist/tools/treasury_sign_proposal.d.ts +1 -1
  384. package/dist/tools/trigger_automation.d.ts +1 -1
  385. package/dist/tools/trigger_automation.d.ts.map +1 -1
  386. package/dist/tools/trigger_automation.js +1 -1
  387. package/dist/tools/trigger_automation.js.map +1 -1
  388. package/dist/toolsets/admin.d.ts +4 -0
  389. package/dist/toolsets/admin.d.ts.map +1 -0
  390. package/dist/toolsets/admin.js +40 -0
  391. package/dist/toolsets/admin.js.map +1 -0
  392. package/dist/toolsets/approvals.d.ts +4 -0
  393. package/dist/toolsets/approvals.d.ts.map +1 -0
  394. package/dist/toolsets/approvals.js +18 -0
  395. package/dist/toolsets/approvals.js.map +1 -0
  396. package/dist/toolsets/automations.d.ts +4 -0
  397. package/dist/toolsets/automations.d.ts.map +1 -0
  398. package/dist/toolsets/automations.js +18 -0
  399. package/dist/toolsets/automations.js.map +1 -0
  400. package/dist/toolsets/cards.d.ts +4 -0
  401. package/dist/toolsets/cards.d.ts.map +1 -0
  402. package/dist/toolsets/cards.js +15 -0
  403. package/dist/toolsets/cards.js.map +1 -0
  404. package/dist/toolsets/channels.d.ts +4 -0
  405. package/dist/toolsets/channels.d.ts.map +1 -0
  406. package/dist/toolsets/channels.js +14 -0
  407. package/dist/toolsets/channels.js.map +1 -0
  408. package/dist/toolsets/chat.d.ts +4 -0
  409. package/dist/toolsets/chat.d.ts.map +1 -0
  410. package/dist/toolsets/chat.js +12 -0
  411. package/dist/toolsets/chat.js.map +1 -0
  412. package/dist/toolsets/delegation.d.ts +4 -0
  413. package/dist/toolsets/delegation.d.ts.map +1 -0
  414. package/dist/toolsets/delegation.js +16 -0
  415. package/dist/toolsets/delegation.js.map +1 -0
  416. package/dist/toolsets/directory.d.ts +4 -0
  417. package/dist/toolsets/directory.d.ts.map +1 -0
  418. package/dist/toolsets/directory.js +14 -0
  419. package/dist/toolsets/directory.js.map +1 -0
  420. package/dist/toolsets/execute.d.ts +4 -0
  421. package/dist/toolsets/execute.d.ts.map +1 -0
  422. package/dist/toolsets/execute.js +22 -0
  423. package/dist/toolsets/execute.js.map +1 -0
  424. package/dist/toolsets/index.d.ts +9 -0
  425. package/dist/toolsets/index.d.ts.map +1 -0
  426. package/dist/toolsets/index.js +40 -0
  427. package/dist/toolsets/index.js.map +1 -0
  428. package/dist/toolsets/intents.d.ts +4 -0
  429. package/dist/toolsets/intents.d.ts.map +1 -0
  430. package/dist/toolsets/intents.js +45 -0
  431. package/dist/toolsets/intents.js.map +1 -0
  432. package/dist/toolsets/memory.d.ts +4 -0
  433. package/dist/toolsets/memory.d.ts.map +1 -0
  434. package/dist/toolsets/memory.js +20 -0
  435. package/dist/toolsets/memory.js.map +1 -0
  436. package/dist/toolsets/notification.d.ts +4 -0
  437. package/dist/toolsets/notification.d.ts.map +1 -0
  438. package/dist/toolsets/notification.js +10 -0
  439. package/dist/toolsets/notification.js.map +1 -0
  440. package/dist/toolsets/platform.d.ts +4 -0
  441. package/dist/toolsets/platform.d.ts.map +1 -0
  442. package/dist/toolsets/platform.js +71 -0
  443. package/dist/toolsets/platform.js.map +1 -0
  444. package/dist/toolsets/runtimes.d.ts +4 -0
  445. package/dist/toolsets/runtimes.d.ts.map +1 -0
  446. package/dist/toolsets/runtimes.js +16 -0
  447. package/dist/toolsets/runtimes.js.map +1 -0
  448. package/dist/toolsets/secret-tools.d.ts +9 -0
  449. package/dist/toolsets/secret-tools.d.ts.map +1 -0
  450. package/dist/toolsets/secret-tools.js +9 -0
  451. package/dist/toolsets/secret-tools.js.map +1 -0
  452. package/dist/toolsets/treasury.d.ts +4 -0
  453. package/dist/toolsets/treasury.d.ts.map +1 -0
  454. package/dist/toolsets/treasury.js +14 -0
  455. package/dist/toolsets/treasury.js.map +1 -0
  456. package/dist/toolsets/types.d.ts +25 -0
  457. package/dist/toolsets/types.d.ts.map +1 -0
  458. package/dist/toolsets/types.js +2 -0
  459. package/dist/toolsets/types.js.map +1 -0
  460. package/dist/toolsets/vault.d.ts +4 -0
  461. package/dist/toolsets/vault.d.ts.map +1 -0
  462. package/dist/toolsets/vault.js +41 -0
  463. package/dist/toolsets/vault.js.map +1 -0
  464. package/dist/toolsets.d.ts +95 -0
  465. package/dist/toolsets.d.ts.map +1 -0
  466. package/dist/toolsets.js +217 -0
  467. package/dist/toolsets.js.map +1 -0
  468. package/package.json +4 -2
package/dist/client.js CHANGED
@@ -1,912 +1,6 @@
1
- import { DPoPManager } from "./auth/dpop.js";
2
- export class OneClawApiError extends Error {
3
- status;
4
- detail;
5
- constructor(status, detail) {
6
- super(detail);
7
- this.status = status;
8
- this.detail = detail;
9
- this.name = "OneClawApiError";
10
- }
11
- }
12
- function encodePath(path) {
13
- return path
14
- .split("/")
15
- .map((s) => encodeURIComponent(s))
16
- .join("/");
17
- }
18
1
  /**
19
- * Best-effort extraction of the agent UUID from a 1Claw agent JWT's `sub`
20
- * claim (`"agent:<uuid>"`). Used in static-token mode (legacy
21
- * `ONECLAW_AGENT_TOKEN`) so agent-scoped tools (transactions, signing,
22
- * bindings/execute) can resolve their agent id without a key exchange.
23
- * The signature is NOT verified here — the server validates every JWT; we
24
- * only read the claim to know which `/v1/agents/{id}` path to call. Returns
25
- * `undefined` for non-agent tokens (e.g. user JWTs) or unparseable input.
2
+ * Compatibility shim: the client now lives in ./client/ split by domain.
3
+ * Tools import from here so nothing outside the client tree had to move.
26
4
  */
27
- function decodeJwtPayload(token) {
28
- try {
29
- const parts = token.split(".");
30
- if (parts.length !== 3)
31
- return undefined;
32
- const payload = parts[1].replace(/-/g, "+").replace(/_/g, "/");
33
- const padded = payload.padEnd(payload.length + ((4 - (payload.length % 4)) % 4), "=");
34
- const json = Buffer.from(padded, "base64").toString("utf8");
35
- const parsed = JSON.parse(json);
36
- return typeof parsed === "object" && parsed !== null
37
- ? parsed
38
- : undefined;
39
- }
40
- catch {
41
- return undefined;
42
- }
43
- }
44
- function agentIdFromJwt(token) {
45
- const payload = decodeJwtPayload(token);
46
- const sub = payload?.sub;
47
- if (typeof sub === "string" && sub.startsWith("agent:")) {
48
- return sub.slice("agent:".length);
49
- }
50
- return undefined;
51
- }
52
- function runtimeIdFromJwt(token) {
53
- const payload = decodeJwtPayload(token);
54
- const runtimeId = payload?.runtime_id;
55
- return typeof runtimeId === "string" && runtimeId.length > 0
56
- ? runtimeId
57
- : undefined;
58
- }
59
- const REFRESH_BUFFER_MS = 60_000;
60
- export class OneClawClient {
61
- baseUrl;
62
- token;
63
- _vaultId;
64
- _resolvedAgentId;
65
- _runtimeId;
66
- agentCredentials;
67
- tokenExpiresAt = 0;
68
- dpopManager;
69
- dpopReady = null;
70
- constructor(config) {
71
- this.baseUrl = config.baseUrl.replace(/\/$/, "");
72
- this._vaultId = config.vaultId ?? "";
73
- if (process.env.ONECLAW_DPOP === "true") {
74
- this.dpopManager = new DPoPManager();
75
- }
76
- if ("apiKey" in config && !("token" in config)) {
77
- this.agentCredentials = {
78
- agentId: config.agentId,
79
- apiKey: config.apiKey,
80
- };
81
- this.token = "";
82
- this._runtimeId =
83
- config.runtimeId || process.env.ONECLAW_RUNTIME_ID || undefined;
84
- }
85
- else {
86
- this.token = config.token;
87
- // Static-token (legacy ONECLAW_AGENT_TOKEN) mode: resolve the agent
88
- // id from the JWT sub claim so agent-scoped tools work without a key
89
- // exchange.
90
- this._resolvedAgentId = agentIdFromJwt(this.token);
91
- this._runtimeId =
92
- config.runtimeId ||
93
- runtimeIdFromJwt(this.token) ||
94
- process.env.ONECLAW_RUNTIME_ID ||
95
- undefined;
96
- }
97
- }
98
- /**
99
- * Drops the in-memory JWT so the next request re-exchanges the API key.
100
- * Used after 401 (revoked) or 403 stale scopes; also safe to call after
101
- * dashboard policy changes if you need a fresh token immediately.
102
- */
103
- invalidateCachedAgentToken() {
104
- if (!this.agentCredentials)
105
- return;
106
- this.token = "";
107
- this.tokenExpiresAt = 0;
108
- }
109
- async ensureDPoP() {
110
- if (!this.dpopManager)
111
- return;
112
- if (!this.dpopReady) {
113
- this.dpopReady = this.dpopManager.init();
114
- }
115
- await this.dpopReady;
116
- }
117
- async ensureToken() {
118
- if (!this.agentCredentials)
119
- return;
120
- if (this.token && Date.now() < this.tokenExpiresAt - REFRESH_BUFFER_MS)
121
- return;
122
- await this.ensureDPoP();
123
- const body = {
124
- api_key: this.agentCredentials.apiKey,
125
- };
126
- if (this.agentCredentials.agentId) {
127
- body.agent_id = this.agentCredentials.agentId;
128
- }
129
- if (this.dpopManager) {
130
- body.dpop_jwk = this.dpopManager.getPublicJwk();
131
- }
132
- const tokenUrl = `${this.baseUrl}/v1/auth/agent-token`;
133
- const tokenHeaders = {
134
- "Content-Type": "application/json",
135
- };
136
- if (this.dpopManager) {
137
- tokenHeaders["DPoP"] = await this.dpopManager.generateProof("POST", tokenUrl);
138
- }
139
- const res = await fetch(tokenUrl, {
140
- method: "POST",
141
- headers: tokenHeaders,
142
- body: JSON.stringify(body),
143
- });
144
- if (!res.ok) {
145
- let detail = `HTTP ${res.status}`;
146
- try {
147
- const errBody = (await res.json());
148
- if (errBody.detail)
149
- detail = errBody.detail;
150
- }
151
- catch {
152
- /* use default */
153
- }
154
- throw new OneClawApiError(res.status, `Agent auth failed: ${detail}`);
155
- }
156
- const data = (await res.json());
157
- this.token = data.access_token;
158
- this.tokenExpiresAt = Date.now() + data.expires_in * 1000;
159
- if (data.agent_id) {
160
- this._resolvedAgentId = data.agent_id;
161
- if (this.agentCredentials && !this.agentCredentials.agentId) {
162
- this.agentCredentials.agentId = data.agent_id;
163
- }
164
- }
165
- if (!this._vaultId && data.vault_ids && data.vault_ids.length === 1) {
166
- this._vaultId = data.vault_ids[0];
167
- }
168
- }
169
- async autoDiscoverVault() {
170
- const vaults = await this.listVaults();
171
- if (!vaults.vaults || vaults.vaults.length === 0) {
172
- return;
173
- }
174
- const preferred = vaults.vaults.find((v) => v.name === "default");
175
- this._vaultId = preferred?.id ?? vaults.vaults[0].id;
176
- }
177
- async headers(method = "GET", url) {
178
- await this.ensureToken();
179
- const hdrs = {
180
- Authorization: `Bearer ${this.token}`,
181
- "Content-Type": "application/json",
182
- };
183
- const runtimeId = this._runtimeId || process.env.ONECLAW_RUNTIME_ID;
184
- if (runtimeId) {
185
- hdrs["X-1Claw-Runtime-Id"] = runtimeId;
186
- }
187
- if (this.dpopManager && url) {
188
- hdrs["DPoP"] = await this.dpopManager.generateProof(method, url);
189
- }
190
- return hdrs;
191
- }
192
- async resolveVaultUrl(suffix = "") {
193
- if (!this._vaultId) {
194
- await this.autoDiscoverVault();
195
- }
196
- if (!this._vaultId) {
197
- throw new OneClawApiError(400, "No vault configured. Set ONECLAW_VAULT_ID, bind the agent to a vault, or create a vault first.");
198
- }
199
- return `${this.baseUrl}/v1/vaults/${this._vaultId}${suffix}`;
200
- }
201
- /** True when a fresh JWT from /v1/auth/agent-token should fix the error (stale cache). */
202
- shouldReexchangeAgentToken(status, detail) {
203
- if (!this.agentCredentials)
204
- return false;
205
- if (status === 401)
206
- return true;
207
- if (status !== 403)
208
- return false;
209
- const d = detail.toLowerCase();
210
- return (d.includes("no scopes") ||
211
- d.includes("scopes do not cover") ||
212
- d.includes("token has been revoked"));
213
- }
214
- async request(url, init, isRetry = false) {
215
- const method = init?.method ?? "GET";
216
- const hdrs = await this.headers(method, url);
217
- const res = await fetch(url, {
218
- ...init,
219
- headers: { ...hdrs, ...init?.headers },
220
- });
221
- if (!res.ok) {
222
- let detail = `HTTP ${res.status}`;
223
- let errorType = "";
224
- try {
225
- const body = (await res.json());
226
- if (body.detail)
227
- detail = body.detail;
228
- if (body.type)
229
- errorType = body.type;
230
- }
231
- catch {
232
- // use default detail
233
- }
234
- if (res.status === 402) {
235
- throw new OneClawApiError(402, "Quota exhausted. Ask your human to upgrade the plan, add prepaid credits, or enable x402 micropayments at https://1claw.co/settings/billing");
236
- }
237
- if (res.status === 403 &&
238
- errorType === "resource_limit_exceeded") {
239
- throw new OneClawApiError(403, `Resource limit reached: ${detail}. Ask your human to upgrade the plan at https://1claw.co/settings/billing`);
240
- }
241
- if (!isRetry &&
242
- this.shouldReexchangeAgentToken(res.status, detail)) {
243
- this.invalidateCachedAgentToken();
244
- return this.request(url, init, true);
245
- }
246
- throw new OneClawApiError(res.status, detail);
247
- }
248
- if (res.status === 204)
249
- return undefined;
250
- return res.json();
251
- }
252
- async listSecrets() {
253
- return this.request(await this.resolveVaultUrl("/secrets"));
254
- }
255
- async getSecret(path, clientShare) {
256
- const extraHeaders = {};
257
- if (clientShare) {
258
- extraHeaders["x-client-share"] = clientShare;
259
- }
260
- return this.request(await this.resolveVaultUrl(`/secrets/${encodePath(path)}`), Object.keys(extraHeaders).length > 0 ? { headers: extraHeaders } : undefined);
261
- }
262
- async putSecret(path, body) {
263
- return this.request(await this.resolveVaultUrl(`/secrets/${encodePath(path)}`), { method: "PUT", body: JSON.stringify(body) });
264
- }
265
- async listVersions(path) {
266
- return this.request(await this.resolveVaultUrl(`/secret-versions/${encodePath(path)}`));
267
- }
268
- async rotateGenerate(path, opts) {
269
- return this.request(await this.resolveVaultUrl(`/secret-rotate/${encodePath(path)}`), { method: "POST", body: JSON.stringify(opts ?? {}) });
270
- }
271
- async deleteSecret(path) {
272
- await this.request(await this.resolveVaultUrl(`/secrets/${encodePath(path)}`), { method: "DELETE" });
273
- }
274
- async createVault(name, description) {
275
- return this.request(`${this.baseUrl}/v1/vaults`, {
276
- method: "POST",
277
- body: JSON.stringify({ name, description: description ?? "" }),
278
- });
279
- }
280
- async listVaults() {
281
- return this.request(`${this.baseUrl}/v1/vaults`);
282
- }
283
- async shareSecret(secretId, options) {
284
- return this.request(`${this.baseUrl}/v1/secrets/${secretId}/share`, { method: "POST", body: JSON.stringify(options) });
285
- }
286
- async createPolicy(vaultId, principalType, principalId, permissions, secretPathPattern = "**", txConditions) {
287
- const payload = {
288
- secret_path_pattern: secretPathPattern,
289
- principal_type: principalType,
290
- principal_id: principalId,
291
- permissions,
292
- };
293
- if (txConditions)
294
- payload.tx_conditions = txConditions;
295
- return this.request(`${this.baseUrl}/v1/vaults/${vaultId}/policies`, {
296
- method: "POST",
297
- body: JSON.stringify(payload),
298
- });
299
- }
300
- // ── Transaction Simulation & Submission ──────────────
301
- get agentId() {
302
- return this._resolvedAgentId ?? this.agentCredentials?.agentId;
303
- }
304
- get vaultId() {
305
- return this._vaultId;
306
- }
307
- async simulateTransaction(agentId, tx) {
308
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/transactions/simulate`, { method: "POST", body: JSON.stringify(tx) });
309
- }
310
- async simulateBundle(agentId, transactions) {
311
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/transactions/simulate-bundle`, { method: "POST", body: JSON.stringify({ transactions }) });
312
- }
313
- async submitTransaction(agentId, tx, idempotencyKey) {
314
- const key = idempotencyKey ?? crypto.randomUUID();
315
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/transactions`, {
316
- method: "POST",
317
- body: JSON.stringify(tx),
318
- headers: { "Idempotency-Key": key },
319
- });
320
- }
321
- async signTransaction(agentId, tx) {
322
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/transactions/sign`, { method: "POST", body: JSON.stringify(tx) });
323
- }
324
- async listTransactions(agentId, opts) {
325
- const qs = opts?.include_signed_tx ? "?include_signed_tx=true" : "";
326
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/transactions${qs}`);
327
- }
328
- async getTransaction(agentId, txId, opts) {
329
- const qs = opts?.include_signed_tx ? "?include_signed_tx=true" : "";
330
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/transactions/${txId}${qs}`);
331
- }
332
- // ── Signing Keys & Sign Intent ──────────────────────
333
- async provisionSigningKey(agentId, chain) {
334
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/signing-keys`, { method: "POST", body: JSON.stringify({ chain }) });
335
- }
336
- async listSigningKeys(agentId) {
337
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/signing-keys`);
338
- }
339
- async signIntent(agentId, body) {
340
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/sign`, { method: "POST", body: JSON.stringify(body) });
341
- }
342
- // ── Bankr Dynamic Key Vending ────────────────────────────
343
- async leaseBankrKey(agentId, opts) {
344
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/bankr-keys/lease`, { method: "POST", body: JSON.stringify(opts ?? {}) });
345
- }
346
- async listBankrKeys(agentId) {
347
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/bankr-keys`);
348
- }
349
- async revokeBankrKey(agentId, leaseId) {
350
- await this.request(`${this.baseUrl}/v1/agents/${agentId}/bankr-keys/${leaseId}`, { method: "DELETE" });
351
- }
352
- // ── Payment Cards ─────────────────────────────────────
353
- async orderCard(agentId, body, idempotencyKey) {
354
- const key = idempotencyKey ?? crypto.randomUUID();
355
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/cards/order`, {
356
- method: "POST",
357
- body: JSON.stringify(body),
358
- headers: { "Idempotency-Key": key },
359
- });
360
- }
361
- async listCards() {
362
- return this.request(`${this.baseUrl}/v1/cards`);
363
- }
364
- async getCard(cardId) {
365
- return this.request(`${this.baseUrl}/v1/cards/${cardId}`);
366
- }
367
- async searchGiftCards(body) {
368
- return this.request(`${this.baseUrl}/v1/cards/gift-cards/search`, { method: "POST", body: JSON.stringify(body) });
369
- }
370
- // ── Approvals ─────────────────────────────────────────
371
- async listApprovals(opts) {
372
- const params = new URLSearchParams();
373
- if (opts?.status)
374
- params.set("status", opts.status);
375
- if (opts?.limit != null)
376
- params.set("limit", String(opts.limit));
377
- const qs = params.toString() ? `?${params.toString()}` : "";
378
- return this.request(`${this.baseUrl}/v1/approvals${qs}`);
379
- }
380
- async getApproval(approvalId) {
381
- return this.request(`${this.baseUrl}/v1/approvals/${approvalId}`);
382
- }
383
- async getApprovalStatus(approvalId) {
384
- return this.request(`${this.baseUrl}/v1/approvals/${approvalId}/status`);
385
- }
386
- async requestApproval(data) {
387
- return this.request(`${this.baseUrl}/v1/approvals/request`, { method: "POST", body: JSON.stringify(data) });
388
- }
389
- // ── Platform API ──────────────────────────────────────
390
- async platformListApps() {
391
- return this.request(`${this.baseUrl}/v1/platform/apps`);
392
- }
393
- async platformCreateApp(data) {
394
- return this.request(`${this.baseUrl}/v1/platform/apps`, { method: "POST", body: JSON.stringify(data) });
395
- }
396
- async platformBootstrapUser(connectionId, data) {
397
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/bootstrap`, { method: "POST", body: JSON.stringify(data) });
398
- }
399
- async platformSiweChallenge(data) {
400
- return this.request(`${this.baseUrl}/v1/platform/siwe/challenge`, { method: "POST", body: JSON.stringify(data ?? {}) });
401
- }
402
- async platformGetConnection(connectionId) {
403
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}`);
404
- }
405
- async platformGetConnectionUsage(connectionId) {
406
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/usage`);
407
- }
408
- async platformListEntitlements(connectionId) {
409
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/entitlements`);
410
- }
411
- async platformRefreshEntitlements(connectionId) {
412
- await this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/entitlements/refresh`, { method: "POST" });
413
- }
414
- async platformPreviewTemplate(appId, templateId, data) {
415
- return this.request(`${this.baseUrl}/v1/platform/apps/${appId}/templates/${templateId}/preview`, { method: "POST", body: JSON.stringify(data) });
416
- }
417
- async platformTransferOwnership(appId, data, confirmToken) {
418
- const headers = {};
419
- if (confirmToken)
420
- headers["X-Auth-Confirm"] = confirmToken;
421
- return this.request(`${this.baseUrl}/v1/platform/apps/${appId}/transfer-ownership`, { method: "POST", body: JSON.stringify(data), headers });
422
- }
423
- async platformDeleteApp(appId) {
424
- return this.request(`${this.baseUrl}/v1/platform/apps/${appId}`, { method: "DELETE" });
425
- }
426
- async platformGetSpendPolicy(appId, policyId) {
427
- return this.request(`${this.baseUrl}/v1/platform/apps/${appId}/spend-policies/${policyId}`);
428
- }
429
- async platformGetConnectionSpendPolicy(connectionId) {
430
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/spend-policy`);
431
- }
432
- async platformListConnectionApprovals(connectionId, params) {
433
- const qs = new URLSearchParams();
434
- if (params?.status)
435
- qs.set("status", params.status);
436
- if (params?.limit != null)
437
- qs.set("limit", String(params.limit));
438
- if (params?.offset != null)
439
- qs.set("offset", String(params.offset));
440
- const suffix = qs.toString() ? `?${qs}` : "";
441
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/approvals${suffix}`);
442
- }
443
- async platformGetConnectionApproval(connectionId, approvalId) {
444
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/approvals/${approvalId}`);
445
- }
446
- async platformListConnectionPendingApprovals(connectionId, params) {
447
- const qs = new URLSearchParams();
448
- if (params?.status)
449
- qs.set("status", params.status);
450
- if (params?.limit != null)
451
- qs.set("limit", String(params.limit));
452
- if (params?.offset != null)
453
- qs.set("offset", String(params.offset));
454
- const suffix = qs.toString() ? `?${qs}` : "";
455
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/pending-approvals${suffix}`);
456
- }
457
- async platformSetConnectionSpendPolicy(connectionId, data, idempotencyKey) {
458
- const headers = {};
459
- if (idempotencyKey)
460
- headers["Idempotency-Key"] = idempotencyKey;
461
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/spend-policy`, { method: "PUT", body: JSON.stringify(data), headers });
462
- }
463
- async platformRotateKey(appId, data) {
464
- return this.request(`${this.baseUrl}/v1/platform/apps/${appId}/rotate-key`, { method: "POST", body: JSON.stringify(data ?? {}) });
465
- }
466
- async platformReissueClaim(connectionId, data) {
467
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/reissue-claim`, { method: "POST", body: JSON.stringify(data ?? {}) });
468
- }
469
- async platformListTemplates(appId) {
470
- return this.request(`${this.baseUrl}/v1/platform/apps/${appId}/templates`);
471
- }
472
- async platformGetTemplate(appId, templateId) {
473
- return this.request(`${this.baseUrl}/v1/platform/apps/${appId}/templates/${templateId}`);
474
- }
475
- // ── Directory job board (Feature 10) ──────────────────────────────
476
- async listDirectoryJobs(params = {}) {
477
- const qs = new URLSearchParams();
478
- if (params.tags)
479
- qs.set("tags", params.tags);
480
- if (params.q)
481
- qs.set("q", params.q);
482
- if (params.limit !== undefined)
483
- qs.set("limit", String(params.limit));
484
- const s = qs.toString();
485
- return this.request(`${this.baseUrl}/v1/directory/jobs${s ? `?${s}` : ""}`);
486
- }
487
- async getDirectoryJob(jobId) {
488
- return this.request(`${this.baseUrl}/v1/directory/jobs/${jobId}`);
489
- }
490
- async submitDirectoryJobBid(jobId, data) {
491
- return this.request(`${this.baseUrl}/v1/directory/jobs/${jobId}/bids`, { method: "POST", body: JSON.stringify(data) });
492
- }
493
- // ── Fleets ────────────────────────────────────────────────────────
494
- async platformGetFleet(appId, templateId) {
495
- return this.request(`${this.baseUrl}/v1/platform/apps/${appId}/fleets/${templateId}`);
496
- }
497
- async platformListFleetAgents(appId, templateId, limit, offset) {
498
- const q = new URLSearchParams();
499
- if (limit !== undefined)
500
- q.set("limit", String(limit));
501
- if (offset !== undefined)
502
- q.set("offset", String(offset));
503
- const qs = q.toString();
504
- return this.request(`${this.baseUrl}/v1/platform/apps/${appId}/fleets/${templateId}/agents${qs ? `?${qs}` : ""}`);
505
- }
506
- async platformRolloutFleet(appId, templateId, data) {
507
- return this.request(`${this.baseUrl}/v1/platform/apps/${appId}/fleets/${templateId}/rollout`, { method: "POST", body: JSON.stringify(data) });
508
- }
509
- async platformCreateConnectionRuntime(connectionId, data) {
510
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/runtimes`, { method: "POST", body: JSON.stringify(data) });
511
- }
512
- async platformGetConnectionRuntime(connectionId, runtimeId) {
513
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/runtimes/${runtimeId}`);
514
- }
515
- async platformConnectionPasskeyEnrollBegin(connectionId) {
516
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/passkeys/enroll/begin`, { method: "POST", body: JSON.stringify({}) });
517
- }
518
- async platformConnectionPasskeyEnrollComplete(connectionId, data) {
519
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/passkeys/enroll/complete`, { method: "POST", body: JSON.stringify(data) });
520
- }
521
- async platformConnectionAgentChat(connectionId, agentId, data) {
522
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/agents/${agentId}/chat`, { method: "POST", body: JSON.stringify(data) });
523
- }
524
- async platformGetConnectionPendingApproval(connectionId, approvalId) {
525
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/pending-approvals/${approvalId}`);
526
- }
527
- async platformDecideConnectionPendingApproval(connectionId, approvalId, data) {
528
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/pending-approvals/${approvalId}/decide`, { method: "POST", body: JSON.stringify(data) });
529
- }
530
- async platformCreateConnectionPendingApproval(connectionId, data) {
531
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/pending-approvals`, { method: "POST", body: JSON.stringify(data) });
532
- }
533
- async platformGetConnectionPortfolio(connectionId, query) {
534
- const qs = query
535
- ? "?" + new URLSearchParams(query).toString()
536
- : "";
537
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/portfolio${qs}`);
538
- }
539
- async platformListConnectionAutomations(connectionId) {
540
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/automations`);
541
- }
542
- async inspectContent(data) {
543
- return this.request(`${this.baseUrl}/v1/shroud/inspect-content`, { method: "POST", body: JSON.stringify(data) });
544
- }
545
- async platformDecideConnectionApproval(connectionId, approvalId, data) {
546
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/approvals/${approvalId}/decide`, { method: "POST", body: JSON.stringify(data) });
547
- }
548
- async platformDeactivateConnectionSigningKey(connectionId, chain, agentId) {
549
- const qs = agentId ? `?agent_id=${encodeURIComponent(agentId)}` : "";
550
- await this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/signing-keys/${encodeURIComponent(chain)}${qs}`, { method: "DELETE" });
551
- }
552
- async platformListConnectionSigningKeys(connectionId, agentId) {
553
- const qs = agentId ? `?agent_id=${encodeURIComponent(agentId)}` : "";
554
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/signing-keys${qs}`);
555
- }
556
- async platformGetConnectionSigningKey(connectionId, chain, agentId) {
557
- const qs = agentId ? `?agent_id=${encodeURIComponent(agentId)}` : "";
558
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/signing-keys/${encodeURIComponent(chain)}${qs}`);
559
- }
560
- async platformPatchConnectionAgent(connectionId, agentId, data) {
561
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/agents/${agentId}`, { method: "PATCH", body: JSON.stringify(data) });
562
- }
563
- async platformCreateTemplate(appId, data) {
564
- return this.request(`${this.baseUrl}/v1/platform/apps/${appId}/templates`, { method: "POST", body: JSON.stringify(data) });
565
- }
566
- async platformListUsers(appId) {
567
- return this.request(`${this.baseUrl}/v1/platform/apps/${appId}/users`);
568
- }
569
- async platformGrantAccess(connectionId, data) {
570
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/grant`, { method: "POST", body: JSON.stringify(data) });
571
- }
572
- async platformListGrants(connectionId) {
573
- return this.request(`${this.baseUrl}/v1/platform/connections/${connectionId}/grants`);
574
- }
575
- // ── Treasury Proposals ──────────────────────────────────────────
576
- async treasuryPropose(treasuryId, data) {
577
- return this.request(`${this.baseUrl}/v1/treasury/${treasuryId}/proposals`, { method: "POST", body: JSON.stringify(data) });
578
- }
579
- async treasurySignProposal(treasuryId, proposalId, data) {
580
- return this.request(`${this.baseUrl}/v1/treasury/${treasuryId}/proposals/${proposalId}/sign`, { method: "POST", body: JSON.stringify(data) });
581
- }
582
- async treasuryListProposals(treasuryId, status) {
583
- const qs = status ? `?status=${status}` : "";
584
- return this.request(`${this.baseUrl}/v1/treasury/${treasuryId}/proposals${qs}`);
585
- }
586
- // ── Execution Intents ─────────────────────────────────────────
587
- async executeIntent(agentId, body) {
588
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/execute`, { method: "POST", body: JSON.stringify(body) });
589
- }
590
- async listBindings(agentId) {
591
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/bindings`);
592
- }
593
- async createBinding(agentId, body) {
594
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/bindings`, { method: "POST", body: JSON.stringify(body) });
595
- }
596
- async testBinding(agentId, bindingId, timeoutMs) {
597
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/bindings/${bindingId}/test`, {
598
- method: "POST",
599
- body: JSON.stringify(timeoutMs ? { timeout_ms: timeoutMs } : {}),
600
- });
601
- }
602
- async listExecutions(agentId, limit, offset) {
603
- const qs = new URLSearchParams();
604
- if (limit)
605
- qs.set("limit", String(limit));
606
- if (offset)
607
- qs.set("offset", String(offset));
608
- const query = qs.toString();
609
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/executions${query ? `?${query}` : ""}`);
610
- }
611
- // ── Agent Memory ──────────────────────────────────────────────────
612
- async putMemory(agentId, namespace, key, body) {
613
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/memory/${encodeURIComponent(namespace)}/${encodeURIComponent(key)}`, { method: "PUT", body: JSON.stringify(body) });
614
- }
615
- async getMemory(agentId, namespace, key) {
616
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/memory/${encodeURIComponent(namespace)}/${encodeURIComponent(key)}`);
617
- }
618
- async listMemory(agentId, namespace) {
619
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/memory/${encodeURIComponent(namespace)}`);
620
- }
621
- async deleteMemory(agentId, namespace, key) {
622
- await this.request(`${this.baseUrl}/v1/agents/${agentId}/memory/${encodeURIComponent(namespace)}/${encodeURIComponent(key)}`, { method: "DELETE" });
623
- }
624
- async searchMemory(agentId, body) {
625
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/memory/search`, { method: "POST", body: JSON.stringify(body) });
626
- }
627
- async listMemoryNamespaces(agentId) {
628
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/memory`);
629
- }
630
- // ── Automations ─────────────────────────────────────────────────
631
- async listAutomations() {
632
- return this.request(`${this.baseUrl}/v1/automations`);
633
- }
634
- async listAutomationPresets() {
635
- return this.request(`${this.baseUrl}/v1/automations/presets`);
636
- }
637
- async triggerAutomation(automationId, input) {
638
- return this.request(`${this.baseUrl}/v1/automations/${automationId}/trigger`, { method: "POST", body: JSON.stringify(input ?? {}) });
639
- }
640
- async createAgentAutomation(agentId, body) {
641
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/automations`, { method: "POST", body: JSON.stringify(body) });
642
- }
643
- async cancelAutomationRun(automationId, runId) {
644
- return this.request(`${this.baseUrl}/v1/automations/${automationId}/runs/${runId}/cancel`, { method: "POST" });
645
- }
646
- // ── Runtimes ────────────────────────────────────────────────────
647
- async listRuntimes() {
648
- return this.request(`${this.baseUrl}/v1/runtimes`);
649
- }
650
- async manageRuntime(runtimeId, action) {
651
- return this.request(`${this.baseUrl}/v1/runtimes/${runtimeId}/${action}`, { method: "POST" });
652
- }
653
- async getRuntimesForAgent(agentId) {
654
- return this.request(`${this.baseUrl}/v1/runtimes?agent_id=${encodeURIComponent(agentId)}`);
655
- }
656
- async getRuntimeLogs(runtimeId, tail) {
657
- const qs = tail ? `?tail=${tail}` : "";
658
- return this.request(`${this.baseUrl}/v1/runtimes/${runtimeId}/logs${qs}`);
659
- }
660
- // ── Signing Key Balance ──────────────────────────────────────────
661
- async getSigningKeyBalance(agentId, chain, tokens) {
662
- const params = tokens ? `?tokens=${encodeURIComponent(tokens)}` : "";
663
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/signing-keys/${encodeURIComponent(chain)}/balance${params}`);
664
- }
665
- // ── Chat ─────────────────────────────────────────────────────────
666
- async sendChatMessage(agentId, data) {
667
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/chat`, {
668
- method: "POST",
669
- body: JSON.stringify(data),
670
- });
671
- }
672
- async listChatConversations(agentId) {
673
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/chat/conversations`);
674
- }
675
- // ── Channels ─────────────────────────────────────────────────────
676
- async createChannel(agentId, data) {
677
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/channels`, {
678
- method: "POST",
679
- body: JSON.stringify(data),
680
- });
681
- }
682
- async listChannels(agentId) {
683
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/channels`);
684
- }
685
- async sendChannelMessage(agentId, channelId, data) {
686
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/channels/${channelId}/send`, {
687
- method: "POST",
688
- body: JSON.stringify(data),
689
- });
690
- }
691
- // ── OAuth Connect ───────────────────────────────────────────────────
692
- async getAgentPeerContext(agentId, budget) {
693
- const qs = budget ? `?budget=${budget}` : "";
694
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/peer-context${qs}`);
695
- }
696
- async listNotificationTargets() {
697
- return this.request(`${this.baseUrl}/v1/notification-targets`);
698
- }
699
- async listConnectorPresets() {
700
- return this.request(`${this.baseUrl}/v1/connectors/presets`);
701
- }
702
- async listInstalledConnectors(agentId) {
703
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/connectors`);
704
- }
705
- async listOAuthProviders() {
706
- return this.request(`${this.baseUrl}/v1/oauth/providers`);
707
- }
708
- async listOAuthConnections(agentId) {
709
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/oauth/connections`);
710
- }
711
- // ── Platform Marketplace & Stats ────────────────────────────────────
712
- async platformMarketplace(params) {
713
- const searchParams = new URLSearchParams();
714
- if (params?.category)
715
- searchParams.set("category", params.category);
716
- if (params?.tags)
717
- searchParams.set("tags", params.tags);
718
- if (params?.q)
719
- searchParams.set("q", params.q);
720
- if (params?.page)
721
- searchParams.set("page", String(params.page));
722
- if (params?.page_size)
723
- searchParams.set("page_size", String(params.page_size));
724
- const qs = searchParams.toString();
725
- return this.request(`${this.baseUrl}/v1/platform/marketplace${qs ? `?${qs}` : ""}`);
726
- }
727
- async platformAppStats(appId) {
728
- return this.request(`${this.baseUrl}/v1/platform/apps/${appId}/stats`);
729
- }
730
- async platformRotateWebhookSecret(appId) {
731
- return this.request(`${this.baseUrl}/v1/platform/apps/${appId}/rotate-webhook-secret`, { method: "POST" });
732
- }
733
- // ── OAuth Token/Consent Revocation ───────────────────────────────────
734
- async oauthRevokeToken(body) {
735
- await this.request(`${this.baseUrl}/v1/oauth/revoke`, { method: "POST", body: JSON.stringify(body) });
736
- }
737
- async oauthRevokeConsent(appId) {
738
- await this.request(`${this.baseUrl}/v1/oauth/consents/${appId}`, { method: "DELETE" });
739
- }
740
- // ── Org Directory ───────────────────────────────────────────────────
741
- async orgDirectory(params) {
742
- const searchParams = new URLSearchParams();
743
- if (params?.q)
744
- searchParams.set("q", params.q);
745
- if (params?.tags)
746
- searchParams.set("tags", params.tags);
747
- if (params?.page)
748
- searchParams.set("page", String(params.page));
749
- if (params?.page_size)
750
- searchParams.set("page_size", String(params.page_size));
751
- const qs = searchParams.toString();
752
- return this.request(`${this.baseUrl}/v1/agents/org-directory${qs ? `?${qs}` : ""}`);
753
- }
754
- // ── Agent Delegations ────────────────────────────────────────────────
755
- async listDelegations(agentId) {
756
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/delegations`);
757
- }
758
- async createDelegation(agentId, data) {
759
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/delegations`, {
760
- method: "POST",
761
- body: JSON.stringify(data),
762
- });
763
- }
764
- async getEffectiveDelegations(agentId) {
765
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/delegations/effective`);
766
- }
767
- // ── Environment Variables ─────────────────────────────────────────────
768
- async resolveEnvVars(environment, gitBranch) {
769
- let url = await this.resolveVaultUrl(`/env-vars/resolve`);
770
- const params = [];
771
- if (environment) {
772
- params.push(`environment=${encodeURIComponent(environment)}`);
773
- }
774
- if (gitBranch) {
775
- params.push(`git_branch=${encodeURIComponent(gitBranch)}`);
776
- }
777
- if (params.length > 0) {
778
- url += `?${params.join("&")}`;
779
- }
780
- return this.request(url);
781
- }
782
- // ── Import Signing Key ──────────────────────────────────────────────
783
- async importSigningKey(agentId, chain, privateKey, format, password) {
784
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/signing-keys/${encodeURIComponent(chain)}/import`, {
785
- method: "POST",
786
- body: JSON.stringify({ private_key: privateKey, format }),
787
- headers: { "X-Auth-Confirm": password },
788
- });
789
- }
790
- // ── Cedar Policies ──────────────────────────────────────────────────
791
- async listCedarPolicies() {
792
- return this.request(`${this.baseUrl}/v1/org/cedar-policies`);
793
- }
794
- async testCedarPolicy(principal, action, resource, context) {
795
- return this.request(`${this.baseUrl}/v1/org/cedar-policies/test`, { method: "POST", body: JSON.stringify({ principal, action, resource, context }) });
796
- }
797
- // ── OPA Policies ────────────────────────────────────────────────────
798
- async listOpaPolicies() {
799
- return this.request(`${this.baseUrl}/v1/org/opa-policies`);
800
- }
801
- async testOpaPolicy(input, data) {
802
- return this.request(`${this.baseUrl}/v1/org/opa-policies/test`, { method: "POST", body: JSON.stringify({ input, data }) });
803
- }
804
- // ── Sub-Organizations ───────────────────────────────────────────────
805
- async listSubOrgs() {
806
- return this.request(`${this.baseUrl}/v1/org/sub-orgs`);
807
- }
808
- async createSubOrg(name, description, billingModel) {
809
- const body = { name };
810
- if (description)
811
- body.description = description;
812
- if (billingModel)
813
- body.billing_model = billingModel;
814
- return this.request(`${this.baseUrl}/v1/org/sub-orgs`, { method: "POST", body: JSON.stringify(body) });
815
- }
816
- // ── Portfolio ────────────────────────────────────────────────────────
817
- async getPortfolio(chains, includeTokens) {
818
- const params = new URLSearchParams();
819
- if (chains)
820
- params.set("chains", chains);
821
- if (includeTokens)
822
- params.set("include_tokens", "true");
823
- const qs = params.toString();
824
- return this.request(`${this.baseUrl}/v1/portfolio${qs ? `?${qs}` : ""}`);
825
- }
826
- // ── Import Smart Account ────────────────────────────────────────────
827
- async importSmartAccount(agentId, chain, chainId, safeAddress, verify) {
828
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/smart-accounts/import`, {
829
- method: "POST",
830
- body: JSON.stringify({
831
- chain,
832
- chain_id: chainId,
833
- safe_address: safeAddress,
834
- verify: verify ?? true,
835
- }),
836
- });
837
- }
838
- // ── Policy Backend Settings ──────────────────────────────────────────
839
- async getPolicyBackendSettings() {
840
- return this.request(`${this.baseUrl}/v1/org/settings/policy-backend`);
841
- }
842
- async updatePolicyBackendSettings(body) {
843
- return this.request(`${this.baseUrl}/v1/org/settings/policy-backend`, { method: "PATCH", body: JSON.stringify(body) });
844
- }
845
- async getShadowReport() {
846
- return this.request(`${this.baseUrl}/v1/org/policy-shadow-report`);
847
- }
848
- async getGuardrailShadowReport(params) {
849
- const query = new URLSearchParams();
850
- if (params?.since)
851
- query.set("since", params.since);
852
- if (params?.until)
853
- query.set("until", params.until);
854
- const qs = query.toString();
855
- return this.request(`${this.baseUrl}/v1/org/guardrail-shadow-report${qs ? `?${qs}` : ""}`);
856
- }
857
- async listGuardrailRevisions() {
858
- return this.request(`${this.baseUrl}/v1/org/guardrail-revisions`);
859
- }
860
- async replayAgentGuardrails(agentId, body) {
861
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/guardrails/replay`, {
862
- method: "POST",
863
- body: JSON.stringify(body ?? {}),
864
- });
865
- }
866
- // ── Contract ABI Registry ────────────────────────────────────────────
867
- async uploadContractAbi(body) {
868
- return this.request(`${this.baseUrl}/v1/org/contract-abis`, { method: "POST", body: JSON.stringify(body) });
869
- }
870
- async listContractAbis(chain) {
871
- const qs = chain ? `?chain=${encodeURIComponent(chain)}` : "";
872
- return this.request(`${this.baseUrl}/v1/org/contract-abis${qs}`);
873
- }
874
- // ── Pending Approvals (Consensus) ────────────────────────────────────
875
- async listPendingApprovals(params) {
876
- const qs = new URLSearchParams();
877
- if (params?.status)
878
- qs.set("status", params.status);
879
- if (params?.agent_id)
880
- qs.set("agent_id", params.agent_id);
881
- const q = qs.toString();
882
- return this.request(`${this.baseUrl}/v1/pending-approvals${q ? `?${q}` : ""}`);
883
- }
884
- async approvePendingApproval(id, body) {
885
- return this.request(`${this.baseUrl}/v1/pending-approvals/${id}/approve`, { method: "POST", body: JSON.stringify(body) });
886
- }
887
- async executePendingApproval(id) {
888
- return this.request(`${this.baseUrl}/v1/pending-approvals/${id}/execute`, { method: "POST" });
889
- }
890
- // ── Agent Safe accounts (Phase 5) ────────────────────────────────────
891
- async listAgentAccounts(agentId) {
892
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/accounts`);
893
- }
894
- async migrateAgentToSafe(agentId, body) {
895
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/accounts/migrate`, {
896
- method: "POST",
897
- body: JSON.stringify(body),
898
- });
899
- }
900
- async deprecateAgentEoa(agentId, chain) {
901
- return this.request(`${this.baseUrl}/v1/agents/${agentId}/accounts/${encodeURIComponent(chain)}/deprecate-eoa`, { method: "POST" });
902
- }
903
- async getSafeModuleRegistry(chain) {
904
- return this.request(`${this.baseUrl}/v1/safe/module-registry/${encodeURIComponent(chain)}`);
905
- }
906
- async syncOrgSafeAllowances() {
907
- return this.request(`${this.baseUrl}/v1/org/safe/sync-allowances`, {
908
- method: "POST",
909
- });
910
- }
911
- }
5
+ export * from "./client/index.js";
912
6
  //# sourceMappingURL=client.js.map