@tai42/api-client 19.3.0 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. package/README.md +29 -0
  2. package/dist/agents.d.ts.map +1 -1
  3. package/dist/agents.js +6 -4
  4. package/dist/agents.js.map +1 -1
  5. package/dist/client/agents-client.d.ts.map +1 -1
  6. package/dist/client/agents-client.js +3 -2
  7. package/dist/client/agents-client.js.map +1 -1
  8. package/dist/client/auth-client.d.ts +143 -90
  9. package/dist/client/auth-client.d.ts.map +1 -1
  10. package/dist/client/auth-client.js +81 -25
  11. package/dist/client/auth-client.js.map +1 -1
  12. package/dist/client/backend-client.d.ts +14 -13
  13. package/dist/client/backend-client.d.ts.map +1 -1
  14. package/dist/client/backend-client.js +7 -3
  15. package/dist/client/backend-client.js.map +1 -1
  16. package/dist/client/backup-client.d.ts +45 -19
  17. package/dist/client/backup-client.d.ts.map +1 -1
  18. package/dist/client/backup-client.js +8 -3
  19. package/dist/client/backup-client.js.map +1 -1
  20. package/dist/client/capabilities-client.d.ts +20 -16
  21. package/dist/client/capabilities-client.d.ts.map +1 -1
  22. package/dist/client/capabilities-client.js +3 -2
  23. package/dist/client/capabilities-client.js.map +1 -1
  24. package/dist/client/channels-client.d.ts.map +1 -1
  25. package/dist/client/channels-client.js +2 -1
  26. package/dist/client/channels-client.js.map +1 -1
  27. package/dist/client/config-client.d.ts +44 -17
  28. package/dist/client/config-client.d.ts.map +1 -1
  29. package/dist/client/config-client.js +10 -4
  30. package/dist/client/config-client.js.map +1 -1
  31. package/dist/client/connectors-client.d.ts +270 -81
  32. package/dist/client/connectors-client.d.ts.map +1 -1
  33. package/dist/client/connectors-client.js +38 -10
  34. package/dist/client/connectors-client.js.map +1 -1
  35. package/dist/client/conversations-client.d.ts +440 -86
  36. package/dist/client/conversations-client.d.ts.map +1 -1
  37. package/dist/client/conversations-client.js +46 -17
  38. package/dist/client/conversations-client.js.map +1 -1
  39. package/dist/client/hooks-client.d.ts +3 -3
  40. package/dist/client/hooks-client.d.ts.map +1 -1
  41. package/dist/client/hooks-client.js +12 -7
  42. package/dist/client/hooks-client.js.map +1 -1
  43. package/dist/client/index.d.ts +2252 -864
  44. package/dist/client/index.d.ts.map +1 -1
  45. package/dist/client/index.js +10 -2
  46. package/dist/client/index.js.map +1 -1
  47. package/dist/client/interactions-client.d.ts +19 -14
  48. package/dist/client/interactions-client.d.ts.map +1 -1
  49. package/dist/client/interactions-client.js +21 -9
  50. package/dist/client/interactions-client.js.map +1 -1
  51. package/dist/client/login-client.d.ts +18 -17
  52. package/dist/client/login-client.d.ts.map +1 -1
  53. package/dist/client/login-client.js +8 -4
  54. package/dist/client/login-client.js.map +1 -1
  55. package/dist/client/manifest-client.d.ts +276 -105
  56. package/dist/client/manifest-client.d.ts.map +1 -1
  57. package/dist/client/manifest-client.js +22 -16
  58. package/dist/client/manifest-client.js.map +1 -1
  59. package/dist/client/marketplace-client.d.ts +181 -51
  60. package/dist/client/marketplace-client.d.ts.map +1 -1
  61. package/dist/client/marketplace-client.js +23 -12
  62. package/dist/client/marketplace-client.js.map +1 -1
  63. package/dist/client/mcp-config-schema-client.d.ts.map +1 -1
  64. package/dist/client/mcp-config-schema-client.js +2 -1
  65. package/dist/client/mcp-config-schema-client.js.map +1 -1
  66. package/dist/client/notifications-client.d.ts +44 -14
  67. package/dist/client/notifications-client.d.ts.map +1 -1
  68. package/dist/client/notifications-client.js +2 -1
  69. package/dist/client/notifications-client.js.map +1 -1
  70. package/dist/client/observability-client.d.ts +78 -38
  71. package/dist/client/observability-client.d.ts.map +1 -1
  72. package/dist/client/observability-client.js +29 -6
  73. package/dist/client/observability-client.js.map +1 -1
  74. package/dist/client/plugins-client.d.ts +8 -6
  75. package/dist/client/plugins-client.d.ts.map +1 -1
  76. package/dist/client/plugins-client.js +2 -1
  77. package/dist/client/plugins-client.js.map +1 -1
  78. package/dist/client/policy-client.d.ts +4 -4
  79. package/dist/client/policy-client.d.ts.map +1 -1
  80. package/dist/client/policy-client.js +11 -4
  81. package/dist/client/policy-client.js.map +1 -1
  82. package/dist/client/presets-client.d.ts +84 -39
  83. package/dist/client/presets-client.d.ts.map +1 -1
  84. package/dist/client/presets-client.js +25 -13
  85. package/dist/client/presets-client.js.map +1 -1
  86. package/dist/client/profiles-client.d.ts +40 -33
  87. package/dist/client/profiles-client.d.ts.map +1 -1
  88. package/dist/client/profiles-client.js +15 -10
  89. package/dist/client/profiles-client.js.map +1 -1
  90. package/dist/client/schedules-client.d.ts +21 -17
  91. package/dist/client/schedules-client.d.ts.map +1 -1
  92. package/dist/client/schedules-client.js +8 -5
  93. package/dist/client/schedules-client.js.map +1 -1
  94. package/dist/client/settings-schema-client.d.ts +1 -1
  95. package/dist/client/settings-schema-client.d.ts.map +1 -1
  96. package/dist/client/settings-schema-client.js +2 -1
  97. package/dist/client/settings-schema-client.js.map +1 -1
  98. package/dist/client/states-client.d.ts +215 -87
  99. package/dist/client/states-client.d.ts.map +1 -1
  100. package/dist/client/states-client.js +98 -37
  101. package/dist/client/states-client.js.map +1 -1
  102. package/dist/client/storage-client.d.ts +5 -5
  103. package/dist/client/storage-client.d.ts.map +1 -1
  104. package/dist/client/storage-client.js +24 -12
  105. package/dist/client/storage-client.js.map +1 -1
  106. package/dist/client/sub-mcp-client.d.ts +3 -1
  107. package/dist/client/sub-mcp-client.d.ts.map +1 -1
  108. package/dist/client/sub-mcp-client.js +9 -4
  109. package/dist/client/sub-mcp-client.js.map +1 -1
  110. package/dist/client/system-client.d.ts +2 -2
  111. package/dist/client/system-client.d.ts.map +1 -1
  112. package/dist/client/system-client.js +2 -1
  113. package/dist/client/system-client.js.map +1 -1
  114. package/dist/client/templates-client.d.ts +65 -6
  115. package/dist/client/templates-client.d.ts.map +1 -1
  116. package/dist/client/templates-client.js +25 -7
  117. package/dist/client/templates-client.js.map +1 -1
  118. package/dist/client/tool-extensions-client.d.ts +41 -16
  119. package/dist/client/tool-extensions-client.d.ts.map +1 -1
  120. package/dist/client/tool-extensions-client.js +6 -4
  121. package/dist/client/tool-extensions-client.js.map +1 -1
  122. package/dist/client/tool-meta-client.d.ts +8 -8
  123. package/dist/client/tool-meta-client.d.ts.map +1 -1
  124. package/dist/client/tool-meta-client.js +12 -8
  125. package/dist/client/tool-meta-client.js.map +1 -1
  126. package/dist/client/tools-client.d.ts +150 -23
  127. package/dist/client/tools-client.d.ts.map +1 -1
  128. package/dist/client/tools-client.js +8 -8
  129. package/dist/client/tools-client.js.map +1 -1
  130. package/dist/client/trigger-links-client.d.ts +11 -9
  131. package/dist/client/trigger-links-client.d.ts.map +1 -1
  132. package/dist/client/trigger-links-client.js +4 -4
  133. package/dist/client/trigger-links-client.js.map +1 -1
  134. package/dist/fleet-report.d.ts +21 -5
  135. package/dist/fleet-report.d.ts.map +1 -1
  136. package/dist/fleet-report.js +31 -6
  137. package/dist/fleet-report.js.map +1 -1
  138. package/dist/generated/api-routes.d.ts +1014 -0
  139. package/dist/generated/api-routes.d.ts.map +1 -0
  140. package/dist/generated/api-routes.js +322 -0
  141. package/dist/generated/api-routes.js.map +1 -0
  142. package/dist/generated/openapi-schemas.d.ts +12425 -0
  143. package/dist/generated/openapi-schemas.d.ts.map +1 -0
  144. package/dist/generated/openapi-schemas.js +671 -0
  145. package/dist/generated/openapi-schemas.js.map +1 -0
  146. package/dist/generated/served-schemas.d.ts +6697 -392
  147. package/dist/generated/served-schemas.d.ts.map +1 -1
  148. package/dist/generated/served-schemas.js +7061 -46
  149. package/dist/generated/served-schemas.js.map +1 -1
  150. package/dist/headers.d.ts +4 -0
  151. package/dist/headers.d.ts.map +1 -0
  152. package/dist/headers.js +4 -0
  153. package/dist/headers.js.map +1 -0
  154. package/dist/http.d.ts.map +1 -1
  155. package/dist/http.js +4 -3
  156. package/dist/http.js.map +1 -1
  157. package/dist/index.d.ts +7 -3
  158. package/dist/index.d.ts.map +1 -1
  159. package/dist/index.js +3 -0
  160. package/dist/index.js.map +1 -1
  161. package/dist/schemas/api-keys.d.ts +14 -12
  162. package/dist/schemas/api-keys.d.ts.map +1 -1
  163. package/dist/schemas/api-keys.js +9 -23
  164. package/dist/schemas/api-keys.js.map +1 -1
  165. package/dist/schemas/auth-routes.d.ts +34 -29
  166. package/dist/schemas/auth-routes.d.ts.map +1 -1
  167. package/dist/schemas/auth-routes.js +22 -27
  168. package/dist/schemas/auth-routes.js.map +1 -1
  169. package/dist/schemas/backup.d.ts +157 -36
  170. package/dist/schemas/backup.d.ts.map +1 -1
  171. package/dist/schemas/backup.js +27 -26
  172. package/dist/schemas/backup.js.map +1 -1
  173. package/dist/schemas/capabilities.d.ts +32 -22
  174. package/dist/schemas/capabilities.d.ts.map +1 -1
  175. package/dist/schemas/capabilities.js +15 -40
  176. package/dist/schemas/capabilities.js.map +1 -1
  177. package/dist/schemas/channels.d.ts +1 -1
  178. package/dist/schemas/channels.d.ts.map +1 -1
  179. package/dist/schemas/channels.js +2 -5
  180. package/dist/schemas/channels.js.map +1 -1
  181. package/dist/schemas/config.d.ts.map +1 -1
  182. package/dist/schemas/config.js +4 -6
  183. package/dist/schemas/config.js.map +1 -1
  184. package/dist/schemas/connectors.d.ts +381 -185
  185. package/dist/schemas/connectors.d.ts.map +1 -1
  186. package/dist/schemas/connectors.js +54 -101
  187. package/dist/schemas/connectors.js.map +1 -1
  188. package/dist/schemas/conversations.d.ts +970 -241
  189. package/dist/schemas/conversations.d.ts.map +1 -1
  190. package/dist/schemas/conversations.js +40 -134
  191. package/dist/schemas/conversations.js.map +1 -1
  192. package/dist/schemas/extensions.d.ts +9 -6
  193. package/dist/schemas/extensions.d.ts.map +1 -1
  194. package/dist/schemas/extensions.js +6 -4
  195. package/dist/schemas/extensions.js.map +1 -1
  196. package/dist/schemas/fleet.d.ts +153 -99
  197. package/dist/schemas/fleet.d.ts.map +1 -1
  198. package/dist/schemas/fleet.js +41 -51
  199. package/dist/schemas/fleet.js.map +1 -1
  200. package/dist/schemas/hooks.d.ts +34 -34
  201. package/dist/schemas/hooks.d.ts.map +1 -1
  202. package/dist/schemas/hooks.js +15 -34
  203. package/dist/schemas/hooks.js.map +1 -1
  204. package/dist/schemas/index.d.ts +1 -1
  205. package/dist/schemas/index.d.ts.map +1 -1
  206. package/dist/schemas/index.js +1 -1
  207. package/dist/schemas/index.js.map +1 -1
  208. package/dist/schemas/interactions.d.ts +146 -123
  209. package/dist/schemas/interactions.d.ts.map +1 -1
  210. package/dist/schemas/interactions.js +44 -129
  211. package/dist/schemas/interactions.js.map +1 -1
  212. package/dist/schemas/login.d.ts +36 -37
  213. package/dist/schemas/login.d.ts.map +1 -1
  214. package/dist/schemas/login.js +8 -42
  215. package/dist/schemas/login.js.map +1 -1
  216. package/dist/schemas/manifest-mcp.d.ts +61 -35
  217. package/dist/schemas/manifest-mcp.d.ts.map +1 -1
  218. package/dist/schemas/manifest-mcp.js +13 -19
  219. package/dist/schemas/manifest-mcp.js.map +1 -1
  220. package/dist/schemas/marketplace.d.ts +219 -133
  221. package/dist/schemas/marketplace.d.ts.map +1 -1
  222. package/dist/schemas/marketplace.js +35 -120
  223. package/dist/schemas/marketplace.js.map +1 -1
  224. package/dist/schemas/members.d.ts +161 -0
  225. package/dist/schemas/members.d.ts.map +1 -0
  226. package/dist/schemas/members.js +73 -0
  227. package/dist/schemas/members.js.map +1 -0
  228. package/dist/schemas/notifications.d.ts +113 -41
  229. package/dist/schemas/notifications.d.ts.map +1 -1
  230. package/dist/schemas/notifications.js +9 -35
  231. package/dist/schemas/notifications.js.map +1 -1
  232. package/dist/schemas/observability.d.ts +174 -72
  233. package/dist/schemas/observability.d.ts.map +1 -1
  234. package/dist/schemas/observability.js +23 -76
  235. package/dist/schemas/observability.js.map +1 -1
  236. package/dist/schemas/policy.d.ts +11 -11
  237. package/dist/schemas/policy.d.ts.map +1 -1
  238. package/dist/schemas/policy.js +5 -12
  239. package/dist/schemas/policy.js.map +1 -1
  240. package/dist/schemas/presets.d.ts +109 -64
  241. package/dist/schemas/presets.d.ts.map +1 -1
  242. package/dist/schemas/presets.js +12 -48
  243. package/dist/schemas/presets.js.map +1 -1
  244. package/dist/schemas/principals.d.ts +28 -21
  245. package/dist/schemas/principals.d.ts.map +1 -1
  246. package/dist/schemas/principals.js +13 -25
  247. package/dist/schemas/principals.js.map +1 -1
  248. package/dist/schemas/profiles.d.ts +75 -63
  249. package/dist/schemas/profiles.d.ts.map +1 -1
  250. package/dist/schemas/profiles.js +24 -54
  251. package/dist/schemas/profiles.js.map +1 -1
  252. package/dist/schemas/roles.d.ts +22 -22
  253. package/dist/schemas/roles.d.ts.map +1 -1
  254. package/dist/schemas/roles.js +10 -17
  255. package/dist/schemas/roles.js.map +1 -1
  256. package/dist/schemas/schedules.d.ts +21 -15
  257. package/dist/schemas/schedules.d.ts.map +1 -1
  258. package/dist/schemas/schedules.js +4 -13
  259. package/dist/schemas/schedules.js.map +1 -1
  260. package/dist/schemas/served.d.ts +6373 -194
  261. package/dist/schemas/served.d.ts.map +1 -1
  262. package/dist/schemas/served.js +21 -0
  263. package/dist/schemas/served.js.map +1 -1
  264. package/dist/schemas/settings-schema.d.ts +1 -1
  265. package/dist/schemas/settings-schema.d.ts.map +1 -1
  266. package/dist/schemas/settings-schema.js +17 -19
  267. package/dist/schemas/settings-schema.js.map +1 -1
  268. package/dist/schemas/setup.d.ts +6 -6
  269. package/dist/schemas/setup.d.ts.map +1 -1
  270. package/dist/schemas/setup.js +2 -11
  271. package/dist/schemas/setup.js.map +1 -1
  272. package/dist/schemas/states.d.ts +450 -135
  273. package/dist/schemas/states.d.ts.map +1 -1
  274. package/dist/schemas/states.js +76 -140
  275. package/dist/schemas/states.js.map +1 -1
  276. package/dist/schemas/storage.d.ts +7 -8
  277. package/dist/schemas/storage.d.ts.map +1 -1
  278. package/dist/schemas/storage.js +8 -17
  279. package/dist/schemas/storage.js.map +1 -1
  280. package/dist/schemas/studio-plugins.d.ts +24 -18
  281. package/dist/schemas/studio-plugins.d.ts.map +1 -1
  282. package/dist/schemas/studio-plugins.js +5 -19
  283. package/dist/schemas/studio-plugins.js.map +1 -1
  284. package/dist/schemas/sub-mcp.d.ts +11 -8
  285. package/dist/schemas/sub-mcp.d.ts.map +1 -1
  286. package/dist/schemas/sub-mcp.js +10 -19
  287. package/dist/schemas/sub-mcp.js.map +1 -1
  288. package/dist/schemas/system-kinds.d.ts +76 -46
  289. package/dist/schemas/system-kinds.d.ts.map +1 -1
  290. package/dist/schemas/system-kinds.js +11 -28
  291. package/dist/schemas/system-kinds.js.map +1 -1
  292. package/dist/schemas/templates.d.ts +83 -25
  293. package/dist/schemas/templates.d.ts.map +1 -1
  294. package/dist/schemas/templates.js +8 -9
  295. package/dist/schemas/templates.js.map +1 -1
  296. package/dist/schemas/tool-meta.d.ts +15 -15
  297. package/dist/schemas/tool-meta.d.ts.map +1 -1
  298. package/dist/schemas/tool-meta.js +6 -21
  299. package/dist/schemas/tool-meta.js.map +1 -1
  300. package/dist/schemas/tools.d.ts +177 -56
  301. package/dist/schemas/tools.d.ts.map +1 -1
  302. package/dist/schemas/tools.js +20 -41
  303. package/dist/schemas/tools.js.map +1 -1
  304. package/dist/schemas/trigger-links.d.ts +22 -17
  305. package/dist/schemas/trigger-links.d.ts.map +1 -1
  306. package/dist/schemas/trigger-links.js +7 -27
  307. package/dist/schemas/trigger-links.js.map +1 -1
  308. package/dist/tool-runs.d.ts +175 -54
  309. package/dist/tool-runs.d.ts.map +1 -1
  310. package/dist/tool-runs.js +33 -34
  311. package/dist/tool-runs.js.map +1 -1
  312. package/package.json +4 -3
  313. package/src/agents.ts +16 -4
  314. package/src/client/agents-client.ts +3 -2
  315. package/src/client/auth-client.ts +134 -34
  316. package/src/client/backend-client.ts +8 -3
  317. package/src/client/backup-client.ts +8 -3
  318. package/src/client/capabilities-client.ts +4 -2
  319. package/src/client/channels-client.ts +3 -1
  320. package/src/client/config-client.ts +13 -5
  321. package/src/client/connectors-client.ts +91 -16
  322. package/src/client/conversations-client.ts +79 -30
  323. package/src/client/hooks-client.ts +25 -12
  324. package/src/client/index.ts +16 -4
  325. package/src/client/interactions-client.ts +40 -16
  326. package/src/client/login-client.ts +8 -4
  327. package/src/client/manifest-client.ts +48 -24
  328. package/src/client/marketplace-client.ts +23 -12
  329. package/src/client/mcp-config-schema-client.ts +2 -1
  330. package/src/client/notifications-client.ts +2 -1
  331. package/src/client/observability-client.ts +60 -8
  332. package/src/client/plugins-client.ts +2 -1
  333. package/src/client/policy-client.ts +24 -9
  334. package/src/client/presets-client.ts +26 -13
  335. package/src/client/profiles-client.ts +53 -24
  336. package/src/client/schedules-client.ts +14 -20
  337. package/src/client/settings-schema-client.ts +2 -1
  338. package/src/client/states-client.ts +151 -49
  339. package/src/client/storage-client.ts +43 -14
  340. package/src/client/sub-mcp-client.ts +10 -4
  341. package/src/client/system-client.ts +2 -1
  342. package/src/client/templates-client.ts +26 -7
  343. package/src/client/tool-extensions-client.ts +14 -7
  344. package/src/client/tool-meta-client.ts +46 -21
  345. package/src/client/tools-client.ts +13 -8
  346. package/src/client/trigger-links-client.ts +10 -6
  347. package/src/fleet-report.ts +48 -7
  348. package/src/generated/api-routes.ts +327 -0
  349. package/src/generated/openapi-schemas.ts +1508 -0
  350. package/src/generated/served-schemas.ts +7118 -82
  351. package/src/headers.ts +4 -0
  352. package/src/http.ts +4 -3
  353. package/src/index.ts +52 -10
  354. package/src/schemas/api-keys.ts +9 -25
  355. package/src/schemas/auth-routes.ts +27 -28
  356. package/src/schemas/backup.ts +33 -31
  357. package/src/schemas/capabilities.ts +16 -39
  358. package/src/schemas/channels.ts +4 -4
  359. package/src/schemas/config.ts +6 -6
  360. package/src/schemas/connectors.ts +61 -102
  361. package/src/schemas/conversations.ts +43 -133
  362. package/src/schemas/extensions.ts +7 -4
  363. package/src/schemas/fleet.ts +51 -51
  364. package/src/schemas/hooks.ts +18 -37
  365. package/src/schemas/index.ts +1 -1
  366. package/src/schemas/interactions.ts +48 -131
  367. package/src/schemas/login.ts +10 -41
  368. package/src/schemas/manifest-mcp.ts +13 -19
  369. package/src/schemas/marketplace.ts +37 -120
  370. package/src/schemas/members.ts +91 -0
  371. package/src/schemas/notifications.ts +10 -34
  372. package/src/schemas/observability.ts +34 -79
  373. package/src/schemas/policy.ts +5 -12
  374. package/src/schemas/presets.ts +13 -48
  375. package/src/schemas/principals.ts +17 -24
  376. package/src/schemas/profiles.ts +25 -55
  377. package/src/schemas/roles.ts +11 -17
  378. package/src/schemas/schedules.ts +4 -15
  379. package/src/schemas/served.ts +33 -0
  380. package/src/schemas/settings-schema.ts +18 -23
  381. package/src/schemas/setup.ts +4 -10
  382. package/src/schemas/states.ts +88 -139
  383. package/src/schemas/storage.ts +10 -16
  384. package/src/schemas/studio-plugins.ts +8 -19
  385. package/src/schemas/sub-mcp.ts +12 -18
  386. package/src/schemas/system-kinds.ts +12 -29
  387. package/src/schemas/templates.ts +8 -10
  388. package/src/schemas/tool-meta.ts +8 -20
  389. package/src/schemas/tools.ts +22 -45
  390. package/src/schemas/trigger-links.ts +8 -26
  391. package/src/tool-runs.ts +47 -38
  392. package/dist/client/web-entry-gate-client.d.ts +0 -34
  393. package/dist/client/web-entry-gate-client.d.ts.map +0 -1
  394. package/dist/client/web-entry-gate-client.js +0 -25
  395. package/dist/client/web-entry-gate-client.js.map +0 -1
  396. package/dist/schemas/web-entry.d.ts +0 -45
  397. package/dist/schemas/web-entry.d.ts.map +0 -1
  398. package/dist/schemas/web-entry.js +0 -36
  399. package/dist/schemas/web-entry.js.map +0 -1
  400. package/src/client/web-entry-gate-client.ts +0 -45
  401. package/src/schemas/web-entry.ts +0 -46
@@ -1,58 +1,30 @@
1
1
  /** Interaction question, answer and media response schemas. */
2
2
  import { z } from 'zod';
3
- import { pageWindow } from './shared';
3
+ import * as openapi from '../generated/openapi-schemas';
4
+ import * as served from '../generated/served-schemas';
4
5
  // Shapes match the skeleton's interactions SSE contract: the SSE
5
6
  // `interaction.add` frame carries the question and its answer format; the answer
6
7
  // door returns { interaction_id, status }. `answered` is not a wire field — it
7
8
  // is a client-side flag the stream hook flips on an `interaction.answered` event.
8
- export const answerFormat = z.enum(['text', 'confirm', 'select', 'form', 'external']);
9
- /** The kind of a question's display-only media item: a remote/inline image, or a link. */
10
- export const mediaKind = z.enum(['image', 'link']);
9
+ export const answerFormat = openapi.answerFormat;
10
+ /** The kind of a display-only media item: an image, a link, or a document, video or audio file. */
11
+ export const mediaKind = openapi.mediaKind;
11
12
  /**
12
- * One item of a question's display-only media. Applied PER ITEM by the renderer
13
- * (never as a strict array on the frame): the frame's `media` field is a loose
14
- * `z.array(z.unknown())`, and the renderer `safeParse`s each item with this schema
15
- * so one malformed/hostile item is a loud per-item notice, not a whole-frame parse
16
- * failure that would silently vanish an answerable question.
17
- *
18
- * `caption` is `.nullish()` (absent OR `null` both parse to a caption-less item):
19
- * a caption-less item may arrive with the key omitted OR with an explicit `null`, so
20
- * `.optional()` here would false-fail the explicit `null` and render a good image as
21
- * malformed. `url` and `kind` are the only load-bearing fields; the image
22
- * src scheme gate and the link neutralization are enforced by the renderer.
23
- */
24
- export const interactionMediaItem = z.object({
25
- kind: mediaKind,
26
- url: z.string(),
27
- caption: z.string().nullish(),
28
- });
29
- /**
30
- * The kind of a byte-backed inbound attachment carried on a transcript record. A
31
- * fetchable file — `image`/`document`/`audio`/`video` — never a `link`: a labelled
32
- * anchor is question CONTEXT (see {@link mediaKind}), not a participant's sent file.
13
+ * One item of a question's display-only media. The renderer resolves `url` (the image src
14
+ * scheme gate and the link neutralization are enforced there); `caption` and `filename`
15
+ * are `null` when absent.
33
16
  */
34
- export const attachmentMediaKind = z.enum(['image', 'document', 'audio', 'video']);
17
+ export const interactionMediaItem = openapi.mediaItem;
18
+ /** The kind of an inbound attachment carried on a transcript record. */
19
+ export const attachmentMediaKind = openapi.mediaKind;
35
20
  /**
36
21
  * One inbound attachment a participant sent, projected onto a transcript record's
37
- * `inbound_attachments`. Applied PER ITEM by the renderer (the record's array is a
38
- * loose `z.array(z.unknown())`, `safeParse`d per member) so one malformed/hostile
39
- * item is a loud per-item notice, never a whole-record parse failure that would
40
- * vanish the transcript.
41
- *
42
- * `url` is the served-media reference the renderer resolves to the API origin (the
43
- * same served-url discipline the ask-media renderer uses); the image src scheme gate
44
- * and the per-item load-failure notice are enforced there. `caption` and `filename`
45
- * are `.nullish()` (absent OR explicit `null` both parse to absent): the projection
46
- * may omit the key OR emit `null`, so `.optional()` alone would false-fail an explicit
47
- * `null`. `filename` is meaningful only for a `document`; the renderer shows it as the
48
- * download label.
22
+ * `inbound_attachments`. `url` is the served-media reference the renderer resolves to the
23
+ * API origin (the same served-url discipline the ask-media renderer uses); the image src
24
+ * scheme gate and the per-item load-failure notice are enforced there. `filename` is
25
+ * meaningful only for a `document`; the renderer shows it as the download label.
49
26
  */
50
- export const attachmentMediaItem = z.object({
51
- kind: attachmentMediaKind,
52
- url: z.string(),
53
- caption: z.string().nullish(),
54
- filename: z.string().nullish(),
55
- });
27
+ export const attachmentMediaItem = openapi.mediaItem;
56
28
  /**
57
29
  * One per-send choice for a `form` property whose schema is a string (or array of
58
30
  * strings). `value` is what the answer carries; `label` (absent OR null both parse
@@ -60,22 +32,16 @@ export const attachmentMediaItem = z.object({
60
32
  * `enum` this way for one ask without republishing the form. Applied per property by
61
33
  * the form preview (safeParsed), so a malformed entry is a loud notice, never silent.
62
34
  */
63
- export const formOption = z.object({
64
- value: z.string(),
65
- label: z.string().nullish(),
66
- });
35
+ export const formOption = openapi.formOption;
67
36
  /**
68
37
  * Per-send `form` data: `values` prefills top-level properties (keyed by property
69
38
  * name), `options` supplies per-send choice lists (keyed by property name). Both
70
39
  * default to empty. The form preview safeParses this off `format_payload.data`, so a
71
40
  * malformed block is a loud notice rather than a whole-frame parse failure.
72
41
  */
73
- export const formData = z.object({
74
- values: z.record(z.string(), z.unknown()).default({}),
75
- options: z.record(z.string(), z.array(formOption)).default({}),
76
- });
42
+ export const formData = openapi.formData;
77
43
  /** The kind of an ordered display block a page may carry alongside its input fields. */
78
- export const displayBlockKind = z.enum(['heading', 'body', 'image']);
44
+ export const displayBlockKind = openapi.displayBlock.shape.kind;
79
45
  /**
80
46
  * One ordered, display-only block on a form page (never an input): a `heading` or
81
47
  * `body` text block, or an `image`. `text` carries a heading/body's words; `src`/`alt`
@@ -87,15 +53,9 @@ export const displayBlockKind = z.enum(['heading', 'body', 'image']);
87
53
  * whole-page parse failure. Applied per block by the preview (safeParsed via its page),
88
54
  * so a malformed block is a loud notice, never silent.
89
55
  */
90
- export const displayBlock = z.object({
91
- kind: displayBlockKind,
92
- text: z.string().nullish(),
93
- src: z.string().nullish(),
94
- alt: z.string().nullish(),
95
- slot: z.string().nullish(),
96
- });
56
+ export const displayBlock = openapi.displayBlock;
97
57
  /** A page's role: an ordinary `input` page (default) or a terminal `review` summary. */
98
- export const formPageKind = z.enum(['input', 'review']);
58
+ export const formPageKind = openapi.formPage.shape.kind.unwrap();
99
59
  /**
100
60
  * One page of a stepped `form`: a `title` and the ordered top-level property names it
101
61
  * groups. `format_payload.pages` is the ordered list of these; absent = one page. The
@@ -108,14 +68,11 @@ export const formPageKind = z.enum(['input', 'review']);
108
68
  * and carries no new input fields; it defaults to `input`. Both are additive: an older
109
69
  * payload ({title, fields}) parses unchanged.
110
70
  */
111
- export const formPage = z.object({
112
- title: z.string(),
113
- fields: z.array(z.string()),
114
- display: z.array(displayBlock).default([]),
115
- kind: formPageKind.default('input'),
116
- });
71
+ export const formPage = openapi.formPage;
117
72
  /** The `form` pages list (`format_payload.pages`), safeParsed as a whole by the preview. */
118
73
  export const formPages = z.array(formPage);
74
+ // The form reactions and the form update are hand-written: the spec carries them inside an
75
+ // open `format_payload` and an open reaction `update`.
119
76
  /**
120
77
  * When a `form` reacts while it is open (`format_payload.reactions`): the plain,
121
78
  * renderer-readable description of WHEN the form calls its reaction handler. Absent ⇒ a
@@ -134,12 +91,12 @@ export const formReactions = z.object({
134
91
  choices: z.array(z.string()).default([]),
135
92
  });
136
93
  /**
137
- * The form update a reaction door returns (`POST /api/interactions/{id}/react`): the
138
- * same kind of data a form is sent with, applied to the open form. `values` sets field
139
- * values; `options` replaces the per-send choice list of option-bearing fields; `errors`
140
- * shows per-field messages (keyed by field name); `display` fills display slots (keyed by
141
- * slot name) — a computed total among them. Every member defaults to empty, so a reaction
142
- * that touches only one of them returns only that one. The door response is safeParsed, so
94
+ * The form update a reaction door returns (`POST /api/interactions/{id}/react`, its
95
+ * `update`): the same kind of data a form is sent with, applied to the open form. `values`
96
+ * sets field values; `options` replaces the per-send choice list of option-bearing fields;
97
+ * `errors` shows per-field messages (keyed by field name); `display` fills display slots
98
+ * (keyed by slot name) — a computed total among them. Every member defaults to empty, so a
99
+ * reaction that touches only one of them returns only that one. The door response is safeParsed, so
143
100
  * a malformed update surfaces loudly rather than applying a half-understood change.
144
101
  */
145
102
  export const formUpdate = z.object({
@@ -149,79 +106,37 @@ export const formUpdate = z.object({
149
106
  display: z.record(z.string(), z.unknown()).default({}),
150
107
  });
151
108
  /**
152
- * The event a reaction round-trip reports to the door: `kind` is which of the three
153
- * declared events fired, `field` names the changed field for a `field_changed` event, and
154
- * `page` names the advanced-from page (by title) for a `page_advanced` event. A
155
- * `submitted` event carries neither. The body also carries the partial `values` filled so
156
- * far (see {@link interactionsClient}'s `reactInteraction`).
109
+ * The event a reaction round-trip reports to the door (the contract's `FormReactionEvent`
110
+ * document): `kind` is which of the three declared events fired, `field` names the changed
111
+ * field for a `field_changed` event, and `page` names the advanced-from page (by title) for a
112
+ * `page_advanced` event. A `submitted` event carries neither. The body also carries the
113
+ * partial `values` filled so far (see {@link interactionsClient}'s `reactInteraction`).
157
114
  */
158
- export const reactionEventKind = z.enum(['field_changed', 'page_advanced', 'submitted']);
159
- export const reactionEvent = z.object({
160
- kind: reactionEventKind,
161
- field: z.string().optional(),
162
- page: z.string().optional(),
163
- });
164
- export const interaction = z.object({
165
- interaction_id: z.string(),
166
- group_id: z.string(),
167
- question: z.string().default(''),
168
- answer_format: answerFormat,
169
- // Format-specific payload: select options, form JSON schema (with optional per-send
170
- // `data` and `pages`), external url. The wire sends `null` for formats that carry
115
+ export const reactionEvent = served.formReactionEvent;
116
+ /** The reaction door's reply: the interaction id and the form `update` to apply. */
117
+ export const interactionReaction = openapi.interactionReactionResult.extend({ update: formUpdate });
118
+ export const interaction = openapi.interactionFrame.extend({
119
+ // Hand-written: the format-specific payload (select options, form JSON schema with
120
+ // optional per-send `data` and `pages`, external url) is `null` for formats that carry
171
121
  // none (text/confirm); it is normalized to `{}` so consumers always see an object.
172
122
  format_payload: z
173
123
  .record(z.string(), z.unknown())
174
124
  .nullish()
175
125
  .transform((value) => value ?? {}),
176
- created_at: z.string(),
177
- timeout_at: z.string(),
178
- // Whether the answer body is sensitive and never persisted server-side. Rides
179
- // every add frame; an absent value (older frame) normalizes to false.
180
- sensitive: z.boolean().default(false),
181
- // True only for an external question answered by a signed server-to-server
182
- // callback (never by a human); the frame never carries the verifier object.
183
- // Absent/undefined for every other question.
184
- server_verified: z.boolean().optional(),
185
- // Name of the channel plugin the question was also delivered through (e.g.
186
- // "telegram"); absent when the question lives only in this inbox.
187
- channel: z.string().optional(),
188
- // Interaction attribution, each additive and absent when unset. `recipient` is
189
- // the channel delivery address the question went to; `origin` is the run id of
190
- // the background tool run that asked; `audience` is the user_id the question is
191
- // addressed to. Display/binding data only, never an authorization axis; a
192
- // present non-string is malformed.
193
- recipient: z.string().optional(),
194
- origin: z.string().optional(),
195
- audience: z.string().optional(),
196
- // Display-only media shown WITH the question (images and/or links). Absent when
197
- // the question carries none. Deliberately LOOSE (`z.array(z.unknown())`): each
198
- // item is `safeParse`d per item by the renderer against `interactionMediaItem`,
199
- // so one malformed/hostile item can never fail the whole frame parse and hide an
200
- // answerable question. A present non-array value is still malformed.
201
- media: z.array(z.unknown()).optional(),
202
126
  });
203
127
  /** The answer door's response — the blocked caller was woken. */
204
- export const interactionAnswered = z.object({
205
- interaction_id: z.string(),
206
- status: z.string(),
207
- });
128
+ export const interactionAnswered = openapi.interactionActionResult;
208
129
  /**
209
130
  * The cancel door's response — a pending ask was WITHDRAWN without an answer (the
210
131
  * asking flow does not resume). `status` is `"cancelled"`; the shape mirrors the
211
132
  * answer door's terminal reply, but the door is distinct so it carries its own
212
133
  * schema.
213
134
  */
214
- export const interactionCancelled = z.object({
215
- interaction_id: z.string(),
216
- status: z.string(),
217
- });
135
+ export const interactionCancelled = openapi.interactionActionResult;
218
136
  /**
219
137
  * A page of pending interactions from `GET /api/interactions?page=&pageSize=`. Each
220
138
  * item is the same record the stream's `interaction.add` frame carries. The pending
221
139
  * set is the paged base the tail-only stream applies live deltas over.
222
140
  */
223
- export const interactionsPage = z.object({
224
- items: z.array(interaction),
225
- ...pageWindow,
226
- });
141
+ export const interactionsPage = openapi.interactionWindow.extend({ items: z.array(interaction) });
227
142
  //# sourceMappingURL=interactions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"interactions.js","sourceRoot":"","sources":["../../src/schemas/interactions.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,iEAAiE;AACjE,iFAAiF;AACjF,+EAA+E;AAC/E,kFAAkF;AAElF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AAGtF,0FAA0F;AAC1F,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAGnD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,IAAI,EAAE,SAAS;IACf,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;CAC9B,CAAC,CAAC;AAGH;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gB,GAAG,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC"}
@@ -1,77 +1,76 @@
1
1
  /** Public login-method aggregator and login-result schemas. */
2
- import { z } from 'zod';
2
+ import type { z } from 'zod';
3
3
  /**
4
4
  * One field of a `form` login method. `secret` fields render as password
5
5
  * inputs; `autocomplete` passes through to the input (e.g. "email",
6
6
  * "current-password", "new-password").
7
7
  */
8
8
  export declare const loginFormField: z.ZodObject<{
9
- name: z.ZodString;
9
+ autocomplete: z.ZodDefault<z.ZodNullable<z.ZodString>>;
10
10
  label: z.ZodString;
11
- secret: z.ZodBoolean;
12
- autocomplete: z.ZodOptional<z.ZodString>;
13
- }, z.core.$strip>;
11
+ name: z.ZodString;
12
+ secret: z.ZodDefault<z.ZodBoolean>;
13
+ }, z.core.$strict>;
14
14
  /**
15
15
  * The two — and only two — login-method shapes. Discriminated on `shape`; an
16
16
  * unknown shape fails validation loudly (contract drift, not a soft skip).
17
- * Optional fields are `.optional()` (absent), never `.nullable()`: the server
18
- * serializes with `exclude_none`, so an absent field is OMITTED, never `null`.
19
17
  */
20
18
  export declare const loginMethod: z.ZodDiscriminatedUnion<[z.ZodObject<{
21
- shape: z.ZodLiteral<"form">;
19
+ fields: z.ZodArray<z.ZodObject<{
20
+ autocomplete: z.ZodDefault<z.ZodNullable<z.ZodString>>;
21
+ label: z.ZodString;
22
+ name: z.ZodString;
23
+ secret: z.ZodDefault<z.ZodBoolean>;
24
+ }, z.core.$strict>>;
22
25
  id: z.ZodString;
23
- title: z.ZodString;
24
26
  purpose: z.ZodDefault<z.ZodEnum<{
25
27
  login: "login";
26
28
  invite: "invite";
27
29
  }>>;
28
- fields: z.ZodArray<z.ZodObject<{
29
- name: z.ZodString;
30
- label: z.ZodString;
31
- secret: z.ZodBoolean;
32
- autocomplete: z.ZodOptional<z.ZodString>;
33
- }, z.core.$strip>>;
30
+ shape: z.ZodDefault<z.ZodLiteral<"form">>;
34
31
  submit_path: z.ZodString;
35
- }, z.core.$strip>, z.ZodObject<{
36
- shape: z.ZodLiteral<"button">;
32
+ title: z.ZodString;
33
+ }, z.core.$strict>, z.ZodObject<{
34
+ href: z.ZodString;
35
+ icon: z.ZodDefault<z.ZodNullable<z.ZodString>>;
37
36
  id: z.ZodString;
38
37
  label: z.ZodString;
39
- icon: z.ZodOptional<z.ZodString>;
40
- href: z.ZodString;
41
- }, z.core.$strip>], "shape">;
38
+ shape: z.ZodDefault<z.ZodLiteral<"button">>;
39
+ }, z.core.$strict>], "shape">;
42
40
  /**
43
41
  * `GET /api/login/methods` (PUBLIC). `needs_setup: true` ⇒ no principal exists
44
42
  * yet, so the deployment must be initialized through the setup door before anyone
45
43
  * can sign in. `setup_login` names the login-credential kinds the setup door can
46
- * attach the owner's login with; it is `null`/absent when no login-attaching
47
- * accounts provider is configured (a keys-only deployment). Non-strict — the
48
- * skeleton may grow additive fields.
44
+ * attach the owner's login with; it is `null` when no login-attaching accounts
45
+ * provider is configured (a keys-only deployment). `claim_fragment_key` names the
46
+ * URL-fragment key a claim link carries its token under.
49
47
  */
50
48
  export declare const loginMethods: z.ZodObject<{
49
+ claim_fragment_key: z.ZodString;
51
50
  methods: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
52
- shape: z.ZodLiteral<"form">;
51
+ fields: z.ZodArray<z.ZodObject<{
52
+ autocomplete: z.ZodDefault<z.ZodNullable<z.ZodString>>;
53
+ label: z.ZodString;
54
+ name: z.ZodString;
55
+ secret: z.ZodDefault<z.ZodBoolean>;
56
+ }, z.core.$strict>>;
53
57
  id: z.ZodString;
54
- title: z.ZodString;
55
58
  purpose: z.ZodDefault<z.ZodEnum<{
56
59
  login: "login";
57
60
  invite: "invite";
58
61
  }>>;
59
- fields: z.ZodArray<z.ZodObject<{
60
- name: z.ZodString;
61
- label: z.ZodString;
62
- secret: z.ZodBoolean;
63
- autocomplete: z.ZodOptional<z.ZodString>;
64
- }, z.core.$strip>>;
62
+ shape: z.ZodDefault<z.ZodLiteral<"form">>;
65
63
  submit_path: z.ZodString;
66
- }, z.core.$strip>, z.ZodObject<{
67
- shape: z.ZodLiteral<"button">;
64
+ title: z.ZodString;
65
+ }, z.core.$strict>, z.ZodObject<{
66
+ href: z.ZodString;
67
+ icon: z.ZodDefault<z.ZodNullable<z.ZodString>>;
68
68
  id: z.ZodString;
69
69
  label: z.ZodString;
70
- icon: z.ZodOptional<z.ZodString>;
71
- href: z.ZodString;
72
- }, z.core.$strip>], "shape">>;
70
+ shape: z.ZodDefault<z.ZodLiteral<"button">>;
71
+ }, z.core.$strict>], "shape">>;
73
72
  needs_setup: z.ZodBoolean;
74
- setup_login: z.ZodOptional<z.ZodNullable<z.ZodObject<{
73
+ setup_login: z.ZodDefault<z.ZodNullable<z.ZodObject<{
75
74
  kinds: z.ZodArray<z.ZodEnum<{
76
75
  invite: "invite";
77
76
  password: "password";
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/schemas/login.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;iBAKzB,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;4BAgBtB,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOvB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,WAAW;;;iBAGtB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACtD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/schemas/login.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAI7B;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;kBAAoB,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;6BAAoD,CAAC;AAE7E;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA8B,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,WAAW;;;iBAA8B,CAAC;AAEvD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACtD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
@@ -1,61 +1,27 @@
1
- /** Public login-method aggregator and login-result schemas. */
2
- import { z } from 'zod';
1
+ import * as openapi from '../generated/openapi-schemas';
3
2
  /**
4
3
  * One field of a `form` login method. `secret` fields render as password
5
4
  * inputs; `autocomplete` passes through to the input (e.g. "email",
6
5
  * "current-password", "new-password").
7
6
  */
8
- export const loginFormField = z.object({
9
- name: z.string().min(1),
10
- label: z.string().min(1),
11
- secret: z.boolean(),
12
- autocomplete: z.string().optional(),
13
- });
7
+ export const loginFormField = openapi.formField;
14
8
  /**
15
9
  * The two — and only two — login-method shapes. Discriminated on `shape`; an
16
10
  * unknown shape fails validation loudly (contract drift, not a soft skip).
17
- * Optional fields are `.optional()` (absent), never `.nullable()`: the server
18
- * serializes with `exclude_none`, so an absent field is OMITTED, never `null`.
19
11
  */
20
- export const loginMethod = z.discriminatedUnion('shape', [
21
- z.object({
22
- shape: z.literal('form'),
23
- id: z.string().min(1),
24
- title: z.string().min(1),
25
- purpose: z.enum(['login', 'invite']).default('login'),
26
- fields: z.array(loginFormField).min(1),
27
- submit_path: z.string().min(1),
28
- }),
29
- z.object({
30
- shape: z.literal('button'),
31
- id: z.string().min(1),
32
- label: z.string().min(1),
33
- icon: z.string().optional(),
34
- href: z.string().min(1),
35
- }),
36
- ]);
12
+ export const loginMethod = openapi.loginMethodsListing.shape.methods.element;
37
13
  /**
38
14
  * `GET /api/login/methods` (PUBLIC). `needs_setup: true` ⇒ no principal exists
39
15
  * yet, so the deployment must be initialized through the setup door before anyone
40
16
  * can sign in. `setup_login` names the login-credential kinds the setup door can
41
- * attach the owner's login with; it is `null`/absent when no login-attaching
42
- * accounts provider is configured (a keys-only deployment). Non-strict — the
43
- * skeleton may grow additive fields.
17
+ * attach the owner's login with; it is `null` when no login-attaching accounts
18
+ * provider is configured (a keys-only deployment). `claim_fragment_key` names the
19
+ * URL-fragment key a claim link carries its token under.
44
20
  */
45
- export const loginMethods = z.object({
46
- methods: z.array(loginMethod),
47
- needs_setup: z.boolean(),
48
- setup_login: z
49
- .object({ kinds: z.array(z.enum(['password', 'invite'])) })
50
- .nullable()
51
- .optional(),
52
- });
21
+ export const loginMethods = openapi.loginMethodsListing;
53
22
  /**
54
23
  * A successful login/exchange: the minted session token (opaque, `tai-sess-`
55
24
  * prefixed — the client treats it as an opaque string) + its user.
56
25
  */
57
- export const loginResult = z.object({
58
- token: z.string().min(1),
59
- user_id: z.string().min(1),
60
- });
26
+ export const loginResult = openapi.claimExchangeResult;
61
27
  //# sourceMappingURL=login.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/schemas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M,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC"}
@@ -12,7 +12,8 @@ export declare const connectorRef: z.ZodObject<{
12
12
  }, z.core.$strip>;
13
13
  export type ConnectorRef = z.infer<typeof connectorRef>;
14
14
  /**
15
- * One entry of the live manifest's MCP section. Only the `managed` provenance
15
+ * One entry of the live manifest's MCP section, hand-typed: the spec publishes an entry as
16
+ * an open object. Only the `managed` provenance
16
17
  * marker is typed — the connect/disconnect flows write it server-side to point a
17
18
  * connector-owned entry back at its connection, and the editor renders such
18
19
  * entries read-only. `.nullish()` because a hand-authored entry carries `null`
@@ -29,6 +30,7 @@ export declare const manifestMcpEntry: z.ZodObject<{
29
30
  }, z.core.$loose>;
30
31
  export type ManifestMcpEntry = z.infer<typeof manifestMcpEntry>;
31
32
  export declare const manifestView: z.ZodObject<{
33
+ user_tools: z.ZodArray<z.ZodString>;
32
34
  mcp: z.ZodArray<z.ZodObject<{
33
35
  managed: z.ZodOptional<z.ZodNullable<z.ZodObject<{
34
36
  connection_id: z.ZodString;
@@ -36,7 +38,6 @@ export declare const manifestView: z.ZodObject<{
36
38
  sub_service: z.ZodString;
37
39
  }, z.core.$strip>>>;
38
40
  }, z.core.$loose>>;
39
- user_tools: z.ZodArray<z.ZodString>;
40
41
  }, z.core.$strip>;
41
42
  /**
42
43
  * One `!ENV ${VAR[:default]}` marker the manifest's MCP section carries
@@ -48,76 +49,101 @@ export declare const manifestView: z.ZodObject<{
48
49
  * a false red. The checklist derives from THIS alone — no env value is ever fetched.
49
50
  */
50
51
  export declare const mcpEnvRef: z.ZodObject<{
51
- var: z.ZodString;
52
- pointer: z.ZodString;
53
52
  has_default: z.ZodBoolean;
53
+ pointer: z.ZodString;
54
54
  set: z.ZodBoolean;
55
+ var: z.ZodString;
55
56
  }, z.core.$strip>;
56
57
  export type McpEnvRef = z.infer<typeof mcpEnvRef>;
57
58
  export declare const mcpEnvRefs: z.ZodArray<z.ZodObject<{
58
- var: z.ZodString;
59
- pointer: z.ZodString;
60
59
  has_default: z.ZodBoolean;
60
+ pointer: z.ZodString;
61
61
  set: z.ZodBoolean;
62
+ var: z.ZodString;
62
63
  }, z.core.$strip>>;
63
64
  export type McpEnvRefs = z.infer<typeof mcpEnvRefs>;
64
65
  /**
65
66
  * The apply result every config-writer mutation returns (`POST /api/mcp-config`,
66
67
  * `POST /api/config/env`): the serving worker's local reload result (`status` +
67
- * `env_keys`) plus the mode-wrapped fleet fan-out of the reload it broadcast. The
68
- * `fanout` is parsed EXPLICITLY so the shared fleet-report handler can surface a
69
- * failed propagation — zod's unknown-key stripping would otherwise hide it. A drift
70
- * throws `ApiSchemaError`.
68
+ * `env_keys`), the mode-wrapped fleet fan-out of the reload it broadcast, `recycle` — the
69
+ * fleet recycle roll an env change carrying a recycle-class key ran (`null` when it carried
70
+ * none) — and `awaiting_respawn`, the workers (name + keys) still awaiting a respawn after
71
+ * it, empty when its roll converged. The `fanout` is hand-typed (the spec publishes it as
72
+ * one object with optional fields) so the shared fleet-report handler can surface a failed
73
+ * propagation. A drift throws `ApiSchemaError`.
71
74
  */
72
75
  export declare const reloadConfigResult: z.ZodObject<{
73
- status: z.ZodString;
76
+ awaiting_respawn: z.ZodDefault<z.ZodArray<z.ZodObject<{
77
+ keys: z.ZodArray<z.ZodString>;
78
+ name: z.ZodString;
79
+ }, z.core.$strip>>>;
74
80
  env_keys: z.ZodNumber;
81
+ recycle: z.ZodDefault<z.ZodNullable<z.ZodObject<{
82
+ fresh: z.ZodArray<z.ZodObject<{
83
+ generation: z.ZodNumber;
84
+ kind: z.ZodString;
85
+ name: z.ZodString;
86
+ }, z.core.$strip>>;
87
+ recycle: z.ZodArray<z.ZodObject<{
88
+ detail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
89
+ generation_before: z.ZodNumber;
90
+ kind: z.ZodString;
91
+ name: z.ZodString;
92
+ status: z.ZodString;
93
+ }, z.core.$strip>>;
94
+ recycle_stopped: z.ZodDefault<z.ZodNullable<z.ZodObject<{
95
+ detail: z.ZodString;
96
+ kind: z.ZodString;
97
+ name: z.ZodNullable<z.ZodString>;
98
+ }, z.core.$strip>>>;
99
+ }, z.core.$strip>>>;
100
+ status: z.ZodString;
75
101
  fanout: z.ZodDiscriminatedUnion<[z.ZodObject<{
76
102
  mode: z.ZodLiteral<"local-only">;
77
103
  note: z.ZodString;
78
104
  }, z.core.$strip>, z.ZodObject<{
105
+ error: z.ZodDefault<z.ZodNullable<z.ZodString>>;
106
+ local_only: z.ZodDefault<z.ZodBoolean>;
79
107
  op: z.ZodString;
80
- reachable: z.ZodBoolean;
81
- local_only: z.ZodBoolean;
82
- results: z.ZodArray<z.ZodObject<{
108
+ reachable: z.ZodDefault<z.ZodBoolean>;
109
+ results: z.ZodDefault<z.ZodArray<z.ZodObject<{
110
+ detail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
111
+ error: z.ZodDefault<z.ZodNullable<z.ZodString>>;
83
112
  name: z.ZodString;
84
113
  outcome: z.ZodEnum<{
85
- failed: "failed";
86
114
  applied: "applied";
87
- resyncing: "resyncing";
88
- recycling: "recycling";
89
- stale: "stale";
115
+ failed: "failed";
90
116
  missing: "missing";
91
117
  departed: "departed";
92
118
  timed_out: "timed_out";
119
+ resyncing: "resyncing";
120
+ recycling: "recycling";
121
+ stale: "stale";
93
122
  }>;
94
- payload: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
95
- error: z.ZodNullable<z.ZodString>;
96
- detail: z.ZodNullable<z.ZodString>;
97
- }, z.core.$strip>>;
98
- error: z.ZodNullable<z.ZodString>;
123
+ payload: z.ZodDefault<z.ZodNullable<z.ZodUnknown>>;
124
+ }, z.core.$strip>>>;
99
125
  mode: z.ZodLiteral<"fleet">;
100
126
  }, z.core.$strip>, z.ZodObject<{
127
+ error: z.ZodDefault<z.ZodNullable<z.ZodString>>;
128
+ local_only: z.ZodDefault<z.ZodBoolean>;
101
129
  op: z.ZodString;
102
- reachable: z.ZodBoolean;
103
- local_only: z.ZodBoolean;
104
- results: z.ZodArray<z.ZodObject<{
130
+ reachable: z.ZodDefault<z.ZodBoolean>;
131
+ results: z.ZodDefault<z.ZodArray<z.ZodObject<{
132
+ detail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
133
+ error: z.ZodDefault<z.ZodNullable<z.ZodString>>;
105
134
  name: z.ZodString;
106
135
  outcome: z.ZodEnum<{
107
- failed: "failed";
108
136
  applied: "applied";
109
- resyncing: "resyncing";
110
- recycling: "recycling";
111
- stale: "stale";
137
+ failed: "failed";
112
138
  missing: "missing";
113
139
  departed: "departed";
114
140
  timed_out: "timed_out";
141
+ resyncing: "resyncing";
142
+ recycling: "recycling";
143
+ stale: "stale";
115
144
  }>;
116
- payload: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
117
- error: z.ZodNullable<z.ZodString>;
118
- detail: z.ZodNullable<z.ZodString>;
119
- }, z.core.$strip>>;
120
- error: z.ZodNullable<z.ZodString>;
145
+ payload: z.ZodDefault<z.ZodNullable<z.ZodUnknown>>;
146
+ }, z.core.$strip>>>;
121
147
  mode: z.ZodLiteral<"unreachable">;
122
148
  }, z.core.$strip>], "mode">;
123
149
  }, z.core.$strip>;