@vertesia/common 1.5.0-dev.20260807.073259Z → 1.5.0-dev.20260901.005903Z

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 (451) hide show
  1. package/lib/access-control.d.ts +0 -14
  2. package/lib/access-control.d.ts.map +1 -1
  3. package/lib/access-control.js +0 -23
  4. package/lib/access-control.js.map +1 -1
  5. package/lib/account-values.d.ts +0 -10
  6. package/lib/account-values.d.ts.map +1 -1
  7. package/lib/account-values.js +0 -44
  8. package/lib/account-values.js.map +1 -1
  9. package/lib/api-contract/components.generated.json +40405 -0
  10. package/lib/api-contract/index.d.ts +186 -0
  11. package/lib/api-contract/index.d.ts.map +1 -0
  12. package/lib/api-contract/index.js +554 -0
  13. package/lib/api-contract/index.js.map +1 -0
  14. package/lib/api-schemas/agent-communication.d.ts +199 -0
  15. package/lib/api-schemas/agent-communication.d.ts.map +1 -0
  16. package/lib/api-schemas/agent-communication.js +150 -0
  17. package/lib/api-schemas/agent-communication.js.map +1 -0
  18. package/lib/api-schemas/agent-runs.d.ts +593 -0
  19. package/lib/api-schemas/agent-runs.d.ts.map +1 -1
  20. package/lib/api-schemas/agent-runs.js +44 -2
  21. package/lib/api-schemas/agent-runs.js.map +1 -1
  22. package/lib/api-schemas/app-lifecycle.d.ts +19 -0
  23. package/lib/api-schemas/app-lifecycle.d.ts.map +1 -1
  24. package/lib/api-schemas/app-lifecycle.js +34 -4
  25. package/lib/api-schemas/app-lifecycle.js.map +1 -1
  26. package/lib/api-schemas/app-runtime.d.ts +9871 -9257
  27. package/lib/api-schemas/app-runtime.d.ts.map +1 -1
  28. package/lib/api-schemas/app-runtime.js +7 -0
  29. package/lib/api-schemas/app-runtime.js.map +1 -1
  30. package/lib/api-schemas/apps.d.ts +1 -0
  31. package/lib/api-schemas/apps.d.ts.map +1 -1
  32. package/lib/api-schemas/apps.js +4 -3
  33. package/lib/api-schemas/apps.js.map +1 -1
  34. package/lib/api-schemas/content-query.d.ts +39 -0
  35. package/lib/api-schemas/content-query.d.ts.map +1 -0
  36. package/lib/api-schemas/content-query.js +30 -0
  37. package/lib/api-schemas/content-query.js.map +1 -0
  38. package/lib/api-schemas/content.d.ts +835 -29
  39. package/lib/api-schemas/content.d.ts.map +1 -1
  40. package/lib/api-schemas/content.js +82 -15
  41. package/lib/api-schemas/content.js.map +1 -1
  42. package/lib/api-schemas/dashboard.d.ts +4 -0
  43. package/lib/api-schemas/dashboard.d.ts.map +1 -1
  44. package/lib/api-schemas/dashboard.js +3 -0
  45. package/lib/api-schemas/dashboard.js.map +1 -1
  46. package/lib/api-schemas/document-processing.d.ts +333 -0
  47. package/lib/api-schemas/document-processing.d.ts.map +1 -1
  48. package/lib/api-schemas/events.d.ts +1007 -4
  49. package/lib/api-schemas/events.d.ts.map +1 -1
  50. package/lib/api-schemas/events.js +4 -1
  51. package/lib/api-schemas/events.js.map +1 -1
  52. package/lib/api-schemas/files.d.ts +17 -0
  53. package/lib/api-schemas/files.d.ts.map +1 -1
  54. package/lib/api-schemas/files.js +23 -0
  55. package/lib/api-schemas/files.js.map +1 -1
  56. package/lib/api-schemas/group.d.ts +7 -0
  57. package/lib/api-schemas/group.d.ts.map +1 -1
  58. package/lib/api-schemas/group.js +9 -0
  59. package/lib/api-schemas/group.js.map +1 -1
  60. package/lib/api-schemas/index.d.ts +4 -0
  61. package/lib/api-schemas/index.d.ts.map +1 -1
  62. package/lib/api-schemas/index.js +4 -0
  63. package/lib/api-schemas/index.js.map +1 -1
  64. package/lib/api-schemas/integrations.d.ts +19 -5
  65. package/lib/api-schemas/integrations.d.ts.map +1 -1
  66. package/lib/api-schemas/integrations.js +25 -2
  67. package/lib/api-schemas/integrations.js.map +1 -1
  68. package/lib/api-schemas/interaction.d.ts +8399 -1076
  69. package/lib/api-schemas/interaction.d.ts.map +1 -1
  70. package/lib/api-schemas/interaction.js +161 -9
  71. package/lib/api-schemas/interaction.js.map +1 -1
  72. package/lib/api-schemas/oauth-server.d.ts +131 -3
  73. package/lib/api-schemas/oauth-server.d.ts.map +1 -1
  74. package/lib/api-schemas/oauth-server.js +137 -3
  75. package/lib/api-schemas/oauth-server.js.map +1 -1
  76. package/lib/api-schemas/process.d.ts +1295 -0
  77. package/lib/api-schemas/process.d.ts.map +1 -1
  78. package/lib/api-schemas/process.js +318 -2
  79. package/lib/api-schemas/process.js.map +1 -1
  80. package/lib/api-schemas/project-configuration.d.ts +1118 -1
  81. package/lib/api-schemas/project-configuration.d.ts.map +1 -1
  82. package/lib/api-schemas/project-configuration.js +6 -2
  83. package/lib/api-schemas/project-configuration.js.map +1 -1
  84. package/lib/api-schemas/project.d.ts +1680 -6
  85. package/lib/api-schemas/project.d.ts.map +1 -1
  86. package/lib/api-schemas/registry.d.ts +87529 -69142
  87. package/lib/api-schemas/registry.d.ts.map +1 -1
  88. package/lib/api-schemas/registry.js +234 -413
  89. package/lib/api-schemas/registry.js.map +1 -1
  90. package/lib/api-schemas/schema-primitives.d.ts +4 -0
  91. package/lib/api-schemas/schema-primitives.d.ts.map +1 -1
  92. package/lib/api-schemas/schema-primitives.js +10 -0
  93. package/lib/api-schemas/schema-primitives.js.map +1 -1
  94. package/lib/api-schemas/store.d.ts +5596 -37
  95. package/lib/api-schemas/store.d.ts.map +1 -1
  96. package/lib/api-schemas/store.js +53 -8
  97. package/lib/api-schemas/store.js.map +1 -1
  98. package/lib/api-schemas/tools.d.ts +115 -0
  99. package/lib/api-schemas/tools.d.ts.map +1 -1
  100. package/lib/api-schemas/tools.js +55 -0
  101. package/lib/api-schemas/tools.js.map +1 -1
  102. package/lib/api-schemas/view-execution.d.ts +330 -854
  103. package/lib/api-schemas/view-execution.d.ts.map +1 -1
  104. package/lib/api-schemas/view-execution.js +26 -2
  105. package/lib/api-schemas/view-execution.js.map +1 -1
  106. package/lib/api-schemas/views.d.ts +452 -2562
  107. package/lib/api-schemas/views.d.ts.map +1 -1
  108. package/lib/api-schemas/views.js +119 -3
  109. package/lib/api-schemas/views.js.map +1 -1
  110. package/lib/api-schemas/workflow-runs.d.ts +344 -5
  111. package/lib/api-schemas/workflow-runs.d.ts.map +1 -1
  112. package/lib/api-schemas/workflow-runs.js +9 -7
  113. package/lib/api-schemas/workflow-runs.js.map +1 -1
  114. package/lib/apps.d.ts +8 -145
  115. package/lib/apps.d.ts.map +1 -1
  116. package/lib/apps.js +1 -54
  117. package/lib/apps.js.map +1 -1
  118. package/lib/ask-user.d.ts +2 -1
  119. package/lib/ask-user.d.ts.map +1 -1
  120. package/lib/audit-trail.d.ts +2 -2
  121. package/lib/audit-trail.d.ts.map +1 -1
  122. package/lib/audit-trail.js +2 -2
  123. package/lib/audit-trail.js.map +1 -1
  124. package/lib/browser-credentials.d.ts +2 -7
  125. package/lib/browser-credentials.d.ts.map +1 -1
  126. package/lib/common.d.ts +4 -1
  127. package/lib/common.d.ts.map +1 -1
  128. package/lib/content-query.d.ts +5 -0
  129. package/lib/content-query.d.ts.map +1 -0
  130. package/lib/content-query.js +2 -0
  131. package/lib/content-query.js.map +1 -0
  132. package/lib/data-platform.d.ts +4 -46
  133. package/lib/data-platform.d.ts.map +1 -1
  134. package/lib/data-platform.js.map +1 -1
  135. package/lib/email.d.ts +12 -18
  136. package/lib/email.d.ts.map +1 -1
  137. package/lib/email.js.map +1 -1
  138. package/lib/environment.d.ts +0 -10
  139. package/lib/environment.d.ts.map +1 -1
  140. package/lib/environment.js +1 -12
  141. package/lib/environment.js.map +1 -1
  142. package/lib/facets.d.ts +0 -4
  143. package/lib/facets.d.ts.map +1 -1
  144. package/lib/group.d.ts +2 -12
  145. package/lib/group.d.ts.map +1 -1
  146. package/lib/group.js.map +1 -1
  147. package/lib/index.d.ts +3 -10
  148. package/lib/index.d.ts.map +1 -1
  149. package/lib/index.js +2 -10
  150. package/lib/index.js.map +1 -1
  151. package/lib/integrations.d.ts +1 -27
  152. package/lib/integrations.d.ts.map +1 -1
  153. package/lib/integrations.js +0 -6
  154. package/lib/integrations.js.map +1 -1
  155. package/lib/interaction.d.ts +10 -222
  156. package/lib/interaction.d.ts.map +1 -1
  157. package/lib/interaction.js +0 -31
  158. package/lib/interaction.js.map +1 -1
  159. package/lib/meters.d.ts +5 -10
  160. package/lib/meters.d.ts.map +1 -1
  161. package/lib/meters.js +1 -9
  162. package/lib/meters.js.map +1 -1
  163. package/lib/oauth-scopes.d.ts +2 -16
  164. package/lib/oauth-scopes.d.ts.map +1 -1
  165. package/lib/oauth-scopes.js +9 -49
  166. package/lib/oauth-scopes.js.map +1 -1
  167. package/lib/oauth-server.d.ts +16 -195
  168. package/lib/oauth-server.d.ts.map +1 -1
  169. package/lib/payload.d.ts +2 -5
  170. package/lib/payload.d.ts.map +1 -1
  171. package/lib/pending-asks.d.ts +9 -41
  172. package/lib/pending-asks.d.ts.map +1 -1
  173. package/lib/platform-event.d.ts +4 -142
  174. package/lib/platform-event.d.ts.map +1 -1
  175. package/lib/platform-event.js.map +1 -1
  176. package/lib/project.d.ts +7 -46
  177. package/lib/project.d.ts.map +1 -1
  178. package/lib/project.js +2 -132
  179. package/lib/project.js.map +1 -1
  180. package/lib/prompt.d.ts +4 -7
  181. package/lib/prompt.d.ts.map +1 -1
  182. package/lib/prompt.js.map +1 -1
  183. package/lib/query.d.ts +0 -8
  184. package/lib/query.d.ts.map +1 -1
  185. package/lib/rate-limiter.d.ts +4 -3
  186. package/lib/rate-limiter.d.ts.map +1 -1
  187. package/lib/runs.d.ts +5 -1
  188. package/lib/runs.d.ts.map +1 -1
  189. package/lib/schema-for-extraction.d.ts +0 -1
  190. package/lib/schema-for-extraction.d.ts.map +1 -1
  191. package/lib/schema-for-extraction.js +1 -1
  192. package/lib/schema-for-extraction.js.map +1 -1
  193. package/lib/secrets.d.ts +2 -1
  194. package/lib/secrets.d.ts.map +1 -1
  195. package/lib/skill.d.ts +0 -13
  196. package/lib/skill.d.ts.map +1 -1
  197. package/lib/store/activity-catalog.d.ts +2 -0
  198. package/lib/store/activity-catalog.d.ts.map +1 -1
  199. package/lib/store/agent-approval.d.ts +0 -1
  200. package/lib/store/agent-approval.d.ts.map +1 -1
  201. package/lib/store/agent-approval.js +0 -3
  202. package/lib/store/agent-approval.js.map +1 -1
  203. package/lib/store/agent-run.d.ts +32 -69
  204. package/lib/store/agent-run.d.ts.map +1 -1
  205. package/lib/store/collections.d.ts +2 -6
  206. package/lib/store/collections.d.ts.map +1 -1
  207. package/lib/store/collections.js.map +1 -1
  208. package/lib/store/conversation-state.d.ts +11 -12
  209. package/lib/store/conversation-state.d.ts.map +1 -1
  210. package/lib/store/conversation-state.js +0 -18
  211. package/lib/store/conversation-state.js.map +1 -1
  212. package/lib/store/doc-analyzer.d.ts +0 -22
  213. package/lib/store/doc-analyzer.d.ts.map +1 -1
  214. package/lib/store/dsl-workflow.d.ts +22 -5
  215. package/lib/store/dsl-workflow.d.ts.map +1 -1
  216. package/lib/store/dsl-workflow.js.map +1 -1
  217. package/lib/store/grounded-extraction.d.ts +0 -14
  218. package/lib/store/grounded-extraction.d.ts.map +1 -1
  219. package/lib/store/grounded-extraction.js +1 -7
  220. package/lib/store/grounded-extraction.js.map +1 -1
  221. package/lib/store/index.d.ts +0 -5
  222. package/lib/store/index.d.ts.map +1 -1
  223. package/lib/store/index.js +0 -6
  224. package/lib/store/index.js.map +1 -1
  225. package/lib/store/intake-policy-schema.generated.d.ts.map +1 -1
  226. package/lib/store/intake-policy-schema.generated.js +279 -1
  227. package/lib/store/intake-policy-schema.generated.js.map +1 -1
  228. package/lib/store/process.d.ts +43 -1
  229. package/lib/store/process.d.ts.map +1 -1
  230. package/lib/store/process.js.map +1 -1
  231. package/lib/store/rendering.d.ts +3 -5
  232. package/lib/store/rendering.d.ts.map +1 -1
  233. package/lib/store/rendering.js +0 -4
  234. package/lib/store/rendering.js.map +1 -1
  235. package/lib/store/schedule.d.ts +0 -16
  236. package/lib/store/schedule.d.ts.map +1 -1
  237. package/lib/store/schedule.js.map +1 -1
  238. package/lib/store/signals.d.ts +12 -0
  239. package/lib/store/signals.d.ts.map +1 -1
  240. package/lib/store/store.d.ts +80 -94
  241. package/lib/store/store.d.ts.map +1 -1
  242. package/lib/store/store.js +5 -25
  243. package/lib/store/store.js.map +1 -1
  244. package/lib/store/workflow.d.ts +35 -86
  245. package/lib/store/workflow.d.ts.map +1 -1
  246. package/lib/store/workflow.js +0 -47
  247. package/lib/store/workflow.js.map +1 -1
  248. package/lib/sts-errors.d.ts +0 -1
  249. package/lib/sts-errors.d.ts.map +1 -1
  250. package/lib/sts-token-types.d.ts +2 -8
  251. package/lib/sts-token-types.d.ts.map +1 -1
  252. package/lib/sts-token-types.js +1 -19
  253. package/lib/sts-token-types.js.map +1 -1
  254. package/lib/tools.d.ts +6 -1
  255. package/lib/tools.d.ts.map +1 -1
  256. package/lib/transient-tokens.d.ts +0 -2
  257. package/lib/transient-tokens.d.ts.map +1 -1
  258. package/lib/user.d.ts +0 -17
  259. package/lib/user.d.ts.map +1 -1
  260. package/lib/user.js.map +1 -1
  261. package/lib/utils/schemas.d.ts +2 -24
  262. package/lib/utils/schemas.d.ts.map +1 -1
  263. package/lib/utils/schemas.js +0 -151
  264. package/lib/utils/schemas.js.map +1 -1
  265. package/lib/vertesia-common.js +3 -4
  266. package/lib/vertesia-common.js.map +1 -1
  267. package/lib/views.d.ts +23 -27
  268. package/lib/views.d.ts.map +1 -1
  269. package/lib/views.js +5 -26
  270. package/lib/views.js.map +1 -1
  271. package/lib/workflow-analytics.d.ts +12 -34
  272. package/lib/workflow-analytics.d.ts.map +1 -1
  273. package/package.json +12 -6
  274. package/src/access-control.ts +0 -26
  275. package/src/account-values.ts +0 -49
  276. package/src/agent-resources.test.ts +1 -12
  277. package/src/api-contract/components.contract.test.ts +99 -0
  278. package/src/api-contract/components.generated.json +40405 -0
  279. package/src/api-contract/index.ts +664 -0
  280. package/src/api-schemas/agent-communication.contract.test.ts +90 -0
  281. package/src/api-schemas/agent-communication.ts +169 -0
  282. package/src/api-schemas/agent-runs.ts +46 -1
  283. package/src/api-schemas/api-discriminators.test.ts +101 -0
  284. package/src/api-schemas/app-lifecycle.ts +39 -4
  285. package/src/api-schemas/app-runtime.ts +8 -0
  286. package/src/api-schemas/apps.ts +4 -3
  287. package/src/api-schemas/content-query.ts +31 -0
  288. package/src/api-schemas/content.ts +88 -15
  289. package/src/api-schemas/dashboard.contract.test.ts +16 -5
  290. package/src/api-schemas/dashboard.ts +3 -0
  291. package/src/api-schemas/events.ts +9 -1
  292. package/src/api-schemas/files.ts +27 -0
  293. package/src/api-schemas/group.ts +10 -0
  294. package/src/api-schemas/index.ts +4 -0
  295. package/src/api-schemas/integrations.ts +27 -2
  296. package/src/api-schemas/interaction.contract.test.ts +204 -1
  297. package/src/api-schemas/interaction.ts +176 -8
  298. package/src/api-schemas/llumiverse.contract.test.ts +33 -2
  299. package/src/api-schemas/oauth-server.ts +152 -3
  300. package/src/api-schemas/oauth.contract.test.ts +64 -1
  301. package/src/api-schemas/process.ts +352 -2
  302. package/src/api-schemas/project-configuration.ts +11 -7
  303. package/src/api-schemas/project.contract.test.ts +83 -6
  304. package/src/api-schemas/registry.ts +290 -457
  305. package/src/api-schemas/schema-primitives.ts +13 -0
  306. package/src/api-schemas/store.contract.test.ts +30 -1
  307. package/src/api-schemas/store.ts +58 -11
  308. package/src/api-schemas/tools.ts +62 -0
  309. package/src/api-schemas/view-execution.ts +28 -2
  310. package/src/api-schemas/views.contract.test.ts +119 -0
  311. package/src/api-schemas/views.ts +142 -3
  312. package/src/api-schemas/workflow-runs.ts +9 -7
  313. package/src/api-schemas/zeno-response-contracts.test.ts +344 -0
  314. package/src/apps.test.ts +2 -40
  315. package/src/apps.ts +14 -181
  316. package/src/ask-user.ts +1 -1
  317. package/src/audit-trail.ts +3 -3
  318. package/src/browser-credentials.ts +3 -7
  319. package/src/common.ts +13 -1
  320. package/src/content-query.ts +5 -0
  321. package/src/data-platform.ts +4 -51
  322. package/src/email.ts +24 -18
  323. package/src/environment.ts +1 -14
  324. package/src/facets.ts +0 -6
  325. package/src/group.ts +2 -12
  326. package/src/index.ts +3 -15
  327. package/src/integrations.ts +1 -52
  328. package/src/interaction.ts +12 -271
  329. package/src/meters.ts +10 -11
  330. package/src/oauth-scopes.test.ts +15 -0
  331. package/src/oauth-scopes.ts +10 -64
  332. package/src/oauth-server.ts +28 -215
  333. package/src/payload.ts +1 -6
  334. package/src/pending-asks.ts +17 -42
  335. package/src/platform-event.ts +3 -156
  336. package/src/project.ts +12 -160
  337. package/src/prompt.ts +9 -8
  338. package/src/query.ts +0 -9
  339. package/src/rate-limiter.ts +3 -3
  340. package/src/runs.ts +8 -0
  341. package/src/schema-for-extraction.ts +1 -1
  342. package/src/secrets.ts +3 -0
  343. package/src/skill.ts +0 -15
  344. package/src/store/activity-catalog.ts +3 -0
  345. package/src/store/agent-approval.ts +0 -4
  346. package/src/store/agent-run.ts +39 -93
  347. package/src/store/collections.ts +3 -6
  348. package/src/store/conversation-state.ts +12 -25
  349. package/src/store/doc-analyzer.ts +0 -26
  350. package/src/store/dsl-workflow.ts +28 -5
  351. package/src/store/grounded-extraction.ts +0 -18
  352. package/src/store/index.ts +0 -6
  353. package/src/store/intake-policy-schema.generated.ts +293 -1
  354. package/src/store/process.ts +84 -0
  355. package/src/store/rendering.ts +3 -8
  356. package/src/store/schedule.ts +0 -19
  357. package/src/store/signals.ts +14 -0
  358. package/src/store/store.ts +118 -127
  359. package/src/store/workflow.ts +32 -120
  360. package/src/sts-errors.ts +0 -2
  361. package/src/sts-token-types.ts +3 -28
  362. package/src/tools.ts +15 -0
  363. package/src/transient-tokens.ts +0 -2
  364. package/src/user.ts +0 -20
  365. package/src/utils/schemas.ts +2 -159
  366. package/src/views.ts +50 -47
  367. package/src/workflow-analytics.ts +12 -40
  368. package/tsconfig.dist.json +4 -1
  369. package/lib/Progress.d.ts +0 -22
  370. package/lib/Progress.d.ts.map +0 -1
  371. package/lib/Progress.js +0 -57
  372. package/lib/Progress.js.map +0 -1
  373. package/lib/agent-request-template.d.ts +0 -4
  374. package/lib/agent-request-template.d.ts.map +0 -1
  375. package/lib/agent-request-template.js +0 -46
  376. package/lib/agent-request-template.js.map +0 -1
  377. package/lib/channels.d.ts +0 -22
  378. package/lib/channels.d.ts.map +0 -1
  379. package/lib/channels.js +0 -57
  380. package/lib/channels.js.map +0 -1
  381. package/lib/host-utils.d.ts +0 -8
  382. package/lib/host-utils.d.ts.map +0 -1
  383. package/lib/host-utils.js +0 -84
  384. package/lib/host-utils.js.map +0 -1
  385. package/lib/platform-event-validation.d.ts +0 -45
  386. package/lib/platform-event-validation.d.ts.map +0 -1
  387. package/lib/platform-event-validation.js +0 -336
  388. package/lib/platform-event-validation.js.map +0 -1
  389. package/lib/store/hive-memory.d.ts +0 -117
  390. package/lib/store/hive-memory.d.ts.map +0 -1
  391. package/lib/store/hive-memory.js +0 -2
  392. package/lib/store/hive-memory.js.map +0 -1
  393. package/lib/store/object-types.d.ts +0 -24
  394. package/lib/store/object-types.d.ts.map +0 -1
  395. package/lib/store/object-types.js +0 -95
  396. package/lib/store/object-types.js.map +0 -1
  397. package/lib/store/process-schema.d.ts +0 -561
  398. package/lib/store/process-schema.d.ts.map +0 -1
  399. package/lib/store/process-schema.js +0 -561
  400. package/lib/store/process-schema.js.map +0 -1
  401. package/lib/store/process-validation.d.ts +0 -17
  402. package/lib/store/process-validation.d.ts.map +0 -1
  403. package/lib/store/process-validation.js +0 -515
  404. package/lib/store/process-validation.js.map +0 -1
  405. package/lib/store/temporalio.d.ts +0 -17
  406. package/lib/store/temporalio.d.ts.map +0 -1
  407. package/lib/store/temporalio.js +0 -41
  408. package/lib/store/temporalio.js.map +0 -1
  409. package/lib/view-configuration-validation.d.ts +0 -15
  410. package/lib/view-configuration-validation.d.ts.map +0 -1
  411. package/lib/view-configuration-validation.js +0 -63
  412. package/lib/view-configuration-validation.js.map +0 -1
  413. package/lib/view-query-validation.d.ts +0 -13
  414. package/lib/view-query-validation.d.ts.map +0 -1
  415. package/lib/view-query-validation.js +0 -266
  416. package/lib/view-query-validation.js.map +0 -1
  417. package/lib/view-validation-helpers.d.ts +0 -15
  418. package/lib/view-validation-helpers.d.ts.map +0 -1
  419. package/lib/view-validation-helpers.js +0 -25
  420. package/lib/view-validation-helpers.js.map +0 -1
  421. package/lib/views-schema.d.ts +0 -1992
  422. package/lib/views-schema.d.ts.map +0 -1
  423. package/lib/views-schema.js +0 -674
  424. package/lib/views-schema.js.map +0 -1
  425. package/lib/views-validation.d.ts +0 -21
  426. package/lib/views-validation.d.ts.map +0 -1
  427. package/lib/views-validation.js +0 -164
  428. package/lib/views-validation.js.map +0 -1
  429. package/src/Progress.ts +0 -59
  430. package/src/agent-request-template.test.ts +0 -40
  431. package/src/agent-request-template.ts +0 -45
  432. package/src/channels.ts +0 -70
  433. package/src/host-utils.test.ts +0 -61
  434. package/src/host-utils.ts +0 -93
  435. package/src/platform-event-validation.test.ts +0 -251
  436. package/src/platform-event-validation.ts +0 -372
  437. package/src/project.test.ts +0 -44
  438. package/src/store/hive-memory.ts +0 -167
  439. package/src/store/object-types.ts +0 -123
  440. package/src/store/process-schema.test.ts +0 -149
  441. package/src/store/process-schema.ts +0 -564
  442. package/src/store/process-validation.test.ts +0 -635
  443. package/src/store/process-validation.ts +0 -646
  444. package/src/store/temporalio.ts +0 -54
  445. package/src/view-configuration-validation.ts +0 -74
  446. package/src/view-query-validation.test.ts +0 -21
  447. package/src/view-query-validation.ts +0 -319
  448. package/src/view-validation-helpers.ts +0 -28
  449. package/src/views-schema.test.ts +0 -372
  450. package/src/views-schema.ts +0 -689
  451. package/src/views-validation.ts +0 -234
@@ -29,10 +29,8 @@ import {
29
29
  TextResultSchema,
30
30
  ToolDefinitionSchema,
31
31
  ToolUseSchema,
32
+ VideoResultSchema,
32
33
  } from '@llumiverse/common/schemas';
33
- import type { ValidateFunction } from 'ajv/dist/2020.js';
34
- import { Ajv2020 } from 'ajv/dist/2020.js';
35
- import ajvFormats from 'ajv-formats';
36
34
  import { z } from 'zod';
37
35
  import type {
38
36
  CreateEventSubscriptionPayload,
@@ -80,7 +78,8 @@ import {
80
78
  SystemRoleDefinitionArraySchema,
81
79
  } from './access-control.js';
82
80
  import { AccountSchema, StripeBillingStatusResponseSchema, UpdateAccountPayloadSchema } from './account.js';
83
- import { findUnprunablePaths, isPlainObject, type JsonObject, pruneToSchema, toOpenApiComponents } from './adapter.js';
81
+ import { type JsonObject, toOpenApiComponents } from './adapter.js';
82
+ import * as AgentCommunicationSchemas from './agent-communication.js';
84
83
  import * as AgentRunSchemas from './agent-runs.js';
85
84
  import {
86
85
  AnalyticsAxisSchema,
@@ -126,6 +125,7 @@ import {
126
125
  AppInstallationProjectsQuerySchema,
127
126
  AppInstallationProviderBindingSchema,
128
127
  AppInstallationsQuerySchema,
128
+ AppListScopeSchema,
129
129
  AppOAuthCollectionParamsSchema,
130
130
  AppOAuthProviderParamsSchema,
131
131
  AppPackageScopeSchema,
@@ -140,6 +140,7 @@ import {
140
140
  AppScaffoldModuleSchema,
141
141
  AppScaffoldProgressSchema,
142
142
  AppScaffoldProgressStatusSchema,
143
+ AppsQuerySchema,
143
144
  AppToolCollectionArraySchema,
144
145
  AppToolCollectionSchema,
145
146
  AppVersionGitRefTypeSchema,
@@ -164,6 +165,7 @@ import {
164
165
  RunTypeSchema,
165
166
  StartAppBuildRequestSchema,
166
167
  StartAppBuildResponseSchema,
168
+ StartAppDevelopmentTaskRequestSchema,
167
169
  StartAppScaffoldRequestSchema,
168
170
  StartAppScaffoldResponseSchema,
169
171
  StoredTypeRefSchema,
@@ -231,6 +233,7 @@ import {
231
233
  RunMigrationResponseSchema,
232
234
  } from './commands.js';
233
235
  import * as ContentSchemas from './content.js';
236
+ import * as ContentQuerySchemas from './content-query.js';
234
237
  import {
235
238
  CostAnalyticsQuerySchema,
236
239
  CostAnalyticsResponseSchema,
@@ -391,6 +394,8 @@ import {
391
394
  } from './environment.js';
392
395
  import * as EventSchemas from './events.js';
393
396
  import {
397
+ BucketCreateAccessQuerySchema,
398
+ BucketCreateAccessStatusResponseSchema,
394
399
  BucketReadAccessQuerySchema,
395
400
  BucketReadAccessStatusResponseSchema,
396
401
  BulkUploadUrlsPayloadSchema,
@@ -398,6 +403,8 @@ import {
398
403
  CopyFilePayloadSchema,
399
404
  CopyFileResponseSchema,
400
405
  DeleteFileResultSchema,
406
+ EnsureBucketCreateAccessPayloadSchema,
407
+ EnsureBucketCreateAccessResponseSchema,
401
408
  EnsureBucketReadAccessPayloadSchema,
402
409
  EnsureBucketReadAccessResponseSchema,
403
410
  FileBucketResponseSchema,
@@ -415,6 +422,7 @@ import {
415
422
  } from './files.js';
416
423
  import {
417
424
  CreateUserGroupPayloadSchema,
425
+ ListUserGroupsQuerySchema,
418
426
  UpdateUserGroupPayloadSchema,
419
427
  UserGroupArraySchema,
420
428
  UserGroupRefSchema,
@@ -451,6 +459,7 @@ import {
451
459
  ComputedFacetResponseSchema,
452
460
  ComputeInteractionFacetPayloadSchema,
453
461
  ComputeRunFacetPayloadSchema,
462
+ ComputeRunFacetsResponseSchema,
454
463
  ConversationStateSchema,
455
464
  ConversationStripOptionsSchema,
456
465
  ConversationVisibilitySchema,
@@ -469,6 +478,8 @@ import {
469
478
  ExternalizedToolInputRefSchema,
470
479
  ExternalizedToolInputRefsSchema,
471
480
  FacetSpecSchema,
481
+ FindRunResultArraySchema,
482
+ FindRunResultSchema,
472
483
  GeneratedInteractionDefinitionArraySchema,
473
484
  GeneratedInteractionDefinitionSchema,
474
485
  GeneratedInteractionPromptSegmentSchema,
@@ -479,6 +490,7 @@ import {
479
490
  GenerateTestDataPayloadSchema,
480
491
  ImprovePromptPayloadConfigSchema,
481
492
  ImprovePromptPayloadSchema,
493
+ InCodeInteractionSchema,
482
494
  InCodePromptSchema,
483
495
  InitialToolCallSchema,
484
496
  InteractionArraySchema,
@@ -492,6 +504,8 @@ import {
492
504
  InteractionForkPayloadSchema,
493
505
  InteractionNameArraySchema,
494
506
  InteractionNameSchema,
507
+ InteractionPromptSegmentInputSchema,
508
+ InteractionPromptTemplateInputSchema,
495
509
  InteractionPublishPayloadSchema,
496
510
  InteractionRefArraySchema,
497
511
  InteractionRefSchema,
@@ -530,6 +544,7 @@ import {
530
544
  PromptTemplateUpdatePayloadSchema,
531
545
  RateLimitRequestPayloadSchema,
532
546
  RateLimitRequestResponseSchema,
547
+ ResolvedCatalogInteractionSchema,
533
548
  ResolvedEnvironmentInfoSchema,
534
549
  ResolvedInteractionExecutionInfoSchema,
535
550
  ResolvedRuntimeConfigSchema,
@@ -585,15 +600,27 @@ import {
585
600
  UpdateOAuthProviderPayloadSchema,
586
601
  } from './oauth.js';
587
602
  import {
603
+ ApproveOAuthAuthorizationRequestPayloadSchema,
588
604
  BulkRevokeOAuthGrantsPayloadSchema,
605
+ CreateOAuthAuthorizationRequestPayloadSchema,
589
606
  CreateOAuthClientPayloadSchema,
590
607
  ListOAuthGrantsQuerySchema,
608
+ OAuthAuthorizationDecisionResponseSchema,
609
+ OAuthAuthorizationRequestSchema,
610
+ OAuthAuthorizationRequestStatusSchema,
611
+ OAuthAuthorizationServerMetadataSchema,
612
+ OAuthAuthorizeQuerySchema,
591
613
  OAuthClientArraySchema,
592
614
  OAuthClientCreateResponseSchema,
615
+ OAuthClientDisplayMetadataSchema,
616
+ OAuthClientRegistrationModeSchema,
593
617
  OAuthClientSchema,
594
618
  OAuthClientScopeMetadataSchema,
595
619
  OAuthClientStatusSchema,
596
620
  OAuthClientTypeSchema,
621
+ OAuthDeviceAuthorizationRequestSchema,
622
+ OAuthDeviceAuthorizationResponseSchema,
623
+ OAuthGrantableScopesResponseSchema,
597
624
  OAuthGrantListResponseSchema,
598
625
  OAuthGrantRevokeResponseSchema,
599
626
  OAuthGrantSchema,
@@ -605,15 +632,10 @@ import {
605
632
  OAuthRegistrationSourceSchema,
606
633
  OAuthResponseTypeSchema,
607
634
  OAuthTokenEndpointAuthMethodSchema,
635
+ OAuthTokenResponseSchema,
608
636
  RevokeOAuthGrantQuerySchema,
609
637
  UpdateOAuthClientPayloadSchema,
610
638
  } from './oauth-server.js';
611
- import {
612
- type ApiParameterLocation,
613
- type NormalizedApiParameters,
614
- normalizeParameters,
615
- type RawApiParameters,
616
- } from './parameters.js';
617
639
  import * as ProcessSchemas from './process.js';
618
640
  import {
619
641
  CountResultSchema,
@@ -667,6 +689,7 @@ import {
667
689
  ContentTypeIntakePolicySchema,
668
690
  CreateContentObjectTypePayloadSchema,
669
691
  InCodeTypeDefinitionSchema,
692
+ InteractionExecutionConfigurationSchema,
670
693
  UpdateContentObjectTypePayloadSchema,
671
694
  } from './store.js';
672
695
  import * as StsSchemas from './sts.js';
@@ -685,7 +708,12 @@ import {
685
708
  import {
686
709
  AggregatedToolArraySchema,
687
710
  AggregatedToolSchema,
711
+ InspectProjectToolQuerySchema,
688
712
  ListProjectToolsQuerySchema,
713
+ ProcessToolCompatibilityReasonSchema,
714
+ ProcessToolCompatibilitySchema,
715
+ ToolInspectionSchema,
716
+ ToolRuntimeContextSchema,
689
717
  ToolSourceSchema,
690
718
  ToolValidationResultSchema,
691
719
  ValidateToolNamesPayloadSchema,
@@ -703,15 +731,23 @@ import {
703
731
  } from './user.js';
704
732
  import * as ViewExecutionSchemas from './view-execution.js';
705
733
  import {
734
+ AgenticViewRerankConfigurationSchema,
706
735
  AgenticViewSearchConfigurationSchema,
707
736
  CreateViewExperienceRequestSchema,
708
737
  UpdateViewExperienceRequestSchema,
738
+ ViewActionConfigurationSchema,
739
+ ViewActionPlacementSchema,
740
+ ViewActionSelectionRequirementSchema,
741
+ ViewActionsConfigurationSchema,
742
+ ViewAgenticExecutionConfigurationSchema,
743
+ ViewAgenticSearchModeSchema,
709
744
  ViewBoardCardConfigurationSchema,
710
745
  ViewBoardColumnSchema,
711
746
  ViewBoardDisplaySchema,
712
747
  ViewCardsDisplaySchema,
713
748
  ViewCollectionNavigationSchema,
714
749
  ViewDisplayConfigurationSchema,
750
+ ViewDropConfigurationSchema,
715
751
  ViewElasticsearchQuerySchema,
716
752
  ViewExperienceArraySchema,
717
753
  ViewExperienceLayoutSchema,
@@ -735,19 +771,17 @@ import {
735
771
  ViewSearchConfigurationSchema,
736
772
  ViewSearchFieldDefinitionSchema,
737
773
  ViewSearchFieldTypeSchema,
774
+ ViewSelectionConfigurationSchema,
775
+ ViewSelectionModeSchema,
738
776
  ViewSortClauseSchema,
739
777
  ViewSortOptionSchema,
740
778
  ViewTableColumnSchema,
741
779
  ViewTableDisplaySchema,
742
780
  ViewTermsNavigationSchema,
781
+ ViewUploadDropParametersSchema,
743
782
  } from './views.js';
744
783
  import * as WorkflowRunSchemas from './workflow-runs.js';
745
784
 
746
- // ajv-formats is CommonJS with an ESM-style declaration file. Node's interop makes the default
747
- // import the whole `module.exports` (itself callable), while TypeScript sees the namespace — and
748
- // `.default` is the plugin function in both shapes.
749
- const addFormats = ajvFormats.default;
750
-
751
785
  /**
752
786
  * Endpoint-level API schemas, keyed by the OpenAPI component name they publish under.
753
787
  *
@@ -793,6 +827,7 @@ const IAM_AND_ACCOUNT_SCHEMAS = {
793
827
  UserGroupArray: UserGroupArraySchema,
794
828
  UserGroupRef: UserGroupRefSchema,
795
829
  CreateUserGroupPayload: CreateUserGroupPayloadSchema,
830
+ ListUserGroupsQuery: ListUserGroupsQuerySchema,
796
831
  UpdateUserGroupPayload: UpdateUserGroupPayloadSchema,
797
832
  AccessControlEntry: AccessControlEntrySchema,
798
833
  AccessControlEntryArray: AccessControlEntryArraySchema,
@@ -841,7 +876,7 @@ const PROJECT_AND_APP_SCHEMAS = {
841
876
  BrowserUseProjectConfiguration: BrowserUseProjectConfigurationSchema,
842
877
  ProjectIntakeSniffConfiguration: ProjectIntakeSniffConfigurationSchema,
843
878
  // Leaves of the Project closure. `ModelOptions` hoists its
844
- // twenty-three driver option sets and four enums; `JSONSchema` hoists `JSONSchemaProperties`.
879
+ // twenty-five driver option sets and four enums; `JSONSchema` hoists `JSONSchemaProperties`.
845
880
  JSONSchema: JSONSchemaSchema,
846
881
  ModelOptions: ModelOptionsSchema,
847
882
  HttpTimeoutOptions: HttpTimeoutOptionsSchema,
@@ -899,9 +934,23 @@ const OAUTH_SCHEMAS = {
899
934
  OAuthTokenEndpointAuthMethod: OAuthTokenEndpointAuthMethodSchema,
900
935
  OAuthGrantType: OAuthGrantTypeSchema,
901
936
  OAuthResponseType: OAuthResponseTypeSchema,
937
+ OAuthAuthorizationRequestStatus: OAuthAuthorizationRequestStatusSchema,
938
+ OAuthClientRegistrationMode: OAuthClientRegistrationModeSchema,
902
939
  OAuthGrantStatus: OAuthGrantStatusSchema,
903
940
  OAuthGrantSortField: OAuthGrantSortFieldSchema,
904
941
  OAuthGrantSortOrder: OAuthGrantSortOrderSchema,
942
+ // OAuth authorization-server discovery, consent, device-code, and token contracts.
943
+ OAuthAuthorizationServerMetadata: OAuthAuthorizationServerMetadataSchema,
944
+ OAuthClientDisplayMetadata: OAuthClientDisplayMetadataSchema,
945
+ OAuthAuthorizeQuery: OAuthAuthorizeQuerySchema,
946
+ CreateOAuthAuthorizationRequestPayload: CreateOAuthAuthorizationRequestPayloadSchema,
947
+ OAuthAuthorizationRequest: OAuthAuthorizationRequestSchema,
948
+ ApproveOAuthAuthorizationRequestPayload: ApproveOAuthAuthorizationRequestPayloadSchema,
949
+ OAuthGrantableScopesResponse: OAuthGrantableScopesResponseSchema,
950
+ OAuthAuthorizationDecisionResponse: OAuthAuthorizationDecisionResponseSchema,
951
+ OAuthDeviceAuthorizationRequest: OAuthDeviceAuthorizationRequestSchema,
952
+ OAuthDeviceAuthorizationResponse: OAuthDeviceAuthorizationResponseSchema,
953
+ OAuthTokenResponse: OAuthTokenResponseSchema,
905
954
  // Clients registered against Vertesia's own OAuth server. `OAuthClientData` is composed into
906
955
  // `OAuthClient` rather than hoisted, so it has no component of its own — as today.
907
956
  OAuthClient: OAuthClientSchema,
@@ -1012,6 +1061,7 @@ const LLM_COMPLETION_SCHEMAS = {
1012
1061
  TextResult: TextResultSchema,
1013
1062
  JsonResult: JsonResultSchema,
1014
1063
  ImageResult: ImageResultSchema,
1064
+ VideoResult: VideoResultSchema,
1015
1065
  CompletionResult: CompletionResultSchema,
1016
1066
  ExecutionTokenUsage: ExecutionTokenUsageSchema,
1017
1067
  // The options a caller may send. `PromptFormatter` is deliberately gone: see the note on
@@ -1030,10 +1080,12 @@ const INTERACTION_SCHEMAS = {
1030
1080
  SchemaRef: SchemaRefSchema,
1031
1081
  CachePolicy: CachePolicySchema,
1032
1082
  PromptTemplate: PromptTemplateSchema,
1083
+ InteractionPromptTemplateInput: InteractionPromptTemplateInputSchema,
1033
1084
  PromptTemplateCreatePayload: PromptTemplateCreatePayloadSchema,
1034
1085
  PromptTemplateUpdatePayload: PromptTemplateUpdatePayloadSchema,
1035
1086
  PromptTemplateRef: PromptTemplateRefSchema,
1036
1087
  PromptSegmentDef: PromptSegmentDefSchema,
1088
+ InteractionPromptSegmentInput: InteractionPromptSegmentInputSchema,
1037
1089
  PromptSegmentRef_PromptTemplateRef: PromptSegmentRef_PromptTemplateRefSchema,
1038
1090
  InCodePrompt: InCodePromptSchema,
1039
1091
  Interaction: InteractionSchema,
@@ -1064,6 +1116,8 @@ const INTERACTION_SCHEMAS = {
1064
1116
  // The catalog — in-code interactions an app or the system provides, alongside stored ones.
1065
1117
  CatalogInteractionRef: CatalogInteractionRefSchema,
1066
1118
  CatalogInteractionRefArray: CatalogInteractionRefArraySchema,
1119
+ InCodeInteraction: InCodeInteractionSchema,
1120
+ ResolvedCatalogInteraction: ResolvedCatalogInteractionSchema,
1067
1121
  CatalogTagQuery: CatalogTagQuerySchema,
1068
1122
  StoredCatalogInteractionsQuery: StoredCatalogInteractionsQuerySchema,
1069
1123
  // What `GET /interactions/resolve/:nameOrId` answers with.
@@ -1155,11 +1209,17 @@ const EXECUTION_RUN_SCHEMAS = {
1155
1209
  InteractionExecutionPayload: InteractionExecutionPayloadSchema,
1156
1210
  NamedInteractionExecutionPayload: NamedInteractionExecutionPayloadSchema,
1157
1211
  InteractionExecutionResult: InteractionExecutionResultSchema,
1212
+ FindRunResult: FindRunResultSchema,
1213
+ FindRunResultArray: FindRunResultArraySchema,
1158
1214
  // The retrieve variant, and the two pre-versioning result shapes. See the schema module for why
1159
1215
  // the populated interaction cannot share a component with the create path.
1160
1216
  PopulatedExecutionRunResult: PopulatedExecutionRunResultSchema,
1161
1217
  LegacyExecutionRunResult: LegacyExecutionRunResultSchema,
1162
1218
  LegacyPopulatedExecutionRunResult: LegacyPopulatedExecutionRunResultSchema,
1219
+ // Registered explicitly although the adapter would hoist it anyway from the schemas that
1220
+ // reference it. Hoisted-only components exist in `ApiSchemaComponents` but not in the
1221
+ // `ApiComponentName` union, so a server could not name this one to validate against it.
1222
+ InteractionExecutionConfiguration: InteractionExecutionConfigurationSchema,
1163
1223
  InteractionExecutionError: InteractionExecutionErrorSchema,
1164
1224
  ResultStorageOptions: ResultStorageOptionsSchema,
1165
1225
  ExecuteInteractionByEndpointQuery: ExecuteInteractionByEndpointQuerySchema,
@@ -1174,6 +1234,7 @@ const EXECUTION_RUN_SCHEMAS = {
1174
1234
  RateLimitRequestPayload: RateLimitRequestPayloadSchema,
1175
1235
  RateLimitRequestResponse: RateLimitRequestResponseSchema,
1176
1236
  ComputeRunFacetPayload: ComputeRunFacetPayloadSchema,
1237
+ ComputeRunFacetsResponse: ComputeRunFacetsResponseSchema,
1177
1238
  RunSearchMetaResponse: RunSearchMetaResponseSchema,
1178
1239
  ToolResultsPayload: ToolResultsPayloadSchema,
1179
1240
  UserMessagePayload: UserMessagePayloadSchema,
@@ -1203,6 +1264,10 @@ const FILE_STORAGE_SCHEMAS = {
1203
1264
  BucketReadAccessStatusResponse: BucketReadAccessStatusResponseSchema,
1204
1265
  EnsureBucketReadAccessPayload: EnsureBucketReadAccessPayloadSchema,
1205
1266
  EnsureBucketReadAccessResponse: EnsureBucketReadAccessResponseSchema,
1267
+ BucketCreateAccessQuery: BucketCreateAccessQuerySchema,
1268
+ BucketCreateAccessStatusResponse: BucketCreateAccessStatusResponseSchema,
1269
+ EnsureBucketCreateAccessPayload: EnsureBucketCreateAccessPayloadSchema,
1270
+ EnsureBucketCreateAccessResponse: EnsureBucketCreateAccessResponseSchema,
1206
1271
  } as const satisfies Record<string, z.ZodType>;
1207
1272
 
1208
1273
  const DURABLE_TASK_SCHEMAS = {
@@ -1427,6 +1492,9 @@ const PROCESS_DSL_SCHEMAS = {
1427
1492
  WorkflowDefinitionPayload: ProcessSchemas.WorkflowDefinitionPayloadSchema,
1428
1493
  WorkflowDefinitionPayloadWithActivities: ProcessSchemas.WorkflowDefinitionPayloadWithActivitiesSchema,
1429
1494
  WorkflowDefinitionPayloadWithSteps: ProcessSchemas.WorkflowDefinitionPayloadWithStepsSchema,
1495
+ UpdateWorkflowDefinitionPayload: ProcessSchemas.UpdateWorkflowDefinitionPayloadSchema,
1496
+ UpdateWorkflowDefinitionPayloadWithActivities: ProcessSchemas.UpdateWorkflowDefinitionPayloadWithActivitiesSchema,
1497
+ UpdateWorkflowDefinitionPayloadWithSteps: ProcessSchemas.UpdateWorkflowDefinitionPayloadWithStepsSchema,
1430
1498
  } as const satisfies Record<string, z.ZodType>;
1431
1499
 
1432
1500
  const AGENT_MESSAGE_SCHEMAS = {
@@ -1493,6 +1561,8 @@ const CONTENT_OBJECT_SCHEMAS = {
1493
1561
  UpdateContentObjectPayload: ContentSchemas.UpdateContentObjectPayloadSchema,
1494
1562
  ContentObjectApiTypeRef: ContentSchemas.ContentObjectApiTypeRefSchema,
1495
1563
  ContentObjectApiResponse: ContentSchemas.ContentObjectApiResponseSchema,
1564
+ ProjectedContentObjectApiResponse: ContentSchemas.ProjectedContentObjectApiResponseSchema,
1565
+ ProjectedContentObjectApiResponseArray: ContentSchemas.ProjectedContentObjectApiResponseArraySchema,
1496
1566
  ContentObjectItemApiResponse: ContentSchemas.ContentObjectItemApiResponseSchema,
1497
1567
  ContentObjectItemApiResponseArray: ContentSchemas.ContentObjectItemApiResponseArraySchema,
1498
1568
  ContentObjectProcessingPriority: ContentSchemas.ContentObjectProcessingPrioritySchema,
@@ -1575,6 +1645,37 @@ const PROCESS_RUNTIME_SCHEMAS = {
1575
1645
  ProcessState: ProcessSchemas.ProcessStateSchema,
1576
1646
  WorkflowExecutionStartResultArray: ProcessSchemas.WorkflowExecutionStartResultArraySchema,
1577
1647
  RecordProcessRunPayload: ProcessSchemas.RecordProcessRunPayloadSchema,
1648
+ ProcessTestRunStatus: ProcessSchemas.ProcessTestRunStatusSchema,
1649
+ ProcessTestVirtualActor: ProcessSchemas.ProcessTestVirtualActorSchema,
1650
+ ProcessTestFixtureResult: ProcessSchemas.ProcessTestFixtureResultSchema,
1651
+ ProcessTestFixtureError: ProcessSchemas.ProcessTestFixtureErrorSchema,
1652
+ ProcessTestFixtureResponse: ProcessSchemas.ProcessTestFixtureResponseSchema,
1653
+ ProcessTestNodeFixture: ProcessSchemas.ProcessTestNodeFixtureSchema,
1654
+ ProcessTestHumanAction: ProcessSchemas.ProcessTestHumanActionSchema,
1655
+ ProcessTestAssertions: ProcessSchemas.ProcessTestAssertionsSchema,
1656
+ ProcessTestScenario: ProcessSchemas.ProcessTestScenarioSchema,
1657
+ ProcessTestSuite: ProcessSchemas.ProcessTestSuiteSchema,
1658
+ ProcessTestSuiteArray: ProcessSchemas.ProcessTestSuiteArraySchema,
1659
+ CreateProcessTestSuitePayload: ProcessSchemas.CreateProcessTestSuitePayloadSchema,
1660
+ UpdateProcessTestSuitePayload: ProcessSchemas.UpdateProcessTestSuitePayloadSchema,
1661
+ StartProcessTestRunPayload: ProcessSchemas.StartProcessTestRunPayloadSchema,
1662
+ ProcessTestStoredSubject: ProcessSchemas.ProcessTestStoredSubjectSchema,
1663
+ ProcessTestResolvedSubject: ProcessSchemas.ProcessTestResolvedSubjectSchema,
1664
+ ProcessTestInlineSubject: ProcessSchemas.ProcessTestInlineSubjectSchema,
1665
+ ProcessTestSubject: ProcessSchemas.ProcessTestSubjectSchema,
1666
+ ProcessTestTargetById: ProcessSchemas.ProcessTestTargetByIdSchema,
1667
+ ProcessTestTargetWithDefinition: ProcessSchemas.ProcessTestTargetWithDefinitionSchema,
1668
+ ProcessTestTarget: ProcessSchemas.ProcessTestTargetSchema,
1669
+ SubmitProcessTestRunPayload: ProcessSchemas.SubmitProcessTestRunPayloadSchema,
1670
+ ProcessTestAssertionResult: ProcessSchemas.ProcessTestAssertionResultSchema,
1671
+ ProcessTestActorDecision: ProcessSchemas.ProcessTestActorDecisionSchema,
1672
+ ProcessTestCoverage: ProcessSchemas.ProcessTestCoverageSchema,
1673
+ ProcessTestChildTrace: ProcessSchemas.ProcessTestChildTraceSchema,
1674
+ ProcessTestScenarioResult: ProcessSchemas.ProcessTestScenarioResultSchema,
1675
+ ProcessTestRun: ProcessSchemas.ProcessTestRunSchema,
1676
+ ProcessTestRunArray: ProcessSchemas.ProcessTestRunArraySchema,
1677
+ ListProcessTestRunsQuery: ProcessSchemas.ListProcessTestRunsQuerySchema,
1678
+ UpdateProcessTestScenarioPayload: ProcessSchemas.UpdateProcessTestScenarioPayloadSchema,
1578
1679
  } as const satisfies Record<string, z.ZodType>;
1579
1680
 
1580
1681
  const EVENT_DELIVERY_SCHEMAS = {
@@ -1744,6 +1845,8 @@ const VIEW_EXECUTION_SCHEMAS = {
1744
1845
  ExecuteViewRequest: ViewExecutionSchemas.ExecuteViewRequestSchema,
1745
1846
  ViewNavigationResult: ViewExecutionSchemas.ViewNavigationResultSchema,
1746
1847
  ViewExecutionQueryPlan: ViewExecutionSchemas.ViewExecutionQueryPlanSchema,
1848
+ ViewRerankFailureCode: ViewExecutionSchemas.ViewRerankFailureCodeSchema,
1849
+ ViewExecutionRerankResult: ViewExecutionSchemas.ViewExecutionRerankResultSchema,
1747
1850
  ViewExecutionSearchConfiguration: ViewExecutionSchemas.ViewExecutionSearchConfigurationSchema,
1748
1851
  ViewNavigationResultMap: ViewExecutionSchemas.ViewNavigationResultMapSchema,
1749
1852
  ViewExecutionSearchResult: ViewExecutionSchemas.ViewExecutionSearchResultSchema,
@@ -1794,12 +1897,17 @@ const PROJECT_TOOL_SCHEMAS = {
1794
1897
  // The unified project-scoped tool registry: what `GET /tools` aggregates across
1795
1898
  // builtins, installed apps and interactions, and what `POST /tools/validate` resolves.
1796
1899
  ToolSource: ToolSourceSchema,
1900
+ ToolRuntimeContext: ToolRuntimeContextSchema,
1901
+ ProcessToolCompatibilityReason: ProcessToolCompatibilityReasonSchema,
1902
+ ProcessToolCompatibility: ProcessToolCompatibilitySchema,
1797
1903
  ValidateToolNamesPayload: ValidateToolNamesPayloadSchema,
1798
1904
  ToolValidationResult: ToolValidationResultSchema,
1799
1905
  AggregatedTool: AggregatedToolSchema,
1800
1906
  ValidateToolNamesResponse: ValidateToolNamesResponseSchema,
1801
1907
  AggregatedToolArray: AggregatedToolArraySchema,
1802
1908
  ListProjectToolsQuery: ListProjectToolsQuerySchema,
1909
+ InspectProjectToolQuery: InspectProjectToolQuerySchema,
1910
+ ToolInspection: ToolInspectionSchema,
1803
1911
  } as const satisfies Record<string, z.ZodType>;
1804
1912
 
1805
1913
  const REMOTE_MCP_SCHEMAS = {
@@ -1855,6 +1963,9 @@ const VIEW_EXPERIENCE_SCHEMAS = {
1855
1963
  ViewResultFieldFormat: ViewResultFieldFormatSchema,
1856
1964
  ViewBoardColumn: ViewBoardColumnSchema,
1857
1965
  ViewTableColumn: ViewTableColumnSchema,
1966
+ ViewAgenticSearchMode: ViewAgenticSearchModeSchema,
1967
+ AgenticViewRerankConfiguration: AgenticViewRerankConfigurationSchema,
1968
+ ViewAgenticExecutionConfiguration: ViewAgenticExecutionConfigurationSchema,
1858
1969
  AgenticViewSearchConfiguration: AgenticViewSearchConfigurationSchema,
1859
1970
  ViewSearchFieldType: ViewSearchFieldTypeSchema,
1860
1971
  ViewSearchFieldDefinition: ViewSearchFieldDefinitionSchema,
@@ -1880,6 +1991,14 @@ const VIEW_EXPERIENCE_SCHEMAS = {
1880
1991
  ViewCardsDisplay: ViewCardsDisplaySchema,
1881
1992
  ViewGalleryDisplay: ViewGalleryDisplaySchema,
1882
1993
  ViewDisplayConfiguration: ViewDisplayConfigurationSchema,
1994
+ ViewSelectionMode: ViewSelectionModeSchema,
1995
+ ViewSelectionConfiguration: ViewSelectionConfigurationSchema,
1996
+ ViewActionPlacement: ViewActionPlacementSchema,
1997
+ ViewActionSelectionRequirement: ViewActionSelectionRequirementSchema,
1998
+ ViewActionConfiguration: ViewActionConfigurationSchema,
1999
+ ViewActionsConfiguration: ViewActionsConfigurationSchema,
2000
+ ViewUploadDropParameters: ViewUploadDropParametersSchema,
2001
+ ViewDropConfiguration: ViewDropConfigurationSchema,
1883
2002
  ViewResultsConfiguration: ViewResultsConfigurationSchema,
1884
2003
  CreateViewExperienceRequest: CreateViewExperienceRequestSchema,
1885
2004
  ViewExperience: ViewExperienceSchema,
@@ -1937,6 +2056,7 @@ const APP_LIFECYCLE_SCHEMAS = {
1937
2056
  AppRepoDocumentCommit: AppRepoDocumentCommitSchema,
1938
2057
  AppVersionGitSource: AppVersionGitSourceSchema,
1939
2058
  StartAppScaffoldRequest: StartAppScaffoldRequestSchema,
2059
+ StartAppDevelopmentTaskRequest: StartAppDevelopmentTaskRequestSchema,
1940
2060
  StartAppBuildRequest: StartAppBuildRequestSchema,
1941
2061
  AgentToolDefinition: AgentToolDefinitionSchema,
1942
2062
  AppDevelopmentTaskList: AppDevelopmentTaskListSchema,
@@ -1964,6 +2084,8 @@ const APP_LIFECYCLE_SCHEMAS = {
1964
2084
  AppToolCollectionArray: AppToolCollectionArraySchema,
1965
2085
  AppInstallationKind: AppInstallationKindSchema,
1966
2086
  AppInstallationsQuery: AppInstallationsQuerySchema,
2087
+ AppListScope: AppListScopeSchema,
2088
+ AppsQuery: AppsQuerySchema,
1967
2089
  AppInstallationProjectsQuery: AppInstallationProjectsQuerySchema,
1968
2090
  SystemPackageQuery: SystemPackageQuerySchema,
1969
2091
  } as const satisfies Record<string, z.ZodType>;
@@ -2059,6 +2181,7 @@ const APP_MANIFEST_SCHEMAS = {
2059
2181
  AppWidgetInfo: AppRuntimeSchemas.AppWidgetInfoSchema,
2060
2182
  AppDashboardDefinition: AppRuntimeSchemas.AppDashboardDefinitionSchema,
2061
2183
  AppManifestData: AppRuntimeSchemas.AppManifestDataSchema,
2184
+ UpdateAppPayload: AppRuntimeSchemas.UpdateAppPayloadSchema,
2062
2185
  AppManifest: AppRuntimeSchemas.AppManifestSchema,
2063
2186
  AppManifestArray: AppRuntimeSchemas.AppManifestArraySchema,
2064
2187
  AppWidgetInfoMap: AppRuntimeSchemas.AppWidgetInfoMapSchema,
@@ -2097,6 +2220,32 @@ const STS_SCHEMAS = {
2097
2220
  IssueTokenUnavailableResponse: StsSchemas.IssueTokenUnavailableResponseSchema,
2098
2221
  } as const satisfies Record<string, z.ZodType>;
2099
2222
 
2223
+ const AGENT_COMMUNICATION_SCHEMAS = {
2224
+ EmailRouteData: AgentCommunicationSchemas.EmailRouteDataSchema,
2225
+ SendEmailRequest: AgentCommunicationSchemas.SendEmailRequestSchema,
2226
+ SendEmailResponse: AgentCommunicationSchemas.SendEmailResponseSchema,
2227
+ ResolveEmailRouteRequest: AgentCommunicationSchemas.ResolveEmailRouteRequestSchema,
2228
+ CreateEmailRouteRequest: AgentCommunicationSchemas.CreateEmailRouteRequestSchema,
2229
+ CreateEmailRouteResponse: AgentCommunicationSchemas.CreateEmailRouteResponseSchema,
2230
+ EmailRouteResponse: AgentCommunicationSchemas.EmailRouteResponseSchema,
2231
+ UpdateEmailRouteRequest: AgentCommunicationSchemas.UpdateEmailRouteRequestSchema,
2232
+ UpdateEmailRouteResponse: AgentCommunicationSchemas.UpdateEmailRouteResponseSchema,
2233
+ ForwardEmailRequest: AgentCommunicationSchemas.ForwardEmailRequestSchema,
2234
+ ForwardEmailResponse: AgentCommunicationSchemas.ForwardEmailResponseSchema,
2235
+ PendingAskStatus: AgentCommunicationSchemas.PendingAskStatusSchema,
2236
+ PendingAskData: AgentCommunicationSchemas.PendingAskDataSchema,
2237
+ RegisterPendingAskRequest: AgentCommunicationSchemas.RegisterPendingAskRequestSchema,
2238
+ RegisterPendingAskResponse: AgentCommunicationSchemas.RegisterPendingAskResponseSchema,
2239
+ ResolvePendingAskRequest: AgentCommunicationSchemas.ResolvePendingAskRequestSchema,
2240
+ ResolvePendingAskResponse: AgentCommunicationSchemas.ResolvePendingAskResponseSchema,
2241
+ ListPendingAsksResponse: AgentCommunicationSchemas.ListPendingAsksResponseSchema,
2242
+ } as const satisfies Record<string, z.ZodType>;
2243
+
2244
+ const CONTENT_QUERY_SCHEMAS = {
2245
+ ContentQueryPayload: ContentQuerySchemas.ContentQueryPayloadSchema,
2246
+ ContentQueryResult: ContentQuerySchemas.ContentQueryResultSchema,
2247
+ } as const satisfies Record<string, z.ZodType>;
2248
+
2100
2249
  const API_SCHEMA_GROUPS = [
2101
2250
  IAM_AND_ACCOUNT_SCHEMAS,
2102
2251
  PROJECT_AND_APP_SCHEMAS,
@@ -2120,6 +2269,8 @@ const API_SCHEMA_GROUPS = [
2120
2269
  APP_MANIFEST_SCHEMAS,
2121
2270
  APP_INSTALLATION_SCHEMAS,
2122
2271
  STS_SCHEMAS,
2272
+ AGENT_COMMUNICATION_SCHEMAS,
2273
+ CONTENT_QUERY_SCHEMAS,
2123
2274
  FILE_STORAGE_SCHEMAS,
2124
2275
  DURABLE_TASK_SCHEMAS,
2125
2276
  CONTENT_TYPE_CATALOG_SCHEMAS,
@@ -2179,6 +2330,8 @@ type ApiSchemaMap = typeof IAM_AND_ACCOUNT_SCHEMAS &
2179
2330
  typeof APP_MANIFEST_SCHEMAS &
2180
2331
  typeof APP_INSTALLATION_SCHEMAS &
2181
2332
  typeof STS_SCHEMAS &
2333
+ typeof AGENT_COMMUNICATION_SCHEMAS &
2334
+ typeof CONTENT_QUERY_SCHEMAS &
2182
2335
  typeof FILE_STORAGE_SCHEMAS &
2183
2336
  typeof DURABLE_TASK_SCHEMAS &
2184
2337
  typeof CONTENT_TYPE_CATALOG_SCHEMAS &
@@ -2227,6 +2380,33 @@ const API_SCHEMAS: Readonly<Record<ApiComponentName, z.ZodType>> = mergeComponen
2227
2380
  * objects, so a body carrying an undeclared property is rejected rather than quietly accepted.
2228
2381
  */
2229
2382
  const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
2383
+ // Process Test Lab request, fixture, and result contracts.
2384
+ 'ProcessTestVirtualActor',
2385
+ 'ProcessTestFixtureResult',
2386
+ 'ProcessTestFixtureError',
2387
+ 'ProcessTestNodeFixture',
2388
+ 'ProcessTestHumanAction',
2389
+ 'ProcessTestAssertions',
2390
+ 'ProcessTestScenario',
2391
+ 'ProcessTestSuite',
2392
+ 'CreateProcessTestSuitePayload',
2393
+ 'UpdateProcessTestSuitePayload',
2394
+ 'StartProcessTestRunPayload',
2395
+ 'ProcessTestStoredSubject',
2396
+ 'ProcessTestResolvedSubject',
2397
+ 'ProcessTestInlineSubject',
2398
+ 'ProcessTestTargetById',
2399
+ 'ProcessTestTargetWithDefinition',
2400
+ 'ProcessTestTarget',
2401
+ 'SubmitProcessTestRunPayload',
2402
+ 'ProcessTestAssertionResult',
2403
+ 'ProcessTestActorDecision',
2404
+ 'ProcessTestCoverage',
2405
+ 'ProcessTestChildTrace',
2406
+ 'ProcessTestScenarioResult',
2407
+ 'ProcessTestRun',
2408
+ 'ListProcessTestRunsQuery',
2409
+ 'UpdateProcessTestScenarioPayload',
2230
2410
  'Account',
2231
2411
  'AccountBilling',
2232
2412
  'UpdateAccountPayload',
@@ -2271,6 +2451,27 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
2271
2451
  'UserGroupRef',
2272
2452
  'CreateUserGroupPayload',
2273
2453
  'UpdateUserGroupPayload',
2454
+ 'ListUserGroupsQuery',
2455
+ // Agent communication and content query endpoints.
2456
+ 'EmailRouteData',
2457
+ 'SendEmailRequest',
2458
+ 'SendEmailResponse',
2459
+ 'ResolveEmailRouteRequest',
2460
+ 'CreateEmailRouteRequest',
2461
+ 'CreateEmailRouteResponse',
2462
+ 'EmailRouteResponse',
2463
+ 'UpdateEmailRouteRequest',
2464
+ 'UpdateEmailRouteResponse',
2465
+ 'ForwardEmailRequest',
2466
+ 'ForwardEmailResponse',
2467
+ 'PendingAskData',
2468
+ 'RegisterPendingAskRequest',
2469
+ 'RegisterPendingAskResponse',
2470
+ 'ResolvePendingAskRequest',
2471
+ 'ResolvePendingAskResponse',
2472
+ 'ListPendingAsksResponse',
2473
+ 'ContentQueryPayload',
2474
+ 'ContentQueryResult',
2274
2475
  // The roles / access-control closure. `AceConditions` is closed too, and has to be listed by
2275
2476
  // name: it is a hoisted component, so the parent's strict policy does not reach it.
2276
2477
  // `PropertyConditions` is deliberately absent — it is a map whose `additionalProperties` is a
@@ -2350,7 +2551,7 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
2350
2551
  'ProjectConfiguration',
2351
2552
  'UpdateProjectPayload',
2352
2553
  'UpdateProjectConfigurationPayload',
2353
- // Every member of the `ModelOptions` union. All twenty-three are published closed today, and
2554
+ // Every member of the `ModelOptions` union is published closed today, and
2354
2555
  // their Zod schemas are `strictObject`, so the published contract, the AJV enforcement and the
2355
2556
  // schema's own parse all reject the same undeclared option. `ModelOptions` itself is a union
2356
2557
  // and takes no `additionalProperties`, and neither do the four hoisted enums.
@@ -2358,9 +2559,11 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
2358
2559
  // `JSONSchema` is deliberately absent: it is OPEN by design and by long-standing publication —
2359
2560
  // a JSON Schema carries keywords the type never enumerated. `JSONSchemaProperties` is a map.
2360
2561
  'TextFallbackOptions',
2562
+ 'AzureFoundryChatOptions',
2361
2563
  'ImagenOptions',
2362
2564
  'VertexAIClaudeOptions',
2363
2565
  'VertexAIGeminiOptions',
2566
+ 'VertexAIGeminiOmniVideoOptions',
2364
2567
  'VertexAIGrokOptions',
2365
2568
  'NovaCanvasOptions',
2366
2569
  'BedrockConverseOptions',
@@ -2379,7 +2582,9 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
2379
2582
  'OpenAiTextOptions',
2380
2583
  'OpenAiDalleOptions',
2381
2584
  'OpenAiGptImageOptions',
2585
+ 'XAIGrokImageOptions',
2382
2586
  'GroqOptions',
2587
+ 'MistralTextOptions',
2383
2588
  // The app-manifest leaves. Every object among them is published closed today, the nested `git`
2384
2589
  // block included, and it is spelled `strictObject` so the emission carries it directly. The five
2385
2590
  // enums take no `additionalProperties` at all.
@@ -2590,6 +2795,8 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
2590
2795
  'ViewResultMedia',
2591
2796
  'ViewBoardColumn',
2592
2797
  'ViewTableColumn',
2798
+ 'AgenticViewRerankConfiguration',
2799
+ 'ViewAgenticExecutionConfiguration',
2593
2800
  'AgenticViewSearchConfiguration',
2594
2801
  'ViewSearchFieldDefinition',
2595
2802
  'ViewRangeDefinition',
@@ -2691,6 +2898,7 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
2691
2898
  'WorkflowRunEvent',
2692
2899
  'ViewNavigationResult',
2693
2900
  'ViewExecutionQueryPlan',
2901
+ 'ViewExecutionRerankResult',
2694
2902
  'ViewExecutionSearchConfiguration',
2695
2903
  'DSLRetryPolicy',
2696
2904
  'CreateContentObjectPayload',
@@ -2718,6 +2926,7 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
2718
2926
  'DSLActivitySpec',
2719
2927
  'DSLActivityStep',
2720
2928
  'ContentObjectApiResponse',
2929
+ 'ProjectedContentObjectApiResponse',
2721
2930
  'ComputeObjectFacetPayload',
2722
2931
  'EventSubscriptionFilter',
2723
2932
  'EventDeliverySummary',
@@ -2730,6 +2939,11 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
2730
2939
  'ListEventDeliveriesResponse',
2731
2940
  'ObjectSearchResponse',
2732
2941
  'WorkflowRunWithDetails',
2942
+ 'ViewSelectionConfiguration',
2943
+ 'ViewActionConfiguration',
2944
+ 'ViewActionsConfiguration',
2945
+ 'ViewUploadDropParameters',
2946
+ 'ViewDropConfiguration',
2733
2947
  'ViewResultsConfiguration',
2734
2948
  'ViewExecutionDefinition',
2735
2949
  'ViewExperienceConfiguration',
@@ -2768,6 +2982,14 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
2768
2982
  'OAuthProviderAuthorizeResponse',
2769
2983
  'OAuthProviderAccessTokenResponse',
2770
2984
  'OAuthProviderExchangePayload',
2985
+ 'OAuthClientDisplayMetadata',
2986
+ 'OAuthAuthorizeQuery',
2987
+ 'CreateOAuthAuthorizationRequestPayload',
2988
+ 'OAuthAuthorizationRequest',
2989
+ 'ApproveOAuthAuthorizationRequestPayload',
2990
+ 'OAuthGrantableScopesResponse',
2991
+ 'OAuthAuthorizationDecisionResponse',
2992
+ 'OAuthDeviceAuthorizationRequest',
2771
2993
  'OAuthClient',
2772
2994
  'OAuthClientCreateResponse',
2773
2995
  'OAuthClientScopeMetadata',
@@ -2836,16 +3058,19 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
2836
3058
  'TextResult',
2837
3059
  'JsonResult',
2838
3060
  'ImageResult',
3061
+ 'VideoResult',
2839
3062
  'ExecutionTokenUsage',
2840
3063
  'StatelessExecutionOptions',
2841
3064
  'SchemaRef',
2842
3065
  'CachePolicy',
2843
3066
  'PromptModalities',
2844
3067
  'PromptTemplate',
3068
+ 'InteractionPromptTemplateInput',
2845
3069
  'PromptTemplateCreatePayload',
2846
3070
  'PromptTemplateUpdatePayload',
2847
3071
  'PromptTemplateRef',
2848
3072
  'PromptSegmentDef',
3073
+ 'InteractionPromptSegmentInput',
2849
3074
  'PromptSegmentRef_PromptTemplateRef',
2850
3075
  'InCodePrompt',
2851
3076
  'Interaction',
@@ -2934,6 +3159,11 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
2934
3159
  'ValidateToolNamesPayload',
2935
3160
  'ToolValidationResult',
2936
3161
  'AggregatedTool',
3162
+ 'ToolRuntimeContext',
3163
+ 'ProcessToolCompatibilityReason',
3164
+ 'ProcessToolCompatibility',
3165
+ 'InspectProjectToolQuery',
3166
+ 'ToolInspection',
2937
3167
  'ValidateToolNamesResponse',
2938
3168
  'RenderPromptResponse',
2939
3169
  'PromptTemplateInteractionVersion',
@@ -3019,6 +3249,7 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
3019
3249
  'AppRepoDocumentCommit',
3020
3250
  'AppVersionGitSource',
3021
3251
  'StartAppScaffoldRequest',
3252
+ 'StartAppDevelopmentTaskRequest',
3022
3253
  'StartAppBuildRequest',
3023
3254
  'AgentToolDefinition',
3024
3255
  'AppDevelopmentTaskList',
@@ -3037,6 +3268,7 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
3037
3268
  'AppInstallationPayload',
3038
3269
  'AppDevelopmentTaskDetails',
3039
3270
  'AppInstallationsQuery',
3271
+ 'AppsQuery',
3040
3272
  'AppInstallationProjectsQuery',
3041
3273
  'SystemPackageQuery',
3042
3274
  'WebsiteCredentialTotpMetadata',
@@ -3071,6 +3303,7 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
3071
3303
  'DeleteSecretResponse',
3072
3304
  'WebsiteCredentialMetadata',
3073
3305
  'AppManifestData',
3306
+ 'UpdateAppPayload',
3074
3307
  'WebsiteCredentialMetadataUpdate',
3075
3308
  'AskUserWebhookConfigurationInput',
3076
3309
  'ResendConfigurationInput',
@@ -3099,13 +3332,20 @@ const STRICT_COMPONENTS: ReadonlySet<string> = new Set<string>([
3099
3332
  'BucketReadAccessStatusResponse',
3100
3333
  'EnsureBucketReadAccessPayload',
3101
3334
  'EnsureBucketReadAccessResponse',
3335
+ 'BucketCreateAccessQuery',
3336
+ 'BucketCreateAccessStatusResponse',
3337
+ 'EnsureBucketCreateAccessPayload',
3338
+ 'EnsureBucketCreateAccessResponse',
3102
3339
  'MigrateInteractionsPayload',
3103
3340
  'MigrateInteractionsResult',
3104
3341
  'PricingSyncPayload',
3105
3342
  'PricingSyncDayResult',
3106
3343
  'PricingSyncResult',
3107
3344
  'ComputeRunFacetPayload',
3345
+ 'FindRunResult',
3346
+ 'FindRunResultArray',
3108
3347
  'RunSearchMetaResponse',
3348
+ 'ComputeRunFacetsResponse',
3109
3349
  'ToolResultsPayload',
3110
3350
  'UserMessagePayload',
3111
3351
  'ExecutionResponse',
@@ -3154,122 +3394,19 @@ function emitRawSchemas(): Record<string, unknown> {
3154
3394
  }
3155
3395
 
3156
3396
  /**
3157
- * The canonical `components.schemas` for all documented endpoints.
3397
+ * Converts the whole Zod registry into the canonical `components.schemas`.
3158
3398
  *
3159
- * This exact object is what the OpenAPI spec publishes AND what AJV compiles, so the published
3160
- * contract and the enforced contract cannot diverge.
3161
- */
3162
- export const ApiSchemaComponents: Readonly<Record<string, JsonObject>> = toOpenApiComponents(emitRawSchemas(), {
3163
- strictComponents: STRICT_COMPONENTS,
3164
- });
3165
-
3166
- /**
3167
- * A canonical component as a SELF-CONTAINED JSON Schema, for consumers that compile it directly.
3399
+ * This is the BUILD-TIME half of the contract. Its result is written to
3400
+ * `../api-contract/components.generated.json` by `scripts/gen-api-components.ts`, and that artifact
3401
+ * — not this function — is what serving processes load as `ApiSchemaComponents`. Calling this
3402
+ * requires the ~85 MB Zod object graph, which is precisely what the artifact exists to keep out of
3403
+ * the servers; see the comment at the top of `../api-contract/index.ts`.
3168
3404
  *
3169
- * The published component `$ref`s its neighbours through `#/components/schemas/...`, which resolves
3170
- * only inside the OpenAPI document. AJV and the Monaco editor need a document they can compile on
3171
- * its own, so the transitive closure is inlined under `$defs` and the pointers rewritten. Nothing
3172
- * about the shapes changes — this is a re-rooting of the same objects, plus the removal of the
3173
- * OpenAPI-only discriminator keywords described below, which is what lets a generated artifact be
3174
- * compared with the component it came from.
3405
+ * Callers are the generator and `../api-contract/components.contract.test.ts`, which compares the
3406
+ * two and fails on drift. Everything else should read `ApiSchemaComponents`.
3175
3407
  */
3176
- export function bundleCanonicalComponent(name: ApiComponentName): JsonObject {
3177
- const seen = new Set<string>();
3178
- const queue: string[] = [name];
3179
- while (queue.length > 0) {
3180
- const current = queue.shift() as string;
3181
- if (seen.has(current)) continue;
3182
- seen.add(current);
3183
- for (const referenced of collectComponentRefs(ApiSchemaComponents[current])) {
3184
- if (!seen.has(referenced)) queue.push(referenced);
3185
- }
3186
- }
3187
- seen.delete(name);
3188
- const defs: JsonObject = {};
3189
- for (const dependency of [...seen].sort()) {
3190
- defs[dependency] = toPlainJsonSchema(ApiSchemaComponents[dependency]) as JsonObject;
3191
- }
3192
- const root = toPlainJsonSchema(ApiSchemaComponents[name]) as JsonObject;
3193
- return seen.size > 0 ? { ...root, $defs: defs } : root;
3194
- }
3195
-
3196
- const COMPONENT_REF_PREFIX = '#/components/schemas/';
3197
-
3198
- /**
3199
- * Re-roots the component pointers AND drops the discriminator keywords, which are OpenAPI's, not
3200
- * JSON Schema's.
3201
- *
3202
- * `synthesizeDiscriminator` in the adapter gives a discriminated union a `discriminator` plus a
3203
- * restated `type: 'object'` and `required: [propertyName]` ON THE UNION NODE, so a generated
3204
- * Java/Go client can pick a subtype from the union rather than the branches. That restatement is a
3205
- * codegen hint: the node carries no `properties`, so it says "an object that must have
3206
- * `_option_id`" while declaring nothing that could be one.
3207
- *
3208
- * A JSON Schema validator does not mind — `required` needs no matching `properties`, and each
3209
- * branch requires the same key anyway, so removing all three is validation-neutral. Gemini's
3210
- * function-declaration validator does mind, and rejects the whole tool:
3211
- *
3212
- * schema at properties.intake.properties.extraction.properties.config.properties.model_options
3213
- * requires unspecified property '_option_id'
3214
- *
3215
- * That was a 400 on every agent turn offering `create_or_update_type`, because the intake-policy
3216
- * artifact reaches Vertex inside that tool's input schema. Stripping here rather than at the tool
3217
- * keeps the next component someone bundles from reintroducing it. The OpenAPI document is untouched
3218
- * — `ApiSchemaComponents` still carries the hint, and the generated clients still read it.
3219
- */
3220
- function toPlainJsonSchema(value: unknown): unknown {
3221
- const rerooted = rerootComponentRefs(value);
3222
- return stripDiscriminators(rerooted);
3223
- }
3224
-
3225
- function stripDiscriminators(value: unknown): unknown {
3226
- if (Array.isArray(value)) return value.map(stripDiscriminators);
3227
- if (!value || typeof value !== 'object') return value;
3228
- const node = value as JsonObject;
3229
- // `properties` present means the node describes an object in its own right, so its `type` and
3230
- // `required` are the schema's own rather than the restatement — only the OpenAPI keyword goes.
3231
- const restated = node.discriminator !== undefined && node.properties === undefined;
3232
- const out: JsonObject = {};
3233
- for (const [key, item] of Object.entries(node)) {
3234
- if (key === 'discriminator') continue;
3235
- if (restated && (key === 'type' || key === 'required')) continue;
3236
- out[key] = stripDiscriminators(item) as never;
3237
- }
3238
- return out;
3239
- }
3240
-
3241
- function collectComponentRefs(value: unknown, out = new Set<string>()): Set<string> {
3242
- if (Array.isArray(value)) {
3243
- for (const item of value) collectComponentRefs(item, out);
3244
- return out;
3245
- }
3246
- if (!value || typeof value !== 'object') return out;
3247
- for (const [key, item] of Object.entries(value)) {
3248
- if (key === '$ref' && typeof item === 'string' && item.startsWith(COMPONENT_REF_PREFIX)) {
3249
- out.add(item.slice(COMPONENT_REF_PREFIX.length));
3250
- } else {
3251
- collectComponentRefs(item, out);
3252
- }
3253
- }
3254
- return out;
3255
- }
3256
-
3257
- function rerootComponentRefs(value: unknown): unknown {
3258
- if (Array.isArray(value)) return value.map(rerootComponentRefs);
3259
- if (!value || typeof value !== 'object') return value;
3260
- const out: JsonObject = {};
3261
- for (const [key, item] of Object.entries(value)) {
3262
- out[key] =
3263
- key === '$ref' && typeof item === 'string' && item.startsWith(COMPONENT_REF_PREFIX)
3264
- ? `#/$defs/${item.slice(COMPONENT_REF_PREFIX.length)}`
3265
- : (rerootComponentRefs(item) as never);
3266
- }
3267
- return out;
3268
- }
3269
-
3270
- /** The `$ref` pointer for a component, in the same spelling the spec publishes. */
3271
- export function apiComponentRef(name: ApiComponentName): string {
3272
- return `#/components/schemas/${name}`;
3408
+ export function buildApiSchemaComponents(): Readonly<Record<string, JsonObject>> {
3409
+ return toOpenApiComponents(emitRawSchemas(), { strictComponents: STRICT_COMPONENTS });
3273
3410
  }
3274
3411
 
3275
3412
  /**
@@ -3338,332 +3475,28 @@ export type ApiComponentType<N extends ApiComponentName> = N extends keyof ZenoR
3338
3475
  export type ApiSchemaOf<N extends ApiComponentName> = ApiComponentType<N>;
3339
3476
 
3340
3477
  /**
3341
- * Validators compiled against the published components, through an envelope so the pointer AJV
3342
- * resolves is the exact pointer the spec publishes. `strictSchema: false` tolerates the
3343
- * `components` wrapper while leaving type and tuple checks active.
3344
- *
3345
- * Compiled lazily and cached: AJV compilation is the expensive step, and most components are
3346
- * never validated in a given process.
3347
- */
3348
- const validators = new Map<string, ValidateFunction>();
3349
-
3350
- /**
3351
- * One instance for the process, built on first validation.
3352
- *
3353
- * Per-component instances meant re-registering the whole thousand-component envelope for every
3354
- * component ever validated, and AJV walks a schema when it is added. Sharing one instance also lets
3355
- * it reuse the compiled form of a component that two others reference.
3356
- */
3357
- let ajvInstance: Ajv2020 | undefined;
3358
-
3359
- /**
3360
- * The published components as AJV can consume them: the same schemas, with the two adjustments
3361
- * AJV's discriminator support requires and the OpenAPI document must not have.
3362
- *
3363
- * `discriminator: true` below is what makes AJV validate a discriminated union through the branch
3364
- * its tag names, instead of trying every branch and reporting all of their failures at once. The
3365
- * difference is not cosmetic — a legacy MCP tool collection missing `id` used to report the real
3366
- * error alongside two impossible ones from the branch it was never meant to match:
3367
- *
3368
- * / must have required property 'id' <- the real one
3369
- * / must NOT have additional properties: oauth_app <- vertesia_sdk branch
3370
- * /type must be equal to constant <- vertesia_sdk branch
3371
- * / must match exactly one schema in oneOf
3372
- *
3373
- * AJV rejects `mapping` outright ("discriminator: mapping is not supported"), because it derives
3374
- * the tag-to-branch map from each branch's own `const`/`enum` instead. The OpenAPI document still
3375
- * needs the mapping — a generated Java or Go client reads it to pick a concrete subtype — so both
3376
- * fixups here apply to AJV's copy only, and `ApiSchemaComponents` is published exactly as built.
3478
+ * The runtime half of the contract, re-exported so this module stays the single import for schema
3479
+ * authors, the OpenAPI generator and the contract tests.
3377
3480
  *
3378
- * AJV's remaining requirements — the tag required in every branch, carrying `const` or a
3379
- * single-valued `enum`, with the union node typed as an object — are what `synthesizeDiscriminator`
3380
- * in the adapter already checks before it emits a discriminator at all, and what the hand-written
3381
- * `.meta({ discriminator })` declarations restate. `api-discriminators.test.ts` compiles every
3382
- * registered component so a union satisfying neither fails the build rather than the request.
3481
+ * The implementations live in `../api-contract/index.ts` because they must not depend on Zod: they
3482
+ * validate against the prebuilt `components.generated.json`, which is what lets the servers enforce
3483
+ * contracts without loading the ~85 MB Zod graph. Importing them from HERE pulls that graph in, so
3484
+ * server code must import `@vertesia/common/api-contract` directly. This re-export is for the
3485
+ * build-time and test consumers that have already paid for zod.
3383
3486
  */
3384
- function toAjvComponents(): Record<string, JsonObject> {
3385
- const schemas = structuredClone(ApiSchemaComponents) as Record<string, JsonObject>;
3386
- const resolve = (value: unknown): JsonObject | undefined => {
3387
- if (!isPlainObject(value)) return undefined;
3388
- const ref = value.$ref;
3389
- if (typeof ref !== 'string' || !ref.startsWith(COMPONENT_REF_PREFIX)) return value;
3390
- return schemas[ref.slice(COMPONENT_REF_PREFIX.length)];
3391
- };
3392
-
3393
- visitSchemaNodes(schemas, (node) => {
3394
- const discriminator = node.discriminator;
3395
- if (!isPlainObject(discriminator) || !Array.isArray(node.oneOf)) return;
3396
- // AJV derives the tag-to-branch map from each branch's own literal, so `mapping` is both
3397
- // redundant and rejected.
3398
- delete discriminator.mapping;
3399
-
3400
- const tag = discriminator.propertyName;
3401
- if (typeof tag !== 'string') return;
3402
- for (const member of node.oneOf) {
3403
- const branch = resolve(member);
3404
- const properties = branch && isPlainObject(branch.properties) ? branch.properties : undefined;
3405
- const tagSchema = properties?.[tag];
3406
- if (!isPlainObject(tagSchema) || tagSchema.const !== undefined || tagSchema.enum !== undefined) continue;
3407
- // The tag is a `$ref` to a named literal component — `TaskType_ACTIVITY`,
3408
- // `SupportedIntegrations_gladia` — because the literal carries its own `.meta({ id })`.
3409
- // AJV reads `properties/<tag>` looking for `const` or `enum` and does not follow a
3410
- // `$ref` to find one, so it refuses to compile the union at all. Restating the resolved
3411
- // literal ALONGSIDE the `$ref` is validation-neutral: `$ref` has no special precedence
3412
- // in 2020-12, both keywords apply, and they carry the same value by construction.
3413
- const target = resolve(tagSchema);
3414
- if (!target) continue;
3415
- if (target.const !== undefined) tagSchema.const = target.const;
3416
- else if (Array.isArray(target.enum)) tagSchema.enum = target.enum;
3417
- }
3418
- });
3419
- return schemas;
3420
- }
3421
-
3422
- /** Every object node in the component graph, parents before children. */
3423
- function visitSchemaNodes(value: unknown, visit: (node: JsonObject) => void): void {
3424
- if (Array.isArray(value)) {
3425
- for (const item of value) visitSchemaNodes(item, visit);
3426
- return;
3427
- }
3428
- if (!isPlainObject(value)) return;
3429
- visit(value);
3430
- for (const item of Object.values(value)) visitSchemaNodes(item, visit);
3431
- }
3432
-
3433
- function getAjv(): Ajv2020 {
3434
- if (ajvInstance) return ajvInstance;
3435
- const ajv = new Ajv2020({ strictSchema: false, allErrors: true, discriminator: true });
3436
- // Without this, AJV treats `format` as an annotation and ignores it, so a `date-time` property
3437
- // would document a constraint nothing checks — the exact spec/enforcement gap this design is
3438
- // meant to close.
3439
- addFormats(ajv);
3440
- ajv.addSchema({ $id: 'vertesia://openapi', components: { schemas: toAjvComponents() } });
3441
- ajvInstance = ajv;
3442
- return ajv;
3443
- }
3444
-
3445
- function getValidator(name: ApiComponentName): ValidateFunction {
3446
- const cached = validators.get(name);
3447
- if (cached) return cached;
3448
- const validate = getAjv().compile({ $ref: `vertesia://openapi${apiComponentRef(name)}` });
3449
- validators.set(name, validate);
3450
- return validate;
3451
- }
3452
-
3453
- function additionalProperty(error: { params?: unknown }): string | undefined {
3454
- // AJV writes "must NOT have additional properties" and puts the offending key in `params`,
3455
- // so the message alone says a body is wrong without saying which property made it wrong.
3456
- // Every other keyword names its subject already — `required` quotes the missing property,
3457
- // `enum` and `type` describe the value in place — and this is the one a caller most often
3458
- // trips, so it is the one worth spelling out rather than reformatting all of them.
3459
- return (error.params as { additionalProperty?: string } | undefined)?.additionalProperty;
3460
- }
3461
-
3462
- /**
3463
- * One validation failure, with the undeclared property names kept AS NAMES.
3464
- *
3465
- * The structure exists because the rendered line cannot be taken apart again. Property names are
3466
- * arbitrary JSON strings: `{"customer secret token": 1}` and `{"a, b": 1}` are both valid, so
3467
- * neither a space nor a comma is a reliable separator once the names have been joined. Any consumer
3468
- * that needs to shorten the list — the HTTP boundary does, the log does not — has to do it here,
3469
- * on the array, where a name can be dropped whole.
3470
- */
3471
- export interface ApiValidationIssue {
3472
- /**
3473
- * AJV's `instancePath` for the failing value, with `'/'` substituted for the root.
3474
- *
3475
- * Not quite a JSON Pointer: the pointer for a document root is the empty string, which reads as
3476
- * a missing path in a message. `'/'` is a display sentinel, so treat this as human-facing rather
3477
- * than as something to resolve against the payload.
3478
- */
3479
- path: string;
3480
- /** AJV's own message, e.g. `must NOT have additional properties`. */
3481
- message: string;
3482
- /** Undeclared property names at {@link path}, in the order AJV reported them. */
3483
- undeclared?: string[];
3484
- }
3485
-
3486
- /**
3487
- * The failures, with all undeclared properties at a given path gathered into ONE issue.
3488
- *
3489
- * AJV reports `additionalProperties` per property, so a value carrying a whole foreign object —
3490
- * a Mongoose document that reached the response mapper unmapped, say — produces one error per own
3491
- * key and buries every other failure in the payload. Gathering is lossless: every name is kept, in
3492
- * the order AJV found it, on the issue for the path it belongs to.
3493
- */
3494
- function collectIssues(validate: ValidateFunction): ApiValidationIssue[] {
3495
- const errors = validate.errors ?? [];
3496
- const undeclaredByPath = new Map<string, Set<string>>();
3497
- for (const error of errors) {
3498
- const additional = additionalProperty(error);
3499
- if (additional === undefined) continue;
3500
- const where = error.instancePath || '/';
3501
- const names = undeclaredByPath.get(where);
3502
- // A union whose branches all reject the same property reports it once per branch. The name
3503
- // is the same fact each time, so it is listed once.
3504
- if (names) names.add(additional);
3505
- else undeclaredByPath.set(where, new Set([additional]));
3506
- }
3507
-
3508
- const gathered = new Set<string>();
3509
- const issues: ApiValidationIssue[] = [];
3510
- for (const error of errors) {
3511
- const path = error.instancePath || '/';
3512
- const message = error.message ?? 'is invalid';
3513
- if (additionalProperty(error) === undefined) {
3514
- issues.push({ path, message });
3515
- continue;
3516
- }
3517
- if (gathered.has(path)) continue;
3518
- gathered.add(path);
3519
- issues.push({ path, message, undeclared: [...(undeclaredByPath.get(path) ?? [])] });
3520
- }
3521
- return issues;
3522
- }
3523
-
3524
- /**
3525
- * The complete rendering of one issue — every name, no budget.
3526
- *
3527
- * This is what gets logged. A caller-facing message renders from {@link ApiValidationIssue} itself
3528
- * with a length limit rather than shortening this string; see `reportableErrors` in the enforcer.
3529
- */
3530
- export function renderApiValidationIssue(issue: ApiValidationIssue): string {
3531
- const head = `${issue.path} ${issue.message}`;
3532
- return issue.undeclared?.length ? `${head}: ${issue.undeclared.join(', ')}` : head;
3533
- }
3534
-
3535
- /** The failed branch of every validator here, so the two views cannot be built inconsistently. */
3536
- function invalidResult(validate: ValidateFunction): { valid: false; errors: string[]; issues: ApiValidationIssue[] } {
3537
- const issues = collectIssues(validate);
3538
- return { valid: false, errors: issues.map(renderApiValidationIssue), issues };
3539
- }
3540
-
3541
- export type ValidateApiPayloadResult<T> =
3542
- | { valid: true; data: T }
3543
- /**
3544
- * `errors` is the rendered form, complete and ready to log; `issues` is the same failures with
3545
- * the property names still separable. Shorten from `issues`, never from `errors`.
3546
- */
3547
- | { valid: false; errors: string[]; issues: ApiValidationIssue[] };
3548
-
3549
- /**
3550
- * Validates an untyped request body against the component the endpoint publishes.
3551
- *
3552
- * Non-mutating by design. AJV's removal modes are never used here: the server would then accept a
3553
- * body the published schema declares invalid, silently disagreeing with its own spec — and
3554
- * `removeAdditional: 'all'` additionally empties freeform maps. An undeclared property is reported,
3555
- * not deleted.
3556
- *
3557
- * The component type is handed back only on the `valid` branch, so a body missing required fields
3558
- * cannot be typed as complete. What the caller does with a failure — reject, or log and continue —
3559
- * is the endpoint's policy, not this function's.
3560
- */
3561
- export function validateApiRequest<N extends ApiComponentName>(
3562
- name: N,
3563
- value: unknown,
3564
- ): ValidateApiPayloadResult<ApiComponentType<N>> {
3565
- const validate = getValidator(name);
3566
- if (validate(value)) {
3567
- return { valid: true, data: value as ApiComponentType<N> };
3568
- }
3569
- return invalidResult(validate);
3570
- }
3571
-
3572
- /**
3573
- * Validates an already-mapped response against the component it is published as.
3574
- *
3575
- * Separate from {@link pruneAndValidateApiResponse} because a resource mapper has already produced
3576
- * the wire shape: there is nothing to prune, and pruning would only mask a mapper bug. Use this at
3577
- * the response boundary to detect drift between what the mapper builds and what the spec promises.
3578
- */
3579
- export function validateApiResponse<N extends ApiComponentName>(
3580
- name: N,
3581
- value: unknown,
3582
- ): ValidateApiPayloadResult<ApiComponentType<N>> {
3583
- const validate = getValidator(name);
3584
- if (validate(value)) {
3585
- return { valid: true, data: value as ApiComponentType<N> };
3586
- }
3587
- return invalidResult(validate);
3588
- }
3589
-
3590
- /**
3591
- * Best-effort normalization of a response payload towards the fields its published component
3592
- * declares. Use this on the response path INSTEAD of an AJV removal mode, which would empty
3593
- * freeform maps such as `Account.feature_flags`.
3594
- *
3595
- * NOT a secret-removal boundary. Ambiguous schema shapes pass values through untouched — see
3596
- * {@link pruneToSchema} and check a component with {@link findUnprunablePaths} before treating its
3597
- * output as closed. Fields that must never ship still need an explicit response mapper.
3598
- *
3599
- * Never throws and never rejects: an undocumented field is server-side drift, and failing the
3600
- * response would punish the caller for it.
3601
- *
3602
- * Takes a value the caller has already typed as the component. Pruning only REMOVES undeclared
3603
- * extras, so a conforming input yields a conforming output and the return type is honest. It does
3604
- * NOT validate, which is why it cannot accept `unknown` — narrowing a payload that is missing
3605
- * required fields would hand TypeScript a complete `Account` that does not exist at runtime. Use
3606
- * {@link pruneAndValidateApiResponse} when the payload's shape is not already established.
3607
- *
3608
- * Request validation stays separate and non-mutating — pruning a request would make the server
3609
- * silently disagree with the permissive schema it publishes.
3610
- */
3611
- export function pruneApiResponse<N extends ApiComponentName>(name: N, value: ApiComponentType<N>): ApiComponentType<N> {
3612
- return pruneToSchema(value, { $ref: apiComponentRef(name) }, ApiSchemaComponents) as ApiComponentType<N>;
3613
- }
3614
-
3615
- export type PruneAndValidateResult<T> =
3616
- | { valid: true; data: T }
3617
- | { valid: false; data: unknown; errors: string[]; issues: ApiValidationIssue[] };
3618
-
3619
- /**
3620
- * Prunes an untyped payload and validates the result against the published component.
3621
- *
3622
- * The only sound entry point for a payload of unknown shape: the component type is handed back
3623
- * exclusively on the `valid` branch, so a document missing required fields cannot be typed as
3624
- * complete. On failure the pruned value is still returned — the caller decides whether to ship it
3625
- * and log, or fail — which keeps the "never turn drift into a 500" property a policy choice rather
3626
- * than something baked in here.
3627
- *
3628
- */
3629
- export function pruneAndValidateApiResponse<N extends ApiComponentName>(
3630
- name: N,
3631
- value: unknown,
3632
- ): PruneAndValidateResult<ApiComponentType<N>> {
3633
- const pruned = pruneToSchema(value, { $ref: apiComponentRef(name) }, ApiSchemaComponents);
3634
- const validate = getValidator(name);
3635
- if (validate(pruned)) {
3636
- return { valid: true, data: pruned as ApiComponentType<N> };
3637
- }
3638
- return { ...invalidResult(validate), data: pruned };
3639
- }
3640
-
3641
- /**
3642
- * Paths inside a component where pruning cannot narrow. Empty means no STRUCTURAL gaps for
3643
- * schema-conforming input — see {@link findUnprunablePaths} for why that is weaker than "nothing
3644
- * can escape". Anything listed needs an explicit response mapper.
3645
- */
3646
- export function findUnprunableApiPaths(name: ApiComponentName): string[] {
3647
- return findUnprunablePaths({ $ref: apiComponentRef(name) }, ApiSchemaComponents);
3648
- }
3649
-
3650
- /**
3651
- * Normalizes raw query or header text into the value a component describes.
3652
- *
3653
- * Binds {@link normalizeParameters} to {@link ApiSchemaComponents} — the same objects the OpenAPI
3654
- * document publishes and {@link validateApiRequest} compiles. That is what keeps the published
3655
- * parameter and the enforced one the same declaration: the scanner expands this component's
3656
- * properties into `in: query` parameters, and the coercion below is decided by those same property
3657
- * schemas, so neither can be changed without changing the other.
3658
- *
3659
- * Validate the result with {@link validateApiRequest}, which is non-coercing: everything type-related
3660
- * has already happened here, so a value this could not coerce is reported against the published
3661
- * schema rather than by a second rule.
3662
- */
3663
- export function normalizeApiParameters(
3664
- name: ApiComponentName,
3665
- raw: RawApiParameters,
3666
- location: ApiParameterLocation,
3667
- ): NormalizedApiParameters {
3668
- return normalizeParameters(name, raw, location, ApiSchemaComponents[name], ApiSchemaComponents);
3669
- }
3487
+ export {
3488
+ ApiSchemaComponents,
3489
+ type ApiValidationIssue,
3490
+ apiComponentRef,
3491
+ bundleCanonicalComponent,
3492
+ findUnprunableApiPaths,
3493
+ normalizeApiParameters,
3494
+ type PruneAndValidateResult,
3495
+ pruneAndValidateApiResponse,
3496
+ pruneApiResponse,
3497
+ renderApiValidationIssue,
3498
+ renderApiValidationIssueHead,
3499
+ type ValidateApiPayloadResult,
3500
+ validateApiRequest,
3501
+ validateApiResponse,
3502
+ } from '../api-contract/index.js';