@apifuse/provider-sdk 2.2.0-beta.7 → 2.2.0-beta.70

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 (478) hide show
  1. package/AUTHORING.md +943 -51
  2. package/CHANGELOG.md +273 -1
  3. package/LICENSE +21 -0
  4. package/README.md +117 -29
  5. package/SUBMISSION.md +3 -2
  6. package/bin/apifuse-check.ts +293 -13
  7. package/bin/apifuse-dev.ts +42 -19
  8. package/bin/apifuse-migrate-deployment.ts +200 -0
  9. package/bin/apifuse-migrate-operation-declaration.ts +55 -0
  10. package/bin/apifuse-migrate-shape.ts +202 -0
  11. package/bin/apifuse-pack-check.ts +19 -6
  12. package/bin/apifuse-pack-smoke.ts +57 -2
  13. package/bin/apifuse-pack-types.ts +736 -38
  14. package/bin/apifuse-perf.ts +59 -23
  15. package/bin/apifuse-record.ts +923 -94
  16. package/bin/apifuse-submit-check.ts +2313 -281
  17. package/bin/apifuse-test.ts +3 -1
  18. package/bin/submit-check-delimited-text.ts +50 -0
  19. package/dist/auth-turn/index.d.ts +3 -3
  20. package/dist/auth-turn/index.js +1 -1
  21. package/dist/auth.d.ts +14 -0
  22. package/dist/auth.js +67 -0
  23. package/dist/ceremonies/index.d.ts +16 -0
  24. package/dist/ceremonies/index.js +141 -36
  25. package/dist/cli/commands.d.ts +1 -1
  26. package/dist/cli/commands.js +30 -0
  27. package/dist/cli/create.d.ts +1 -1
  28. package/dist/cli/create.js +8 -2
  29. package/dist/cli/deployment-intent.d.ts +178 -0
  30. package/dist/cli/deployment-intent.js +277 -0
  31. package/dist/cli/local-connection.d.ts +111 -0
  32. package/dist/cli/local-connection.js +151 -0
  33. package/dist/cli/migrate-deployment-intent.d.ts +132 -0
  34. package/dist/cli/migrate-deployment-intent.js +1552 -0
  35. package/dist/cli/migrate-operation-declaration.d.ts +70 -0
  36. package/dist/cli/migrate-operation-declaration.js +2206 -0
  37. package/dist/cli/migrate-operation-shape.d.ts +44 -0
  38. package/dist/cli/migrate-operation-shape.js +113 -0
  39. package/dist/cli/migrate-provider-shape.d.ts +56 -0
  40. package/dist/cli/migrate-provider-shape.js +580 -0
  41. package/dist/cli/resolver-runtime.d.ts +21 -0
  42. package/dist/cli/resolver-runtime.js +31 -0
  43. package/dist/cli/templates/provider/.agents/skills/health-checks-and-fail-closed/SKILL.md.tpl +141 -23
  44. package/dist/cli/templates/provider/Dockerfile.tpl +1 -1
  45. package/dist/cli/templates/provider/README.md.tpl +41 -19
  46. package/dist/cli/templates/provider/index.ts.tpl +6 -3
  47. package/dist/cli/templates/provider/operations/ping.ts.tpl +4 -1
  48. package/dist/cli/templates/provider/provider.json.tpl +6 -0
  49. package/dist/config/loader.d.ts +202 -16
  50. package/dist/config/loader.js +491 -141
  51. package/dist/contract-serialization.js +4 -8
  52. package/dist/contract-types.d.ts +12 -5
  53. package/dist/contract.js +24 -10
  54. package/dist/declaration-validation.d.ts +34 -0
  55. package/dist/declaration-validation.js +305 -0
  56. package/dist/define.d.ts +71 -29
  57. package/dist/define.js +807 -69
  58. package/dist/dev.d.ts +5 -0
  59. package/dist/dev.js +8 -1
  60. package/dist/engine.d.ts +129 -0
  61. package/dist/engine.js +209 -0
  62. package/dist/error-observability.d.ts +7 -0
  63. package/dist/error-observability.js +61 -0
  64. package/dist/error-resolution.d.ts +18 -0
  65. package/dist/error-resolution.js +243 -0
  66. package/dist/errors.d.ts +74 -0
  67. package/dist/errors.js +99 -0
  68. package/dist/fixture-sanitization.d.ts +28 -0
  69. package/dist/fixture-sanitization.js +371 -0
  70. package/dist/handle-meta.d.ts +90 -0
  71. package/dist/handle-meta.js +73 -0
  72. package/dist/handle.d.ts +226 -0
  73. package/dist/handle.js +345 -0
  74. package/dist/health-scenario.d.ts +1901 -0
  75. package/dist/health-scenario.js +653 -0
  76. package/dist/i18n/catalog.js +21 -1
  77. package/dist/i18n/error-messages.d.ts +86 -0
  78. package/dist/i18n/error-messages.js +192 -0
  79. package/dist/i18n/index.d.ts +1 -0
  80. package/dist/i18n/index.js +1 -0
  81. package/dist/i18n/keys.d.ts +12 -0
  82. package/dist/i18n/keys.js +76 -5
  83. package/dist/i18n/operation-locale-namespace.d.ts +2 -0
  84. package/dist/i18n/operation-locale-namespace.js +7 -0
  85. package/dist/index.d.ts +40 -15
  86. package/dist/index.js +29 -11
  87. package/dist/lint.d.ts +43 -11
  88. package/dist/lint.js +2512 -177
  89. package/dist/native-address.d.ts +43 -0
  90. package/dist/native-address.js +281 -0
  91. package/dist/native-egress-policy.d.ts +31 -0
  92. package/dist/native-egress-policy.js +288 -0
  93. package/dist/observability.d.ts +5 -2
  94. package/dist/observability.js +48 -1
  95. package/dist/provider.d.ts +18 -8
  96. package/dist/provider.js +11 -6
  97. package/dist/runtime/auth-flow.d.ts +6 -1
  98. package/dist/runtime/auth-flow.js +8 -0
  99. package/dist/runtime/bounded-expiring-map.d.ts +21 -0
  100. package/dist/runtime/bounded-expiring-map.js +64 -0
  101. package/dist/runtime/browser-telemetry-binding.d.ts +5 -0
  102. package/dist/runtime/browser-telemetry-binding.js +83 -0
  103. package/dist/runtime/browser-telemetry.d.ts +76 -0
  104. package/dist/runtime/browser-telemetry.js +165 -0
  105. package/dist/runtime/browser.d.ts +4 -0
  106. package/dist/runtime/browser.js +688 -83
  107. package/dist/runtime/cache-telemetry.d.ts +71 -0
  108. package/dist/runtime/cache-telemetry.js +177 -0
  109. package/dist/runtime/cache.d.ts +3 -0
  110. package/dist/runtime/cache.js +245 -23
  111. package/dist/runtime/capability-response.d.ts +3 -0
  112. package/dist/runtime/capability-response.js +56 -0
  113. package/dist/runtime/capability-telemetry.d.ts +46 -0
  114. package/dist/runtime/capability-telemetry.js +68 -0
  115. package/dist/runtime/chrome149-header-order.d.ts +58 -0
  116. package/dist/runtime/chrome149-header-order.js +289 -0
  117. package/dist/runtime/diagnostic-env-values.d.ts +5 -0
  118. package/dist/runtime/diagnostic-env-values.js +57 -0
  119. package/dist/runtime/diagnostic-env.d.ts +14 -0
  120. package/dist/runtime/diagnostic-env.js +44 -0
  121. package/dist/runtime/diagnostic-redactor.d.ts +54 -0
  122. package/dist/runtime/diagnostic-redactor.js +571 -0
  123. package/dist/runtime/egress-lease.d.ts +65 -0
  124. package/dist/runtime/egress-lease.js +236 -0
  125. package/dist/runtime/engine-mode.d.ts +74 -0
  126. package/dist/runtime/engine-mode.js +152 -0
  127. package/dist/runtime/env.js +14 -1
  128. package/dist/runtime/executor.d.ts +3 -2
  129. package/dist/runtime/executor.js +23 -26
  130. package/dist/runtime/handle-wordlist.d.ts +43 -0
  131. package/dist/runtime/handle-wordlist.js +256 -0
  132. package/dist/runtime/handle.d.ts +71 -0
  133. package/dist/runtime/handle.js +908 -0
  134. package/dist/runtime/http-telemetry-binding.d.ts +10 -0
  135. package/dist/runtime/http-telemetry-binding.js +152 -0
  136. package/dist/runtime/http-telemetry-guard.d.ts +16 -0
  137. package/dist/runtime/http-telemetry-guard.js +202 -0
  138. package/dist/runtime/http-telemetry.d.ts +104 -0
  139. package/dist/runtime/http-telemetry.js +190 -0
  140. package/dist/runtime/http.d.ts +34 -0
  141. package/dist/runtime/http.js +680 -121
  142. package/dist/runtime/insights.js +2 -2
  143. package/dist/runtime/instrumentation.d.ts +2 -2
  144. package/dist/runtime/instrumentation.js +462 -19
  145. package/dist/runtime/native-network-errors.d.ts +33 -0
  146. package/dist/runtime/native-network-errors.js +69 -0
  147. package/dist/runtime/native-network.d.ts +105 -0
  148. package/dist/runtime/native-network.js +1433 -0
  149. package/dist/runtime/native-telemetry.d.ts +142 -0
  150. package/dist/runtime/native-telemetry.js +231 -0
  151. package/dist/runtime/ocr-telemetry.d.ts +82 -0
  152. package/dist/runtime/ocr-telemetry.js +192 -0
  153. package/dist/runtime/ocr.d.ts +29 -0
  154. package/dist/runtime/ocr.js +468 -0
  155. package/dist/runtime/otlp.d.ts +71 -2
  156. package/dist/runtime/otlp.js +398 -16
  157. package/dist/runtime/provider.d.ts +7 -0
  158. package/dist/runtime/provider.js +14 -0
  159. package/dist/runtime/proxy-errors.js +6 -2
  160. package/dist/runtime/proxy-nodemaven.d.ts +56 -0
  161. package/dist/runtime/proxy-nodemaven.js +147 -0
  162. package/dist/runtime/proxy-retry-policy.d.ts +4 -1
  163. package/dist/runtime/proxy-retry-policy.js +11 -2
  164. package/dist/runtime/proxy-telemetry.d.ts +133 -3
  165. package/dist/runtime/proxy-telemetry.js +218 -70
  166. package/dist/runtime/redirect-hop-headers.d.ts +19 -0
  167. package/dist/runtime/redirect-hop-headers.js +58 -0
  168. package/dist/runtime/redirects.d.ts +61 -0
  169. package/dist/runtime/redirects.js +149 -0
  170. package/dist/runtime/redis.d.ts +1 -1
  171. package/dist/runtime/redis.js +4 -2
  172. package/dist/runtime/request-options.d.ts +75 -1
  173. package/dist/runtime/request-options.js +588 -0
  174. package/dist/runtime/request-telemetry.d.ts +70 -0
  175. package/dist/runtime/request-telemetry.js +229 -0
  176. package/dist/runtime/resolver-config.d.ts +13 -0
  177. package/dist/runtime/resolver-config.js +14 -0
  178. package/dist/runtime/resolver-public.d.ts +3 -0
  179. package/dist/runtime/resolver-public.js +1 -0
  180. package/dist/runtime/resolver-runtime-options.d.ts +14 -0
  181. package/dist/runtime/resolver-runtime-options.js +33 -0
  182. package/dist/runtime/resolver-shared.d.ts +24 -0
  183. package/dist/runtime/resolver-shared.js +69 -0
  184. package/dist/runtime/resolver-span-attributes.d.ts +34 -0
  185. package/dist/runtime/resolver-span-attributes.js +93 -0
  186. package/dist/runtime/resolver-telemetry.d.ts +135 -0
  187. package/dist/runtime/resolver-telemetry.js +204 -0
  188. package/dist/runtime/resolver-usage.d.ts +32 -0
  189. package/dist/runtime/resolver-usage.js +54 -0
  190. package/dist/runtime/resolver-vendors/bindings.d.ts +53 -0
  191. package/dist/runtime/resolver-vendors/bindings.js +45 -0
  192. package/dist/runtime/resolver-vendors/browser.d.ts +24 -0
  193. package/dist/runtime/resolver-vendors/browser.js +423 -0
  194. package/dist/runtime/resolver-vendors/capsolver.d.ts +22 -0
  195. package/dist/runtime/resolver-vendors/capsolver.js +544 -0
  196. package/dist/runtime/resolver-vendors/hosts.d.ts +23 -0
  197. package/dist/runtime/resolver-vendors/hosts.js +68 -0
  198. package/dist/runtime/resolver-vendors/hypersolutions.d.ts +27 -0
  199. package/dist/runtime/resolver-vendors/hypersolutions.js +369 -0
  200. package/dist/runtime/resolver-vendors/twocaptcha.d.ts +24 -0
  201. package/dist/runtime/resolver-vendors/twocaptcha.js +425 -0
  202. package/dist/runtime/resolver-vendors/types.d.ts +125 -0
  203. package/dist/runtime/resolver-vendors/types.js +106 -0
  204. package/dist/runtime/resolver.d.ts +79 -0
  205. package/dist/runtime/resolver.js +1094 -0
  206. package/dist/runtime/state-telemetry.d.ts +79 -0
  207. package/dist/runtime/state-telemetry.js +194 -0
  208. package/dist/runtime/state.d.ts +10 -1
  209. package/dist/runtime/state.js +322 -82
  210. package/dist/runtime/stealth-akamai-sbsd.d.ts +54 -0
  211. package/dist/runtime/stealth-akamai-sbsd.js +142 -0
  212. package/dist/runtime/stealth-cookies.d.ts +24 -0
  213. package/dist/runtime/stealth-cookies.js +131 -0
  214. package/dist/runtime/stealth-owned-headers.d.ts +39 -0
  215. package/dist/runtime/stealth-owned-headers.js +57 -0
  216. package/dist/runtime/stealth-telemetry.d.ts +92 -0
  217. package/dist/runtime/stealth-telemetry.js +179 -0
  218. package/dist/runtime/stealth.d.ts +45 -6
  219. package/dist/runtime/stealth.js +1775 -320
  220. package/dist/runtime/stt-telemetry.d.ts +77 -0
  221. package/dist/runtime/stt-telemetry.js +176 -0
  222. package/dist/runtime/stt.js +18 -19
  223. package/dist/runtime/timeout.d.ts +5 -0
  224. package/dist/runtime/timeout.js +12 -0
  225. package/dist/runtime/trace-config.d.ts +12 -0
  226. package/dist/runtime/trace-config.js +62 -0
  227. package/dist/runtime/trace.d.ts +17 -0
  228. package/dist/runtime/trace.js +176 -25
  229. package/dist/runtime-boundary-lint.d.ts +137 -0
  230. package/dist/runtime-boundary-lint.js +590 -0
  231. package/dist/schema.d.ts +20 -0
  232. package/dist/schema.js +72 -2
  233. package/dist/serve.d.ts +1 -1
  234. package/dist/serve.js +1 -1
  235. package/dist/server/error-observability.d.ts +1 -0
  236. package/dist/server/error-observability.js +1 -0
  237. package/dist/server/error-stack-frames.d.ts +35 -0
  238. package/dist/server/error-stack-frames.js +219 -0
  239. package/dist/server/index.d.ts +21 -2
  240. package/dist/server/index.js +11 -2
  241. package/dist/server/runtime-diagnostics.d.ts +165 -0
  242. package/dist/server/runtime-diagnostics.js +360 -0
  243. package/dist/server/sdk-version.d.ts +3 -0
  244. package/dist/server/sdk-version.js +19 -0
  245. package/dist/server/self-test-input-tokens.d.ts +2 -1
  246. package/dist/server/self-test-input-tokens.js +18 -14
  247. package/dist/server/self-test-redaction.js +8 -33
  248. package/dist/server/self-test.d.ts +18 -3
  249. package/dist/server/self-test.js +139 -76
  250. package/dist/server/sensitive-values.d.ts +26 -0
  251. package/dist/server/sensitive-values.js +137 -0
  252. package/dist/server/serve-implementation.d.ts +285 -0
  253. package/dist/server/serve-implementation.js +3172 -0
  254. package/dist/server/serve.d.ts +1 -75
  255. package/dist/server/serve.js +1 -1170
  256. package/dist/server/state-backend-report.d.ts +70 -0
  257. package/dist/server/state-backend-report.js +113 -0
  258. package/dist/server/trace-output.d.ts +7 -0
  259. package/dist/server/trace-output.js +111 -0
  260. package/dist/server/types.d.ts +37 -5
  261. package/dist/server/types.js +34 -1
  262. package/dist/stateful/errors.d.ts +19 -0
  263. package/dist/stateful/errors.js +24 -0
  264. package/dist/stateful/http-provider-event-emitter.d.ts +40 -0
  265. package/dist/stateful/http-provider-event-emitter.js +237 -0
  266. package/dist/stateful/http-session-owner-registry.d.ts +44 -0
  267. package/dist/stateful/http-session-owner-registry.js +210 -0
  268. package/dist/stateful/index.d.ts +18 -0
  269. package/dist/stateful/index.js +18 -0
  270. package/dist/stateful/provider-event-delivery-failures.d.ts +32 -0
  271. package/dist/stateful/provider-event-delivery-failures.js +43 -0
  272. package/dist/stateful/provider-event-pipeline-metrics.d.ts +46 -0
  273. package/dist/stateful/provider-event-pipeline-metrics.js +48 -0
  274. package/dist/stateful/provider-event-pipeline.d.ts +50 -0
  275. package/dist/stateful/provider-event-pipeline.js +1 -0
  276. package/dist/stateful/provider-events.d.ts +101 -0
  277. package/dist/stateful/provider-events.js +289 -0
  278. package/dist/stateful/session-key.d.ts +15 -0
  279. package/dist/stateful/session-key.js +86 -0
  280. package/dist/stateful/stateful-provider-adapter-context.d.ts +5 -0
  281. package/dist/stateful/stateful-provider-adapter-context.js +42 -0
  282. package/dist/stateful/stateful-provider-adapter-metrics.d.ts +15 -0
  283. package/dist/stateful/stateful-provider-adapter-metrics.js +21 -0
  284. package/dist/stateful/stateful-provider-adapter.d.ts +98 -0
  285. package/dist/stateful/stateful-provider-adapter.js +287 -0
  286. package/dist/stateful/stateful-provider-observability.d.ts +62 -0
  287. package/dist/stateful/stateful-provider-observability.js +161 -0
  288. package/dist/stateful/stateful-provider-owner-forwarder.d.ts +41 -0
  289. package/dist/stateful/stateful-provider-owner-forwarder.js +237 -0
  290. package/dist/stateful/stateful-provider-runtime-context.d.ts +35 -0
  291. package/dist/stateful/stateful-provider-runtime-context.js +61 -0
  292. package/dist/stateful/stateful-provider-runtime-executor.d.ts +34 -0
  293. package/dist/stateful/stateful-provider-runtime-executor.js +52 -0
  294. package/dist/stateful/stateful-provider-session-routing.d.ts +67 -0
  295. package/dist/stateful/stateful-provider-session-routing.js +345 -0
  296. package/dist/stateful/stateful-provider-session-runtime.d.ts +98 -0
  297. package/dist/stateful/stateful-provider-session-runtime.js +245 -0
  298. package/dist/stateful-signing.d.ts +18 -0
  299. package/dist/stateful-signing.js +27 -0
  300. package/dist/stealth/profiles.d.ts +15 -4
  301. package/dist/stealth/profiles.js +169 -211
  302. package/dist/stream-evidence.d.ts +74 -0
  303. package/dist/stream-evidence.js +785 -0
  304. package/dist/stream.js +7 -1
  305. package/dist/testing/index.d.ts +2 -1
  306. package/dist/testing/index.js +2 -1
  307. package/dist/testing/run.d.ts +32 -2
  308. package/dist/testing/run.js +509 -25
  309. package/dist/trace-sanitization.d.ts +6 -0
  310. package/dist/trace-sanitization.js +68 -0
  311. package/dist/types.d.ts +899 -210
  312. package/dist/types.js +1 -0
  313. package/dist/typescript-module.d.ts +39 -0
  314. package/dist/typescript-module.js +72 -0
  315. package/package.json +52 -6
  316. package/src/auth-turn/index.ts +1 -1
  317. package/src/auth.ts +118 -0
  318. package/src/ceremonies/index.ts +189 -46
  319. package/src/cli/commands.ts +37 -0
  320. package/src/cli/create.ts +8 -2
  321. package/src/cli/deployment-intent.ts +364 -0
  322. package/src/cli/local-connection.ts +221 -0
  323. package/src/cli/migrate-deployment-intent.ts +1908 -0
  324. package/src/cli/migrate-operation-declaration.ts +3026 -0
  325. package/src/cli/migrate-operation-shape.ts +184 -0
  326. package/src/cli/migrate-provider-shape.ts +778 -0
  327. package/src/cli/resolver-runtime.ts +72 -0
  328. package/src/cli/templates/provider/.agents/skills/health-checks-and-fail-closed/SKILL.md.tpl +141 -23
  329. package/src/cli/templates/provider/Dockerfile.tpl +1 -1
  330. package/src/cli/templates/provider/README.md.tpl +41 -19
  331. package/src/cli/templates/provider/index.ts.tpl +6 -3
  332. package/src/cli/templates/provider/operations/ping.ts.tpl +4 -1
  333. package/src/cli/templates/provider/provider.json.tpl +6 -0
  334. package/src/config/loader.ts +774 -181
  335. package/src/contract-serialization.ts +5 -7
  336. package/src/contract-types.ts +12 -5
  337. package/src/contract.ts +24 -10
  338. package/src/declaration-validation.ts +376 -0
  339. package/src/define.ts +1105 -131
  340. package/src/dev.ts +13 -1
  341. package/src/engine.ts +390 -0
  342. package/src/error-observability.ts +64 -0
  343. package/src/error-resolution.ts +269 -0
  344. package/src/errors.ts +157 -0
  345. package/src/fixture-sanitization.ts +422 -0
  346. package/src/handle-meta.ts +143 -0
  347. package/src/handle.ts +694 -0
  348. package/src/health-scenario.ts +960 -0
  349. package/src/i18n/catalog.ts +23 -1
  350. package/src/i18n/error-messages.ts +255 -0
  351. package/src/i18n/index.ts +1 -0
  352. package/src/i18n/keys.ts +80 -6
  353. package/src/i18n/operation-locale-namespace.ts +10 -0
  354. package/src/index.ts +390 -23
  355. package/src/lint.ts +2975 -234
  356. package/src/native-address.ts +340 -0
  357. package/src/native-egress-policy.ts +358 -0
  358. package/src/observability.ts +51 -1
  359. package/src/provider.ts +207 -27
  360. package/src/runtime/auth-flow.ts +15 -0
  361. package/src/runtime/bounded-expiring-map.ts +67 -0
  362. package/src/runtime/browser-telemetry-binding.ts +92 -0
  363. package/src/runtime/browser-telemetry.ts +289 -0
  364. package/src/runtime/browser.ts +882 -99
  365. package/src/runtime/cache-telemetry.ts +247 -0
  366. package/src/runtime/cache.ts +258 -22
  367. package/src/runtime/capability-response.ts +53 -0
  368. package/src/runtime/capability-telemetry.ts +101 -0
  369. package/src/runtime/chrome149-header-order.ts +330 -0
  370. package/src/runtime/diagnostic-env-values.ts +56 -0
  371. package/src/runtime/diagnostic-env.ts +65 -0
  372. package/src/runtime/diagnostic-redactor.ts +668 -0
  373. package/src/runtime/egress-lease.ts +341 -0
  374. package/src/runtime/engine-mode.ts +233 -0
  375. package/src/runtime/env.ts +15 -1
  376. package/src/runtime/executor.ts +39 -32
  377. package/src/runtime/handle-wordlist.ts +266 -0
  378. package/src/runtime/handle.ts +1180 -0
  379. package/src/runtime/http-telemetry-binding.ts +162 -0
  380. package/src/runtime/http-telemetry-guard.ts +208 -0
  381. package/src/runtime/http-telemetry.ts +292 -0
  382. package/src/runtime/http.ts +896 -150
  383. package/src/runtime/insights.ts +2 -2
  384. package/src/runtime/instrumentation.ts +628 -28
  385. package/src/runtime/native-network-errors.ts +99 -0
  386. package/src/runtime/native-network.ts +1853 -0
  387. package/src/runtime/native-telemetry.ts +366 -0
  388. package/src/runtime/ocr-telemetry.ts +308 -0
  389. package/src/runtime/ocr.ts +564 -0
  390. package/src/runtime/otlp.ts +468 -21
  391. package/src/runtime/provider.ts +15 -0
  392. package/src/runtime/proxy-errors.ts +12 -4
  393. package/src/runtime/proxy-nodemaven.ts +222 -0
  394. package/src/runtime/proxy-retry-policy.ts +12 -1
  395. package/src/runtime/proxy-telemetry.ts +358 -103
  396. package/src/runtime/redirect-hop-headers.ts +71 -0
  397. package/src/runtime/redirects.ts +215 -0
  398. package/src/runtime/redis.ts +7 -2
  399. package/src/runtime/request-options.ts +728 -1
  400. package/src/runtime/request-telemetry.ts +375 -0
  401. package/src/runtime/resolver-config.ts +18 -0
  402. package/src/runtime/resolver-public.ts +44 -0
  403. package/src/runtime/resolver-runtime-options.ts +50 -0
  404. package/src/runtime/resolver-shared.ts +113 -0
  405. package/src/runtime/resolver-span-attributes.ts +139 -0
  406. package/src/runtime/resolver-telemetry.ts +362 -0
  407. package/src/runtime/resolver-usage.ts +99 -0
  408. package/src/runtime/resolver-vendors/bindings.ts +61 -0
  409. package/src/runtime/resolver-vendors/browser.ts +591 -0
  410. package/src/runtime/resolver-vendors/capsolver.ts +727 -0
  411. package/src/runtime/resolver-vendors/hosts.ts +81 -0
  412. package/src/runtime/resolver-vendors/hypersolutions.ts +480 -0
  413. package/src/runtime/resolver-vendors/twocaptcha.ts +555 -0
  414. package/src/runtime/resolver-vendors/types.ts +261 -0
  415. package/src/runtime/resolver.ts +1543 -0
  416. package/src/runtime/state-telemetry.ts +298 -0
  417. package/src/runtime/state.ts +435 -89
  418. package/src/runtime/stealth-akamai-sbsd.ts +207 -0
  419. package/src/runtime/stealth-cookies.ts +155 -0
  420. package/src/runtime/stealth-owned-headers.ts +67 -0
  421. package/src/runtime/stealth-telemetry.ts +309 -0
  422. package/src/runtime/stealth.ts +2275 -372
  423. package/src/runtime/stt-telemetry.ts +282 -0
  424. package/src/runtime/stt.ts +96 -91
  425. package/src/runtime/timeout.ts +18 -0
  426. package/src/runtime/trace-config.ts +78 -0
  427. package/src/runtime/trace.ts +257 -35
  428. package/src/runtime-boundary-lint.ts +707 -0
  429. package/src/schema.ts +80 -2
  430. package/src/serve.ts +6 -1
  431. package/src/server/error-observability.ts +1 -0
  432. package/src/server/error-stack-frames.ts +214 -0
  433. package/src/server/index.ts +184 -2
  434. package/src/server/runtime-diagnostics.ts +522 -0
  435. package/src/server/sdk-version.ts +22 -0
  436. package/src/server/self-test-input-tokens.ts +29 -14
  437. package/src/server/self-test-redaction.ts +10 -40
  438. package/src/server/self-test.ts +205 -89
  439. package/src/server/sensitive-values.ts +211 -0
  440. package/src/server/serve-implementation.ts +4596 -0
  441. package/src/server/serve.ts +1 -1685
  442. package/src/server/state-backend-report.ts +185 -0
  443. package/src/server/trace-output.ts +189 -0
  444. package/src/server/types.ts +34 -1
  445. package/src/stateful/README.md +146 -0
  446. package/src/stateful/errors.ts +35 -0
  447. package/src/stateful/http-provider-event-emitter.ts +314 -0
  448. package/src/stateful/http-session-owner-registry.ts +306 -0
  449. package/src/stateful/index.ts +18 -0
  450. package/src/stateful/provider-event-delivery-failures.ts +80 -0
  451. package/src/stateful/provider-event-pipeline-metrics.ts +95 -0
  452. package/src/stateful/provider-event-pipeline.ts +61 -0
  453. package/src/stateful/provider-events.ts +462 -0
  454. package/src/stateful/session-key.ts +111 -0
  455. package/src/stateful/stateful-provider-adapter-context.ts +59 -0
  456. package/src/stateful/stateful-provider-adapter-metrics.ts +48 -0
  457. package/src/stateful/stateful-provider-adapter.ts +562 -0
  458. package/src/stateful/stateful-provider-observability.ts +261 -0
  459. package/src/stateful/stateful-provider-owner-forwarder.ts +310 -0
  460. package/src/stateful/stateful-provider-runtime-context.ts +96 -0
  461. package/src/stateful/stateful-provider-runtime-executor.ts +96 -0
  462. package/src/stateful/stateful-provider-session-routing.ts +546 -0
  463. package/src/stateful/stateful-provider-session-runtime.ts +403 -0
  464. package/src/stateful-signing.ts +46 -0
  465. package/src/stealth/profiles.ts +212 -231
  466. package/src/stream-evidence.ts +988 -0
  467. package/src/stream.ts +8 -1
  468. package/src/testing/index.ts +10 -1
  469. package/src/testing/run.ts +685 -19
  470. package/src/trace-sanitization.ts +110 -0
  471. package/src/types.ts +1014 -273
  472. package/src/typescript-module.ts +100 -0
  473. package/dist/choice-token.d.ts +0 -24
  474. package/dist/choice-token.js +0 -74
  475. package/dist/runtime/choice.d.ts +0 -15
  476. package/dist/runtime/choice.js +0 -413
  477. package/src/choice-token.ts +0 -165
  478. package/src/runtime/choice.ts +0 -686
@@ -0,0 +1,1901 @@
1
+ import { z } from "zod";
2
+ import type { JsonPrimitive, JsonValue } from "./contract-json.js";
3
+ export type NonEmpty<T> = readonly [T, ...T[]];
4
+ export declare const BoundedJsonPathSchema: z.ZodObject<{
5
+ root: z.ZodLiteral<"$">;
6
+ segments: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
7
+ kind: z.ZodLiteral<"property">;
8
+ name: z.ZodString;
9
+ }, z.core.$strict>, z.ZodObject<{
10
+ kind: z.ZodLiteral<"index">;
11
+ index: z.ZodNumber;
12
+ }, z.core.$strict>]>>;
13
+ }, z.core.$strict>;
14
+ export type BoundedJsonPath = z.infer<typeof BoundedJsonPathSchema>;
15
+ declare const valueTypeSchema: z.ZodEnum<{
16
+ string: "string";
17
+ number: "number";
18
+ boolean: "boolean";
19
+ object: "object";
20
+ null: "null";
21
+ array: "array";
22
+ json: "json";
23
+ established_connection: "established_connection";
24
+ }>;
25
+ export declare const ValueTypeSchema: z.ZodEnum<{
26
+ string: "string";
27
+ number: "number";
28
+ boolean: "boolean";
29
+ object: "object";
30
+ null: "null";
31
+ array: "array";
32
+ json: "json";
33
+ established_connection: "established_connection";
34
+ }>;
35
+ export type ValueType = z.infer<typeof valueTypeSchema>;
36
+ declare const stepReferenceSchema: z.ZodObject<{
37
+ namespace: z.ZodLiteral<"steps">;
38
+ binding: z.ZodString;
39
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
40
+ }, z.core.$strict>;
41
+ export declare const StepReferenceSchema: z.ZodObject<{
42
+ namespace: z.ZodLiteral<"steps">;
43
+ binding: z.ZodString;
44
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
45
+ }, z.core.$strict>;
46
+ export type StepReference = z.infer<typeof stepReferenceSchema>;
47
+ declare const credentialReferenceSchema: z.ZodObject<{
48
+ namespace: z.ZodLiteral<"credentials">;
49
+ alias: z.ZodString;
50
+ field: z.ZodLiteral<"connection">;
51
+ }, z.core.$strict>;
52
+ declare const attemptReferenceSchema: z.ZodObject<{
53
+ namespace: z.ZodLiteral<"attempt">;
54
+ field: z.ZodEnum<{
55
+ id: "id";
56
+ external_ref: "external_ref";
57
+ provider_id: "provider_id";
58
+ scenario_id: "scenario_id";
59
+ started_at: "started_at";
60
+ deadline_at: "deadline_at";
61
+ }>;
62
+ }, z.core.$strict>;
63
+ declare const candidateReferenceSchema: z.ZodObject<{
64
+ namespace: z.ZodLiteral<"candidate">;
65
+ binding: z.ZodString;
66
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
67
+ }, z.core.$strict>;
68
+ export type CredentialReference = z.infer<typeof credentialReferenceSchema>;
69
+ export type EstablishedConnectionReference = CredentialReference & {
70
+ field: "connection";
71
+ };
72
+ export type AttemptReference = z.infer<typeof attemptReferenceSchema>;
73
+ export type CandidateReference = z.infer<typeof candidateReferenceSchema>;
74
+ export type Reference = StepReference | CredentialReference | AttemptReference | CandidateReference;
75
+ export declare const ReferenceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
76
+ namespace: z.ZodLiteral<"steps">;
77
+ binding: z.ZodString;
78
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
79
+ }, z.core.$strict>, z.ZodObject<{
80
+ namespace: z.ZodLiteral<"credentials">;
81
+ alias: z.ZodString;
82
+ field: z.ZodLiteral<"connection">;
83
+ }, z.core.$strict>, z.ZodObject<{
84
+ namespace: z.ZodLiteral<"attempt">;
85
+ field: z.ZodEnum<{
86
+ id: "id";
87
+ external_ref: "external_ref";
88
+ provider_id: "provider_id";
89
+ scenario_id: "scenario_id";
90
+ started_at: "started_at";
91
+ deadline_at: "deadline_at";
92
+ }>;
93
+ }, z.core.$strict>, z.ZodObject<{
94
+ namespace: z.ZodLiteral<"candidate">;
95
+ binding: z.ZodString;
96
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
97
+ }, z.core.$strict>], "namespace">;
98
+ declare const relativeDateNodeSchema: z.ZodObject<{
99
+ relativeDate: z.ZodObject<{
100
+ anchor: z.ZodLiteral<"operation_started_at">;
101
+ offsetDays: z.ZodNumber;
102
+ timeZone: z.ZodLiteral<"Asia/Seoul">;
103
+ format: z.ZodEnum<{
104
+ "YYYY-MM-DD": "YYYY-MM-DD";
105
+ YYYYMMDD: "YYYYMMDD";
106
+ }>;
107
+ }, z.core.$strict>;
108
+ }, z.core.$strict>;
109
+ export type RelativeDateNode = z.infer<typeof relativeDateNodeSchema>;
110
+ export declare const RelativeDateNodeSchema: z.ZodObject<{
111
+ relativeDate: z.ZodObject<{
112
+ anchor: z.ZodLiteral<"operation_started_at">;
113
+ offsetDays: z.ZodNumber;
114
+ timeZone: z.ZodLiteral<"Asia/Seoul">;
115
+ format: z.ZodEnum<{
116
+ "YYYY-MM-DD": "YYYY-MM-DD";
117
+ YYYYMMDD: "YYYYMMDD";
118
+ }>;
119
+ }, z.core.$strict>;
120
+ }, z.core.$strict>;
121
+ export type ReferenceNode = {
122
+ ref: Reference;
123
+ };
124
+ export type JsonTemplate = JsonPrimitive | ReferenceNode | RelativeDateNode | JsonTemplate[] | {
125
+ [key: string]: JsonTemplate;
126
+ };
127
+ export declare const JsonTemplateSchema: z.ZodType<JsonTemplate, unknown, z.core.$ZodTypeInternals<JsonTemplate, unknown>>;
128
+ export type SafeRegex = {
129
+ readonly engine: "re2";
130
+ readonly pattern: string;
131
+ readonly flags: "" | "i";
132
+ };
133
+ export declare const SafeRegexSchema: z.ZodObject<{
134
+ engine: z.ZodLiteral<"re2">;
135
+ pattern: z.ZodString;
136
+ flags: z.ZodEnum<{
137
+ "": "";
138
+ i: "i";
139
+ }>;
140
+ }, z.core.$strict>;
141
+ export declare const OperandSchema: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
142
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
143
+ namespace: z.ZodLiteral<"steps">;
144
+ binding: z.ZodString;
145
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
146
+ }, z.core.$strict>, z.ZodObject<{
147
+ namespace: z.ZodLiteral<"credentials">;
148
+ alias: z.ZodString;
149
+ field: z.ZodLiteral<"connection">;
150
+ }, z.core.$strict>, z.ZodObject<{
151
+ namespace: z.ZodLiteral<"attempt">;
152
+ field: z.ZodEnum<{
153
+ id: "id";
154
+ external_ref: "external_ref";
155
+ provider_id: "provider_id";
156
+ scenario_id: "scenario_id";
157
+ started_at: "started_at";
158
+ deadline_at: "deadline_at";
159
+ }>;
160
+ }, z.core.$strict>, z.ZodObject<{
161
+ namespace: z.ZodLiteral<"candidate">;
162
+ binding: z.ZodString;
163
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
164
+ }, z.core.$strict>], "namespace">;
165
+ }, z.core.$strict>]>;
166
+ export type Operand = JsonValue | ReferenceNode;
167
+ declare const predicateSchema: z.ZodUnion<readonly [z.ZodObject<{
168
+ kind: z.ZodLiteral<"predicate">;
169
+ operator: z.ZodEnum<{
170
+ exists: "exists";
171
+ not_exists: "not_exists";
172
+ non_empty: "non_empty";
173
+ is_true: "is_true";
174
+ }>;
175
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
176
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
177
+ namespace: z.ZodLiteral<"steps">;
178
+ binding: z.ZodString;
179
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
180
+ }, z.core.$strict>, z.ZodObject<{
181
+ namespace: z.ZodLiteral<"credentials">;
182
+ alias: z.ZodString;
183
+ field: z.ZodLiteral<"connection">;
184
+ }, z.core.$strict>, z.ZodObject<{
185
+ namespace: z.ZodLiteral<"attempt">;
186
+ field: z.ZodEnum<{
187
+ id: "id";
188
+ external_ref: "external_ref";
189
+ provider_id: "provider_id";
190
+ scenario_id: "scenario_id";
191
+ started_at: "started_at";
192
+ deadline_at: "deadline_at";
193
+ }>;
194
+ }, z.core.$strict>, z.ZodObject<{
195
+ namespace: z.ZodLiteral<"candidate">;
196
+ binding: z.ZodString;
197
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
198
+ }, z.core.$strict>], "namespace">;
199
+ }, z.core.$strict>]>;
200
+ }, z.core.$strict>, z.ZodObject<{
201
+ kind: z.ZodLiteral<"predicate">;
202
+ operator: z.ZodEnum<{
203
+ equals: "equals";
204
+ not_equals: "not_equals";
205
+ contains: "contains";
206
+ }>;
207
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
208
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
209
+ namespace: z.ZodLiteral<"steps">;
210
+ binding: z.ZodString;
211
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
212
+ }, z.core.$strict>, z.ZodObject<{
213
+ namespace: z.ZodLiteral<"credentials">;
214
+ alias: z.ZodString;
215
+ field: z.ZodLiteral<"connection">;
216
+ }, z.core.$strict>, z.ZodObject<{
217
+ namespace: z.ZodLiteral<"attempt">;
218
+ field: z.ZodEnum<{
219
+ id: "id";
220
+ external_ref: "external_ref";
221
+ provider_id: "provider_id";
222
+ scenario_id: "scenario_id";
223
+ started_at: "started_at";
224
+ deadline_at: "deadline_at";
225
+ }>;
226
+ }, z.core.$strict>, z.ZodObject<{
227
+ namespace: z.ZodLiteral<"candidate">;
228
+ binding: z.ZodString;
229
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
230
+ }, z.core.$strict>], "namespace">;
231
+ }, z.core.$strict>]>;
232
+ expected: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
233
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
234
+ namespace: z.ZodLiteral<"steps">;
235
+ binding: z.ZodString;
236
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
237
+ }, z.core.$strict>, z.ZodObject<{
238
+ namespace: z.ZodLiteral<"credentials">;
239
+ alias: z.ZodString;
240
+ field: z.ZodLiteral<"connection">;
241
+ }, z.core.$strict>, z.ZodObject<{
242
+ namespace: z.ZodLiteral<"attempt">;
243
+ field: z.ZodEnum<{
244
+ id: "id";
245
+ external_ref: "external_ref";
246
+ provider_id: "provider_id";
247
+ scenario_id: "scenario_id";
248
+ started_at: "started_at";
249
+ deadline_at: "deadline_at";
250
+ }>;
251
+ }, z.core.$strict>, z.ZodObject<{
252
+ namespace: z.ZodLiteral<"candidate">;
253
+ binding: z.ZodString;
254
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
255
+ }, z.core.$strict>], "namespace">;
256
+ }, z.core.$strict>]>;
257
+ }, z.core.$strict>, z.ZodObject<{
258
+ kind: z.ZodLiteral<"predicate">;
259
+ operator: z.ZodLiteral<"matches">;
260
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
261
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
262
+ namespace: z.ZodLiteral<"steps">;
263
+ binding: z.ZodString;
264
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
265
+ }, z.core.$strict>, z.ZodObject<{
266
+ namespace: z.ZodLiteral<"credentials">;
267
+ alias: z.ZodString;
268
+ field: z.ZodLiteral<"connection">;
269
+ }, z.core.$strict>, z.ZodObject<{
270
+ namespace: z.ZodLiteral<"attempt">;
271
+ field: z.ZodEnum<{
272
+ id: "id";
273
+ external_ref: "external_ref";
274
+ provider_id: "provider_id";
275
+ scenario_id: "scenario_id";
276
+ started_at: "started_at";
277
+ deadline_at: "deadline_at";
278
+ }>;
279
+ }, z.core.$strict>, z.ZodObject<{
280
+ namespace: z.ZodLiteral<"candidate">;
281
+ binding: z.ZodString;
282
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
283
+ }, z.core.$strict>], "namespace">;
284
+ }, z.core.$strict>]>;
285
+ pattern: z.ZodObject<{
286
+ engine: z.ZodLiteral<"re2">;
287
+ pattern: z.ZodString;
288
+ flags: z.ZodEnum<{
289
+ "": "";
290
+ i: "i";
291
+ }>;
292
+ }, z.core.$strict>;
293
+ }, z.core.$strict>, z.ZodObject<{
294
+ kind: z.ZodLiteral<"predicate">;
295
+ operator: z.ZodEnum<{
296
+ number_gt: "number_gt";
297
+ number_gte: "number_gte";
298
+ number_lt: "number_lt";
299
+ number_lte: "number_lte";
300
+ }>;
301
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
302
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
303
+ namespace: z.ZodLiteral<"steps">;
304
+ binding: z.ZodString;
305
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
306
+ }, z.core.$strict>, z.ZodObject<{
307
+ namespace: z.ZodLiteral<"credentials">;
308
+ alias: z.ZodString;
309
+ field: z.ZodLiteral<"connection">;
310
+ }, z.core.$strict>, z.ZodObject<{
311
+ namespace: z.ZodLiteral<"attempt">;
312
+ field: z.ZodEnum<{
313
+ id: "id";
314
+ external_ref: "external_ref";
315
+ provider_id: "provider_id";
316
+ scenario_id: "scenario_id";
317
+ started_at: "started_at";
318
+ deadline_at: "deadline_at";
319
+ }>;
320
+ }, z.core.$strict>, z.ZodObject<{
321
+ namespace: z.ZodLiteral<"candidate">;
322
+ binding: z.ZodString;
323
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
324
+ }, z.core.$strict>], "namespace">;
325
+ }, z.core.$strict>]>;
326
+ expected: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
327
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
328
+ namespace: z.ZodLiteral<"steps">;
329
+ binding: z.ZodString;
330
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
331
+ }, z.core.$strict>, z.ZodObject<{
332
+ namespace: z.ZodLiteral<"credentials">;
333
+ alias: z.ZodString;
334
+ field: z.ZodLiteral<"connection">;
335
+ }, z.core.$strict>, z.ZodObject<{
336
+ namespace: z.ZodLiteral<"attempt">;
337
+ field: z.ZodEnum<{
338
+ id: "id";
339
+ external_ref: "external_ref";
340
+ provider_id: "provider_id";
341
+ scenario_id: "scenario_id";
342
+ started_at: "started_at";
343
+ deadline_at: "deadline_at";
344
+ }>;
345
+ }, z.core.$strict>, z.ZodObject<{
346
+ namespace: z.ZodLiteral<"candidate">;
347
+ binding: z.ZodString;
348
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
349
+ }, z.core.$strict>], "namespace">;
350
+ }, z.core.$strict>]>;
351
+ }, z.core.$strict>, z.ZodObject<{
352
+ kind: z.ZodLiteral<"predicate">;
353
+ operator: z.ZodEnum<{
354
+ array_length_eq: "array_length_eq";
355
+ array_length_gte: "array_length_gte";
356
+ array_length_lte: "array_length_lte";
357
+ }>;
358
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
359
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
360
+ namespace: z.ZodLiteral<"steps">;
361
+ binding: z.ZodString;
362
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
363
+ }, z.core.$strict>, z.ZodObject<{
364
+ namespace: z.ZodLiteral<"credentials">;
365
+ alias: z.ZodString;
366
+ field: z.ZodLiteral<"connection">;
367
+ }, z.core.$strict>, z.ZodObject<{
368
+ namespace: z.ZodLiteral<"attempt">;
369
+ field: z.ZodEnum<{
370
+ id: "id";
371
+ external_ref: "external_ref";
372
+ provider_id: "provider_id";
373
+ scenario_id: "scenario_id";
374
+ started_at: "started_at";
375
+ deadline_at: "deadline_at";
376
+ }>;
377
+ }, z.core.$strict>, z.ZodObject<{
378
+ namespace: z.ZodLiteral<"candidate">;
379
+ binding: z.ZodString;
380
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
381
+ }, z.core.$strict>], "namespace">;
382
+ }, z.core.$strict>]>;
383
+ expected: z.ZodNumber;
384
+ }, z.core.$strict>, z.ZodObject<{
385
+ kind: z.ZodLiteral<"predicate">;
386
+ operator: z.ZodLiteral<"status_2xx">;
387
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
388
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
389
+ namespace: z.ZodLiteral<"steps">;
390
+ binding: z.ZodString;
391
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
392
+ }, z.core.$strict>, z.ZodObject<{
393
+ namespace: z.ZodLiteral<"credentials">;
394
+ alias: z.ZodString;
395
+ field: z.ZodLiteral<"connection">;
396
+ }, z.core.$strict>, z.ZodObject<{
397
+ namespace: z.ZodLiteral<"attempt">;
398
+ field: z.ZodEnum<{
399
+ id: "id";
400
+ external_ref: "external_ref";
401
+ provider_id: "provider_id";
402
+ scenario_id: "scenario_id";
403
+ started_at: "started_at";
404
+ deadline_at: "deadline_at";
405
+ }>;
406
+ }, z.core.$strict>, z.ZodObject<{
407
+ namespace: z.ZodLiteral<"candidate">;
408
+ binding: z.ZodString;
409
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
410
+ }, z.core.$strict>], "namespace">;
411
+ }, z.core.$strict>]>;
412
+ }, z.core.$strict>, z.ZodObject<{
413
+ kind: z.ZodLiteral<"predicate">;
414
+ operator: z.ZodLiteral<"type_is">;
415
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
416
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
417
+ namespace: z.ZodLiteral<"steps">;
418
+ binding: z.ZodString;
419
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
420
+ }, z.core.$strict>, z.ZodObject<{
421
+ namespace: z.ZodLiteral<"credentials">;
422
+ alias: z.ZodString;
423
+ field: z.ZodLiteral<"connection">;
424
+ }, z.core.$strict>, z.ZodObject<{
425
+ namespace: z.ZodLiteral<"attempt">;
426
+ field: z.ZodEnum<{
427
+ id: "id";
428
+ external_ref: "external_ref";
429
+ provider_id: "provider_id";
430
+ scenario_id: "scenario_id";
431
+ started_at: "started_at";
432
+ deadline_at: "deadline_at";
433
+ }>;
434
+ }, z.core.$strict>, z.ZodObject<{
435
+ namespace: z.ZodLiteral<"candidate">;
436
+ binding: z.ZodString;
437
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
438
+ }, z.core.$strict>], "namespace">;
439
+ }, z.core.$strict>]>;
440
+ expected: z.ZodEnum<{
441
+ string: "string";
442
+ number: "number";
443
+ boolean: "boolean";
444
+ object: "object";
445
+ null: "null";
446
+ array: "array";
447
+ }>;
448
+ }, z.core.$strict>]>;
449
+ export declare const AssertionPredicateSchema: z.ZodUnion<readonly [z.ZodObject<{
450
+ kind: z.ZodLiteral<"predicate">;
451
+ operator: z.ZodEnum<{
452
+ exists: "exists";
453
+ not_exists: "not_exists";
454
+ non_empty: "non_empty";
455
+ is_true: "is_true";
456
+ }>;
457
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
458
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
459
+ namespace: z.ZodLiteral<"steps">;
460
+ binding: z.ZodString;
461
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
462
+ }, z.core.$strict>, z.ZodObject<{
463
+ namespace: z.ZodLiteral<"credentials">;
464
+ alias: z.ZodString;
465
+ field: z.ZodLiteral<"connection">;
466
+ }, z.core.$strict>, z.ZodObject<{
467
+ namespace: z.ZodLiteral<"attempt">;
468
+ field: z.ZodEnum<{
469
+ id: "id";
470
+ external_ref: "external_ref";
471
+ provider_id: "provider_id";
472
+ scenario_id: "scenario_id";
473
+ started_at: "started_at";
474
+ deadline_at: "deadline_at";
475
+ }>;
476
+ }, z.core.$strict>, z.ZodObject<{
477
+ namespace: z.ZodLiteral<"candidate">;
478
+ binding: z.ZodString;
479
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
480
+ }, z.core.$strict>], "namespace">;
481
+ }, z.core.$strict>]>;
482
+ }, z.core.$strict>, z.ZodObject<{
483
+ kind: z.ZodLiteral<"predicate">;
484
+ operator: z.ZodEnum<{
485
+ equals: "equals";
486
+ not_equals: "not_equals";
487
+ contains: "contains";
488
+ }>;
489
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
490
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
491
+ namespace: z.ZodLiteral<"steps">;
492
+ binding: z.ZodString;
493
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
494
+ }, z.core.$strict>, z.ZodObject<{
495
+ namespace: z.ZodLiteral<"credentials">;
496
+ alias: z.ZodString;
497
+ field: z.ZodLiteral<"connection">;
498
+ }, z.core.$strict>, z.ZodObject<{
499
+ namespace: z.ZodLiteral<"attempt">;
500
+ field: z.ZodEnum<{
501
+ id: "id";
502
+ external_ref: "external_ref";
503
+ provider_id: "provider_id";
504
+ scenario_id: "scenario_id";
505
+ started_at: "started_at";
506
+ deadline_at: "deadline_at";
507
+ }>;
508
+ }, z.core.$strict>, z.ZodObject<{
509
+ namespace: z.ZodLiteral<"candidate">;
510
+ binding: z.ZodString;
511
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
512
+ }, z.core.$strict>], "namespace">;
513
+ }, z.core.$strict>]>;
514
+ expected: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
515
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
516
+ namespace: z.ZodLiteral<"steps">;
517
+ binding: z.ZodString;
518
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
519
+ }, z.core.$strict>, z.ZodObject<{
520
+ namespace: z.ZodLiteral<"credentials">;
521
+ alias: z.ZodString;
522
+ field: z.ZodLiteral<"connection">;
523
+ }, z.core.$strict>, z.ZodObject<{
524
+ namespace: z.ZodLiteral<"attempt">;
525
+ field: z.ZodEnum<{
526
+ id: "id";
527
+ external_ref: "external_ref";
528
+ provider_id: "provider_id";
529
+ scenario_id: "scenario_id";
530
+ started_at: "started_at";
531
+ deadline_at: "deadline_at";
532
+ }>;
533
+ }, z.core.$strict>, z.ZodObject<{
534
+ namespace: z.ZodLiteral<"candidate">;
535
+ binding: z.ZodString;
536
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
537
+ }, z.core.$strict>], "namespace">;
538
+ }, z.core.$strict>]>;
539
+ }, z.core.$strict>, z.ZodObject<{
540
+ kind: z.ZodLiteral<"predicate">;
541
+ operator: z.ZodLiteral<"matches">;
542
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
543
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
544
+ namespace: z.ZodLiteral<"steps">;
545
+ binding: z.ZodString;
546
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
547
+ }, z.core.$strict>, z.ZodObject<{
548
+ namespace: z.ZodLiteral<"credentials">;
549
+ alias: z.ZodString;
550
+ field: z.ZodLiteral<"connection">;
551
+ }, z.core.$strict>, z.ZodObject<{
552
+ namespace: z.ZodLiteral<"attempt">;
553
+ field: z.ZodEnum<{
554
+ id: "id";
555
+ external_ref: "external_ref";
556
+ provider_id: "provider_id";
557
+ scenario_id: "scenario_id";
558
+ started_at: "started_at";
559
+ deadline_at: "deadline_at";
560
+ }>;
561
+ }, z.core.$strict>, z.ZodObject<{
562
+ namespace: z.ZodLiteral<"candidate">;
563
+ binding: z.ZodString;
564
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
565
+ }, z.core.$strict>], "namespace">;
566
+ }, z.core.$strict>]>;
567
+ pattern: z.ZodObject<{
568
+ engine: z.ZodLiteral<"re2">;
569
+ pattern: z.ZodString;
570
+ flags: z.ZodEnum<{
571
+ "": "";
572
+ i: "i";
573
+ }>;
574
+ }, z.core.$strict>;
575
+ }, z.core.$strict>, z.ZodObject<{
576
+ kind: z.ZodLiteral<"predicate">;
577
+ operator: z.ZodEnum<{
578
+ number_gt: "number_gt";
579
+ number_gte: "number_gte";
580
+ number_lt: "number_lt";
581
+ number_lte: "number_lte";
582
+ }>;
583
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
584
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
585
+ namespace: z.ZodLiteral<"steps">;
586
+ binding: z.ZodString;
587
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
588
+ }, z.core.$strict>, z.ZodObject<{
589
+ namespace: z.ZodLiteral<"credentials">;
590
+ alias: z.ZodString;
591
+ field: z.ZodLiteral<"connection">;
592
+ }, z.core.$strict>, z.ZodObject<{
593
+ namespace: z.ZodLiteral<"attempt">;
594
+ field: z.ZodEnum<{
595
+ id: "id";
596
+ external_ref: "external_ref";
597
+ provider_id: "provider_id";
598
+ scenario_id: "scenario_id";
599
+ started_at: "started_at";
600
+ deadline_at: "deadline_at";
601
+ }>;
602
+ }, z.core.$strict>, z.ZodObject<{
603
+ namespace: z.ZodLiteral<"candidate">;
604
+ binding: z.ZodString;
605
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
606
+ }, z.core.$strict>], "namespace">;
607
+ }, z.core.$strict>]>;
608
+ expected: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
609
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
610
+ namespace: z.ZodLiteral<"steps">;
611
+ binding: z.ZodString;
612
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
613
+ }, z.core.$strict>, z.ZodObject<{
614
+ namespace: z.ZodLiteral<"credentials">;
615
+ alias: z.ZodString;
616
+ field: z.ZodLiteral<"connection">;
617
+ }, z.core.$strict>, z.ZodObject<{
618
+ namespace: z.ZodLiteral<"attempt">;
619
+ field: z.ZodEnum<{
620
+ id: "id";
621
+ external_ref: "external_ref";
622
+ provider_id: "provider_id";
623
+ scenario_id: "scenario_id";
624
+ started_at: "started_at";
625
+ deadline_at: "deadline_at";
626
+ }>;
627
+ }, z.core.$strict>, z.ZodObject<{
628
+ namespace: z.ZodLiteral<"candidate">;
629
+ binding: z.ZodString;
630
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
631
+ }, z.core.$strict>], "namespace">;
632
+ }, z.core.$strict>]>;
633
+ }, z.core.$strict>, z.ZodObject<{
634
+ kind: z.ZodLiteral<"predicate">;
635
+ operator: z.ZodEnum<{
636
+ array_length_eq: "array_length_eq";
637
+ array_length_gte: "array_length_gte";
638
+ array_length_lte: "array_length_lte";
639
+ }>;
640
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
641
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
642
+ namespace: z.ZodLiteral<"steps">;
643
+ binding: z.ZodString;
644
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
645
+ }, z.core.$strict>, z.ZodObject<{
646
+ namespace: z.ZodLiteral<"credentials">;
647
+ alias: z.ZodString;
648
+ field: z.ZodLiteral<"connection">;
649
+ }, z.core.$strict>, z.ZodObject<{
650
+ namespace: z.ZodLiteral<"attempt">;
651
+ field: z.ZodEnum<{
652
+ id: "id";
653
+ external_ref: "external_ref";
654
+ provider_id: "provider_id";
655
+ scenario_id: "scenario_id";
656
+ started_at: "started_at";
657
+ deadline_at: "deadline_at";
658
+ }>;
659
+ }, z.core.$strict>, z.ZodObject<{
660
+ namespace: z.ZodLiteral<"candidate">;
661
+ binding: z.ZodString;
662
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
663
+ }, z.core.$strict>], "namespace">;
664
+ }, z.core.$strict>]>;
665
+ expected: z.ZodNumber;
666
+ }, z.core.$strict>, z.ZodObject<{
667
+ kind: z.ZodLiteral<"predicate">;
668
+ operator: z.ZodLiteral<"status_2xx">;
669
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
670
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
671
+ namespace: z.ZodLiteral<"steps">;
672
+ binding: z.ZodString;
673
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
674
+ }, z.core.$strict>, z.ZodObject<{
675
+ namespace: z.ZodLiteral<"credentials">;
676
+ alias: z.ZodString;
677
+ field: z.ZodLiteral<"connection">;
678
+ }, z.core.$strict>, z.ZodObject<{
679
+ namespace: z.ZodLiteral<"attempt">;
680
+ field: z.ZodEnum<{
681
+ id: "id";
682
+ external_ref: "external_ref";
683
+ provider_id: "provider_id";
684
+ scenario_id: "scenario_id";
685
+ started_at: "started_at";
686
+ deadline_at: "deadline_at";
687
+ }>;
688
+ }, z.core.$strict>, z.ZodObject<{
689
+ namespace: z.ZodLiteral<"candidate">;
690
+ binding: z.ZodString;
691
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
692
+ }, z.core.$strict>], "namespace">;
693
+ }, z.core.$strict>]>;
694
+ }, z.core.$strict>, z.ZodObject<{
695
+ kind: z.ZodLiteral<"predicate">;
696
+ operator: z.ZodLiteral<"type_is">;
697
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
698
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
699
+ namespace: z.ZodLiteral<"steps">;
700
+ binding: z.ZodString;
701
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
702
+ }, z.core.$strict>, z.ZodObject<{
703
+ namespace: z.ZodLiteral<"credentials">;
704
+ alias: z.ZodString;
705
+ field: z.ZodLiteral<"connection">;
706
+ }, z.core.$strict>, z.ZodObject<{
707
+ namespace: z.ZodLiteral<"attempt">;
708
+ field: z.ZodEnum<{
709
+ id: "id";
710
+ external_ref: "external_ref";
711
+ provider_id: "provider_id";
712
+ scenario_id: "scenario_id";
713
+ started_at: "started_at";
714
+ deadline_at: "deadline_at";
715
+ }>;
716
+ }, z.core.$strict>, z.ZodObject<{
717
+ namespace: z.ZodLiteral<"candidate">;
718
+ binding: z.ZodString;
719
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
720
+ }, z.core.$strict>], "namespace">;
721
+ }, z.core.$strict>]>;
722
+ expected: z.ZodEnum<{
723
+ string: "string";
724
+ number: "number";
725
+ boolean: "boolean";
726
+ object: "object";
727
+ null: "null";
728
+ array: "array";
729
+ }>;
730
+ }, z.core.$strict>]>;
731
+ export type AssertionPredicate = z.infer<typeof predicateSchema>;
732
+ declare const scopedItemReferenceSchema: z.ZodObject<{
733
+ namespace: z.ZodLiteral<"item">;
734
+ binding: z.ZodString;
735
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
736
+ }, z.core.$strict>;
737
+ export declare const ScopedItemReferenceSchema: z.ZodObject<{
738
+ namespace: z.ZodLiteral<"item">;
739
+ binding: z.ZodString;
740
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
741
+ }, z.core.$strict>;
742
+ export type ScopedItemReference = z.infer<typeof scopedItemReferenceSchema>;
743
+ declare const scopedOperandSchema: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
744
+ ref: z.ZodObject<{
745
+ namespace: z.ZodLiteral<"item">;
746
+ binding: z.ZodString;
747
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
748
+ }, z.core.$strict>;
749
+ }, z.core.$strict>, z.ZodObject<{
750
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
751
+ namespace: z.ZodLiteral<"steps">;
752
+ binding: z.ZodString;
753
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
754
+ }, z.core.$strict>, z.ZodObject<{
755
+ namespace: z.ZodLiteral<"credentials">;
756
+ alias: z.ZodString;
757
+ field: z.ZodLiteral<"connection">;
758
+ }, z.core.$strict>, z.ZodObject<{
759
+ namespace: z.ZodLiteral<"attempt">;
760
+ field: z.ZodEnum<{
761
+ id: "id";
762
+ external_ref: "external_ref";
763
+ provider_id: "provider_id";
764
+ scenario_id: "scenario_id";
765
+ started_at: "started_at";
766
+ deadline_at: "deadline_at";
767
+ }>;
768
+ }, z.core.$strict>, z.ZodObject<{
769
+ namespace: z.ZodLiteral<"candidate">;
770
+ binding: z.ZodString;
771
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
772
+ }, z.core.$strict>], "namespace">;
773
+ }, z.core.$strict>]>;
774
+ export declare const ScopedOperandSchema: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
775
+ ref: z.ZodObject<{
776
+ namespace: z.ZodLiteral<"item">;
777
+ binding: z.ZodString;
778
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
779
+ }, z.core.$strict>;
780
+ }, z.core.$strict>, z.ZodObject<{
781
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
782
+ namespace: z.ZodLiteral<"steps">;
783
+ binding: z.ZodString;
784
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
785
+ }, z.core.$strict>, z.ZodObject<{
786
+ namespace: z.ZodLiteral<"credentials">;
787
+ alias: z.ZodString;
788
+ field: z.ZodLiteral<"connection">;
789
+ }, z.core.$strict>, z.ZodObject<{
790
+ namespace: z.ZodLiteral<"attempt">;
791
+ field: z.ZodEnum<{
792
+ id: "id";
793
+ external_ref: "external_ref";
794
+ provider_id: "provider_id";
795
+ scenario_id: "scenario_id";
796
+ started_at: "started_at";
797
+ deadline_at: "deadline_at";
798
+ }>;
799
+ }, z.core.$strict>, z.ZodObject<{
800
+ namespace: z.ZodLiteral<"candidate">;
801
+ binding: z.ZodString;
802
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
803
+ }, z.core.$strict>], "namespace">;
804
+ }, z.core.$strict>]>;
805
+ export type ScopedOperand = z.infer<typeof scopedOperandSchema>;
806
+ declare const scopedPredicateSchema: z.ZodUnion<readonly [z.ZodObject<{
807
+ kind: z.ZodLiteral<"predicate">;
808
+ operator: z.ZodEnum<{
809
+ exists: "exists";
810
+ not_exists: "not_exists";
811
+ non_empty: "non_empty";
812
+ is_true: "is_true";
813
+ }>;
814
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
815
+ ref: z.ZodObject<{
816
+ namespace: z.ZodLiteral<"item">;
817
+ binding: z.ZodString;
818
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
819
+ }, z.core.$strict>;
820
+ }, z.core.$strict>, z.ZodObject<{
821
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
822
+ namespace: z.ZodLiteral<"steps">;
823
+ binding: z.ZodString;
824
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
825
+ }, z.core.$strict>, z.ZodObject<{
826
+ namespace: z.ZodLiteral<"credentials">;
827
+ alias: z.ZodString;
828
+ field: z.ZodLiteral<"connection">;
829
+ }, z.core.$strict>, z.ZodObject<{
830
+ namespace: z.ZodLiteral<"attempt">;
831
+ field: z.ZodEnum<{
832
+ id: "id";
833
+ external_ref: "external_ref";
834
+ provider_id: "provider_id";
835
+ scenario_id: "scenario_id";
836
+ started_at: "started_at";
837
+ deadline_at: "deadline_at";
838
+ }>;
839
+ }, z.core.$strict>, z.ZodObject<{
840
+ namespace: z.ZodLiteral<"candidate">;
841
+ binding: z.ZodString;
842
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
843
+ }, z.core.$strict>], "namespace">;
844
+ }, z.core.$strict>]>;
845
+ }, z.core.$strict>, z.ZodObject<{
846
+ kind: z.ZodLiteral<"predicate">;
847
+ operator: z.ZodEnum<{
848
+ equals: "equals";
849
+ not_equals: "not_equals";
850
+ contains: "contains";
851
+ }>;
852
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
853
+ ref: z.ZodObject<{
854
+ namespace: z.ZodLiteral<"item">;
855
+ binding: z.ZodString;
856
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
857
+ }, z.core.$strict>;
858
+ }, z.core.$strict>, z.ZodObject<{
859
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
860
+ namespace: z.ZodLiteral<"steps">;
861
+ binding: z.ZodString;
862
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
863
+ }, z.core.$strict>, z.ZodObject<{
864
+ namespace: z.ZodLiteral<"credentials">;
865
+ alias: z.ZodString;
866
+ field: z.ZodLiteral<"connection">;
867
+ }, z.core.$strict>, z.ZodObject<{
868
+ namespace: z.ZodLiteral<"attempt">;
869
+ field: z.ZodEnum<{
870
+ id: "id";
871
+ external_ref: "external_ref";
872
+ provider_id: "provider_id";
873
+ scenario_id: "scenario_id";
874
+ started_at: "started_at";
875
+ deadline_at: "deadline_at";
876
+ }>;
877
+ }, z.core.$strict>, z.ZodObject<{
878
+ namespace: z.ZodLiteral<"candidate">;
879
+ binding: z.ZodString;
880
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
881
+ }, z.core.$strict>], "namespace">;
882
+ }, z.core.$strict>]>;
883
+ expected: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
884
+ ref: z.ZodObject<{
885
+ namespace: z.ZodLiteral<"item">;
886
+ binding: z.ZodString;
887
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
888
+ }, z.core.$strict>;
889
+ }, z.core.$strict>, z.ZodObject<{
890
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
891
+ namespace: z.ZodLiteral<"steps">;
892
+ binding: z.ZodString;
893
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
894
+ }, z.core.$strict>, z.ZodObject<{
895
+ namespace: z.ZodLiteral<"credentials">;
896
+ alias: z.ZodString;
897
+ field: z.ZodLiteral<"connection">;
898
+ }, z.core.$strict>, z.ZodObject<{
899
+ namespace: z.ZodLiteral<"attempt">;
900
+ field: z.ZodEnum<{
901
+ id: "id";
902
+ external_ref: "external_ref";
903
+ provider_id: "provider_id";
904
+ scenario_id: "scenario_id";
905
+ started_at: "started_at";
906
+ deadline_at: "deadline_at";
907
+ }>;
908
+ }, z.core.$strict>, z.ZodObject<{
909
+ namespace: z.ZodLiteral<"candidate">;
910
+ binding: z.ZodString;
911
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
912
+ }, z.core.$strict>], "namespace">;
913
+ }, z.core.$strict>]>;
914
+ }, z.core.$strict>, z.ZodObject<{
915
+ kind: z.ZodLiteral<"predicate">;
916
+ operator: z.ZodLiteral<"matches">;
917
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
918
+ ref: z.ZodObject<{
919
+ namespace: z.ZodLiteral<"item">;
920
+ binding: z.ZodString;
921
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
922
+ }, z.core.$strict>;
923
+ }, z.core.$strict>, z.ZodObject<{
924
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
925
+ namespace: z.ZodLiteral<"steps">;
926
+ binding: z.ZodString;
927
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
928
+ }, z.core.$strict>, z.ZodObject<{
929
+ namespace: z.ZodLiteral<"credentials">;
930
+ alias: z.ZodString;
931
+ field: z.ZodLiteral<"connection">;
932
+ }, z.core.$strict>, z.ZodObject<{
933
+ namespace: z.ZodLiteral<"attempt">;
934
+ field: z.ZodEnum<{
935
+ id: "id";
936
+ external_ref: "external_ref";
937
+ provider_id: "provider_id";
938
+ scenario_id: "scenario_id";
939
+ started_at: "started_at";
940
+ deadline_at: "deadline_at";
941
+ }>;
942
+ }, z.core.$strict>, z.ZodObject<{
943
+ namespace: z.ZodLiteral<"candidate">;
944
+ binding: z.ZodString;
945
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
946
+ }, z.core.$strict>], "namespace">;
947
+ }, z.core.$strict>]>;
948
+ pattern: z.ZodObject<{
949
+ engine: z.ZodLiteral<"re2">;
950
+ pattern: z.ZodString;
951
+ flags: z.ZodEnum<{
952
+ "": "";
953
+ i: "i";
954
+ }>;
955
+ }, z.core.$strict>;
956
+ }, z.core.$strict>, z.ZodObject<{
957
+ kind: z.ZodLiteral<"predicate">;
958
+ operator: z.ZodEnum<{
959
+ number_gt: "number_gt";
960
+ number_gte: "number_gte";
961
+ number_lt: "number_lt";
962
+ number_lte: "number_lte";
963
+ }>;
964
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
965
+ ref: z.ZodObject<{
966
+ namespace: z.ZodLiteral<"item">;
967
+ binding: z.ZodString;
968
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
969
+ }, z.core.$strict>;
970
+ }, z.core.$strict>, z.ZodObject<{
971
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
972
+ namespace: z.ZodLiteral<"steps">;
973
+ binding: z.ZodString;
974
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
975
+ }, z.core.$strict>, z.ZodObject<{
976
+ namespace: z.ZodLiteral<"credentials">;
977
+ alias: z.ZodString;
978
+ field: z.ZodLiteral<"connection">;
979
+ }, z.core.$strict>, z.ZodObject<{
980
+ namespace: z.ZodLiteral<"attempt">;
981
+ field: z.ZodEnum<{
982
+ id: "id";
983
+ external_ref: "external_ref";
984
+ provider_id: "provider_id";
985
+ scenario_id: "scenario_id";
986
+ started_at: "started_at";
987
+ deadline_at: "deadline_at";
988
+ }>;
989
+ }, z.core.$strict>, z.ZodObject<{
990
+ namespace: z.ZodLiteral<"candidate">;
991
+ binding: z.ZodString;
992
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
993
+ }, z.core.$strict>], "namespace">;
994
+ }, z.core.$strict>]>;
995
+ expected: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
996
+ ref: z.ZodObject<{
997
+ namespace: z.ZodLiteral<"item">;
998
+ binding: z.ZodString;
999
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1000
+ }, z.core.$strict>;
1001
+ }, z.core.$strict>, z.ZodObject<{
1002
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
1003
+ namespace: z.ZodLiteral<"steps">;
1004
+ binding: z.ZodString;
1005
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1006
+ }, z.core.$strict>, z.ZodObject<{
1007
+ namespace: z.ZodLiteral<"credentials">;
1008
+ alias: z.ZodString;
1009
+ field: z.ZodLiteral<"connection">;
1010
+ }, z.core.$strict>, z.ZodObject<{
1011
+ namespace: z.ZodLiteral<"attempt">;
1012
+ field: z.ZodEnum<{
1013
+ id: "id";
1014
+ external_ref: "external_ref";
1015
+ provider_id: "provider_id";
1016
+ scenario_id: "scenario_id";
1017
+ started_at: "started_at";
1018
+ deadline_at: "deadline_at";
1019
+ }>;
1020
+ }, z.core.$strict>, z.ZodObject<{
1021
+ namespace: z.ZodLiteral<"candidate">;
1022
+ binding: z.ZodString;
1023
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1024
+ }, z.core.$strict>], "namespace">;
1025
+ }, z.core.$strict>]>;
1026
+ }, z.core.$strict>, z.ZodObject<{
1027
+ kind: z.ZodLiteral<"predicate">;
1028
+ operator: z.ZodEnum<{
1029
+ array_length_eq: "array_length_eq";
1030
+ array_length_gte: "array_length_gte";
1031
+ array_length_lte: "array_length_lte";
1032
+ }>;
1033
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
1034
+ ref: z.ZodObject<{
1035
+ namespace: z.ZodLiteral<"item">;
1036
+ binding: z.ZodString;
1037
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1038
+ }, z.core.$strict>;
1039
+ }, z.core.$strict>, z.ZodObject<{
1040
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
1041
+ namespace: z.ZodLiteral<"steps">;
1042
+ binding: z.ZodString;
1043
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1044
+ }, z.core.$strict>, z.ZodObject<{
1045
+ namespace: z.ZodLiteral<"credentials">;
1046
+ alias: z.ZodString;
1047
+ field: z.ZodLiteral<"connection">;
1048
+ }, z.core.$strict>, z.ZodObject<{
1049
+ namespace: z.ZodLiteral<"attempt">;
1050
+ field: z.ZodEnum<{
1051
+ id: "id";
1052
+ external_ref: "external_ref";
1053
+ provider_id: "provider_id";
1054
+ scenario_id: "scenario_id";
1055
+ started_at: "started_at";
1056
+ deadline_at: "deadline_at";
1057
+ }>;
1058
+ }, z.core.$strict>, z.ZodObject<{
1059
+ namespace: z.ZodLiteral<"candidate">;
1060
+ binding: z.ZodString;
1061
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1062
+ }, z.core.$strict>], "namespace">;
1063
+ }, z.core.$strict>]>;
1064
+ expected: z.ZodNumber;
1065
+ }, z.core.$strict>, z.ZodObject<{
1066
+ kind: z.ZodLiteral<"predicate">;
1067
+ operator: z.ZodLiteral<"status_2xx">;
1068
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
1069
+ ref: z.ZodObject<{
1070
+ namespace: z.ZodLiteral<"item">;
1071
+ binding: z.ZodString;
1072
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1073
+ }, z.core.$strict>;
1074
+ }, z.core.$strict>, z.ZodObject<{
1075
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
1076
+ namespace: z.ZodLiteral<"steps">;
1077
+ binding: z.ZodString;
1078
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1079
+ }, z.core.$strict>, z.ZodObject<{
1080
+ namespace: z.ZodLiteral<"credentials">;
1081
+ alias: z.ZodString;
1082
+ field: z.ZodLiteral<"connection">;
1083
+ }, z.core.$strict>, z.ZodObject<{
1084
+ namespace: z.ZodLiteral<"attempt">;
1085
+ field: z.ZodEnum<{
1086
+ id: "id";
1087
+ external_ref: "external_ref";
1088
+ provider_id: "provider_id";
1089
+ scenario_id: "scenario_id";
1090
+ started_at: "started_at";
1091
+ deadline_at: "deadline_at";
1092
+ }>;
1093
+ }, z.core.$strict>, z.ZodObject<{
1094
+ namespace: z.ZodLiteral<"candidate">;
1095
+ binding: z.ZodString;
1096
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1097
+ }, z.core.$strict>], "namespace">;
1098
+ }, z.core.$strict>]>;
1099
+ }, z.core.$strict>, z.ZodObject<{
1100
+ kind: z.ZodLiteral<"predicate">;
1101
+ operator: z.ZodLiteral<"type_is">;
1102
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
1103
+ ref: z.ZodObject<{
1104
+ namespace: z.ZodLiteral<"item">;
1105
+ binding: z.ZodString;
1106
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1107
+ }, z.core.$strict>;
1108
+ }, z.core.$strict>, z.ZodObject<{
1109
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
1110
+ namespace: z.ZodLiteral<"steps">;
1111
+ binding: z.ZodString;
1112
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1113
+ }, z.core.$strict>, z.ZodObject<{
1114
+ namespace: z.ZodLiteral<"credentials">;
1115
+ alias: z.ZodString;
1116
+ field: z.ZodLiteral<"connection">;
1117
+ }, z.core.$strict>, z.ZodObject<{
1118
+ namespace: z.ZodLiteral<"attempt">;
1119
+ field: z.ZodEnum<{
1120
+ id: "id";
1121
+ external_ref: "external_ref";
1122
+ provider_id: "provider_id";
1123
+ scenario_id: "scenario_id";
1124
+ started_at: "started_at";
1125
+ deadline_at: "deadline_at";
1126
+ }>;
1127
+ }, z.core.$strict>, z.ZodObject<{
1128
+ namespace: z.ZodLiteral<"candidate">;
1129
+ binding: z.ZodString;
1130
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1131
+ }, z.core.$strict>], "namespace">;
1132
+ }, z.core.$strict>]>;
1133
+ expected: z.ZodEnum<{
1134
+ string: "string";
1135
+ number: "number";
1136
+ boolean: "boolean";
1137
+ object: "object";
1138
+ null: "null";
1139
+ array: "array";
1140
+ }>;
1141
+ }, z.core.$strict>]>;
1142
+ export declare const ScopedAssertionPredicateSchema: z.ZodUnion<readonly [z.ZodObject<{
1143
+ kind: z.ZodLiteral<"predicate">;
1144
+ operator: z.ZodEnum<{
1145
+ exists: "exists";
1146
+ not_exists: "not_exists";
1147
+ non_empty: "non_empty";
1148
+ is_true: "is_true";
1149
+ }>;
1150
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
1151
+ ref: z.ZodObject<{
1152
+ namespace: z.ZodLiteral<"item">;
1153
+ binding: z.ZodString;
1154
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1155
+ }, z.core.$strict>;
1156
+ }, z.core.$strict>, z.ZodObject<{
1157
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
1158
+ namespace: z.ZodLiteral<"steps">;
1159
+ binding: z.ZodString;
1160
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1161
+ }, z.core.$strict>, z.ZodObject<{
1162
+ namespace: z.ZodLiteral<"credentials">;
1163
+ alias: z.ZodString;
1164
+ field: z.ZodLiteral<"connection">;
1165
+ }, z.core.$strict>, z.ZodObject<{
1166
+ namespace: z.ZodLiteral<"attempt">;
1167
+ field: z.ZodEnum<{
1168
+ id: "id";
1169
+ external_ref: "external_ref";
1170
+ provider_id: "provider_id";
1171
+ scenario_id: "scenario_id";
1172
+ started_at: "started_at";
1173
+ deadline_at: "deadline_at";
1174
+ }>;
1175
+ }, z.core.$strict>, z.ZodObject<{
1176
+ namespace: z.ZodLiteral<"candidate">;
1177
+ binding: z.ZodString;
1178
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1179
+ }, z.core.$strict>], "namespace">;
1180
+ }, z.core.$strict>]>;
1181
+ }, z.core.$strict>, z.ZodObject<{
1182
+ kind: z.ZodLiteral<"predicate">;
1183
+ operator: z.ZodEnum<{
1184
+ equals: "equals";
1185
+ not_equals: "not_equals";
1186
+ contains: "contains";
1187
+ }>;
1188
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
1189
+ ref: z.ZodObject<{
1190
+ namespace: z.ZodLiteral<"item">;
1191
+ binding: z.ZodString;
1192
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1193
+ }, z.core.$strict>;
1194
+ }, z.core.$strict>, z.ZodObject<{
1195
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
1196
+ namespace: z.ZodLiteral<"steps">;
1197
+ binding: z.ZodString;
1198
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1199
+ }, z.core.$strict>, z.ZodObject<{
1200
+ namespace: z.ZodLiteral<"credentials">;
1201
+ alias: z.ZodString;
1202
+ field: z.ZodLiteral<"connection">;
1203
+ }, z.core.$strict>, z.ZodObject<{
1204
+ namespace: z.ZodLiteral<"attempt">;
1205
+ field: z.ZodEnum<{
1206
+ id: "id";
1207
+ external_ref: "external_ref";
1208
+ provider_id: "provider_id";
1209
+ scenario_id: "scenario_id";
1210
+ started_at: "started_at";
1211
+ deadline_at: "deadline_at";
1212
+ }>;
1213
+ }, z.core.$strict>, z.ZodObject<{
1214
+ namespace: z.ZodLiteral<"candidate">;
1215
+ binding: z.ZodString;
1216
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1217
+ }, z.core.$strict>], "namespace">;
1218
+ }, z.core.$strict>]>;
1219
+ expected: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
1220
+ ref: z.ZodObject<{
1221
+ namespace: z.ZodLiteral<"item">;
1222
+ binding: z.ZodString;
1223
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1224
+ }, z.core.$strict>;
1225
+ }, z.core.$strict>, z.ZodObject<{
1226
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
1227
+ namespace: z.ZodLiteral<"steps">;
1228
+ binding: z.ZodString;
1229
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1230
+ }, z.core.$strict>, z.ZodObject<{
1231
+ namespace: z.ZodLiteral<"credentials">;
1232
+ alias: z.ZodString;
1233
+ field: z.ZodLiteral<"connection">;
1234
+ }, z.core.$strict>, z.ZodObject<{
1235
+ namespace: z.ZodLiteral<"attempt">;
1236
+ field: z.ZodEnum<{
1237
+ id: "id";
1238
+ external_ref: "external_ref";
1239
+ provider_id: "provider_id";
1240
+ scenario_id: "scenario_id";
1241
+ started_at: "started_at";
1242
+ deadline_at: "deadline_at";
1243
+ }>;
1244
+ }, z.core.$strict>, z.ZodObject<{
1245
+ namespace: z.ZodLiteral<"candidate">;
1246
+ binding: z.ZodString;
1247
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1248
+ }, z.core.$strict>], "namespace">;
1249
+ }, z.core.$strict>]>;
1250
+ }, z.core.$strict>, z.ZodObject<{
1251
+ kind: z.ZodLiteral<"predicate">;
1252
+ operator: z.ZodLiteral<"matches">;
1253
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
1254
+ ref: z.ZodObject<{
1255
+ namespace: z.ZodLiteral<"item">;
1256
+ binding: z.ZodString;
1257
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1258
+ }, z.core.$strict>;
1259
+ }, z.core.$strict>, z.ZodObject<{
1260
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
1261
+ namespace: z.ZodLiteral<"steps">;
1262
+ binding: z.ZodString;
1263
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1264
+ }, z.core.$strict>, z.ZodObject<{
1265
+ namespace: z.ZodLiteral<"credentials">;
1266
+ alias: z.ZodString;
1267
+ field: z.ZodLiteral<"connection">;
1268
+ }, z.core.$strict>, z.ZodObject<{
1269
+ namespace: z.ZodLiteral<"attempt">;
1270
+ field: z.ZodEnum<{
1271
+ id: "id";
1272
+ external_ref: "external_ref";
1273
+ provider_id: "provider_id";
1274
+ scenario_id: "scenario_id";
1275
+ started_at: "started_at";
1276
+ deadline_at: "deadline_at";
1277
+ }>;
1278
+ }, z.core.$strict>, z.ZodObject<{
1279
+ namespace: z.ZodLiteral<"candidate">;
1280
+ binding: z.ZodString;
1281
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1282
+ }, z.core.$strict>], "namespace">;
1283
+ }, z.core.$strict>]>;
1284
+ pattern: z.ZodObject<{
1285
+ engine: z.ZodLiteral<"re2">;
1286
+ pattern: z.ZodString;
1287
+ flags: z.ZodEnum<{
1288
+ "": "";
1289
+ i: "i";
1290
+ }>;
1291
+ }, z.core.$strict>;
1292
+ }, z.core.$strict>, z.ZodObject<{
1293
+ kind: z.ZodLiteral<"predicate">;
1294
+ operator: z.ZodEnum<{
1295
+ number_gt: "number_gt";
1296
+ number_gte: "number_gte";
1297
+ number_lt: "number_lt";
1298
+ number_lte: "number_lte";
1299
+ }>;
1300
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
1301
+ ref: z.ZodObject<{
1302
+ namespace: z.ZodLiteral<"item">;
1303
+ binding: z.ZodString;
1304
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1305
+ }, z.core.$strict>;
1306
+ }, z.core.$strict>, z.ZodObject<{
1307
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
1308
+ namespace: z.ZodLiteral<"steps">;
1309
+ binding: z.ZodString;
1310
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1311
+ }, z.core.$strict>, z.ZodObject<{
1312
+ namespace: z.ZodLiteral<"credentials">;
1313
+ alias: z.ZodString;
1314
+ field: z.ZodLiteral<"connection">;
1315
+ }, z.core.$strict>, z.ZodObject<{
1316
+ namespace: z.ZodLiteral<"attempt">;
1317
+ field: z.ZodEnum<{
1318
+ id: "id";
1319
+ external_ref: "external_ref";
1320
+ provider_id: "provider_id";
1321
+ scenario_id: "scenario_id";
1322
+ started_at: "started_at";
1323
+ deadline_at: "deadline_at";
1324
+ }>;
1325
+ }, z.core.$strict>, z.ZodObject<{
1326
+ namespace: z.ZodLiteral<"candidate">;
1327
+ binding: z.ZodString;
1328
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1329
+ }, z.core.$strict>], "namespace">;
1330
+ }, z.core.$strict>]>;
1331
+ expected: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
1332
+ ref: z.ZodObject<{
1333
+ namespace: z.ZodLiteral<"item">;
1334
+ binding: z.ZodString;
1335
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1336
+ }, z.core.$strict>;
1337
+ }, z.core.$strict>, z.ZodObject<{
1338
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
1339
+ namespace: z.ZodLiteral<"steps">;
1340
+ binding: z.ZodString;
1341
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1342
+ }, z.core.$strict>, z.ZodObject<{
1343
+ namespace: z.ZodLiteral<"credentials">;
1344
+ alias: z.ZodString;
1345
+ field: z.ZodLiteral<"connection">;
1346
+ }, z.core.$strict>, z.ZodObject<{
1347
+ namespace: z.ZodLiteral<"attempt">;
1348
+ field: z.ZodEnum<{
1349
+ id: "id";
1350
+ external_ref: "external_ref";
1351
+ provider_id: "provider_id";
1352
+ scenario_id: "scenario_id";
1353
+ started_at: "started_at";
1354
+ deadline_at: "deadline_at";
1355
+ }>;
1356
+ }, z.core.$strict>, z.ZodObject<{
1357
+ namespace: z.ZodLiteral<"candidate">;
1358
+ binding: z.ZodString;
1359
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1360
+ }, z.core.$strict>], "namespace">;
1361
+ }, z.core.$strict>]>;
1362
+ }, z.core.$strict>, z.ZodObject<{
1363
+ kind: z.ZodLiteral<"predicate">;
1364
+ operator: z.ZodEnum<{
1365
+ array_length_eq: "array_length_eq";
1366
+ array_length_gte: "array_length_gte";
1367
+ array_length_lte: "array_length_lte";
1368
+ }>;
1369
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
1370
+ ref: z.ZodObject<{
1371
+ namespace: z.ZodLiteral<"item">;
1372
+ binding: z.ZodString;
1373
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1374
+ }, z.core.$strict>;
1375
+ }, z.core.$strict>, z.ZodObject<{
1376
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
1377
+ namespace: z.ZodLiteral<"steps">;
1378
+ binding: z.ZodString;
1379
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1380
+ }, z.core.$strict>, z.ZodObject<{
1381
+ namespace: z.ZodLiteral<"credentials">;
1382
+ alias: z.ZodString;
1383
+ field: z.ZodLiteral<"connection">;
1384
+ }, z.core.$strict>, z.ZodObject<{
1385
+ namespace: z.ZodLiteral<"attempt">;
1386
+ field: z.ZodEnum<{
1387
+ id: "id";
1388
+ external_ref: "external_ref";
1389
+ provider_id: "provider_id";
1390
+ scenario_id: "scenario_id";
1391
+ started_at: "started_at";
1392
+ deadline_at: "deadline_at";
1393
+ }>;
1394
+ }, z.core.$strict>, z.ZodObject<{
1395
+ namespace: z.ZodLiteral<"candidate">;
1396
+ binding: z.ZodString;
1397
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1398
+ }, z.core.$strict>], "namespace">;
1399
+ }, z.core.$strict>]>;
1400
+ expected: z.ZodNumber;
1401
+ }, z.core.$strict>, z.ZodObject<{
1402
+ kind: z.ZodLiteral<"predicate">;
1403
+ operator: z.ZodLiteral<"status_2xx">;
1404
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
1405
+ ref: z.ZodObject<{
1406
+ namespace: z.ZodLiteral<"item">;
1407
+ binding: z.ZodString;
1408
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1409
+ }, z.core.$strict>;
1410
+ }, z.core.$strict>, z.ZodObject<{
1411
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
1412
+ namespace: z.ZodLiteral<"steps">;
1413
+ binding: z.ZodString;
1414
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1415
+ }, z.core.$strict>, z.ZodObject<{
1416
+ namespace: z.ZodLiteral<"credentials">;
1417
+ alias: z.ZodString;
1418
+ field: z.ZodLiteral<"connection">;
1419
+ }, z.core.$strict>, z.ZodObject<{
1420
+ namespace: z.ZodLiteral<"attempt">;
1421
+ field: z.ZodEnum<{
1422
+ id: "id";
1423
+ external_ref: "external_ref";
1424
+ provider_id: "provider_id";
1425
+ scenario_id: "scenario_id";
1426
+ started_at: "started_at";
1427
+ deadline_at: "deadline_at";
1428
+ }>;
1429
+ }, z.core.$strict>, z.ZodObject<{
1430
+ namespace: z.ZodLiteral<"candidate">;
1431
+ binding: z.ZodString;
1432
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1433
+ }, z.core.$strict>], "namespace">;
1434
+ }, z.core.$strict>]>;
1435
+ }, z.core.$strict>, z.ZodObject<{
1436
+ kind: z.ZodLiteral<"predicate">;
1437
+ operator: z.ZodLiteral<"type_is">;
1438
+ actual: z.ZodUnion<readonly [z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>, z.ZodObject<{
1439
+ ref: z.ZodObject<{
1440
+ namespace: z.ZodLiteral<"item">;
1441
+ binding: z.ZodString;
1442
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1443
+ }, z.core.$strict>;
1444
+ }, z.core.$strict>, z.ZodObject<{
1445
+ ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
1446
+ namespace: z.ZodLiteral<"steps">;
1447
+ binding: z.ZodString;
1448
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1449
+ }, z.core.$strict>, z.ZodObject<{
1450
+ namespace: z.ZodLiteral<"credentials">;
1451
+ alias: z.ZodString;
1452
+ field: z.ZodLiteral<"connection">;
1453
+ }, z.core.$strict>, z.ZodObject<{
1454
+ namespace: z.ZodLiteral<"attempt">;
1455
+ field: z.ZodEnum<{
1456
+ id: "id";
1457
+ external_ref: "external_ref";
1458
+ provider_id: "provider_id";
1459
+ scenario_id: "scenario_id";
1460
+ started_at: "started_at";
1461
+ deadline_at: "deadline_at";
1462
+ }>;
1463
+ }, z.core.$strict>, z.ZodObject<{
1464
+ namespace: z.ZodLiteral<"candidate">;
1465
+ binding: z.ZodString;
1466
+ path: z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<"item">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodTuple<[z.ZodLiteral<"result">], z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
1467
+ }, z.core.$strict>], "namespace">;
1468
+ }, z.core.$strict>]>;
1469
+ expected: z.ZodEnum<{
1470
+ string: "string";
1471
+ number: "number";
1472
+ boolean: "boolean";
1473
+ object: "object";
1474
+ null: "null";
1475
+ array: "array";
1476
+ }>;
1477
+ }, z.core.$strict>]>;
1478
+ export type ScopedAssertionPredicate = z.infer<typeof scopedPredicateSchema>;
1479
+ export type ScopedAssertionExpression = {
1480
+ kind: "all" | "any";
1481
+ clauses: NonEmpty<ScopedAssertionExpression>;
1482
+ } | {
1483
+ kind: "not";
1484
+ clause: ScopedAssertionExpression;
1485
+ } | ScopedAssertionPredicate;
1486
+ export declare const ScopedAssertionExpressionSchema: z.ZodType<ScopedAssertionExpression, unknown, z.core.$ZodTypeInternals<ScopedAssertionExpression, unknown>>;
1487
+ export type Quantifier = {
1488
+ kind: "quantifier";
1489
+ quantifier: "every" | "any";
1490
+ items: {
1491
+ ref: StepReference | CandidateReference;
1492
+ };
1493
+ itemBinding: string;
1494
+ maxItems: number;
1495
+ clause: ScopedAssertionExpression;
1496
+ };
1497
+ export declare const QuantifierSchema: z.ZodType<Quantifier, unknown, z.core.$ZodTypeInternals<Quantifier, unknown>>;
1498
+ export type AssertionExpression = {
1499
+ kind: "all" | "any";
1500
+ clauses: NonEmpty<AssertionExpression>;
1501
+ } | {
1502
+ kind: "not";
1503
+ clause: AssertionExpression;
1504
+ } | AssertionPredicate | Quantifier;
1505
+ export declare const AssertionExpressionSchema: z.ZodType<AssertionExpression, unknown, z.core.$ZodTypeInternals<AssertionExpression, unknown>>;
1506
+ export type RetryPolicy = {
1507
+ maxAttempts: number;
1508
+ retryOn: NonEmpty<"transport_error" | "timeout" | "http_429" | "http_5xx">;
1509
+ backoff: {
1510
+ kind: "fixed";
1511
+ delayMs: number;
1512
+ } | {
1513
+ kind: "exponential";
1514
+ initialDelayMs: number;
1515
+ maxDelayMs: number;
1516
+ };
1517
+ attemptTimeoutMs?: number;
1518
+ };
1519
+ export declare const RetryPolicySchema: z.ZodType<RetryPolicy, unknown, z.core.$ZodTypeInternals<RetryPolicy, unknown>>;
1520
+ export type CandidatePolicy = {
1521
+ items: StepReference;
1522
+ itemBinding: string;
1523
+ itemType: "string" | "number" | "object";
1524
+ maxAttempts: number;
1525
+ accept: AssertionExpression;
1526
+ };
1527
+ export declare const CandidatePolicySchema: z.ZodType<CandidatePolicy, unknown, z.core.$ZodTypeInternals<CandidatePolicy, unknown>>;
1528
+ export type CandidateBlock = {
1529
+ scope: "step_block";
1530
+ items: StepReference;
1531
+ itemBinding: string;
1532
+ itemType: "string" | "number" | "object";
1533
+ members: readonly [string, string, ...string[]];
1534
+ maxAttempts: number;
1535
+ accept: AssertionExpression;
1536
+ };
1537
+ export declare const CandidateBlockSchema: z.ZodType<CandidateBlock, unknown, z.core.$ZodTypeInternals<CandidateBlock, unknown>>;
1538
+ export type JournalPolicy = {
1539
+ kind: "side_effect_barrier";
1540
+ version: 1;
1541
+ key: Reference;
1542
+ before: "required";
1543
+ after: "required";
1544
+ replay: "deny_after_started";
1545
+ };
1546
+ export declare const JournalPolicySchema: z.ZodType<JournalPolicy, unknown, z.core.$ZodTypeInternals<JournalPolicy, unknown>>;
1547
+ export type StepBase = {
1548
+ id: string;
1549
+ result: string;
1550
+ timeoutMs?: number;
1551
+ };
1552
+ /**
1553
+ * Why a guard stopped the scenario. The platform decides what each reason
1554
+ * publishes; the attribution's `status` is only the scenario rollup.
1555
+ *
1556
+ * - `expected_absence`: the upstream answered exactly as this provider says it
1557
+ * does when there is nothing to return — no weather alert today, an empty
1558
+ * shelf, a transit feed outside its operating hours. Published as the
1559
+ * non-incident status `expected_absence`: neither ok nor degraded, excluded
1560
+ * from uptime, never an incident. Use it only for an absence the provider
1561
+ * can declare in advance. Data that must be there (a product that must have
1562
+ * options) is a failing assertion, not an expected absence.
1563
+ * - `served_stale_cache`: the operation step was answered from the
1564
+ * stale-if-error window (`served_stale_cache` on the step result) instead
1565
+ * of a live read. A measured upstream verdict: published `degraded`, opens
1566
+ * incidents.
1567
+ */
1568
+ export type GuardReasonCode = "expected_absence" | "served_stale_cache";
1569
+ /** The closed vocabulary as a non-empty tuple, for schema and lint consumers. */
1570
+ export declare const GUARD_REASON_CODES: [GuardReasonCode, ...GuardReasonCode[]];
1571
+ export type GuardAttribution = {
1572
+ operationId: string;
1573
+ status: "degraded";
1574
+ reasonCode: GuardReasonCode;
1575
+ reasonKey: string;
1576
+ };
1577
+ export type OperationResult = {
1578
+ kind: "operation_result";
1579
+ status_code: number;
1580
+ data: JsonValue;
1581
+ request_id: string;
1582
+ duration_ms: number;
1583
+ /**
1584
+ * Whether the monitor's operation step was answered from a stale-if-error
1585
+ * cache serve — the runtime's projection of the response envelope's
1586
+ * `meta.stale`.
1587
+ *
1588
+ * An operation that reads its upstream through `ctx.cache.getOrSet(...,
1589
+ * { staleIfErrorMs })` answers an upstream outage with HTTP 200 and a
1590
+ * well-formed, fully schema-valid body for the whole stale window. Every
1591
+ * assertion over `status_code` and `data` therefore passes, and the probe
1592
+ * rolls up `ok` while the upstream is down. This boolean is the only thing
1593
+ * in the step result that separates that from a live read.
1594
+ *
1595
+ * Always present, so a reference to it resolves to `false` rather than
1596
+ * raising `reference_unresolvable`; a response whose `meta` is malformed
1597
+ * fails the step rather than projecting as fresh.
1598
+ *
1599
+ * Providers that serve stale-if-error should guard on it, so an outage the
1600
+ * cache is absorbing stops reading as green. Attribute it
1601
+ * `served_stale_cache`, not `expected_absence`: a stale serve is an upstream
1602
+ * fault the platform publishes as `degraded`, while an expected absence is
1603
+ * published as a non-incident status.
1604
+ *
1605
+ * ```ts
1606
+ * {
1607
+ * id: "guard-freshness",
1608
+ * result: "freshness-guarded",
1609
+ * kind: "guard",
1610
+ * condition: {
1611
+ * kind: "predicate",
1612
+ * operator: "not_equals",
1613
+ * actual: { ref: { namespace: "steps", binding: "case", path: ["served_stale_cache"] } },
1614
+ * expected: true,
1615
+ * },
1616
+ * onFail: {
1617
+ * attribute: [{ operationId, status: "degraded", reasonCode: "served_stale_cache", reasonKey }],
1618
+ * stop: "scenario",
1619
+ * },
1620
+ * }
1621
+ * ```
1622
+ */
1623
+ served_stale_cache: boolean;
1624
+ candidate?: {
1625
+ attempts: number;
1626
+ selected_index: number | null;
1627
+ };
1628
+ };
1629
+ export type ExtractResult<T extends JsonValue = JsonValue> = {
1630
+ kind: "extract_result";
1631
+ found: boolean;
1632
+ value: T | null;
1633
+ };
1634
+ export type AssertResult = {
1635
+ kind: "assert_result";
1636
+ passed: boolean;
1637
+ failed_clause_paths: string[];
1638
+ };
1639
+ export type GuardResult = {
1640
+ kind: "guard_result";
1641
+ passed: true;
1642
+ };
1643
+ export type FindFirst = {
1644
+ kind: "find_first";
1645
+ itemBinding: string;
1646
+ predicate: ScopedAssertionExpression;
1647
+ maxScan: number;
1648
+ };
1649
+ export declare const FindFirstSchema: z.ZodType<FindFirst, unknown, z.core.$ZodTypeInternals<FindFirst, unknown>>;
1650
+ export type OperationStep = StepBase & {
1651
+ kind: "operation";
1652
+ operationId: string;
1653
+ inputTemplate: JsonTemplate;
1654
+ connection?: CredentialReference;
1655
+ retry?: RetryPolicy;
1656
+ candidate?: CandidatePolicy | CandidateBlock;
1657
+ journal?: JournalPolicy;
1658
+ };
1659
+ export type ExtractStep = StepBase & {
1660
+ kind: "extract";
1661
+ from: StepReference;
1662
+ selector: BoundedJsonPath | FindFirst;
1663
+ valueType: ValueType;
1664
+ required: boolean;
1665
+ };
1666
+ export type AssertStep = StepBase & {
1667
+ kind: "assert";
1668
+ coversOperations: NonEmpty<string>;
1669
+ expression: AssertionExpression;
1670
+ };
1671
+ export type GuardStep = StepBase & {
1672
+ kind: "guard";
1673
+ condition: AssertionExpression;
1674
+ onFail: {
1675
+ attribute: NonEmpty<GuardAttribution>;
1676
+ stop: "scenario";
1677
+ };
1678
+ };
1679
+ export type HealthStep = OperationStep | ExtractStep | AssertStep | GuardStep;
1680
+ export declare const HealthStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1681
+ id: z.ZodString;
1682
+ result: z.ZodString;
1683
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
1684
+ kind: z.ZodLiteral<"operation">;
1685
+ operationId: z.ZodString;
1686
+ inputTemplate: z.ZodType<JsonTemplate, unknown, z.core.$ZodTypeInternals<JsonTemplate, unknown>>;
1687
+ connection: z.ZodOptional<z.ZodObject<{
1688
+ namespace: z.ZodLiteral<"credentials">;
1689
+ alias: z.ZodString;
1690
+ field: z.ZodLiteral<"connection">;
1691
+ }, z.core.$strict>>;
1692
+ retry: z.ZodOptional<z.ZodType<RetryPolicy, unknown, z.core.$ZodTypeInternals<RetryPolicy, unknown>>>;
1693
+ candidate: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<CandidatePolicy, unknown, z.core.$ZodTypeInternals<CandidatePolicy, unknown>>, z.ZodType<CandidateBlock, unknown, z.core.$ZodTypeInternals<CandidateBlock, unknown>>]>>;
1694
+ journal: z.ZodOptional<z.ZodType<JournalPolicy, unknown, z.core.$ZodTypeInternals<JournalPolicy, unknown>>>;
1695
+ }, z.core.$strict>, z.ZodObject<{
1696
+ id: z.ZodString;
1697
+ result: z.ZodString;
1698
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
1699
+ kind: z.ZodLiteral<"extract">;
1700
+ from: z.ZodObject<{
1701
+ namespace: z.ZodLiteral<"steps">;
1702
+ binding: z.ZodString;
1703
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1704
+ }, z.core.$strict>;
1705
+ selector: z.ZodUnion<readonly [z.ZodObject<{
1706
+ root: z.ZodLiteral<"$">;
1707
+ segments: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1708
+ kind: z.ZodLiteral<"property">;
1709
+ name: z.ZodString;
1710
+ }, z.core.$strict>, z.ZodObject<{
1711
+ kind: z.ZodLiteral<"index">;
1712
+ index: z.ZodNumber;
1713
+ }, z.core.$strict>]>>;
1714
+ }, z.core.$strict>, z.ZodType<FindFirst, unknown, z.core.$ZodTypeInternals<FindFirst, unknown>>]>;
1715
+ valueType: z.ZodEnum<{
1716
+ string: "string";
1717
+ number: "number";
1718
+ boolean: "boolean";
1719
+ object: "object";
1720
+ null: "null";
1721
+ array: "array";
1722
+ json: "json";
1723
+ established_connection: "established_connection";
1724
+ }>;
1725
+ required: z.ZodBoolean;
1726
+ }, z.core.$strict>, z.ZodObject<{
1727
+ id: z.ZodString;
1728
+ result: z.ZodString;
1729
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
1730
+ kind: z.ZodLiteral<"assert">;
1731
+ coversOperations: z.ZodPipe<z.ZodArray<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>, z.ZodTransform<[string, ...string[]], string[]>>;
1732
+ expression: z.ZodType<AssertionExpression, unknown, z.core.$ZodTypeInternals<AssertionExpression, unknown>>;
1733
+ }, z.core.$strict>, z.ZodObject<{
1734
+ id: z.ZodString;
1735
+ result: z.ZodString;
1736
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
1737
+ kind: z.ZodLiteral<"guard">;
1738
+ condition: z.ZodType<AssertionExpression, unknown, z.core.$ZodTypeInternals<AssertionExpression, unknown>>;
1739
+ onFail: z.ZodObject<{
1740
+ attribute: z.ZodPipe<z.ZodArray<z.ZodType<{
1741
+ operationId: string;
1742
+ status: "degraded";
1743
+ reasonCode: "expected_absence" | "served_stale_cache";
1744
+ reasonKey: string;
1745
+ }, unknown, z.core.$ZodTypeInternals<{
1746
+ operationId: string;
1747
+ status: "degraded";
1748
+ reasonCode: "expected_absence" | "served_stale_cache";
1749
+ reasonKey: string;
1750
+ }, unknown>>>, z.ZodTransform<[{
1751
+ operationId: string;
1752
+ status: "degraded";
1753
+ reasonCode: "expected_absence" | "served_stale_cache";
1754
+ reasonKey: string;
1755
+ }, ...{
1756
+ operationId: string;
1757
+ status: "degraded";
1758
+ reasonCode: "expected_absence" | "served_stale_cache";
1759
+ reasonKey: string;
1760
+ }[]], {
1761
+ operationId: string;
1762
+ status: "degraded";
1763
+ reasonCode: "expected_absence" | "served_stale_cache";
1764
+ reasonKey: string;
1765
+ }[]>>;
1766
+ stop: z.ZodLiteral<"scenario">;
1767
+ }, z.core.$strict>;
1768
+ }, z.core.$strict>], "kind">;
1769
+ export declare const OperationStepSchema: z.ZodObject<{
1770
+ id: z.ZodString;
1771
+ result: z.ZodString;
1772
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
1773
+ kind: z.ZodLiteral<"operation">;
1774
+ operationId: z.ZodString;
1775
+ inputTemplate: z.ZodType<JsonTemplate, unknown, z.core.$ZodTypeInternals<JsonTemplate, unknown>>;
1776
+ connection: z.ZodOptional<z.ZodObject<{
1777
+ namespace: z.ZodLiteral<"credentials">;
1778
+ alias: z.ZodString;
1779
+ field: z.ZodLiteral<"connection">;
1780
+ }, z.core.$strict>>;
1781
+ retry: z.ZodOptional<z.ZodType<RetryPolicy, unknown, z.core.$ZodTypeInternals<RetryPolicy, unknown>>>;
1782
+ candidate: z.ZodOptional<z.ZodUnion<readonly [z.ZodType<CandidatePolicy, unknown, z.core.$ZodTypeInternals<CandidatePolicy, unknown>>, z.ZodType<CandidateBlock, unknown, z.core.$ZodTypeInternals<CandidateBlock, unknown>>]>>;
1783
+ journal: z.ZodOptional<z.ZodType<JournalPolicy, unknown, z.core.$ZodTypeInternals<JournalPolicy, unknown>>>;
1784
+ }, z.core.$strict>;
1785
+ export declare const ExtractStepSchema: z.ZodObject<{
1786
+ id: z.ZodString;
1787
+ result: z.ZodString;
1788
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
1789
+ kind: z.ZodLiteral<"extract">;
1790
+ from: z.ZodObject<{
1791
+ namespace: z.ZodLiteral<"steps">;
1792
+ binding: z.ZodString;
1793
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1794
+ }, z.core.$strict>;
1795
+ selector: z.ZodUnion<readonly [z.ZodObject<{
1796
+ root: z.ZodLiteral<"$">;
1797
+ segments: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1798
+ kind: z.ZodLiteral<"property">;
1799
+ name: z.ZodString;
1800
+ }, z.core.$strict>, z.ZodObject<{
1801
+ kind: z.ZodLiteral<"index">;
1802
+ index: z.ZodNumber;
1803
+ }, z.core.$strict>]>>;
1804
+ }, z.core.$strict>, z.ZodType<FindFirst, unknown, z.core.$ZodTypeInternals<FindFirst, unknown>>]>;
1805
+ valueType: z.ZodEnum<{
1806
+ string: "string";
1807
+ number: "number";
1808
+ boolean: "boolean";
1809
+ object: "object";
1810
+ null: "null";
1811
+ array: "array";
1812
+ json: "json";
1813
+ established_connection: "established_connection";
1814
+ }>;
1815
+ required: z.ZodBoolean;
1816
+ }, z.core.$strict>;
1817
+ export declare const AssertStepSchema: z.ZodObject<{
1818
+ id: z.ZodString;
1819
+ result: z.ZodString;
1820
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
1821
+ kind: z.ZodLiteral<"assert">;
1822
+ coversOperations: z.ZodPipe<z.ZodArray<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>, z.ZodTransform<[string, ...string[]], string[]>>;
1823
+ expression: z.ZodType<AssertionExpression, unknown, z.core.$ZodTypeInternals<AssertionExpression, unknown>>;
1824
+ }, z.core.$strict>;
1825
+ export declare const GuardStepSchema: z.ZodObject<{
1826
+ id: z.ZodString;
1827
+ result: z.ZodString;
1828
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
1829
+ kind: z.ZodLiteral<"guard">;
1830
+ condition: z.ZodType<AssertionExpression, unknown, z.core.$ZodTypeInternals<AssertionExpression, unknown>>;
1831
+ onFail: z.ZodObject<{
1832
+ attribute: z.ZodPipe<z.ZodArray<z.ZodType<{
1833
+ operationId: string;
1834
+ status: "degraded";
1835
+ reasonCode: "expected_absence" | "served_stale_cache";
1836
+ reasonKey: string;
1837
+ }, unknown, z.core.$ZodTypeInternals<{
1838
+ operationId: string;
1839
+ status: "degraded";
1840
+ reasonCode: "expected_absence" | "served_stale_cache";
1841
+ reasonKey: string;
1842
+ }, unknown>>>, z.ZodTransform<[{
1843
+ operationId: string;
1844
+ status: "degraded";
1845
+ reasonCode: "expected_absence" | "served_stale_cache";
1846
+ reasonKey: string;
1847
+ }, ...{
1848
+ operationId: string;
1849
+ status: "degraded";
1850
+ reasonCode: "expected_absence" | "served_stale_cache";
1851
+ reasonKey: string;
1852
+ }[]], {
1853
+ operationId: string;
1854
+ status: "degraded";
1855
+ reasonCode: "expected_absence" | "served_stale_cache";
1856
+ reasonKey: string;
1857
+ }[]>>;
1858
+ stop: z.ZodLiteral<"scenario">;
1859
+ }, z.core.$strict>;
1860
+ }, z.core.$strict>;
1861
+ export type ManualTriggerPolicy = {
1862
+ enabled: false;
1863
+ reasonKey: string;
1864
+ } | {
1865
+ enabled: true;
1866
+ requiresAcknowledgement: boolean;
1867
+ risk: "read_only" | "writes_external_state";
1868
+ minManualIntervalMs: number;
1869
+ publicRationaleKey: string;
1870
+ };
1871
+ export declare const ManualTriggerPolicySchema: z.ZodType<ManualTriggerPolicy, unknown, z.core.$ZodTypeInternals<ManualTriggerPolicy, unknown>>;
1872
+ export type CredentialRefDeclaration = {
1873
+ alias: string;
1874
+ kind: "connection";
1875
+ };
1876
+ export declare const CredentialRefDeclarationSchema: z.ZodObject<{
1877
+ alias: z.ZodString;
1878
+ kind: z.ZodLiteral<"connection">;
1879
+ }, z.core.$strict>;
1880
+ export type HealthScenario = {
1881
+ scenarioVersion: 2;
1882
+ id: string;
1883
+ display: {
1884
+ titleKey: string;
1885
+ descriptionKey?: string;
1886
+ };
1887
+ schedule: {
1888
+ kind: "interval";
1889
+ intervalMs: number;
1890
+ jitterMs: number;
1891
+ };
1892
+ timeoutMs: number;
1893
+ cooldownMs?: number;
1894
+ manualTrigger?: ManualTriggerPolicy;
1895
+ coversOperations: NonEmpty<string>;
1896
+ credentialRefs: CredentialRefDeclaration[];
1897
+ steps: NonEmpty<HealthStep>;
1898
+ };
1899
+ export declare const HealthScenarioSchema: z.ZodType<HealthScenario>;
1900
+ export declare function defineHealthScenario(input: unknown): HealthScenario;
1901
+ export {};