@tai42/api-client 20.0.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 +129 -127
  9. package/dist/client/auth-client.d.ts.map +1 -1
  10. package/dist/client/auth-client.js +68 -28
  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 +2272 -914
  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 +43 -6
  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 +6698 -349
  147. package/dist/generated/served-schemas.d.ts.map +1 -1
  148. package/dist/generated/served-schemas.js +7062 -21
  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 +977 -248
  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 +0 -1
  205. package/dist/schemas/index.d.ts.map +1 -1
  206. package/dist/schemas/index.js +0 -1
  207. package/dist/schemas/index.js.map +1 -1
  208. package/dist/schemas/interactions.d.ts +150 -127
  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 +59 -52
  225. package/dist/schemas/members.d.ts.map +1 -1
  226. package/dist/schemas/members.js +20 -52
  227. package/dist/schemas/members.js.map +1 -1
  228. package/dist/schemas/notifications.d.ts +115 -17
  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 -181
  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 +102 -37
  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 +7120 -40
  351. package/src/headers.ts +4 -0
  352. package/src/http.ts +4 -3
  353. package/src/index.ts +44 -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 +0 -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 +21 -51
  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
@@ -0,0 +1,1508 @@
1
+ // DO NOT EDIT — generated from the skeleton OpenAPI artifact.
2
+ // Source: packages/api-client/contract-schema/openapi.json
3
+ // Regenerate with: pnpm --filter @tai42/api-client run schema:generate
4
+ //
5
+ // One zod const + inferred type per OpenAPI component. A component that is a contract
6
+ // document re-exports the served const; `responseSchemas` maps each operation whose
7
+ // success body is the `{"data": …}` envelope to the const of its `data`.
8
+ import { z } from 'zod';
9
+
10
+ import { templatedText } from '../templated-text';
11
+ import * as served from './served-schemas';
12
+
13
+ export const channelTemplate = served.channelTemplate;
14
+ export type ChannelTemplate = served.ChannelTemplate;
15
+
16
+ export const hookParams = served.hookParams;
17
+ export type HookParams = served.HookParams;
18
+
19
+ export const hookRegister = served.hookRegister;
20
+ export type HookRegister = served.HookRegister;
21
+
22
+ export const hookSubject = served.hookSubject;
23
+ export type HookSubject = served.HookSubject;
24
+
25
+ export const roleDefinition = served.roleDefinition;
26
+ export type RoleDefinition = served.RoleDefinition;
27
+
28
+ export const scheduleCreate = served.scheduleCreate;
29
+ export type ScheduleCreate = served.ScheduleCreate;
30
+
31
+ export const scheduleListRow = served.scheduleListRow;
32
+ export type ScheduleListRow = served.ScheduleListRow;
33
+
34
+ export const stateAttach = served.stateAttach;
35
+ export type StateAttach = served.StateAttach;
36
+
37
+ export const stateBinding = served.stateBinding;
38
+ export type StateBinding = served.StateBinding;
39
+
40
+ export const stateDeclaration = served.stateDeclaration;
41
+ export type StateDeclaration = served.StateDeclaration;
42
+
43
+ export const stateInjection = served.stateInjection;
44
+ export type StateInjection = served.StateInjection;
45
+
46
+ export const stateTemplateDocument = served.stateTemplateDocument;
47
+ export type StateTemplateDocument = served.StateTemplateDocument;
48
+
49
+ export const stateUpdate = served.stateUpdate;
50
+ export type StateUpdate = served.StateUpdate;
51
+
52
+ export const targetConversationConfig = served.targetConversationConfig;
53
+ export type TargetConversationConfig = served.TargetConversationConfig;
54
+
55
+ export const addServerRequest = z.object({ "category": z.string().nullable().default(null), "description": z.string().default(""), "display_name": z.string().nullable().default(null), "icon_url": z.string().nullable().default(null), "id": z.string().nullable().default(null), "scopes": z.array(z.string()).default([]), "url": z.string() });
56
+ export type AddServerRequest = z.infer<typeof addServerRequest>;
57
+
58
+ export const jsonValue = z.unknown();
59
+ export type JsonValue = z.infer<typeof jsonValue>;
60
+
61
+ export const advisorySnapshot = z.object({ "advisories": z.array(z.record(z.string(), jsonValue)), "fetched_at": z.string() });
62
+ export type AdvisorySnapshot = z.infer<typeof advisorySnapshot>;
63
+
64
+ export const agentView = z.object({ "description": z.string(), "input_schema": jsonValue, "name": z.string(), "spec_runnable": z.boolean(), "tool_name": z.string() });
65
+ export type AgentView = z.infer<typeof agentView>;
66
+
67
+ export const agentListing = z.object({ "items": z.array(agentView), "total": z.number().int() });
68
+ export type AgentListing = z.infer<typeof agentListing>;
69
+
70
+ export const agentRunInput = z.record(z.string(), z.unknown());
71
+ export type AgentRunInput = z.infer<typeof agentRunInput>;
72
+
73
+ export const agentsConfig = z.object({ "exclude": z.array(z.string()).default([]), "include": z.array(z.string()).default([]), "module": z.string(), "title": z.string() }).strict();
74
+ export type AgentsConfig = z.infer<typeof agentsConfig>;
75
+
76
+ export const agentsEntriesAdd = z.object({ "entries": z.array(agentsConfig), "replace": z.boolean().default(false) });
77
+ export type AgentsEntriesAdd = z.infer<typeof agentsEntriesAdd>;
78
+
79
+ export const answerFormat = z.enum(["text","confirm","select","form","external","free"]);
80
+ export type AnswerFormat = z.infer<typeof answerFormat>;
81
+
82
+ export const formOption = z.object({ "label": z.string().nullable().default(null), "value": z.string() }).strict();
83
+ export type FormOption = z.infer<typeof formOption>;
84
+
85
+ export const formData = z.object({ "options": z.record(z.string(), z.array(formOption)).default({}), "values": z.record(z.string(), z.unknown()).default({}) }).strict();
86
+ export type FormData = z.infer<typeof formData>;
87
+
88
+ export const displayBlock = z.object({ "alt": z.string().nullable().default(null), "kind": z.enum(["heading","body","image"]), "slot": z.string().nullable().default(null), "src": z.string().nullable().default(null), "text": z.string().nullable().default(null) }).strict();
89
+ export type DisplayBlock = z.infer<typeof displayBlock>;
90
+
91
+ export const formPage = z.object({ "display": z.array(displayBlock).default([]), "fields": z.array(z.string()), "kind": z.enum(["input","review"]).default("input"), "title": z.string() }).strict();
92
+ export type FormPage = z.infer<typeof formPage>;
93
+
94
+ export const linkOption = z.object({ "kind": z.literal("link").default("link"), "label": z.string(), "url": z.string() }).strict();
95
+ export type LinkOption = z.infer<typeof linkOption>;
96
+
97
+ export const locationElement = z.object({ "address": z.string().nullable().default(null), "latitude": z.number(), "longitude": z.number(), "name": z.string().nullable().default(null) }).strict();
98
+ export type LocationElement = z.infer<typeof locationElement>;
99
+
100
+ export const mediaKind = z.enum(["image","link","document","video","audio"]);
101
+ export type MediaKind = z.infer<typeof mediaKind>;
102
+
103
+ export const mediaItem = z.object({ "caption": z.string().nullable().default(null), "filename": z.string().nullable().default(null), "kind": mediaKind, "url": z.string() }).strict();
104
+ export type MediaItem = z.infer<typeof mediaItem>;
105
+
106
+ export const replyOption = z.object({ "description": z.string().nullable().default(null), "id": z.string().nullable().default(null), "kind": z.literal("reply").default("reply"), "text": z.string() }).strict();
107
+ export type ReplyOption = z.infer<typeof replyOption>;
108
+
109
+ export const optionSection = z.object({ "rows": z.array(replyOption), "title": z.string() }).strict();
110
+ export type OptionSection = z.infer<typeof optionSection>;
111
+
112
+ export const answerPart = z.object({ "data": formData.nullable().default(null), "footer": z.string().nullable().default(null), "form_tag": z.string().nullable().default(null), "header": mediaItem.nullable().default(null), "location": locationElement.nullable().default(null), "media": z.array(mediaItem).nullable().default(null), "message": z.string().default(""), "options": z.array(z.discriminatedUnion("kind", [replyOption, linkOption])).nullable().default(null), "pages": z.array(formPage).nullable().default(null), "schema": z.record(z.string(), z.unknown()).nullable().default(null), "sections": z.array(optionSection).nullable().default(null), "template": channelTemplate.nullable().default(null) }).strict();
113
+ export type AnswerPart = z.infer<typeof answerPart>;
114
+
115
+ export const overlapPolicy = z.object({ "deliver": z.enum(["one","all"]).default("one"), "running": z.enum(["continue","cancel"]).default("continue"), "settle_seconds": z.number().int().gte(0).lte(30).default(0) });
116
+ export type OverlapPolicy = z.infer<typeof overlapPolicy>;
117
+
118
+ export const apiConversationRouteCreate = z.object({ "callback_url": z.string().regex(new RegExp("^[hH][tT][tT][pP][sS]://[^/?#@]+(?:[/?#]|$)")).nullable().default(null), "cancel_expr": templatedText.nullable().default(null), "channel": z.null().default(null), "door": z.literal("api"), "error_reply_text": z.string().regex(new RegExp("\\S")).min(1).max(2000).nullable().default(null), "execution_key": z.string().min(1), "extras_expr": templatedText.nullable().default(null), "initial_mode": z.enum(["agent","manual"]).default("agent"), "locale": z.string().nullable().default(null), "our_identity": z.null().default(null), "overlap": overlapPolicy.default({"deliver":"one","running":"continue","settle_seconds":0}), "reply_expr": templatedText.nullable().default(null), "resume_expr": templatedText.nullable().default(null), "route_name": z.string().regex(new RegExp("^[a-z0-9-]+$")), "start_expr": templatedText.nullable().default(null), "target_kind": z.enum(["agent","tool"]), "target_name": z.string().min(1), "turns_per_hour_override": z.number().int().gt(0).nullable().default(null) });
119
+ export type ApiConversationRouteCreate = z.infer<typeof apiConversationRouteCreate>;
120
+
121
+ export const apiConversationRouteView = z.object({ "callback_url": z.string().regex(new RegExp("^[hH][tT][tT][pP][sS]://[^/?#@]+(?:[/?#]|$)")).nullable().default(null), "cancel_expr": templatedText.nullable().default(null), "channel": z.null().default(null), "door": z.literal("api"), "error_reply_text": z.string().regex(new RegExp("\\S")).min(1).max(2000).nullable().default(null), "execution_key": z.string().min(1), "execution_key_fingerprint": z.string(), "extras_expr": templatedText.nullable().default(null), "initial_mode": z.enum(["agent","manual"]).default("agent"), "locale": z.string().nullable().default(null), "our_identity": z.null().default(null), "overlap": overlapPolicy.default({"deliver":"one","running":"continue","settle_seconds":0}), "reply_expr": templatedText.nullable().default(null), "resume_expr": templatedText.nullable().default(null), "route_name": z.string().regex(new RegExp("^[a-z0-9-]+$")), "start_expr": templatedText.nullable().default(null), "target_kind": z.enum(["agent","tool"]), "target_name": z.string().min(1), "turns_per_hour_override": z.number().int().gt(0).nullable().default(null) });
122
+ export type ApiConversationRouteView = z.infer<typeof apiConversationRouteView>;
123
+
124
+ export const apiKeyCreate = z.object({ "condition": templatedText.nullable().default(null), "description": z.string().min(1), "owner_user_id": z.string().nullable().default(null), "policy_data": z.record(z.string(), z.unknown()).nullable().default(null), "scopes": z.array(z.string()), "user_id": z.string().min(1) });
125
+ export type ApiKeyCreate = z.infer<typeof apiKeyCreate>;
126
+
127
+ export const apiKeyCreateResult = z.object({ "api_key": z.string(), "key_fingerprint": z.string() });
128
+ export type ApiKeyCreateResult = z.infer<typeof apiKeyCreateResult>;
129
+
130
+ export const apiKeyEdit = z.object({ "condition": templatedText.nullable().default(null), "description": z.string().min(1).nullable().default(null), "policy_data": z.record(z.string(), z.unknown()).nullable().default(null), "scopes": z.array(z.string()).nullable().default(null) });
131
+ export type ApiKeyEdit = z.infer<typeof apiKeyEdit>;
132
+
133
+ export const apiToolsListsUpdate = z.object({ "exclude_add": z.array(z.string()).default([]), "exclude_remove": z.array(z.string()).default([]), "include_add": z.array(z.string()).default([]), "include_remove": z.array(z.string()).default([]) });
134
+ export type ApiToolsListsUpdate = z.infer<typeof apiToolsListsUpdate>;
135
+
136
+ export const awaitingWorker = z.object({ "keys": z.array(z.string()), "name": z.string() });
137
+ export type AwaitingWorker = z.infer<typeof awaitingWorker>;
138
+
139
+ export const fanoutWorkerResult = z.object({ "detail": z.string().nullable().default(null), "error": z.string().nullable().default(null), "name": z.string(), "outcome": z.string(), "payload": jsonValue.nullable().default(null) });
140
+ export type FanoutWorkerResult = z.infer<typeof fanoutWorkerResult>;
141
+
142
+ export const fanoutSummary = z.object({ "error": z.string().nullable().default(null), "local_only": z.boolean().nullable().default(null), "mode": z.string(), "note": z.string().nullable().default(null), "op": z.string().nullable().default(null), "reachable": z.boolean().nullable().default(null), "results": z.array(fanoutWorkerResult).nullable().default(null) });
143
+ export type FanoutSummary = z.infer<typeof fanoutSummary>;
144
+
145
+ export const freshLife = z.object({ "generation": z.number().int(), "kind": z.string(), "name": z.string() });
146
+ export type FreshLife = z.infer<typeof freshLife>;
147
+
148
+ export const recycleEntry = z.object({ "detail": z.string().nullable().default(null), "generation_before": z.number().int(), "kind": z.string(), "name": z.string(), "status": z.string() });
149
+ export type RecycleEntry = z.infer<typeof recycleEntry>;
150
+
151
+ export const recycleStop = z.object({ "detail": z.string(), "kind": z.string(), "name": z.string().nullable() });
152
+ export type RecycleStop = z.infer<typeof recycleStop>;
153
+
154
+ export const recycleRoll = z.object({ "fresh": z.array(freshLife), "recycle": z.array(recycleEntry), "recycle_stopped": recycleStop.nullable().default(null) });
155
+ export type RecycleRoll = z.infer<typeof recycleRoll>;
156
+
157
+ export const applyResponse = z.object({ "awaiting_respawn": z.array(awaitingWorker).default([]), "env_keys": z.number().int(), "fanout": fanoutSummary, "recycle": recycleRoll.nullable().default(null), "status": z.string() });
158
+ export type ApplyResponse = z.infer<typeof applyResponse>;
159
+
160
+ export const applyResult = z.object({ "applied": z.boolean(), "data": z.record(z.string(), z.unknown()).nullable().default(null), "seq": z.number().nullable().default(null), "skipped": z.array(z.record(z.string(), z.unknown())).default([]) }).strict();
161
+ export type ApplyResult = z.infer<typeof applyResult>;
162
+
163
+ export const stateSubject = z.object({ "key": z.string(), "kind": z.string(), "target_kind": z.enum(["agent","tool"]), "target_name": z.string().min(1) }).strict();
164
+ export type StateSubject = z.infer<typeof stateSubject>;
165
+
166
+ export const heldPendingSave = z.object({ "held_by": z.string(), "save_id": z.string(), "subjects": z.array(stateSubject).default([]) }).strict();
167
+ export type HeldPendingSave = z.infer<typeof heldPendingSave>;
168
+
169
+ export const heldPendingSaveList = z.array(heldPendingSave);
170
+ export type HeldPendingSaveList = z.infer<typeof heldPendingSaveList>;
171
+
172
+ export const attachAck = z.object({ "attached": z.boolean(), "held": heldPendingSaveList.optional(), "state": z.string(), "template": z.string() });
173
+ export type AttachAck = z.infer<typeof attachAck>;
174
+
175
+ export const attachUpdateAck = z.object({ "state": z.string(), "template": z.string(), "updated": z.boolean() });
176
+ export type AttachUpdateAck = z.infer<typeof attachUpdateAck>;
177
+
178
+ export const authHealthState = z.enum(["healthy","reconnect_required","refresh_failing"]);
179
+ export type AuthHealthState = z.infer<typeof authHealthState>;
180
+
181
+ export const backendInfo = z.object({ "backend": z.string().nullable().default(null), "module": z.string().nullable().default(null), "present": z.boolean() });
182
+ export type BackendInfo = z.infer<typeof backendInfo>;
183
+
184
+ export const backupExport = z.object({ "sections": z.array(z.string()) });
185
+ export type BackupExport = z.infer<typeof backupExport>;
186
+
187
+ export const backupExportDocument = z.object({ "created_at": z.string(), "errors": z.record(z.string(), z.string()), "sections": z.record(z.string(), z.unknown()), "version": z.number().int() });
188
+ export type BackupExportDocument = z.infer<typeof backupExportDocument>;
189
+
190
+ export const backupImport = z.object({ "document": z.record(z.string(), z.unknown()), "mode": z.enum(["skip","overwrite"]).default("skip"), "sections": z.array(z.string()) });
191
+ export type BackupImport = z.infer<typeof backupImport>;
192
+
193
+ export const backupSectionReport = z.object({ "awaiting_respawn": z.array(awaitingWorker).default([]), "created": z.number().int().default(0), "details": z.record(z.string(), z.unknown()).default({}), "errors": z.array(z.string()).default([]), "fanout": fanoutSummary.nullable().default(null), "recycle": recycleRoll.nullable().default(null), "skipped": z.number().int().default(0), "updated": z.number().int().default(0) }).strict();
194
+ export type BackupSectionReport = z.infer<typeof backupSectionReport>;
195
+
196
+ export const backupImportResult = z.object({ "ok": z.boolean(), "sections": z.record(z.string(), backupSectionReport) });
197
+ export type BackupImportResult = z.infer<typeof backupImportResult>;
198
+
199
+ export const backupSectionInfo = z.object({ "name": z.string(), "secret": z.boolean() });
200
+ export type BackupSectionInfo = z.infer<typeof backupSectionInfo>;
201
+
202
+ export const backupSectionListing = z.array(backupSectionInfo);
203
+ export type BackupSectionListing = z.infer<typeof backupSectionListing>;
204
+
205
+ export const buttonMethod = z.object({ "href": z.string(), "icon": z.string().nullable().default(null), "id": z.string().min(1), "label": z.string().min(1), "shape": z.literal("button").default("button") }).strict();
206
+ export type ButtonMethod = z.infer<typeof buttonMethod>;
207
+
208
+ export const cacheClearResult = z.object({ "cleared": z.boolean(), "fanout": fanoutSummary });
209
+ export type CacheClearResult = z.infer<typeof cacheClearResult>;
210
+
211
+ export const channelConversationRouteCreate = z.object({ "callback_url": z.null().default(null), "cancel_expr": templatedText.nullable().default(null), "channel": z.string().regex(new RegExp("^[^:]*[^:\\s][^:]*$")), "door": z.literal("channel"), "error_reply_text": z.string().regex(new RegExp("\\S")).min(1).max(2000).nullable().default(null), "execution_key": z.string().min(1), "extras_expr": templatedText.nullable().default(null), "initial_mode": z.enum(["agent","manual"]).default("agent"), "locale": z.string().nullable().default(null), "our_identity": z.string().regex(new RegExp("\\S")), "overlap": overlapPolicy.default({"deliver":"one","running":"continue","settle_seconds":0}), "reply_expr": templatedText.nullable().default(null), "resume_expr": templatedText.nullable().default(null), "route_name": z.string().regex(new RegExp("^[a-z0-9-]+$")), "start_expr": templatedText.nullable().default(null), "target_kind": z.enum(["agent","tool"]), "target_name": z.string().min(1), "turns_per_hour_override": z.number().int().gt(0).nullable().default(null) });
212
+ export type ChannelConversationRouteCreate = z.infer<typeof channelConversationRouteCreate>;
213
+
214
+ export const channelConversationRouteView = z.object({ "callback_url": z.null().default(null), "cancel_expr": templatedText.nullable().default(null), "channel": z.string().regex(new RegExp("^[^:]*[^:\\s][^:]*$")), "door": z.literal("channel"), "error_reply_text": z.string().regex(new RegExp("\\S")).min(1).max(2000).nullable().default(null), "execution_key": z.string().min(1), "execution_key_fingerprint": z.string(), "extras_expr": templatedText.nullable().default(null), "initial_mode": z.enum(["agent","manual"]).default("agent"), "locale": z.string().nullable().default(null), "our_identity": z.string().regex(new RegExp("\\S")), "overlap": overlapPolicy.default({"deliver":"one","running":"continue","settle_seconds":0}), "reply_expr": templatedText.nullable().default(null), "resume_expr": templatedText.nullable().default(null), "route_name": z.string().regex(new RegExp("^[a-z0-9-]+$")), "start_expr": templatedText.nullable().default(null), "target_kind": z.enum(["agent","tool"]), "target_name": z.string().min(1), "turns_per_hour_override": z.number().int().gt(0).nullable().default(null) });
215
+ export type ChannelConversationRouteView = z.infer<typeof channelConversationRouteView>;
216
+
217
+ export const channelListing = z.object({ "channels": z.array(z.string()) });
218
+ export type ChannelListing = z.infer<typeof channelListing>;
219
+
220
+ export const checkpointSweepResult = z.object({ "finished_minutes": z.number().int(), "finished_swept": z.array(z.string()), "provider": z.string(), "skipped": z.string().nullable().default(null), "spared": z.array(z.string()), "swept_count": z.number().int(), "waiting_minutes": z.number().int(), "waiting_swept": z.array(z.string()) });
221
+ export type CheckpointSweepResult = z.infer<typeof checkpointSweepResult>;
222
+
223
+ export const claimExchange = z.object({ "token": z.string().min(1) });
224
+ export type ClaimExchange = z.infer<typeof claimExchange>;
225
+
226
+ export const claimExchangeResult = z.object({ "token": z.string(), "user_id": z.string() });
227
+ export type ClaimExchangeResult = z.infer<typeof claimExchangeResult>;
228
+
229
+ export const claimLinkCreate = z.object({ "api_key": z.string().min(1), "ttl_seconds": z.number().int().nullable().default(null) });
230
+ export type ClaimLinkCreate = z.infer<typeof claimLinkCreate>;
231
+
232
+ export const claimLinkResult = z.object({ "claim_path": z.string(), "expires_at": z.string(), "token": z.string() });
233
+ export type ClaimLinkResult = z.infer<typeof claimLinkResult>;
234
+
235
+ export const compatStatus = z.object({ "reason": z.string().nullable(), "status": z.enum(["compatible","incompatible","unknown"]) });
236
+ export type CompatStatus = z.infer<typeof compatStatus>;
237
+
238
+ export const completedOrigin = z.object({ "actor": z.string().nullable().default(null), "consumer": z.string().nullable().default(null), "door": z.enum(["conversation","hook","schedule","tool","api","operator"]), "inbound_id": z.string().nullable().default(null), "meta": z.record(z.string(), z.unknown()).nullable().default(null), "op_id": z.string().nullable().default(null), "run_id": z.string().nullable().default(null), "turn_id": z.string().nullable().default(null) }).strict();
239
+ export type CompletedOrigin = z.infer<typeof completedOrigin>;
240
+
241
+ export const conditionCheckResult = z.object({ "ok": z.boolean(), "result": z.boolean().nullable() });
242
+ export type ConditionCheckResult = z.infer<typeof conditionCheckResult>;
243
+
244
+ export const conditionValidation = z.object({ "condition": templatedText.nullable().default(null), "sample_context": z.record(z.string(), z.unknown()).nullable().default(null) });
245
+ export type ConditionValidation = z.infer<typeof conditionValidation>;
246
+
247
+ export const configFieldSpec = z.object({ "key": z.string(), "label": z.string().min(1), "required": z.boolean().default(true), "secret": z.boolean().default(false), "target": z.enum(["env","header"]) });
248
+ export type ConfigFieldSpec = z.infer<typeof configFieldSpec>;
249
+
250
+ export const configModeView = z.object({ "config_mode": z.string() });
251
+ export type ConfigModeView = z.infer<typeof configModeView>;
252
+
253
+ export const connectedAccountView = z.object({ "account_identity": z.string().nullable().default(null), "alias": z.string(), "auth_health_state": authHealthState, "connection_id": z.string(), "created_at": z.string().datetime({ offset: true }), "enabled_sub_services": z.array(z.string()), "granted_scopes": z.array(z.string()), "kind": z.enum(["oauth","none"]), "provider_id": z.string(), "scopes_wanted": z.array(z.string()).default([]), "unreachable_sub_services": z.array(z.string()).default([]) });
254
+ export type ConnectedAccountView = z.infer<typeof connectedAccountView>;
255
+
256
+ export const connectionsListResponse = z.object({ "items": z.array(connectedAccountView), "total": z.number().int(), "unhealthy": z.number().int() });
257
+ export type ConnectionsListResponse = z.infer<typeof connectionsListResponse>;
258
+
259
+ export const connectorCategoryView = z.object({ "display_name": z.string(), "id": z.string(), "sort_order": z.number().int() });
260
+ export type ConnectorCategoryView = z.infer<typeof connectorCategoryView>;
261
+
262
+ export const connectorReencryptResult = z.object({ "cas_retries": z.number().int(), "clients_failed": z.number().int(), "clients_reencrypted": z.number().int(), "clients_scanned": z.number().int(), "clients_skipped": z.number().int(), "failed": z.number().int(), "failed_client_row_ids": z.array(z.string()), "failed_connection_ids": z.array(z.string()), "reencrypted": z.number().int(), "scanned": z.number().int(), "skipped": z.number().int() });
263
+ export type ConnectorReencryptResult = z.infer<typeof connectorReencryptResult>;
264
+
265
+ export const connectorRef = z.object({ "connection_id": z.string(), "provider_id": z.string().min(1).max(64), "sub_service": z.string().min(1).max(64) });
266
+ export type ConnectorRef = z.infer<typeof connectorRef>;
267
+
268
+ export const consumerLink = z.object({ "plugin_path": z.string().nullable().default(null), "search": z.record(z.string(), z.unknown()).nullable().default(null), "token": z.string().nullable().default(null) }).strict();
269
+ export type ConsumerLink = z.infer<typeof consumerLink>;
270
+
271
+ export const consumerRow = z.object({ "detail": z.string().nullable().default(null), "kind": z.string(), "link": consumerLink.nullable().default(null), "name": z.string().nullable().default(null), "unavailable": z.string().nullable().default(null) }).strict();
272
+ export type ConsumerRow = z.infer<typeof consumerRow>;
273
+
274
+ export const contributions = z.object({ "nav_entries": z.array(z.string()).default([]), "pages": z.array(z.string()).default([]), "route_panels": z.array(z.string()).default([]), "settings_tabs": z.array(z.string()).default([]), "tool_panels": z.record(z.string(), z.string()).default({}) }).strict();
275
+ export type Contributions = z.infer<typeof contributions>;
276
+
277
+ export const conversationAnswer = z.object({ "answer": z.string().nullable().default(null), "message_id": z.string().min(1), "parts": z.array(answerPart).nullable().default(null), "status": z.enum(["answered","error","silent","merged","superseded"]), "successor_id": z.string().nullable().default(null), "thread_id": z.string().min(1) });
278
+ export type ConversationAnswer = z.infer<typeof conversationAnswer>;
279
+
280
+ export const conversationConfigDeleteResult = z.object({ "removed": z.boolean(), "target_kind": z.enum(["agent","tool"]), "target_name": z.string() });
281
+ export type ConversationConfigDeleteResult = z.infer<typeof conversationConfigDeleteResult>;
282
+
283
+ export const conversationConfigListEnvelope = z.object({ "items": z.array(targetConversationConfig), "total": z.number().int(), "unreadable": z.number().int().default(0) });
284
+ export type ConversationConfigListEnvelope = z.infer<typeof conversationConfigListEnvelope>;
285
+
286
+ export const conversationConfigSetResult = z.object({ "config": targetConversationConfig, "created": z.boolean(), "target_kind": z.enum(["agent","tool"]), "target_name": z.string() });
287
+ export type ConversationConfigSetResult = z.infer<typeof conversationConfigSetResult>;
288
+
289
+ export const conversationEvent = z.object({ "event_id": z.string(), "kind": z.string(), "payload": z.record(z.string(), z.unknown()).default({}) }).strict();
290
+ export type ConversationEvent = z.infer<typeof conversationEvent>;
291
+
292
+ export const conversationEventSubmission = z.object({ "address": z.string().nullable().default(null), "event": conversationEvent, "thread_id": z.string().nullable().default(null), "wait_seconds": z.number().int().gte(0).default(0) }).strict();
293
+ export type ConversationEventSubmission = z.infer<typeof conversationEventSubmission>;
294
+
295
+ export const conversationMessage = z.object({ "attachments": z.array(mediaItem).nullable().default(null), "external_user_id": z.string().min(1), "form": z.record(z.string(), z.unknown()).nullable().default(null), "form_tag": z.string().nullable().default(null), "locale": z.string().nullable().default(null), "location": locationElement.nullable().default(null), "params": z.record(z.string(), z.string()).nullable().default(null), "text": z.string().min(1), "wait_seconds": z.number().int().gte(0).nullable().default(null) });
296
+ export type ConversationMessage = z.infer<typeof conversationMessage>;
297
+
298
+ export const deliveryStatus = z.enum(["accepted","pending_delivery","provisional","delivered","failed","shed","silent","merged","superseded"]);
299
+ export type DeliveryStatus = z.infer<typeof deliveryStatus>;
300
+
301
+ export const conversationRecordView = z.object({ "answer": z.string().nullable().default(null), "answer_parts": z.array(answerPart).nullable().default(null), "answer_status": z.enum(["answered","error","silent","merged","superseded"]).nullable().default(null), "attempts": z.number().int().nullable().default(null), "callback_url": z.string().nullable().default(null), "caller_principal": z.string().nullable().default(null), "channel": z.string().nullable().default(null), "client_address": z.string().min(1).max(256), "created_at": z.number(), "delivery_status": deliveryStatus.default("pending_delivery"), "door": z.enum(["api","channel"]), "error": z.string().nullable().default(null), "inbound_attachments": z.array(mediaItem).nullable().default(null), "inbound_event": z.record(z.string(), z.unknown()).nullable().default(null), "inbound_form": z.record(z.string(), z.unknown()).nullable().default(null), "inbound_form_tag": z.string().nullable().default(null), "inbound_kind": z.enum(["message","event"]).default("message"), "inbound_locale": z.string().nullable().default(null), "inbound_location": locationElement.nullable().default(null), "inbound_text": z.string(), "message_id": z.string().min(1), "operator_send": z.boolean().default(false), "origin": z.enum(["client","operator"]), "our_identity": z.string().nullable().default(null), "outbound_message_ids": z.array(z.string()).nullable().default(null), "pending_receipt": deliveryStatus.nullable().default(null), "provider_message_id": z.string().min(1).nullable().default(null), "route_missing": z.boolean().default(false), "route_name": z.string().min(1), "submitted_by": z.string().nullable().default(null), "successor_id": z.string().nullable().default(null), "thread_id": z.string().min(1), "updated_at": z.number() });
302
+ export type ConversationRecordView = z.infer<typeof conversationRecordView>;
303
+
304
+ export const conversationRouteCreateBody = z.discriminatedUnion("door", [apiConversationRouteCreate, channelConversationRouteCreate]);
305
+ export type ConversationRouteCreateBody = z.infer<typeof conversationRouteCreateBody>;
306
+
307
+ export const conversationRouteCreateResult = z.object({ "callback_secret": z.string().nullable(), "created": z.boolean(), "route": z.discriminatedUnion("door", [apiConversationRouteView, channelConversationRouteView]), "route_name": z.string() });
308
+ export type ConversationRouteCreateResult = z.infer<typeof conversationRouteCreateResult>;
309
+
310
+ export const conversationRouteListEnvelope = z.object({ "items": z.array(z.discriminatedUnion("door", [apiConversationRouteView, channelConversationRouteView])), "total": z.number().int(), "unreadable": z.number().int().default(0) });
311
+ export type ConversationRouteListEnvelope = z.infer<typeof conversationRouteListEnvelope>;
312
+
313
+ export const conversationRouteViewBody = z.discriminatedUnion("door", [apiConversationRouteView, channelConversationRouteView]);
314
+ export type ConversationRouteViewBody = z.infer<typeof conversationRouteViewBody>;
315
+
316
+ export const conversationTurnAck = z.object({ "answer": conversationAnswer.nullable().default(null), "message_id": z.string(), "thread_id": z.string() });
317
+ export type ConversationTurnAck = z.infer<typeof conversationTurnAck>;
318
+
319
+ export const crontabCadence = z.object({ "day_of_month": z.string().default("*"), "day_of_week": z.string().default("*"), "hour": z.string().default("*"), "kind": z.literal("crontab").default("crontab"), "minute": z.string().default("*"), "month_of_year": z.string().default("*") }).strict();
320
+ export type CrontabCadence = z.infer<typeof crontabCadence>;
321
+
322
+ export const detachAck = z.object({ "detached": z.boolean(), "state": z.string(), "template": z.string() });
323
+ export type DetachAck = z.infer<typeof detachAck>;
324
+
325
+ export const dirDeleted = z.object({ "deleted": z.boolean(), "dir": z.string() });
326
+ export type DirDeleted = z.infer<typeof dirDeleted>;
327
+
328
+ export const disconnectResponse = z.object({ "connection_id": z.string(), "fanout": z.record(z.string(), z.unknown()).nullable().default(null), "removed_manifest_entries": z.array(z.string()), "upstream_revoke_outcome": z.enum(["success","failed","skipped"]), "upstream_revoke_status": z.number().int().nullable().default(null) });
329
+ export type DisconnectResponse = z.infer<typeof disconnectResponse>;
330
+
331
+ export const discoverServerRequest = z.object({ "provider_id": z.string().nullable().default(null), "url": z.string().nullable().default(null) });
332
+ export type DiscoverServerRequest = z.infer<typeof discoverServerRequest>;
333
+
334
+ export const discoveredServerView = z.object({ "authorization_servers": z.array(z.string()), "automatic_client": z.boolean(), "client_issuer": z.string().nullable().default(null), "issuer": z.string(), "redirect_uri": z.string().nullable().default(null), "registration_supported": z.boolean(), "resource": z.string(), "resource_name": z.string().nullable().default(null), "scopes_supported": z.array(z.string()), "suggested_display_name": z.string(), "suggested_id": z.string(), "url": z.string() });
335
+ export type DiscoveredServerView = z.infer<typeof discoveredServerView>;
336
+
337
+ export const documentVersion = z.object({ "body": z.record(z.string(), z.unknown()), "created_at": z.string(), "is_current": z.boolean().default(false), "tags": z.array(z.string()).default([]), "version": z.number().int() });
338
+ export type DocumentVersion = z.infer<typeof documentVersion>;
339
+
340
+ export const documentVersionList = z.array(documentVersion);
341
+ export type DocumentVersionList = z.infer<typeof documentVersionList>;
342
+
343
+ export const envUpdate = z.object({ "env": z.record(z.string(), z.string()), "secret_keys": z.array(z.string()).nullable().default(null) }).strict();
344
+ export type EnvUpdate = z.infer<typeof envUpdate>;
345
+
346
+ export const envView = z.object({ "env": z.record(z.string(), z.string()), "secret_keys": z.array(z.string()) });
347
+ export type EnvView = z.infer<typeof envView>;
348
+
349
+ export const eraseAck = z.object({ "erased": z.boolean() });
350
+ export type EraseAck = z.infer<typeof eraseAck>;
351
+
352
+ export const error = z.object({ "code": z.string().optional(), "error": z.string() });
353
+ export type Error = z.infer<typeof error>;
354
+
355
+ export const extensionView = z.object({ "kind": z.string(), "multiple": z.boolean(), "name": z.string() });
356
+ export type ExtensionView = z.infer<typeof extensionView>;
357
+
358
+ export const extensionListing = z.array(extensionView);
359
+ export type ExtensionListing = z.infer<typeof extensionListing>;
360
+
361
+ export const failedConversationsEnvelope = z.object({ "items": z.array(conversationRecordView), "total": z.number().int(), "unreadable": z.number().int().default(0) });
362
+ export type FailedConversationsEnvelope = z.infer<typeof failedConversationsEnvelope>;
363
+
364
+ export const failedMcp = z.object({ "category": z.string(), "http_status": z.number().int().nullable(), "message": z.string(), "status": z.string(), "title": z.string() });
365
+ export type FailedMcp = z.infer<typeof failedMcp>;
366
+
367
+ export const opOutcome = z.enum(["applied","failed","missing","departed","timed_out","resyncing","recycling","stale"]);
368
+ export type OpOutcome = z.infer<typeof opOutcome>;
369
+
370
+ export const workerResult = z.object({ "detail": z.string().nullable().default(null), "error": z.string().nullable().default(null), "name": z.string(), "outcome": opOutcome, "payload": z.unknown().nullable().default(null) });
371
+ export type WorkerResult = z.infer<typeof workerResult>;
372
+
373
+ export const fleetResult = z.object({ "error": z.string().nullable().default(null), "local_only": z.boolean().default(false), "ok": z.boolean().readonly(), "op": z.string(), "reachable": z.boolean().default(true), "results": z.array(workerResult).default([]) });
374
+ export type FleetResult = z.infer<typeof fleetResult>;
375
+
376
+ export const foldSubjectRef = z.object({ "key": z.string(), "kind": z.string() });
377
+ export type FoldSubjectRef = z.infer<typeof foldSubjectRef>;
378
+
379
+ export const foldReport = z.object({ "already": z.boolean(), "flattened": z.number().int(), "from": foldSubjectRef, "into": foldSubjectRef, "merged_members": z.array(z.string()).nullable().default(null), "mode": z.enum(["switch","merge"]) });
380
+ export type FoldReport = z.infer<typeof foldReport>;
381
+
382
+ export const folderCreate = z.object({ "name": z.string(), "parent_id": z.string().nullable().default(null) });
383
+ export type FolderCreate = z.infer<typeof folderCreate>;
384
+
385
+ export const folderDeleted = z.object({ "deleted": z.boolean(), "folder_id": z.string() });
386
+ export type FolderDeleted = z.infer<typeof folderDeleted>;
387
+
388
+ export const folderMove = z.object({ "parent_id": z.string().nullable().default(null) });
389
+ export type FolderMove = z.infer<typeof folderMove>;
390
+
391
+ export const folderRecord = z.object({ "id": z.string(), "name": z.string(), "parent_id": z.string().nullable().default(null) });
392
+ export type FolderRecord = z.infer<typeof folderRecord>;
393
+
394
+ export const folderRename = z.object({ "name": z.string() });
395
+ export type FolderRename = z.infer<typeof folderRename>;
396
+
397
+ export const formField = z.object({ "autocomplete": z.string().nullable().default(null), "label": z.string().min(1), "name": z.string().min(1), "secret": z.boolean().default(false) }).strict();
398
+ export type FormField = z.infer<typeof formField>;
399
+
400
+ export const formMethod = z.object({ "fields": z.array(formField).min(1), "id": z.string().min(1), "purpose": z.enum(["login","invite"]).default("login"), "shape": z.literal("form").default("form"), "submit_path": z.string(), "title": z.string().min(1) }).strict();
401
+ export type FormMethod = z.infer<typeof formMethod>;
402
+
403
+ export const hookListView = z.object({ "items": z.array(hookParams), "topic_verifiers": z.record(z.string(), jsonValue), "total": z.number().int(), "trigger_auth": z.record(z.string(), z.enum(["public","verifier","token","token+api_key","out-of-service"])) });
404
+ export type HookListView = z.infer<typeof hookListView>;
405
+
406
+ export const hookRegisterResult = z.object({ "name": z.string(), "registered": z.boolean() });
407
+ export type HookRegisterResult = z.infer<typeof hookRegisterResult>;
408
+
409
+ export const previewItemRoute = z.object({ "full_path": z.string(), "methods": z.array(z.enum(["GET","POST","PUT","PATCH","DELETE"])), "path": z.string(), "public": z.boolean() });
410
+ export type PreviewItemRoute = z.infer<typeof previewItemRoute>;
411
+
412
+ export const previewItem = z.object({ "base": z.string(), "default_base": z.string(), "item": z.string(), "kind": z.string(), "routes": z.array(previewItemRoute) });
413
+ export type PreviewItem = z.infer<typeof previewItem>;
414
+
415
+ export const publicRouteRow = z.object({ "full_path": z.string(), "item": z.string(), "methods": z.array(z.enum(["GET","POST","PUT","PATCH","DELETE"])) });
416
+ export type PublicRouteRow = z.infer<typeof publicRouteRow>;
417
+
418
+ export const requiredEnvVar = z.object({ "name": z.string(), "secret": z.boolean() });
419
+ export type RequiredEnvVar = z.infer<typeof requiredEnvVar>;
420
+
421
+ export const routeCollision = z.object({ "conflict_owner": z.string(), "conflict_path": z.string(), "full_path": z.string(), "item": z.string(), "methods": z.array(z.enum(["GET","POST","PUT","PATCH","DELETE"])) });
422
+ export type RouteCollision = z.infer<typeof routeCollision>;
423
+
424
+ export const installPreview = z.object({ "collisions": z.array(routeCollision), "delivery": z.enum(["package","descriptor"]), "items": z.array(previewItem), "missing_env": z.array(z.string()), "new_public_routes": z.array(publicRouteRow), "public_routes": z.array(publicRouteRow), "ref": z.string(), "required_env": z.array(requiredEnvVar), "requires_public_acceptance": z.boolean(), "version": z.string() });
425
+ export type InstallPreview = z.infer<typeof installPreview>;
426
+
427
+ export const mountedRoute = z.object({ "full_path": z.string(), "item": z.string(), "methods": z.array(z.enum(["GET","POST","PUT","PATCH","DELETE"])), "public": z.boolean() });
428
+ export type MountedRoute = z.infer<typeof mountedRoute>;
429
+
430
+ export const installResult = z.object({ "advisories": z.array(jsonValue), "notes": z.array(z.string()), "package": z.string().nullable(), "pip_output": z.string().nullable(), "ref": z.string(), "reload": applyResponse, "routes": z.array(mountedRoute), "version": z.string() });
431
+ export type InstallResult = z.infer<typeof installResult>;
432
+
433
+ export const itemRef = z.object({ "kind": z.string(), "name": z.string() });
434
+ export type ItemRef = z.infer<typeof itemRef>;
435
+
436
+ export const installedRow = z.object({ "compat": compatStatus, "delivery": z.enum(["package","descriptor"]), "incompatible_newer": z.string().nullable(), "installed_at": z.string(), "items": z.array(itemRef), "latest": z.string().nullable(), "missing_upstream": z.boolean(), "ref": z.string(), "route_mounts": z.record(z.string(), z.string()), "source": z.string(), "update_available": z.boolean(), "version": z.string() });
437
+ export type InstalledRow = z.infer<typeof installedRow>;
438
+
439
+ export const installedInventory = z.object({ "installed": z.array(installedRow) });
440
+ export type InstalledInventory = z.infer<typeof installedInventory>;
441
+
442
+ export const interactionActionResult = z.object({ "interaction_id": z.string(), "status": z.string() });
443
+ export type InteractionActionResult = z.infer<typeof interactionActionResult>;
444
+
445
+ export const interactionAnswer = z.object({ "answer": z.unknown() });
446
+ export type InteractionAnswer = z.infer<typeof interactionAnswer>;
447
+
448
+ export const interactionCallbackAck = z.object({ "interaction_id": z.string().nullable().default(null), "status": z.enum(["answered","already_answered"]) });
449
+ export type InteractionCallbackAck = z.infer<typeof interactionCallbackAck>;
450
+
451
+ export const interactionFrame = z.object({ "answer_format": answerFormat, "audience": z.string().nullable().default(null), "channel": z.string().nullable().default(null), "created_at": z.string(), "format_payload": jsonValue, "group_id": z.string(), "interaction_id": z.string(), "media": z.array(mediaItem).nullable().default(null), "origin": z.string().nullable().default(null), "question": z.string(), "recipient": z.string().nullable().default(null), "sensitive": z.boolean(), "server_verified": z.boolean().nullable().default(null), "timeout_at": z.string() });
452
+ export type InteractionFrame = z.infer<typeof interactionFrame>;
453
+
454
+ export const interactionReact = z.object({ "event": z.record(z.string(), z.unknown()), "values": z.record(z.string(), z.unknown()) });
455
+ export type InteractionReact = z.infer<typeof interactionReact>;
456
+
457
+ export const interactionReactionAck = z.object({ "update": z.record(z.string(), z.unknown()) });
458
+ export type InteractionReactionAck = z.infer<typeof interactionReactionAck>;
459
+
460
+ export const interactionReactionResult = z.object({ "interaction_id": z.string(), "update": z.record(z.string(), z.unknown()) });
461
+ export type InteractionReactionResult = z.infer<typeof interactionReactionResult>;
462
+
463
+ export const interactionWindow = z.object({ "items": z.array(interactionFrame), "next_page": z.number().int().nullable().default(null), "page": z.number().int(), "page_size": z.number().int(), "total": z.number().int(), "truncated": z.boolean() });
464
+ export type InteractionWindow = z.infer<typeof interactionWindow>;
465
+
466
+ export const intervalCadence = z.object({ "every": z.number().gt(0), "kind": z.literal("interval").default("interval"), "relative": z.boolean().default(false) }).strict();
467
+ export type IntervalCadence = z.infer<typeof intervalCadence>;
468
+
469
+ export const inviteCredential = z.object({ "email": z.string().min(1), "kind": z.literal("invite").default("invite") }).strict();
470
+ export type InviteCredential = z.infer<typeof inviteCredential>;
471
+
472
+ export const inviteRow = z.object({ "action_keys": z.array(z.string()).default([]), "created_at": z.string().datetime({ offset: true }), "email": z.string().min(1), "expires_at": z.string().datetime({ offset: true }), "handle": z.string().min(1), "id": z.string().min(1), "role": z.string().min(1).nullable() }).strict();
473
+ export type InviteRow = z.infer<typeof inviteRow>;
474
+
475
+ export const invokeMemberActionRequest = z.object({ "action_key": z.string().min(1), "input": z.record(z.string(), z.unknown()).default({}), "target_handle": z.string().nullable().default(null) });
476
+ export type InvokeMemberActionRequest = z.infer<typeof invokeMemberActionRequest>;
477
+
478
+ export const invokeMemberActionResult = z.object({ "result": z.record(z.string(), z.unknown()) }).strict();
479
+ export type InvokeMemberActionResult = z.infer<typeof invokeMemberActionResult>;
480
+
481
+ export const keyScopesModify = z.object({ "add": z.array(z.string()).default([]), "remove": z.array(z.string()).default([]) });
482
+ export type KeyScopesModify = z.infer<typeof keyScopesModify>;
483
+
484
+ export const kindStatus = z.object({ "detail": z.string(), "kind": z.string(), "plugin": z.string().nullable(), "state": z.enum(["active","default","off"]) });
485
+ export type KindStatus = z.infer<typeof kindStatus>;
486
+
487
+ export const lastOp = z.object({ "at": z.string(), "op": z.string(), "outcome": z.string() });
488
+ export type LastOp = z.infer<typeof lastOp>;
489
+
490
+ export const setupLogin = z.object({ "kinds": z.array(z.enum(["password","invite"])) });
491
+ export type SetupLogin = z.infer<typeof setupLogin>;
492
+
493
+ export const loginMethodsListing = z.object({ "claim_fragment_key": z.string(), "methods": z.array(z.discriminatedUnion("shape", [formMethod, buttonMethod])), "needs_setup": z.boolean(), "setup_login": setupLogin.nullable().default(null) });
494
+ export type LoginMethodsListing = z.infer<typeof loginMethodsListing>;
495
+
496
+ export const logoutResult = z.object({ "revoked": z.boolean() });
497
+ export type LogoutResult = z.infer<typeof logoutResult>;
498
+
499
+ export const mCPConfig = z.object({ "args": z.array(z.string()).default([]), "command": z.string().nullable().default(null), "env": z.record(z.string(), z.string()).default({}), "headers": z.record(z.string(), z.string()).default({}), "type": z.string().nullable().default(null), "uds": z.string().nullable().default(null), "url": z.string().nullable().default(null) });
500
+ export type MCPConfig = z.infer<typeof mCPConfig>;
501
+
502
+ export const manifestReplace = z.object({ "manifest_text": z.string() });
503
+ export type ManifestReplace = z.infer<typeof manifestReplace>;
504
+
505
+ export const marketplaceInstall = z.object({ "accept_public_routes": z.boolean().default(false), "env": z.record(z.string(), z.string()).nullable().default(null), "ref": z.string(), "route_mounts": z.record(z.string(), z.string()).nullable().default(null), "secret_keys": z.array(z.string()).nullable().default(null), "version": z.string().nullable().default(null) });
506
+ export type MarketplaceInstall = z.infer<typeof marketplaceInstall>;
507
+
508
+ export const marketplaceInstallPreview = z.object({ "ref": z.string(), "route_mounts": z.record(z.string(), z.string()).nullable().default(null), "version": z.string().nullable().default(null) });
509
+ export type MarketplaceInstallPreview = z.infer<typeof marketplaceInstallPreview>;
510
+
511
+ export const marketplaceUninstall = z.object({ "ref": z.string() });
512
+ export type MarketplaceUninstall = z.infer<typeof marketplaceUninstall>;
513
+
514
+ export const marketplaceUpdate = z.object({ "accept_public_routes": z.boolean().default(false), "env": z.record(z.string(), z.string()).nullable().default(null), "ref": z.string(), "route_mounts": z.record(z.string(), z.string()).nullable().default(null), "secret_keys": z.array(z.string()).nullable().default(null), "version": z.string().nullable().default(null) });
515
+ export type MarketplaceUpdate = z.infer<typeof marketplaceUpdate>;
516
+
517
+ export const taiMCPConfig = z.object({ "config": mCPConfig, "exclude": z.array(z.string()).default([]), "extensions": z.record(z.string(), z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())])))).default({}), "include": z.array(z.string()).default([]), "managed": connectorRef.nullable().default(null), "title": z.string() });
518
+ export type TaiMCPConfig = z.infer<typeof taiMCPConfig>;
519
+
520
+ export const mcpConfigUpdate = z.object({ "mcp": z.array(taiMCPConfig) });
521
+ export type McpConfigUpdate = z.infer<typeof mcpConfigUpdate>;
522
+
523
+ export const mcpEntriesAdd = z.object({ "entries": z.array(taiMCPConfig), "replace": z.boolean().default(false) });
524
+ export type McpEntriesAdd = z.infer<typeof mcpEntriesAdd>;
525
+
526
+ export const mcpEnvRef = z.object({ "has_default": z.boolean(), "pointer": z.string(), "set": z.boolean(), "var": z.string() });
527
+ export type McpEnvRef = z.infer<typeof mcpEnvRef>;
528
+
529
+ export const mcpEnvRefList = z.array(mcpEnvRef);
530
+ export type McpEnvRefList = z.infer<typeof mcpEnvRefList>;
531
+
532
+ export const mcpHealth = z.object({ "consecutive_failures": z.number().int(), "failing_since": z.string().nullable(), "last_error": z.record(z.string(), z.string()).nullable(), "last_success": z.string().nullable() });
533
+ export type McpHealth = z.infer<typeof mcpHealth>;
534
+
535
+ export const mcpStatusSnapshot = z.object({ "bound": z.record(z.string(), z.array(z.string())), "failed": z.array(failedMcp), "health": z.record(z.string(), mcpHealth) });
536
+ export type McpStatusSnapshot = z.infer<typeof mcpStatusSnapshot>;
537
+
538
+ export const mcpTargets = z.object({ "targets": z.array(z.string()).nullable().default(null) });
539
+ export type McpTargets = z.infer<typeof mcpTargets>;
540
+
541
+ export const memberActionDescriptor = z.object({ "destructive": z.boolean(), "input_schema": z.record(z.string(), z.unknown()), "key": z.string().min(1), "label": z.string(), "result_schema": z.record(z.string(), z.unknown()), "scope": z.enum(["page","member_row","invite_row"]) }).strict();
542
+ export type MemberActionDescriptor = z.infer<typeof memberActionDescriptor>;
543
+
544
+ export const memberActionCatalog = z.object({ "actions": z.array(memberActionDescriptor) }).strict();
545
+ export type MemberActionCatalog = z.infer<typeof memberActionCatalog>;
546
+
547
+ export const memberPrincipalState = z.object({ "disabled": z.boolean(), "role": z.string().min(1).nullable(), "user_id": z.string().min(1) }).strict();
548
+ export type MemberPrincipalState = z.infer<typeof memberPrincipalState>;
549
+
550
+ export const memberRow = z.object({ "action_keys": z.array(z.string()).default([]), "created_at": z.string().datetime({ offset: true }), "disabled": z.boolean(), "email": z.string().min(1), "handle": z.string().min(1), "id": z.string().min(1), "principals": z.array(memberPrincipalState), "role": z.string().min(1).nullable() }).strict();
551
+ export type MemberRow = z.infer<typeof memberRow>;
552
+
553
+ export const memberDirectory = z.object({ "invites": z.array(inviteRow), "members": z.array(memberRow) }).strict();
554
+ export type MemberDirectory = z.infer<typeof memberDirectory>;
555
+
556
+ export const messageSearchEnvelope = z.object({ "items": z.array(conversationRecordView), "next_page": z.number().int().nullable(), "page": z.number().int(), "page_size": z.number().int(), "total": z.number().int(), "truncated": z.boolean(), "unreadable": z.number().int().default(0) });
557
+ export type MessageSearchEnvelope = z.infer<typeof messageSearchEnvelope>;
558
+
559
+ export const metricsSummary = z.object({ "averageLatencyMs": z.number().int(), "avgCostPerRun": z.number(), "avgTokensPerRun": z.number().int(), "timeToFirstTokenMs": z.number().int().nullable().default(null), "totalCost": z.number(), "totalRuns": z.number().int(), "totalTokens": z.number().int() });
560
+ export type MetricsSummary = z.infer<typeof metricsSummary>;
561
+
562
+ export const metricsTimePoint = z.object({ "avgLatencyMs": z.number().int(), "bucket": z.string().nullable().default(null), "cost": z.number(), "runs": z.number().int(), "totalTokens": z.number().int() });
563
+ export type MetricsTimePoint = z.infer<typeof metricsTimePoint>;
564
+
565
+ export const modelUsageRow = z.object({ "avgLatencyMs": z.number().int(), "calls": z.number().int(), "cost": z.number(), "model": z.string(), "totalTokens": z.number().int() });
566
+ export type ModelUsageRow = z.infer<typeof modelUsageRow>;
567
+
568
+ export const metricsResult = z.object({ "byModel": z.array(modelUsageRow), "byModelAvailable": z.boolean().default(true), "granularity": z.enum(["hour","day","week"]), "summary": metricsSummary, "timeSeries": z.array(metricsTimePoint) });
569
+ export type MetricsResult = z.infer<typeof metricsResult>;
570
+
571
+ export const providerCapability = z.object({ "mintable": z.boolean(), "name": z.string() });
572
+ export type ProviderCapability = z.infer<typeof providerCapability>;
573
+
574
+ export const mintCapabilities = z.object({ "mintable": z.boolean(), "providers": z.array(providerCapability) });
575
+ export type MintCapabilities = z.infer<typeof mintCapabilities>;
576
+
577
+ export const notificationRecord = z.object({ "audience": z.string().nullable().default(null), "created_at": z.string(), "footer": z.string().nullable().default(null), "header": mediaItem.nullable().default(null), "id": z.string(), "location": locationElement.nullable().default(null), "media": z.array(mediaItem).nullable().default(null), "message": z.string(), "options": z.array(z.discriminatedUnion("kind", [replyOption, linkOption])).nullable().default(null), "recipient": z.string().nullable().default(null), "schema": jsonValue.default(null), "sections": z.array(optionSection).nullable().default(null), "template": channelTemplate.nullable().default(null) });
578
+ export type NotificationRecord = z.infer<typeof notificationRecord>;
579
+
580
+ export const notificationListing = z.object({ "notifications": z.array(notificationRecord) });
581
+ export type NotificationListing = z.infer<typeof notificationListing>;
582
+
583
+ export const notifyResult = z.string();
584
+ export type NotifyResult = z.infer<typeof notifyResult>;
585
+
586
+ export const notifyUser = z.object({ "audience": z.string().nullable().default(null), "channel": z.string().nullable().default(null), "data": formData.nullable().default(null), "footer": z.string().nullable().default(null), "form_tag": z.string().nullable().default(null), "header": mediaItem.nullable().default(null), "location": locationElement.nullable().default(null), "media": z.array(mediaItem).nullable().default(null), "message": z.string(), "options": z.array(z.discriminatedUnion("kind", [replyOption, linkOption])).nullable().default(null), "pages": z.array(formPage).nullable().default(null), "recipient": z.string().nullable().default(null), "schema": z.record(z.string(), z.unknown()).nullable().default(null), "sections": z.array(optionSection).nullable().default(null), "sender_identity": z.string().nullable().default(null), "template": channelTemplate.nullable().default(null) }).strict();
587
+ export type NotifyUser = z.infer<typeof notifyUser>;
588
+
589
+ export const oAuthCancelled = z.object({ "kind": z.literal("cancelled"), "message": z.string() });
590
+ export type OAuthCancelled = z.infer<typeof oAuthCancelled>;
591
+
592
+ export const oAuthComplete = z.object({ "code": z.string().nullable().default(null), "error": z.string().nullable().default(null), "iss": z.string().nullable().default(null), "state": z.string().nullable().default(null) });
593
+ export type OAuthComplete = z.infer<typeof oAuthComplete>;
594
+
595
+ export const oAuthFailed = z.object({ "kind": z.literal("failed"), "reason": z.string() });
596
+ export type OAuthFailed = z.infer<typeof oAuthFailed>;
597
+
598
+ export const oAuthNotConfigured = z.object({ "kind": z.literal("not_configured") });
599
+ export type OAuthNotConfigured = z.infer<typeof oAuthNotConfigured>;
600
+
601
+ export const oAuthSuccess = z.object({ "connection_id": z.string(), "fanout": fanoutSummary, "kind": z.literal("success"), "return_url": z.string() });
602
+ export type OAuthSuccess = z.infer<typeof oAuthSuccess>;
603
+
604
+ export const oAuthCompletionResult = z.discriminatedUnion("kind", [oAuthNotConfigured, oAuthCancelled, oAuthFailed, oAuthSuccess]);
605
+ export type OAuthCompletionResult = z.infer<typeof oAuthCompletionResult>;
606
+
607
+ export const observabilityMetricsCapabilities = z.object({ "dimensions": z.array(z.string()), "measures": z.array(z.string()) });
608
+ export type ObservabilityMetricsCapabilities = z.infer<typeof observabilityMetricsCapabilities>;
609
+
610
+ export const observabilityCapabilities = z.object({ "incompatibleFilters": z.record(z.string(), z.array(z.string())), "metrics": observabilityMetricsCapabilities, "pageSizeMax": z.number().int(), "sortKeys": z.array(z.enum(["createdAt","cost","latencyMs","totalTokens"])) });
611
+ export type ObservabilityCapabilities = z.infer<typeof observabilityCapabilities>;
612
+
613
+ export const observabilityRunView = z.object({ "cost": z.number().nullable().default(null), "createdAt": z.string().nullable().default(null), "id": z.string(), "inputPreview": jsonValue, "latencyMs": z.number().int().nullable().default(null), "outputPreview": jsonValue, "status": z.enum(["error","success"]), "tags": z.array(z.string()), "totalTokens": z.number().int().nullable().default(null), "traceId": z.string() });
614
+ export type ObservabilityRunView = z.infer<typeof observabilityRunView>;
615
+
616
+ export const observabilityRunsPage = z.object({ "items": z.array(observabilityRunView), "nextPage": z.number().int().nullable().default(null), "page": z.number().int() });
617
+ export type ObservabilityRunsPage = z.infer<typeof observabilityRunsPage>;
618
+
619
+ export const okResult = z.object({ "ok": z.boolean() });
620
+ export type OkResult = z.infer<typeof okResult>;
621
+
622
+ export const opaqueJson = jsonValue;
623
+ export type OpaqueJson = z.infer<typeof opaqueJson>;
624
+
625
+ export const parkedEntry = z.object({ "answer_format": z.string().nullable().default(null), "asked_by": z.array(z.string()).nullable().default(null), "audience": z.string().nullable().default(null), "channel": z.string().nullable().default(null), "created_at": z.string().nullable().default(null), "error": z.unknown().default(null), "expiry_at": z.string().nullable().default(null), "format_payload": z.record(z.string(), z.unknown()).nullable().default(null), "group_id": z.string().nullable().default(null), "id": z.string(), "media": z.array(z.record(z.string(), z.unknown())).nullable().default(null), "on_expiry": z.enum(["kill","resume"]).nullable().default(null), "payload": z.record(z.string(), z.unknown()).nullable().default(null), "question": z.string().nullable().default(null), "recipient": z.string().nullable().default(null), "result": z.unknown().default(null), "status": z.enum(["asking","running","finished","failed"]), "thread_id": z.string().nullable().default(null), "to": z.enum(["user","caller"]).nullable().default(null) }).strict();
626
+ export type ParkedEntry = z.infer<typeof parkedEntry>;
627
+
628
+ export const passwordCredential = z.object({ "email": z.string().min(1), "kind": z.literal("password").default("password"), "password": z.string().min(1) }).strict();
629
+ export type PasswordCredential = z.infer<typeof passwordCredential>;
630
+
631
+ export const patchSubServicesRequest = z.object({ "enabled_sub_services": z.array(z.string()).min(1).max(64), "return_url": z.string().nullable().default(null) });
632
+ export type PatchSubServicesRequest = z.infer<typeof patchSubServicesRequest>;
633
+
634
+ export const patchSubServicesResponse = z.object({ "added_manifest_entries": z.array(z.string()).default([]), "authorize_url": z.string().nullable().default(null), "connection_id": z.string(), "consent_required": z.boolean(), "enabled_sub_services": z.array(z.string()), "fanout": z.record(z.string(), z.unknown()).nullable().default(null), "flow_id": z.string().nullable().default(null), "removed_manifest_entries": z.array(z.string()).default([]) });
635
+ export type PatchSubServicesResponse = z.infer<typeof patchSubServicesResponse>;
636
+
637
+ export const patternEntry = z.object({ "open_prefix": z.string().nullable(), "pattern": z.string(), "scope_id": z.string() });
638
+ export type PatternEntry = z.infer<typeof patternEntry>;
639
+
640
+ export const pendingInteraction = z.object({ "audience": z.string().nullable().default(null), "channel": z.string().nullable().default(null), "created_at": z.string(), "expiry_at": z.string().nullable().default(null), "group_id": z.string(), "interaction_id": z.string(), "mode": z.string(), "question": z.string(), "recipient": z.string().nullable().default(null), "thread_id": z.string().nullable().default(null) });
641
+ export type PendingInteraction = z.infer<typeof pendingInteraction>;
642
+
643
+ export const pendingInteractionListing = z.object({ "count": z.number().int(), "items": z.array(pendingInteraction) });
644
+ export type PendingInteractionListing = z.infer<typeof pendingInteractionListing>;
645
+
646
+ export const personAddress = z.object({ "address": z.string().min(1), "channel": z.string().nullable().default(null), "door": z.enum(["api","channel"]), "linked_at": z.string(), "our_identity": z.string().nullable().default(null), "routes": z.array(z.string()).min(1) });
647
+ export type PersonAddress = z.infer<typeof personAddress>;
648
+
649
+ export const person = z.object({ "addresses": z.array(personAddress).min(1), "created_at": z.string(), "locale": z.string().nullable().default(null), "person_id": z.string().min(1), "target_kind": z.enum(["agent","tool"]), "target_name": z.string().min(1) });
650
+ export type Person = z.infer<typeof person>;
651
+
652
+ export const personDeleteResult = z.object({ "erased": z.boolean(), "person_id": z.string(), "removed": z.number().int() });
653
+ export type PersonDeleteResult = z.infer<typeof personDeleteResult>;
654
+
655
+ export const policyRollback = z.object({ "version": z.number().int() });
656
+ export type PolicyRollback = z.infer<typeof policyRollback>;
657
+
658
+ export const policyRollbackResult = z.object({ "active_version": z.number().int(), "user_id": z.string() });
659
+ export type PolicyRollbackResult = z.infer<typeof policyRollbackResult>;
660
+
661
+ export const preservedManifestView = z.object({ "mcp": z.array(z.record(z.string(), z.unknown())), "user_tools": z.array(z.string()) });
662
+ export type PreservedManifestView = z.infer<typeof preservedManifestView>;
663
+
664
+ export const presetCreate = z.object({ "base_tool": z.string(), "description": z.string(), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))).default([]), "fixed_kwargs": z.record(z.string(), z.unknown()).default({}), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "name": z.string(), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "state_binding": stateBinding.nullable().default(null) });
665
+ export type PresetCreate = z.infer<typeof presetCreate>;
666
+
667
+ export const presetCreateResult = z.object({ "active_version": z.number().int(), "base_tool": z.string(), "conflicted": z.boolean(), "conflicted_reason": z.string().nullable(), "description": z.string(), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))), "fanout": fanoutSummary, "input_schema": z.record(z.string(), z.unknown()).nullable(), "name": z.string(), "output_schema": z.record(z.string(), z.unknown()).nullable(), "used_by": z.array(z.string()), "uses": z.array(z.string()) });
668
+ export type PresetCreateResult = z.infer<typeof presetCreateResult>;
669
+
670
+ export const presetDeleteResult = z.object({ "deleted": z.boolean(), "fanout": fanoutSummary, "name": z.string() });
671
+ export type PresetDeleteResult = z.infer<typeof presetDeleteResult>;
672
+
673
+ export const presetDetailView = z.object({ "active_version": z.number().int(), "base_tool": z.string(), "conflicted": z.boolean(), "conflicted_reason": z.string().nullable(), "description": z.string(), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))), "fixed_kwargs": z.record(z.string(), z.unknown()), "input_schema": z.record(z.string(), z.unknown()).nullable(), "name": z.string(), "output_schema": z.record(z.string(), z.unknown()).nullable(), "used_by": z.array(z.string()), "uses": z.array(z.string()) });
674
+ export type PresetDetailView = z.infer<typeof presetDetailView>;
675
+
676
+ export const presetRecordView = z.object({ "active_version": z.number().int(), "base_tool": z.string(), "conflicted": z.boolean(), "conflicted_reason": z.string().nullable(), "description": z.string(), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))), "input_schema": z.record(z.string(), z.unknown()).nullable(), "name": z.string(), "output_schema": z.record(z.string(), z.unknown()).nullable(), "used_by": z.array(z.string()), "uses": z.array(z.string()) });
677
+ export type PresetRecordView = z.infer<typeof presetRecordView>;
678
+
679
+ export const presetRecordList = z.array(presetRecordView);
680
+ export type PresetRecordList = z.infer<typeof presetRecordList>;
681
+
682
+ export const presetRefereesResult = z.object({ "name": z.string(), "referees": z.array(z.string()) });
683
+ export type PresetRefereesResult = z.infer<typeof presetRefereesResult>;
684
+
685
+ export const presetRename = z.object({ "new_name": z.string() });
686
+ export type PresetRename = z.infer<typeof presetRename>;
687
+
688
+ export const presetRenameResult = z.object({ "active_version": z.number().int(), "fanout": fanoutSummary, "name": z.string(), "renamed_from": z.string() });
689
+ export type PresetRenameResult = z.infer<typeof presetRenameResult>;
690
+
691
+ export const presetRollback = z.object({ "version": z.number().int() });
692
+ export type PresetRollback = z.infer<typeof presetRollback>;
693
+
694
+ export const presetRollbackResult = z.object({ "active_version": z.number().int(), "fanout": fanoutSummary, "name": z.string() });
695
+ export type PresetRollbackResult = z.infer<typeof presetRollbackResult>;
696
+
697
+ export const presetValidate = z.object({ "base_tool": z.string().nullable().default(null), "description": z.string().nullable().default(null), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))).nullable().default(null), "fixed_kwargs": z.record(z.string(), z.unknown()).nullable().default(null), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "name": z.string(), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "state_binding": stateBinding.nullable().default(null) });
698
+ export type PresetValidate = z.infer<typeof presetValidate>;
699
+
700
+ export const presetValidateVerdict = z.object({ "error": z.string().nullable(), "valid": z.boolean() });
701
+ export type PresetValidateVerdict = z.infer<typeof presetValidateVerdict>;
702
+
703
+ export const presetVersionSave = z.object({ "description": z.string().nullable().default(null), "extensions": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))).nullable().default(null), "fixed_kwargs": z.record(z.string(), z.unknown()).nullable().default(null), "input_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "output_schema": z.union([templatedText, z.record(z.string(), z.unknown()), z.null()]).default(null), "state_binding": stateBinding.nullable().default(null) });
704
+ export type PresetVersionSave = z.infer<typeof presetVersionSave>;
705
+
706
+ export const presetVersionSaveResult = z.object({ "body": z.record(z.string(), z.unknown()), "created_at": z.string(), "fanout": fanoutSummary, "is_current": z.boolean().default(false), "tags": z.array(z.string()).default([]), "version": z.number().int() });
707
+ export type PresetVersionSaveResult = z.infer<typeof presetVersionSaveResult>;
708
+
709
+ export const presetVersionTags = z.object({ "tags": z.array(z.string()) });
710
+ export type PresetVersionTags = z.infer<typeof presetVersionTags>;
711
+
712
+ export const presetVersionTagsResult = z.object({ "name": z.string(), "tags": z.array(z.string()), "version": z.number().int() });
713
+ export type PresetVersionTagsResult = z.infer<typeof presetVersionTagsResult>;
714
+
715
+ export const principal = z.object({ "created_at": z.string().datetime({ offset: true }), "created_by": z.string().nullable().default(null), "disabled": z.boolean().default(false), "display_name": z.string(), "kind": z.enum(["human","service"]), "user_id": z.string() }).strict();
716
+ export type Principal = z.infer<typeof principal>;
717
+
718
+ export const principalCreate = z.object({ "display_name": z.string().min(1), "kind": z.enum(["human","service"]), "role": z.string().min(1), "user_id": z.string().nullable().default(null) });
719
+ export type PrincipalCreate = z.infer<typeof principalCreate>;
720
+
721
+ export const principalDeleted = z.object({ "deleted": z.boolean(), "user_id": z.string() });
722
+ export type PrincipalDeleted = z.infer<typeof principalDeleted>;
723
+
724
+ export const principalListing = z.array(principal);
725
+ export type PrincipalListing = z.infer<typeof principalListing>;
726
+
727
+ export const principalRef = z.object({ "display_name": z.string(), "kind": z.enum(["human","service"]), "user_id": z.string() });
728
+ export type PrincipalRef = z.infer<typeof principalRef>;
729
+
730
+ export const principalUpdate = z.object({ "disabled": z.boolean().nullable().default(null), "display_name": z.string().min(1).nullable().default(null) });
731
+ export type PrincipalUpdate = z.infer<typeof principalUpdate>;
732
+
733
+ export const profileApplyResponse = z.object({ "awaiting_respawn": z.array(awaitingWorker).default([]), "fanout": fanoutSummary, "fresh": z.array(freshLife), "hot": z.array(z.string()), "recycle": z.array(recycleEntry), "recycle_stopped": recycleStop.nullable().default(null), "refused": z.array(z.string()) });
734
+ export type ProfileApplyResponse = z.infer<typeof profileApplyResponse>;
735
+
736
+ export const profileDiffChange = z.object({ "key": z.string(), "new": z.string(), "old": z.string() });
737
+ export type ProfileDiffChange = z.infer<typeof profileDiffChange>;
738
+
739
+ export const profileDiff = z.object({ "added": z.array(z.string()), "changed": z.array(profileDiffChange), "recycle_keys": z.array(z.string()), "refused_keys": z.array(z.string()), "removed": z.array(z.string()) });
740
+ export type ProfileDiff = z.infer<typeof profileDiff>;
741
+
742
+ export const profileSummary = z.object({ "description": z.string(), "name": z.string() });
743
+ export type ProfileSummary = z.infer<typeof profileSummary>;
744
+
745
+ export const profileListResponse = z.array(profileSummary);
746
+ export type ProfileListResponse = z.infer<typeof profileListResponse>;
747
+
748
+ export const profileRollback = z.object({ "version": z.number().int() });
749
+ export type ProfileRollback = z.infer<typeof profileRollback>;
750
+
751
+ export const profileVersionSummary = z.object({ "created_at": z.string(), "is_current": z.boolean(), "tags": z.array(z.string()), "version": z.number().int() });
752
+ export type ProfileVersionSummary = z.infer<typeof profileVersionSummary>;
753
+
754
+ export const profileVersionListResponse = z.array(profileVersionSummary);
755
+ export type ProfileVersionListResponse = z.infer<typeof profileVersionListResponse>;
756
+
757
+ export const settingsProfileBody = z.object({ "description": z.string().default(""), "env": z.record(z.string(), z.string()).default({}), "secret_keys": z.array(z.string()).default([]) });
758
+ export type SettingsProfileBody = z.infer<typeof settingsProfileBody>;
759
+
760
+ export const profileVersionView = z.object({ "body": settingsProfileBody, "created_at": z.string(), "is_current": z.boolean(), "tags": z.array(z.string()), "version": z.number().int() });
761
+ export type ProfileVersionView = z.infer<typeof profileVersionView>;
762
+
763
+ export const profileWriteResult = z.object({ "ok": z.boolean(), "version": z.number().int() });
764
+ export type ProfileWriteResult = z.infer<typeof profileWriteResult>;
765
+
766
+ export const routeEntry = z.object({ "methods": z.array(z.string()), "path": z.string() });
767
+ export type RouteEntry = z.infer<typeof routeEntry>;
768
+
769
+ export const subMcpEntry = z.object({ "access_pattern": z.string(), "mount_url": z.string(), "slug": z.string(), "tools": z.array(z.string()), "transport": z.string() });
770
+ export type SubMcpEntry = z.infer<typeof subMcpEntry>;
771
+
772
+ export const projectionResult = z.object({ "admin": z.boolean(), "agents": z.array(z.string()), "mintable": z.boolean(), "owner_user_id": z.string().nullable(), "principal": principalRef.nullable(), "public_resource_id": z.string(), "route_patterns": z.array(patternEntry), "routes": z.array(routeEntry), "scopes": z.array(z.string()), "sub_mcp": z.array(subMcpEntry), "tools": z.array(z.string()), "user_id": z.string() });
773
+ export type ProjectionResult = z.infer<typeof projectionResult>;
774
+
775
+ export const subServiceView = z.object({ "description": z.string().default(""), "display_name": z.string(), "id": z.string(), "scopes": z.array(z.string()).default([]) });
776
+ export type SubServiceView = z.infer<typeof subServiceView>;
777
+
778
+ export const providerCatalogEntry = z.object({ "category": z.string(), "client_source": z.enum(["env","manual","dynamic","unset"]).nullable().default(null), "config_fields": z.array(configFieldSpec).default([]), "description": z.string().default(""), "display_name": z.string(), "icon_url": z.string().nullable().default(null), "id": z.string(), "kind": z.enum(["oauth","none"]), "origin": z.enum(["system","community"]), "removable": z.boolean().default(false), "sub_services": z.array(subServiceView) });
779
+ export type ProviderCatalogEntry = z.infer<typeof providerCatalogEntry>;
780
+
781
+ export const providerCatalogResponse = z.object({ "categories": z.array(connectorCategoryView), "providers": z.array(providerCatalogEntry) });
782
+ export type ProviderCatalogResponse = z.infer<typeof providerCatalogResponse>;
783
+
784
+ export const providerMutationResponse = z.object({ "fanout": z.record(z.string(), z.unknown()).nullable().default(null), "provider": providerCatalogEntry });
785
+ export type ProviderMutationResponse = z.infer<typeof providerMutationResponse>;
786
+
787
+ export const pruneResult = z.object({ "held": heldPendingSaveList.optional(), "pruned": z.record(z.string(), z.number().int()) });
788
+ export type PruneResult = z.infer<typeof pruneResult>;
789
+
790
+ export const publicRoutePin = z.object({ "pattern": z.string().nullable().default(null), "url": z.string() });
791
+ export type PublicRoutePin = z.infer<typeof publicRoutePin>;
792
+
793
+ export const publicRouteUnpin = z.object({ "url": z.string() });
794
+ export type PublicRouteUnpin = z.infer<typeof publicRouteUnpin>;
795
+
796
+ export const reloadConfig = z.object({ "targets": z.array(z.string()).nullable().default(null) });
797
+ export type ReloadConfig = z.infer<typeof reloadConfig>;
798
+
799
+ export const reloadConfigRequest = z.object({ "targets": z.array(z.string()).nullable().default(null) });
800
+ export type ReloadConfigRequest = z.infer<typeof reloadConfigRequest>;
801
+
802
+ export const reloadingError = z.object({ "error": z.literal("reloading — the server is applying a config reload; retry shortly"), "reloading": z.literal(true) });
803
+ export type ReloadingError = z.infer<typeof reloadingError>;
804
+
805
+ export const removeProviderResponse = z.object({ "fanout": z.record(z.string(), z.unknown()).nullable().default(null), "provider_id": z.string(), "removed_clients": z.number().int() });
806
+ export type RemoveProviderResponse = z.infer<typeof removeProviderResponse>;
807
+
808
+ export const removedByName = z.object({ "name": z.string(), "removed": z.boolean() });
809
+ export type RemovedByName = z.infer<typeof removedByName>;
810
+
811
+ export const removedByTopic = z.object({ "removed": z.boolean(), "topic": z.string() });
812
+ export type RemovedByTopic = z.infer<typeof removedByTopic>;
813
+
814
+ export const renderedTemplate = z.object({ "rendered": z.string() });
815
+ export type RenderedTemplate = z.infer<typeof renderedTemplate>;
816
+
817
+ export const resolvedSpanValue = z.object({ "field": z.enum(["input","output"]), "pointer": z.string(), "spanId": z.string(), "traceId": z.string(), "value": jsonValue.default(null) });
818
+ export type ResolvedSpanValue = z.infer<typeof resolvedSpanValue>;
819
+
820
+ export const resourceContent = z.union([z.string(), jsonValue]);
821
+ export type ResourceContent = z.infer<typeof resourceContent>;
822
+
823
+ export const resourceDeleted = z.object({ "deleted": z.boolean(), "id": z.string() });
824
+ export type ResourceDeleted = z.infer<typeof resourceDeleted>;
825
+
826
+ export const resourceGet = z.object({ "kwargs": z.record(z.string(), z.unknown()).nullable().default(null), "resource_id": z.string() });
827
+ export type ResourceGet = z.infer<typeof resourceGet>;
828
+
829
+ export const resourceList = z.object({ "resources": z.array(z.string()) });
830
+ export type ResourceList = z.infer<typeof resourceList>;
831
+
832
+ export const resourceStat = z.object({ "content_type": z.string().nullable(), "id": z.string() });
833
+ export type ResourceStat = z.infer<typeof resourceStat>;
834
+
835
+ export const resourceStored = z.object({ "id": z.string(), "stored": z.boolean() });
836
+ export type ResourceStored = z.infer<typeof resourceStored>;
837
+
838
+ export const revokeAck = z.object({ "revoked": z.boolean(), "user_id": z.string() });
839
+ export type RevokeAck = z.infer<typeof revokeAck>;
840
+
841
+ export const roleCreate = z.object({ "base_tier": z.string(), "description": z.string().default(""), "grants": z.record(z.string(), z.enum(["none","read","write"])).default({}), "name": z.string() });
842
+ export type RoleCreate = z.infer<typeof roleCreate>;
843
+
844
+ export const roleDefinitionList = z.array(roleDefinition);
845
+ export type RoleDefinitionList = z.infer<typeof roleDefinitionList>;
846
+
847
+ export const roleDeleted = z.object({ "deleted": z.boolean(), "name": z.string() });
848
+ export type RoleDeleted = z.infer<typeof roleDeleted>;
849
+
850
+ export const roleGrantsModify = z.object({ "remove": z.array(z.string()).default([]), "upsert": z.record(z.string(), z.enum(["none","read","write"])).default({}) });
851
+ export type RoleGrantsModify = z.infer<typeof roleGrantsModify>;
852
+
853
+ export const roleRollback = z.object({ "version": z.number().int() });
854
+ export type RoleRollback = z.infer<typeof roleRollback>;
855
+
856
+ export const roleUpdate = z.object({ "description": z.string().nullable().default(null), "grants": z.record(z.string(), z.enum(["none","read","write"])).nullable().default(null) });
857
+ export type RoleUpdate = z.infer<typeof roleUpdate>;
858
+
859
+ export const roleVersionsView = z.object({ "audit": z.array(z.record(z.string(), jsonValue)), "versions": z.array(documentVersion) });
860
+ export type RoleVersionsView = z.infer<typeof roleVersionsView>;
861
+
862
+ export const routeMappingRow = z.object({ "action": z.enum(["read","write","fenced","secret"]).nullable(), "declared_public": z.boolean(), "mapped": z.string().nullable(), "methods": z.array(z.string()), "path": z.string(), "summary": z.string(), "tags": z.array(z.string()) });
863
+ export type RouteMappingRow = z.infer<typeof routeMappingRow>;
864
+
865
+ export const routeMappingList = z.array(routeMappingRow);
866
+ export type RouteMappingList = z.infer<typeof routeMappingList>;
867
+
868
+ export const routeRemoveResult = z.object({ "removed": z.boolean(), "route_name": z.string() });
869
+ export type RouteRemoveResult = z.infer<typeof routeRemoveResult>;
870
+
871
+ export const suspendedInteraction = z.object({ "caller_interaction_ids": z.array(z.string()).default([]), "expiry_at": z.string().datetime({ offset: true }).nullable().default(null), "interaction_id": z.string(), "interaction_ids": z.array(z.string()).default([]), "resume_owner": z.string().nullable().default(null) });
872
+ export type SuspendedInteraction = z.infer<typeof suspendedInteraction>;
873
+
874
+ export const runAsksAnswer = z.object({ "asks": z.array(parkedEntry), "kind": z.literal("asks").default("asks"), "suspended": suspendedInteraction });
875
+ export type RunAsksAnswer = z.infer<typeof runAsksAnswer>;
876
+
877
+ export const runNoneAnswer = z.object({ "kind": z.literal("none").default("none") });
878
+ export type RunNoneAnswer = z.infer<typeof runNoneAnswer>;
879
+
880
+ export const runParkedAnswer = z.object({ "kind": z.literal("parked").default("parked"), "suspended": suspendedInteraction });
881
+ export type RunParkedAnswer = z.infer<typeof runParkedAnswer>;
882
+
883
+ export const runResultAnswer = z.object({ "kind": z.literal("result").default("result"), "result": z.unknown() });
884
+ export type RunResultAnswer = z.infer<typeof runResultAnswer>;
885
+
886
+ export const runAnswerResponse = z.discriminatedUnion("kind", [runResultAnswer, runAsksAnswer, runParkedAnswer, runNoneAnswer]);
887
+ export type RunAnswerResponse = z.infer<typeof runAnswerResponse>;
888
+
889
+ export const runSubmitted = z.object({ "run_id": z.string() });
890
+ export type RunSubmitted = z.infer<typeof runSubmitted>;
891
+
892
+ export const runToolRequest = z.object({ "arguments": z.record(z.string(), z.unknown()).default({}), "subject": stateSubject.nullable().default(null), "tool_name": z.string().min(1) });
893
+ export type RunToolRequest = z.infer<typeof runToolRequest>;
894
+
895
+ export const spanOutlineView = z.object({ "end": z.string().nullable().default(null), "id": z.string(), "inputTokens": z.number().int().nullable().default(null), "kind": z.enum(["LLM","TOOL","CHAIN","EVENT"]).nullable().default(null), "level": z.string().nullable().default(null), "metadata": jsonValue.default(null), "model": z.string().nullable().default(null), "name": z.string().nullable().default(null), "outputTokens": z.number().int().nullable().default(null), "parentId": z.string().nullable().default(null), "start": z.string().nullable().default(null), "statusMessage": z.string().nullable().default(null), "totalTokens": z.number().int().nullable().default(null), "traceId": z.string().nullable().default(null) });
896
+ export type SpanOutlineView = z.infer<typeof spanOutlineView>;
897
+
898
+ export const runTraceOutlineView = z.object({ "spans": z.array(spanOutlineView), "traceId": z.string() });
899
+ export type RunTraceOutlineView = z.infer<typeof runTraceOutlineView>;
900
+
901
+ export const spanView = z.object({ "end": z.string().nullable().default(null), "id": z.string(), "input": jsonValue.default(null), "inputTokens": z.number().int().nullable().default(null), "kind": z.enum(["LLM","TOOL","CHAIN","EVENT"]).nullable().default(null), "level": z.string().nullable().default(null), "metadata": jsonValue.default(null), "model": z.string().nullable().default(null), "name": z.string().nullable().default(null), "output": jsonValue.default(null), "outputTokens": z.number().int().nullable().default(null), "parentId": z.string().nullable().default(null), "start": z.string().nullable().default(null), "statusMessage": z.string().nullable().default(null), "totalTokens": z.number().int().nullable().default(null), "traceId": z.string().nullable().default(null) });
902
+ export type SpanView = z.infer<typeof spanView>;
903
+
904
+ export const runTraceView = z.object({ "input": jsonValue.default(null), "metadata": jsonValue.default(null), "output": jsonValue.default(null), "spans": z.array(spanView), "tags": z.array(z.string()), "timestamp": z.string().nullable().default(null), "totalCost": z.number().nullable().default(null), "traceId": z.string() });
905
+ export type RunTraceView = z.infer<typeof runTraceView>;
906
+
907
+ export const runView = z.object({ "endedAt": z.string().nullable().default(null), "interactionId": z.string().nullable().default(null), "outcome": z.string(), "preset": z.string(), "resumedInteractions": z.array(z.string()), "runId": z.string(), "session": z.string().nullable().default(null), "startedAt": z.string(), "traceId": z.string().nullable().default(null), "user": z.string().nullable().default(null), "version": z.number().int().nullable().default(null) });
908
+ export type RunView = z.infer<typeof runView>;
909
+
910
+ export const runsPage = z.object({ "items": z.array(runView), "nextPage": z.number().int().nullable().default(null), "page": z.number().int() });
911
+ export type RunsPage = z.infer<typeof runsPage>;
912
+
913
+ export const runsPruneResult = z.object({ "cutoff": z.string().nullable().default(null), "pruned_count": z.number().int(), "retention_days": z.number().int().nullable().default(null), "skipped": z.string().nullable().default(null) });
914
+ export type RunsPruneResult = z.infer<typeof runsPruneResult>;
915
+
916
+ export const sandboxPolicy = z.object({ "durable": z.boolean(), "egress": z.string(), "isolation": z.string(), "scrub_transcript": z.boolean() });
917
+ export type SandboxPolicy = z.infer<typeof sandboxPolicy>;
918
+
919
+ export const sandboxInfo = z.object({ "module": z.string().nullable().default(null), "policy": sandboxPolicy, "present": z.boolean(), "provider": z.string().nullable().default(null), "sessions": z.number().int() });
920
+ export type SandboxInfo = z.infer<typeof sandboxInfo>;
921
+
922
+ export const scheduleListResponse = z.array(scheduleListRow);
923
+ export type ScheduleListResponse = z.infer<typeof scheduleListResponse>;
924
+
925
+ export const scheduleRowError = z.object({ "at_iso": z.string().nullable().default(null), "message": z.string() }).strict();
926
+ export type ScheduleRowError = z.infer<typeof scheduleRowError>;
927
+
928
+ export const scopeDeleteResult = z.object({ "deleted_keys": z.number().int(), "scope_id": z.string() });
929
+ export type ScopeDeleteResult = z.infer<typeof scopeDeleteResult>;
930
+
931
+ export const scopeUrlAck = z.object({ "scope_id": z.string(), "url": z.string() });
932
+ export type ScopeUrlAck = z.infer<typeof scopeUrlAck>;
933
+
934
+ export const scopeUrlAdd = z.object({ "pattern": z.string().nullable().default(null), "scope_id": z.string(), "url": z.string() });
935
+ export type ScopeUrlAdd = z.infer<typeof scopeUrlAdd>;
936
+
937
+ export const scopeUrlMap = z.record(z.string(), z.string());
938
+ export type ScopeUrlMap = z.infer<typeof scopeUrlMap>;
939
+
940
+ export const scopeUrlRemove = z.object({ "url": z.string() });
941
+ export type ScopeUrlRemove = z.infer<typeof scopeUrlRemove>;
942
+
943
+ export const scopesUpdateAck = z.object({ "scopes": z.array(z.string()), "updated": z.boolean(), "user_id": z.string() });
944
+ export type ScopesUpdateAck = z.infer<typeof scopesUpdateAck>;
945
+
946
+ export const stateAttachmentView = z.object({ "declarations": z.record(z.string(), jsonValue), "parameters": z.record(z.string(), jsonValue), "path": z.array(z.string()), "template": z.string() });
947
+ export type StateAttachmentView = z.infer<typeof stateAttachmentView>;
948
+
949
+ export const servedStateView = z.object({ "attachments": z.array(stateAttachmentView), "default_subject_kind": z.string(), "description": z.string(), "effective_schema": z.record(z.string(), jsonValue), "name": z.string(), "regimes": z.array(z.record(z.string(), jsonValue)), "retention_days": z.number().int().nullable(), "schema": z.record(z.string(), jsonValue), "subject_kinds": z.array(z.string()), "updated_at": z.string().nullable() });
950
+ export type ServedStateView = z.infer<typeof servedStateView>;
951
+
952
+ export const setConnectorClientRequest = z.object({ "client_id": z.string().min(1), "client_secret": z.string().nullable().default(null), "issuer": z.string().nullable().default(null), "token_endpoint_auth_method": z.enum(["client_secret_post","client_secret_basic","none"]).nullable().default(null) });
953
+ export type SetConnectorClientRequest = z.infer<typeof setConnectorClientRequest>;
954
+
955
+ export const setMcpSecretEnv = z.object({ "key": z.string().nullable().default(null), "key_hint": z.string().nullable().default(null), "manifest_pointer": z.string(), "value": z.string() });
956
+ export type SetMcpSecretEnv = z.infer<typeof setMcpSecretEnv>;
957
+
958
+ export const settingsGroupView = z.object({ "fields": z.array(z.record(z.string(), jsonValue)), "module": z.string(), "name": z.string(), "qualname": z.string() });
959
+ export type SettingsGroupView = z.infer<typeof settingsGroupView>;
960
+
961
+ export const settingsSchemaView = z.object({ "groups": z.array(settingsGroupView) });
962
+ export type SettingsSchemaView = z.infer<typeof settingsSchemaView>;
963
+
964
+ export const setupRequest = z.object({ "key_description": z.string().default("owner key"), "key_user_id": z.string().nullable().default(null), "login": z.discriminatedUnion("kind", [passwordCredential, inviteCredential]).nullable().default(null), "owner_display_name": z.string().min(1), "owner_user_id": z.string().nullable().default(null), "setup_token": z.string().default("") }).strict();
965
+ export type SetupRequest = z.infer<typeof setupRequest>;
966
+
967
+ export const setupResult = z.object({ "api_key": z.string(), "invite_token": z.string().nullable().default(null), "key_fingerprint": z.string(), "key_user_id": z.string(), "login_attached": z.boolean(), "login_path": z.string().nullable().default(null), "owner_user_id": z.string() }).strict();
968
+ export type SetupResult = z.infer<typeof setupResult>;
969
+
970
+ export const startConnectNoAuthResponse = z.object({ "added_manifest_entries": z.array(z.string()).default([]), "connection_id": z.string(), "fanout": z.record(z.string(), z.unknown()).nullable().default(null) });
971
+ export type StartConnectNoAuthResponse = z.infer<typeof startConnectNoAuthResponse>;
972
+
973
+ export const startConnectResponse = z.object({ "authorize_url": z.string(), "flow_id": z.string() });
974
+ export type StartConnectResponse = z.infer<typeof startConnectResponse>;
975
+
976
+ export const startConnectOutcome = z.union([startConnectResponse, startConnectNoAuthResponse]);
977
+ export type StartConnectOutcome = z.infer<typeof startConnectOutcome>;
978
+
979
+ export const startConnectRequest = z.object({ "alias": z.string(), "config_values": z.record(z.string(), z.string()).default({}), "enabled_sub_services": z.array(z.string()).min(1).max(64), "provider_id": z.string(), "return_url": z.string().nullable().default(null) });
980
+ export type StartConnectRequest = z.infer<typeof startConnectRequest>;
981
+
982
+ export const startReconnectRequest = z.object({ "enabled_sub_services": z.array(z.string()).min(1).max(64), "return_url": z.string().nullable().default(null) });
983
+ export type StartReconnectRequest = z.infer<typeof startReconnectRequest>;
984
+
985
+ export const stateAttachmentRow = z.object({ "declarations": z.record(z.string(), jsonValue), "parameters": z.record(z.string(), jsonValue), "path": z.array(z.string()), "state": z.string(), "template": z.string() });
986
+ export type StateAttachmentRow = z.infer<typeof stateAttachmentRow>;
987
+
988
+ export const stateAttachmentList = z.array(stateAttachmentRow);
989
+ export type StateAttachmentList = z.infer<typeof stateAttachmentList>;
990
+
991
+ export const stateConsumerList = z.array(consumerRow);
992
+ export type StateConsumerList = z.infer<typeof stateConsumerList>;
993
+
994
+ export const stateDeclarationList = z.array(stateDeclaration);
995
+ export type StateDeclarationList = z.infer<typeof stateDeclarationList>;
996
+
997
+ export const stateRegimeRule = z.object({ "path": z.array(z.string().min(1)), "regime": z.enum(["single","composing","free"]) }).strict();
998
+ export type StateRegimeRule = z.infer<typeof stateRegimeRule>;
999
+
1000
+ export const stateDeclarationPutResponse = z.object({ "default_subject_kind": z.string(), "description": z.string().default(""), "effective_schema": z.record(z.string(), z.unknown()).nullable().default(null), "held": heldPendingSaveList.optional(), "name": z.string(), "regimes": z.array(stateRegimeRule).nullable().default(null), "retention_days": z.number().int().gt(0).lte(2147483647).nullable().default(null), "schema": z.union([templatedText, z.record(z.string(), z.unknown())]).optional(), "subject_kinds": z.array(z.string()).min(1), "updated_at": z.string().datetime({ offset: true }).nullable().default(null) }).strict();
1001
+ export type StateDeclarationPutResponse = z.infer<typeof stateDeclarationPutResponse>;
1002
+
1003
+ export const stateDeleteResult = z.object({ "deleted": z.boolean(), "name": z.string() });
1004
+ export type StateDeleteResult = z.infer<typeof stateDeleteResult>;
1005
+
1006
+ export const statePendingSaveCall = z.object({ "kind": z.string(), "target": z.string() });
1007
+ export type StatePendingSaveCall = z.infer<typeof statePendingSaveCall>;
1008
+
1009
+ export const statePendingSaveSubject = z.object({ "state": z.string(), "subject": stateSubject });
1010
+ export type StatePendingSaveSubject = z.infer<typeof statePendingSaveSubject>;
1011
+
1012
+ export const statePendingSave = z.object({ "attempts": z.number().int(), "calls": z.array(statePendingSaveCall), "created_at": z.string().datetime({ offset: true }), "failed_at": z.string().datetime({ offset: true }).nullable(), "failed_phase": z.enum(["records","calls"]).nullable(), "id": z.string(), "last_error": z.string().nullable(), "run_id": z.string().nullable(), "states": z.array(z.string()), "status": z.enum(["pending","calls","running","failed"]), "subjects": z.array(statePendingSaveSubject) });
1013
+ export type StatePendingSave = z.infer<typeof statePendingSave>;
1014
+
1015
+ export const statePendingSaveDiscarded = z.object({ "discarded": z.string() });
1016
+ export type StatePendingSaveDiscarded = z.infer<typeof statePendingSaveDiscarded>;
1017
+
1018
+ export const statePendingSaveRetried = z.object({ "id": z.string(), "last_error": z.string().nullable(), "status": z.enum(["applied","pending","calls","running","failed"]) });
1019
+ export type StatePendingSaveRetried = z.infer<typeof statePendingSaveRetried>;
1020
+
1021
+ export const statePendingSavesPage = z.object({ "failed": z.number().int(), "items": z.array(statePendingSave), "next_cursor": z.string().nullable(), "outstanding": z.number().int() });
1022
+ export type StatePendingSavesPage = z.infer<typeof statePendingSavesPage>;
1023
+
1024
+ export const stateRecord = z.object({ "canonical_subject": stateSubject, "data": z.record(z.string(), z.unknown()).default({}), "folded_from": z.array(stateSubject).default([]), "seq": z.number(), "state": z.string(), "subject": stateSubject }).strict();
1025
+ export type StateRecord = z.infer<typeof stateRecord>;
1026
+
1027
+ export const stateRecordOrNull = stateRecord.nullable();
1028
+ export type StateRecordOrNull = z.infer<typeof stateRecordOrNull>;
1029
+
1030
+ export const stateSubjectEntry = z.object({ "subject": stateSubject, "updated_at": z.number() });
1031
+ export type StateSubjectEntry = z.infer<typeof stateSubjectEntry>;
1032
+
1033
+ export const stateSearchPage = z.object({ "held": heldPendingSaveList.optional(), "matches": z.array(stateSubjectEntry), "next_cursor": z.string().nullable() });
1034
+ export type StateSearchPage = z.infer<typeof stateSearchPage>;
1035
+
1036
+ export const stateStats = z.object({ "consumers": z.number().int(), "held": heldPendingSaveList.optional(), "per_field": z.record(z.string(), z.number().int()), "per_kind": z.record(z.string(), z.number().int()), "records": z.number().int() });
1037
+ export type StateStats = z.infer<typeof stateStats>;
1038
+
1039
+ export const stateSubjectsPage = z.object({ "held": heldPendingSaveList.optional(), "next_cursor": z.string().nullable(), "subjects": z.array(stateSubjectEntry) });
1040
+ export type StateSubjectsPage = z.infer<typeof stateSubjectsPage>;
1041
+
1042
+ export const stateTemplateDeclarations = z.object({ "check": templatedText.nullable().default(null), "schema": z.record(z.string(), z.unknown()) }).strict();
1043
+ export type StateTemplateDeclarations = z.infer<typeof stateTemplateDeclarations>;
1044
+
1045
+ export const stateTemplateJq = z.record(z.string(), z.unknown());
1046
+ export type StateTemplateJq = z.infer<typeof stateTemplateJq>;
1047
+
1048
+ export const stateTemplateParameter = z.record(z.string(), z.unknown());
1049
+ export type StateTemplateParameter = z.infer<typeof stateTemplateParameter>;
1050
+
1051
+ export const stateTemplateReconcile = z.object({ "close": templatedText, "orphans": templatedText, "resolutions": templatedText }).strict();
1052
+ export type StateTemplateReconcile = z.infer<typeof stateTemplateReconcile>;
1053
+
1054
+ export const stateTemplateTrace = z.object({ "enabled": z.boolean().default(false) }).strict();
1055
+ export type StateTemplateTrace = z.infer<typeof stateTemplateTrace>;
1056
+
1057
+ export const stateTemplateCatalogEntry = z.object({ "attached_to": z.number().int(), "declarations": stateTemplateDeclarations.nullable().default(null), "description": z.string().default(""), "kind": z.literal("state-template").default("state-template"), "name": z.string(), "parameters": z.record(z.string(), stateTemplateParameter).default({}), "reconcile": stateTemplateReconcile.nullable().default(null), "regimes": z.array(stateRegimeRule).default([]), "schema": z.union([templatedText, z.record(z.string(), z.unknown())]).optional(), "shipped_default": z.boolean(), "template_jq": z.record(z.string(), stateTemplateJq).nullable().default(null), "trace": stateTemplateTrace.optional() }).strict();
1058
+ export type StateTemplateCatalogEntry = z.infer<typeof stateTemplateCatalogEntry>;
1059
+
1060
+ export const stateTemplateCatalog = z.array(stateTemplateCatalogEntry);
1061
+ export type StateTemplateCatalog = z.infer<typeof stateTemplateCatalog>;
1062
+
1063
+ export const storageInfo = z.object({ "module": z.string().nullable(), "present": z.boolean(), "provider": z.string().nullable() });
1064
+ export type StorageInfo = z.infer<typeof storageInfo>;
1065
+
1066
+ export const storageUpload = z.object({ "content_base64": z.string().nullable().default(null), "content_text": z.string().nullable().default(null), "id": z.string() });
1067
+ export type StorageUpload = z.infer<typeof storageUpload>;
1068
+
1069
+ export const stringList = z.array(z.string());
1070
+ export type StringList = z.infer<typeof stringList>;
1071
+
1072
+ export const stringListResponse = z.array(z.string());
1073
+ export type StringListResponse = z.infer<typeof stringListResponse>;
1074
+
1075
+ export const studioPluginListingEntry = z.object({ "api_version": z.number().int(), "contributions": contributions, "entry": z.string(), "integrity": z.record(z.string(), z.string()), "mounts": z.record(z.string(), z.string()), "name": z.string(), "version": z.string() }).strict();
1076
+ export type StudioPluginListingEntry = z.infer<typeof studioPluginListingEntry>;
1077
+
1078
+ export const studioPluginListing = z.array(studioPluginListingEntry);
1079
+ export type StudioPluginListing = z.infer<typeof studioPluginListing>;
1080
+
1081
+ export const subMcpListingEntry = z.object({ "access_pattern": z.string(), "mount_url": z.string(), "tools": z.array(z.string()), "transport": z.string() });
1082
+ export type SubMcpListingEntry = z.infer<typeof subMcpListingEntry>;
1083
+
1084
+ export const subMcpMapListing = z.record(z.string(), subMcpListingEntry);
1085
+ export type SubMcpMapListing = z.infer<typeof subMcpMapListing>;
1086
+
1087
+ export const subMcpRegistration = z.object({ "slug": z.string().min(1), "tools": z.array(z.string()), "transport": z.string().default("http") });
1088
+ export type SubMcpRegistration = z.infer<typeof subMcpRegistration>;
1089
+
1090
+ export const subMcpRegistrationResult = z.object({ "slug": z.string(), "tools": z.array(z.string()), "transport": z.string() });
1091
+ export type SubMcpRegistrationResult = z.infer<typeof subMcpRegistrationResult>;
1092
+
1093
+ export const subMcpRemovalResult = z.object({ "removed": z.boolean(), "slug": z.string() });
1094
+ export type SubMcpRemovalResult = z.infer<typeof subMcpRemovalResult>;
1095
+
1096
+ export const systemKindsListing = z.array(kindStatus);
1097
+ export type SystemKindsListing = z.infer<typeof systemKindsListing>;
1098
+
1099
+ export const templateDelete = z.object({ "path": z.string() });
1100
+ export type TemplateDelete = z.infer<typeof templateDelete>;
1101
+
1102
+ export const templateDeleteResult = z.object({ "deleted": z.boolean(), "fanout": fanoutSummary, "path": z.string() });
1103
+ export type TemplateDeleteResult = z.infer<typeof templateDeleteResult>;
1104
+
1105
+ export const templateDirDelete = z.object({ "path": z.string() });
1106
+ export type TemplateDirDelete = z.infer<typeof templateDirDelete>;
1107
+
1108
+ export const templateFetch = z.object({ "template_id": z.string() });
1109
+ export type TemplateFetch = z.infer<typeof templateFetch>;
1110
+
1111
+ export const templateFetchView = z.object({ "schema": z.record(z.string(), jsonValue), "template": z.string() });
1112
+ export type TemplateFetchView = z.infer<typeof templateFetchView>;
1113
+
1114
+ export const templateJqApplyResult = z.object({ "applied": z.boolean(), "data": z.record(z.string(), z.unknown()).nullable().default(null), "name": z.string(), "seq": z.number().nullable().default(null), "skipped": z.array(z.record(z.string(), z.unknown())).default([]) }).strict();
1115
+ export type TemplateJqApplyResult = z.infer<typeof templateJqApplyResult>;
1116
+
1117
+ export const templateJqResult = z.object({ "name": z.string(), "purpose": z.literal("input").default("input"), "value": z.unknown().default(null) }).strict();
1118
+ export type TemplateJqResult = z.infer<typeof templateJqResult>;
1119
+
1120
+ export const templateRender = z.object({ "text": templatedText });
1121
+ export type TemplateRender = z.infer<typeof templateRender>;
1122
+
1123
+ export const templateUpload = z.object({ "content": z.string(), "path": z.string() });
1124
+ export type TemplateUpload = z.infer<typeof templateUpload>;
1125
+
1126
+ export const templateUploadResult = z.object({ "fanout": fanoutSummary, "path": z.string(), "uploaded": z.boolean() });
1127
+ export type TemplateUploadResult = z.infer<typeof templateUploadResult>;
1128
+
1129
+ export const threadDeleteResult = z.object({ "removed": z.number().int(), "route_name": z.string(), "thread_id": z.string() });
1130
+ export type ThreadDeleteResult = z.infer<typeof threadDeleteResult>;
1131
+
1132
+ export const threadMessageAck = z.object({ "message_id": z.string(), "thread_id": z.string() });
1133
+ export type ThreadMessageAck = z.infer<typeof threadMessageAck>;
1134
+
1135
+ export const threadMessageSend = z.object({ "address": z.string().nullable().default(null), "footer": z.string().nullable().default(null), "header": z.record(z.string(), jsonValue).nullable().default(null), "location": z.record(z.string(), jsonValue).nullable().default(null), "media": z.array(z.record(z.string(), jsonValue)).nullable().default(null), "options": z.array(z.record(z.string(), jsonValue)).nullable().default(null), "schema": z.record(z.string(), jsonValue).nullable().default(null), "sections": z.array(z.record(z.string(), jsonValue)).nullable().default(null), "template": z.record(z.string(), jsonValue).nullable().default(null), "text": z.string().regex(new RegExp("\\S")).min(1), "thread_id": z.string().regex(new RegExp("\\S")).min(1) });
1136
+ export type ThreadMessageSend = z.infer<typeof threadMessageSend>;
1137
+
1138
+ export const threadModeSet = z.object({ "mode": z.enum(["agent","manual"]), "thread_id": z.string().regex(new RegExp("\\S")).min(1) });
1139
+ export type ThreadModeSet = z.infer<typeof threadModeSet>;
1140
+
1141
+ export const threadModeSetResult = z.object({ "mode": z.enum(["agent","manual"]), "route_name": z.string(), "source": z.enum(["thread","route"]), "thread_id": z.string() });
1142
+ export type ThreadModeSetResult = z.infer<typeof threadModeSetResult>;
1143
+
1144
+ export const threadModeView = z.object({ "mode": z.enum(["agent","manual"]), "source": z.enum(["thread","route"]) });
1145
+ export type ThreadModeView = z.infer<typeof threadModeView>;
1146
+
1147
+ export const threadSummaryRow = z.object({ "client_address": z.string(), "last_activity_at": z.number(), "last_delivery_status": deliveryStatus, "message_count": z.number().int(), "thread_id": z.string() });
1148
+ export type ThreadSummaryRow = z.infer<typeof threadSummaryRow>;
1149
+
1150
+ export const threadSummaryEnvelope = z.object({ "items": z.array(threadSummaryRow), "next_page": z.number().int().nullable(), "page": z.number().int(), "page_size": z.number().int(), "total": z.number().int(), "truncated": z.boolean(), "unreadable": z.number().int().default(0) });
1151
+ export type ThreadSummaryEnvelope = z.infer<typeof threadSummaryEnvelope>;
1152
+
1153
+ export const tokenPayloadRow = z.object({ "condition": templatedText.nullable().default(null), "description": z.string(), "orphaned": z.boolean().default(false), "policy_data": z.record(z.string(), z.unknown()).nullable().default(null), "principal": principalRef.nullable().default(null), "scopes": z.array(z.string()).nullable().default(null), "user_id": z.string() });
1154
+ export type TokenPayloadRow = z.infer<typeof tokenPayloadRow>;
1155
+
1156
+ export const tokenPayloadList = z.array(tokenPayloadRow);
1157
+ export type TokenPayloadList = z.infer<typeof tokenPayloadList>;
1158
+
1159
+ export const toolExtensionCombosModify = z.object({ "add": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))).default([]), "remove": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))).default([]) });
1160
+ export type ToolExtensionCombosModify = z.infer<typeof toolExtensionCombosModify>;
1161
+
1162
+ export const toolExtensionsUpdate = z.object({ "combos": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))) });
1163
+ export type ToolExtensionsUpdate = z.infer<typeof toolExtensionsUpdate>;
1164
+
1165
+ export const toolExtensionsView = z.object({ "available": z.array(extensionView), "combos": z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())]))) });
1166
+ export type ToolExtensionsView = z.infer<typeof toolExtensionsView>;
1167
+
1168
+ export const toolMetaDeleted = z.object({ "deleted": z.boolean(), "tool_name": z.string() });
1169
+ export type ToolMetaDeleted = z.infer<typeof toolMetaDeleted>;
1170
+
1171
+ export const toolMetaRecord = z.object({ "badges": z.array(z.string()).default([]), "display_name": z.string().nullable().default(null), "folder_id": z.string().nullable().default(null), "hidden": z.boolean().nullable().default(null), "tags": z.array(z.string()).default([]), "tool_name": z.string() });
1172
+ export type ToolMetaRecord = z.infer<typeof toolMetaRecord>;
1173
+
1174
+ export const toolMetaListView = z.object({ "folders": z.array(folderRecord), "meta": z.array(toolMetaRecord) });
1175
+ export type ToolMetaListView = z.infer<typeof toolMetaListView>;
1176
+
1177
+ export const toolMetaUpsert = z.object({ "badges": z.array(z.string()).default([]), "display_name": z.string().nullable().default(null), "folder_id": z.string().nullable().default(null), "hidden": z.boolean().nullable().default(null), "tags": z.array(z.string()).default([]) });
1178
+ export type ToolMetaUpsert = z.infer<typeof toolMetaUpsert>;
1179
+
1180
+ export const toolReloadRequest = z.object({ "kind": z.string().min(1), "name": z.string().min(1), "targets": z.array(z.string()).nullable().default(null) });
1181
+ export type ToolReloadRequest = z.infer<typeof toolReloadRequest>;
1182
+
1183
+ export const toolRunListItem = z.object({ "finished_at": z.string().nullable().default(null), "run_id": z.string(), "started_at": z.string(), "status": z.string(), "tool_name": z.string() });
1184
+ export type ToolRunListItem = z.infer<typeof toolRunListItem>;
1185
+
1186
+ export const toolRunListResponse = z.array(toolRunListItem);
1187
+ export type ToolRunListResponse = z.infer<typeof toolRunListResponse>;
1188
+
1189
+ export const toolRunSubmission = z.object({ "arguments": z.record(z.string(), z.unknown()).default({}), "subject": stateSubject.nullable().default(null), "tool_name": z.string().min(1) });
1190
+ export type ToolRunSubmission = z.infer<typeof toolRunSubmission>;
1191
+
1192
+ export const toolRunView = z.object({ "error": z.string().nullable().default(null), "finished_at": z.string().nullable().default(null), "outcome": jsonValue.nullable().default(null), "result": jsonValue.nullable().default(null), "resumed_interactions": z.array(z.string()).nullable().default(null), "run_id": z.string(), "started_at": z.string(), "status": z.string(), "tool_name": z.string() });
1193
+ export type ToolRunView = z.infer<typeof toolRunView>;
1194
+
1195
+ export const toolSchemaView = z.object({ "description": z.string().nullable(), "input": z.record(z.string(), jsonValue), "output": z.record(z.string(), jsonValue).nullable() });
1196
+ export type ToolSchemaView = z.infer<typeof toolSchemaView>;
1197
+
1198
+ export const toolTagRow = z.object({ "badges": z.array(z.string()), "hidden": z.boolean(), "name": z.string(), "schedulable": z.boolean(), "tags": z.array(z.string()) });
1199
+ export type ToolTagRow = z.infer<typeof toolTagRow>;
1200
+
1201
+ export const toolTagListResponse = z.array(toolTagRow);
1202
+ export type ToolTagListResponse = z.infer<typeof toolTagListResponse>;
1203
+
1204
+ export const toolsConfig = z.object({ "exclude": z.array(z.string()).default([]), "extensions": z.record(z.string(), z.array(z.array(z.union([z.string(), z.record(z.string(), z.unknown())])))).default({}), "include": z.array(z.string()).default([]), "module": z.string(), "title": z.string() });
1205
+ export type ToolsConfig = z.infer<typeof toolsConfig>;
1206
+
1207
+ export const toolsEntriesAdd = z.object({ "entries": z.array(toolsConfig), "replace": z.boolean().default(false) });
1208
+ export type ToolsEntriesAdd = z.infer<typeof toolsEntriesAdd>;
1209
+
1210
+ export const toolsSchemaMap = z.record(z.string(), toolSchemaView);
1211
+ export type ToolsSchemaMap = z.infer<typeof toolsSchemaMap>;
1212
+
1213
+ export const topicVerifierBinding = z.object({ "config": z.record(z.string(), z.unknown()).default({}), "verifier": z.string().min(1) });
1214
+ export type TopicVerifierBinding = z.infer<typeof topicVerifierBinding>;
1215
+
1216
+ export const topicVerifierView = z.object({ "topic": z.string(), "verifier": z.string() });
1217
+ export type TopicVerifierView = z.infer<typeof topicVerifierView>;
1218
+
1219
+ export const transcriptEnvelope = z.object({ "items": z.array(conversationRecordView), "next_page": z.number().int().nullable(), "order": z.enum(["asc","desc"]), "page": z.number().int(), "page_size": z.number().int(), "person_id": z.string().nullable(), "total": z.number().int(), "truncated": z.boolean(), "unreadable": z.number().int().default(0) });
1220
+ export type TranscriptEnvelope = z.infer<typeof transcriptEnvelope>;
1221
+
1222
+ export const triggerLinkCreate = z.object({ "execution_key": z.string().min(1), "name": z.string().nullable().default(null), "require_api_key": z.boolean().default(false), "tool_kwargs": z.record(z.string(), z.unknown()).nullable().default(null), "topic": z.string().min(1), "ttl_seconds": z.number().int().nullable() });
1223
+ export type TriggerLinkCreate = z.infer<typeof triggerLinkCreate>;
1224
+
1225
+ export const triggerLinkCreated = z.object({ "expires_at": z.string().nullable(), "name": z.string(), "token": z.string(), "topic": z.string(), "trigger_path": z.string() });
1226
+ export type TriggerLinkCreated = z.infer<typeof triggerLinkCreated>;
1227
+
1228
+ export const triggerLinkView = z.object({ "created_at": z.string(), "created_by": z.string().nullable(), "execution_key": z.string(), "execution_key_fingerprint": z.string(), "expires_at": z.string().nullable(), "name": z.string(), "require_api_key": z.boolean(), "token_hash_prefix": z.string(), "tool_kwargs": z.record(z.string(), jsonValue).nullable(), "topic": z.string(), "trigger_auth": z.enum(["public","verifier","token","token+api_key","out-of-service"]) });
1229
+ export type TriggerLinkView = z.infer<typeof triggerLinkView>;
1230
+
1231
+ export const triggerLinkListView = z.object({ "items": z.array(triggerLinkView), "total": z.number().int() });
1232
+ export type TriggerLinkListView = z.infer<typeof triggerLinkListView>;
1233
+
1234
+ export const uninstallResult = z.object({ "notes": z.array(z.string()), "ref": z.string(), "reload": applyResponse.nullable(), "uninstalled": z.boolean() });
1235
+ export type UninstallResult = z.infer<typeof uninstallResult>;
1236
+
1237
+ export const upgradeRow = z.object({ "detail": z.string(), "outcome": z.enum(["upgraded","up-to-date","no-compatible-version","failed"]), "ref": z.string() });
1238
+ export type UpgradeRow = z.infer<typeof upgradeRow>;
1239
+
1240
+ export const upgradeAllResult = z.object({ "results": z.array(upgradeRow) });
1241
+ export type UpgradeAllResult = z.infer<typeof upgradeAllResult>;
1242
+
1243
+ export const urlAck = z.object({ "url": z.string() });
1244
+ export type UrlAck = z.infer<typeof urlAck>;
1245
+
1246
+ export const userUpdateAck = z.object({ "updated": z.boolean(), "user_id": z.string() });
1247
+ export type UserUpdateAck = z.infer<typeof userUpdateAck>;
1248
+
1249
+ export const workerKind = z.enum(["serve","backend"]);
1250
+ export type WorkerKind = z.infer<typeof workerKind>;
1251
+
1252
+ export const workerState = z.enum(["ready","resyncing","recycling"]);
1253
+ export type WorkerState = z.infer<typeof workerState>;
1254
+
1255
+ export const workerListingRow = z.object({ "beat_at": z.string(), "generation": z.number().int(), "joined_at": z.string(), "kind": workerKind, "last_op": lastOp.nullable().default(null), "name": z.string(), "pid": z.number().int(), "stale": z.boolean(), "state": workerState });
1256
+ export type WorkerListingRow = z.infer<typeof workerListingRow>;
1257
+
1258
+ export const workerListing = z.object({ "workers": z.array(workerListingRow) });
1259
+ export type WorkerListing = z.infer<typeof workerListing>;
1260
+
1261
+ export const writeEntry = z.object({ "at": z.string().datetime({ offset: true }), "origin": completedOrigin, "paths": z.array(z.array(z.union([z.string(), z.number().int()]))).default([]), "seq": z.number() }).strict();
1262
+ export type WriteEntry = z.infer<typeof writeEntry>;
1263
+
1264
+ export const writesPage = z.object({ "items": z.array(writeEntry).default([]), "next_cursor": z.string().nullable().default(null) }).strict();
1265
+ export type WritesPage = z.infer<typeof writesPage>;
1266
+
1267
+ /** The const of each operation's `{"data": …}` success body, by operationId. */
1268
+ export const responseSchemas = {
1269
+ delete_api_agents_config_entries_title: applyResponse,
1270
+ delete_api_auth_api_keys_user_id: revokeAck,
1271
+ delete_api_auth_principals_user_id: principalDeleted,
1272
+ delete_api_auth_public_routes: urlAck,
1273
+ delete_api_auth_roles_name: roleDeleted,
1274
+ delete_api_auth_scopes_scope_id: scopeDeleteResult,
1275
+ delete_api_auth_scopes_urls: urlAck,
1276
+ delete_api_config_profiles_name: okResult,
1277
+ delete_api_connectors_connections_connection_id: disconnectResponse,
1278
+ delete_api_connectors_providers_provider_id: removeProviderResponse,
1279
+ delete_api_conversation_configs_target_kind_target_name: conversationConfigDeleteResult,
1280
+ delete_api_conversations_persons_person_id: personDeleteResult,
1281
+ delete_api_conversations_route_name: routeRemoveResult,
1282
+ delete_api_conversations_route_name_thread: threadDeleteResult,
1283
+ delete_api_hooks_name: removedByName,
1284
+ delete_api_hooks_topics_topic_verifier: removedByTopic,
1285
+ delete_api_hooks_trigger_links_name: removedByName,
1286
+ delete_api_mcp_config_entries_title: applyResponse,
1287
+ delete_api_presets_name: presetDeleteResult,
1288
+ delete_api_schedules_schedule_name: opaqueJson,
1289
+ delete_api_state_pending_saves_id: statePendingSaveDiscarded,
1290
+ delete_api_state_templates_name: stateDeleteResult,
1291
+ delete_api_states_name: stateDeleteResult,
1292
+ delete_api_states_name_attachments_template: detachAck,
1293
+ delete_api_states_name_records_target_kind_target_name_kind_key: eraseAck,
1294
+ delete_api_storage_dirs_dir_path: dirDeleted,
1295
+ delete_api_storage_resources_resource_id: resourceDeleted,
1296
+ delete_api_sub_mcp_slug: subMcpRemovalResult,
1297
+ delete_api_tool_meta_folders_folder_id: folderDeleted,
1298
+ delete_api_tool_meta_tools_tool_name: toolMetaDeleted,
1299
+ delete_api_tools_config_entries_title: applyResponse,
1300
+ get_api_agents: agentListing,
1301
+ get_api_agents_spec_runnable: agentListing,
1302
+ get_api_auth_api_keys_user_id_policy_versions: documentVersionList,
1303
+ get_api_auth_capabilities: mintCapabilities,
1304
+ get_api_auth_me: projectionResult,
1305
+ get_api_auth_member_actions: memberActionCatalog,
1306
+ get_api_auth_members: memberDirectory,
1307
+ get_api_auth_principals: principalListing,
1308
+ get_api_auth_public_routes: stringList,
1309
+ get_api_auth_roles: roleDefinitionList,
1310
+ get_api_auth_roles_name_versions: roleVersionsView,
1311
+ get_api_auth_routes: routeMappingList,
1312
+ get_api_auth_scopes: scopeUrlMap,
1313
+ get_api_auth_tokens_payload: tokenPayloadList,
1314
+ get_api_backend: backendInfo,
1315
+ get_api_backup_sections: backupSectionListing,
1316
+ get_api_channels: channelListing,
1317
+ get_api_config_env: envView,
1318
+ get_api_config_mode: configModeView,
1319
+ get_api_config_profiles: profileListResponse,
1320
+ get_api_config_profiles_name: settingsProfileBody,
1321
+ get_api_config_profiles_name_versions: profileVersionListResponse,
1322
+ get_api_config_profiles_name_versions_version: profileVersionView,
1323
+ get_api_config_settings_schema: settingsSchemaView,
1324
+ get_api_connectors_connections: connectionsListResponse,
1325
+ get_api_connectors_connections_connection_id: connectedAccountView,
1326
+ get_api_connectors_providers: providerCatalogResponse,
1327
+ get_api_conversation_configs: conversationConfigListEnvelope,
1328
+ get_api_conversation_configs_target_kind_target_name: targetConversationConfig,
1329
+ get_api_conversations: conversationRouteListEnvelope,
1330
+ get_api_conversations_messages_failed: failedConversationsEnvelope,
1331
+ get_api_conversations_persons_person_id: person,
1332
+ get_api_conversations_route_name: conversationRouteViewBody,
1333
+ get_api_conversations_route_name_messages_message_id: conversationRecordView,
1334
+ get_api_conversations_route_name_messages_search: messageSearchEnvelope,
1335
+ get_api_conversations_route_name_thread_mode: threadModeView,
1336
+ get_api_conversations_route_name_threads: threadSummaryEnvelope,
1337
+ get_api_conversations_route_name_transcript: transcriptEnvelope,
1338
+ get_api_extensions: extensionListing,
1339
+ get_api_fleet_workers: workerListing,
1340
+ get_api_hooks: hookListView,
1341
+ get_api_hooks_trigger_links: triggerLinkListView,
1342
+ get_api_hooks_verifiers: stringListResponse,
1343
+ get_api_interactions: interactionWindow,
1344
+ get_api_interactions_pending: pendingInteractionListing,
1345
+ get_api_login_methods: loginMethodsListing,
1346
+ get_api_manifest: preservedManifestView,
1347
+ get_api_manifest_mcp_env_refs: mcpEnvRefList,
1348
+ get_api_manifest_preserved: preservedManifestView,
1349
+ get_api_marketplace_advisories: advisorySnapshot,
1350
+ get_api_marketplace_categories: stringList,
1351
+ get_api_marketplace_installed: installedInventory,
1352
+ get_api_marketplace_kinds: stringList,
1353
+ get_api_marketplace_plugins_ns_name: opaqueJson,
1354
+ get_api_marketplace_search: opaqueJson,
1355
+ get_api_mcp_config_schema: opaqueJson,
1356
+ get_api_mcp_status: mcpStatusSnapshot,
1357
+ get_api_mcp_status_failed: fleetResult,
1358
+ get_api_notifications: notificationListing,
1359
+ get_api_observability_capabilities: observabilityCapabilities,
1360
+ get_api_observability_metrics: metricsResult,
1361
+ get_api_observability_runs: observabilityRunsPage,
1362
+ get_api_observability_runs_trace_id_spans_span_id_resolved: resolvedSpanValue,
1363
+ get_api_observability_runs_trace_id_trace: runTraceView,
1364
+ get_api_observability_runs_trace_id_trace_outline: runTraceOutlineView,
1365
+ get_api_plugins: studioPluginListing,
1366
+ get_api_presets: presetRecordList,
1367
+ get_api_presets_name: presetDetailView,
1368
+ get_api_presets_name_referees: presetRefereesResult,
1369
+ get_api_presets_name_versions: documentVersionList,
1370
+ get_api_presets_name_versions_version: documentVersion,
1371
+ get_api_resources_get: resourceContent,
1372
+ get_api_runs: runsPage,
1373
+ get_api_sandbox: sandboxInfo,
1374
+ get_api_schedules: scheduleListResponse,
1375
+ get_api_schedules_server_datetime: opaqueJson,
1376
+ get_api_state_pending_saves: statePendingSavesPage,
1377
+ get_api_state_templates: stateTemplateCatalog,
1378
+ get_api_state_templates_name: stateTemplateDocument,
1379
+ get_api_states: stateDeclarationList,
1380
+ get_api_states_name: servedStateView,
1381
+ get_api_states_name_attachments: stateAttachmentList,
1382
+ get_api_states_name_attachments_template: stateAttachmentRow,
1383
+ get_api_states_name_consumers: stateConsumerList,
1384
+ get_api_states_name_records_target_kind_target_name_kind_key: stateRecordOrNull,
1385
+ get_api_states_name_records_target_kind_target_name_kind_key_template_jq_program: templateJqResult,
1386
+ get_api_states_name_records_target_kind_target_name_kind_key_writes: writesPage,
1387
+ get_api_states_name_stats: stateStats,
1388
+ get_api_states_name_subjects: stateSubjectsPage,
1389
+ get_api_storage: storageInfo,
1390
+ get_api_storage_resources: resourceList,
1391
+ get_api_storage_resources_resource_id_stat: resourceStat,
1392
+ get_api_sub_mcp: subMcpMapListing,
1393
+ get_api_system_kinds: systemKindsListing,
1394
+ get_api_templates: stringListResponse,
1395
+ get_api_tool_meta: toolMetaListView,
1396
+ get_api_tool_runs: toolRunListResponse,
1397
+ get_api_tool_runs_run_id: toolRunView,
1398
+ get_api_tools: stringListResponse,
1399
+ get_api_tools_name_extensions: toolExtensionsView,
1400
+ get_api_tools_schema: toolsSchemaMap,
1401
+ get_api_tools_tags: toolTagListResponse,
1402
+ get_api_tools_tool_name_schema: toolSchemaView,
1403
+ patch_api_connectors_connections_connection_id_sub_services: patchSubServicesResponse,
1404
+ patch_api_states_name_attachments_template: attachUpdateAck,
1405
+ patch_api_states_name_records_target_kind_target_name_kind_key: stateRecord,
1406
+ patch_api_tool_meta_tools_tool_name: toolMetaRecord,
1407
+ post_api_agents_config_entries: applyResponse,
1408
+ post_api_api_tools: applyResponse,
1409
+ post_api_auth_api_keys: apiKeyCreateResult,
1410
+ post_api_auth_api_keys_user_id_policy_rollback: policyRollbackResult,
1411
+ post_api_auth_api_keys_user_id_scopes: scopesUpdateAck,
1412
+ post_api_auth_claim_links: claimLinkResult,
1413
+ post_api_auth_logout: logoutResult,
1414
+ post_api_auth_member_actions_invoke: invokeMemberActionResult,
1415
+ post_api_auth_principals: principal,
1416
+ post_api_auth_public_routes: urlAck,
1417
+ post_api_auth_roles: roleDefinition,
1418
+ post_api_auth_roles_name_grants: roleDefinition,
1419
+ post_api_auth_roles_name_rollback: roleDefinition,
1420
+ post_api_auth_scopes: scopeUrlAck,
1421
+ post_api_auth_validate_condition: conditionCheckResult,
1422
+ post_api_backup_import: backupImportResult,
1423
+ post_api_checkpoints_sweep: checkpointSweepResult,
1424
+ post_api_clear_templates_cache: cacheClearResult,
1425
+ post_api_config_env: applyResponse,
1426
+ post_api_config_profiles_name_apply: profileApplyResponse,
1427
+ post_api_config_profiles_name_diff: profileDiff,
1428
+ post_api_config_profiles_name_rollback: profileWriteResult,
1429
+ post_api_config_reload: fleetResult,
1430
+ post_api_connectors_connections_connection_id_reconnect: startConnectResponse,
1431
+ post_api_connectors_connections_start: startConnectOutcome,
1432
+ post_api_connectors_oauth_complete: oAuthCompletionResult,
1433
+ post_api_connectors_providers: providerMutationResponse,
1434
+ post_api_connectors_providers_discover: discoveredServerView,
1435
+ post_api_connectors_tokens_reencrypt: connectorReencryptResult,
1436
+ post_api_conversations_route_name: conversationRouteCreateResult,
1437
+ post_api_conversations_route_name_events: conversationTurnAck,
1438
+ post_api_conversations_route_name_messages: conversationTurnAck,
1439
+ post_api_conversations_route_name_thread_messages: threadMessageAck,
1440
+ post_api_delete_template: templateDeleteResult,
1441
+ post_api_delete_template_dir: templateDeleteResult,
1442
+ post_api_fleet_reload_config: fleetResult,
1443
+ post_api_hooks: hookRegisterResult,
1444
+ post_api_hooks_trigger_links: triggerLinkCreated,
1445
+ post_api_interactions_callback_ticket: interactionCallbackAck,
1446
+ post_api_interactions_callback_ticket_react: interactionReactionAck,
1447
+ post_api_interactions_interaction_id_answer: interactionActionResult,
1448
+ post_api_interactions_interaction_id_cancel: interactionActionResult,
1449
+ post_api_interactions_interaction_id_react: interactionReactionResult,
1450
+ post_api_login_claim: claimExchangeResult,
1451
+ post_api_manifest_replace: applyResponse,
1452
+ post_api_marketplace_install: installResult,
1453
+ post_api_marketplace_install_preview: installPreview,
1454
+ post_api_marketplace_uninstall: uninstallResult,
1455
+ post_api_marketplace_update: installResult,
1456
+ post_api_marketplace_upgrade_all: upgradeAllResult,
1457
+ post_api_mcp_config: applyResponse,
1458
+ post_api_mcp_config_entries: applyResponse,
1459
+ post_api_mcp_config_secret_env: applyResponse,
1460
+ post_api_mcp_status_reload_failed: fleetResult,
1461
+ post_api_mcp_status_title_deregister: fleetResult,
1462
+ post_api_mcp_status_title_reload: fleetResult,
1463
+ post_api_notifications: notifyResult,
1464
+ post_api_presets: presetCreateResult,
1465
+ post_api_presets_name_rename: presetRenameResult,
1466
+ post_api_presets_name_rollback: presetRollbackResult,
1467
+ post_api_presets_name_versions: presetVersionSaveResult,
1468
+ post_api_presets_validate: presetValidateVerdict,
1469
+ post_api_render_template: renderedTemplate,
1470
+ post_api_resources_get: resourceContent,
1471
+ post_api_run_tool: runAnswerResponse,
1472
+ post_api_runs_prune: runsPruneResult,
1473
+ post_api_schedules: opaqueJson,
1474
+ post_api_setup: setupResult,
1475
+ post_api_state_pending_saves_id_retry: statePendingSaveRetried,
1476
+ post_api_state_retention_prune: pruneResult,
1477
+ post_api_states_name_records_search: stateSearchPage,
1478
+ post_api_states_name_records_target_kind_target_name_kind_key_deltas: applyResult,
1479
+ post_api_states_name_records_target_kind_target_name_kind_key_fold: foldReport,
1480
+ post_api_states_name_records_target_kind_target_name_kind_key_template_jq_program: templateJqApplyResult,
1481
+ post_api_storage_resources: resourceStored,
1482
+ post_api_sub_mcp: subMcpRegistrationResult,
1483
+ post_api_template: templateFetchView,
1484
+ post_api_tool_meta_folders: folderRecord,
1485
+ post_api_tool_meta_folders_folder_id_move: folderRecord,
1486
+ post_api_tool_meta_folders_folder_id_rename: folderRecord,
1487
+ post_api_tool_runs: runSubmitted,
1488
+ post_api_tools_config_entries: applyResponse,
1489
+ post_api_tools_name_extensions: applyResponse,
1490
+ post_api_tools_name_extensions_combos: toolExtensionsView,
1491
+ post_api_tools_reload: fleetResult,
1492
+ post_api_tools_remove: fleetResult,
1493
+ post_api_upload_template: templateUploadResult,
1494
+ put_api_auth_api_keys_user_id: userUpdateAck,
1495
+ put_api_auth_principals_user_id: principal,
1496
+ put_api_auth_roles_name: roleDefinition,
1497
+ put_api_config_profiles_name: profileWriteResult,
1498
+ put_api_connectors_providers_provider_id_client: providerMutationResponse,
1499
+ put_api_conversation_configs_target_kind_target_name: conversationConfigSetResult,
1500
+ put_api_conversations_persons_person_id_locale: person,
1501
+ put_api_conversations_route_name_thread_mode: threadModeSetResult,
1502
+ put_api_hooks_topics_topic_verifier: topicVerifierView,
1503
+ put_api_presets_name_versions_version_tags: presetVersionTagsResult,
1504
+ put_api_state_templates_name: stateTemplateDocument,
1505
+ put_api_states_name: stateDeclarationPutResponse,
1506
+ put_api_states_name_attachments_template: attachAck,
1507
+ put_api_states_name_records_target_kind_target_name_kind_key: stateRecord,
1508
+ } as const;