@tai42/api-client 19.3.0 → 21.0.0

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 (401) hide show
  1. package/README.md +29 -0
  2. package/dist/agents.d.ts.map +1 -1
  3. package/dist/agents.js +6 -4
  4. package/dist/agents.js.map +1 -1
  5. package/dist/client/agents-client.d.ts.map +1 -1
  6. package/dist/client/agents-client.js +3 -2
  7. package/dist/client/agents-client.js.map +1 -1
  8. package/dist/client/auth-client.d.ts +143 -90
  9. package/dist/client/auth-client.d.ts.map +1 -1
  10. package/dist/client/auth-client.js +81 -25
  11. package/dist/client/auth-client.js.map +1 -1
  12. package/dist/client/backend-client.d.ts +14 -13
  13. package/dist/client/backend-client.d.ts.map +1 -1
  14. package/dist/client/backend-client.js +7 -3
  15. package/dist/client/backend-client.js.map +1 -1
  16. package/dist/client/backup-client.d.ts +45 -19
  17. package/dist/client/backup-client.d.ts.map +1 -1
  18. package/dist/client/backup-client.js +8 -3
  19. package/dist/client/backup-client.js.map +1 -1
  20. package/dist/client/capabilities-client.d.ts +20 -16
  21. package/dist/client/capabilities-client.d.ts.map +1 -1
  22. package/dist/client/capabilities-client.js +3 -2
  23. package/dist/client/capabilities-client.js.map +1 -1
  24. package/dist/client/channels-client.d.ts.map +1 -1
  25. package/dist/client/channels-client.js +2 -1
  26. package/dist/client/channels-client.js.map +1 -1
  27. package/dist/client/config-client.d.ts +44 -17
  28. package/dist/client/config-client.d.ts.map +1 -1
  29. package/dist/client/config-client.js +10 -4
  30. package/dist/client/config-client.js.map +1 -1
  31. package/dist/client/connectors-client.d.ts +270 -81
  32. package/dist/client/connectors-client.d.ts.map +1 -1
  33. package/dist/client/connectors-client.js +38 -10
  34. package/dist/client/connectors-client.js.map +1 -1
  35. package/dist/client/conversations-client.d.ts +440 -86
  36. package/dist/client/conversations-client.d.ts.map +1 -1
  37. package/dist/client/conversations-client.js +46 -17
  38. package/dist/client/conversations-client.js.map +1 -1
  39. package/dist/client/hooks-client.d.ts +3 -3
  40. package/dist/client/hooks-client.d.ts.map +1 -1
  41. package/dist/client/hooks-client.js +12 -7
  42. package/dist/client/hooks-client.js.map +1 -1
  43. package/dist/client/index.d.ts +2252 -864
  44. package/dist/client/index.d.ts.map +1 -1
  45. package/dist/client/index.js +10 -2
  46. package/dist/client/index.js.map +1 -1
  47. package/dist/client/interactions-client.d.ts +19 -14
  48. package/dist/client/interactions-client.d.ts.map +1 -1
  49. package/dist/client/interactions-client.js +21 -9
  50. package/dist/client/interactions-client.js.map +1 -1
  51. package/dist/client/login-client.d.ts +18 -17
  52. package/dist/client/login-client.d.ts.map +1 -1
  53. package/dist/client/login-client.js +8 -4
  54. package/dist/client/login-client.js.map +1 -1
  55. package/dist/client/manifest-client.d.ts +276 -105
  56. package/dist/client/manifest-client.d.ts.map +1 -1
  57. package/dist/client/manifest-client.js +22 -16
  58. package/dist/client/manifest-client.js.map +1 -1
  59. package/dist/client/marketplace-client.d.ts +181 -51
  60. package/dist/client/marketplace-client.d.ts.map +1 -1
  61. package/dist/client/marketplace-client.js +23 -12
  62. package/dist/client/marketplace-client.js.map +1 -1
  63. package/dist/client/mcp-config-schema-client.d.ts.map +1 -1
  64. package/dist/client/mcp-config-schema-client.js +2 -1
  65. package/dist/client/mcp-config-schema-client.js.map +1 -1
  66. package/dist/client/notifications-client.d.ts +44 -14
  67. package/dist/client/notifications-client.d.ts.map +1 -1
  68. package/dist/client/notifications-client.js +2 -1
  69. package/dist/client/notifications-client.js.map +1 -1
  70. package/dist/client/observability-client.d.ts +78 -38
  71. package/dist/client/observability-client.d.ts.map +1 -1
  72. package/dist/client/observability-client.js +29 -6
  73. package/dist/client/observability-client.js.map +1 -1
  74. package/dist/client/plugins-client.d.ts +8 -6
  75. package/dist/client/plugins-client.d.ts.map +1 -1
  76. package/dist/client/plugins-client.js +2 -1
  77. package/dist/client/plugins-client.js.map +1 -1
  78. package/dist/client/policy-client.d.ts +4 -4
  79. package/dist/client/policy-client.d.ts.map +1 -1
  80. package/dist/client/policy-client.js +11 -4
  81. package/dist/client/policy-client.js.map +1 -1
  82. package/dist/client/presets-client.d.ts +84 -39
  83. package/dist/client/presets-client.d.ts.map +1 -1
  84. package/dist/client/presets-client.js +25 -13
  85. package/dist/client/presets-client.js.map +1 -1
  86. package/dist/client/profiles-client.d.ts +40 -33
  87. package/dist/client/profiles-client.d.ts.map +1 -1
  88. package/dist/client/profiles-client.js +15 -10
  89. package/dist/client/profiles-client.js.map +1 -1
  90. package/dist/client/schedules-client.d.ts +21 -17
  91. package/dist/client/schedules-client.d.ts.map +1 -1
  92. package/dist/client/schedules-client.js +8 -5
  93. package/dist/client/schedules-client.js.map +1 -1
  94. package/dist/client/settings-schema-client.d.ts +1 -1
  95. package/dist/client/settings-schema-client.d.ts.map +1 -1
  96. package/dist/client/settings-schema-client.js +2 -1
  97. package/dist/client/settings-schema-client.js.map +1 -1
  98. package/dist/client/states-client.d.ts +215 -87
  99. package/dist/client/states-client.d.ts.map +1 -1
  100. package/dist/client/states-client.js +98 -37
  101. package/dist/client/states-client.js.map +1 -1
  102. package/dist/client/storage-client.d.ts +5 -5
  103. package/dist/client/storage-client.d.ts.map +1 -1
  104. package/dist/client/storage-client.js +24 -12
  105. package/dist/client/storage-client.js.map +1 -1
  106. package/dist/client/sub-mcp-client.d.ts +3 -1
  107. package/dist/client/sub-mcp-client.d.ts.map +1 -1
  108. package/dist/client/sub-mcp-client.js +9 -4
  109. package/dist/client/sub-mcp-client.js.map +1 -1
  110. package/dist/client/system-client.d.ts +2 -2
  111. package/dist/client/system-client.d.ts.map +1 -1
  112. package/dist/client/system-client.js +2 -1
  113. package/dist/client/system-client.js.map +1 -1
  114. package/dist/client/templates-client.d.ts +65 -6
  115. package/dist/client/templates-client.d.ts.map +1 -1
  116. package/dist/client/templates-client.js +25 -7
  117. package/dist/client/templates-client.js.map +1 -1
  118. package/dist/client/tool-extensions-client.d.ts +41 -16
  119. package/dist/client/tool-extensions-client.d.ts.map +1 -1
  120. package/dist/client/tool-extensions-client.js +6 -4
  121. package/dist/client/tool-extensions-client.js.map +1 -1
  122. package/dist/client/tool-meta-client.d.ts +8 -8
  123. package/dist/client/tool-meta-client.d.ts.map +1 -1
  124. package/dist/client/tool-meta-client.js +12 -8
  125. package/dist/client/tool-meta-client.js.map +1 -1
  126. package/dist/client/tools-client.d.ts +150 -23
  127. package/dist/client/tools-client.d.ts.map +1 -1
  128. package/dist/client/tools-client.js +8 -8
  129. package/dist/client/tools-client.js.map +1 -1
  130. package/dist/client/trigger-links-client.d.ts +11 -9
  131. package/dist/client/trigger-links-client.d.ts.map +1 -1
  132. package/dist/client/trigger-links-client.js +4 -4
  133. package/dist/client/trigger-links-client.js.map +1 -1
  134. package/dist/fleet-report.d.ts +21 -5
  135. package/dist/fleet-report.d.ts.map +1 -1
  136. package/dist/fleet-report.js +31 -6
  137. package/dist/fleet-report.js.map +1 -1
  138. package/dist/generated/api-routes.d.ts +1014 -0
  139. package/dist/generated/api-routes.d.ts.map +1 -0
  140. package/dist/generated/api-routes.js +322 -0
  141. package/dist/generated/api-routes.js.map +1 -0
  142. package/dist/generated/openapi-schemas.d.ts +12425 -0
  143. package/dist/generated/openapi-schemas.d.ts.map +1 -0
  144. package/dist/generated/openapi-schemas.js +671 -0
  145. package/dist/generated/openapi-schemas.js.map +1 -0
  146. package/dist/generated/served-schemas.d.ts +6697 -392
  147. package/dist/generated/served-schemas.d.ts.map +1 -1
  148. package/dist/generated/served-schemas.js +7061 -46
  149. package/dist/generated/served-schemas.js.map +1 -1
  150. package/dist/headers.d.ts +4 -0
  151. package/dist/headers.d.ts.map +1 -0
  152. package/dist/headers.js +4 -0
  153. package/dist/headers.js.map +1 -0
  154. package/dist/http.d.ts.map +1 -1
  155. package/dist/http.js +4 -3
  156. package/dist/http.js.map +1 -1
  157. package/dist/index.d.ts +7 -3
  158. package/dist/index.d.ts.map +1 -1
  159. package/dist/index.js +3 -0
  160. package/dist/index.js.map +1 -1
  161. package/dist/schemas/api-keys.d.ts +14 -12
  162. package/dist/schemas/api-keys.d.ts.map +1 -1
  163. package/dist/schemas/api-keys.js +9 -23
  164. package/dist/schemas/api-keys.js.map +1 -1
  165. package/dist/schemas/auth-routes.d.ts +34 -29
  166. package/dist/schemas/auth-routes.d.ts.map +1 -1
  167. package/dist/schemas/auth-routes.js +22 -27
  168. package/dist/schemas/auth-routes.js.map +1 -1
  169. package/dist/schemas/backup.d.ts +157 -36
  170. package/dist/schemas/backup.d.ts.map +1 -1
  171. package/dist/schemas/backup.js +27 -26
  172. package/dist/schemas/backup.js.map +1 -1
  173. package/dist/schemas/capabilities.d.ts +32 -22
  174. package/dist/schemas/capabilities.d.ts.map +1 -1
  175. package/dist/schemas/capabilities.js +15 -40
  176. package/dist/schemas/capabilities.js.map +1 -1
  177. package/dist/schemas/channels.d.ts +1 -1
  178. package/dist/schemas/channels.d.ts.map +1 -1
  179. package/dist/schemas/channels.js +2 -5
  180. package/dist/schemas/channels.js.map +1 -1
  181. package/dist/schemas/config.d.ts.map +1 -1
  182. package/dist/schemas/config.js +4 -6
  183. package/dist/schemas/config.js.map +1 -1
  184. package/dist/schemas/connectors.d.ts +381 -185
  185. package/dist/schemas/connectors.d.ts.map +1 -1
  186. package/dist/schemas/connectors.js +54 -101
  187. package/dist/schemas/connectors.js.map +1 -1
  188. package/dist/schemas/conversations.d.ts +970 -241
  189. package/dist/schemas/conversations.d.ts.map +1 -1
  190. package/dist/schemas/conversations.js +40 -134
  191. package/dist/schemas/conversations.js.map +1 -1
  192. package/dist/schemas/extensions.d.ts +9 -6
  193. package/dist/schemas/extensions.d.ts.map +1 -1
  194. package/dist/schemas/extensions.js +6 -4
  195. package/dist/schemas/extensions.js.map +1 -1
  196. package/dist/schemas/fleet.d.ts +153 -99
  197. package/dist/schemas/fleet.d.ts.map +1 -1
  198. package/dist/schemas/fleet.js +41 -51
  199. package/dist/schemas/fleet.js.map +1 -1
  200. package/dist/schemas/hooks.d.ts +34 -34
  201. package/dist/schemas/hooks.d.ts.map +1 -1
  202. package/dist/schemas/hooks.js +15 -34
  203. package/dist/schemas/hooks.js.map +1 -1
  204. package/dist/schemas/index.d.ts +1 -1
  205. package/dist/schemas/index.d.ts.map +1 -1
  206. package/dist/schemas/index.js +1 -1
  207. package/dist/schemas/index.js.map +1 -1
  208. package/dist/schemas/interactions.d.ts +146 -123
  209. package/dist/schemas/interactions.d.ts.map +1 -1
  210. package/dist/schemas/interactions.js +44 -129
  211. package/dist/schemas/interactions.js.map +1 -1
  212. package/dist/schemas/login.d.ts +36 -37
  213. package/dist/schemas/login.d.ts.map +1 -1
  214. package/dist/schemas/login.js +8 -42
  215. package/dist/schemas/login.js.map +1 -1
  216. package/dist/schemas/manifest-mcp.d.ts +61 -35
  217. package/dist/schemas/manifest-mcp.d.ts.map +1 -1
  218. package/dist/schemas/manifest-mcp.js +13 -19
  219. package/dist/schemas/manifest-mcp.js.map +1 -1
  220. package/dist/schemas/marketplace.d.ts +219 -133
  221. package/dist/schemas/marketplace.d.ts.map +1 -1
  222. package/dist/schemas/marketplace.js +35 -120
  223. package/dist/schemas/marketplace.js.map +1 -1
  224. package/dist/schemas/members.d.ts +161 -0
  225. package/dist/schemas/members.d.ts.map +1 -0
  226. package/dist/schemas/members.js +73 -0
  227. package/dist/schemas/members.js.map +1 -0
  228. package/dist/schemas/notifications.d.ts +113 -41
  229. package/dist/schemas/notifications.d.ts.map +1 -1
  230. package/dist/schemas/notifications.js +9 -35
  231. package/dist/schemas/notifications.js.map +1 -1
  232. package/dist/schemas/observability.d.ts +174 -72
  233. package/dist/schemas/observability.d.ts.map +1 -1
  234. package/dist/schemas/observability.js +23 -76
  235. package/dist/schemas/observability.js.map +1 -1
  236. package/dist/schemas/policy.d.ts +11 -11
  237. package/dist/schemas/policy.d.ts.map +1 -1
  238. package/dist/schemas/policy.js +5 -12
  239. package/dist/schemas/policy.js.map +1 -1
  240. package/dist/schemas/presets.d.ts +109 -64
  241. package/dist/schemas/presets.d.ts.map +1 -1
  242. package/dist/schemas/presets.js +12 -48
  243. package/dist/schemas/presets.js.map +1 -1
  244. package/dist/schemas/principals.d.ts +28 -21
  245. package/dist/schemas/principals.d.ts.map +1 -1
  246. package/dist/schemas/principals.js +13 -25
  247. package/dist/schemas/principals.js.map +1 -1
  248. package/dist/schemas/profiles.d.ts +75 -63
  249. package/dist/schemas/profiles.d.ts.map +1 -1
  250. package/dist/schemas/profiles.js +24 -54
  251. package/dist/schemas/profiles.js.map +1 -1
  252. package/dist/schemas/roles.d.ts +22 -22
  253. package/dist/schemas/roles.d.ts.map +1 -1
  254. package/dist/schemas/roles.js +10 -17
  255. package/dist/schemas/roles.js.map +1 -1
  256. package/dist/schemas/schedules.d.ts +21 -15
  257. package/dist/schemas/schedules.d.ts.map +1 -1
  258. package/dist/schemas/schedules.js +4 -13
  259. package/dist/schemas/schedules.js.map +1 -1
  260. package/dist/schemas/served.d.ts +6373 -194
  261. package/dist/schemas/served.d.ts.map +1 -1
  262. package/dist/schemas/served.js +21 -0
  263. package/dist/schemas/served.js.map +1 -1
  264. package/dist/schemas/settings-schema.d.ts +1 -1
  265. package/dist/schemas/settings-schema.d.ts.map +1 -1
  266. package/dist/schemas/settings-schema.js +17 -19
  267. package/dist/schemas/settings-schema.js.map +1 -1
  268. package/dist/schemas/setup.d.ts +6 -6
  269. package/dist/schemas/setup.d.ts.map +1 -1
  270. package/dist/schemas/setup.js +2 -11
  271. package/dist/schemas/setup.js.map +1 -1
  272. package/dist/schemas/states.d.ts +450 -135
  273. package/dist/schemas/states.d.ts.map +1 -1
  274. package/dist/schemas/states.js +76 -140
  275. package/dist/schemas/states.js.map +1 -1
  276. package/dist/schemas/storage.d.ts +7 -8
  277. package/dist/schemas/storage.d.ts.map +1 -1
  278. package/dist/schemas/storage.js +8 -17
  279. package/dist/schemas/storage.js.map +1 -1
  280. package/dist/schemas/studio-plugins.d.ts +24 -18
  281. package/dist/schemas/studio-plugins.d.ts.map +1 -1
  282. package/dist/schemas/studio-plugins.js +5 -19
  283. package/dist/schemas/studio-plugins.js.map +1 -1
  284. package/dist/schemas/sub-mcp.d.ts +11 -8
  285. package/dist/schemas/sub-mcp.d.ts.map +1 -1
  286. package/dist/schemas/sub-mcp.js +10 -19
  287. package/dist/schemas/sub-mcp.js.map +1 -1
  288. package/dist/schemas/system-kinds.d.ts +76 -46
  289. package/dist/schemas/system-kinds.d.ts.map +1 -1
  290. package/dist/schemas/system-kinds.js +11 -28
  291. package/dist/schemas/system-kinds.js.map +1 -1
  292. package/dist/schemas/templates.d.ts +83 -25
  293. package/dist/schemas/templates.d.ts.map +1 -1
  294. package/dist/schemas/templates.js +8 -9
  295. package/dist/schemas/templates.js.map +1 -1
  296. package/dist/schemas/tool-meta.d.ts +15 -15
  297. package/dist/schemas/tool-meta.d.ts.map +1 -1
  298. package/dist/schemas/tool-meta.js +6 -21
  299. package/dist/schemas/tool-meta.js.map +1 -1
  300. package/dist/schemas/tools.d.ts +177 -56
  301. package/dist/schemas/tools.d.ts.map +1 -1
  302. package/dist/schemas/tools.js +20 -41
  303. package/dist/schemas/tools.js.map +1 -1
  304. package/dist/schemas/trigger-links.d.ts +22 -17
  305. package/dist/schemas/trigger-links.d.ts.map +1 -1
  306. package/dist/schemas/trigger-links.js +7 -27
  307. package/dist/schemas/trigger-links.js.map +1 -1
  308. package/dist/tool-runs.d.ts +175 -54
  309. package/dist/tool-runs.d.ts.map +1 -1
  310. package/dist/tool-runs.js +33 -34
  311. package/dist/tool-runs.js.map +1 -1
  312. package/package.json +4 -3
  313. package/src/agents.ts +16 -4
  314. package/src/client/agents-client.ts +3 -2
  315. package/src/client/auth-client.ts +134 -34
  316. package/src/client/backend-client.ts +8 -3
  317. package/src/client/backup-client.ts +8 -3
  318. package/src/client/capabilities-client.ts +4 -2
  319. package/src/client/channels-client.ts +3 -1
  320. package/src/client/config-client.ts +13 -5
  321. package/src/client/connectors-client.ts +91 -16
  322. package/src/client/conversations-client.ts +79 -30
  323. package/src/client/hooks-client.ts +25 -12
  324. package/src/client/index.ts +16 -4
  325. package/src/client/interactions-client.ts +40 -16
  326. package/src/client/login-client.ts +8 -4
  327. package/src/client/manifest-client.ts +48 -24
  328. package/src/client/marketplace-client.ts +23 -12
  329. package/src/client/mcp-config-schema-client.ts +2 -1
  330. package/src/client/notifications-client.ts +2 -1
  331. package/src/client/observability-client.ts +60 -8
  332. package/src/client/plugins-client.ts +2 -1
  333. package/src/client/policy-client.ts +24 -9
  334. package/src/client/presets-client.ts +26 -13
  335. package/src/client/profiles-client.ts +53 -24
  336. package/src/client/schedules-client.ts +14 -20
  337. package/src/client/settings-schema-client.ts +2 -1
  338. package/src/client/states-client.ts +151 -49
  339. package/src/client/storage-client.ts +43 -14
  340. package/src/client/sub-mcp-client.ts +10 -4
  341. package/src/client/system-client.ts +2 -1
  342. package/src/client/templates-client.ts +26 -7
  343. package/src/client/tool-extensions-client.ts +14 -7
  344. package/src/client/tool-meta-client.ts +46 -21
  345. package/src/client/tools-client.ts +13 -8
  346. package/src/client/trigger-links-client.ts +10 -6
  347. package/src/fleet-report.ts +48 -7
  348. package/src/generated/api-routes.ts +327 -0
  349. package/src/generated/openapi-schemas.ts +1508 -0
  350. package/src/generated/served-schemas.ts +7118 -82
  351. package/src/headers.ts +4 -0
  352. package/src/http.ts +4 -3
  353. package/src/index.ts +52 -10
  354. package/src/schemas/api-keys.ts +9 -25
  355. package/src/schemas/auth-routes.ts +27 -28
  356. package/src/schemas/backup.ts +33 -31
  357. package/src/schemas/capabilities.ts +16 -39
  358. package/src/schemas/channels.ts +4 -4
  359. package/src/schemas/config.ts +6 -6
  360. package/src/schemas/connectors.ts +61 -102
  361. package/src/schemas/conversations.ts +43 -133
  362. package/src/schemas/extensions.ts +7 -4
  363. package/src/schemas/fleet.ts +51 -51
  364. package/src/schemas/hooks.ts +18 -37
  365. package/src/schemas/index.ts +1 -1
  366. package/src/schemas/interactions.ts +48 -131
  367. package/src/schemas/login.ts +10 -41
  368. package/src/schemas/manifest-mcp.ts +13 -19
  369. package/src/schemas/marketplace.ts +37 -120
  370. package/src/schemas/members.ts +91 -0
  371. package/src/schemas/notifications.ts +10 -34
  372. package/src/schemas/observability.ts +34 -79
  373. package/src/schemas/policy.ts +5 -12
  374. package/src/schemas/presets.ts +13 -48
  375. package/src/schemas/principals.ts +17 -24
  376. package/src/schemas/profiles.ts +25 -55
  377. package/src/schemas/roles.ts +11 -17
  378. package/src/schemas/schedules.ts +4 -15
  379. package/src/schemas/served.ts +33 -0
  380. package/src/schemas/settings-schema.ts +18 -23
  381. package/src/schemas/setup.ts +4 -10
  382. package/src/schemas/states.ts +88 -139
  383. package/src/schemas/storage.ts +10 -16
  384. package/src/schemas/studio-plugins.ts +8 -19
  385. package/src/schemas/sub-mcp.ts +12 -18
  386. package/src/schemas/system-kinds.ts +12 -29
  387. package/src/schemas/templates.ts +8 -10
  388. package/src/schemas/tool-meta.ts +8 -20
  389. package/src/schemas/tools.ts +22 -45
  390. package/src/schemas/trigger-links.ts +8 -26
  391. package/src/tool-runs.ts +47 -38
  392. package/dist/client/web-entry-gate-client.d.ts +0 -34
  393. package/dist/client/web-entry-gate-client.d.ts.map +0 -1
  394. package/dist/client/web-entry-gate-client.js +0 -25
  395. package/dist/client/web-entry-gate-client.js.map +0 -1
  396. package/dist/schemas/web-entry.d.ts +0 -45
  397. package/dist/schemas/web-entry.d.ts.map +0 -1
  398. package/dist/schemas/web-entry.js +0 -36
  399. package/dist/schemas/web-entry.js.map +0 -1
  400. package/src/client/web-entry-gate-client.ts +0 -45
  401. package/src/schemas/web-entry.ts +0 -46
@@ -1,7 +1,7 @@
1
1
  /** Composition root: assembles the per-resource sub-clients into the client. */
2
2
  import type { ApiConfig } from '../http';
3
3
  export type { AddUrlToScopeBody, ApiKeyBody, ClaimLinkBody, PinRoutePublicBody, RoleCreateBody, RoleUpdateBody, } from './auth-client';
4
- export type { StartConnectArgs } from './connectors-client';
4
+ export type { AddServerArgs, DiscoverServerTarget, SetProviderClientArgs, StartConnectArgs, } from './connectors-client';
5
5
  export type { ConversationMessageSearchQuery, ConversationThreadFilters, ConversationThreadMessageBody, ConversationTranscriptQuery, } from './conversations-client';
6
6
  export type { TopicVerifierBody } from './hooks-client';
7
7
  export { isSafeApiPath } from './login-client';
@@ -15,15 +15,14 @@ export type { StorageUploadBody } from './storage-client';
15
15
  export type { ToolMetaPatch } from './tool-meta-client';
16
16
  export type { RunToolArgs, ToolAdminArgs } from './tools-client';
17
17
  export type { TriggerLinkCreateBody } from './trigger-links-client';
18
- export type { WebEntryCodeMintBody } from './web-entry-gate-client';
19
18
  export declare function createApiClient(config: ApiConfig): {
20
19
  readonly streamInteractions: (signal?: AbortSignal, lastEventId?: string) => Promise<AsyncGenerator<import("..").SseFrame, any, any>>;
21
20
  readonly getHealth: (signal?: AbortSignal) => Promise<string>;
22
21
  readonly getSystemKinds: (signal?: AbortSignal) => Promise<{
22
+ detail: string;
23
23
  kind: string;
24
- state: "default" | "active" | "off";
25
24
  plugin: string | null;
26
- detail: string;
25
+ state: "default" | "active" | "off";
27
26
  }[]>;
28
27
  readonly searchMarketplace: (query?: import("./marketplace-client").MarketplaceSearchQuery, signal?: AbortSignal) => Promise<{
29
28
  listings: {
@@ -87,7 +86,7 @@ export declare function createApiClient(config: ApiConfig): {
87
86
  base: string;
88
87
  paths: {
89
88
  path: string;
90
- methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
89
+ methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[];
91
90
  public: boolean;
92
91
  }[];
93
92
  } | null | undefined;
@@ -111,70 +110,120 @@ export declare function createApiClient(config: ApiConfig): {
111
110
  readonly listMarketplaceKinds: (signal?: AbortSignal) => Promise<string[]>;
112
111
  readonly listInstalledMarketplacePlugins: (signal?: AbortSignal) => Promise<{
113
112
  installed: {
114
- ref: string;
115
- version: string;
116
- source: string;
117
- delivery: "package" | "descriptor";
118
- installed_at: string;
119
- latest: string | null;
120
- update_available: boolean;
121
- incompatible_newer: string | null;
122
- missing_upstream: boolean;
123
113
  compat: {
124
- status: "unknown" | "compatible" | "incompatible";
125
114
  reason: string | null;
115
+ status: "unknown" | "compatible" | "incompatible";
126
116
  };
117
+ delivery: "package" | "descriptor";
118
+ incompatible_newer: string | null;
119
+ installed_at: string;
127
120
  items: {
128
- name: string;
129
121
  kind: string;
122
+ name: string;
130
123
  }[];
124
+ latest: string | null;
125
+ missing_upstream: boolean;
126
+ ref: string;
131
127
  route_mounts: Record<string, string>;
128
+ source: string;
129
+ update_available: boolean;
130
+ version: string;
132
131
  }[];
133
132
  }>;
134
133
  readonly previewMarketplaceInstall: (body: import("./marketplace-client").MarketplaceInstallPreviewBody, signal?: AbortSignal) => Promise<{
135
- ref: string;
136
- version: string;
137
- items: {
134
+ collisions: {
135
+ conflict_owner: string;
136
+ conflict_path: string;
137
+ full_path: string;
138
138
  item: string;
139
- kind: string;
139
+ methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[];
140
+ }[];
141
+ delivery: "package" | "descriptor";
142
+ items: {
140
143
  base: string;
141
144
  default_base: string;
145
+ item: string;
146
+ kind: string;
142
147
  routes: {
143
- path: string;
144
148
  full_path: string;
145
- methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
149
+ methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[];
150
+ path: string;
146
151
  public: boolean;
147
152
  }[];
148
153
  }[];
149
- collisions: {
150
- item: string;
154
+ missing_env: string[];
155
+ new_public_routes: {
151
156
  full_path: string;
152
- methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
153
- conflict_owner: string;
154
- conflict_path: string;
157
+ item: string;
158
+ methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[];
155
159
  }[];
156
160
  public_routes: {
157
- item: string;
158
161
  full_path: string;
159
- methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
160
- }[];
161
- new_public_routes: {
162
162
  item: string;
163
- full_path: string;
164
- methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
163
+ methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[];
165
164
  }[];
166
- requires_public_acceptance: boolean;
165
+ ref: string;
167
166
  required_env: {
168
167
  name: string;
169
168
  secret: boolean;
170
169
  }[];
171
- missing_env: string[];
172
- delivery: "package" | "descriptor";
170
+ requires_public_acceptance: boolean;
171
+ version: string;
173
172
  }>;
174
173
  readonly installMarketplacePlugin: (body: import("./marketplace-client").MarketplaceInstallBody) => Promise<{
174
+ notes: string[];
175
+ package: string | null;
176
+ pip_output: string | null;
175
177
  ref: string;
178
+ reload: {
179
+ awaiting_respawn: {
180
+ keys: string[];
181
+ name: string;
182
+ }[];
183
+ env_keys: number;
184
+ fanout: {
185
+ error: string | null;
186
+ local_only: boolean | null;
187
+ mode: string;
188
+ note: string | null;
189
+ op: string | null;
190
+ reachable: boolean | null;
191
+ results: {
192
+ detail: string | null;
193
+ error: string | null;
194
+ name: string;
195
+ outcome: string;
196
+ payload: unknown;
197
+ }[] | null;
198
+ };
199
+ recycle: {
200
+ fresh: {
201
+ generation: number;
202
+ kind: string;
203
+ name: string;
204
+ }[];
205
+ recycle: {
206
+ detail: string | null;
207
+ generation_before: number;
208
+ kind: string;
209
+ name: string;
210
+ status: string;
211
+ }[];
212
+ recycle_stopped: {
213
+ detail: string;
214
+ kind: string;
215
+ name: string | null;
216
+ } | null;
217
+ } | null;
218
+ status: string;
219
+ };
220
+ routes: {
221
+ full_path: string;
222
+ item: string;
223
+ methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[];
224
+ public: boolean;
225
+ }[];
176
226
  version: string;
177
- notes: string[];
178
227
  advisories: {
179
228
  id: number;
180
229
  listing: string;
@@ -184,22 +233,108 @@ export declare function createApiClient(config: ApiConfig): {
184
233
  created_at: string;
185
234
  withdrawn_at: string | null;
186
235
  }[];
187
- routes: {
188
- item: string;
189
- full_path: string;
190
- methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
191
- public: boolean;
192
- }[];
193
236
  }>;
194
237
  readonly uninstallMarketplacePlugin: (body: import("./marketplace-client").MarketplaceUninstallBody) => Promise<{
195
- ref: string;
196
- uninstalled: true;
197
238
  notes: string[];
239
+ ref: string;
240
+ reload: {
241
+ awaiting_respawn: {
242
+ keys: string[];
243
+ name: string;
244
+ }[];
245
+ env_keys: number;
246
+ fanout: {
247
+ error: string | null;
248
+ local_only: boolean | null;
249
+ mode: string;
250
+ note: string | null;
251
+ op: string | null;
252
+ reachable: boolean | null;
253
+ results: {
254
+ detail: string | null;
255
+ error: string | null;
256
+ name: string;
257
+ outcome: string;
258
+ payload: unknown;
259
+ }[] | null;
260
+ };
261
+ recycle: {
262
+ fresh: {
263
+ generation: number;
264
+ kind: string;
265
+ name: string;
266
+ }[];
267
+ recycle: {
268
+ detail: string | null;
269
+ generation_before: number;
270
+ kind: string;
271
+ name: string;
272
+ status: string;
273
+ }[];
274
+ recycle_stopped: {
275
+ detail: string;
276
+ kind: string;
277
+ name: string | null;
278
+ } | null;
279
+ } | null;
280
+ status: string;
281
+ } | null;
282
+ uninstalled: boolean;
198
283
  }>;
199
284
  readonly updateMarketplacePlugin: (body: import("./marketplace-client").MarketplaceInstallBody) => Promise<{
285
+ notes: string[];
286
+ package: string | null;
287
+ pip_output: string | null;
200
288
  ref: string;
289
+ reload: {
290
+ awaiting_respawn: {
291
+ keys: string[];
292
+ name: string;
293
+ }[];
294
+ env_keys: number;
295
+ fanout: {
296
+ error: string | null;
297
+ local_only: boolean | null;
298
+ mode: string;
299
+ note: string | null;
300
+ op: string | null;
301
+ reachable: boolean | null;
302
+ results: {
303
+ detail: string | null;
304
+ error: string | null;
305
+ name: string;
306
+ outcome: string;
307
+ payload: unknown;
308
+ }[] | null;
309
+ };
310
+ recycle: {
311
+ fresh: {
312
+ generation: number;
313
+ kind: string;
314
+ name: string;
315
+ }[];
316
+ recycle: {
317
+ detail: string | null;
318
+ generation_before: number;
319
+ kind: string;
320
+ name: string;
321
+ status: string;
322
+ }[];
323
+ recycle_stopped: {
324
+ detail: string;
325
+ kind: string;
326
+ name: string | null;
327
+ } | null;
328
+ } | null;
329
+ status: string;
330
+ };
331
+ routes: {
332
+ full_path: string;
333
+ item: string;
334
+ methods: ("GET" | "DELETE" | "PATCH" | "POST" | "PUT")[];
335
+ public: boolean;
336
+ }[];
201
337
  version: string;
202
- notes: string[];
203
338
  advisories: {
204
339
  id: number;
205
340
  listing: string;
@@ -209,21 +344,16 @@ export declare function createApiClient(config: ApiConfig): {
209
344
  created_at: string;
210
345
  withdrawn_at: string | null;
211
346
  }[];
212
- routes: {
213
- item: string;
214
- full_path: string;
215
- methods: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE")[];
216
- public: boolean;
217
- }[];
218
347
  }>;
219
348
  readonly upgradeAllMarketplacePlugins: () => Promise<{
220
349
  results: {
221
- ref: string;
222
- outcome: "failed" | "upgraded" | "up-to-date" | "no-compatible-version";
223
350
  detail: string;
351
+ outcome: "failed" | "upgraded" | "up-to-date" | "no-compatible-version";
352
+ ref: string;
224
353
  }[];
225
354
  }>;
226
355
  readonly getMarketplaceAdvisories: (signal?: AbortSignal) => Promise<{
356
+ fetched_at: string;
227
357
  advisories: {
228
358
  id: number;
229
359
  listing: string;
@@ -233,89 +363,142 @@ export declare function createApiClient(config: ApiConfig): {
233
363
  created_at: string;
234
364
  withdrawn_at: string | null;
235
365
  }[];
236
- fetched_at: string;
237
366
  }>;
238
367
  readonly getObservabilityMetrics: (params?: import("./observability-client").MetricsQuery, signal?: AbortSignal) => Promise<{
239
- summary: {
240
- totalRuns: number;
241
- totalCost: number;
368
+ byModel: {
369
+ avgLatencyMs: number;
370
+ calls: number;
371
+ cost: number;
372
+ model: string;
242
373
  totalTokens: number;
374
+ }[];
375
+ byModelAvailable: boolean;
376
+ granularity: "hour" | "day" | "week";
377
+ summary: {
243
378
  averageLatencyMs: number;
244
379
  avgCostPerRun: number;
245
380
  avgTokensPerRun: number;
246
381
  timeToFirstTokenMs: number | null;
382
+ totalCost: number;
383
+ totalRuns: number;
384
+ totalTokens: number;
247
385
  };
248
386
  timeSeries: {
249
- bucket: string | null;
250
- runs: number;
251
- cost: number;
252
387
  avgLatencyMs: number;
253
- totalTokens: number;
254
- }[];
255
- byModel: {
256
- model: string;
257
- calls: number;
388
+ bucket: string | null;
258
389
  cost: number;
390
+ runs: number;
259
391
  totalTokens: number;
260
- avgLatencyMs: number;
261
392
  }[];
262
- byModelAvailable: boolean;
263
- granularity: "hour" | "day" | "week";
264
393
  }>;
265
394
  readonly listRuns: (params?: import("./observability-client").RunsQuery, signal?: AbortSignal) => Promise<{
266
395
  items: {
267
- id: string;
268
- traceId: string;
269
- createdAt: string | null;
270
- tags: string[];
271
- status: "error" | "success";
272
396
  cost: number | null;
273
- latencyMs: number | null;
274
- totalTokens: number | null;
397
+ createdAt: string | null;
398
+ id: string;
275
399
  inputPreview: unknown;
400
+ latencyMs: number | null;
276
401
  outputPreview: unknown;
402
+ status: "error" | "success";
403
+ tags: string[];
404
+ totalTokens: number | null;
405
+ traceId: string;
277
406
  }[];
278
- page: number;
279
407
  nextPage: number | null;
408
+ page: number;
409
+ }>;
410
+ readonly getObservabilityCapabilities: (signal?: AbortSignal) => Promise<{
411
+ incompatibleFilters: Record<string, string[]>;
412
+ metrics: {
413
+ dimensions: string[];
414
+ measures: string[];
415
+ };
416
+ pageSizeMax: number;
417
+ sortKeys: ("totalTokens" | "cost" | "createdAt" | "latencyMs")[];
280
418
  }>;
281
419
  readonly getRunTrace: (traceId: string, signal?: AbortSignal) => Promise<{
282
- traceId: string;
283
- timestamp: string | null;
284
- tags: string[];
285
- totalCost: number | null;
286
420
  input: unknown;
287
- output: unknown;
288
421
  metadata: unknown;
422
+ output: unknown;
289
423
  spans: {
424
+ end: string | null;
290
425
  id: string;
291
- parentId: string | null;
292
- traceId: string | null;
293
- name: string | null;
294
- type: string | null;
426
+ input: unknown;
427
+ inputTokens: number | null;
428
+ kind: "LLM" | "TOOL" | "CHAIN" | "EVENT" | null;
295
429
  level: string | null;
296
- statusMessage: string | null;
430
+ metadata: unknown;
431
+ model: string | null;
432
+ name: string | null;
433
+ output: unknown;
434
+ outputTokens: number | null;
435
+ parentId: string | null;
297
436
  start: string | null;
437
+ statusMessage: string | null;
438
+ totalTokens: number | null;
439
+ traceId: string | null;
440
+ }[];
441
+ tags: string[];
442
+ timestamp: string | null;
443
+ totalCost: number | null;
444
+ traceId: string;
445
+ }>;
446
+ readonly getRunTraceOutline: (traceId: string, signal?: AbortSignal) => Promise<{
447
+ spans: {
298
448
  end: string | null;
299
- model: string | null;
300
- usage: unknown;
449
+ id: string;
450
+ inputTokens: number | null;
451
+ kind: "LLM" | "TOOL" | "CHAIN" | "EVENT" | null;
452
+ level: string | null;
301
453
  metadata: unknown;
302
- input: unknown;
303
- output: unknown;
304
- nodeId: string | null;
454
+ model: string | null;
455
+ name: string | null;
456
+ outputTokens: number | null;
457
+ parentId: string | null;
458
+ start: string | null;
459
+ statusMessage: string | null;
460
+ totalTokens: number | null;
461
+ traceId: string | null;
305
462
  }[];
463
+ traceId: string;
306
464
  }>;
307
- readonly exportTrace: (traceId: string, signal?: AbortSignal) => Promise<Blob>;
465
+ readonly getResolvedSpanValue: (traceId: string, spanId: string, field: "input" | "output", options?: {
466
+ readonly pointer?: string;
467
+ }, signal?: AbortSignal) => Promise<{
468
+ field: "output" | "input";
469
+ pointer: string;
470
+ spanId: string;
471
+ traceId: string;
472
+ value: unknown;
473
+ }>;
474
+ readonly exportTrace: (traceId: string, options?: {
475
+ readonly resolve?: boolean;
476
+ }, signal?: AbortSignal) => Promise<Blob>;
308
477
  readonly exportRuns: (params: import("./observability-client").RunsQuery & {
309
478
  format: "csv" | "json";
310
479
  }, signal?: AbortSignal) => Promise<Blob>;
311
480
  readonly listSchedules: (signal?: AbortSignal) => Promise<{
312
- [x: string]: unknown;
481
+ cadence: {
482
+ day_of_month: string;
483
+ day_of_week: string;
484
+ hour: string;
485
+ kind: "crontab";
486
+ minute: string;
487
+ month_of_year: string;
488
+ } | {
489
+ every: number;
490
+ kind: "interval";
491
+ relative: boolean;
492
+ };
493
+ enabled: boolean;
494
+ error: {
495
+ at_iso: string | null;
496
+ message: string;
497
+ } | null;
313
498
  name: string;
314
- enabled?: boolean | undefined;
315
- schedule?: unknown;
316
- target?: unknown;
317
- args?: unknown[] | undefined;
318
- kwargs?: Record<string, unknown> | undefined;
499
+ next_run_at_iso: string | null;
500
+ next_run_at_ts: number | null;
501
+ tool: string;
319
502
  }[]>;
320
503
  readonly getServerDateTime: (signal?: AbortSignal) => Promise<{
321
504
  [x: string]: unknown;
@@ -323,17 +506,7 @@ export declare function createApiClient(config: ApiConfig): {
323
506
  local?: unknown;
324
507
  system?: unknown;
325
508
  }>;
326
- readonly addSchedule: (body: {
327
- tool_name: string;
328
- tool_kwargs: Record<string, unknown>;
329
- schedule_kwargs: Record<string, unknown>;
330
- execution_key?: string | null;
331
- state_binding?: import("..").StateBinding | null;
332
- start_expr?: import("..").TemplatedText | null;
333
- cancel_expr?: import("..").TemplatedText | null;
334
- resume_expr?: import("..").TemplatedText | null;
335
- extras_expr?: import("..").TemplatedText | null;
336
- }) => Promise<unknown>;
509
+ readonly addSchedule: (body: import("..").ScheduleCreate) => Promise<unknown>;
337
510
  readonly deleteSchedule: (name: string) => Promise<unknown>;
338
511
  readonly listBackupSections: (signal?: AbortSignal) => Promise<{
339
512
  name: string;
@@ -346,45 +519,71 @@ export declare function createApiClient(config: ApiConfig): {
346
519
  }) => Promise<{
347
520
  ok: boolean;
348
521
  sections: Record<string, {
522
+ awaiting_respawn: {
523
+ keys: string[];
524
+ name: string;
525
+ }[];
349
526
  created: number;
350
- updated: number;
351
- skipped: number;
352
527
  errors: string[];
353
- new_api_keys?: {
354
- user_id: string;
355
- description: string;
356
- api_key: string;
357
- }[] | undefined;
358
- fanout?: {
528
+ recycle: {
529
+ fresh: {
530
+ generation: number;
531
+ kind: string;
532
+ name: string;
533
+ }[];
534
+ recycle: {
535
+ detail: string | null;
536
+ generation_before: number;
537
+ kind: string;
538
+ name: string;
539
+ status: string;
540
+ }[];
541
+ recycle_stopped: {
542
+ detail: string;
543
+ kind: string;
544
+ name: string | null;
545
+ } | null;
546
+ } | null;
547
+ skipped: number;
548
+ updated: number;
549
+ fanout: {
359
550
  mode: "local-only";
360
551
  note: string;
361
552
  } | {
553
+ error: string | null;
554
+ local_only: boolean;
362
555
  op: string;
363
556
  reachable: boolean;
364
- local_only: boolean;
365
557
  results: {
558
+ detail: string | null;
559
+ error: string | null;
366
560
  name: string;
367
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
561
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
368
562
  payload: unknown;
369
- error: string | null;
370
- detail: string | null;
371
563
  }[];
372
- error: string | null;
373
564
  mode: "fleet";
374
565
  } | {
566
+ error: string | null;
567
+ local_only: boolean;
375
568
  op: string;
376
569
  reachable: boolean;
377
- local_only: boolean;
378
570
  results: {
571
+ detail: string | null;
572
+ error: string | null;
379
573
  name: string;
380
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
574
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
381
575
  payload: unknown;
382
- error: string | null;
383
- detail: string | null;
384
576
  }[];
385
- error: string | null;
386
577
  mode: "unreachable";
387
- } | undefined;
578
+ } | null;
579
+ details: {
580
+ [x: string]: unknown;
581
+ new_api_keys?: {
582
+ user_id: string;
583
+ description: string;
584
+ api_key: string;
585
+ }[] | undefined;
586
+ };
388
587
  }>;
389
588
  }>;
390
589
  readonly validateCondition: (body: import("./policy-client").ValidateConditionBody) => Promise<{
@@ -392,6 +591,9 @@ export declare function createApiClient(config: ApiConfig): {
392
591
  result: boolean | null;
393
592
  }>;
394
593
  readonly listPolicyVersions: (userId: string, signal?: AbortSignal) => Promise<{
594
+ created_at: string;
595
+ is_current: boolean;
596
+ tags: string[];
395
597
  version: number;
396
598
  body: {
397
599
  condition: {
@@ -402,13 +604,10 @@ export declare function createApiClient(config: ApiConfig): {
402
604
  policy_data: Record<string, unknown>;
403
605
  scopes: string[];
404
606
  };
405
- tags: string[];
406
- created_at: string;
407
- is_current: boolean;
408
607
  }[]>;
409
608
  readonly rollbackPolicy: (userId: string, version: number) => Promise<{
410
- user_id: string;
411
609
  active_version: number;
610
+ user_id: string;
412
611
  }>;
413
612
  readonly logout: () => Promise<{
414
613
  revoked: boolean;
@@ -416,36 +615,37 @@ export declare function createApiClient(config: ApiConfig): {
416
615
  readonly getAuthCapabilities: (signal?: AbortSignal) => Promise<{
417
616
  mintable: boolean;
418
617
  providers: {
419
- name: string;
420
618
  mintable: boolean;
619
+ name: string;
421
620
  }[];
422
621
  }>;
423
622
  readonly getLoginMethods: (options?: {
424
623
  signal?: AbortSignal;
425
624
  }) => Promise<{
625
+ claim_fragment_key: string;
426
626
  methods: ({
427
- shape: "form";
627
+ href: string;
628
+ icon: string | null;
428
629
  id: string;
429
- title: string;
430
- purpose: "login" | "invite";
630
+ label: string;
631
+ shape: "button";
632
+ } | {
431
633
  fields: {
432
- name: string;
634
+ autocomplete: string | null;
433
635
  label: string;
636
+ name: string;
434
637
  secret: boolean;
435
- autocomplete?: string | undefined;
436
638
  }[];
437
- submit_path: string;
438
- } | {
439
- shape: "button";
440
639
  id: string;
441
- label: string;
442
- href: string;
443
- icon?: string | undefined;
640
+ purpose: "login" | "invite";
641
+ shape: "form";
642
+ submit_path: string;
643
+ title: string;
444
644
  })[];
445
645
  needs_setup: boolean;
446
- setup_login?: {
646
+ setup_login: {
447
647
  kinds: ("invite" | "password")[];
448
- } | null | undefined;
648
+ } | null;
449
649
  }>;
450
650
  readonly submitLoginForm: (path: string, values: Record<string, string>) => Promise<{
451
651
  token: string;
@@ -462,69 +662,149 @@ export declare function createApiClient(config: ApiConfig): {
462
662
  user_id: string;
463
663
  }>;
464
664
  readonly submitSetup: (body: import("..").SetupBody) => Promise<{
465
- owner_user_id: string;
466
- key_user_id: string;
467
665
  api_key: string;
666
+ invite_token: string | null;
468
667
  key_fingerprint: string;
668
+ key_user_id: string;
469
669
  login_attached: boolean;
470
- invite_token?: string | null | undefined;
471
- login_path?: string | null | undefined;
670
+ login_path: string | null;
671
+ owner_user_id: string;
472
672
  }>;
473
673
  readonly getMe: (signal?: AbortSignal) => Promise<{
474
- user_id: string;
475
- owner_user_id: string | null;
476
674
  admin: boolean;
477
- scopes: string[];
478
- routes: {
479
- path: string;
480
- methods: string[];
481
- }[];
675
+ agents: string[];
676
+ mintable: boolean;
677
+ owner_user_id: string | null;
678
+ principal: {
679
+ display_name: string;
680
+ kind: "human" | "service";
681
+ user_id: string;
682
+ } | null;
683
+ public_resource_id: string;
482
684
  route_patterns: {
685
+ open_prefix: string | null;
483
686
  pattern: string;
484
687
  scope_id: string;
485
688
  }[];
689
+ routes: {
690
+ methods: string[];
691
+ path: string;
692
+ }[];
693
+ scopes: string[];
486
694
  sub_mcp: {
695
+ access_pattern: string;
696
+ mount_url: string;
697
+ slug: string;
487
698
  tools: string[];
488
699
  transport: string;
489
- slug: string;
490
700
  }[];
491
701
  tools: string[];
492
- agents: string[];
493
- mintable: boolean;
494
- principal?: {
495
- user_id: string;
496
- kind: "human" | "service";
497
- display_name: string;
498
- } | null | undefined;
702
+ user_id: string;
499
703
  }>;
500
- readonly listScopes: (signal?: AbortSignal) => Promise<Record<string, string>>;
501
- readonly addUrlToScope: (body: import("./auth-client").AddUrlToScopeBody) => Promise<{
502
- scope_id: string;
503
- url: string;
704
+ readonly listPrincipals: (signal?: AbortSignal) => Promise<{
705
+ created_at: string;
706
+ created_by: string | null;
707
+ disabled: boolean;
708
+ display_name: string;
709
+ kind: "human" | "service";
710
+ user_id: string;
711
+ }[]>;
712
+ readonly createPrincipal: (body: {
713
+ user_id?: string;
714
+ kind: import("..").PrincipalKind;
715
+ display_name: string;
716
+ role: string;
717
+ }) => Promise<{
718
+ created_at: string;
719
+ created_by: string | null;
720
+ disabled: boolean;
721
+ display_name: string;
722
+ kind: "human" | "service";
723
+ user_id: string;
504
724
  }>;
505
- readonly removeUrlFromScope: (body: {
506
- url: string;
725
+ readonly updatePrincipal: (userId: string, body: {
726
+ display_name?: string;
727
+ disabled?: boolean;
507
728
  }) => Promise<{
508
- url: string;
729
+ created_at: string;
730
+ created_by: string | null;
731
+ disabled: boolean;
732
+ display_name: string;
733
+ kind: "human" | "service";
734
+ user_id: string;
509
735
  }>;
510
- readonly removeScope: (scopeId: string) => Promise<{
511
- scope_id: string;
512
- deleted_keys: number;
736
+ readonly deletePrincipal: (userId: string) => Promise<{
737
+ deleted: boolean;
738
+ user_id: string;
513
739
  }>;
514
- readonly listAuthRoutes: (signal?: AbortSignal) => Promise<{
515
- path: string;
516
- methods: string[];
517
- mapped: string | null;
518
- tags: string[];
519
- summary: string;
520
- action: "read" | "write" | "fenced" | "secret" | null;
740
+ readonly listTokensPayload: (signal?: AbortSignal) => Promise<{
741
+ condition: {
742
+ content?: string | undefined;
743
+ id?: string | undefined;
744
+ kwargs?: Record<string, unknown> | undefined;
745
+ } | null;
746
+ description: string;
747
+ orphaned: boolean;
748
+ policy_data: Record<string, unknown> | null;
749
+ principal: {
750
+ display_name: string;
751
+ kind: "human" | "service";
752
+ user_id: string;
753
+ } | null;
754
+ scopes: string[] | null;
755
+ user_id: string;
521
756
  }[]>;
522
- readonly listPublicRoutes: (signal?: AbortSignal) => Promise<string[]>;
523
- readonly pinRoutePublic: (body: import("./auth-client").PinRoutePublicBody) => Promise<{
524
- url: string;
757
+ readonly createApiKey: (body: import("./auth-client").ApiKeyBody) => Promise<string>;
758
+ readonly editApiKey: (userId: string, body: Omit<import("./auth-client").ApiKeyBody, "user_id">) => Promise<{
759
+ updated: boolean;
760
+ user_id: string;
525
761
  }>;
526
- readonly unpinPublicRoute: (url: string) => Promise<{
527
- url: string;
762
+ readonly revokeApiKey: (userId: string) => Promise<{
763
+ revoked: boolean;
764
+ user_id: string;
765
+ }>;
766
+ readonly createClaimLink: (body: import("./auth-client").ClaimLinkBody) => Promise<{
767
+ claim_path: string;
768
+ expires_at: string;
769
+ token: string;
770
+ }>;
771
+ readonly listMembers: (signal?: AbortSignal) => Promise<{
772
+ invites: {
773
+ action_keys: string[];
774
+ created_at: string;
775
+ email: string;
776
+ expires_at: string;
777
+ handle: string;
778
+ id: string;
779
+ role: string | null;
780
+ }[];
781
+ members: {
782
+ action_keys: string[];
783
+ created_at: string;
784
+ disabled: boolean;
785
+ email: string;
786
+ handle: string;
787
+ id: string;
788
+ principals: {
789
+ disabled: boolean;
790
+ role: string | null;
791
+ user_id: string;
792
+ }[];
793
+ role: string | null;
794
+ }[];
795
+ }>;
796
+ readonly listMemberActions: (signal?: AbortSignal) => Promise<{
797
+ actions: {
798
+ destructive: boolean;
799
+ input_schema: Record<string, unknown>;
800
+ key: string;
801
+ label: string;
802
+ result_schema: Record<string, unknown>;
803
+ scope: "page" | "member_row" | "invite_row";
804
+ }[];
805
+ }>;
806
+ readonly invokeMemberAction: (body: import("./auth-client").InvokeMemberActionBody) => Promise<{
807
+ result: Record<string, unknown>;
528
808
  }>;
529
809
  readonly listRoles: (signal?: AbortSignal) => Promise<{
530
810
  allow_all: boolean;
@@ -566,11 +846,14 @@ export declare function createApiClient(config: ApiConfig): {
566
846
  scopes: string[];
567
847
  }>;
568
848
  readonly deleteRole: (name: string) => Promise<{
569
- name: string;
570
849
  deleted: boolean;
850
+ name: string;
571
851
  }>;
572
852
  readonly listRoleVersions: (name: string, signal?: AbortSignal) => Promise<{
573
853
  versions: {
854
+ created_at: string;
855
+ is_current: boolean;
856
+ tags: string[];
574
857
  version: number;
575
858
  body: {
576
859
  allow_all: boolean;
@@ -585,11 +868,11 @@ export declare function createApiClient(config: ApiConfig): {
585
868
  name: string;
586
869
  scopes: string[];
587
870
  };
588
- tags: string[];
589
- created_at: string;
590
- is_current: boolean;
591
871
  }[];
592
872
  audit: {
873
+ created_at: string;
874
+ is_current: boolean;
875
+ tags: string[];
593
876
  version: number;
594
877
  body: {
595
878
  action: string;
@@ -597,95 +880,55 @@ export declare function createApiClient(config: ApiConfig): {
597
880
  before: unknown;
598
881
  after: unknown;
599
882
  };
600
- tags: string[];
601
- created_at: string;
602
- is_current: boolean;
603
883
  }[];
604
884
  }>;
605
- readonly rollbackRole: (name: string, version: number) => Promise<{
606
- allow_all: boolean;
607
- base_tier: string | null;
608
- condition: {
609
- content?: string | undefined;
610
- id?: string | undefined;
611
- kwargs?: Record<string, unknown> | undefined;
612
- } | null;
613
- description: string;
614
- grants: Record<string, "none" | "read" | "write">;
615
- name: string;
616
- scopes: string[];
617
- }>;
618
- readonly listTokensPayload: (signal?: AbortSignal) => Promise<{
619
- user_id: string;
620
- description: string;
621
- scopes: string[];
622
- policy_data: unknown;
623
- condition?: {
624
- content?: string | undefined;
625
- id?: string | undefined;
626
- kwargs?: Record<string, unknown> | undefined;
627
- } | null | undefined;
628
- principal?: {
629
- user_id: string;
630
- kind: "human" | "service";
631
- display_name: string;
632
- } | null | undefined;
633
- orphaned?: boolean | undefined;
634
- }[]>;
635
- readonly createApiKey: (body: import("./auth-client").ApiKeyBody) => Promise<string>;
636
- readonly editApiKey: (userId: string, body: Omit<import("./auth-client").ApiKeyBody, "user_id">) => Promise<{
637
- user_id: string;
638
- updated: boolean;
639
- }>;
640
- readonly revokeApiKey: (userId: string) => Promise<{
641
- user_id: string;
642
- revoked: boolean;
643
- }>;
644
- readonly createClaimLink: (body: import("./auth-client").ClaimLinkBody) => Promise<{
645
- claim_path: string;
646
- token: string;
647
- expires_at: string;
885
+ readonly rollbackRole: (name: string, version: number) => Promise<{
886
+ allow_all: boolean;
887
+ base_tier: string | null;
888
+ condition: {
889
+ content?: string | undefined;
890
+ id?: string | undefined;
891
+ kwargs?: Record<string, unknown> | undefined;
892
+ } | null;
893
+ description: string;
894
+ grants: Record<string, "none" | "read" | "write">;
895
+ name: string;
896
+ scopes: string[];
648
897
  }>;
649
- readonly listPrincipals: (signal?: AbortSignal) => Promise<{
650
- user_id: string;
651
- kind: "human" | "service";
652
- display_name: string;
653
- created_by: string | null;
654
- disabled: boolean;
655
- created_at: string;
656
- }[]>;
657
- readonly createPrincipal: (body: {
658
- user_id?: string;
659
- kind: "human" | "service";
660
- display_name: string;
661
- role: string;
662
- }) => Promise<{
663
- user_id: string;
664
- kind: "human" | "service";
665
- display_name: string;
666
- created_by: string | null;
667
- disabled: boolean;
668
- created_at: string;
898
+ readonly listScopes: (signal?: AbortSignal) => Promise<Record<string, string>>;
899
+ readonly addUrlToScope: (body: import("./auth-client").AddUrlToScopeBody) => Promise<{
900
+ scope_id: string;
901
+ url: string;
669
902
  }>;
670
- readonly updatePrincipal: (userId: string, body: {
671
- display_name?: string;
672
- disabled?: boolean;
903
+ readonly removeUrlFromScope: (body: {
904
+ url: string;
673
905
  }) => Promise<{
674
- user_id: string;
675
- kind: "human" | "service";
676
- display_name: string;
677
- created_by: string | null;
678
- disabled: boolean;
679
- created_at: string;
906
+ url: string;
680
907
  }>;
681
- readonly deletePrincipal: (userId: string) => Promise<{
682
- user_id: string;
683
- deleted: boolean;
908
+ readonly removeScope: (scopeId: string) => Promise<{
909
+ deleted_keys: number;
910
+ scope_id: string;
911
+ }>;
912
+ readonly listAuthRoutes: (signal?: AbortSignal) => Promise<{
913
+ action: "read" | "write" | "secret" | "fenced" | null;
914
+ declared_public: boolean;
915
+ mapped: string | null;
916
+ methods: string[];
917
+ path: string;
918
+ summary: string;
919
+ tags: string[];
920
+ }[]>;
921
+ readonly listPublicRoutes: (signal?: AbortSignal) => Promise<string[]>;
922
+ readonly pinRoutePublic: (body: import("./auth-client").PinRoutePublicBody) => Promise<{
923
+ url: string;
924
+ }>;
925
+ readonly unpinPublicRoute: (url: string) => Promise<{
926
+ url: string;
684
927
  }>;
685
928
  readonly getSettingsSchema: (signal?: AbortSignal) => Promise<{
686
929
  groups: {
687
- name: string;
688
930
  module: string;
931
+ name: string;
689
932
  qualname: string;
690
933
  fields: {
691
934
  name: string;
@@ -703,29 +946,31 @@ export declare function createApiClient(config: ApiConfig): {
703
946
  }>;
704
947
  readonly getMcpConfigSchema: (signal?: AbortSignal) => Promise<Record<string, unknown>>;
705
948
  readonly createTriggerLink: (body: import("./trigger-links-client").TriggerLinkCreateBody) => Promise<{
949
+ expires_at: string | null;
706
950
  name: string;
707
- trigger_path: string;
708
951
  token: string;
709
952
  topic: string;
710
- expires_at: string | null;
953
+ trigger_path: string;
711
954
  }>;
712
955
  readonly listTriggerLinks: (signal?: AbortSignal) => Promise<{
713
956
  items: {
714
- name: string;
715
- topic: string;
716
- execution_key: string;
717
- trigger_auth: "token" | "public" | "verifier" | "token+api_key" | "out-of-service";
718
- tool_kwargs: Record<string, unknown> | null;
719
- created_by: string | null;
720
957
  created_at: string;
958
+ created_by: string | null;
959
+ execution_key: string;
960
+ execution_key_fingerprint: string;
721
961
  expires_at: string | null;
962
+ name: string;
963
+ require_api_key: boolean;
722
964
  token_hash_prefix: string;
965
+ tool_kwargs: Record<string, unknown> | null;
966
+ topic: string;
967
+ trigger_auth: "token" | "public" | "verifier" | "token+api_key" | "out-of-service";
723
968
  }[];
724
969
  total: number;
725
970
  }>;
726
971
  readonly deleteTriggerLink: (name: string) => Promise<{
727
- removed: boolean;
728
972
  name: string;
973
+ removed: boolean;
729
974
  }>;
730
975
  readonly listHooks: (topic?: string, signal?: AbortSignal) => Promise<{
731
976
  items: {
@@ -815,19 +1060,19 @@ export declare function createApiClient(config: ApiConfig): {
815
1060
  topic: string;
816
1061
  }[];
817
1062
  total: number;
1063
+ trigger_auth: Record<string, "token" | "public" | "verifier" | "token+api_key" | "out-of-service">;
818
1064
  topic_verifiers: Record<string, {
819
1065
  verifier: string;
820
1066
  config: Record<string, unknown>;
821
1067
  }>;
822
- trigger_auth: Record<string, "token" | "public" | "verifier" | "token+api_key" | "out-of-service">;
823
1068
  }>;
824
1069
  readonly registerHook: (params: import("..").HookRegister) => Promise<{
825
- registered: boolean;
826
1070
  name: string;
1071
+ registered: boolean;
827
1072
  }>;
828
1073
  readonly unregisterHook: (name: string) => Promise<{
829
- removed: boolean;
830
1074
  name: string;
1075
+ removed: boolean;
831
1076
  }>;
832
1077
  readonly listHookVerifiers: (signal?: AbortSignal) => Promise<string[]>;
833
1078
  readonly setTopicVerifier: (topic: string, body: import("./hooks-client").TopicVerifierBody) => Promise<{
@@ -862,58 +1107,67 @@ export declare function createApiClient(config: ApiConfig): {
862
1107
  readonly streamAuthoredAgentRun: (name: string, input: unknown, signal?: AbortSignal) => Promise<AsyncGenerator<import("..").ParsedAgentEvent, any, any>>;
863
1108
  readonly listNotifications: (signal?: AbortSignal) => Promise<{
864
1109
  notifications: {
1110
+ audience: string | null;
1111
+ created_at: string;
1112
+ footer: string | null;
1113
+ header: {
1114
+ caption: string | null;
1115
+ filename: string | null;
1116
+ kind: "image" | "link" | "document" | "video" | "audio";
1117
+ url: string;
1118
+ } | null;
865
1119
  id: string;
1120
+ location: {
1121
+ address: string | null;
1122
+ latitude: number;
1123
+ longitude: number;
1124
+ name: string | null;
1125
+ } | null;
1126
+ media: {
1127
+ caption: string | null;
1128
+ filename: string | null;
1129
+ kind: "image" | "link" | "document" | "video" | "audio";
1130
+ url: string;
1131
+ }[] | null;
866
1132
  message: string;
1133
+ options: ({
1134
+ kind: "link";
1135
+ label: string;
1136
+ url: string;
1137
+ } | {
1138
+ description: string | null;
1139
+ id: string | null;
1140
+ kind: "reply";
1141
+ text: string;
1142
+ })[] | null;
867
1143
  recipient: string | null;
868
- created_at: string;
869
- audience?: string | null | undefined;
870
- media?: unknown[] | null | undefined;
871
- template?: {
872
- body_parameters: string[];
873
- buttons: unknown[];
874
- header_media: {
875
- caption: string | null;
876
- filename: string | null;
877
- kind: "image" | "link" | "document" | "video" | "audio";
878
- url: string;
879
- } | null;
1144
+ schema: unknown;
1145
+ sections: {
1146
+ rows: {
1147
+ description: string | null;
1148
+ id: string | null;
1149
+ kind: "reply";
1150
+ text: string;
1151
+ }[];
1152
+ title: string;
1153
+ }[] | null;
1154
+ template: {
880
1155
  language: string;
881
1156
  name: string;
882
- } | null | undefined;
883
- options?: string[] | null | undefined;
884
- }[];
885
- }>;
886
- readonly getWebEntryGate: (identity: string, signal?: AbortSignal) => Promise<{
887
- enabled: boolean;
888
- codes: {
889
- code_id: string;
890
- label: string | null;
891
- created_at: string;
892
- expires_at: string | null;
1157
+ parameters: Record<string, unknown> | null;
1158
+ } | null;
893
1159
  }[];
894
1160
  }>;
895
- readonly setWebEntryGate: (identity: string, enabled: boolean) => Promise<{
896
- enabled: boolean;
897
- }>;
898
- readonly mintWebEntryCode: (identity: string, body: import("./web-entry-gate-client").WebEntryCodeMintBody) => Promise<{
899
- code: string;
900
- code_id: string;
901
- expires_at: string | null;
902
- }>;
903
- readonly revokeWebEntryCode: (identity: string, codeId: string) => Promise<{
904
- status: "revoked";
905
- }>;
906
1161
  readonly listConversationRoutes: (signal?: AbortSignal) => Promise<{
907
- items: {
908
- callback_secret: string | null;
1162
+ items: ({
909
1163
  callback_url: string | null;
910
1164
  cancel_expr: {
911
1165
  content?: string | undefined;
912
1166
  id?: string | undefined;
913
1167
  kwargs?: Record<string, unknown> | undefined;
914
1168
  } | null;
915
- channel: string | null;
916
- door: "channel" | "api";
1169
+ channel: null;
1170
+ door: "api";
917
1171
  error_reply_text: string | null;
918
1172
  execution_key: string;
919
1173
  execution_key_fingerprint: string;
@@ -924,7 +1178,7 @@ export declare function createApiClient(config: ApiConfig): {
924
1178
  } | null;
925
1179
  initial_mode: "agent" | "manual";
926
1180
  locale: string | null;
927
- our_identity: string | null;
1181
+ our_identity: null;
928
1182
  overlap: {
929
1183
  deliver: "one" | "all";
930
1184
  running: "continue" | "cancel";
@@ -949,22 +1203,66 @@ export declare function createApiClient(config: ApiConfig): {
949
1203
  target_kind: "tool" | "agent";
950
1204
  target_name: string;
951
1205
  turns_per_hour_override: number | null;
952
- }[];
1206
+ } | {
1207
+ callback_url: null;
1208
+ cancel_expr: {
1209
+ content?: string | undefined;
1210
+ id?: string | undefined;
1211
+ kwargs?: Record<string, unknown> | undefined;
1212
+ } | null;
1213
+ channel: string;
1214
+ door: "channel";
1215
+ error_reply_text: string | null;
1216
+ execution_key: string;
1217
+ execution_key_fingerprint: string;
1218
+ extras_expr: {
1219
+ content?: string | undefined;
1220
+ id?: string | undefined;
1221
+ kwargs?: Record<string, unknown> | undefined;
1222
+ } | null;
1223
+ initial_mode: "agent" | "manual";
1224
+ locale: string | null;
1225
+ our_identity: string;
1226
+ overlap: {
1227
+ deliver: "one" | "all";
1228
+ running: "continue" | "cancel";
1229
+ settle_seconds: number;
1230
+ };
1231
+ reply_expr: {
1232
+ content?: string | undefined;
1233
+ id?: string | undefined;
1234
+ kwargs?: Record<string, unknown> | undefined;
1235
+ } | null;
1236
+ resume_expr: {
1237
+ content?: string | undefined;
1238
+ id?: string | undefined;
1239
+ kwargs?: Record<string, unknown> | undefined;
1240
+ } | null;
1241
+ route_name: string;
1242
+ start_expr: {
1243
+ content?: string | undefined;
1244
+ id?: string | undefined;
1245
+ kwargs?: Record<string, unknown> | undefined;
1246
+ } | null;
1247
+ target_kind: "tool" | "agent";
1248
+ target_name: string;
1249
+ turns_per_hour_override: number | null;
1250
+ })[];
953
1251
  total: number;
1252
+ unreadable: number;
954
1253
  }>;
955
1254
  readonly createOrReplaceConversationRoute: (route: import("..").ConversationRouteCreate) => Promise<{
1255
+ callback_secret: string | null;
956
1256
  created: boolean;
957
- route_name: string;
958
1257
  route: {
959
- callback_secret: string | null;
960
1258
  callback_url: string | null;
961
1259
  cancel_expr: {
962
1260
  content?: string | undefined;
963
1261
  id?: string | undefined;
964
1262
  kwargs?: Record<string, unknown> | undefined;
965
1263
  } | null;
966
- channel: string | null;
967
- door: "channel" | "api";
1264
+ channel: null;
1265
+ door: "api";
968
1266
  error_reply_text: string | null;
969
1267
  execution_key: string;
970
1268
  execution_key_fingerprint: string;
@@ -975,7 +1273,51 @@ export declare function createApiClient(config: ApiConfig): {
975
1273
  } | null;
976
1274
  initial_mode: "agent" | "manual";
977
1275
  locale: string | null;
978
- our_identity: string | null;
1276
+ our_identity: null;
1277
+ overlap: {
1278
+ deliver: "one" | "all";
1279
+ running: "continue" | "cancel";
1280
+ settle_seconds: number;
1281
+ };
1282
+ reply_expr: {
1283
+ content?: string | undefined;
1284
+ id?: string | undefined;
1285
+ kwargs?: Record<string, unknown> | undefined;
1286
+ } | null;
1287
+ resume_expr: {
1288
+ content?: string | undefined;
1289
+ id?: string | undefined;
1290
+ kwargs?: Record<string, unknown> | undefined;
1291
+ } | null;
1292
+ route_name: string;
1293
+ start_expr: {
1294
+ content?: string | undefined;
1295
+ id?: string | undefined;
1296
+ kwargs?: Record<string, unknown> | undefined;
1297
+ } | null;
1298
+ target_kind: "tool" | "agent";
1299
+ target_name: string;
1300
+ turns_per_hour_override: number | null;
1301
+ } | {
1302
+ callback_url: null;
1303
+ cancel_expr: {
1304
+ content?: string | undefined;
1305
+ id?: string | undefined;
1306
+ kwargs?: Record<string, unknown> | undefined;
1307
+ } | null;
1308
+ channel: string;
1309
+ door: "channel";
1310
+ error_reply_text: string | null;
1311
+ execution_key: string;
1312
+ execution_key_fingerprint: string;
1313
+ extras_expr: {
1314
+ content?: string | undefined;
1315
+ id?: string | undefined;
1316
+ kwargs?: Record<string, unknown> | undefined;
1317
+ } | null;
1318
+ initial_mode: "agent" | "manual";
1319
+ locale: string | null;
1320
+ our_identity: string;
979
1321
  overlap: {
980
1322
  deliver: "one" | "all";
981
1323
  running: "continue" | "cancel";
@@ -1001,88 +1343,266 @@ export declare function createApiClient(config: ApiConfig): {
1001
1343
  target_name: string;
1002
1344
  turns_per_hour_override: number | null;
1003
1345
  };
1004
- callback_secret: string | null;
1346
+ route_name: string;
1005
1347
  }>;
1006
1348
  readonly deleteConversationRoute: (routeName: string) => Promise<{
1007
1349
  removed: boolean;
1008
1350
  route_name: string;
1009
1351
  }>;
1010
1352
  readonly listConversationThreads: (routeName: string, page: number, pageSize: number, filters?: import("./conversations-client").ConversationThreadFilters, signal?: AbortSignal) => Promise<{
1011
- total: number;
1012
- page: number;
1013
- page_size: number;
1014
- next_page: number | null;
1015
- truncated: boolean;
1016
1353
  items: {
1017
- thread_id: string;
1018
1354
  client_address: string;
1019
1355
  last_activity_at: number;
1356
+ last_delivery_status: "superseded" | "failed" | "silent" | "merged" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed";
1020
1357
  message_count: number;
1021
- last_delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent" | "merged" | "superseded";
1358
+ thread_id: string;
1022
1359
  }[];
1023
- }>;
1024
- readonly readConversationTranscript: (query: import("./conversations-client").ConversationTranscriptQuery, signal?: AbortSignal) => Promise<{
1025
- order: "asc" | "desc";
1026
- total: number;
1360
+ next_page: number | null;
1027
1361
  page: number;
1028
1362
  page_size: number;
1029
- next_page: number | null;
1363
+ total: number;
1030
1364
  truncated: boolean;
1365
+ unreadable: number;
1366
+ }>;
1367
+ readonly readConversationTranscript: (query: import("./conversations-client").ConversationTranscriptQuery, signal?: AbortSignal) => Promise<{
1031
1368
  items: {
1032
- message_id: string;
1033
- route_name: string;
1034
- door: "channel" | "api";
1035
- thread_id: string;
1036
- client_address: string;
1369
+ answer: string | null;
1370
+ answer_parts: {
1371
+ data: {
1372
+ options: Record<string, {
1373
+ label: string | null;
1374
+ value: string;
1375
+ }[]>;
1376
+ values: Record<string, unknown>;
1377
+ } | null;
1378
+ footer: string | null;
1379
+ form_tag: string | null;
1380
+ header: {
1381
+ caption: string | null;
1382
+ filename: string | null;
1383
+ kind: "image" | "link" | "document" | "video" | "audio";
1384
+ url: string;
1385
+ } | null;
1386
+ location: {
1387
+ address: string | null;
1388
+ latitude: number;
1389
+ longitude: number;
1390
+ name: string | null;
1391
+ } | null;
1392
+ media: {
1393
+ caption: string | null;
1394
+ filename: string | null;
1395
+ kind: "image" | "link" | "document" | "video" | "audio";
1396
+ url: string;
1397
+ }[] | null;
1398
+ message: string;
1399
+ options: ({
1400
+ kind: "link";
1401
+ label: string;
1402
+ url: string;
1403
+ } | {
1404
+ description: string | null;
1405
+ id: string | null;
1406
+ kind: "reply";
1407
+ text: string;
1408
+ })[] | null;
1409
+ pages: {
1410
+ display: {
1411
+ alt: string | null;
1412
+ kind: "heading" | "body" | "image";
1413
+ slot: string | null;
1414
+ src: string | null;
1415
+ text: string | null;
1416
+ }[];
1417
+ fields: string[];
1418
+ kind: "input" | "review";
1419
+ title: string;
1420
+ }[] | null;
1421
+ schema: Record<string, unknown> | null;
1422
+ sections: {
1423
+ rows: {
1424
+ description: string | null;
1425
+ id: string | null;
1426
+ kind: "reply";
1427
+ text: string;
1428
+ }[];
1429
+ title: string;
1430
+ }[] | null;
1431
+ template: {
1432
+ language: string;
1433
+ name: string;
1434
+ parameters: Record<string, unknown> | null;
1435
+ } | null;
1436
+ }[] | null;
1437
+ answer_status: "error" | "superseded" | "answered" | "silent" | "merged" | null;
1438
+ attempts: number | null;
1439
+ callback_url: string | null;
1037
1440
  caller_principal: string | null;
1441
+ channel: string | null;
1442
+ client_address: string;
1443
+ created_at: number;
1444
+ delivery_status: "superseded" | "failed" | "silent" | "merged" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed";
1445
+ door: "channel" | "api";
1446
+ error: string | null;
1447
+ inbound_attachments: {
1448
+ caption: string | null;
1449
+ filename: string | null;
1450
+ kind: "image" | "link" | "document" | "video" | "audio";
1451
+ url: string;
1452
+ }[] | null;
1453
+ inbound_event: Record<string, unknown> | null;
1454
+ inbound_form: Record<string, unknown> | null;
1455
+ inbound_form_tag: string | null;
1456
+ inbound_kind: "message" | "event";
1457
+ inbound_locale: string | null;
1458
+ inbound_location: {
1459
+ address: string | null;
1460
+ latitude: number;
1461
+ longitude: number;
1462
+ name: string | null;
1463
+ } | null;
1038
1464
  inbound_text: string;
1039
- inbound_attachments: unknown[] | null;
1040
- answer_status: "error" | "silent" | "merged" | "superseded" | "answered" | null;
1041
- answer: string | null;
1465
+ message_id: string;
1466
+ operator_send: boolean;
1467
+ origin: "operator" | "client";
1468
+ our_identity: string | null;
1469
+ outbound_message_ids: string[] | null;
1470
+ pending_receipt: "superseded" | "failed" | "silent" | "merged" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | null;
1471
+ provider_message_id: string | null;
1472
+ route_missing: boolean;
1473
+ route_name: string;
1474
+ submitted_by: string | null;
1042
1475
  successor_id: string | null;
1043
- origin: "client" | "operator";
1044
- delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent" | "merged" | "superseded";
1045
- created_at: number;
1476
+ thread_id: string;
1046
1477
  updated_at: number;
1047
- channel?: string | null | undefined;
1048
- our_identity?: string | null | undefined;
1049
- provider_message_id?: string | null | undefined;
1050
- callback_url?: string | null | undefined;
1051
- error?: string | null | undefined;
1052
- outbound_message_ids?: string[] | undefined;
1053
- attempts?: number | undefined;
1054
1478
  }[];
1055
- }>;
1056
- readonly searchConversationMessages: (query: import("./conversations-client").ConversationMessageSearchQuery, signal?: AbortSignal) => Promise<{
1057
- total: number;
1479
+ next_page: number | null;
1480
+ order: "asc" | "desc";
1058
1481
  page: number;
1059
1482
  page_size: number;
1060
- next_page: number | null;
1483
+ person_id: string | null;
1484
+ total: number;
1061
1485
  truncated: boolean;
1486
+ unreadable: number;
1487
+ }>;
1488
+ readonly searchConversationMessages: (query: import("./conversations-client").ConversationMessageSearchQuery, signal?: AbortSignal) => Promise<{
1062
1489
  items: {
1063
- message_id: string;
1064
- route_name: string;
1065
- door: "channel" | "api";
1066
- thread_id: string;
1067
- client_address: string;
1490
+ answer: string | null;
1491
+ answer_parts: {
1492
+ data: {
1493
+ options: Record<string, {
1494
+ label: string | null;
1495
+ value: string;
1496
+ }[]>;
1497
+ values: Record<string, unknown>;
1498
+ } | null;
1499
+ footer: string | null;
1500
+ form_tag: string | null;
1501
+ header: {
1502
+ caption: string | null;
1503
+ filename: string | null;
1504
+ kind: "image" | "link" | "document" | "video" | "audio";
1505
+ url: string;
1506
+ } | null;
1507
+ location: {
1508
+ address: string | null;
1509
+ latitude: number;
1510
+ longitude: number;
1511
+ name: string | null;
1512
+ } | null;
1513
+ media: {
1514
+ caption: string | null;
1515
+ filename: string | null;
1516
+ kind: "image" | "link" | "document" | "video" | "audio";
1517
+ url: string;
1518
+ }[] | null;
1519
+ message: string;
1520
+ options: ({
1521
+ kind: "link";
1522
+ label: string;
1523
+ url: string;
1524
+ } | {
1525
+ description: string | null;
1526
+ id: string | null;
1527
+ kind: "reply";
1528
+ text: string;
1529
+ })[] | null;
1530
+ pages: {
1531
+ display: {
1532
+ alt: string | null;
1533
+ kind: "heading" | "body" | "image";
1534
+ slot: string | null;
1535
+ src: string | null;
1536
+ text: string | null;
1537
+ }[];
1538
+ fields: string[];
1539
+ kind: "input" | "review";
1540
+ title: string;
1541
+ }[] | null;
1542
+ schema: Record<string, unknown> | null;
1543
+ sections: {
1544
+ rows: {
1545
+ description: string | null;
1546
+ id: string | null;
1547
+ kind: "reply";
1548
+ text: string;
1549
+ }[];
1550
+ title: string;
1551
+ }[] | null;
1552
+ template: {
1553
+ language: string;
1554
+ name: string;
1555
+ parameters: Record<string, unknown> | null;
1556
+ } | null;
1557
+ }[] | null;
1558
+ answer_status: "error" | "superseded" | "answered" | "silent" | "merged" | null;
1559
+ attempts: number | null;
1560
+ callback_url: string | null;
1068
1561
  caller_principal: string | null;
1562
+ channel: string | null;
1563
+ client_address: string;
1564
+ created_at: number;
1565
+ delivery_status: "superseded" | "failed" | "silent" | "merged" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed";
1566
+ door: "channel" | "api";
1567
+ error: string | null;
1568
+ inbound_attachments: {
1569
+ caption: string | null;
1570
+ filename: string | null;
1571
+ kind: "image" | "link" | "document" | "video" | "audio";
1572
+ url: string;
1573
+ }[] | null;
1574
+ inbound_event: Record<string, unknown> | null;
1575
+ inbound_form: Record<string, unknown> | null;
1576
+ inbound_form_tag: string | null;
1577
+ inbound_kind: "message" | "event";
1578
+ inbound_locale: string | null;
1579
+ inbound_location: {
1580
+ address: string | null;
1581
+ latitude: number;
1582
+ longitude: number;
1583
+ name: string | null;
1584
+ } | null;
1069
1585
  inbound_text: string;
1070
- inbound_attachments: unknown[] | null;
1071
- answer_status: "error" | "silent" | "merged" | "superseded" | "answered" | null;
1072
- answer: string | null;
1586
+ message_id: string;
1587
+ operator_send: boolean;
1588
+ origin: "operator" | "client";
1589
+ our_identity: string | null;
1590
+ outbound_message_ids: string[] | null;
1591
+ pending_receipt: "superseded" | "failed" | "silent" | "merged" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | null;
1592
+ provider_message_id: string | null;
1593
+ route_missing: boolean;
1594
+ route_name: string;
1595
+ submitted_by: string | null;
1073
1596
  successor_id: string | null;
1074
- origin: "client" | "operator";
1075
- delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent" | "merged" | "superseded";
1076
- created_at: number;
1597
+ thread_id: string;
1077
1598
  updated_at: number;
1078
- channel?: string | null | undefined;
1079
- our_identity?: string | null | undefined;
1080
- provider_message_id?: string | null | undefined;
1081
- callback_url?: string | null | undefined;
1082
- error?: string | null | undefined;
1083
- outbound_message_ids?: string[] | undefined;
1084
- attempts?: number | undefined;
1085
1599
  }[];
1600
+ next_page: number | null;
1601
+ page: number;
1602
+ page_size: number;
1603
+ total: number;
1604
+ truncated: boolean;
1605
+ unreadable: number;
1086
1606
  }>;
1087
1607
  readonly sendConversationThreadMessage: (routeName: string, body: import("./conversations-client").ConversationThreadMessageBody) => Promise<{
1088
1608
  message_id: string;
@@ -1147,6 +1667,7 @@ export declare function createApiClient(config: ApiConfig): {
1147
1667
  target_name: string;
1148
1668
  }[];
1149
1669
  total: number;
1670
+ unreadable: number;
1150
1671
  }>;
1151
1672
  readonly getConversationConfig: (targetKind: import("..").ConversationTargetKind, targetName: string, signal?: AbortSignal) => Promise<{
1152
1673
  greeting_template: string | null;
@@ -1198,9 +1719,6 @@ export declare function createApiClient(config: ApiConfig): {
1198
1719
  target_name: string;
1199
1720
  }>;
1200
1721
  readonly setConversationConfig: (config: import("..").TargetConversationConfig) => Promise<{
1201
- created: boolean;
1202
- target_kind: "tool" | "agent";
1203
- target_name: string;
1204
1722
  config: {
1205
1723
  greeting_template: string | null;
1206
1724
  multichannel: boolean;
@@ -1250,6 +1768,9 @@ export declare function createApiClient(config: ApiConfig): {
1250
1768
  target_kind: "tool" | "agent";
1251
1769
  target_name: string;
1252
1770
  };
1771
+ created: boolean;
1772
+ target_kind: "tool" | "agent";
1773
+ target_name: string;
1253
1774
  }>;
1254
1775
  readonly deleteConversationConfig: (targetKind: import("..").ConversationTargetKind, targetName: string) => Promise<{
1255
1776
  removed: boolean;
@@ -1258,30 +1779,118 @@ export declare function createApiClient(config: ApiConfig): {
1258
1779
  }>;
1259
1780
  readonly listFailedConversationMessages: (signal?: AbortSignal) => Promise<{
1260
1781
  items: {
1261
- message_id: string;
1262
- route_name: string;
1263
- door: "channel" | "api";
1264
- thread_id: string;
1265
- client_address: string;
1782
+ answer: string | null;
1783
+ answer_parts: {
1784
+ data: {
1785
+ options: Record<string, {
1786
+ label: string | null;
1787
+ value: string;
1788
+ }[]>;
1789
+ values: Record<string, unknown>;
1790
+ } | null;
1791
+ footer: string | null;
1792
+ form_tag: string | null;
1793
+ header: {
1794
+ caption: string | null;
1795
+ filename: string | null;
1796
+ kind: "image" | "link" | "document" | "video" | "audio";
1797
+ url: string;
1798
+ } | null;
1799
+ location: {
1800
+ address: string | null;
1801
+ latitude: number;
1802
+ longitude: number;
1803
+ name: string | null;
1804
+ } | null;
1805
+ media: {
1806
+ caption: string | null;
1807
+ filename: string | null;
1808
+ kind: "image" | "link" | "document" | "video" | "audio";
1809
+ url: string;
1810
+ }[] | null;
1811
+ message: string;
1812
+ options: ({
1813
+ kind: "link";
1814
+ label: string;
1815
+ url: string;
1816
+ } | {
1817
+ description: string | null;
1818
+ id: string | null;
1819
+ kind: "reply";
1820
+ text: string;
1821
+ })[] | null;
1822
+ pages: {
1823
+ display: {
1824
+ alt: string | null;
1825
+ kind: "heading" | "body" | "image";
1826
+ slot: string | null;
1827
+ src: string | null;
1828
+ text: string | null;
1829
+ }[];
1830
+ fields: string[];
1831
+ kind: "input" | "review";
1832
+ title: string;
1833
+ }[] | null;
1834
+ schema: Record<string, unknown> | null;
1835
+ sections: {
1836
+ rows: {
1837
+ description: string | null;
1838
+ id: string | null;
1839
+ kind: "reply";
1840
+ text: string;
1841
+ }[];
1842
+ title: string;
1843
+ }[] | null;
1844
+ template: {
1845
+ language: string;
1846
+ name: string;
1847
+ parameters: Record<string, unknown> | null;
1848
+ } | null;
1849
+ }[] | null;
1850
+ answer_status: "error" | "superseded" | "answered" | "silent" | "merged" | null;
1851
+ attempts: number | null;
1852
+ callback_url: string | null;
1266
1853
  caller_principal: string | null;
1854
+ channel: string | null;
1855
+ client_address: string;
1856
+ created_at: number;
1857
+ delivery_status: "superseded" | "failed" | "silent" | "merged" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed";
1858
+ door: "channel" | "api";
1859
+ error: string | null;
1860
+ inbound_attachments: {
1861
+ caption: string | null;
1862
+ filename: string | null;
1863
+ kind: "image" | "link" | "document" | "video" | "audio";
1864
+ url: string;
1865
+ }[] | null;
1866
+ inbound_event: Record<string, unknown> | null;
1867
+ inbound_form: Record<string, unknown> | null;
1868
+ inbound_form_tag: string | null;
1869
+ inbound_kind: "message" | "event";
1870
+ inbound_locale: string | null;
1871
+ inbound_location: {
1872
+ address: string | null;
1873
+ latitude: number;
1874
+ longitude: number;
1875
+ name: string | null;
1876
+ } | null;
1267
1877
  inbound_text: string;
1268
- inbound_attachments: unknown[] | null;
1269
- answer_status: "error" | "silent" | "merged" | "superseded" | "answered" | null;
1270
- answer: string | null;
1878
+ message_id: string;
1879
+ operator_send: boolean;
1880
+ origin: "operator" | "client";
1881
+ our_identity: string | null;
1882
+ outbound_message_ids: string[] | null;
1883
+ pending_receipt: "superseded" | "failed" | "silent" | "merged" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | null;
1884
+ provider_message_id: string | null;
1885
+ route_missing: boolean;
1886
+ route_name: string;
1887
+ submitted_by: string | null;
1271
1888
  successor_id: string | null;
1272
- origin: "client" | "operator";
1273
- delivery_status: "failed" | "accepted" | "pending_delivery" | "provisional" | "delivered" | "shed" | "silent" | "merged" | "superseded";
1274
- created_at: number;
1889
+ thread_id: string;
1275
1890
  updated_at: number;
1276
- channel?: string | null | undefined;
1277
- our_identity?: string | null | undefined;
1278
- provider_message_id?: string | null | undefined;
1279
- callback_url?: string | null | undefined;
1280
- error?: string | null | undefined;
1281
- outbound_message_ids?: string[] | undefined;
1282
- attempts?: number | undefined;
1283
1891
  }[];
1284
1892
  total: number;
1893
+ unreadable: number;
1285
1894
  }>;
1286
1895
  readonly deleteConversationThread: (routeName: string, threadId: string) => Promise<{
1287
1896
  removed: number;
@@ -1289,34 +1898,39 @@ export declare function createApiClient(config: ApiConfig): {
1289
1898
  thread_id: string;
1290
1899
  }>;
1291
1900
  readonly deleteConversationPerson: (personId: string) => Promise<{
1901
+ erased: boolean;
1292
1902
  person_id: string;
1293
1903
  removed: number;
1294
- erased: boolean;
1295
1904
  }>;
1296
1905
  readonly listChannels: (signal?: AbortSignal) => Promise<{
1297
1906
  channels: string[];
1298
1907
  }>;
1299
1908
  readonly listInteractions: (page: number, pageSize: number, signal?: AbortSignal) => Promise<{
1300
- total: number;
1909
+ next_page: number | null;
1301
1910
  page: number;
1302
1911
  page_size: number;
1303
- next_page: number | null;
1912
+ total: number;
1304
1913
  truncated: boolean;
1305
1914
  items: {
1306
- interaction_id: string;
1915
+ answer_format: "text" | "free" | "confirm" | "form" | "select" | "external";
1916
+ audience: string | null;
1917
+ channel: string | null;
1918
+ created_at: string;
1307
1919
  group_id: string;
1920
+ interaction_id: string;
1921
+ media: {
1922
+ caption: string | null;
1923
+ filename: string | null;
1924
+ kind: "image" | "link" | "document" | "video" | "audio";
1925
+ url: string;
1926
+ }[] | null;
1927
+ origin: string | null;
1308
1928
  question: string;
1309
- answer_format: "text" | "external" | "confirm" | "select" | "form";
1310
- format_payload: Record<string, unknown>;
1311
- created_at: string;
1312
- timeout_at: string;
1929
+ recipient: string | null;
1313
1930
  sensitive: boolean;
1314
- server_verified?: boolean | undefined;
1315
- channel?: string | undefined;
1316
- recipient?: string | undefined;
1317
- origin?: string | undefined;
1318
- audience?: string | undefined;
1319
- media?: unknown[] | undefined;
1931
+ server_verified: boolean | null;
1932
+ timeout_at: string;
1933
+ format_payload: Record<string, unknown>;
1320
1934
  }[];
1321
1935
  }>;
1322
1936
  readonly answerInteraction: (interactionId: string, answer: unknown) => Promise<{
@@ -1326,8 +1940,8 @@ export declare function createApiClient(config: ApiConfig): {
1326
1940
  readonly reactInteraction: (interactionId: string, event: import("..").ReactionEvent, values: unknown) => Promise<{
1327
1941
  values: Record<string, unknown>;
1328
1942
  options: Record<string, {
1943
+ label: string | null;
1329
1944
  value: string;
1330
- label?: string | null | undefined;
1331
1945
  }[]>;
1332
1946
  errors: Record<string, string>;
1333
1947
  display: Record<string, unknown>;
@@ -1337,267 +1951,459 @@ export declare function createApiClient(config: ApiConfig): {
1337
1951
  status: string;
1338
1952
  }>;
1339
1953
  readonly listStudioPlugins: (signal?: AbortSignal) => Promise<{
1340
- name: string;
1341
- version: string;
1342
1954
  api_version: number;
1343
- entry: string;
1344
- integrity: Record<string, string>;
1345
1955
  contributions: {
1346
- tool_panels: Record<string, string>;
1956
+ nav_entries: string[];
1347
1957
  pages: string[];
1958
+ route_panels: string[];
1348
1959
  settings_tabs: string[];
1349
- nav_entries: string[];
1960
+ tool_panels: Record<string, string>;
1350
1961
  };
1962
+ entry: string;
1963
+ integrity: Record<string, string>;
1964
+ mounts: Record<string, string>;
1965
+ name: string;
1966
+ version: string;
1351
1967
  }[]>;
1968
+ readonly discoverServer: (target: import("./connectors-client").DiscoverServerTarget) => Promise<{
1969
+ authorization_servers: string[];
1970
+ automatic_client: boolean;
1971
+ client_issuer: string | null;
1972
+ issuer: string;
1973
+ redirect_uri: string | null;
1974
+ registration_supported: boolean;
1975
+ resource: string;
1976
+ resource_name: string | null;
1977
+ scopes_supported: string[];
1978
+ suggested_display_name: string;
1979
+ suggested_id: string;
1980
+ url: string;
1981
+ }>;
1982
+ readonly addServer: (args: import("./connectors-client").AddServerArgs) => Promise<{
1983
+ provider: {
1984
+ category: string;
1985
+ client_source: "manual" | "env" | "dynamic" | "unset" | null;
1986
+ config_fields: {
1987
+ key: string;
1988
+ label: string;
1989
+ required: boolean;
1990
+ secret: boolean;
1991
+ target: "header" | "env";
1992
+ }[];
1993
+ description: string;
1994
+ display_name: string;
1995
+ icon_url: string | null;
1996
+ id: string;
1997
+ kind: "none" | "oauth";
1998
+ origin: "system" | "community";
1999
+ removable: boolean;
2000
+ sub_services: {
2001
+ description: string;
2002
+ display_name: string;
2003
+ id: string;
2004
+ scopes: string[];
2005
+ }[];
2006
+ };
2007
+ fanout: {
2008
+ mode: "local-only";
2009
+ note: string;
2010
+ } | {
2011
+ error: string | null;
2012
+ local_only: boolean;
2013
+ op: string;
2014
+ reachable: boolean;
2015
+ results: {
2016
+ detail: string | null;
2017
+ error: string | null;
2018
+ name: string;
2019
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
2020
+ payload: unknown;
2021
+ }[];
2022
+ mode: "fleet";
2023
+ } | {
2024
+ error: string | null;
2025
+ local_only: boolean;
2026
+ op: string;
2027
+ reachable: boolean;
2028
+ results: {
2029
+ detail: string | null;
2030
+ error: string | null;
2031
+ name: string;
2032
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
2033
+ payload: unknown;
2034
+ }[];
2035
+ mode: "unreachable";
2036
+ } | null;
2037
+ }>;
2038
+ readonly removeProvider: (id: string) => Promise<{
2039
+ provider_id: string;
2040
+ removed_clients: number;
2041
+ fanout: {
2042
+ mode: "local-only";
2043
+ note: string;
2044
+ } | {
2045
+ error: string | null;
2046
+ local_only: boolean;
2047
+ op: string;
2048
+ reachable: boolean;
2049
+ results: {
2050
+ detail: string | null;
2051
+ error: string | null;
2052
+ name: string;
2053
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
2054
+ payload: unknown;
2055
+ }[];
2056
+ mode: "fleet";
2057
+ } | {
2058
+ error: string | null;
2059
+ local_only: boolean;
2060
+ op: string;
2061
+ reachable: boolean;
2062
+ results: {
2063
+ detail: string | null;
2064
+ error: string | null;
2065
+ name: string;
2066
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
2067
+ payload: unknown;
2068
+ }[];
2069
+ mode: "unreachable";
2070
+ } | null;
2071
+ }>;
2072
+ readonly setProviderClient: (id: string, args: import("./connectors-client").SetProviderClientArgs) => Promise<{
2073
+ provider: {
2074
+ category: string;
2075
+ client_source: "manual" | "env" | "dynamic" | "unset" | null;
2076
+ config_fields: {
2077
+ key: string;
2078
+ label: string;
2079
+ required: boolean;
2080
+ secret: boolean;
2081
+ target: "header" | "env";
2082
+ }[];
2083
+ description: string;
2084
+ display_name: string;
2085
+ icon_url: string | null;
2086
+ id: string;
2087
+ kind: "none" | "oauth";
2088
+ origin: "system" | "community";
2089
+ removable: boolean;
2090
+ sub_services: {
2091
+ description: string;
2092
+ display_name: string;
2093
+ id: string;
2094
+ scopes: string[];
2095
+ }[];
2096
+ };
2097
+ fanout: {
2098
+ mode: "local-only";
2099
+ note: string;
2100
+ } | {
2101
+ error: string | null;
2102
+ local_only: boolean;
2103
+ op: string;
2104
+ reachable: boolean;
2105
+ results: {
2106
+ detail: string | null;
2107
+ error: string | null;
2108
+ name: string;
2109
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
2110
+ payload: unknown;
2111
+ }[];
2112
+ mode: "fleet";
2113
+ } | {
2114
+ error: string | null;
2115
+ local_only: boolean;
2116
+ op: string;
2117
+ reachable: boolean;
2118
+ results: {
2119
+ detail: string | null;
2120
+ error: string | null;
2121
+ name: string;
2122
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
2123
+ payload: unknown;
2124
+ }[];
2125
+ mode: "unreachable";
2126
+ } | null;
2127
+ }>;
1352
2128
  readonly listProviders: (signal?: AbortSignal) => Promise<{
1353
- providers: {
1354
- id: string;
2129
+ categories: {
1355
2130
  display_name: string;
1356
- description: string;
1357
- icon_url: string;
1358
- kind: "none" | "oauth";
1359
- origin: "system" | "community";
2131
+ id: string;
2132
+ sort_order: number;
2133
+ }[];
2134
+ providers: {
1360
2135
  category: string;
1361
- sub_services: {
1362
- id: string;
1363
- display_name: string;
1364
- description: string;
1365
- scopes: string[];
1366
- }[];
2136
+ client_source: "manual" | "env" | "dynamic" | "unset" | null;
1367
2137
  config_fields: {
1368
2138
  key: string;
1369
2139
  label: string;
1370
- target: "env" | "header";
1371
2140
  required: boolean;
1372
2141
  secret: boolean;
2142
+ target: "header" | "env";
1373
2143
  }[];
1374
- }[];
1375
- categories: {
1376
- id: string;
2144
+ description: string;
1377
2145
  display_name: string;
1378
- sort_order: number;
2146
+ icon_url: string | null;
2147
+ id: string;
2148
+ kind: "none" | "oauth";
2149
+ origin: "system" | "community";
2150
+ removable: boolean;
2151
+ sub_services: {
2152
+ description: string;
2153
+ display_name: string;
2154
+ id: string;
2155
+ scopes: string[];
2156
+ }[];
1379
2157
  }[];
1380
2158
  }>;
1381
2159
  readonly listConnections: (signal?: AbortSignal) => Promise<{
1382
2160
  items: {
1383
- connection_id: string;
1384
- provider_id: string;
1385
- alias: string;
1386
- kind: "none" | "oauth";
1387
2161
  account_identity: string | null;
2162
+ alias: string;
2163
+ auth_health_state: "healthy" | "reconnect_required" | "refresh_failing";
2164
+ connection_id: string;
2165
+ created_at: string;
1388
2166
  enabled_sub_services: string[];
1389
2167
  granted_scopes: string[];
2168
+ kind: "none" | "oauth";
2169
+ provider_id: string;
2170
+ scopes_wanted: string[];
1390
2171
  unreachable_sub_services: string[];
1391
- auth_health_state: "healthy" | "reconnect_required" | "refresh_failing";
1392
- created_at: string;
1393
2172
  }[];
1394
2173
  total: number;
1395
- unhealthy?: number | undefined;
2174
+ unhealthy: number;
1396
2175
  }>;
1397
2176
  readonly getConnection: (id: string, signal?: AbortSignal) => Promise<{
1398
- connection_id: string;
1399
- provider_id: string;
1400
- alias: string;
1401
- kind: "none" | "oauth";
1402
2177
  account_identity: string | null;
2178
+ alias: string;
2179
+ auth_health_state: "healthy" | "reconnect_required" | "refresh_failing";
2180
+ connection_id: string;
2181
+ created_at: string;
1403
2182
  enabled_sub_services: string[];
1404
2183
  granted_scopes: string[];
2184
+ kind: "none" | "oauth";
2185
+ provider_id: string;
2186
+ scopes_wanted: string[];
1405
2187
  unreachable_sub_services: string[];
1406
- auth_health_state: "healthy" | "reconnect_required" | "refresh_failing";
1407
- created_at: string;
1408
2188
  }>;
1409
2189
  readonly startConnect: (args: import("./connectors-client").StartConnectArgs) => Promise<{
1410
- flow_id: string;
1411
2190
  authorize_url: string;
2191
+ flow_id: string;
1412
2192
  } | {
1413
- connection_id: string;
1414
2193
  added_manifest_entries: string[];
2194
+ connection_id: string;
1415
2195
  fanout: {
1416
2196
  mode: "local-only";
1417
2197
  note: string;
1418
2198
  } | {
2199
+ error: string | null;
2200
+ local_only: boolean;
1419
2201
  op: string;
1420
2202
  reachable: boolean;
1421
- local_only: boolean;
1422
2203
  results: {
2204
+ detail: string | null;
2205
+ error: string | null;
1423
2206
  name: string;
1424
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2207
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1425
2208
  payload: unknown;
1426
- error: string | null;
1427
- detail: string | null;
1428
2209
  }[];
1429
- error: string | null;
1430
2210
  mode: "fleet";
1431
2211
  } | {
2212
+ error: string | null;
2213
+ local_only: boolean;
1432
2214
  op: string;
1433
2215
  reachable: boolean;
1434
- local_only: boolean;
1435
2216
  results: {
2217
+ detail: string | null;
2218
+ error: string | null;
1436
2219
  name: string;
1437
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2220
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1438
2221
  payload: unknown;
1439
- error: string | null;
1440
- detail: string | null;
1441
2222
  }[];
1442
- error: string | null;
1443
2223
  mode: "unreachable";
1444
2224
  } | null;
1445
2225
  }>;
1446
2226
  readonly disconnect: (id: string) => Promise<{
1447
2227
  connection_id: string;
1448
- upstream_revoke_outcome: "success" | "failed" | "skipped";
1449
- upstream_revoke_status: number | null;
1450
2228
  removed_manifest_entries: string[];
2229
+ upstream_revoke_outcome: "success" | "skipped" | "failed";
2230
+ upstream_revoke_status: number | null;
1451
2231
  fanout: {
1452
2232
  mode: "local-only";
1453
2233
  note: string;
1454
2234
  } | {
2235
+ error: string | null;
2236
+ local_only: boolean;
1455
2237
  op: string;
1456
2238
  reachable: boolean;
1457
- local_only: boolean;
1458
2239
  results: {
2240
+ detail: string | null;
2241
+ error: string | null;
1459
2242
  name: string;
1460
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2243
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1461
2244
  payload: unknown;
1462
- error: string | null;
1463
- detail: string | null;
1464
2245
  }[];
1465
- error: string | null;
1466
2246
  mode: "fleet";
1467
2247
  } | {
2248
+ error: string | null;
2249
+ local_only: boolean;
1468
2250
  op: string;
1469
2251
  reachable: boolean;
1470
- local_only: boolean;
1471
2252
  results: {
2253
+ detail: string | null;
2254
+ error: string | null;
1472
2255
  name: string;
1473
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2256
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1474
2257
  payload: unknown;
1475
- error: string | null;
1476
- detail: string | null;
1477
2258
  }[];
1478
- error: string | null;
1479
2259
  mode: "unreachable";
1480
2260
  } | null;
1481
2261
  }>;
1482
2262
  readonly reconnect: (id: string, enabled_sub_services: string[], return_url?: string) => Promise<{
1483
- flow_id: string;
1484
2263
  authorize_url: string;
2264
+ flow_id: string;
1485
2265
  }>;
1486
2266
  readonly patchSubServices: (id: string, enabled_sub_services: string[], return_url?: string) => Promise<{
2267
+ added_manifest_entries: string[];
2268
+ authorize_url: string | null;
1487
2269
  connection_id: string;
1488
- enabled_sub_services: string[];
1489
2270
  consent_required: boolean;
2271
+ enabled_sub_services: string[];
1490
2272
  flow_id: string | null;
1491
- authorize_url: string | null;
1492
- added_manifest_entries: string[];
1493
2273
  removed_manifest_entries: string[];
1494
2274
  fanout: {
1495
2275
  mode: "local-only";
1496
2276
  note: string;
1497
2277
  } | {
2278
+ error: string | null;
2279
+ local_only: boolean;
1498
2280
  op: string;
1499
2281
  reachable: boolean;
1500
- local_only: boolean;
1501
2282
  results: {
2283
+ detail: string | null;
2284
+ error: string | null;
1502
2285
  name: string;
1503
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2286
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1504
2287
  payload: unknown;
1505
- error: string | null;
1506
- detail: string | null;
1507
2288
  }[];
1508
- error: string | null;
1509
2289
  mode: "fleet";
1510
2290
  } | {
2291
+ error: string | null;
2292
+ local_only: boolean;
1511
2293
  op: string;
1512
2294
  reachable: boolean;
1513
- local_only: boolean;
1514
2295
  results: {
2296
+ detail: string | null;
2297
+ error: string | null;
1515
2298
  name: string;
1516
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2299
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1517
2300
  payload: unknown;
1518
- error: string | null;
1519
- detail: string | null;
1520
2301
  }[];
1521
- error: string | null;
1522
2302
  mode: "unreachable";
1523
2303
  } | null;
1524
2304
  }>;
1525
- readonly completeOAuth: (state: string, code: string, error?: string) => Promise<{
1526
- kind: "success";
2305
+ readonly completeOAuth: (state: string, code: string, error?: string, iss?: string) => Promise<{
2306
+ kind: "cancelled";
2307
+ message: string;
2308
+ } | {
2309
+ kind: "failed";
2310
+ reason: string;
2311
+ } | {
2312
+ kind: "not_configured";
2313
+ } | {
1527
2314
  connection_id: string;
2315
+ kind: "success";
1528
2316
  return_url: string;
1529
2317
  fanout: {
1530
2318
  mode: "local-only";
1531
2319
  note: string;
1532
2320
  } | {
2321
+ error: string | null;
2322
+ local_only: boolean;
1533
2323
  op: string;
1534
2324
  reachable: boolean;
1535
- local_only: boolean;
1536
2325
  results: {
2326
+ detail: string | null;
2327
+ error: string | null;
1537
2328
  name: string;
1538
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2329
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1539
2330
  payload: unknown;
1540
- error: string | null;
1541
- detail: string | null;
1542
2331
  }[];
1543
- error: string | null;
1544
2332
  mode: "fleet";
1545
2333
  } | {
2334
+ error: string | null;
2335
+ local_only: boolean;
1546
2336
  op: string;
1547
2337
  reachable: boolean;
1548
- local_only: boolean;
1549
2338
  results: {
2339
+ detail: string | null;
2340
+ error: string | null;
1550
2341
  name: string;
1551
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2342
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1552
2343
  payload: unknown;
1553
- error: string | null;
1554
- detail: string | null;
1555
2344
  }[];
1556
- error: string | null;
1557
2345
  mode: "unreachable";
1558
- } | null;
1559
- } | {
1560
- kind: "failed";
1561
- reason: string;
1562
- } | {
1563
- kind: "cancelled";
1564
- message: string;
2346
+ };
1565
2347
  }>;
1566
2348
  readonly setMcpSecretEnv: (body: import("./manifest-client").SetMcpSecretEnvBody) => Promise<{
1567
- status: string;
2349
+ awaiting_respawn: {
2350
+ keys: string[];
2351
+ name: string;
2352
+ }[];
1568
2353
  env_keys: number;
2354
+ recycle: {
2355
+ fresh: {
2356
+ generation: number;
2357
+ kind: string;
2358
+ name: string;
2359
+ }[];
2360
+ recycle: {
2361
+ detail: string | null;
2362
+ generation_before: number;
2363
+ kind: string;
2364
+ name: string;
2365
+ status: string;
2366
+ }[];
2367
+ recycle_stopped: {
2368
+ detail: string;
2369
+ kind: string;
2370
+ name: string | null;
2371
+ } | null;
2372
+ } | null;
2373
+ status: string;
1569
2374
  fanout: {
1570
2375
  mode: "local-only";
1571
2376
  note: string;
1572
2377
  } | {
2378
+ error: string | null;
2379
+ local_only: boolean;
1573
2380
  op: string;
1574
2381
  reachable: boolean;
1575
- local_only: boolean;
1576
2382
  results: {
2383
+ detail: string | null;
2384
+ error: string | null;
1577
2385
  name: string;
1578
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2386
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1579
2387
  payload: unknown;
1580
- error: string | null;
1581
- detail: string | null;
1582
2388
  }[];
1583
- error: string | null;
1584
2389
  mode: "fleet";
1585
2390
  } | {
2391
+ error: string | null;
2392
+ local_only: boolean;
1586
2393
  op: string;
1587
2394
  reachable: boolean;
1588
- local_only: boolean;
1589
2395
  results: {
2396
+ detail: string | null;
2397
+ error: string | null;
1590
2398
  name: string;
1591
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2399
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1592
2400
  payload: unknown;
1593
- error: string | null;
1594
- detail: string | null;
1595
2401
  }[];
1596
- error: string | null;
1597
2402
  mode: "unreachable";
1598
2403
  };
1599
2404
  }>;
1600
2405
  readonly getManifestPreserved: (signal?: AbortSignal) => Promise<{
2406
+ user_tools: string[];
1601
2407
  mcp: {
1602
2408
  [x: string]: unknown;
1603
2409
  managed?: {
@@ -1606,17 +2412,16 @@ export declare function createApiClient(config: ApiConfig): {
1606
2412
  sub_service: string;
1607
2413
  } | null | undefined;
1608
2414
  }[];
1609
- user_tools: string[];
1610
2415
  }>;
1611
2416
  readonly getMcpEnvRefs: (signal?: AbortSignal) => Promise<{
1612
- var: string;
1613
- pointer: string;
1614
2417
  has_default: boolean;
2418
+ pointer: string;
1615
2419
  set: boolean;
2420
+ var: string;
1616
2421
  }[]>;
1617
2422
  readonly listSettingsProfiles: (signal?: AbortSignal) => Promise<{
1618
- name: string;
1619
2423
  description: string;
2424
+ name: string;
1620
2425
  }[]>;
1621
2426
  readonly getSettingsProfile: (name: string, signal?: AbortSignal) => Promise<{
1622
2427
  description: string;
@@ -1624,127 +2429,160 @@ export declare function createApiClient(config: ApiConfig): {
1624
2429
  secret_keys: string[];
1625
2430
  }>;
1626
2431
  readonly putSettingsProfile: (name: string, body: import("../schemas").SettingsProfileBody) => Promise<{
1627
- ok: true;
1628
- version?: number | undefined;
2432
+ ok: boolean;
2433
+ version: number;
1629
2434
  }>;
1630
2435
  readonly deleteSettingsProfile: (name: string) => Promise<{
1631
- ok: true;
2436
+ ok: boolean;
1632
2437
  }>;
1633
2438
  readonly diffSettingsProfile: (name: string) => Promise<{
1634
2439
  added: string[];
1635
- removed: string[];
1636
2440
  changed: {
1637
2441
  key: string;
1638
- old: string;
1639
2442
  new: string;
2443
+ old: string;
1640
2444
  }[];
1641
2445
  recycle_keys: string[];
1642
2446
  refused_keys: string[];
2447
+ removed: string[];
1643
2448
  }>;
1644
2449
  readonly applySettingsProfile: (name: string) => Promise<{
1645
- hot: string[];
1646
- recycle: {
2450
+ awaiting_respawn: {
2451
+ keys: string[];
1647
2452
  name: string;
1648
- kind: string;
1649
- status: string;
1650
- generation_before: number;
1651
2453
  }[];
1652
2454
  fresh: {
1653
- name: string;
1654
- kind: string;
1655
2455
  generation: number;
2456
+ kind: string;
2457
+ name: string;
1656
2458
  }[];
1657
- refused: {
1658
- key: string;
1659
- reason: string;
2459
+ hot: string[];
2460
+ recycle: {
2461
+ detail: string | null;
2462
+ generation_before: number;
2463
+ kind: string;
2464
+ name: string;
2465
+ status: string;
1660
2466
  }[];
2467
+ recycle_stopped: {
2468
+ detail: string;
2469
+ kind: string;
2470
+ name: string | null;
2471
+ } | null;
2472
+ refused: string[];
1661
2473
  fanout: {
1662
2474
  mode: "local-only";
1663
2475
  note: string;
1664
2476
  } | {
2477
+ error: string | null;
2478
+ local_only: boolean;
1665
2479
  op: string;
1666
2480
  reachable: boolean;
1667
- local_only: boolean;
1668
2481
  results: {
2482
+ detail: string | null;
2483
+ error: string | null;
1669
2484
  name: string;
1670
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2485
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1671
2486
  payload: unknown;
1672
- error: string | null;
1673
- detail: string | null;
1674
2487
  }[];
1675
- error: string | null;
1676
2488
  mode: "fleet";
1677
2489
  } | {
2490
+ error: string | null;
2491
+ local_only: boolean;
1678
2492
  op: string;
1679
2493
  reachable: boolean;
1680
- local_only: boolean;
1681
2494
  results: {
2495
+ detail: string | null;
2496
+ error: string | null;
1682
2497
  name: string;
1683
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2498
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1684
2499
  payload: unknown;
1685
- error: string | null;
1686
- detail: string | null;
1687
2500
  }[];
1688
- error: string | null;
1689
2501
  mode: "unreachable";
1690
2502
  };
1691
2503
  }>;
1692
2504
  readonly listSettingsProfileVersions: (name: string, signal?: AbortSignal) => Promise<{
1693
- version: number;
1694
- tags: string[];
1695
2505
  created_at: string;
1696
2506
  is_current: boolean;
2507
+ tags: string[];
2508
+ version: number;
1697
2509
  }[]>;
1698
2510
  readonly getSettingsProfileVersion: (name: string, version: number, signal?: AbortSignal) => Promise<{
1699
- version: number;
1700
- tags: string[];
1701
- created_at: string;
1702
- is_current: boolean;
1703
2511
  body: {
1704
2512
  description: string;
1705
2513
  env: Record<string, string>;
1706
2514
  secret_keys: string[];
1707
2515
  };
2516
+ created_at: string;
2517
+ is_current: boolean;
2518
+ tags: string[];
2519
+ version: number;
1708
2520
  }>;
1709
2521
  readonly rollbackSettingsProfile: (name: string, version: number) => Promise<{
1710
- ok: true;
2522
+ ok: boolean;
1711
2523
  version: number;
1712
2524
  }>;
1713
2525
  readonly getEnvConfig: (signal?: AbortSignal) => Promise<{
1714
2526
  env: Record<string, string>;
1715
2527
  secret_keys: string[];
1716
2528
  }>;
1717
- readonly setEnvConfig: (env: Record<string, string>) => Promise<{
1718
- status: string;
2529
+ readonly setEnvConfig: (body: {
2530
+ env: Record<string, string>;
2531
+ secret_keys?: string[] | null;
2532
+ }) => Promise<{
2533
+ awaiting_respawn: {
2534
+ keys: string[];
2535
+ name: string;
2536
+ }[];
1719
2537
  env_keys: number;
2538
+ recycle: {
2539
+ fresh: {
2540
+ generation: number;
2541
+ kind: string;
2542
+ name: string;
2543
+ }[];
2544
+ recycle: {
2545
+ detail: string | null;
2546
+ generation_before: number;
2547
+ kind: string;
2548
+ name: string;
2549
+ status: string;
2550
+ }[];
2551
+ recycle_stopped: {
2552
+ detail: string;
2553
+ kind: string;
2554
+ name: string | null;
2555
+ } | null;
2556
+ } | null;
2557
+ status: string;
1720
2558
  fanout: {
1721
2559
  mode: "local-only";
1722
2560
  note: string;
1723
2561
  } | {
2562
+ error: string | null;
2563
+ local_only: boolean;
1724
2564
  op: string;
1725
2565
  reachable: boolean;
1726
- local_only: boolean;
1727
2566
  results: {
2567
+ detail: string | null;
2568
+ error: string | null;
1728
2569
  name: string;
1729
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2570
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1730
2571
  payload: unknown;
1731
- error: string | null;
1732
- detail: string | null;
1733
2572
  }[];
1734
- error: string | null;
1735
2573
  mode: "fleet";
1736
2574
  } | {
2575
+ error: string | null;
2576
+ local_only: boolean;
1737
2577
  op: string;
1738
2578
  reachable: boolean;
1739
- local_only: boolean;
1740
2579
  results: {
2580
+ detail: string | null;
2581
+ error: string | null;
1741
2582
  name: string;
1742
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2583
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1743
2584
  payload: unknown;
1744
- error: string | null;
1745
- detail: string | null;
1746
2585
  }[];
1747
- error: string | null;
1748
2586
  mode: "unreachable";
1749
2587
  };
1750
2588
  }>;
@@ -1753,19 +2591,22 @@ export declare function createApiClient(config: ApiConfig): {
1753
2591
  read_only: boolean;
1754
2592
  }>;
1755
2593
  readonly reloadConfig: (targets?: string[] | null) => Promise<{
2594
+ error: string | null;
2595
+ local_only: boolean;
2596
+ ok: boolean;
1756
2597
  op: string;
1757
2598
  reachable: boolean;
1758
- local_only: boolean;
1759
2599
  results: {
2600
+ detail: string | null;
2601
+ error: string | null;
1760
2602
  name: string;
1761
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2603
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1762
2604
  payload: unknown;
1763
- error: string | null;
1764
- detail: string | null;
1765
2605
  }[];
1766
- error: string | null;
1767
2606
  }>;
1768
2607
  readonly listSubMcp: (signal?: AbortSignal) => Promise<Record<string, {
2608
+ access_pattern: string;
2609
+ mount_url: string;
1769
2610
  tools: string[];
1770
2611
  transport: string;
1771
2612
  }>>;
@@ -1775,10 +2616,11 @@ export declare function createApiClient(config: ApiConfig): {
1775
2616
  transport: string;
1776
2617
  }>;
1777
2618
  readonly deleteSubMcp: (slug: string) => Promise<{
2619
+ removed: boolean;
1778
2620
  slug: string;
1779
- removed: true;
1780
2621
  }>;
1781
2622
  readonly getManifest: (signal?: AbortSignal) => Promise<{
2623
+ user_tools: string[];
1782
2624
  mcp: {
1783
2625
  [x: string]: unknown;
1784
2626
  managed?: {
@@ -1787,404 +2629,637 @@ export declare function createApiClient(config: ApiConfig): {
1787
2629
  sub_service: string;
1788
2630
  } | null | undefined;
1789
2631
  }[];
1790
- user_tools: string[];
1791
2632
  }>;
1792
2633
  readonly setMcpConfig: (mcp: unknown[]) => Promise<{
1793
- status: string;
2634
+ awaiting_respawn: {
2635
+ keys: string[];
2636
+ name: string;
2637
+ }[];
1794
2638
  env_keys: number;
2639
+ recycle: {
2640
+ fresh: {
2641
+ generation: number;
2642
+ kind: string;
2643
+ name: string;
2644
+ }[];
2645
+ recycle: {
2646
+ detail: string | null;
2647
+ generation_before: number;
2648
+ kind: string;
2649
+ name: string;
2650
+ status: string;
2651
+ }[];
2652
+ recycle_stopped: {
2653
+ detail: string;
2654
+ kind: string;
2655
+ name: string | null;
2656
+ } | null;
2657
+ } | null;
2658
+ status: string;
1795
2659
  fanout: {
1796
2660
  mode: "local-only";
1797
2661
  note: string;
1798
2662
  } | {
2663
+ error: string | null;
2664
+ local_only: boolean;
1799
2665
  op: string;
1800
2666
  reachable: boolean;
1801
- local_only: boolean;
1802
2667
  results: {
2668
+ detail: string | null;
2669
+ error: string | null;
1803
2670
  name: string;
1804
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2671
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1805
2672
  payload: unknown;
1806
- error: string | null;
1807
- detail: string | null;
1808
2673
  }[];
1809
- error: string | null;
1810
2674
  mode: "fleet";
1811
2675
  } | {
2676
+ error: string | null;
2677
+ local_only: boolean;
1812
2678
  op: string;
1813
2679
  reachable: boolean;
1814
- local_only: boolean;
1815
2680
  results: {
2681
+ detail: string | null;
2682
+ error: string | null;
1816
2683
  name: string;
1817
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2684
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1818
2685
  payload: unknown;
1819
- error: string | null;
1820
- detail: string | null;
1821
2686
  }[];
1822
- error: string | null;
1823
2687
  mode: "unreachable";
1824
2688
  };
1825
2689
  }>;
1826
2690
  readonly getMcpStatus: (signal?: AbortSignal) => Promise<{
1827
2691
  bound: Record<string, string[]>;
1828
2692
  failed: {
1829
- title: string;
2693
+ category: string;
2694
+ http_status: number | null;
2695
+ message: string;
1830
2696
  status: string;
1831
- category?: string | undefined;
1832
- message?: string | undefined;
1833
- http_status?: number | null | undefined;
2697
+ title: string;
1834
2698
  }[];
2699
+ health: Record<string, {
2700
+ consecutive_failures: number;
2701
+ failing_since: string | null;
2702
+ last_error: Record<string, string> | null;
2703
+ last_success: string | null;
2704
+ }>;
1835
2705
  }>;
1836
2706
  readonly reloadMcp: (title: string) => Promise<{
2707
+ error: string | null;
2708
+ local_only: boolean;
2709
+ ok: boolean;
1837
2710
  op: string;
1838
2711
  reachable: boolean;
1839
- local_only: boolean;
1840
2712
  results: {
2713
+ detail: string | null;
2714
+ error: string | null;
1841
2715
  name: string;
1842
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2716
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1843
2717
  payload: unknown;
1844
- error: string | null;
1845
- detail: string | null;
1846
2718
  }[];
1847
- error: string | null;
1848
2719
  }>;
1849
2720
  readonly addToolsEntries: (entries: readonly unknown[], replace?: boolean) => Promise<{
1850
- status: string;
2721
+ awaiting_respawn: {
2722
+ keys: string[];
2723
+ name: string;
2724
+ }[];
1851
2725
  env_keys: number;
2726
+ recycle: {
2727
+ fresh: {
2728
+ generation: number;
2729
+ kind: string;
2730
+ name: string;
2731
+ }[];
2732
+ recycle: {
2733
+ detail: string | null;
2734
+ generation_before: number;
2735
+ kind: string;
2736
+ name: string;
2737
+ status: string;
2738
+ }[];
2739
+ recycle_stopped: {
2740
+ detail: string;
2741
+ kind: string;
2742
+ name: string | null;
2743
+ } | null;
2744
+ } | null;
2745
+ status: string;
1852
2746
  fanout: {
1853
2747
  mode: "local-only";
1854
2748
  note: string;
1855
2749
  } | {
2750
+ error: string | null;
2751
+ local_only: boolean;
1856
2752
  op: string;
1857
2753
  reachable: boolean;
1858
- local_only: boolean;
1859
2754
  results: {
2755
+ detail: string | null;
2756
+ error: string | null;
1860
2757
  name: string;
1861
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2758
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1862
2759
  payload: unknown;
1863
- error: string | null;
1864
- detail: string | null;
1865
2760
  }[];
1866
- error: string | null;
1867
2761
  mode: "fleet";
1868
2762
  } | {
2763
+ error: string | null;
2764
+ local_only: boolean;
1869
2765
  op: string;
1870
2766
  reachable: boolean;
1871
- local_only: boolean;
1872
2767
  results: {
2768
+ detail: string | null;
2769
+ error: string | null;
1873
2770
  name: string;
1874
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2771
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1875
2772
  payload: unknown;
1876
- error: string | null;
1877
- detail: string | null;
1878
2773
  }[];
1879
- error: string | null;
1880
2774
  mode: "unreachable";
1881
2775
  };
1882
2776
  }>;
1883
2777
  readonly removeToolsEntry: (title: string) => Promise<{
1884
- status: string;
2778
+ awaiting_respawn: {
2779
+ keys: string[];
2780
+ name: string;
2781
+ }[];
1885
2782
  env_keys: number;
2783
+ recycle: {
2784
+ fresh: {
2785
+ generation: number;
2786
+ kind: string;
2787
+ name: string;
2788
+ }[];
2789
+ recycle: {
2790
+ detail: string | null;
2791
+ generation_before: number;
2792
+ kind: string;
2793
+ name: string;
2794
+ status: string;
2795
+ }[];
2796
+ recycle_stopped: {
2797
+ detail: string;
2798
+ kind: string;
2799
+ name: string | null;
2800
+ } | null;
2801
+ } | null;
2802
+ status: string;
1886
2803
  fanout: {
1887
2804
  mode: "local-only";
1888
2805
  note: string;
1889
2806
  } | {
2807
+ error: string | null;
2808
+ local_only: boolean;
1890
2809
  op: string;
1891
2810
  reachable: boolean;
1892
- local_only: boolean;
1893
2811
  results: {
2812
+ detail: string | null;
2813
+ error: string | null;
1894
2814
  name: string;
1895
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2815
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1896
2816
  payload: unknown;
1897
- error: string | null;
1898
- detail: string | null;
1899
2817
  }[];
1900
- error: string | null;
1901
2818
  mode: "fleet";
1902
2819
  } | {
2820
+ error: string | null;
2821
+ local_only: boolean;
1903
2822
  op: string;
1904
2823
  reachable: boolean;
1905
- local_only: boolean;
1906
2824
  results: {
2825
+ detail: string | null;
2826
+ error: string | null;
1907
2827
  name: string;
1908
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2828
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1909
2829
  payload: unknown;
1910
- error: string | null;
1911
- detail: string | null;
1912
2830
  }[];
1913
- error: string | null;
1914
2831
  mode: "unreachable";
1915
2832
  };
1916
2833
  }>;
1917
2834
  readonly addAgentsEntries: (entries: readonly unknown[], replace?: boolean) => Promise<{
1918
- status: string;
2835
+ awaiting_respawn: {
2836
+ keys: string[];
2837
+ name: string;
2838
+ }[];
1919
2839
  env_keys: number;
2840
+ recycle: {
2841
+ fresh: {
2842
+ generation: number;
2843
+ kind: string;
2844
+ name: string;
2845
+ }[];
2846
+ recycle: {
2847
+ detail: string | null;
2848
+ generation_before: number;
2849
+ kind: string;
2850
+ name: string;
2851
+ status: string;
2852
+ }[];
2853
+ recycle_stopped: {
2854
+ detail: string;
2855
+ kind: string;
2856
+ name: string | null;
2857
+ } | null;
2858
+ } | null;
2859
+ status: string;
1920
2860
  fanout: {
1921
2861
  mode: "local-only";
1922
2862
  note: string;
1923
2863
  } | {
2864
+ error: string | null;
2865
+ local_only: boolean;
1924
2866
  op: string;
1925
2867
  reachable: boolean;
1926
- local_only: boolean;
1927
2868
  results: {
2869
+ detail: string | null;
2870
+ error: string | null;
1928
2871
  name: string;
1929
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2872
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1930
2873
  payload: unknown;
1931
- error: string | null;
1932
- detail: string | null;
1933
2874
  }[];
1934
- error: string | null;
1935
2875
  mode: "fleet";
1936
2876
  } | {
2877
+ error: string | null;
2878
+ local_only: boolean;
1937
2879
  op: string;
1938
2880
  reachable: boolean;
1939
- local_only: boolean;
1940
2881
  results: {
2882
+ detail: string | null;
2883
+ error: string | null;
1941
2884
  name: string;
1942
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2885
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1943
2886
  payload: unknown;
1944
- error: string | null;
1945
- detail: string | null;
1946
2887
  }[];
1947
- error: string | null;
1948
2888
  mode: "unreachable";
1949
2889
  };
1950
2890
  }>;
1951
2891
  readonly removeAgentsEntry: (title: string) => Promise<{
1952
- status: string;
2892
+ awaiting_respawn: {
2893
+ keys: string[];
2894
+ name: string;
2895
+ }[];
1953
2896
  env_keys: number;
2897
+ recycle: {
2898
+ fresh: {
2899
+ generation: number;
2900
+ kind: string;
2901
+ name: string;
2902
+ }[];
2903
+ recycle: {
2904
+ detail: string | null;
2905
+ generation_before: number;
2906
+ kind: string;
2907
+ name: string;
2908
+ status: string;
2909
+ }[];
2910
+ recycle_stopped: {
2911
+ detail: string;
2912
+ kind: string;
2913
+ name: string | null;
2914
+ } | null;
2915
+ } | null;
2916
+ status: string;
1954
2917
  fanout: {
1955
2918
  mode: "local-only";
1956
2919
  note: string;
1957
2920
  } | {
2921
+ error: string | null;
2922
+ local_only: boolean;
1958
2923
  op: string;
1959
2924
  reachable: boolean;
1960
- local_only: boolean;
1961
2925
  results: {
2926
+ detail: string | null;
2927
+ error: string | null;
1962
2928
  name: string;
1963
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2929
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1964
2930
  payload: unknown;
1965
- error: string | null;
1966
- detail: string | null;
1967
2931
  }[];
1968
- error: string | null;
1969
2932
  mode: "fleet";
1970
2933
  } | {
2934
+ error: string | null;
2935
+ local_only: boolean;
1971
2936
  op: string;
1972
2937
  reachable: boolean;
1973
- local_only: boolean;
1974
2938
  results: {
2939
+ detail: string | null;
2940
+ error: string | null;
1975
2941
  name: string;
1976
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2942
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1977
2943
  payload: unknown;
1978
- error: string | null;
1979
- detail: string | null;
1980
2944
  }[];
1981
- error: string | null;
1982
2945
  mode: "unreachable";
1983
2946
  };
1984
2947
  }>;
1985
2948
  readonly updateApiTools: (body: import("./manifest-client").ApiToolsListsBody) => Promise<{
1986
- status: string;
2949
+ awaiting_respawn: {
2950
+ keys: string[];
2951
+ name: string;
2952
+ }[];
1987
2953
  env_keys: number;
2954
+ recycle: {
2955
+ fresh: {
2956
+ generation: number;
2957
+ kind: string;
2958
+ name: string;
2959
+ }[];
2960
+ recycle: {
2961
+ detail: string | null;
2962
+ generation_before: number;
2963
+ kind: string;
2964
+ name: string;
2965
+ status: string;
2966
+ }[];
2967
+ recycle_stopped: {
2968
+ detail: string;
2969
+ kind: string;
2970
+ name: string | null;
2971
+ } | null;
2972
+ } | null;
2973
+ status: string;
1988
2974
  fanout: {
1989
2975
  mode: "local-only";
1990
2976
  note: string;
1991
2977
  } | {
2978
+ error: string | null;
2979
+ local_only: boolean;
1992
2980
  op: string;
1993
2981
  reachable: boolean;
1994
- local_only: boolean;
1995
2982
  results: {
2983
+ detail: string | null;
2984
+ error: string | null;
1996
2985
  name: string;
1997
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2986
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
1998
2987
  payload: unknown;
1999
- error: string | null;
2000
- detail: string | null;
2001
2988
  }[];
2002
- error: string | null;
2003
2989
  mode: "fleet";
2004
2990
  } | {
2991
+ error: string | null;
2992
+ local_only: boolean;
2005
2993
  op: string;
2006
2994
  reachable: boolean;
2007
- local_only: boolean;
2008
2995
  results: {
2996
+ detail: string | null;
2997
+ error: string | null;
2009
2998
  name: string;
2010
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
2999
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
2011
3000
  payload: unknown;
2012
- error: string | null;
2013
- detail: string | null;
2014
3001
  }[];
2015
- error: string | null;
2016
3002
  mode: "unreachable";
2017
3003
  };
2018
3004
  }>;
2019
3005
  readonly listFailedMcps: (signal?: AbortSignal) => Promise<{
3006
+ error: string | null;
3007
+ local_only: boolean;
3008
+ ok: boolean;
2020
3009
  op: string;
2021
3010
  reachable: boolean;
2022
- local_only: boolean;
2023
3011
  results: {
3012
+ detail: string | null;
3013
+ error: string | null;
2024
3014
  name: string;
2025
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
3015
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
2026
3016
  payload: unknown;
2027
- error: string | null;
2028
- detail: string | null;
2029
3017
  }[];
2030
- error: string | null;
2031
3018
  }>;
2032
3019
  readonly reloadFailedMcps: () => Promise<{
3020
+ error: string | null;
3021
+ local_only: boolean;
3022
+ ok: boolean;
2033
3023
  op: string;
2034
3024
  reachable: boolean;
2035
- local_only: boolean;
2036
3025
  results: {
3026
+ detail: string | null;
3027
+ error: string | null;
2037
3028
  name: string;
2038
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
3029
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
2039
3030
  payload: unknown;
2040
- error: string | null;
2041
- detail: string | null;
2042
3031
  }[];
2043
- error: string | null;
2044
3032
  }>;
2045
3033
  readonly deregisterMcp: (title: string) => Promise<{
3034
+ error: string | null;
3035
+ local_only: boolean;
3036
+ ok: boolean;
2046
3037
  op: string;
2047
3038
  reachable: boolean;
2048
- local_only: boolean;
2049
3039
  results: {
3040
+ detail: string | null;
3041
+ error: string | null;
2050
3042
  name: string;
2051
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
3043
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
2052
3044
  payload: unknown;
2053
- error: string | null;
2054
- detail: string | null;
2055
3045
  }[];
2056
- error: string | null;
2057
3046
  }>;
2058
3047
  readonly listTemplates: (signal?: AbortSignal) => Promise<string[]>;
2059
3048
  readonly getTemplate: (templateId: string) => Promise<{
2060
- template: string;
2061
3049
  schema: Record<string, unknown>;
3050
+ template: string;
2062
3051
  }>;
2063
3052
  readonly uploadTemplate: (path: string, content: string) => Promise<{
3053
+ fanout: {
3054
+ error: string | null;
3055
+ local_only: boolean | null;
3056
+ mode: string;
3057
+ note: string | null;
3058
+ op: string | null;
3059
+ reachable: boolean | null;
3060
+ results: {
3061
+ detail: string | null;
3062
+ error: string | null;
3063
+ name: string;
3064
+ outcome: string;
3065
+ payload: unknown;
3066
+ }[] | null;
3067
+ };
2064
3068
  path: string;
2065
- uploaded: true;
3069
+ uploaded: boolean;
2066
3070
  }>;
2067
3071
  readonly deleteTemplate: (path: string) => Promise<{
3072
+ deleted: boolean;
3073
+ fanout: {
3074
+ error: string | null;
3075
+ local_only: boolean | null;
3076
+ mode: string;
3077
+ note: string | null;
3078
+ op: string | null;
3079
+ reachable: boolean | null;
3080
+ results: {
3081
+ detail: string | null;
3082
+ error: string | null;
3083
+ name: string;
3084
+ outcome: string;
3085
+ payload: unknown;
3086
+ }[] | null;
3087
+ };
2068
3088
  path: string;
2069
- deleted: true;
2070
3089
  }>;
2071
3090
  readonly deleteTemplateDir: (path: string) => Promise<{
3091
+ deleted: boolean;
3092
+ fanout: {
3093
+ error: string | null;
3094
+ local_only: boolean | null;
3095
+ mode: string;
3096
+ note: string | null;
3097
+ op: string | null;
3098
+ reachable: boolean | null;
3099
+ results: {
3100
+ detail: string | null;
3101
+ error: string | null;
3102
+ name: string;
3103
+ outcome: string;
3104
+ payload: unknown;
3105
+ }[] | null;
3106
+ };
2072
3107
  path: string;
2073
- deleted: true;
2074
3108
  }>;
2075
3109
  readonly renderTemplate: (text: import("..").TemplatedText) => Promise<{
2076
3110
  rendered: string;
2077
3111
  }>;
2078
3112
  readonly clearTemplatesCache: () => Promise<{
2079
- cleared: true;
3113
+ cleared: boolean;
3114
+ fanout: {
3115
+ error: string | null;
3116
+ local_only: boolean | null;
3117
+ mode: string;
3118
+ note: string | null;
3119
+ op: string | null;
3120
+ reachable: boolean | null;
3121
+ results: {
3122
+ detail: string | null;
3123
+ error: string | null;
3124
+ name: string;
3125
+ outcome: string;
3126
+ payload: unknown;
3127
+ }[] | null;
3128
+ };
2080
3129
  }>;
2081
3130
  readonly listExtensions: (signal?: AbortSignal) => Promise<{
2082
- name: string;
2083
3131
  kind: string;
3132
+ multiple: boolean;
3133
+ name: string;
2084
3134
  }[]>;
2085
3135
  readonly getToolExtensions: (name: string, signal?: AbortSignal) => Promise<{
3136
+ available: {
3137
+ kind: string;
3138
+ multiple: boolean;
3139
+ name: string;
3140
+ }[];
2086
3141
  combos: (string | {
2087
3142
  name: string;
2088
3143
  config: Record<string, unknown>;
2089
3144
  })[][];
2090
- available: {
2091
- name: string;
2092
- kind: string;
2093
- }[];
2094
3145
  }>;
2095
3146
  readonly setToolExtensions: (name: string, combos: readonly import("..").PresetExtensionElement[][]) => Promise<{
2096
- status: string;
3147
+ awaiting_respawn: {
3148
+ keys: string[];
3149
+ name: string;
3150
+ }[];
2097
3151
  env_keys: number;
3152
+ recycle: {
3153
+ fresh: {
3154
+ generation: number;
3155
+ kind: string;
3156
+ name: string;
3157
+ }[];
3158
+ recycle: {
3159
+ detail: string | null;
3160
+ generation_before: number;
3161
+ kind: string;
3162
+ name: string;
3163
+ status: string;
3164
+ }[];
3165
+ recycle_stopped: {
3166
+ detail: string;
3167
+ kind: string;
3168
+ name: string | null;
3169
+ } | null;
3170
+ } | null;
3171
+ status: string;
2098
3172
  fanout: {
2099
3173
  mode: "local-only";
2100
3174
  note: string;
2101
3175
  } | {
3176
+ error: string | null;
3177
+ local_only: boolean;
2102
3178
  op: string;
2103
3179
  reachable: boolean;
2104
- local_only: boolean;
2105
3180
  results: {
3181
+ detail: string | null;
3182
+ error: string | null;
2106
3183
  name: string;
2107
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
3184
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
2108
3185
  payload: unknown;
2109
- error: string | null;
2110
- detail: string | null;
2111
3186
  }[];
2112
- error: string | null;
2113
3187
  mode: "fleet";
2114
3188
  } | {
3189
+ error: string | null;
3190
+ local_only: boolean;
2115
3191
  op: string;
2116
3192
  reachable: boolean;
2117
- local_only: boolean;
2118
3193
  results: {
3194
+ detail: string | null;
3195
+ error: string | null;
2119
3196
  name: string;
2120
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
3197
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
2121
3198
  payload: unknown;
2122
- error: string | null;
2123
- detail: string | null;
2124
3199
  }[];
2125
- error: string | null;
2126
3200
  mode: "unreachable";
2127
3201
  };
2128
3202
  }>;
2129
3203
  readonly getBackendInfo: (signal?: AbortSignal) => Promise<{
2130
- present: boolean;
2131
3204
  backend: string | null;
2132
3205
  module: string | null;
3206
+ present: boolean;
2133
3207
  }>;
2134
3208
  readonly listFleetWorkers: (signal?: AbortSignal) => Promise<{
2135
3209
  workers: {
2136
- name: string;
2137
- kind: "backend" | "serve";
2138
- pid: number;
3210
+ beat_at: string;
2139
3211
  generation: number;
2140
3212
  joined_at: string;
2141
- beat_at: string;
2142
- state: "ready" | "resyncing" | "recycling";
2143
- stale: boolean;
3213
+ kind: "backend" | "serve";
2144
3214
  last_op: {
3215
+ at: string;
2145
3216
  op: string;
2146
3217
  outcome: string;
2147
- at: string;
2148
3218
  } | null;
3219
+ name: string;
3220
+ pid: number;
3221
+ stale: boolean;
3222
+ state: "resyncing" | "recycling" | "ready";
2149
3223
  }[];
2150
3224
  }>;
2151
3225
  readonly reloadFleetConfig: (targets: string[] | null) => Promise<{
3226
+ error: string | null;
3227
+ local_only: boolean;
3228
+ ok: boolean;
2152
3229
  op: string;
2153
3230
  reachable: boolean;
2154
- local_only: boolean;
2155
3231
  results: {
3232
+ detail: string | null;
3233
+ error: string | null;
2156
3234
  name: string;
2157
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
3235
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
2158
3236
  payload: unknown;
2159
- error: string | null;
2160
- detail: string | null;
2161
3237
  }[];
2162
- error: string | null;
2163
3238
  }>;
2164
3239
  readonly getStorageInfo: (signal?: AbortSignal) => Promise<{
3240
+ module: string | null;
2165
3241
  present: boolean;
2166
3242
  provider: string | null;
2167
- module: string | null;
2168
3243
  }>;
2169
3244
  readonly listStorageResources: (signal?: AbortSignal) => Promise<{
2170
3245
  resources: string[];
2171
3246
  }>;
2172
3247
  readonly statStorageResource: (id: string, signal?: AbortSignal) => Promise<{
2173
- id: string;
2174
3248
  content_type: string | null;
3249
+ id: string;
2175
3250
  }>;
2176
3251
  readonly downloadStorageResource: (id: string, signal?: AbortSignal) => Promise<Blob>;
2177
3252
  readonly uploadStorageResource: (body: import("./storage-client").StorageUploadBody) => Promise<{
2178
3253
  id: string;
2179
- stored: true;
3254
+ stored: boolean;
2180
3255
  }>;
2181
3256
  readonly deleteStorageResource: (id: string) => Promise<{
3257
+ deleted: boolean;
2182
3258
  id: string;
2183
- deleted: true;
2184
3259
  }>;
2185
3260
  readonly deleteStorageDir: (path: string) => Promise<{
3261
+ deleted: boolean;
2186
3262
  dir: string;
2187
- deleted: true;
2188
3263
  }>;
2189
3264
  readonly listToolMeta: (signal?: AbortSignal) => Promise<{
2190
3265
  folders: {
@@ -2193,25 +3268,25 @@ export declare function createApiClient(config: ApiConfig): {
2193
3268
  parent_id: string | null;
2194
3269
  }[];
2195
3270
  meta: {
2196
- tool_name: string;
3271
+ badges: string[];
2197
3272
  display_name: string | null;
2198
3273
  folder_id: string | null;
2199
- tags: string[];
2200
- badges: string[];
2201
3274
  hidden: boolean | null;
3275
+ tags: string[];
3276
+ tool_name: string;
2202
3277
  }[];
2203
3278
  }>;
2204
3279
  readonly upsertToolMeta: (toolName: string, patch: import("./tool-meta-client").ToolMetaPatch) => Promise<{
2205
- tool_name: string;
3280
+ badges: string[];
2206
3281
  display_name: string | null;
2207
3282
  folder_id: string | null;
2208
- tags: string[];
2209
- badges: string[];
2210
3283
  hidden: boolean | null;
3284
+ tags: string[];
3285
+ tool_name: string;
2211
3286
  }>;
2212
3287
  readonly deleteToolMeta: (toolName: string) => Promise<{
3288
+ deleted: boolean;
2213
3289
  tool_name: string;
2214
- deleted: true;
2215
3290
  }>;
2216
3291
  readonly createFolder: (name: string, parentId?: string | null) => Promise<{
2217
3292
  id: string;
@@ -2229,15 +3304,18 @@ export declare function createApiClient(config: ApiConfig): {
2229
3304
  parent_id: string | null;
2230
3305
  }>;
2231
3306
  readonly deleteFolder: (folderId: string) => Promise<{
3307
+ deleted: boolean;
2232
3308
  folder_id: string;
2233
- deleted: true;
2234
3309
  }>;
2235
3310
  readonly listStates: (signal?: AbortSignal) => Promise<{
2236
3311
  default_subject_kind: string;
2237
3312
  description: string;
2238
3313
  effective_schema: Record<string, unknown> | null;
2239
3314
  name: string;
2240
- regimes: Record<string, unknown>[] | null;
3315
+ regimes: {
3316
+ path: string[];
3317
+ regime: "single" | "composing" | "free";
3318
+ }[] | null;
2241
3319
  retention_days: number | null;
2242
3320
  subject_kinds: string[];
2243
3321
  updated_at: string | null;
@@ -2252,15 +3330,18 @@ export declare function createApiClient(config: ApiConfig): {
2252
3330
  description: string;
2253
3331
  effective_schema: Record<string, unknown> | null;
2254
3332
  name: string;
2255
- regimes: Record<string, unknown>[] | null;
3333
+ regimes: {
3334
+ path: string[];
3335
+ regime: "single" | "composing" | "free";
3336
+ }[] | null;
2256
3337
  retention_days: number | null;
2257
3338
  subject_kinds: string[];
2258
3339
  updated_at: string | null;
2259
3340
  attachments: {
2260
- template: string;
2261
- path: string[];
2262
- parameters: Record<string, unknown>;
2263
3341
  declarations: Record<string, unknown>;
3342
+ parameters: Record<string, unknown>;
3343
+ path: string[];
3344
+ template: string;
2264
3345
  }[];
2265
3346
  schema?: Record<string, unknown> | {
2266
3347
  content?: string | undefined;
@@ -2273,16 +3354,23 @@ export declare function createApiClient(config: ApiConfig): {
2273
3354
  description: string;
2274
3355
  effective_schema: Record<string, unknown> | null;
2275
3356
  name: string;
2276
- regimes: Record<string, unknown>[] | null;
3357
+ regimes: {
3358
+ path: string[];
3359
+ regime: "single" | "composing" | "free";
3360
+ }[] | null;
2277
3361
  retention_days: number | null;
2278
3362
  subject_kinds: string[];
2279
3363
  updated_at: string | null;
2280
- attachments: {
2281
- template: string;
2282
- path: string[];
2283
- parameters: Record<string, unknown>;
2284
- declarations: Record<string, unknown>;
2285
- }[];
3364
+ held?: {
3365
+ held_by: string;
3366
+ save_id: string;
3367
+ subjects: {
3368
+ key: string;
3369
+ kind: string;
3370
+ target_kind: "tool" | "agent";
3371
+ target_name: string;
3372
+ }[];
3373
+ }[] | undefined;
2286
3374
  schema?: Record<string, unknown> | {
2287
3375
  content?: string | undefined;
2288
3376
  id?: string | undefined;
@@ -2290,138 +3378,179 @@ export declare function createApiClient(config: ApiConfig): {
2290
3378
  } | undefined;
2291
3379
  }>;
2292
3380
  readonly deleteState: (name: string) => Promise<{
3381
+ deleted: boolean;
2293
3382
  name: string;
2294
- deleted: true;
2295
3383
  }>;
2296
3384
  readonly getStateStats: (name: string, signal?: AbortSignal) => Promise<{
2297
- records: number;
3385
+ consumers: number;
2298
3386
  per_field: Record<string, number>;
2299
3387
  per_kind: Record<string, number>;
2300
- consumers: number;
3388
+ records: number;
3389
+ held?: {
3390
+ held_by: string;
3391
+ save_id: string;
3392
+ subjects: {
3393
+ key: string;
3394
+ kind: string;
3395
+ target_kind: "tool" | "agent";
3396
+ target_name: string;
3397
+ }[];
3398
+ }[] | undefined;
2301
3399
  }>;
2302
3400
  readonly listStateAttachments: (name: string, signal?: AbortSignal) => Promise<{
2303
- template: string;
2304
- path: string[];
2305
- parameters: Record<string, unknown>;
2306
3401
  declarations: Record<string, unknown>;
3402
+ parameters: Record<string, unknown>;
3403
+ path: string[];
3404
+ state: string;
3405
+ template: string;
2307
3406
  }[]>;
2308
3407
  readonly getStateAttachment: (name: string, template: string, signal?: AbortSignal) => Promise<{
2309
- template: string;
2310
- path: string[];
2311
- parameters: Record<string, unknown>;
2312
3408
  declarations: Record<string, unknown>;
3409
+ parameters: Record<string, unknown>;
3410
+ path: string[];
3411
+ template: string;
2313
3412
  }>;
2314
3413
  readonly attachStateTemplate: (name: string, template: string, body: import("./states-client").StateAttachmentBody) => Promise<{
2315
- attached: true;
3414
+ attached: boolean;
2316
3415
  state: string;
2317
3416
  template: string;
3417
+ held?: {
3418
+ held_by: string;
3419
+ save_id: string;
3420
+ subjects: {
3421
+ key: string;
3422
+ kind: string;
3423
+ target_kind: "tool" | "agent";
3424
+ target_name: string;
3425
+ }[];
3426
+ }[] | undefined;
2318
3427
  }>;
2319
3428
  readonly patchStateAttachment: (name: string, template: string, body: import("./states-client").StateAttachmentBody) => Promise<{
2320
- updated: true;
2321
3429
  state: string;
2322
3430
  template: string;
3431
+ updated: boolean;
2323
3432
  }>;
2324
3433
  readonly detachStateTemplate: (name: string, template: string) => Promise<{
2325
- detached: true;
3434
+ detached: boolean;
2326
3435
  state: string;
2327
3436
  template: string;
2328
3437
  }>;
2329
3438
  readonly listStateSubjects: (name: string, params: {
2330
3439
  kind?: string;
2331
3440
  } & import("./states-client").StatePageQuery, signal?: AbortSignal) => Promise<{
3441
+ next_cursor: string | null;
2332
3442
  subjects: {
2333
3443
  subject: {
3444
+ key: string;
3445
+ kind: string;
2334
3446
  target_kind: "tool" | "agent";
2335
3447
  target_name: string;
2336
- kind: string;
2337
- key: string;
2338
3448
  };
2339
3449
  updated_at: number;
2340
3450
  }[];
2341
- next_cursor: string | null;
3451
+ held?: {
3452
+ held_by: string;
3453
+ save_id: string;
3454
+ subjects: {
3455
+ key: string;
3456
+ kind: string;
3457
+ target_kind: "tool" | "agent";
3458
+ target_name: string;
3459
+ }[];
3460
+ }[] | undefined;
2342
3461
  }>;
2343
3462
  readonly searchStateRecords: (name: string, body: {
2344
3463
  filters: Record<string, unknown>;
2345
3464
  } & import("./states-client").StatePageQuery, signal?: AbortSignal) => Promise<{
2346
3465
  matches: {
2347
3466
  subject: {
3467
+ key: string;
3468
+ kind: string;
2348
3469
  target_kind: "tool" | "agent";
2349
3470
  target_name: string;
2350
- kind: string;
2351
- key: string;
2352
3471
  };
2353
3472
  updated_at: number;
2354
3473
  }[];
2355
3474
  next_cursor: string | null;
3475
+ held?: {
3476
+ held_by: string;
3477
+ save_id: string;
3478
+ subjects: {
3479
+ key: string;
3480
+ kind: string;
3481
+ target_kind: "tool" | "agent";
3482
+ target_name: string;
3483
+ }[];
3484
+ }[] | undefined;
2356
3485
  }>;
2357
3486
  readonly getStateRecord: (name: string, subject: import("./states-client").StateSubjectRef, signal?: AbortSignal) => Promise<{
2358
- state: string;
2359
- subject: {
2360
- target_kind: "tool" | "agent";
2361
- target_name: string;
2362
- kind: string;
2363
- key: string;
2364
- };
2365
- data: Record<string, unknown>;
2366
- seq: number;
2367
3487
  canonical_subject: {
3488
+ key: string;
3489
+ kind: string;
2368
3490
  target_kind: "tool" | "agent";
2369
3491
  target_name: string;
2370
- kind: string;
2371
- key: string;
2372
3492
  };
3493
+ data: Record<string, unknown>;
2373
3494
  folded_from: {
3495
+ key: string;
3496
+ kind: string;
2374
3497
  target_kind: "tool" | "agent";
2375
3498
  target_name: string;
2376
- kind: string;
2377
- key: string;
2378
3499
  }[];
2379
- } | null>;
2380
- readonly putStateRecord: (name: string, subject: import("./states-client").StateSubjectRef, data: Record<string, unknown>) => Promise<{
3500
+ seq: number;
2381
3501
  state: string;
2382
3502
  subject: {
3503
+ key: string;
3504
+ kind: string;
2383
3505
  target_kind: "tool" | "agent";
2384
3506
  target_name: string;
2385
- kind: string;
2386
- key: string;
2387
3507
  };
2388
- data: Record<string, unknown>;
2389
- seq: number;
3508
+ } | null>;
3509
+ readonly putStateRecord: (name: string, subject: import("./states-client").StateSubjectRef, data: Record<string, unknown>) => Promise<{
2390
3510
  canonical_subject: {
3511
+ key: string;
3512
+ kind: string;
2391
3513
  target_kind: "tool" | "agent";
2392
3514
  target_name: string;
2393
- kind: string;
2394
- key: string;
2395
3515
  };
3516
+ data: Record<string, unknown>;
2396
3517
  folded_from: {
3518
+ key: string;
3519
+ kind: string;
2397
3520
  target_kind: "tool" | "agent";
2398
3521
  target_name: string;
2399
- kind: string;
2400
- key: string;
2401
3522
  }[];
2402
- }>;
2403
- readonly patchStateRecord: (name: string, subject: import("./states-client").StateSubjectRef, data: Record<string, unknown>) => Promise<{
3523
+ seq: number;
2404
3524
  state: string;
2405
3525
  subject: {
3526
+ key: string;
3527
+ kind: string;
3528
+ target_kind: "tool" | "agent";
3529
+ target_name: string;
3530
+ };
3531
+ }>;
3532
+ readonly patchStateRecord: (name: string, subject: import("./states-client").StateSubjectRef, data: Record<string, unknown>) => Promise<{
3533
+ canonical_subject: {
3534
+ key: string;
3535
+ kind: string;
2406
3536
  target_kind: "tool" | "agent";
2407
3537
  target_name: string;
2408
- kind: string;
2409
- key: string;
2410
3538
  };
2411
3539
  data: Record<string, unknown>;
2412
- seq: number;
2413
- canonical_subject: {
3540
+ folded_from: {
3541
+ key: string;
3542
+ kind: string;
2414
3543
  target_kind: "tool" | "agent";
2415
3544
  target_name: string;
2416
- kind: string;
3545
+ }[];
3546
+ seq: number;
3547
+ state: string;
3548
+ subject: {
2417
3549
  key: string;
2418
- };
2419
- folded_from: {
3550
+ kind: string;
2420
3551
  target_kind: "tool" | "agent";
2421
3552
  target_name: string;
2422
- kind: string;
2423
- key: string;
2424
- }[];
3553
+ };
2425
3554
  }>;
2426
3555
  readonly applyStateRecord: (name: string, subject: import("./states-client").StateSubjectRef, ops: readonly Record<string, unknown>[]) => Promise<{
2427
3556
  applied: boolean;
@@ -2438,55 +3567,56 @@ export declare function createApiClient(config: ApiConfig): {
2438
3567
  input?: unknown;
2439
3568
  op_id?: string;
2440
3569
  }) => Promise<{
2441
- name: string;
2442
3570
  applied: boolean;
2443
3571
  data: Record<string, unknown> | null;
3572
+ name: string;
2444
3573
  seq: number | null;
2445
3574
  skipped: Record<string, unknown>[];
2446
3575
  }>;
2447
3576
  readonly deleteStateRecord: (name: string, subject: import("./states-client").StateSubjectRef) => Promise<{
2448
- erased: true;
3577
+ erased: boolean;
2449
3578
  }>;
2450
3579
  readonly foldStateRecord: (name: string, subject: import("./states-client").StateSubjectRef, into: import("./states-client").StateSubjectRef, mode: "switch" | "merge") => Promise<{
2451
- mode: "switch" | "merge";
3580
+ already: boolean;
3581
+ flattened: number;
2452
3582
  from: {
2453
- kind: string;
2454
3583
  key: string;
3584
+ kind: string;
2455
3585
  };
2456
3586
  into: {
2457
- kind: string;
2458
3587
  key: string;
3588
+ kind: string;
2459
3589
  };
2460
- already: boolean;
2461
- flattened: number;
3590
+ merged_members: string[] | null;
3591
+ mode: "switch" | "merge";
2462
3592
  }>;
2463
3593
  readonly listStateWrites: (name: string, subject: import("./states-client").StateSubjectRef, params?: import("./states-client").StatePageQuery, signal?: AbortSignal) => Promise<{
2464
3594
  items: {
2465
- seq: number;
2466
3595
  at: string;
2467
3596
  origin: {
3597
+ actor: string | null;
2468
3598
  consumer: string | null;
3599
+ door: "tool" | "api" | "conversation" | "hook" | "schedule" | "operator";
3600
+ inbound_id: string | null;
2469
3601
  meta: Record<string, unknown> | null;
2470
- run_id: string | null;
2471
3602
  op_id: string | null;
2472
- door: string;
2473
- actor: string | null;
3603
+ run_id: string | null;
2474
3604
  turn_id: string | null;
2475
- inbound_id: string | null;
2476
3605
  };
2477
3606
  paths: (string | number)[][];
3607
+ seq: number;
2478
3608
  }[];
2479
3609
  next_cursor: string | null;
2480
3610
  }>;
2481
3611
  readonly stateConsumers: (name: string, signal?: AbortSignal) => Promise<{
2482
- kind: string;
2483
- name: string | null;
2484
3612
  detail: string | null;
3613
+ kind: string;
2485
3614
  link: {
2486
- token: string | null;
2487
3615
  plugin_path: string | null;
2488
3616
  search: Record<string, unknown> | null;
3617
+ token: string | null;
2489
3618
  } | null;
3619
+ name: string | null;
2490
3620
  unavailable: string | null;
2491
3621
  }[]>;
2492
3622
  readonly listStateTemplates: (signal?: AbortSignal) => Promise<{
@@ -2501,7 +3631,10 @@ export declare function createApiClient(config: ApiConfig): {
2501
3631
  description: string;
2502
3632
  kind: "state-template";
2503
3633
  name: string;
2504
- parameters: Record<string, unknown>;
3634
+ parameters: Record<string, {
3635
+ schema: Record<string, unknown>;
3636
+ default?: unknown;
3637
+ }>;
2505
3638
  reconcile: {
2506
3639
  close: {
2507
3640
  content?: string | undefined;
@@ -2519,7 +3652,10 @@ export declare function createApiClient(config: ApiConfig): {
2519
3652
  kwargs?: Record<string, unknown> | undefined;
2520
3653
  };
2521
3654
  } | null;
2522
- regimes: Record<string, unknown>[];
3655
+ regimes: {
3656
+ path: string[];
3657
+ regime: "single" | "composing" | "free";
3658
+ }[];
2523
3659
  template_jq: Record<string, {
2524
3660
  description: string;
2525
3661
  jq: {
@@ -2532,7 +3668,6 @@ export declare function createApiClient(config: ApiConfig): {
2532
3668
  reads: string[][];
2533
3669
  writes: string[][];
2534
3670
  }> | null;
2535
- trace: Record<string, unknown>;
2536
3671
  attached_to: number;
2537
3672
  shipped_default: boolean;
2538
3673
  schema?: Record<string, unknown> | {
@@ -2540,6 +3675,9 @@ export declare function createApiClient(config: ApiConfig): {
2540
3675
  id?: string | undefined;
2541
3676
  kwargs?: Record<string, unknown> | undefined;
2542
3677
  } | undefined;
3678
+ trace?: {
3679
+ enabled: boolean;
3680
+ } | undefined;
2543
3681
  }[]>;
2544
3682
  readonly getStateTemplate: (name: string, signal?: AbortSignal) => Promise<{
2545
3683
  declarations: {
@@ -2553,7 +3691,10 @@ export declare function createApiClient(config: ApiConfig): {
2553
3691
  description: string;
2554
3692
  kind: "state-template";
2555
3693
  name: string;
2556
- parameters: Record<string, unknown>;
3694
+ parameters: Record<string, {
3695
+ schema: Record<string, unknown>;
3696
+ default?: unknown;
3697
+ }>;
2557
3698
  reconcile: {
2558
3699
  close: {
2559
3700
  content?: string | undefined;
@@ -2571,7 +3712,10 @@ export declare function createApiClient(config: ApiConfig): {
2571
3712
  kwargs?: Record<string, unknown> | undefined;
2572
3713
  };
2573
3714
  } | null;
2574
- regimes: Record<string, unknown>[];
3715
+ regimes: {
3716
+ path: string[];
3717
+ regime: "single" | "composing" | "free";
3718
+ }[];
2575
3719
  template_jq: Record<string, {
2576
3720
  description: string;
2577
3721
  jq: {
@@ -2584,12 +3728,14 @@ export declare function createApiClient(config: ApiConfig): {
2584
3728
  reads: string[][];
2585
3729
  writes: string[][];
2586
3730
  }> | null;
2587
- trace: Record<string, unknown>;
2588
3731
  schema?: Record<string, unknown> | {
2589
3732
  content?: string | undefined;
2590
3733
  id?: string | undefined;
2591
3734
  kwargs?: Record<string, unknown> | undefined;
2592
3735
  } | undefined;
3736
+ trace?: {
3737
+ enabled: boolean;
3738
+ } | undefined;
2593
3739
  }>;
2594
3740
  readonly putStateTemplate: (name: string, body: import("./states-client").StateTemplateBody, replace?: boolean) => Promise<{
2595
3741
  declarations: {
@@ -2603,7 +3749,10 @@ export declare function createApiClient(config: ApiConfig): {
2603
3749
  description: string;
2604
3750
  kind: "state-template";
2605
3751
  name: string;
2606
- parameters: Record<string, unknown>;
3752
+ parameters: Record<string, {
3753
+ schema: Record<string, unknown>;
3754
+ default?: unknown;
3755
+ }>;
2607
3756
  reconcile: {
2608
3757
  close: {
2609
3758
  content?: string | undefined;
@@ -2621,7 +3770,10 @@ export declare function createApiClient(config: ApiConfig): {
2621
3770
  kwargs?: Record<string, unknown> | undefined;
2622
3771
  };
2623
3772
  } | null;
2624
- regimes: Record<string, unknown>[];
3773
+ regimes: {
3774
+ path: string[];
3775
+ regime: "single" | "composing" | "free";
3776
+ }[];
2625
3777
  template_jq: Record<string, {
2626
3778
  description: string;
2627
3779
  jq: {
@@ -2634,70 +3786,124 @@ export declare function createApiClient(config: ApiConfig): {
2634
3786
  reads: string[][];
2635
3787
  writes: string[][];
2636
3788
  }> | null;
2637
- trace: Record<string, unknown>;
2638
3789
  schema?: Record<string, unknown> | {
2639
3790
  content?: string | undefined;
2640
3791
  id?: string | undefined;
2641
3792
  kwargs?: Record<string, unknown> | undefined;
2642
3793
  } | undefined;
3794
+ trace?: {
3795
+ enabled: boolean;
3796
+ } | undefined;
2643
3797
  }>;
2644
3798
  readonly deleteStateTemplate: (name: string) => Promise<{
3799
+ deleted: boolean;
2645
3800
  name: string;
2646
- deleted: true;
2647
3801
  }>;
2648
3802
  readonly pruneStateRetention: () => Promise<{
2649
3803
  pruned: Record<string, number>;
3804
+ held?: {
3805
+ held_by: string;
3806
+ save_id: string;
3807
+ subjects: {
3808
+ key: string;
3809
+ kind: string;
3810
+ target_kind: "tool" | "agent";
3811
+ target_name: string;
3812
+ }[];
3813
+ }[] | undefined;
3814
+ }>;
3815
+ readonly listPendingSaves: (params: {
3816
+ status?: "outstanding" | "failed";
3817
+ } & import("./states-client").StatePageQuery, signal?: AbortSignal) => Promise<{
3818
+ failed: number;
3819
+ items: {
3820
+ attempts: number;
3821
+ calls: {
3822
+ kind: string;
3823
+ target: string;
3824
+ }[];
3825
+ created_at: string;
3826
+ failed_at: string | null;
3827
+ failed_phase: "calls" | "records" | null;
3828
+ id: string;
3829
+ last_error: string | null;
3830
+ run_id: string | null;
3831
+ states: string[];
3832
+ status: "running" | "failed" | "calls" | "pending";
3833
+ subjects: {
3834
+ state: string;
3835
+ subject: {
3836
+ key: string;
3837
+ kind: string;
3838
+ target_kind: "tool" | "agent";
3839
+ target_name: string;
3840
+ };
3841
+ }[];
3842
+ }[];
3843
+ next_cursor: string | null;
3844
+ outstanding: number;
3845
+ }>;
3846
+ readonly retryPendingSave: (id: string) => Promise<{
3847
+ id: string;
3848
+ last_error: string | null;
3849
+ status: "running" | "applied" | "failed" | "calls" | "pending";
3850
+ }>;
3851
+ readonly discardPendingSave: (id: string) => Promise<{
3852
+ discarded: string;
2650
3853
  }>;
2651
3854
  readonly listPresets: (signal?: AbortSignal) => Promise<{
2652
- name: string;
3855
+ active_version: number;
2653
3856
  base_tool: string;
3857
+ conflicted: boolean;
3858
+ conflicted_reason: string | null;
2654
3859
  description: string;
2655
- active_version: number;
3860
+ input_schema: Record<string, unknown> | null;
3861
+ name: string;
3862
+ output_schema: Record<string, unknown> | null;
3863
+ used_by: string[];
3864
+ uses: string[];
2656
3865
  extensions: (string | {
2657
3866
  name: string;
2658
3867
  config: Record<string, unknown>;
2659
3868
  })[][];
2660
- output_schema: Record<string, unknown> | null;
2661
- input_schema: Record<string, unknown> | null;
2662
- conflicted: boolean;
2663
- conflicted_reason: string | null;
2664
- uses: string[];
2665
- used_by: string[];
2666
3869
  }[]>;
2667
3870
  readonly createPreset: (body: import("./presets-client").CreatePresetBody) => Promise<{
2668
- name: string;
3871
+ active_version: number;
2669
3872
  base_tool: string;
3873
+ conflicted: boolean;
3874
+ conflicted_reason: string | null;
2670
3875
  description: string;
2671
- active_version: number;
3876
+ input_schema: Record<string, unknown> | null;
3877
+ name: string;
3878
+ output_schema: Record<string, unknown> | null;
3879
+ used_by: string[];
3880
+ uses: string[];
2672
3881
  extensions: (string | {
2673
3882
  name: string;
2674
3883
  config: Record<string, unknown>;
2675
3884
  })[][];
2676
- output_schema: Record<string, unknown> | null;
2677
- input_schema: Record<string, unknown> | null;
2678
- conflicted: boolean;
2679
- conflicted_reason: string | null;
2680
- uses: string[];
2681
- used_by: string[];
2682
3885
  }>;
2683
3886
  readonly getPreset: (name: string, signal?: AbortSignal) => Promise<{
2684
- name: string;
3887
+ active_version: number;
2685
3888
  base_tool: string;
3889
+ conflicted: boolean;
3890
+ conflicted_reason: string | null;
2686
3891
  description: string;
2687
- active_version: number;
3892
+ fixed_kwargs: Record<string, unknown>;
3893
+ input_schema: Record<string, unknown> | null;
3894
+ name: string;
3895
+ output_schema: Record<string, unknown> | null;
3896
+ used_by: string[];
3897
+ uses: string[];
2688
3898
  extensions: (string | {
2689
3899
  name: string;
2690
3900
  config: Record<string, unknown>;
2691
3901
  })[][];
2692
- output_schema: Record<string, unknown> | null;
2693
- input_schema: Record<string, unknown> | null;
2694
- conflicted: boolean;
2695
- conflicted_reason: string | null;
2696
- uses: string[];
2697
- used_by: string[];
2698
- fixed_kwargs: Record<string, unknown>;
2699
3902
  }>;
2700
3903
  readonly listPresetVersions: (name: string, signal?: AbortSignal) => Promise<{
3904
+ created_at: string;
3905
+ is_current: boolean;
3906
+ tags: string[];
2701
3907
  version: number;
2702
3908
  body: {
2703
3909
  base_tool: string;
@@ -2758,11 +3964,11 @@ export declare function createApiClient(config: ApiConfig): {
2758
3964
  }[];
2759
3965
  } | null;
2760
3966
  };
2761
- tags: string[];
2762
- created_at: string;
2763
- is_current: boolean;
2764
3967
  }[]>;
2765
3968
  readonly getPresetVersion: (name: string, version: number, signal?: AbortSignal) => Promise<{
3969
+ created_at: string;
3970
+ is_current: boolean;
3971
+ tags: string[];
2766
3972
  version: number;
2767
3973
  body: {
2768
3974
  base_tool: string;
@@ -2823,11 +4029,11 @@ export declare function createApiClient(config: ApiConfig): {
2823
4029
  }[];
2824
4030
  } | null;
2825
4031
  };
2826
- tags: string[];
2827
- created_at: string;
2828
- is_current: boolean;
2829
4032
  }>;
2830
4033
  readonly savePresetVersion: (name: string, body: import("./presets-client").SavePresetVersionBody) => Promise<{
4034
+ created_at: string;
4035
+ is_current: boolean;
4036
+ tags: string[];
2831
4037
  version: number;
2832
4038
  body: {
2833
4039
  base_tool: string;
@@ -2888,101 +4094,283 @@ export declare function createApiClient(config: ApiConfig): {
2888
4094
  }[];
2889
4095
  } | null;
2890
4096
  };
2891
- tags: string[];
2892
- created_at: string;
2893
- is_current: boolean;
2894
4097
  }>;
2895
4098
  readonly rollbackPreset: (name: string, version: number) => Promise<{
2896
- name: string;
2897
4099
  active_version: number;
4100
+ fanout: {
4101
+ error: string | null;
4102
+ local_only: boolean | null;
4103
+ mode: string;
4104
+ note: string | null;
4105
+ op: string | null;
4106
+ reachable: boolean | null;
4107
+ results: {
4108
+ detail: string | null;
4109
+ error: string | null;
4110
+ name: string;
4111
+ outcome: string;
4112
+ payload: unknown;
4113
+ }[] | null;
4114
+ };
4115
+ name: string;
2898
4116
  }>;
2899
4117
  readonly deletePreset: (name: string) => Promise<{
4118
+ deleted: boolean;
4119
+ fanout: {
4120
+ error: string | null;
4121
+ local_only: boolean | null;
4122
+ mode: string;
4123
+ note: string | null;
4124
+ op: string | null;
4125
+ reachable: boolean | null;
4126
+ results: {
4127
+ detail: string | null;
4128
+ error: string | null;
4129
+ name: string;
4130
+ outcome: string;
4131
+ payload: unknown;
4132
+ }[] | null;
4133
+ };
2900
4134
  name: string;
2901
- deleted: true;
2902
4135
  }>;
2903
4136
  readonly renamePreset: (name: string, newName: string) => Promise<{
4137
+ active_version: number;
4138
+ fanout: {
4139
+ error: string | null;
4140
+ local_only: boolean | null;
4141
+ mode: string;
4142
+ note: string | null;
4143
+ op: string | null;
4144
+ reachable: boolean | null;
4145
+ results: {
4146
+ detail: string | null;
4147
+ error: string | null;
4148
+ name: string;
4149
+ outcome: string;
4150
+ payload: unknown;
4151
+ }[] | null;
4152
+ };
2904
4153
  name: string;
2905
4154
  renamed_from: string;
2906
- active_version: number;
2907
4155
  }>;
2908
4156
  readonly getPresetReferees: (name: string, signal?: AbortSignal) => Promise<{
2909
4157
  name: string;
2910
4158
  referees: string[];
2911
4159
  }>;
2912
4160
  readonly validatePreset: (body: import("./presets-client").ValidatePresetBody) => Promise<{
2913
- valid: boolean;
2914
4161
  error: string | null;
4162
+ valid: boolean;
2915
4163
  }>;
2916
4164
  readonly setPresetVersionTags: (name: string, version: number, tags: readonly string[]) => Promise<{
2917
4165
  name: string;
2918
- version: number;
2919
4166
  tags: string[];
4167
+ version: number;
2920
4168
  }>;
2921
4169
  readonly listTools: (signal?: AbortSignal) => Promise<string[]>;
2922
4170
  readonly getToolSchema: (name: string, signal?: AbortSignal) => Promise<{
4171
+ description: string | null;
2923
4172
  input: Record<string, unknown>;
2924
4173
  output: Record<string, unknown> | null;
2925
- description: string | null;
2926
4174
  }>;
2927
4175
  readonly getAllToolSchemas: (signal?: AbortSignal) => Promise<Record<string, {
4176
+ description: string | null;
2928
4177
  input: Record<string, unknown>;
2929
4178
  output: Record<string, unknown> | null;
2930
- description: string | null;
2931
4179
  }>>;
2932
- readonly runTool: (args: import("./tools-client").RunToolArgs, signal?: AbortSignal) => Promise<unknown>;
4180
+ readonly runTool: (args: import("./tools-client").RunToolArgs, signal?: AbortSignal) => Promise<{
4181
+ asks: {
4182
+ answer_format: string | null;
4183
+ asked_by: string[] | null;
4184
+ audience: string | null;
4185
+ channel: string | null;
4186
+ created_at: string | null;
4187
+ error: unknown;
4188
+ expiry_at: string | null;
4189
+ format_payload: Record<string, unknown> | null;
4190
+ group_id: string | null;
4191
+ id: string;
4192
+ media: Record<string, unknown>[] | null;
4193
+ on_expiry: "kill" | "resume" | null;
4194
+ payload: Record<string, unknown> | null;
4195
+ question: string | null;
4196
+ recipient: string | null;
4197
+ result: unknown;
4198
+ status: "running" | "asking" | "failed" | "finished";
4199
+ thread_id: string | null;
4200
+ to: "caller" | "user" | null;
4201
+ }[];
4202
+ kind: "asks";
4203
+ suspended: {
4204
+ caller_interaction_ids: string[];
4205
+ expiry_at: string | null;
4206
+ interaction_id: string;
4207
+ interaction_ids: string[];
4208
+ resume_owner: string | null;
4209
+ };
4210
+ } | {
4211
+ kind: "none";
4212
+ } | {
4213
+ kind: "parked";
4214
+ suspended: {
4215
+ caller_interaction_ids: string[];
4216
+ expiry_at: string | null;
4217
+ interaction_id: string;
4218
+ interaction_ids: string[];
4219
+ resume_owner: string | null;
4220
+ };
4221
+ } | {
4222
+ kind: "result";
4223
+ result: unknown;
4224
+ }>;
2933
4225
  readonly reloadTool: (args: import("./tools-client").ToolAdminArgs) => Promise<{
4226
+ error: string | null;
4227
+ local_only: boolean;
4228
+ ok: boolean;
2934
4229
  op: string;
2935
4230
  reachable: boolean;
2936
- local_only: boolean;
2937
4231
  results: {
4232
+ detail: string | null;
4233
+ error: string | null;
2938
4234
  name: string;
2939
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
4235
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
2940
4236
  payload: unknown;
2941
- error: string | null;
2942
- detail: string | null;
2943
4237
  }[];
2944
- error: string | null;
2945
4238
  }>;
2946
4239
  readonly removeTool: (args: import("./tools-client").ToolAdminArgs) => Promise<{
4240
+ error: string | null;
4241
+ local_only: boolean;
4242
+ ok: boolean;
2947
4243
  op: string;
2948
4244
  reachable: boolean;
2949
- local_only: boolean;
2950
4245
  results: {
4246
+ detail: string | null;
4247
+ error: string | null;
2951
4248
  name: string;
2952
- outcome: "failed" | "applied" | "resyncing" | "recycling" | "stale" | "missing" | "departed" | "timed_out";
4249
+ outcome: "applied" | "failed" | "missing" | "departed" | "timed_out" | "resyncing" | "recycling" | "stale";
2953
4250
  payload: unknown;
2954
- error: string | null;
2955
- detail: string | null;
2956
4251
  }[];
2957
- error: string | null;
2958
4252
  }>;
2959
4253
  readonly submitToolRun: (args: import("..").SubmitToolRunArgs, signal?: AbortSignal) => Promise<{
2960
4254
  run_id: string;
2961
4255
  }>;
2962
4256
  readonly getToolRun: (runId: string, signal?: AbortSignal) => Promise<{
4257
+ error: string | null;
4258
+ finished_at: string | null;
4259
+ outcome: unknown;
4260
+ result: unknown;
4261
+ resumed_interactions: string[] | null;
2963
4262
  run_id: string;
4263
+ started_at: string;
4264
+ tool_name: string;
4265
+ status: "running";
4266
+ } | {
4267
+ error: string | null;
4268
+ finished_at: string | null;
4269
+ outcome: unknown;
4270
+ result: unknown;
4271
+ resumed_interactions: string[] | null;
4272
+ run_id: string;
4273
+ started_at: string;
4274
+ tool_name: string;
4275
+ status: "succeeded";
4276
+ } | {
4277
+ error: string | null;
4278
+ finished_at: string | null;
4279
+ outcome: unknown;
4280
+ result: unknown;
4281
+ resumed_interactions: string[] | null;
4282
+ run_id: string;
4283
+ started_at: string;
4284
+ tool_name: string;
4285
+ status: "failed";
4286
+ } | {
4287
+ error: string | null;
4288
+ finished_at: string | null;
4289
+ outcome: unknown;
4290
+ result: unknown;
4291
+ resumed_interactions: string[] | null;
4292
+ run_id: string;
4293
+ started_at: string;
2964
4294
  tool_name: string;
2965
- status: "running" | "failed" | "parked" | "succeeded" | "lost";
4295
+ status: "lost";
4296
+ } | {
4297
+ error: string | null;
4298
+ finished_at: string | null;
4299
+ outcome: unknown;
4300
+ resumed_interactions: string[] | null;
4301
+ run_id: string;
2966
4302
  started_at: string;
2967
- finished_at?: string | undefined;
2968
- result?: unknown;
2969
- error?: string | undefined;
2970
- resumed_interactions?: string[] | undefined;
4303
+ tool_name: string;
4304
+ status: "parked";
4305
+ result: {
4306
+ asks: {
4307
+ answer_format: string | null;
4308
+ asked_by: string[] | null;
4309
+ audience: string | null;
4310
+ channel: string | null;
4311
+ created_at: string | null;
4312
+ error: unknown;
4313
+ expiry_at: string | null;
4314
+ format_payload: Record<string, unknown> | null;
4315
+ group_id: string | null;
4316
+ id: string;
4317
+ media: Record<string, unknown>[] | null;
4318
+ on_expiry: "kill" | "resume" | null;
4319
+ payload: Record<string, unknown> | null;
4320
+ question: string | null;
4321
+ recipient: string | null;
4322
+ result: unknown;
4323
+ status: "running" | "asking" | "failed" | "finished";
4324
+ thread_id: string | null;
4325
+ to: "caller" | "user" | null;
4326
+ }[];
4327
+ kind: "asks";
4328
+ suspended: {
4329
+ caller_interaction_ids: string[];
4330
+ expiry_at: string | null;
4331
+ interaction_id: string;
4332
+ interaction_ids: string[];
4333
+ resume_owner: string | null;
4334
+ };
4335
+ } | {
4336
+ kind: "parked";
4337
+ suspended: {
4338
+ caller_interaction_ids: string[];
4339
+ expiry_at: string | null;
4340
+ interaction_id: string;
4341
+ interaction_ids: string[];
4342
+ resume_owner: string | null;
4343
+ };
4344
+ };
2971
4345
  }>;
2972
4346
  readonly listToolRuns: (toolName: string, signal?: AbortSignal) => Promise<{
4347
+ finished_at: string | null;
2973
4348
  run_id: string;
2974
- tool_name: string;
2975
- status: "running" | "failed" | "parked" | "succeeded" | "lost";
2976
4349
  started_at: string;
2977
- finished_at?: string | undefined;
4350
+ tool_name: string;
4351
+ status: "running" | "parked" | "failed" | "succeeded" | "lost";
2978
4352
  }[]>;
2979
4353
  readonly listToolTags: (signal?: AbortSignal) => Promise<{
2980
- name: string;
2981
- tags: string[];
2982
4354
  badges: string[];
2983
4355
  hidden: boolean;
4356
+ name: string;
4357
+ schedulable: boolean;
4358
+ tags: string[];
2984
4359
  }[]>;
2985
4360
  readonly baseUrl: string;
4361
+ /**
4362
+ * The platform constants the contract serves, read instead of re-spelled (`PERSON_KIND`,
4363
+ * `MEDIA_ROUTE_PREFIX`, `MEDIA_ID_PATTERN`).
4364
+ */
4365
+ readonly constants: {
4366
+ readonly MEDIA_ID_PATTERN: "[A-Za-z0-9_-]{43}";
4367
+ readonly MEDIA_ROUTE_PREFIX: "/api/interactions/media/";
4368
+ readonly PERSON_KIND: "person";
4369
+ };
4370
+ /** The host's authenticated request for a plugin's own routes: the same auth header,
4371
+ * 401 handling, error classes and `{ data }` unwrap as every core call. Core routes
4372
+ * use the named methods. */
4373
+ readonly request: <S extends Parameters<typeof import("..").apiRequest>[2]>(path: string, schema: S, options?: Parameters<typeof import("..").apiRequest>[3]) => Promise<import("zod").infer<S>>;
2986
4374
  };
2987
4375
  export type ApiClient = ReturnType<typeof createApiClient>;
2988
4376
  //# sourceMappingURL=index.d.ts.map