@tai42/api-client 16.0.0 → 17.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 (396) hide show
  1. package/dist/agents.d.ts.map +1 -1
  2. package/dist/agents.js +1 -1
  3. package/dist/agents.js.map +1 -1
  4. package/dist/client/agents-client.d.ts +26 -0
  5. package/dist/client/agents-client.d.ts.map +1 -0
  6. package/dist/client/agents-client.js +19 -0
  7. package/dist/client/agents-client.js.map +1 -0
  8. package/dist/client/auth-client.d.ts +247 -0
  9. package/dist/client/auth-client.d.ts.map +1 -0
  10. package/dist/client/auth-client.js +73 -0
  11. package/dist/client/auth-client.js.map +1 -0
  12. package/dist/client/backend-client.d.ts +39 -0
  13. package/dist/client/backend-client.d.ts.map +1 -0
  14. package/dist/client/backend-client.js +22 -0
  15. package/dist/client/backend-client.js.map +1 -0
  16. package/dist/client/backup-client.d.ts +56 -0
  17. package/dist/client/backup-client.d.ts.map +1 -0
  18. package/dist/client/backup-client.js +12 -0
  19. package/dist/client/backup-client.js.map +1 -0
  20. package/dist/client/capabilities-client.d.ts +40 -0
  21. package/dist/client/capabilities-client.d.ts.map +1 -0
  22. package/dist/client/capabilities-client.js +19 -0
  23. package/dist/client/capabilities-client.js.map +1 -0
  24. package/dist/client/channels-client.d.ts +7 -0
  25. package/dist/client/channels-client.d.ts.map +1 -0
  26. package/dist/client/channels-client.js +10 -0
  27. package/dist/client/channels-client.js.map +1 -0
  28. package/dist/client/config-client.d.ts +59 -0
  29. package/dist/client/config-client.d.ts.map +1 -0
  30. package/dist/client/config-client.js +18 -0
  31. package/dist/client/config-client.js.map +1 -0
  32. package/dist/client/connectors-client.d.ts +225 -0
  33. package/dist/client/connectors-client.d.ts.map +1 -0
  34. package/dist/client/connectors-client.js +31 -0
  35. package/dist/client/connectors-client.js.map +1 -0
  36. package/dist/client/conversations-client.d.ts +398 -0
  37. package/dist/client/conversations-client.d.ts.map +1 -0
  38. package/dist/client/conversations-client.js +120 -0
  39. package/dist/client/conversations-client.js.map +1 -0
  40. package/dist/client/hooks-client.d.ts +112 -0
  41. package/dist/client/hooks-client.d.ts.map +1 -0
  42. package/dist/client/hooks-client.js +25 -0
  43. package/dist/client/hooks-client.js.map +1 -0
  44. package/dist/{client.d.ts → client/index.d.ts} +2336 -2708
  45. package/dist/client/index.d.ts.map +1 -0
  46. package/dist/client/index.js +79 -0
  47. package/dist/client/index.js.map +1 -0
  48. package/dist/client/interactions-client.d.ts +52 -0
  49. package/dist/client/interactions-client.d.ts.map +1 -0
  50. package/dist/client/interactions-client.js +84 -0
  51. package/dist/client/interactions-client.js.map +1 -0
  52. package/dist/client/login-client.d.ts +69 -0
  53. package/dist/client/login-client.d.ts.map +1 -0
  54. package/dist/client/login-client.js +137 -0
  55. package/dist/client/login-client.js.map +1 -0
  56. package/dist/client/manifest-client.d.ts +354 -0
  57. package/dist/client/manifest-client.d.ts.map +1 -0
  58. package/dist/client/manifest-client.js +76 -0
  59. package/dist/client/manifest-client.js.map +1 -0
  60. package/dist/client/marketplace-client.d.ts +274 -0
  61. package/dist/client/marketplace-client.d.ts.map +1 -0
  62. package/dist/client/marketplace-client.js +46 -0
  63. package/dist/client/marketplace-client.js.map +1 -0
  64. package/dist/client/mcp-config-schema-client.d.ts +5 -0
  65. package/dist/client/mcp-config-schema-client.d.ts.map +1 -0
  66. package/dist/client/mcp-config-schema-client.js +9 -0
  67. package/dist/client/mcp-config-schema-client.js.map +1 -0
  68. package/dist/client/notifications-client.d.ts +27 -0
  69. package/dist/client/notifications-client.d.ts.map +1 -0
  70. package/dist/client/notifications-client.js +11 -0
  71. package/dist/client/notifications-client.js.map +1 -0
  72. package/dist/client/observability-client.d.ts +103 -0
  73. package/dist/client/observability-client.d.ts.map +1 -0
  74. package/dist/client/observability-client.js +43 -0
  75. package/dist/client/observability-client.js.map +1 -0
  76. package/dist/client/plugins-client.d.ts +17 -0
  77. package/dist/client/plugins-client.d.ts.map +1 -0
  78. package/dist/client/plugins-client.js +9 -0
  79. package/dist/client/plugins-client.js.map +1 -0
  80. package/dist/client/policy-client.d.ts +37 -0
  81. package/dist/client/policy-client.d.ts.map +1 -0
  82. package/dist/client/policy-client.js +26 -0
  83. package/dist/client/policy-client.js.map +1 -0
  84. package/dist/client/presets-client.d.ts +334 -0
  85. package/dist/client/presets-client.d.ts.map +1 -0
  86. package/dist/client/presets-client.js +38 -0
  87. package/dist/client/presets-client.js.map +1 -0
  88. package/dist/client/profiles-client.d.ts +101 -0
  89. package/dist/client/profiles-client.d.ts.map +1 -0
  90. package/dist/client/profiles-client.js +37 -0
  91. package/dist/client/profiles-client.js.map +1 -0
  92. package/dist/client/schedules-client.d.ts +27 -0
  93. package/dist/client/schedules-client.d.ts.map +1 -0
  94. package/dist/client/schedules-client.js +13 -0
  95. package/dist/client/schedules-client.js.map +1 -0
  96. package/dist/client/settings-schema-client.d.ts +23 -0
  97. package/dist/client/settings-schema-client.d.ts.map +1 -0
  98. package/dist/client/settings-schema-client.js +9 -0
  99. package/dist/client/settings-schema-client.js.map +1 -0
  100. package/dist/client/states-client.d.ts +470 -0
  101. package/dist/client/states-client.d.ts.map +1 -0
  102. package/dist/client/states-client.js +144 -0
  103. package/dist/client/states-client.js.map +1 -0
  104. package/dist/client/storage-client.d.ts +40 -0
  105. package/dist/client/storage-client.d.ts.map +1 -0
  106. package/dist/client/storage-client.js +43 -0
  107. package/dist/client/storage-client.js.map +1 -0
  108. package/dist/client/sub-mcp-client.d.ts +17 -0
  109. package/dist/client/sub-mcp-client.d.ts.map +1 -0
  110. package/dist/client/sub-mcp-client.js +14 -0
  111. package/dist/client/sub-mcp-client.js.map +1 -0
  112. package/dist/client/system-client.d.ts +11 -0
  113. package/dist/client/system-client.d.ts.map +1 -0
  114. package/dist/client/system-client.js +13 -0
  115. package/dist/client/system-client.js.map +1 -0
  116. package/dist/client/templates-client.d.ts +29 -0
  117. package/dist/client/templates-client.d.ts.map +1 -0
  118. package/dist/client/templates-client.js +21 -0
  119. package/dist/client/templates-client.js.map +1 -0
  120. package/dist/client/tool-extensions-client.d.ts +53 -0
  121. package/dist/client/tool-extensions-client.d.ts.map +1 -0
  122. package/dist/client/tool-extensions-client.js +21 -0
  123. package/dist/client/tool-extensions-client.js.map +1 -0
  124. package/dist/client/tool-meta-client.d.ts +69 -0
  125. package/dist/client/tool-meta-client.d.ts.map +1 -0
  126. package/dist/client/tool-meta-client.js +38 -0
  127. package/dist/client/tool-meta-client.js.map +1 -0
  128. package/dist/client/tools-client.d.ts +83 -0
  129. package/dist/client/tools-client.d.ts.map +1 -0
  130. package/dist/client/tools-client.js +38 -0
  131. package/dist/client/tools-client.js.map +1 -0
  132. package/dist/client/transport.d.ts +13 -0
  133. package/dist/client/transport.d.ts.map +1 -0
  134. package/dist/client/transport.js +10 -0
  135. package/dist/client/transport.js.map +1 -0
  136. package/dist/client/trigger-links-client.d.ts +44 -0
  137. package/dist/client/trigger-links-client.d.ts.map +1 -0
  138. package/dist/client/trigger-links-client.js +30 -0
  139. package/dist/client/trigger-links-client.js.map +1 -0
  140. package/dist/client/web-entry-gate-client.d.ts +34 -0
  141. package/dist/client/web-entry-gate-client.d.ts.map +1 -0
  142. package/dist/client/web-entry-gate-client.js +25 -0
  143. package/dist/client/web-entry-gate-client.js.map +1 -0
  144. package/dist/errors.d.ts +11 -0
  145. package/dist/errors.d.ts.map +1 -1
  146. package/dist/errors.js +15 -0
  147. package/dist/errors.js.map +1 -1
  148. package/dist/http.d.ts.map +1 -1
  149. package/dist/http.js +33 -17
  150. package/dist/http.js.map +1 -1
  151. package/dist/index.d.ts +12 -12
  152. package/dist/index.d.ts.map +1 -1
  153. package/dist/index.js +6 -13
  154. package/dist/index.js.map +1 -1
  155. package/dist/schemas/api-keys.d.ts +43 -0
  156. package/dist/schemas/api-keys.d.ts.map +1 -0
  157. package/dist/schemas/api-keys.js +29 -0
  158. package/dist/schemas/api-keys.js.map +1 -0
  159. package/dist/schemas/auth-routes.d.ts +78 -0
  160. package/dist/schemas/auth-routes.d.ts.map +1 -0
  161. package/dist/schemas/auth-routes.js +42 -0
  162. package/dist/schemas/auth-routes.js.map +1 -0
  163. package/dist/schemas/backup.d.ts +78 -0
  164. package/dist/schemas/backup.d.ts.map +1 -0
  165. package/dist/schemas/backup.js +33 -0
  166. package/dist/schemas/backup.js.map +1 -0
  167. package/dist/schemas/capabilities.d.ts +109 -0
  168. package/dist/schemas/capabilities.d.ts.map +1 -0
  169. package/dist/schemas/capabilities.js +78 -0
  170. package/dist/schemas/capabilities.js.map +1 -0
  171. package/dist/schemas/channels.d.ts +7 -0
  172. package/dist/schemas/channels.d.ts.map +1 -0
  173. package/dist/schemas/channels.js +9 -0
  174. package/dist/schemas/channels.js.map +1 -0
  175. package/dist/schemas/config.d.ts +17 -0
  176. package/dist/schemas/config.d.ts.map +1 -0
  177. package/dist/schemas/config.js +17 -0
  178. package/dist/schemas/config.js.map +1 -0
  179. package/dist/schemas/connectors.d.ts +383 -0
  180. package/dist/schemas/connectors.d.ts.map +1 -0
  181. package/dist/schemas/connectors.js +122 -0
  182. package/dist/schemas/connectors.js.map +1 -0
  183. package/dist/schemas/conversations.d.ts +600 -0
  184. package/dist/schemas/conversations.d.ts.map +1 -0
  185. package/dist/schemas/conversations.js +208 -0
  186. package/dist/schemas/conversations.js.map +1 -0
  187. package/dist/schemas/extensions.d.ts +44 -0
  188. package/dist/schemas/extensions.d.ts.map +1 -0
  189. package/dist/schemas/extensions.js +29 -0
  190. package/dist/schemas/extensions.js.map +1 -0
  191. package/dist/schemas/fleet.d.ts +271 -0
  192. package/dist/schemas/fleet.d.ts.map +1 -0
  193. package/dist/schemas/fleet.js +132 -0
  194. package/dist/schemas/fleet.js.map +1 -0
  195. package/dist/schemas/hooks.d.ts +120 -0
  196. package/dist/schemas/hooks.d.ts.map +1 -0
  197. package/dist/schemas/hooks.js +44 -0
  198. package/dist/schemas/hooks.js.map +1 -0
  199. package/dist/schemas/index.d.ts +40 -0
  200. package/dist/schemas/index.d.ts.map +1 -0
  201. package/dist/schemas/index.js +40 -0
  202. package/dist/schemas/index.js.map +1 -0
  203. package/dist/schemas/interactions.d.ts +156 -0
  204. package/dist/schemas/interactions.d.ts.map +1 -0
  205. package/dist/schemas/interactions.js +124 -0
  206. package/dist/schemas/interactions.js.map +1 -0
  207. package/dist/schemas/login.d.ts +93 -0
  208. package/dist/schemas/login.d.ts.map +1 -0
  209. package/dist/schemas/login.js +61 -0
  210. package/dist/schemas/login.js.map +1 -0
  211. package/dist/schemas/manifest-mcp.d.ts +125 -0
  212. package/dist/schemas/manifest-mcp.d.ts.map +1 -0
  213. package/dist/schemas/manifest-mcp.js +61 -0
  214. package/dist/schemas/manifest-mcp.js.map +1 -0
  215. package/dist/schemas/marketplace.d.ts +708 -0
  216. package/dist/schemas/marketplace.d.ts.map +1 -0
  217. package/dist/schemas/marketplace.js +387 -0
  218. package/dist/schemas/marketplace.js.map +1 -0
  219. package/dist/schemas/notifications.d.ts +61 -0
  220. package/dist/schemas/notifications.d.ts.map +1 -0
  221. package/dist/schemas/notifications.js +38 -0
  222. package/dist/schemas/notifications.js.map +1 -0
  223. package/dist/schemas/observability.d.ts +114 -0
  224. package/dist/schemas/observability.d.ts.map +1 -0
  225. package/dist/schemas/observability.js +74 -0
  226. package/dist/schemas/observability.js.map +1 -0
  227. package/dist/schemas/policy.d.ts +58 -0
  228. package/dist/schemas/policy.d.ts.map +1 -0
  229. package/dist/schemas/policy.js +32 -0
  230. package/dist/schemas/policy.js.map +1 -0
  231. package/dist/schemas/presets.d.ts +258 -0
  232. package/dist/schemas/presets.d.ts.map +1 -0
  233. package/dist/schemas/presets.js +95 -0
  234. package/dist/schemas/presets.js.map +1 -0
  235. package/dist/schemas/principals.d.ts +54 -0
  236. package/dist/schemas/principals.d.ts.map +1 -0
  237. package/dist/schemas/principals.js +34 -0
  238. package/dist/schemas/principals.js.map +1 -0
  239. package/dist/schemas/profiles.d.ts +180 -0
  240. package/dist/schemas/profiles.d.ts.map +1 -0
  241. package/dist/schemas/profiles.js +100 -0
  242. package/dist/schemas/profiles.js.map +1 -0
  243. package/dist/schemas/roles.d.ts +125 -0
  244. package/dist/schemas/roles.d.ts.map +1 -0
  245. package/dist/schemas/roles.js +46 -0
  246. package/dist/schemas/roles.js.map +1 -0
  247. package/dist/schemas/schedules.d.ts +25 -0
  248. package/dist/schemas/schedules.d.ts.map +1 -0
  249. package/dist/schemas/schedules.js +24 -0
  250. package/dist/schemas/schedules.js.map +1 -0
  251. package/dist/schemas/served.d.ts +626 -0
  252. package/dist/schemas/served.d.ts.map +1 -0
  253. package/dist/schemas/served.js +28 -0
  254. package/dist/schemas/served.js.map +1 -0
  255. package/dist/schemas/settings-schema.d.ts +23 -0
  256. package/dist/schemas/settings-schema.d.ts.map +1 -0
  257. package/dist/schemas/settings-schema.js +25 -0
  258. package/dist/schemas/settings-schema.js.map +1 -0
  259. package/dist/schemas/setup.d.ts +43 -0
  260. package/dist/schemas/setup.d.ts.map +1 -0
  261. package/dist/schemas/setup.js +19 -0
  262. package/dist/schemas/setup.js.map +1 -0
  263. package/dist/schemas/shared.d.ts +20 -0
  264. package/dist/schemas/shared.d.ts.map +1 -0
  265. package/dist/schemas/shared.js +20 -0
  266. package/dist/schemas/shared.js.map +1 -0
  267. package/dist/schemas/states.d.ts +499 -0
  268. package/dist/schemas/states.d.ts.map +1 -0
  269. package/dist/schemas/states.js +220 -0
  270. package/dist/schemas/states.js.map +1 -0
  271. package/dist/schemas/storage.d.ts +37 -0
  272. package/dist/schemas/storage.d.ts.map +1 -0
  273. package/dist/schemas/storage.js +24 -0
  274. package/dist/schemas/storage.js.map +1 -0
  275. package/dist/schemas/studio-plugins.d.ts +30 -0
  276. package/dist/schemas/studio-plugins.d.ts.map +1 -0
  277. package/dist/schemas/studio-plugins.js +20 -0
  278. package/dist/schemas/studio-plugins.js.map +1 -0
  279. package/dist/schemas/sub-mcp.d.ts +29 -0
  280. package/dist/schemas/sub-mcp.d.ts.map +1 -0
  281. package/dist/schemas/sub-mcp.js +22 -0
  282. package/dist/schemas/sub-mcp.js.map +1 -0
  283. package/dist/schemas/system-kinds.d.ts +122 -0
  284. package/dist/schemas/system-kinds.d.ts.map +1 -0
  285. package/dist/schemas/system-kinds.js +40 -0
  286. package/dist/schemas/system-kinds.js.map +1 -0
  287. package/dist/schemas/templates.d.ts +26 -0
  288. package/dist/schemas/templates.d.ts.map +1 -0
  289. package/dist/schemas/templates.js +11 -0
  290. package/dist/schemas/templates.js.map +1 -0
  291. package/dist/schemas/tool-meta.d.ts +64 -0
  292. package/dist/schemas/tool-meta.d.ts.map +1 -0
  293. package/dist/schemas/tool-meta.js +44 -0
  294. package/dist/schemas/tool-meta.js.map +1 -0
  295. package/dist/schemas/tools.d.ts +62 -0
  296. package/dist/schemas/tools.d.ts.map +1 -0
  297. package/dist/schemas/tools.js +53 -0
  298. package/dist/schemas/tools.js.map +1 -0
  299. package/dist/schemas/trigger-links.d.ts +71 -0
  300. package/dist/schemas/trigger-links.d.ts.map +1 -0
  301. package/dist/schemas/trigger-links.js +46 -0
  302. package/dist/schemas/trigger-links.js.map +1 -0
  303. package/dist/schemas/web-entry.d.ts +45 -0
  304. package/dist/schemas/web-entry.d.ts.map +1 -0
  305. package/dist/schemas/web-entry.js +36 -0
  306. package/dist/schemas/web-entry.js.map +1 -0
  307. package/dist/tool-runs.d.ts.map +1 -1
  308. package/dist/tool-runs.js.map +1 -1
  309. package/package.json +1 -1
  310. package/src/agents.ts +2 -2
  311. package/src/client/agents-client.ts +23 -0
  312. package/src/client/auth-client.ts +170 -0
  313. package/src/client/backend-client.ts +25 -0
  314. package/src/client/backup-client.ts +16 -0
  315. package/src/client/capabilities-client.ts +22 -0
  316. package/src/client/channels-client.ts +11 -0
  317. package/src/client/config-client.ts +21 -0
  318. package/src/client/connectors-client.ts +52 -0
  319. package/src/client/conversations-client.ts +240 -0
  320. package/src/client/hooks-client.ts +44 -0
  321. package/src/client/index.ts +122 -0
  322. package/src/client/interactions-client.ts +89 -0
  323. package/src/client/login-client.ts +150 -0
  324. package/src/client/manifest-client.ts +118 -0
  325. package/src/client/marketplace-client.ts +122 -0
  326. package/src/client/mcp-config-schema-client.ts +11 -0
  327. package/src/client/notifications-client.ts +13 -0
  328. package/src/client/observability-client.ts +82 -0
  329. package/src/client/plugins-client.ts +11 -0
  330. package/src/client/policy-client.ts +41 -0
  331. package/src/client/presets-client.ts +124 -0
  332. package/src/client/profiles-client.ts +51 -0
  333. package/src/client/schedules-client.ts +22 -0
  334. package/src/client/settings-schema-client.ts +11 -0
  335. package/src/client/states-client.ts +292 -0
  336. package/src/client/storage-client.ts +63 -0
  337. package/src/client/sub-mcp-client.ts +17 -0
  338. package/src/client/system-client.ts +16 -0
  339. package/src/client/templates-client.ts +28 -0
  340. package/src/client/tool-extensions-client.ts +24 -0
  341. package/src/client/tool-meta-client.ts +65 -0
  342. package/src/client/tools-client.ts +66 -0
  343. package/src/client/transport.ts +18 -0
  344. package/src/client/trigger-links-client.ts +51 -0
  345. package/src/client/web-entry-gate-client.ts +45 -0
  346. package/src/errors.ts +16 -0
  347. package/src/http.ts +48 -24
  348. package/src/index.ts +231 -226
  349. package/src/schemas/api-keys.ts +34 -0
  350. package/src/schemas/auth-routes.ts +48 -0
  351. package/src/schemas/backup.ts +43 -0
  352. package/src/schemas/capabilities.ts +92 -0
  353. package/src/schemas/channels.ts +11 -0
  354. package/src/schemas/config.ts +17 -0
  355. package/src/schemas/connectors.ts +139 -0
  356. package/src/schemas/conversations.ts +257 -0
  357. package/src/schemas/extensions.ts +34 -0
  358. package/src/schemas/fleet.ts +154 -0
  359. package/src/schemas/hooks.ts +57 -0
  360. package/src/schemas/index.ts +39 -0
  361. package/src/schemas/interactions.ts +147 -0
  362. package/src/schemas/login.ts +69 -0
  363. package/src/schemas/manifest-mcp.ts +70 -0
  364. package/src/schemas/marketplace.ts +447 -0
  365. package/src/schemas/notifications.ts +43 -0
  366. package/src/schemas/observability.ts +87 -0
  367. package/src/schemas/policy.ts +38 -0
  368. package/src/schemas/presets.ts +114 -0
  369. package/src/schemas/principals.ts +41 -0
  370. package/src/schemas/profiles.ts +120 -0
  371. package/src/schemas/roles.ts +58 -0
  372. package/src/schemas/schedules.ts +28 -0
  373. package/src/schemas/served.ts +50 -0
  374. package/src/schemas/settings-schema.ts +32 -0
  375. package/src/schemas/setup.ts +39 -0
  376. package/src/schemas/shared.ts +21 -0
  377. package/src/schemas/states.ts +273 -0
  378. package/src/schemas/storage.ts +31 -0
  379. package/src/schemas/studio-plugins.ts +21 -0
  380. package/src/schemas/sub-mcp.ts +24 -0
  381. package/src/schemas/system-kinds.ts +47 -0
  382. package/src/schemas/templates.ts +12 -0
  383. package/src/schemas/tool-meta.ts +51 -0
  384. package/src/schemas/tools.ts +62 -0
  385. package/src/schemas/trigger-links.ts +55 -0
  386. package/src/schemas/web-entry.ts +46 -0
  387. package/src/tool-runs.ts +1 -1
  388. package/dist/client.d.ts.map +0 -1
  389. package/dist/client.js +0 -920
  390. package/dist/client.js.map +0 -1
  391. package/dist/schemas.d.ts +0 -5172
  392. package/dist/schemas.d.ts.map +0 -1
  393. package/dist/schemas.js +0 -2268
  394. package/dist/schemas.js.map +0 -1
  395. package/src/client.ts +0 -1771
  396. package/src/schemas.ts +0 -2760
@@ -0,0 +1,132 @@
1
+ /** Backend identity and worker-bus fleet/fan-out response schemas. */
2
+ import { z } from 'zod';
3
+ import { jsonValue } from './shared';
4
+ /** `GET /api/backend` — the execution-backend identity, or the absent sentinel
5
+ * (`present: false`, a 200) when no backend plugin is registered. Backend identity
6
+ * is kept distinct from the fleet: the fleet doors ride the app's worker bus and
7
+ * need no backend at all. */
8
+ export const backendInfo = z.object({
9
+ present: z.boolean(),
10
+ backend: z.string().nullable(),
11
+ module: z.string().nullable(),
12
+ });
13
+ /** The two worker kinds that join the bus: an ASGI `serve` worker or a
14
+ * `backend` runtime process. A drift throws `ApiSchemaError`. */
15
+ export const workerKind = z.enum(['serve', 'backend']);
16
+ /** The lifecycle state a worker advertises in its presence value: `ready` once its
17
+ * resync has converged, `resyncing` while a boot/reconnect resync runs, `recycling`
18
+ * once it has begun a graceful self-exit. A drift throws `ApiSchemaError`. */
19
+ export const workerState = z.enum(['ready', 'resyncing', 'recycling']);
20
+ /** The last op a worker applied, stamped onto its presence row after the terminal
21
+ * reply. `outcome` is the free op-outcome string; `at` is the ISO instant it landed. */
22
+ export const workerLastOp = z.object({
23
+ op: z.string(),
24
+ outcome: z.string(),
25
+ at: z.string(),
26
+ });
27
+ /**
28
+ * One live worker on the bus — a presence-census row. `name` is the stable slot
29
+ * (`{kind}-{n}`) that doubles as a reload target; `generation` is the monotonic life
30
+ * counter minted with the worker's claim; `kind` tells the two worker kinds apart;
31
+ * `pid` is the process id. `joined_at`/`beat_at` are ISO instants (first-seen and last
32
+ * heartbeat) for the cosmetic seen-since display; `state` is the advertised lifecycle
33
+ * state; `stale` is SERVER-computed from the row's remaining presence TTL against the
34
+ * bus cadence (a quiet row past the freshness bound — reconnecting or dead) and is the
35
+ * only freshness signal a client reads, never a client-side threshold; `last_op` is the
36
+ * worker's last applied op, or `null` before it has applied one.
37
+ */
38
+ export const fleetWorker = z.object({
39
+ name: z.string(),
40
+ kind: workerKind,
41
+ pid: z.number(),
42
+ generation: z.number(),
43
+ joined_at: z.string(),
44
+ beat_at: z.string(),
45
+ state: workerState,
46
+ stale: z.boolean(),
47
+ last_op: workerLastOp.nullable(),
48
+ });
49
+ /**
50
+ * `GET /api/fleet/workers` — the live worker fleet from the bus presence census.
51
+ * The census lists ALL subscribed workers (ASGI `serve` workers and backend-runtime
52
+ * processes alike), not only backend workers. A census read that fails surfaces as a
53
+ * loud 500, never a fabricated empty fleet.
54
+ */
55
+ export const fleetWorkers = z.object({ workers: z.array(fleetWorker) });
56
+ /**
57
+ * One worker's outcome within a fleet broadcast. `applied`/`failed` are terminal wire
58
+ * replies from a subscriber; `missing`/`departed`/`timed_out` are publisher-computed
59
+ * from the presence census (a silent worker never sends them); `resyncing`/`recycling`/
60
+ * `stale` are the gap outcomes for a row that failed the ready+fresh gate — reported as
61
+ * its own actual condition rather than dropped (`resyncing` converges on its resync,
62
+ * `recycling` is departing, `stale` is a quiet row past the freshness bound carrying no
63
+ * convergence promise).
64
+ */
65
+ export const fleetOutcome = z.enum([
66
+ 'applied',
67
+ 'failed',
68
+ 'missing',
69
+ 'departed',
70
+ 'timed_out',
71
+ 'resyncing',
72
+ 'recycling',
73
+ 'stale',
74
+ ]);
75
+ /**
76
+ * One worker's result within a {@link fleetResult}. `payload` carries query-op data
77
+ * (opaque to the UI); `error` carries a failed apply's message; `detail` carries the
78
+ * publisher's report text for a computed gap outcome (`missing`/`departed`/`timed_out`/
79
+ * `resyncing`/`recycling`/`stale`). A drift throws `ApiSchemaError`.
80
+ */
81
+ export const fleetWorkerResult = z.object({
82
+ name: z.string(),
83
+ outcome: fleetOutcome,
84
+ payload: jsonValue,
85
+ error: z.string().nullable(),
86
+ detail: z.string().nullable(),
87
+ });
88
+ /**
89
+ * The awaited per-worker report of one fleet broadcast. Two honest shapes ride the
90
+ * same schema. Reachable (`reachable: true`): `results` holds one entry per expected
91
+ * worker (the serving worker's own entry included) plus the gap rows, so an unconfirmed
92
+ * sibling is a visible `failed`/`missing`/`departed`/`timed_out`/`resyncing`/`recycling`/
93
+ * `stale` entry, never a silent stale worker. Bus-unreachable (`reachable: false`): the
94
+ * transport failed before any worker could reply, so `results` is empty and only `error`
95
+ * is carried. This is the bare body of `POST /api/fleet/reload-config` and the single-MCP
96
+ * reload; it is also the body the mode-wrapped {@link fleetReportFanout} carries under its
97
+ * `fleet` / `unreachable` modes.
98
+ */
99
+ export const fleetResult = z.object({
100
+ op: z.string(),
101
+ reachable: z.boolean(),
102
+ local_only: z.boolean(),
103
+ results: z.array(fleetWorkerResult),
104
+ error: z.string().nullable(),
105
+ });
106
+ /**
107
+ * `POST /api/fleet/reload-config` — soft-restart the fleet and report per-worker. The
108
+ * serving worker applies its own reload first, then broadcasts; the returned report
109
+ * names every worker's outcome. A failed local apply does not abort the broadcast, so
110
+ * the report is embedded even on the convergence-failure path.
111
+ */
112
+ export const fleetReloadResult = fleetResult;
113
+ /**
114
+ * The mode-wrapped fan-out summary a mutation embeds under its `fanout` field. Three
115
+ * honest modes, discriminated on `mode`:
116
+ * - `local-only` — the broadcast reached no sibling (a lone worker / no bus), a
117
+ * benign single-process note.
118
+ * - `fleet` — a reachable multi-worker broadcast; carries the full {@link
119
+ * fleetResult} so an unconfirmed sibling is visible.
120
+ * - `unreachable` — the bus itself could not be reached; carries the
121
+ * bus-unreachable {@link fleetResult} (no worker list, only `error`).
122
+ *
123
+ * Every mutation whose response embeds this parses it EXPLICITLY: zod's default
124
+ * unknown-key stripping would otherwise silently drop the field, hiding a failed
125
+ * propagation from the shared fleet-report handler. A drift throws `ApiSchemaError`.
126
+ */
127
+ export const fleetReportFanout = z.discriminatedUnion('mode', [
128
+ z.object({ mode: z.literal('local-only'), note: z.string() }),
129
+ fleetResult.extend({ mode: z.literal('fleet') }),
130
+ fleetResult.extend({ mode: z.literal('unreachable') }),
131
+ ]);
132
+ //# sourceMappingURL=fleet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fleet.js","sourceRoot":"","sources":["../../src/schemas/fleet.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC;;;6BAG6B;AAC7B,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAGH;iEACiE;AACjE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS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AI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAGH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;IACvB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC;IACnC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC;AAGH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAG7C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAC5D,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;IAC7D,WAAW,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;IAChD,WAAW,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;CACvD,CAAC,CAAC"}
@@ -0,0 +1,120 @@
1
+ /** Hook listing, registration and topic-verifier response schemas. */
2
+ import { z } from 'zod';
3
+ /** A fire door — who may trigger a path, not what the fire may do. A string enum. */
4
+ export declare const triggerAuth: z.ZodEnum<{
5
+ token: "token";
6
+ public: "public";
7
+ verifier: "verifier";
8
+ "token+api_key": "token+api_key";
9
+ "out-of-service": "out-of-service";
10
+ }>;
11
+ export type TriggerAuth = z.infer<typeof triggerAuth>;
12
+ export declare const hookList: z.ZodObject<{
13
+ items: z.ZodArray<z.ZodObject<{
14
+ condition: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
15
+ content: z.ZodOptional<z.ZodString>;
16
+ id: z.ZodOptional<z.ZodString>;
17
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
18
+ }, z.core.$strict>, z.ZodNull]>>;
19
+ execution_key: z.ZodString;
20
+ execution_key_fingerprint: z.ZodString;
21
+ expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
22
+ content: z.ZodOptional<z.ZodString>;
23
+ id: z.ZodOptional<z.ZodString>;
24
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
25
+ }, z.core.$strict>, z.ZodNull]>>;
26
+ name: z.ZodString;
27
+ state_binding: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
28
+ states: z.ZodArray<z.ZodObject<{
29
+ input_injections: z.ZodDefault<z.ZodArray<z.ZodObject<{
30
+ into: z.ZodString;
31
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
32
+ content: z.ZodOptional<z.ZodString>;
33
+ id: z.ZodOptional<z.ZodString>;
34
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
35
+ }, z.core.$strict>, z.ZodNull]>>;
36
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
37
+ }, z.core.$strict>>>;
38
+ scope_expr: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
39
+ content: z.ZodOptional<z.ZodString>;
40
+ id: z.ZodOptional<z.ZodString>;
41
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
42
+ }, z.core.$strict>, z.ZodNull]>>;
43
+ state: z.ZodString;
44
+ subject_expr: z.ZodObject<{
45
+ content: z.ZodOptional<z.ZodString>;
46
+ id: z.ZodOptional<z.ZodString>;
47
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
48
+ }, z.core.$strict>;
49
+ templates: z.ZodDefault<z.ZodArray<z.ZodString>>;
50
+ updates: z.ZodDefault<z.ZodArray<z.ZodObject<{
51
+ adapter: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
52
+ content: z.ZodOptional<z.ZodString>;
53
+ id: z.ZodOptional<z.ZodString>;
54
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
55
+ }, z.core.$strict>, z.ZodNull]>>;
56
+ jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
57
+ content: z.ZodOptional<z.ZodString>;
58
+ id: z.ZodOptional<z.ZodString>;
59
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
60
+ }, z.core.$strict>, z.ZodNull]>>;
61
+ op_id: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
62
+ content: z.ZodOptional<z.ZodString>;
63
+ id: z.ZodOptional<z.ZodString>;
64
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
65
+ }, z.core.$strict>, z.ZodNull]>>;
66
+ template_jq: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
67
+ }, z.core.$strict>>>;
68
+ }, z.core.$strict>>;
69
+ }, z.core.$strict>, z.ZodNull]>>;
70
+ subject: z.ZodDefault<z.ZodUnion<readonly [z.ZodObject<{
71
+ key_expr: z.ZodObject<{
72
+ content: z.ZodOptional<z.ZodString>;
73
+ id: z.ZodOptional<z.ZodString>;
74
+ kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
75
+ }, z.core.$strict>;
76
+ kind: z.ZodString;
77
+ target_kind: z.ZodEnum<{
78
+ tool: "tool";
79
+ agent: "agent";
80
+ }>;
81
+ target_name: z.ZodString;
82
+ }, z.core.$strict>, z.ZodNull]>>;
83
+ tool: z.ZodString;
84
+ tool_kwargs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
85
+ topic: z.ZodString;
86
+ }, z.core.$strip>>;
87
+ total: z.ZodNumber;
88
+ topic_verifiers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
89
+ verifier: z.ZodString;
90
+ config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
91
+ }, z.core.$strip>>>;
92
+ trigger_auth: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEnum<{
93
+ token: "token";
94
+ public: "public";
95
+ verifier: "verifier";
96
+ "token+api_key": "token+api_key";
97
+ "out-of-service": "out-of-service";
98
+ }>>>;
99
+ }, z.core.$strip>;
100
+ export type HookList = z.infer<typeof hookList>;
101
+ export declare const hookRegistered: z.ZodObject<{
102
+ registered: z.ZodBoolean;
103
+ name: z.ZodString;
104
+ }, z.core.$strip>;
105
+ export declare const hookRemoved: z.ZodObject<{
106
+ removed: z.ZodBoolean;
107
+ name: z.ZodString;
108
+ }, z.core.$strip>;
109
+ export declare const hookVerifiers: z.ZodArray<z.ZodString>;
110
+ /** `PUT /api/hooks/topics/{topic}/verifier` — the bound topic + verifier name. */
111
+ export declare const topicVerifierSet: z.ZodObject<{
112
+ topic: z.ZodString;
113
+ verifier: z.ZodString;
114
+ }, z.core.$strip>;
115
+ /** `DELETE /api/hooks/topics/{topic}/verifier` — the unbound topic. */
116
+ export declare const topicVerifierRemoved: z.ZodObject<{
117
+ removed: z.ZodBoolean;
118
+ topic: z.ZodString;
119
+ }, z.core.$strip>;
120
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/schemas/hooks.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,qFAAqF;AACrF,eAAO,MAAM,WAAW;;;;;;EAMtB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAcnB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD,eAAO,MAAM,cAAc;;;iBAGzB,CAAC;AAEH,eAAO,MAAM,WAAW;;;iBAGtB,CAAC;AAKH,eAAO,MAAM,aAAa,yBAAsB,CAAC;AAEjD,kFAAkF;AAClF,eAAO,MAAM,gBAAgB;;;iBAAwD,CAAC;AAEtF,uEAAuE;AACvE,eAAO,MAAM,oBAAoB;;;iBAAwD,CAAC"}
@@ -0,0 +1,44 @@
1
+ /** Hook listing, registration and topic-verifier response schemas. */
2
+ import { z } from 'zod';
3
+ import { hookParams } from './served';
4
+ // The hand-written hook response DTOs: the fire-door authority enum, the list rows and
5
+ // their wrapper, and the per-topic verifier/trigger metadata. The served hook DOCUMENT
6
+ // schemas (`hookSubject`/`hookParams`/`hookRegister`) are generated from the contract
7
+ // bundle and re-exported at the top of this file, not defined here.
8
+ /** A fire door — who may trigger a path, not what the fire may do. A string enum. */
9
+ export const triggerAuth = z.enum([
10
+ 'public',
11
+ 'verifier',
12
+ 'token',
13
+ 'token+api_key',
14
+ 'out-of-service',
15
+ ]);
16
+ export const hookList = z.object({
17
+ items: z.array(hookParams),
18
+ total: z.number(),
19
+ // Per-topic verifier bindings: the topic name maps to the verifier bound to it
20
+ // and that verifier's config (which carries a `secret_env` name, never a secret
21
+ // value). Tolerant of an older/empty response, which omits the key entirely.
22
+ topic_verifiers: z
23
+ .record(z.string(), z.object({ verifier: z.string(), config: z.record(z.string(), z.unknown()) }))
24
+ .default({}),
25
+ // Per-topic fire door (topic → door). Tolerant of an older response omitting it.
26
+ trigger_auth: z.record(z.string(), triggerAuth).default({}),
27
+ });
28
+ export const hookRegistered = z.object({
29
+ registered: z.boolean(),
30
+ name: z.string(),
31
+ });
32
+ export const hookRemoved = z.object({
33
+ removed: z.boolean(),
34
+ name: z.string(),
35
+ });
36
+ // The registered webhook-verifier catalog (`GET /api/hooks/verifiers`) — the
37
+ // sorted verifier NAMES only, never any verifier's config. An empty registry is a
38
+ // valid empty array. This is the ONLY source the topic-verifier bind picker reads.
39
+ export const hookVerifiers = z.array(z.string());
40
+ /** `PUT /api/hooks/topics/{topic}/verifier` — the bound topic + verifier name. */
41
+ export const topicVerifierSet = z.object({ topic: z.string(), verifier: z.string() });
42
+ /** `DELETE /api/hooks/topics/{topic}/verifier` — the unbound topic. */
43
+ export const topicVerifierRemoved = z.object({ removed: z.boolean(), topic: z.string() });
44
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/schemas/hooks.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,uFAAuF;AACvF,uFAAuF;AACvF,sFAAsF;AACtF,oEAAoE;AAEpE,qFAAqF;AACrF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC;IAChC,QAAQ;IACR,UAAU;IACV,OAAO;IACP,eAAe;IACf,gBAAgB;CACjB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,+EAA+E;IAC/E,gFAA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EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC"}
@@ -0,0 +1,40 @@
1
+ /** Public barrel for the api-client response/DTO schemas. */
2
+ export { toolRunList, toolRunRecord, toolRunSubmitResult } from '../tool-runs';
3
+ export * from './api-keys';
4
+ export * from './auth-routes';
5
+ export * from './backup';
6
+ export * from './capabilities';
7
+ export * from './channels';
8
+ export * from './config';
9
+ export * from './connectors';
10
+ export * from './conversations';
11
+ export * from './extensions';
12
+ export * from './fleet';
13
+ export * from './hooks';
14
+ export * from './interactions';
15
+ export * from './login';
16
+ export * from './manifest-mcp';
17
+ export * from './marketplace';
18
+ export * from './notifications';
19
+ export * from './observability';
20
+ export * from './policy';
21
+ export * from './presets';
22
+ export * from './principals';
23
+ export * from './profiles';
24
+ export * from './roles';
25
+ export * from './schedules';
26
+ export * from './served';
27
+ export * from './settings-schema';
28
+ export * from './setup';
29
+ export { jsonSchema, jsonValue } from './shared';
30
+ export * from './states';
31
+ export * from './storage';
32
+ export * from './studio-plugins';
33
+ export * from './sub-mcp';
34
+ export * from './system-kinds';
35
+ export * from './templates';
36
+ export * from './tool-meta';
37
+ export * from './tools';
38
+ export * from './trigger-links';
39
+ export * from './web-entry';
40
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC/E,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACjD,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
@@ -0,0 +1,40 @@
1
+ /** Public barrel for the api-client response/DTO schemas. */
2
+ export { toolRunList, toolRunRecord, toolRunSubmitResult } from '../tool-runs';
3
+ export * from './api-keys';
4
+ export * from './auth-routes';
5
+ export * from './backup';
6
+ export * from './capabilities';
7
+ export * from './channels';
8
+ export * from './config';
9
+ export * from './connectors';
10
+ export * from './conversations';
11
+ export * from './extensions';
12
+ export * from './fleet';
13
+ export * from './hooks';
14
+ export * from './interactions';
15
+ export * from './login';
16
+ export * from './manifest-mcp';
17
+ export * from './marketplace';
18
+ export * from './notifications';
19
+ export * from './observability';
20
+ export * from './policy';
21
+ export * from './presets';
22
+ export * from './principals';
23
+ export * from './profiles';
24
+ export * from './roles';
25
+ export * from './schedules';
26
+ export * from './served';
27
+ export * from './settings-schema';
28
+ export * from './setup';
29
+ export { jsonSchema, jsonValue } from './shared';
30
+ export * from './states';
31
+ export * from './storage';
32
+ export * from './studio-plugins';
33
+ export * from './sub-mcp';
34
+ export * from './system-kinds';
35
+ export * from './templates';
36
+ export * from './tool-meta';
37
+ export * from './tools';
38
+ export * from './trigger-links';
39
+ export * from './web-entry';
40
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC/E,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACjD,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
@@ -0,0 +1,156 @@
1
+ /** Interaction question, answer and media response schemas. */
2
+ import { z } from 'zod';
3
+ export declare const answerFormat: z.ZodEnum<{
4
+ text: "text";
5
+ external: "external";
6
+ confirm: "confirm";
7
+ select: "select";
8
+ form: "form";
9
+ }>;
10
+ export type AnswerFormat = z.infer<typeof answerFormat>;
11
+ /** The kind of a question's display-only media item: a remote/inline image, or a link. */
12
+ export declare const mediaKind: z.ZodEnum<{
13
+ image: "image";
14
+ link: "link";
15
+ }>;
16
+ export type MediaKind = z.infer<typeof mediaKind>;
17
+ /**
18
+ * One item of a question's display-only media. Applied PER ITEM by the renderer
19
+ * (never as a strict array on the frame): the frame's `media` field is a loose
20
+ * `z.array(z.unknown())`, and the renderer `safeParse`s each item with this schema
21
+ * so one malformed/hostile item is a loud per-item notice, not a whole-frame parse
22
+ * failure that would silently vanish an answerable question.
23
+ *
24
+ * `caption` is `.nullish()` (absent OR `null` both parse to a caption-less item):
25
+ * a caption-less item may arrive with the key omitted OR with an explicit `null`, so
26
+ * `.optional()` here would false-fail the explicit `null` and render a good image as
27
+ * malformed. `url` and `kind` are the only load-bearing fields; the image
28
+ * src scheme gate and the link neutralization are enforced by the renderer.
29
+ */
30
+ export declare const interactionMediaItem: z.ZodObject<{
31
+ kind: z.ZodEnum<{
32
+ image: "image";
33
+ link: "link";
34
+ }>;
35
+ url: z.ZodString;
36
+ caption: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
+ }, z.core.$strip>;
38
+ export type InteractionMediaItem = z.infer<typeof interactionMediaItem>;
39
+ /**
40
+ * One per-send choice for a `form` property whose schema is a string (or array of
41
+ * strings). `value` is what the answer carries; `label` (absent OR null both parse
42
+ * to no label) is the human text shown in its place. A send may replace a property's
43
+ * `enum` this way for one ask without republishing the form. Applied per property by
44
+ * the form preview (safeParsed), so a malformed entry is a loud notice, never silent.
45
+ */
46
+ export declare const formOption: z.ZodObject<{
47
+ value: z.ZodString;
48
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
49
+ }, z.core.$strip>;
50
+ export type FormOption = z.infer<typeof formOption>;
51
+ /**
52
+ * Per-send `form` data: `values` prefills top-level properties (keyed by property
53
+ * name), `options` supplies per-send choice lists (keyed by property name). Both
54
+ * default to empty. The form preview safeParses this off `format_payload.data`, so a
55
+ * malformed block is a loud notice rather than a whole-frame parse failure.
56
+ */
57
+ export declare const formData: z.ZodObject<{
58
+ values: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
59
+ options: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
60
+ value: z.ZodString;
61
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
+ }, z.core.$strip>>>>;
63
+ }, z.core.$strip>;
64
+ export type FormData = z.infer<typeof formData>;
65
+ /**
66
+ * One page of a stepped `form`: a `title` and the ordered top-level property names it
67
+ * groups. `format_payload.pages` is the ordered list of these; absent = one page. The
68
+ * form preview safeParses the list, so a malformed page is a loud notice, never silent.
69
+ */
70
+ export declare const formPage: z.ZodObject<{
71
+ title: z.ZodString;
72
+ fields: z.ZodArray<z.ZodString>;
73
+ }, z.core.$strip>;
74
+ export type FormPage = z.infer<typeof formPage>;
75
+ /** The `form` pages list (`format_payload.pages`), safeParsed as a whole by the preview. */
76
+ export declare const formPages: z.ZodArray<z.ZodObject<{
77
+ title: z.ZodString;
78
+ fields: z.ZodArray<z.ZodString>;
79
+ }, z.core.$strip>>;
80
+ export type FormPages = z.infer<typeof formPages>;
81
+ export declare const interaction: z.ZodObject<{
82
+ interaction_id: z.ZodString;
83
+ group_id: z.ZodString;
84
+ question: z.ZodDefault<z.ZodString>;
85
+ answer_format: z.ZodEnum<{
86
+ text: "text";
87
+ external: "external";
88
+ confirm: "confirm";
89
+ select: "select";
90
+ form: "form";
91
+ }>;
92
+ format_payload: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>, z.ZodTransform<Record<string, unknown>, Record<string, unknown> | null | undefined>>;
93
+ created_at: z.ZodString;
94
+ timeout_at: z.ZodString;
95
+ sensitive: z.ZodDefault<z.ZodBoolean>;
96
+ server_verified: z.ZodOptional<z.ZodBoolean>;
97
+ channel: z.ZodOptional<z.ZodString>;
98
+ recipient: z.ZodOptional<z.ZodString>;
99
+ origin: z.ZodOptional<z.ZodString>;
100
+ audience: z.ZodOptional<z.ZodString>;
101
+ media: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
102
+ }, z.core.$strip>;
103
+ export type Interaction = z.infer<typeof interaction>;
104
+ /** The answer door's response — the blocked caller was woken. */
105
+ export declare const interactionAnswered: z.ZodObject<{
106
+ interaction_id: z.ZodString;
107
+ status: z.ZodString;
108
+ }, z.core.$strip>;
109
+ export type InteractionAnswered = z.infer<typeof interactionAnswered>;
110
+ /**
111
+ * The cancel door's response — a pending ask was WITHDRAWN without an answer (the
112
+ * asking flow does not resume). `status` is `"cancelled"`; the shape mirrors the
113
+ * answer door's terminal reply, but the door is distinct so it carries its own
114
+ * schema.
115
+ */
116
+ export declare const interactionCancelled: z.ZodObject<{
117
+ interaction_id: z.ZodString;
118
+ status: z.ZodString;
119
+ }, z.core.$strip>;
120
+ export type InteractionCancelled = z.infer<typeof interactionCancelled>;
121
+ /**
122
+ * A page of pending interactions from `GET /api/interactions?page=&pageSize=`. Each
123
+ * item is the same record the stream's `interaction.add` frame carries. The pending
124
+ * set is the paged base the tail-only stream applies live deltas over.
125
+ */
126
+ export declare const interactionsPage: z.ZodObject<{
127
+ total: z.ZodNumber;
128
+ page: z.ZodNumber;
129
+ page_size: z.ZodNumber;
130
+ next_page: z.ZodNullable<z.ZodNumber>;
131
+ truncated: z.ZodBoolean;
132
+ items: z.ZodArray<z.ZodObject<{
133
+ interaction_id: z.ZodString;
134
+ group_id: z.ZodString;
135
+ question: z.ZodDefault<z.ZodString>;
136
+ answer_format: z.ZodEnum<{
137
+ text: "text";
138
+ external: "external";
139
+ confirm: "confirm";
140
+ select: "select";
141
+ form: "form";
142
+ }>;
143
+ format_payload: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>, z.ZodTransform<Record<string, unknown>, Record<string, unknown> | null | undefined>>;
144
+ created_at: z.ZodString;
145
+ timeout_at: z.ZodString;
146
+ sensitive: z.ZodDefault<z.ZodBoolean>;
147
+ server_verified: z.ZodOptional<z.ZodBoolean>;
148
+ channel: z.ZodOptional<z.ZodString>;
149
+ recipient: z.ZodOptional<z.ZodString>;
150
+ origin: z.ZodOptional<z.ZodString>;
151
+ audience: z.ZodOptional<z.ZodString>;
152
+ media: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
153
+ }, z.core.$strip>>;
154
+ }, z.core.$strip>;
155
+ export type InteractionsPage = z.infer<typeof interactionsPage>;
156
+ //# sourceMappingURL=interactions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["../../src/schemas/interactions.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,YAAY;;;;;;EAA4D,CAAC;AACtF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,0FAA0F;AAC1F,eAAO,MAAM,SAAS;;;EAA4B,CAAC;AACnD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oBAAoB;;;;;;;iBAI/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE;;;;;;GAMG;AACH,eAAO,MAA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