switchboard-cli 0.1.0-alpha.1 → 0.1.0-alpha.2

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 (907) hide show
  1. package/calibration/ledger/baselines/baseline-2026-04-09.yaml +1 -1
  2. package/calibration/ledger/history.yaml +9 -0
  3. package/calibration/ledger/runs/2026-04-09T10-11-28-692Z/diffs/adv-056e52eb6d09.yaml +9 -0
  4. package/calibration/ledger/runs/2026-04-09T10-11-28-692Z/diffs/blind-aa04e10023e9.yaml +9 -0
  5. package/calibration/ledger/runs/2026-04-09T10-11-28-692Z/escalations/esc-2bd30ef5717a30b3.yaml +15 -0
  6. package/calibration/ledger/runs/2026-04-09T10-11-28-692Z/manifest.yaml +8 -0
  7. package/calibration/ledger/runs/2026-04-09T10-11-28-692Z/seeds/adv-056e52eb6d09.yaml +7 -0
  8. package/calibration/ledger/runs/2026-04-09T10-11-28-692Z/seeds/blind-aa04e10023e9.yaml +8 -0
  9. package/calibration/ledger/runs/2026-04-09T10-11-28-692Z/summary.yaml +10 -0
  10. package/calibration/ledger/runs/2026-04-09T10-11-28-692Z/traces/adv-056e52eb6d09.yaml +141 -0
  11. package/calibration/ledger/runs/2026-04-09T10-11-28-692Z/traces/blind-aa04e10023e9.yaml +146 -0
  12. package/calibration/ledger/runs/2026-04-09T10-11-28-692Z/verdicts-a/adv-056e52eb6d09.yaml +24 -0
  13. package/calibration/ledger/runs/2026-04-09T10-11-28-692Z/verdicts-a/blind-aa04e10023e9.yaml +24 -0
  14. package/calibration/ledger/runs/2026-04-09T10-11-28-692Z/verdicts-b/adv-056e52eb6d09.yaml +31 -0
  15. package/calibration/ledger/runs/2026-04-09T10-11-28-692Z/verdicts-b/blind-aa04e10023e9.yaml +32 -0
  16. package/node_modules/@switchboard/core/package.json +20 -0
  17. package/node_modules/@switchboard/core/src/activation.ts +285 -0
  18. package/node_modules/@switchboard/core/src/audited-receipt.ts +403 -0
  19. package/node_modules/@switchboard/core/src/budget-ledger.ts +223 -0
  20. package/node_modules/@switchboard/core/src/build-map.ts +327 -0
  21. package/node_modules/@switchboard/core/src/canonical-delta.ts +754 -0
  22. package/node_modules/@switchboard/core/src/canonical-pack.ts +400 -0
  23. package/node_modules/@switchboard/core/src/canonical.ts +248 -0
  24. package/node_modules/@switchboard/core/src/claim-spread.ts +219 -0
  25. package/node_modules/@switchboard/core/src/classifier.ts +207 -0
  26. package/node_modules/@switchboard/core/src/claude-executor.ts +37 -0
  27. package/node_modules/@switchboard/core/src/codex-audit.ts +301 -0
  28. package/node_modules/@switchboard/core/src/codex-executor.ts +22 -0
  29. package/node_modules/@switchboard/core/src/compiler-adapter.ts +284 -0
  30. package/node_modules/@switchboard/core/src/compiler.ts +183 -0
  31. package/node_modules/@switchboard/core/src/dispatch-formatter.ts +348 -0
  32. package/node_modules/@switchboard/core/src/dispatch-receipt.ts +135 -0
  33. package/node_modules/@switchboard/core/src/dossier.ts +229 -0
  34. package/node_modules/@switchboard/core/src/eval-scope.ts +208 -0
  35. package/node_modules/@switchboard/core/src/evaluation-lane.ts +584 -0
  36. package/node_modules/@switchboard/core/src/execution-trace.ts +455 -0
  37. package/node_modules/@switchboard/core/src/gate-state.ts +296 -0
  38. package/node_modules/@switchboard/core/src/gates.ts +198 -0
  39. package/node_modules/@switchboard/core/src/governance-envelope.ts +317 -0
  40. package/node_modules/@switchboard/core/src/handoff-v2.ts +221 -0
  41. package/node_modules/@switchboard/core/src/handoff-visibility.ts +204 -0
  42. package/node_modules/@switchboard/core/src/handoff.ts +87 -0
  43. package/node_modules/@switchboard/core/src/harness-compiler.ts +246 -0
  44. package/node_modules/@switchboard/core/src/index.ts +57 -0
  45. package/node_modules/@switchboard/core/src/ingest.ts +128 -0
  46. package/node_modules/@switchboard/core/src/launch-block-payload.ts +51 -0
  47. package/node_modules/@switchboard/core/src/ledger.ts +313 -0
  48. package/node_modules/@switchboard/core/src/live-event-bus.ts +37 -0
  49. package/node_modules/@switchboard/core/src/live-event.ts +238 -0
  50. package/node_modules/@switchboard/core/src/lock-readiness.ts +242 -0
  51. package/node_modules/@switchboard/core/src/loop-compiler.ts +152 -0
  52. package/node_modules/@switchboard/core/src/loop-validator.ts +55 -0
  53. package/node_modules/@switchboard/core/src/meta-harness.ts +411 -0
  54. package/node_modules/@switchboard/core/src/overflow-manifest.ts +220 -0
  55. package/node_modules/@switchboard/core/src/packet-integrity.ts +302 -0
  56. package/node_modules/@switchboard/core/src/parallel-conflict.ts +268 -0
  57. package/node_modules/@switchboard/core/src/preflight.ts +181 -0
  58. package/node_modules/@switchboard/core/src/pressure-assessment.ts +265 -0
  59. package/node_modules/@switchboard/core/src/product-objects.ts +99 -0
  60. package/node_modules/@switchboard/core/src/project-charter.ts +193 -0
  61. package/node_modules/@switchboard/core/src/proof-capture.ts +319 -0
  62. package/node_modules/@switchboard/core/src/provider-registry.ts +163 -0
  63. package/node_modules/@switchboard/core/src/receipt-v2.ts +904 -0
  64. package/node_modules/@switchboard/core/src/reconcile-matrix.ts +154 -0
  65. package/node_modules/@switchboard/core/src/reconcile-v2.ts +272 -0
  66. package/node_modules/@switchboard/core/src/reconcile.ts +450 -0
  67. package/node_modules/@switchboard/core/src/return-normalizer.ts +226 -0
  68. package/node_modules/@switchboard/core/src/router.ts +207 -0
  69. package/node_modules/@switchboard/core/src/routing-v2.ts +214 -0
  70. package/node_modules/@switchboard/core/src/run-snapshot.ts +405 -0
  71. package/node_modules/@switchboard/core/src/surface-playbooks.ts +36 -0
  72. package/node_modules/@switchboard/core/src/surface-profiles.ts +166 -0
  73. package/node_modules/@switchboard/core/src/synthesis-provider.ts +1114 -0
  74. package/node_modules/@switchboard/core/src/types.ts +3054 -0
  75. package/node_modules/@switchboard/projections/package.json +21 -0
  76. package/node_modules/@switchboard/projections/src/claude/index.ts +164 -0
  77. package/node_modules/@switchboard/projections/src/index.ts +160 -0
  78. package/node_modules/yaml/LICENSE +13 -0
  79. package/node_modules/yaml/README.md +172 -0
  80. package/node_modules/yaml/bin.mjs +11 -0
  81. package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
  82. package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
  83. package/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
  84. package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
  85. package/node_modules/yaml/browser/dist/compose/composer.js +217 -0
  86. package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
  87. package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
  88. package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
  89. package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
  90. package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
  91. package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +223 -0
  92. package/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
  93. package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
  94. package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
  95. package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
  96. package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
  97. package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
  98. package/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
  99. package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
  100. package/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
  101. package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
  102. package/node_modules/yaml/browser/dist/errors.js +57 -0
  103. package/node_modules/yaml/browser/dist/index.js +17 -0
  104. package/node_modules/yaml/browser/dist/log.js +11 -0
  105. package/node_modules/yaml/browser/dist/nodes/Alias.js +114 -0
  106. package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
  107. package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
  108. package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
  109. package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
  110. package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
  111. package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
  112. package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
  113. package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
  114. package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
  115. package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
  116. package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
  117. package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
  118. package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
  119. package/node_modules/yaml/browser/dist/parse/lexer.js +717 -0
  120. package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
  121. package/node_modules/yaml/browser/dist/parse/parser.js +967 -0
  122. package/node_modules/yaml/browser/dist/public-api.js +102 -0
  123. package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
  124. package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
  125. package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
  126. package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
  127. package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
  128. package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
  129. package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
  130. package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
  131. package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
  132. package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
  133. package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
  134. package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
  135. package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
  136. package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
  137. package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
  138. package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +64 -0
  139. package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
  140. package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
  141. package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
  142. package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
  143. package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
  144. package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
  145. package/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
  146. package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
  147. package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
  148. package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
  149. package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +24 -0
  150. package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
  151. package/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
  152. package/node_modules/yaml/browser/dist/util.js +11 -0
  153. package/node_modules/yaml/browser/dist/visit.js +233 -0
  154. package/node_modules/yaml/browser/index.js +5 -0
  155. package/node_modules/yaml/browser/package.json +3 -0
  156. package/node_modules/yaml/dist/cli.d.ts +8 -0
  157. package/node_modules/yaml/dist/cli.mjs +201 -0
  158. package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
  159. package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
  160. package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
  161. package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
  162. package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
  163. package/node_modules/yaml/dist/compose/compose-node.js +112 -0
  164. package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
  165. package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
  166. package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
  167. package/node_modules/yaml/dist/compose/composer.js +222 -0
  168. package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
  169. package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
  170. package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
  171. package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
  172. package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
  173. package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
  174. package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
  175. package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
  176. package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
  177. package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
  178. package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
  179. package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +225 -0
  180. package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
  181. package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
  182. package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
  183. package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
  184. package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
  185. package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
  186. package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
  187. package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
  188. package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
  189. package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
  190. package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
  191. package/node_modules/yaml/dist/doc/Document.js +337 -0
  192. package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
  193. package/node_modules/yaml/dist/doc/anchors.js +76 -0
  194. package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
  195. package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
  196. package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
  197. package/node_modules/yaml/dist/doc/createNode.js +90 -0
  198. package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
  199. package/node_modules/yaml/dist/doc/directives.js +178 -0
  200. package/node_modules/yaml/dist/errors.d.ts +21 -0
  201. package/node_modules/yaml/dist/errors.js +62 -0
  202. package/node_modules/yaml/dist/index.d.ts +25 -0
  203. package/node_modules/yaml/dist/index.js +50 -0
  204. package/node_modules/yaml/dist/log.d.ts +3 -0
  205. package/node_modules/yaml/dist/log.js +19 -0
  206. package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
  207. package/node_modules/yaml/dist/nodes/Alias.js +116 -0
  208. package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
  209. package/node_modules/yaml/dist/nodes/Collection.js +151 -0
  210. package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
  211. package/node_modules/yaml/dist/nodes/Node.js +40 -0
  212. package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
  213. package/node_modules/yaml/dist/nodes/Pair.js +39 -0
  214. package/node_modules/yaml/dist/nodes/Scalar.d.ts +43 -0
  215. package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
  216. package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
  217. package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
  218. package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
  219. package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
  220. package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
  221. package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
  222. package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
  223. package/node_modules/yaml/dist/nodes/identity.js +53 -0
  224. package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
  225. package/node_modules/yaml/dist/nodes/toJS.js +39 -0
  226. package/node_modules/yaml/dist/options.d.ts +350 -0
  227. package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
  228. package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
  229. package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
  230. package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
  231. package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
  232. package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
  233. package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
  234. package/node_modules/yaml/dist/parse/cst.js +112 -0
  235. package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
  236. package/node_modules/yaml/dist/parse/lexer.js +719 -0
  237. package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
  238. package/node_modules/yaml/dist/parse/line-counter.js +41 -0
  239. package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
  240. package/node_modules/yaml/dist/parse/parser.js +972 -0
  241. package/node_modules/yaml/dist/public-api.d.ts +44 -0
  242. package/node_modules/yaml/dist/public-api.js +107 -0
  243. package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
  244. package/node_modules/yaml/dist/schema/Schema.js +39 -0
  245. package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
  246. package/node_modules/yaml/dist/schema/common/map.js +19 -0
  247. package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
  248. package/node_modules/yaml/dist/schema/common/null.js +17 -0
  249. package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
  250. package/node_modules/yaml/dist/schema/common/seq.js +19 -0
  251. package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
  252. package/node_modules/yaml/dist/schema/common/string.js +16 -0
  253. package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
  254. package/node_modules/yaml/dist/schema/core/bool.js +21 -0
  255. package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
  256. package/node_modules/yaml/dist/schema/core/float.js +47 -0
  257. package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
  258. package/node_modules/yaml/dist/schema/core/int.js +42 -0
  259. package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
  260. package/node_modules/yaml/dist/schema/core/schema.js +25 -0
  261. package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
  262. package/node_modules/yaml/dist/schema/json/schema.js +64 -0
  263. package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
  264. package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
  265. package/node_modules/yaml/dist/schema/tags.js +99 -0
  266. package/node_modules/yaml/dist/schema/types.d.ts +92 -0
  267. package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
  268. package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
  269. package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
  270. package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
  271. package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
  272. package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
  273. package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
  274. package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
  275. package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
  276. package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +68 -0
  277. package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
  278. package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
  279. package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
  280. package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
  281. package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
  282. package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
  283. package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
  284. package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
  285. package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
  286. package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
  287. package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
  288. package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
  289. package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
  290. package/node_modules/yaml/dist/stringify/stringify.js +132 -0
  291. package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
  292. package/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
  293. package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
  294. package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
  295. package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
  296. package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
  297. package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
  298. package/node_modules/yaml/dist/stringify/stringifyNumber.js +26 -0
  299. package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
  300. package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
  301. package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
  302. package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
  303. package/node_modules/yaml/dist/test-events.d.ts +4 -0
  304. package/node_modules/yaml/dist/test-events.js +134 -0
  305. package/node_modules/yaml/dist/util.d.ts +16 -0
  306. package/node_modules/yaml/dist/util.js +28 -0
  307. package/node_modules/yaml/dist/visit.d.ts +102 -0
  308. package/node_modules/yaml/dist/visit.js +236 -0
  309. package/node_modules/yaml/package.json +97 -0
  310. package/node_modules/yaml/util.js +2 -0
  311. package/node_modules/zod/LICENSE +21 -0
  312. package/node_modules/zod/README.md +208 -0
  313. package/node_modules/zod/index.cjs +33 -0
  314. package/node_modules/zod/index.d.cts +4 -0
  315. package/node_modules/zod/index.d.ts +4 -0
  316. package/node_modules/zod/index.js +4 -0
  317. package/node_modules/zod/package.json +118 -0
  318. package/node_modules/zod/src/index.ts +4 -0
  319. package/node_modules/zod/src/v3/ZodError.ts +330 -0
  320. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  321. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  322. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  323. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  324. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  325. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  326. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  327. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  328. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  329. package/node_modules/zod/src/v3/errors.ts +13 -0
  330. package/node_modules/zod/src/v3/external.ts +6 -0
  331. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  332. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  333. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  334. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  335. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  336. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  337. package/node_modules/zod/src/v3/index.ts +4 -0
  338. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  339. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  340. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  341. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  342. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  343. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  344. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  345. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  346. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  347. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  348. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  349. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  350. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  351. package/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
  352. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  353. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  354. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  355. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  356. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  357. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  358. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  359. package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  360. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  361. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  362. package/node_modules/zod/src/v3/tests/function.test.ts +257 -0
  363. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  364. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  365. package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  366. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  367. package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  368. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  369. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  370. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  371. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  372. package/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
  373. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  374. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  375. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  376. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  377. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  378. package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  379. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  380. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  381. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  382. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  383. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  384. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  385. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  386. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  387. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  388. package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  389. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  390. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  391. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  392. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  393. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  394. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  395. package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  396. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  397. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  398. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  399. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  400. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  401. package/node_modules/zod/src/v3/types.ts +5136 -0
  402. package/node_modules/zod/src/v4/classic/checks.ts +30 -0
  403. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  404. package/node_modules/zod/src/v4/classic/compat.ts +66 -0
  405. package/node_modules/zod/src/v4/classic/errors.ts +75 -0
  406. package/node_modules/zod/src/v4/classic/external.ts +50 -0
  407. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  408. package/node_modules/zod/src/v4/classic/iso.ts +90 -0
  409. package/node_modules/zod/src/v4/classic/parse.ts +33 -0
  410. package/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
  411. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  412. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  413. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
  414. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  415. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  416. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  417. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  418. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
  419. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
  420. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  421. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  422. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
  423. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  424. package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
  425. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
  426. package/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
  427. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  428. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
  429. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  430. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
  431. package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  432. package/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
  433. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
  434. package/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
  435. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  436. package/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
  437. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
  438. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
  439. package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
  440. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  441. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
  442. package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
  443. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  444. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  445. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
  446. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  447. package/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
  448. package/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
  449. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
  450. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
  451. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
  452. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
  453. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
  454. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
  455. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  456. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  457. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  458. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  459. package/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
  460. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
  461. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
  462. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
  463. package/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
  464. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
  465. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
  466. package/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
  467. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
  468. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
  469. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
  470. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
  471. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
  472. package/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
  473. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  474. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  475. package/node_modules/zod/src/v4/core/api.ts +1594 -0
  476. package/node_modules/zod/src/v4/core/checks.ts +1283 -0
  477. package/node_modules/zod/src/v4/core/config.ts +15 -0
  478. package/node_modules/zod/src/v4/core/core.ts +134 -0
  479. package/node_modules/zod/src/v4/core/doc.ts +44 -0
  480. package/node_modules/zod/src/v4/core/errors.ts +424 -0
  481. package/node_modules/zod/src/v4/core/function.ts +176 -0
  482. package/node_modules/zod/src/v4/core/index.ts +15 -0
  483. package/node_modules/zod/src/v4/core/json-schema.ts +143 -0
  484. package/node_modules/zod/src/v4/core/parse.ts +94 -0
  485. package/node_modules/zod/src/v4/core/regexes.ts +135 -0
  486. package/node_modules/zod/src/v4/core/registries.ts +96 -0
  487. package/node_modules/zod/src/v4/core/schemas.ts +3842 -0
  488. package/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
  489. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  490. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  491. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  492. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  493. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  494. package/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
  495. package/node_modules/zod/src/v4/core/util.ts +775 -0
  496. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  497. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  498. package/node_modules/zod/src/v4/index.ts +4 -0
  499. package/node_modules/zod/src/v4/locales/ar.ts +125 -0
  500. package/node_modules/zod/src/v4/locales/az.ts +121 -0
  501. package/node_modules/zod/src/v4/locales/be.ts +184 -0
  502. package/node_modules/zod/src/v4/locales/ca.ts +127 -0
  503. package/node_modules/zod/src/v4/locales/cs.ts +142 -0
  504. package/node_modules/zod/src/v4/locales/de.ts +124 -0
  505. package/node_modules/zod/src/v4/locales/en.ts +127 -0
  506. package/node_modules/zod/src/v4/locales/eo.ts +125 -0
  507. package/node_modules/zod/src/v4/locales/es.ts +125 -0
  508. package/node_modules/zod/src/v4/locales/fa.ts +134 -0
  509. package/node_modules/zod/src/v4/locales/fi.ts +131 -0
  510. package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
  511. package/node_modules/zod/src/v4/locales/fr.ts +124 -0
  512. package/node_modules/zod/src/v4/locales/he.ts +125 -0
  513. package/node_modules/zod/src/v4/locales/hu.ts +126 -0
  514. package/node_modules/zod/src/v4/locales/id.ts +125 -0
  515. package/node_modules/zod/src/v4/locales/index.ts +39 -0
  516. package/node_modules/zod/src/v4/locales/it.ts +125 -0
  517. package/node_modules/zod/src/v4/locales/ja.ts +122 -0
  518. package/node_modules/zod/src/v4/locales/kh.ts +126 -0
  519. package/node_modules/zod/src/v4/locales/ko.ts +131 -0
  520. package/node_modules/zod/src/v4/locales/mk.ts +127 -0
  521. package/node_modules/zod/src/v4/locales/ms.ts +124 -0
  522. package/node_modules/zod/src/v4/locales/nl.ts +126 -0
  523. package/node_modules/zod/src/v4/locales/no.ts +124 -0
  524. package/node_modules/zod/src/v4/locales/ota.ts +125 -0
  525. package/node_modules/zod/src/v4/locales/pl.ts +126 -0
  526. package/node_modules/zod/src/v4/locales/ps.ts +133 -0
  527. package/node_modules/zod/src/v4/locales/pt.ts +123 -0
  528. package/node_modules/zod/src/v4/locales/ru.ts +184 -0
  529. package/node_modules/zod/src/v4/locales/sl.ts +126 -0
  530. package/node_modules/zod/src/v4/locales/sv.ts +127 -0
  531. package/node_modules/zod/src/v4/locales/ta.ts +125 -0
  532. package/node_modules/zod/src/v4/locales/th.ts +126 -0
  533. package/node_modules/zod/src/v4/locales/tr.ts +121 -0
  534. package/node_modules/zod/src/v4/locales/ua.ts +126 -0
  535. package/node_modules/zod/src/v4/locales/ur.ts +126 -0
  536. package/node_modules/zod/src/v4/locales/vi.ts +125 -0
  537. package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
  538. package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
  539. package/node_modules/zod/src/v4/mini/checks.ts +32 -0
  540. package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
  541. package/node_modules/zod/src/v4/mini/external.ts +40 -0
  542. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  543. package/node_modules/zod/src/v4/mini/iso.ts +62 -0
  544. package/node_modules/zod/src/v4/mini/parse.ts +1 -0
  545. package/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
  546. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  547. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
  548. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  549. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  550. package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  551. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
  552. package/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
  553. package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  554. package/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
  555. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  556. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
  557. package/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
  558. package/node_modules/zod/src/v4-mini/index.ts +1 -0
  559. package/node_modules/zod/v3/ZodError.cjs +138 -0
  560. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  561. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  562. package/node_modules/zod/v3/ZodError.js +133 -0
  563. package/node_modules/zod/v3/errors.cjs +17 -0
  564. package/node_modules/zod/v3/errors.d.cts +5 -0
  565. package/node_modules/zod/v3/errors.d.ts +5 -0
  566. package/node_modules/zod/v3/errors.js +9 -0
  567. package/node_modules/zod/v3/external.cjs +22 -0
  568. package/node_modules/zod/v3/external.d.cts +6 -0
  569. package/node_modules/zod/v3/external.d.ts +6 -0
  570. package/node_modules/zod/v3/external.js +6 -0
  571. package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  572. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  573. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  574. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  575. package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  576. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  577. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  578. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  579. package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  580. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  581. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  582. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  583. package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  584. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  585. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  586. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  587. package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  588. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  589. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  590. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  591. package/node_modules/zod/v3/helpers/util.cjs +137 -0
  592. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  593. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  594. package/node_modules/zod/v3/helpers/util.js +133 -0
  595. package/node_modules/zod/v3/index.cjs +33 -0
  596. package/node_modules/zod/v3/index.d.cts +4 -0
  597. package/node_modules/zod/v3/index.d.ts +4 -0
  598. package/node_modules/zod/v3/index.js +4 -0
  599. package/node_modules/zod/v3/locales/en.cjs +111 -0
  600. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  601. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  602. package/node_modules/zod/v3/locales/en.js +109 -0
  603. package/node_modules/zod/v3/standard-schema.cjs +2 -0
  604. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  605. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  606. package/node_modules/zod/v3/standard-schema.js +1 -0
  607. package/node_modules/zod/v3/types.cjs +3775 -0
  608. package/node_modules/zod/v3/types.d.cts +1031 -0
  609. package/node_modules/zod/v3/types.d.ts +1031 -0
  610. package/node_modules/zod/v3/types.js +3693 -0
  611. package/node_modules/zod/v4/classic/checks.cjs +32 -0
  612. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  613. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  614. package/node_modules/zod/v4/classic/checks.js +1 -0
  615. package/node_modules/zod/v4/classic/coerce.cjs +47 -0
  616. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  617. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  618. package/node_modules/zod/v4/classic/coerce.js +17 -0
  619. package/node_modules/zod/v4/classic/compat.cjs +57 -0
  620. package/node_modules/zod/v4/classic/compat.d.cts +46 -0
  621. package/node_modules/zod/v4/classic/compat.d.ts +46 -0
  622. package/node_modules/zod/v4/classic/compat.js +27 -0
  623. package/node_modules/zod/v4/classic/errors.cjs +67 -0
  624. package/node_modules/zod/v4/classic/errors.d.cts +30 -0
  625. package/node_modules/zod/v4/classic/errors.d.ts +30 -0
  626. package/node_modules/zod/v4/classic/errors.js +41 -0
  627. package/node_modules/zod/v4/classic/external.cjs +70 -0
  628. package/node_modules/zod/v4/classic/external.d.cts +13 -0
  629. package/node_modules/zod/v4/classic/external.d.ts +13 -0
  630. package/node_modules/zod/v4/classic/external.js +18 -0
  631. package/node_modules/zod/v4/classic/index.cjs +33 -0
  632. package/node_modules/zod/v4/classic/index.d.cts +4 -0
  633. package/node_modules/zod/v4/classic/index.d.ts +4 -0
  634. package/node_modules/zod/v4/classic/index.js +4 -0
  635. package/node_modules/zod/v4/classic/iso.cjs +60 -0
  636. package/node_modules/zod/v4/classic/iso.d.cts +22 -0
  637. package/node_modules/zod/v4/classic/iso.d.ts +22 -0
  638. package/node_modules/zod/v4/classic/iso.js +30 -0
  639. package/node_modules/zod/v4/classic/parse.cjs +32 -0
  640. package/node_modules/zod/v4/classic/parse.d.cts +23 -0
  641. package/node_modules/zod/v4/classic/parse.d.ts +23 -0
  642. package/node_modules/zod/v4/classic/parse.js +6 -0
  643. package/node_modules/zod/v4/classic/schemas.cjs +1109 -0
  644. package/node_modules/zod/v4/classic/schemas.d.cts +630 -0
  645. package/node_modules/zod/v4/classic/schemas.d.ts +630 -0
  646. package/node_modules/zod/v4/classic/schemas.js +1006 -0
  647. package/node_modules/zod/v4/core/api.cjs +1039 -0
  648. package/node_modules/zod/v4/core/api.d.cts +284 -0
  649. package/node_modules/zod/v4/core/api.d.ts +284 -0
  650. package/node_modules/zod/v4/core/api.js +906 -0
  651. package/node_modules/zod/v4/core/checks.cjs +591 -0
  652. package/node_modules/zod/v4/core/checks.d.cts +278 -0
  653. package/node_modules/zod/v4/core/checks.d.ts +278 -0
  654. package/node_modules/zod/v4/core/checks.js +565 -0
  655. package/node_modules/zod/v4/core/core.cjs +67 -0
  656. package/node_modules/zod/v4/core/core.d.cts +49 -0
  657. package/node_modules/zod/v4/core/core.d.ts +49 -0
  658. package/node_modules/zod/v4/core/core.js +61 -0
  659. package/node_modules/zod/v4/core/doc.cjs +39 -0
  660. package/node_modules/zod/v4/core/doc.d.cts +14 -0
  661. package/node_modules/zod/v4/core/doc.d.ts +14 -0
  662. package/node_modules/zod/v4/core/doc.js +35 -0
  663. package/node_modules/zod/v4/core/errors.cjs +226 -0
  664. package/node_modules/zod/v4/core/errors.d.cts +208 -0
  665. package/node_modules/zod/v4/core/errors.d.ts +208 -0
  666. package/node_modules/zod/v4/core/errors.js +195 -0
  667. package/node_modules/zod/v4/core/function.cjs +102 -0
  668. package/node_modules/zod/v4/core/function.d.cts +52 -0
  669. package/node_modules/zod/v4/core/function.d.ts +52 -0
  670. package/node_modules/zod/v4/core/function.js +75 -0
  671. package/node_modules/zod/v4/core/index.cjs +44 -0
  672. package/node_modules/zod/v4/core/index.d.cts +15 -0
  673. package/node_modules/zod/v4/core/index.d.ts +15 -0
  674. package/node_modules/zod/v4/core/index.js +15 -0
  675. package/node_modules/zod/v4/core/json-schema.cjs +2 -0
  676. package/node_modules/zod/v4/core/json-schema.d.cts +87 -0
  677. package/node_modules/zod/v4/core/json-schema.d.ts +87 -0
  678. package/node_modules/zod/v4/core/json-schema.js +1 -0
  679. package/node_modules/zod/v4/core/parse.cjs +87 -0
  680. package/node_modules/zod/v4/core/parse.d.cts +25 -0
  681. package/node_modules/zod/v4/core/parse.d.ts +25 -0
  682. package/node_modules/zod/v4/core/parse.js +57 -0
  683. package/node_modules/zod/v4/core/regexes.cjs +103 -0
  684. package/node_modules/zod/v4/core/regexes.d.cts +62 -0
  685. package/node_modules/zod/v4/core/regexes.d.ts +62 -0
  686. package/node_modules/zod/v4/core/regexes.js +95 -0
  687. package/node_modules/zod/v4/core/registries.cjs +56 -0
  688. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  689. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  690. package/node_modules/zod/v4/core/registries.js +51 -0
  691. package/node_modules/zod/v4/core/schemas.cjs +1748 -0
  692. package/node_modules/zod/v4/core/schemas.d.cts +1041 -0
  693. package/node_modules/zod/v4/core/schemas.d.ts +1041 -0
  694. package/node_modules/zod/v4/core/schemas.js +1717 -0
  695. package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  696. package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
  697. package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
  698. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  699. package/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
  700. package/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
  701. package/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
  702. package/node_modules/zod/v4/core/to-json-schema.js +849 -0
  703. package/node_modules/zod/v4/core/util.cjs +539 -0
  704. package/node_modules/zod/v4/core/util.d.cts +183 -0
  705. package/node_modules/zod/v4/core/util.d.ts +183 -0
  706. package/node_modules/zod/v4/core/util.js +493 -0
  707. package/node_modules/zod/v4/core/versions.cjs +8 -0
  708. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  709. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  710. package/node_modules/zod/v4/core/versions.js +5 -0
  711. package/node_modules/zod/v4/index.cjs +22 -0
  712. package/node_modules/zod/v4/index.d.cts +3 -0
  713. package/node_modules/zod/v4/index.d.ts +3 -0
  714. package/node_modules/zod/v4/index.js +3 -0
  715. package/node_modules/zod/v4/locales/ar.cjs +142 -0
  716. package/node_modules/zod/v4/locales/ar.d.cts +4 -0
  717. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  718. package/node_modules/zod/v4/locales/ar.js +116 -0
  719. package/node_modules/zod/v4/locales/az.cjs +141 -0
  720. package/node_modules/zod/v4/locales/az.d.cts +4 -0
  721. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  722. package/node_modules/zod/v4/locales/az.js +115 -0
  723. package/node_modules/zod/v4/locales/be.cjs +190 -0
  724. package/node_modules/zod/v4/locales/be.d.cts +4 -0
  725. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  726. package/node_modules/zod/v4/locales/be.js +164 -0
  727. package/node_modules/zod/v4/locales/ca.cjs +144 -0
  728. package/node_modules/zod/v4/locales/ca.d.cts +4 -0
  729. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  730. package/node_modules/zod/v4/locales/ca.js +118 -0
  731. package/node_modules/zod/v4/locales/cs.cjs +161 -0
  732. package/node_modules/zod/v4/locales/cs.d.cts +4 -0
  733. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  734. package/node_modules/zod/v4/locales/cs.js +135 -0
  735. package/node_modules/zod/v4/locales/de.cjs +142 -0
  736. package/node_modules/zod/v4/locales/de.d.cts +4 -0
  737. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  738. package/node_modules/zod/v4/locales/de.js +116 -0
  739. package/node_modules/zod/v4/locales/en.cjs +145 -0
  740. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  741. package/node_modules/zod/v4/locales/en.d.ts +5 -0
  742. package/node_modules/zod/v4/locales/en.js +117 -0
  743. package/node_modules/zod/v4/locales/eo.cjs +144 -0
  744. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  745. package/node_modules/zod/v4/locales/eo.d.ts +5 -0
  746. package/node_modules/zod/v4/locales/eo.js +116 -0
  747. package/node_modules/zod/v4/locales/es.cjs +143 -0
  748. package/node_modules/zod/v4/locales/es.d.cts +4 -0
  749. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  750. package/node_modules/zod/v4/locales/es.js +117 -0
  751. package/node_modules/zod/v4/locales/fa.cjs +148 -0
  752. package/node_modules/zod/v4/locales/fa.d.cts +4 -0
  753. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  754. package/node_modules/zod/v4/locales/fa.js +122 -0
  755. package/node_modules/zod/v4/locales/fi.cjs +148 -0
  756. package/node_modules/zod/v4/locales/fi.d.cts +4 -0
  757. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  758. package/node_modules/zod/v4/locales/fi.js +122 -0
  759. package/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
  760. package/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
  761. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  762. package/node_modules/zod/v4/locales/fr-CA.js +117 -0
  763. package/node_modules/zod/v4/locales/fr.cjs +142 -0
  764. package/node_modules/zod/v4/locales/fr.d.cts +4 -0
  765. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  766. package/node_modules/zod/v4/locales/fr.js +116 -0
  767. package/node_modules/zod/v4/locales/he.cjs +143 -0
  768. package/node_modules/zod/v4/locales/he.d.cts +4 -0
  769. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  770. package/node_modules/zod/v4/locales/he.js +117 -0
  771. package/node_modules/zod/v4/locales/hu.cjs +143 -0
  772. package/node_modules/zod/v4/locales/hu.d.cts +4 -0
  773. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  774. package/node_modules/zod/v4/locales/hu.js +117 -0
  775. package/node_modules/zod/v4/locales/id.cjs +142 -0
  776. package/node_modules/zod/v4/locales/id.d.cts +4 -0
  777. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  778. package/node_modules/zod/v4/locales/id.js +116 -0
  779. package/node_modules/zod/v4/locales/index.cjs +84 -0
  780. package/node_modules/zod/v4/locales/index.d.cts +39 -0
  781. package/node_modules/zod/v4/locales/index.d.ts +39 -0
  782. package/node_modules/zod/v4/locales/index.js +39 -0
  783. package/node_modules/zod/v4/locales/it.cjs +143 -0
  784. package/node_modules/zod/v4/locales/it.d.cts +4 -0
  785. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  786. package/node_modules/zod/v4/locales/it.js +117 -0
  787. package/node_modules/zod/v4/locales/ja.cjs +141 -0
  788. package/node_modules/zod/v4/locales/ja.d.cts +4 -0
  789. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  790. package/node_modules/zod/v4/locales/ja.js +115 -0
  791. package/node_modules/zod/v4/locales/kh.cjs +143 -0
  792. package/node_modules/zod/v4/locales/kh.d.cts +4 -0
  793. package/node_modules/zod/v4/locales/kh.d.ts +4 -0
  794. package/node_modules/zod/v4/locales/kh.js +117 -0
  795. package/node_modules/zod/v4/locales/ko.cjs +147 -0
  796. package/node_modules/zod/v4/locales/ko.d.cts +4 -0
  797. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  798. package/node_modules/zod/v4/locales/ko.js +121 -0
  799. package/node_modules/zod/v4/locales/mk.cjs +144 -0
  800. package/node_modules/zod/v4/locales/mk.d.cts +4 -0
  801. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  802. package/node_modules/zod/v4/locales/mk.js +118 -0
  803. package/node_modules/zod/v4/locales/ms.cjs +142 -0
  804. package/node_modules/zod/v4/locales/ms.d.cts +4 -0
  805. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  806. package/node_modules/zod/v4/locales/ms.js +116 -0
  807. package/node_modules/zod/v4/locales/nl.cjs +143 -0
  808. package/node_modules/zod/v4/locales/nl.d.cts +4 -0
  809. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  810. package/node_modules/zod/v4/locales/nl.js +117 -0
  811. package/node_modules/zod/v4/locales/no.cjs +142 -0
  812. package/node_modules/zod/v4/locales/no.d.cts +4 -0
  813. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  814. package/node_modules/zod/v4/locales/no.js +116 -0
  815. package/node_modules/zod/v4/locales/ota.cjs +143 -0
  816. package/node_modules/zod/v4/locales/ota.d.cts +4 -0
  817. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  818. package/node_modules/zod/v4/locales/ota.js +117 -0
  819. package/node_modules/zod/v4/locales/pl.cjs +143 -0
  820. package/node_modules/zod/v4/locales/pl.d.cts +4 -0
  821. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  822. package/node_modules/zod/v4/locales/pl.js +117 -0
  823. package/node_modules/zod/v4/locales/ps.cjs +148 -0
  824. package/node_modules/zod/v4/locales/ps.d.cts +4 -0
  825. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  826. package/node_modules/zod/v4/locales/ps.js +122 -0
  827. package/node_modules/zod/v4/locales/pt.cjs +142 -0
  828. package/node_modules/zod/v4/locales/pt.d.cts +4 -0
  829. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  830. package/node_modules/zod/v4/locales/pt.js +116 -0
  831. package/node_modules/zod/v4/locales/ru.cjs +190 -0
  832. package/node_modules/zod/v4/locales/ru.d.cts +4 -0
  833. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  834. package/node_modules/zod/v4/locales/ru.js +164 -0
  835. package/node_modules/zod/v4/locales/sl.cjs +143 -0
  836. package/node_modules/zod/v4/locales/sl.d.cts +4 -0
  837. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  838. package/node_modules/zod/v4/locales/sl.js +117 -0
  839. package/node_modules/zod/v4/locales/sv.cjs +144 -0
  840. package/node_modules/zod/v4/locales/sv.d.cts +4 -0
  841. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  842. package/node_modules/zod/v4/locales/sv.js +118 -0
  843. package/node_modules/zod/v4/locales/ta.cjs +143 -0
  844. package/node_modules/zod/v4/locales/ta.d.cts +4 -0
  845. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  846. package/node_modules/zod/v4/locales/ta.js +117 -0
  847. package/node_modules/zod/v4/locales/th.cjs +143 -0
  848. package/node_modules/zod/v4/locales/th.d.cts +4 -0
  849. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  850. package/node_modules/zod/v4/locales/th.js +117 -0
  851. package/node_modules/zod/v4/locales/tr.cjs +143 -0
  852. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  853. package/node_modules/zod/v4/locales/tr.d.ts +5 -0
  854. package/node_modules/zod/v4/locales/tr.js +115 -0
  855. package/node_modules/zod/v4/locales/ua.cjs +143 -0
  856. package/node_modules/zod/v4/locales/ua.d.cts +4 -0
  857. package/node_modules/zod/v4/locales/ua.d.ts +4 -0
  858. package/node_modules/zod/v4/locales/ua.js +117 -0
  859. package/node_modules/zod/v4/locales/ur.cjs +143 -0
  860. package/node_modules/zod/v4/locales/ur.d.cts +4 -0
  861. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  862. package/node_modules/zod/v4/locales/ur.js +117 -0
  863. package/node_modules/zod/v4/locales/vi.cjs +142 -0
  864. package/node_modules/zod/v4/locales/vi.d.cts +4 -0
  865. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  866. package/node_modules/zod/v4/locales/vi.js +116 -0
  867. package/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
  868. package/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
  869. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  870. package/node_modules/zod/v4/locales/zh-CN.js +116 -0
  871. package/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
  872. package/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
  873. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  874. package/node_modules/zod/v4/locales/zh-TW.js +117 -0
  875. package/node_modules/zod/v4/mini/checks.cjs +34 -0
  876. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  877. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  878. package/node_modules/zod/v4/mini/checks.js +1 -0
  879. package/node_modules/zod/v4/mini/coerce.cjs +47 -0
  880. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  881. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  882. package/node_modules/zod/v4/mini/coerce.js +17 -0
  883. package/node_modules/zod/v4/mini/external.cjs +62 -0
  884. package/node_modules/zod/v4/mini/external.d.cts +11 -0
  885. package/node_modules/zod/v4/mini/external.d.ts +11 -0
  886. package/node_modules/zod/v4/mini/external.js +13 -0
  887. package/node_modules/zod/v4/mini/index.cjs +32 -0
  888. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  889. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  890. package/node_modules/zod/v4/mini/index.js +3 -0
  891. package/node_modules/zod/v4/mini/iso.cjs +60 -0
  892. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  893. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  894. package/node_modules/zod/v4/mini/iso.js +30 -0
  895. package/node_modules/zod/v4/mini/parse.cjs +8 -0
  896. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  897. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  898. package/node_modules/zod/v4/mini/parse.js +1 -0
  899. package/node_modules/zod/v4/mini/schemas.cjs +839 -0
  900. package/node_modules/zod/v4/mini/schemas.d.cts +356 -0
  901. package/node_modules/zod/v4/mini/schemas.d.ts +356 -0
  902. package/node_modules/zod/v4/mini/schemas.js +732 -0
  903. package/node_modules/zod/v4-mini/index.cjs +17 -0
  904. package/node_modules/zod/v4-mini/index.d.cts +1 -0
  905. package/node_modules/zod/v4-mini/index.d.ts +1 -0
  906. package/node_modules/zod/v4-mini/index.js +1 -0
  907. package/package.json +10 -20
@@ -0,0 +1,285 @@
1
+ import type {
2
+ ActivationInput,
3
+ ActivationResult,
4
+ Assumption,
5
+ DangerousGate,
6
+ ModeScoring,
7
+ NonFunctionalGate,
8
+ ProcessMode,
9
+ SynthesizedSeed,
10
+ WorkflowCanvas,
11
+ } from "./types";
12
+ import { activationResultSchema } from "./types";
13
+
14
+ function compact(text: string): string {
15
+ return text.replace(/\s+/g, " ").trim();
16
+ }
17
+
18
+ let _ctr = 0;
19
+ function aId(): string { return `asmp-${++_ctr}-${Date.now().toString(36)}`; }
20
+
21
+ // ---------------------------------------------------------------------------
22
+ // 1. Assumption Register
23
+ // ---------------------------------------------------------------------------
24
+
25
+ export function buildAssumptions(seed: SynthesizedSeed, input: ActivationInput): Assumption[] {
26
+ const assumptions: Assumption[] = [];
27
+
28
+ // Open questions → unconfirmed assumptions
29
+ for (const q of seed.open_questions) {
30
+ assumptions.push({
31
+ id: aId(), text: q, status: "unconfirmed",
32
+ evidence_type: "weak-inference", risk_level: "medium", source: "user-question",
33
+ });
34
+ }
35
+
36
+ // Missing inputs → high-risk unconfirmed assumptions
37
+ for (const m of seed.missing_inputs) {
38
+ assumptions.push({
39
+ id: aId(), text: m, status: "unconfirmed",
40
+ evidence_type: "weak-inference", risk_level: "high", source: "missing-input",
41
+ });
42
+ }
43
+
44
+ // If target user is generic → assumption about audience
45
+ if (seed.target_user === "Solo builders shipping software.") {
46
+ assumptions.push({
47
+ id: aId(), text: "Target user is assumed to be solo builders (not explicitly stated).",
48
+ status: "unconfirmed", evidence_type: "weak-inference", risk_level: "medium", source: "inference",
49
+ });
50
+ }
51
+
52
+ // If no repo → assumption about starting fresh
53
+ if (!input.repo_exists) {
54
+ assumptions.push({
55
+ id: aId(), text: "No existing codebase — starting from scratch.",
56
+ status: "confirmed", evidence_type: "user-backed", risk_level: "low", source: "user-input",
57
+ });
58
+ }
59
+
60
+ return assumptions;
61
+ }
62
+
63
+ // ---------------------------------------------------------------------------
64
+ // 2. Workflow Grounding Canvas
65
+ // ---------------------------------------------------------------------------
66
+
67
+ const USER_PATTERNS = [
68
+ /\bfor\s+([^.,;!?\n]{4,60}?)(?:\s+(?:that|who|which))/i,
69
+ /\bfor\s+([^.,;!?\n]{4,60})/i,
70
+ /\btargeting\s+([^.,;!?\n]{4,60})/i,
71
+ ];
72
+
73
+ const CURRENT_WORKFLOW_PATTERNS = [
74
+ /(?:right now|currently|today)[,:]?\s+(.{15,150})/i,
75
+ /(?:we|I)\s+(?:currently|already)\s+(.{10,100})/i,
76
+ /(?:the current|our current)\s+(.{10,100})/i,
77
+ ];
78
+
79
+ const TARGET_WORKFLOW_PATTERNS = [
80
+ /(?:I want|we want|should be able to|the user should)\s+(.{10,150})/i,
81
+ /(?:instead of|rather than)\s+.{5,50}?,?\s*(.{10,100})/i,
82
+ ];
83
+
84
+ const JOB_PATTERNS = [
85
+ /(?:the core outcome|the goal|the job|what I want)\s+(?:is|I want)[:\s]+(.{10,150})/i,
86
+ /(?:so that|in order to)\s+(.{10,100})/i,
87
+ ];
88
+
89
+ export function buildWorkflowCanvas(raw: string, seed: SynthesizedSeed): WorkflowCanvas {
90
+ let primary_user = "";
91
+ for (const p of USER_PATTERNS) {
92
+ const m = raw.match(p);
93
+ if (m?.[1] && m[1].length > 5) { primary_user = compact(m[1]); break; }
94
+ }
95
+ if (!primary_user && seed.target_user !== "Solo builders shipping software.") {
96
+ primary_user = seed.target_user;
97
+ }
98
+
99
+ let current_workflow = "";
100
+ for (const p of CURRENT_WORKFLOW_PATTERNS) {
101
+ const m = raw.match(p);
102
+ if (m?.[1]) { current_workflow = compact(m[1]).slice(0, 150); break; }
103
+ }
104
+
105
+ let target_workflow = "";
106
+ for (const p of TARGET_WORKFLOW_PATTERNS) {
107
+ const m = raw.match(p);
108
+ if (m?.[1]) { target_workflow = compact(m[1]).slice(0, 150); break; }
109
+ }
110
+
111
+ let job_to_be_done = seed.v1_outcome || "";
112
+ for (const p of JOB_PATTERNS) {
113
+ const m = raw.match(p);
114
+ if (m?.[1] && m[1].length > 15) { job_to_be_done = compact(m[1]).slice(0, 150); break; }
115
+ }
116
+
117
+ return { primary_user, current_workflow, target_workflow, job_to_be_done, edge_cases: [] };
118
+ }
119
+
120
+ // ---------------------------------------------------------------------------
121
+ // 3. Non-functional gates
122
+ // ---------------------------------------------------------------------------
123
+
124
+ const NF_PATTERNS: { category: NonFunctionalGate["category"]; patterns: RegExp[]; reason: string }[] = [
125
+ { category: "security", patterns: [/\bauth\b/i, /\bpassword\b/i, /\btoken\b/i, /\bOAuth\b/i, /\bencrypt/i, /\bAPI\s*key\b/i], reason: "Auth/security-related functionality detected." },
126
+ { category: "privacy", patterns: [/\bPII\b/i, /\bpersonal\s+data\b/i, /\bGDPR\b/i, /\bemail\s+address/i, /\buser\s+data\b/i], reason: "Personal/user data handling detected." },
127
+ { category: "compliance", patterns: [/\bcompliance\b/i, /\bregulatory\b/i, /\bHIPAA\b/i, /\bSOC\s*2\b/i, /\blegal\b/i], reason: "Compliance-relevant domain detected." },
128
+ { category: "performance", patterns: [/\breal.?time\b/i, /\blatency\b/i, /\bscale\b/i, /\bconcurren/i, /\bstreaming\b/i], reason: "Performance-sensitive requirements detected." },
129
+ { category: "observability", patterns: [/\blogging\b/i, /\bmonitoring\b/i, /\balert/i, /\bmetric/i, /\btrac(?:e|ing)\b/i], reason: "Observability-relevant functionality detected." },
130
+ ];
131
+
132
+ export function checkNonFunctionalGates(raw: string, constraints: string): NonFunctionalGate[] {
133
+ const combined = `${raw} ${constraints}`;
134
+ const gates: NonFunctionalGate[] = [];
135
+
136
+ for (const nf of NF_PATTERNS) {
137
+ const triggered = nf.patterns.some(p => p.test(combined));
138
+ if (triggered) {
139
+ gates.push({
140
+ category: nf.category,
141
+ flagged: true,
142
+ reason: nf.reason,
143
+ severity: nf.category === "security" || nf.category === "privacy" ? "medium" : "low",
144
+ });
145
+ }
146
+ }
147
+
148
+ return gates;
149
+ }
150
+
151
+ // ---------------------------------------------------------------------------
152
+ // 4. Dangerous gates
153
+ // ---------------------------------------------------------------------------
154
+
155
+ export function checkDangerousGates(raw: string, constraints: string, seed: SynthesizedSeed): DangerousGate[] {
156
+ const combined = compact(`${raw} ${constraints}`).toLowerCase();
157
+ const gates: DangerousGate[] = [];
158
+
159
+ // Privacy high-risk
160
+ if (/\b(medical|health|financial|banking|credit\s*card|SSN|social\s*security)\b/i.test(combined)) {
161
+ gates.push({ gate: "privacy-high-risk", triggered: true, reason: "Domain involves sensitive personal/financial/medical data." });
162
+ }
163
+
164
+ // Trust boundary uncertainty
165
+ if (seed.missing_inputs.some(m => /target user/i.test(m)) || seed.target_user === "Solo builders shipping software.") {
166
+ if (/\b(team|enterprise|organization|company|admin)\b/i.test(combined) && !/\bnot?\s+(?:a\s+)?(?:team|enterprise)/i.test(combined)) {
167
+ gates.push({ gate: "trust-boundary-uncertain", triggered: true, reason: "Multi-user/team context with unclear trust boundaries." });
168
+ }
169
+ }
170
+
171
+ // Production-critical
172
+ if (/\b(production|prod|live\s+system|critical\s+path|payment|billing)\b/i.test(combined)) {
173
+ if (!/\bno\s+billing\b/i.test(combined) && !/\bno\s+payment\b/i.test(combined)) {
174
+ gates.push({ gate: "production-critical", triggered: true, reason: "Production-critical or payment-adjacent functionality." });
175
+ }
176
+ }
177
+
178
+ // Overbroad + missing stop condition
179
+ const systemCount = (combined.match(/\b(slack|jira|github|linear|hubspot|notion|email|stripe|twilio)\b/gi) ?? []).length;
180
+ const hasStopCondition = /\bv1\b|\bfirst\s+slice\b|\bonly\b|\bjust\b|\bsimple\b|\bnarrow\b/i.test(combined);
181
+ if (systemCount >= 4 && !hasStopCondition) {
182
+ gates.push({ gate: "overbroad-no-stop", triggered: true, reason: `${systemCount} systems mentioned with no clear V1 narrowing.` });
183
+ }
184
+
185
+ return gates;
186
+ }
187
+
188
+ // ---------------------------------------------------------------------------
189
+ // 5. Mode scoring
190
+ // ---------------------------------------------------------------------------
191
+
192
+ export function scoreMode(raw: string, constraints: string, seed: SynthesizedSeed): ModeScoring {
193
+ const combined = compact(`${raw} ${constraints}`).toLowerCase();
194
+
195
+ const surface_area = combined.length > 500 ? 2 : combined.length > 200 ? 1 : 0;
196
+
197
+ const integrations = (combined.match(/\b(slack|jira|github|linear|hubspot|notion|email|supabase|stripe|firebase|aws)\b/gi) ?? []);
198
+ const integration_count = Math.min(integrations.length, 3);
199
+
200
+ const user_clarity = seed.target_user !== "Solo builders shipping software." ? 0 : 2;
201
+
202
+ const outcome_concreteness = seed.v1_outcome && seed.v1_outcome.length > 20 ? 0 : seed.v1_outcome ? 1 : 3;
203
+
204
+ const coordination_complexity = /\b(team|across\s+teams|coordinate|orchestrat)\b/i.test(combined) ? 2 : 0;
205
+
206
+ const contradictions = seed.missing_inputs.filter(m => /contradict|conflicting/i.test(m)).length;
207
+ const contradiction_level = Math.min(contradictions, 3);
208
+
209
+ const appetite_mismatch = /\b(two\s+weeks|one\s+week|weekend)\b/i.test(combined) && integration_count >= 2 ? 2 : 0;
210
+
211
+ const total = surface_area + integration_count + user_clarity + outcome_concreteness +
212
+ coordination_complexity + contradiction_level + appetite_mismatch;
213
+
214
+ return { surface_area, integration_count, user_clarity, outcome_concreteness,
215
+ coordination_complexity, contradiction_level, appetite_mismatch, total };
216
+ }
217
+
218
+ // ---------------------------------------------------------------------------
219
+ // 6. Two-stage mode selection
220
+ // ---------------------------------------------------------------------------
221
+
222
+ export function selectModeV2(
223
+ dangerousGates: DangerousGate[],
224
+ scoring: ModeScoring,
225
+ ): { mode: ProcessMode; reason: string } {
226
+ // Stage 1: Dangerous gates → governance
227
+ const triggered = dangerousGates.filter(g => g.triggered);
228
+ if (triggered.length > 0) {
229
+ return {
230
+ mode: "governance",
231
+ reason: `Dangerous gate(s): ${triggered.map(g => g.gate).join(", ")}.`,
232
+ };
233
+ }
234
+
235
+ // Stage 2: Scoring → simple vs standard
236
+ if (scoring.total <= 3) {
237
+ return { mode: "minimal", reason: `Low complexity score (${scoring.total}/21). Lightweight process.` };
238
+ }
239
+ if (scoring.total >= 10) {
240
+ return { mode: "governance", reason: `High complexity score (${scoring.total}/21). Careful review recommended.` };
241
+ }
242
+
243
+ return { mode: "structured", reason: `Standard complexity score (${scoring.total}/21).` };
244
+ }
245
+
246
+ // ---------------------------------------------------------------------------
247
+ // 7. Escalation triggers
248
+ // ---------------------------------------------------------------------------
249
+
250
+ export function checkEscalationTriggers(raw: string): string[] {
251
+ const triggers: string[] = [];
252
+ if (/\btrust\s+boundar/i.test(raw)) triggers.push("Trust boundaries appeared.");
253
+ if ((raw.match(/\b(slack|jira|github|linear|hubspot|notion|email|supabase|stripe)\b/gi) ?? []).length >= 3) {
254
+ triggers.push("Integration count materially increased.");
255
+ }
256
+ if (/\b(and also|plus|additionally)\s+(?:for|targeting)\s/i.test(raw)) triggers.push("Target users may have split.");
257
+ if (/\b(and also|plus|additionally)\s+(?:build|add|create)\s/i.test(raw)) triggers.push("Scope may have expanded materially.");
258
+ if (/\b(HIPAA|GDPR|SOC|PCI|encrypt|sensitive\s+data)\b/i.test(raw)) triggers.push("Privacy/security risk increased.");
259
+ return triggers;
260
+ }
261
+
262
+ // ---------------------------------------------------------------------------
263
+ // Full Activation V2
264
+ // ---------------------------------------------------------------------------
265
+
266
+ export function activateV2(input: ActivationInput, seed: SynthesizedSeed): ActivationResult {
267
+ const assumptions = buildAssumptions(seed, input);
268
+ const workflow_canvas = buildWorkflowCanvas(input.raw_idea, seed);
269
+ const non_functional_gates = checkNonFunctionalGates(input.raw_idea, input.constraints);
270
+ const dangerous_gates = checkDangerousGates(input.raw_idea, input.constraints, seed);
271
+ const mode_scoring = scoreMode(input.raw_idea, input.constraints, seed);
272
+ const { mode } = selectModeV2(dangerous_gates, mode_scoring);
273
+ const escalation_triggers = checkEscalationTriggers(input.raw_idea);
274
+
275
+ return activationResultSchema.parse({
276
+ assumptions,
277
+ workflow_canvas,
278
+ non_functional_gates,
279
+ dangerous_gates,
280
+ mode_scoring,
281
+ selected_mode: mode,
282
+ mode_is_escalatable: true,
283
+ escalation_triggers,
284
+ });
285
+ }
@@ -0,0 +1,403 @@
1
+ import { randomBytes } from "crypto";
2
+ import type {
3
+ AuditedReceipt,
4
+ AuditResult,
5
+ CanonicalDelta,
6
+ ClaimAssessment,
7
+ ClaimDisposition,
8
+ GateState,
9
+ NextSlice,
10
+ NormalizedReturnEnvelope,
11
+ TrustPosture,
12
+ } from "./types";
13
+ import { auditedReceiptSchema } from "./types";
14
+ import { deriveControlFlags } from "./run-snapshot";
15
+ import type { TraceSummary } from "./execution-trace";
16
+ import type { BudgetSummary } from "./budget-ledger";
17
+ import type { OverflowSummary } from "./types";
18
+
19
+ // ---------------------------------------------------------------------------
20
+ // Audited Receipt — the official product-level receipt
21
+ // ---------------------------------------------------------------------------
22
+ //
23
+ // The audited receipt is what the system trusts. It is built from:
24
+ // - NormalizedReturnEnvelope (what the agent claimed)
25
+ // - CanonicalDelta (what actually changed, with evidence accounting)
26
+ // - GateState (the gate's verdict on the evidence)
27
+ // - NextSlice (what comes next, if anything)
28
+ //
29
+ // It explicitly distinguishes:
30
+ // - what was claimed
31
+ // - what was actually proven
32
+ // - what remains partial / inferred / weak
33
+ // - what cautions and residuals carry forward
34
+ // - whether closure is allowed
35
+ // - whether canonical state advanced, and on what basis
36
+ // ---------------------------------------------------------------------------
37
+
38
+ export interface BuildAuditedReceiptInput {
39
+ envelope: NormalizedReturnEnvelope;
40
+ delta: CanonicalDelta;
41
+ gate: GateState;
42
+ nextSlice: NextSlice | null;
43
+ projectId?: string;
44
+ /** Audit result, when available. Feeds explicit audit findings onto the receipt. */
45
+ audit?: AuditResult | null;
46
+ /** Trace summary from execution-trace module, when available. */
47
+ traceSummary?: TraceSummary | null;
48
+ /** Budget summary from budget-ledger module, when available. */
49
+ budgetSummary?: BudgetSummary | null;
50
+ /** Overflow summary from overflow-manifest module, when available. */
51
+ overflowSummary?: OverflowSummary | null;
52
+ }
53
+
54
+ // ---------------------------------------------------------------------------
55
+ // Claim assessment — classifies each significant claim by evidence strength
56
+ // ---------------------------------------------------------------------------
57
+
58
+ function assessClaims(
59
+ envelope: NormalizedReturnEnvelope,
60
+ delta: CanonicalDelta,
61
+ ): ClaimAssessment[] {
62
+ const assessments: ClaimAssessment[] = [];
63
+
64
+ // Pool of structured evidence for matching
65
+ const verificationPool = new Set(
66
+ delta.verification_runs.map(v => v.toLowerCase()),
67
+ );
68
+ const evidencePool = new Set(
69
+ delta.evidence_items.map(e => e.toLowerCase()),
70
+ );
71
+ const criteriaPool = new Set(
72
+ (delta.evidence_accounting?.criteria_met ?? []).map(c => c.toLowerCase()),
73
+ );
74
+
75
+ function classify(text: string): { disposition: ClaimDisposition; basis: string } {
76
+ const lower = text.toLowerCase();
77
+ const words = lower.split(/\s+/).filter(w => w.length > 3);
78
+ const fullMatchThreshold = words.length <= 2 ? 1 : 2;
79
+
80
+ // Track best partial match across all pools for fallback to "partial"
81
+ let bestPartialLine = "";
82
+ let bestPartialScore = 0;
83
+ let bestPartialPool = "";
84
+
85
+ // Check verification runs
86
+ for (const v of verificationPool) {
87
+ const matchCount = words.filter(w => v.includes(w)).length;
88
+ if (matchCount >= fullMatchThreshold) {
89
+ return { disposition: "proven", basis: `Matched verification: ${v.slice(0, 80)}` };
90
+ }
91
+ if (matchCount > bestPartialScore) {
92
+ bestPartialScore = matchCount;
93
+ bestPartialLine = v;
94
+ bestPartialPool = "verification";
95
+ }
96
+ }
97
+
98
+ // Check evidence items
99
+ for (const e of evidencePool) {
100
+ const matchCount = words.filter(w => e.includes(w)).length;
101
+ if (matchCount >= fullMatchThreshold) {
102
+ return { disposition: "supported", basis: `Matched evidence: ${e.slice(0, 80)}` };
103
+ }
104
+ if (matchCount > bestPartialScore) {
105
+ bestPartialScore = matchCount;
106
+ bestPartialLine = e;
107
+ bestPartialPool = "evidence";
108
+ }
109
+ }
110
+
111
+ // Check criteria met
112
+ for (const c of criteriaPool) {
113
+ const matchCount = words.filter(w => c.includes(w)).length;
114
+ if (matchCount >= fullMatchThreshold) {
115
+ return { disposition: "supported", basis: `Matched criterion: ${c.slice(0, 80)}` };
116
+ }
117
+ if (matchCount > bestPartialScore) {
118
+ bestPartialScore = matchCount;
119
+ bestPartialLine = c;
120
+ bestPartialPool = "criterion";
121
+ }
122
+ }
123
+
124
+ // Partial: at least 1 keyword matched but not enough for full supported/proven
125
+ if (bestPartialScore >= 1) {
126
+ return {
127
+ disposition: "partial",
128
+ basis: `Partial ${bestPartialPool} match (${bestPartialScore}/${words.length} keywords): ${bestPartialLine.slice(0, 80)}`,
129
+ };
130
+ }
131
+
132
+ // Content mode from envelope — inferred items get "inferred" disposition
133
+ const envelopeItem = envelope.evidence_items.find(
134
+ ei => ei.text.toLowerCase() === lower,
135
+ );
136
+ if (envelopeItem && (envelopeItem.content_mode === "inferred" || envelopeItem.content_mode === "reconstructed")) {
137
+ return { disposition: "inferred", basis: `Content mode: ${envelopeItem.content_mode}` };
138
+ }
139
+
140
+ return { disposition: "unsubstantiated", basis: "No matching structured evidence found." };
141
+ }
142
+
143
+ // Assess the summary claim (the primary output statement)
144
+ if (envelope.summary) {
145
+ const result = classify(envelope.summary);
146
+ assessments.push({ claim: envelope.summary, ...result });
147
+ }
148
+
149
+ // Assess each success criterion claimed
150
+ for (const criterion of envelope.criteria_met) {
151
+ const result = classify(criterion.text);
152
+ assessments.push({ claim: criterion.text, ...result });
153
+ }
154
+
155
+ // Assess each decision made
156
+ for (const decision of envelope.decisions) {
157
+ const result = classify(decision.text);
158
+ assessments.push({ claim: decision.text, ...result });
159
+ }
160
+
161
+ return assessments;
162
+ }
163
+
164
+ // ---------------------------------------------------------------------------
165
+ // Trust posture — overall trust level derived from gate + evidence + residuals
166
+ // ---------------------------------------------------------------------------
167
+
168
+ function deriveTrustPosture(
169
+ gate: GateState,
170
+ residualCount: number,
171
+ ): { posture: TrustPosture; basis: string } {
172
+ switch (gate.label) {
173
+ case "accepted":
174
+ if (residualCount === 0) {
175
+ return {
176
+ posture: "verified",
177
+ basis: `Gate accepted. ${gate.evidence_summary.verification_count} verification(s), ${gate.evidence_summary.evidence_count} evidence item(s). No residuals.`,
178
+ };
179
+ }
180
+ return {
181
+ posture: "cautioned",
182
+ basis: `Gate accepted but ${residualCount} residual(s) carry forward.`,
183
+ };
184
+
185
+ case "accepted-with-cautions":
186
+ return {
187
+ posture: "cautioned",
188
+ basis: gate.reason,
189
+ };
190
+
191
+ case "held-for-review":
192
+ return {
193
+ posture: "held",
194
+ basis: gate.reason,
195
+ };
196
+
197
+ case "blocked-missing-evidence":
198
+ return {
199
+ posture: "blocked",
200
+ basis: gate.reason,
201
+ };
202
+
203
+ case "pending":
204
+ case "not-checked":
205
+ return {
206
+ posture: "unknown",
207
+ basis: gate.reason,
208
+ };
209
+ }
210
+ }
211
+
212
+ // ---------------------------------------------------------------------------
213
+ // Closure basis — why closure is or isn't allowed
214
+ // ---------------------------------------------------------------------------
215
+
216
+ function deriveClosureBasis(
217
+ closureAllowed: boolean,
218
+ gate: GateState,
219
+ delta: CanonicalDelta,
220
+ ): string {
221
+ if (closureAllowed) {
222
+ if (delta.objective_state === "met" && delta.unresolved.length === 0) {
223
+ return "Objective met, gate passed, no unresolved items.";
224
+ }
225
+ return `Gate: ${gate.label}. Closure permitted despite ${delta.unresolved.length} unresolved item(s).`;
226
+ }
227
+
228
+ const reasons: string[] = [];
229
+ if (gate.label === "held-for-review") reasons.push("Gate held for review");
230
+ if (gate.label === "blocked-missing-evidence") reasons.push("Gate blocked — missing evidence");
231
+ if (delta.unresolved.length > 0) reasons.push(`${delta.unresolved.length} unresolved item(s)`);
232
+ if (reasons.length === 0) reasons.push("Pre-return phase — no return to close");
233
+
234
+ return reasons.join(". ") + ".";
235
+ }
236
+
237
+ // ---------------------------------------------------------------------------
238
+ // Advancement basis — what caused canonical state to advance
239
+ // ---------------------------------------------------------------------------
240
+
241
+ function deriveAdvancementBasis(delta: CanonicalDelta): { advanced: boolean; basis: string } {
242
+ const ea = delta.evidence_accounting;
243
+ if (!ea) {
244
+ // No evidence accounting — check state_fields_advanced
245
+ if (delta.state_fields_advanced.length > 0) {
246
+ return { advanced: true, basis: delta.state_fields_advanced.join("; ") };
247
+ }
248
+ return { advanced: false, basis: "No evidence accounting available." };
249
+ }
250
+
251
+ if (ea.consequence_type === "no-change") {
252
+ return { advanced: false, basis: ea.consequence_label };
253
+ }
254
+
255
+ return { advanced: true, basis: ea.consequence_label };
256
+ }
257
+
258
+ // ---------------------------------------------------------------------------
259
+ // Primary builder — assembles the audited receipt from component objects
260
+ // ---------------------------------------------------------------------------
261
+
262
+ export function buildAuditedReceipt(input: BuildAuditedReceiptInput): AuditedReceipt {
263
+ const { envelope, delta, gate, nextSlice, projectId = "", audit, traceSummary, budgetSummary, overflowSummary } = input;
264
+
265
+ // Claim assessments
266
+ const claim_assessments = assessClaims(envelope, delta);
267
+
268
+ // Evidence counts from delta's evidence accounting (single source of truth)
269
+ const ea = delta.evidence_accounting;
270
+ const verification_count = ea?.verification_run_count ?? delta.verification_runs.length;
271
+ const evidence_count = ea?.evidence_item_count ?? delta.evidence_items.length;
272
+ const criteria_met_count = ea?.criteria_met_count ?? 0;
273
+ const files_changed_count = ea?.file_change_count ?? delta.file_changes.length;
274
+
275
+ // --- Explicit audit findings (matches RunSnapshot pattern) ---
276
+ const audit_required = audit?.audit_required ?? false;
277
+ const audit_cautions: string[] = [];
278
+ const audit_blockers: string[] = [];
279
+ if (audit) {
280
+ for (const f of audit.findings) {
281
+ if (f.severity === "caution") {
282
+ audit_cautions.push(`[audit] ${f.detail}`);
283
+ } else if (f.severity === "blocker") {
284
+ audit_blockers.push(`[audit-blocker] ${f.detail}`);
285
+ }
286
+ }
287
+ }
288
+ const audit_finding_count = audit_cautions.length + audit_blockers.length;
289
+
290
+ // Residuals — delta cautions + audit cautions merged (single source of truth)
291
+ const cautions_on_record = [...delta.cautions, ...audit_cautions, ...audit_blockers];
292
+ const unresolved_on_record = delta.unresolved;
293
+ const residual_count = cautions_on_record.length + unresolved_on_record.length;
294
+
295
+ // Trust posture
296
+ const { posture: trust_posture, basis: trust_basis } = deriveTrustPosture(gate, residual_count);
297
+
298
+ // Closure — use shared control-flag logic
299
+ const phase = gate.label === "accepted" ? "accepted" as const
300
+ : gate.label === "accepted-with-cautions" ? "accepted_with_cautions" as const
301
+ : gate.label === "held-for-review" ? "held_for_review" as const
302
+ : gate.label === "blocked-missing-evidence" ? "blocked" as const
303
+ : "return_received" as const;
304
+ const { closureAllowed } = deriveControlFlags(phase, true);
305
+ const closure_basis = deriveClosureBasis(closureAllowed, gate, delta);
306
+
307
+ // Advancement
308
+ const { advanced: state_advanced, basis: advancement_basis } = deriveAdvancementBasis(delta);
309
+ const consequence_type = ea?.consequence_type ?? "no-change";
310
+ const consequence_label = ea?.consequence_label ?? "No evidence accounting available.";
311
+
312
+ return auditedReceiptSchema.parse({
313
+ // Identity
314
+ receipt_id: `aud-${randomBytes(8).toString("hex")}`,
315
+ receipt_version: 1,
316
+ created_at: new Date().toISOString(),
317
+ project_id: projectId || delta.project_id,
318
+ dispatch_id: envelope.dispatch_id,
319
+ return_id: envelope.return_id,
320
+ envelope_id: envelope.envelope_id,
321
+ delta_id: delta.delta_id,
322
+
323
+ // Claimed
324
+ objective_claimed: envelope.objective_used,
325
+ outcome_claimed: envelope.outcome_class,
326
+ summary_claimed: envelope.summary,
327
+
328
+ // Proven
329
+ verification_count,
330
+ evidence_count,
331
+ criteria_met_count,
332
+ files_changed_count,
333
+ claim_assessments,
334
+
335
+ // Gate
336
+ gate_label: gate.label,
337
+ gate_reason: gate.reason,
338
+ gate_honest: gate.honest,
339
+
340
+ // Provenance
341
+ provenance_posture: envelope.provenance_posture,
342
+ confidence_posture: envelope.confidence_posture,
343
+
344
+ // Closure
345
+ closure_allowed: closureAllowed,
346
+ closure_basis,
347
+
348
+ // Audit findings (explicit, not just reflected in gate)
349
+ audit_required,
350
+ audit_finding_count,
351
+ audit_cautions,
352
+ audit_blockers,
353
+
354
+ // Residuals
355
+ cautions_on_record,
356
+ unresolved_on_record,
357
+ residual_count,
358
+
359
+ // Advancement
360
+ state_advanced,
361
+ advancement_basis,
362
+ consequence_type,
363
+ consequence_label,
364
+
365
+ // Next slice (with basis)
366
+ next_slice_exists: !!nextSlice,
367
+ next_slice_id: nextSlice?.slice_id ?? "",
368
+ next_slice_title: nextSlice?.title ?? "",
369
+ next_slice_ready: nextSlice?.dispatch_ready ?? false,
370
+ next_slice_why: nextSlice?.why_next ?? "",
371
+ next_slice_blocking_reason: nextSlice?.blocking_reason ?? "",
372
+
373
+ // Execution trace summary
374
+ trace_step_count: traceSummary?.trace_step_count ?? 0,
375
+ trace_tool_use_count: traceSummary?.trace_tool_use_count ?? 0,
376
+ trace_failure_phase: traceSummary?.trace_failure_phase ?? "",
377
+ trace_error_category: traceSummary?.trace_error_category ?? "",
378
+ trace_duration_ms: traceSummary?.trace_duration_ms ?? 0,
379
+ trace_available: traceSummary?.trace_available ?? false,
380
+
381
+ // Budget breakdown
382
+ budget_task_steps: budgetSummary?.task_steps ?? 0,
383
+ budget_task_tool_uses: budgetSummary?.task_tool_uses ?? 0,
384
+ budget_verification_steps: budgetSummary?.verification_steps ?? 0,
385
+ budget_verification_tool_uses: budgetSummary?.verification_tool_uses ?? 0,
386
+ budget_correction_steps: budgetSummary?.correction_steps ?? 0,
387
+ budget_correction_tool_uses: budgetSummary?.correction_tool_uses ?? 0,
388
+ budget_overhead_ratio: budgetSummary?.overhead_ratio ?? 0,
389
+ budget_had_corrections: budgetSummary?.had_corrections ?? false,
390
+ budget_posture: budgetSummary?.budget_posture ?? "unknown",
391
+ budget_posture_basis: budgetSummary?.budget_posture_basis ?? "",
392
+
393
+ // Overflow / progressive disclosure
394
+ overflow_entry_count: overflowSummary?.overflow_entry_count ?? 0,
395
+ overflow_total_bytes: overflowSummary?.overflow_total_bytes ?? 0,
396
+ overflow_sources: overflowSummary?.overflow_sources ?? [],
397
+ overflow_available: overflowSummary?.overflow_available ?? false,
398
+
399
+ // Trust
400
+ trust_posture,
401
+ trust_basis,
402
+ });
403
+ }