@velum-labs/routekit-eval-setup 1.3.2 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/dist/adapters/authoring-responses-request.d.ts +5 -0
  2. package/dist/adapters/authoring-responses-request.js +38 -0
  3. package/dist/adapters/evaluation-evidence-freshness.d.ts +7 -0
  4. package/dist/adapters/evaluation-evidence-freshness.js +76 -0
  5. package/dist/adapters/git-task-history.d.ts +67 -0
  6. package/dist/adapters/git-task-history.js +171 -0
  7. package/dist/adapters/integrated-repository-history.d.ts +21 -0
  8. package/dist/adapters/integrated-repository-history.js +175 -0
  9. package/dist/adapters/repository-command-diagnostic.d.ts +8 -0
  10. package/dist/adapters/repository-command-diagnostic.js +46 -0
  11. package/dist/adapters/repository-command-evidence.d.ts +13 -0
  12. package/dist/adapters/repository-command-evidence.js +102 -0
  13. package/dist/adapters/repository-command-runner.d.ts +238 -0
  14. package/dist/adapters/repository-command-runner.js +1483 -0
  15. package/dist/adapters/repository-import-context.d.ts +47 -0
  16. package/dist/adapters/repository-import-context.js +469 -0
  17. package/dist/adapters/repository-node-test-reporter.d.ts +3 -0
  18. package/dist/adapters/repository-node-test-reporter.js +27 -0
  19. package/dist/adapters/repository-review-evidence.d.ts +39 -0
  20. package/dist/adapters/repository-review-evidence.js +632 -0
  21. package/dist/adapters/repository-seed-selection.d.ts +7 -0
  22. package/dist/adapters/repository-seed-selection.js +79 -0
  23. package/dist/adapters/repository-solution-edits.d.ts +49 -0
  24. package/dist/adapters/repository-solution-edits.js +136 -0
  25. package/dist/adapters/repository-vitest-phase-adapter.d.ts +8 -0
  26. package/dist/adapters/repository-vitest-phase-adapter.js +310 -0
  27. package/dist/adapters/repository-vitest-reporter.d.ts +24 -0
  28. package/dist/adapters/repository-vitest-reporter.js +314 -0
  29. package/dist/adapters/strict-authoring-schema.d.ts +5 -0
  30. package/dist/adapters/strict-authoring-schema.js +158 -0
  31. package/dist/adapters/test-discovery.d.ts +30 -0
  32. package/dist/adapters/test-discovery.js +124 -0
  33. package/dist/adapters/typescript-repository-index.d.ts +51 -0
  34. package/dist/adapters/typescript-repository-index.js +226 -0
  35. package/dist/agentic-capabilities-protocol.d.ts +1373 -0
  36. package/dist/agentic-capabilities-protocol.js +786 -0
  37. package/dist/case-checkpoint-store.d.ts +29 -0
  38. package/dist/case-checkpoint-store.js +133 -0
  39. package/dist/case-pipeline-protocol-v2.d.ts +184 -0
  40. package/dist/case-pipeline-protocol-v2.js +193 -0
  41. package/dist/case-pipeline-protocol.d.ts +2626 -0
  42. package/dist/case-pipeline-protocol.js +371 -0
  43. package/dist/effect-api.d.ts +74 -10
  44. package/dist/effect-api.js +56 -6
  45. package/dist/errors.d.ts +31 -0
  46. package/dist/errors.js +10 -0
  47. package/dist/eval-capability-execution-envelope.d.ts +64 -0
  48. package/dist/eval-capability-execution-envelope.js +98 -0
  49. package/dist/eval-capability-policy.d.ts +90 -0
  50. package/dist/eval-capability-policy.js +107 -0
  51. package/dist/eval-event-log.d.ts +140 -0
  52. package/dist/eval-event-log.js +220 -0
  53. package/dist/evaluation-authoring-policy.d.ts +18 -0
  54. package/dist/evaluation-authoring-policy.js +19 -0
  55. package/dist/evaluation-authoring-validation.d.ts +22 -0
  56. package/dist/evaluation-authoring-validation.js +72 -0
  57. package/dist/evaluation-evidence.d.ts +20 -0
  58. package/dist/evaluation-evidence.js +319 -0
  59. package/dist/evaluation-grader-calibration-protocol.d.ts +108 -0
  60. package/dist/evaluation-grader-calibration-protocol.js +80 -0
  61. package/dist/evaluation-grader-calibration.d.ts +18 -0
  62. package/dist/evaluation-grader-calibration.js +334 -0
  63. package/dist/evaluation-grading-policy.d.ts +24 -0
  64. package/dist/evaluation-grading-policy.js +54 -0
  65. package/dist/evaluation-proposal-policy.d.ts +4 -0
  66. package/dist/evaluation-proposal-policy.js +91 -0
  67. package/dist/evaluation-source-retrieval.d.ts +68 -0
  68. package/dist/evaluation-source-retrieval.js +513 -0
  69. package/dist/evaluation-structure-policy.d.ts +29 -0
  70. package/dist/evaluation-structure-policy.js +138 -0
  71. package/dist/index.d.ts +124 -17
  72. package/dist/index.js +69 -11
  73. package/dist/inspection.js +2 -3
  74. package/dist/project-artifacts.d.ts +7 -2
  75. package/dist/project-artifacts.js +49 -136
  76. package/dist/project-authoring.d.ts +66 -5
  77. package/dist/project-authoring.js +783 -109
  78. package/dist/project-contracts.d.ts +419 -84
  79. package/dist/project-contracts.js +160 -52
  80. package/dist/project-store.js +2 -1
  81. package/dist/project-workflow.d.ts +5 -4
  82. package/dist/project-workflow.js +154 -35
  83. package/dist/repository-adversary-protocol.d.ts +64 -0
  84. package/dist/repository-adversary-protocol.js +105 -0
  85. package/dist/repository-behavior-protocol.d.ts +188 -0
  86. package/dist/repository-behavior-protocol.js +202 -0
  87. package/dist/repository-benchmark-protocol.d.ts +487 -0
  88. package/dist/repository-benchmark-protocol.js +96 -0
  89. package/dist/repository-execution-protocol.d.ts +150 -0
  90. package/dist/repository-execution-protocol.js +38 -0
  91. package/dist/repository-fixture-instructions.d.ts +3 -0
  92. package/dist/repository-fixture-instructions.js +91 -0
  93. package/dist/repository-fixture-protocol.d.ts +79 -0
  94. package/dist/repository-fixture-protocol.js +79 -0
  95. package/dist/repository-foundry-plan-protocol.d.ts +118 -0
  96. package/dist/repository-foundry-plan-protocol.js +296 -0
  97. package/dist/repository-foundry-progress-protocol.d.ts +52 -0
  98. package/dist/repository-foundry-progress-protocol.js +52 -0
  99. package/dist/repository-improvement-protocol.d.ts +100 -0
  100. package/dist/repository-improvement-protocol.js +106 -0
  101. package/dist/repository-language-model-protocol.d.ts +43 -0
  102. package/dist/repository-language-model-protocol.js +146 -0
  103. package/dist/repository-oracle-coverage-protocol.d.ts +18 -0
  104. package/dist/repository-oracle-coverage-protocol.js +39 -0
  105. package/dist/repository-oracle-execution-binding.d.ts +27 -0
  106. package/dist/repository-oracle-execution-binding.js +59 -0
  107. package/dist/repository-oracle-protocol.d.ts +230 -0
  108. package/dist/repository-oracle-protocol.js +156 -0
  109. package/dist/repository-oracle-scope-policy.d.ts +22 -0
  110. package/dist/repository-oracle-scope-policy.js +92 -0
  111. package/dist/repository-quality-policy.d.ts +15 -0
  112. package/dist/repository-quality-policy.js +357 -0
  113. package/dist/repository-routing-benchmark-protocol.d.ts +176 -0
  114. package/dist/repository-routing-benchmark-protocol.js +103 -0
  115. package/dist/repository-routing-model-protocol.d.ts +36 -0
  116. package/dist/repository-routing-model-protocol.js +89 -0
  117. package/dist/repository-routing-plan-protocol.d.ts +112 -0
  118. package/dist/repository-routing-plan-protocol.js +58 -0
  119. package/dist/repository-routing-quality-policy.d.ts +9 -0
  120. package/dist/repository-routing-quality-policy.js +191 -0
  121. package/dist/repository-seed-qualification-progress-protocol.d.ts +205 -0
  122. package/dist/repository-seed-qualification-progress-protocol.js +28 -0
  123. package/dist/repository-semantic-calibration-protocol.d.ts +768 -0
  124. package/dist/repository-semantic-calibration-protocol.js +276 -0
  125. package/dist/repository-semantic-calibration.d.ts +163 -0
  126. package/dist/repository-semantic-calibration.js +581 -0
  127. package/dist/repository-specification-contract-facts-protocol.d.ts +224 -0
  128. package/dist/repository-specification-contract-facts-protocol.js +276 -0
  129. package/dist/repository-specification-critique-protocol.d.ts +189 -0
  130. package/dist/repository-specification-critique-protocol.js +103 -0
  131. package/dist/repository-task-family-protocol.d.ts +24 -0
  132. package/dist/repository-task-family-protocol.js +37 -0
  133. package/dist/repository-task-seed-protocol.d.ts +384 -0
  134. package/dist/repository-task-seed-protocol.js +236 -0
  135. package/dist/repository-trajectory-protocol.d.ts +20 -0
  136. package/dist/repository-trajectory-protocol.js +42 -0
  137. package/dist/service.js +1 -1
  138. package/dist/services/adversary/service.d.ts +64 -0
  139. package/dist/services/adversary/service.js +330 -0
  140. package/dist/services/benchmark-compiler/service.d.ts +450 -0
  141. package/dist/services/benchmark-compiler/service.js +9 -0
  142. package/dist/services/budgeted-model/service.d.ts +118 -0
  143. package/dist/services/budgeted-model/service.js +460 -0
  144. package/dist/services/case-authoring/service.d.ts +163 -0
  145. package/dist/services/case-authoring/service.js +1456 -0
  146. package/dist/services/case-finalization/service.d.ts +283 -0
  147. package/dist/services/case-finalization/service.js +370 -0
  148. package/dist/services/case-generation/service.d.ts +619 -0
  149. package/dist/services/case-generation/service.js +2628 -0
  150. package/dist/services/case-pipeline/service.d.ts +31 -0
  151. package/dist/services/case-pipeline/service.js +485 -0
  152. package/dist/services/case-pipeline-v2/service.d.ts +70 -0
  153. package/dist/services/case-pipeline-v2/service.js +477 -0
  154. package/dist/services/command-observability/service.d.ts +13 -0
  155. package/dist/services/command-observability/service.js +3 -0
  156. package/dist/services/dimension-labeling/service.d.ts +77 -0
  157. package/dist/services/dimension-labeling/service.js +188 -0
  158. package/dist/services/eval-candidate/service.d.ts +208 -0
  159. package/dist/services/eval-candidate/service.js +64 -0
  160. package/dist/services/eval-capabilities/service.d.ts +183 -0
  161. package/dist/services/eval-capabilities/service.js +1433 -0
  162. package/dist/services/eval-environment/service.d.ts +173 -0
  163. package/dist/services/eval-environment/service.js +127 -0
  164. package/dist/services/evidence-reconstruction/service.d.ts +36 -0
  165. package/dist/services/evidence-reconstruction/service.js +145 -0
  166. package/dist/services/fixture-builder/service.d.ts +62 -0
  167. package/dist/services/fixture-builder/service.js +36 -0
  168. package/dist/services/fixture-validation/service.d.ts +75 -0
  169. package/dist/services/fixture-validation/service.js +295 -0
  170. package/dist/services/foundry/service.d.ts +831 -0
  171. package/dist/services/foundry/service.js +442 -0
  172. package/dist/services/foundry-progress/service.d.ts +62 -0
  173. package/dist/services/foundry-progress/service.js +149 -0
  174. package/dist/services/foundry-v2/service.d.ts +54 -0
  175. package/dist/services/foundry-v2/service.js +28 -0
  176. package/dist/services/grounded-authoring/service.d.ts +126 -0
  177. package/dist/services/grounded-authoring/service.js +822 -0
  178. package/dist/services/historical-case/service.d.ts +722 -0
  179. package/dist/services/historical-case/service.js +177 -0
  180. package/dist/services/improvement-loop/service.d.ts +59 -0
  181. package/dist/services/improvement-loop/service.js +176 -0
  182. package/dist/services/language-model/service.d.ts +52 -0
  183. package/dist/services/language-model/service.js +194 -0
  184. package/dist/services/oracle-builder/service.d.ts +146 -0
  185. package/dist/services/oracle-builder/service.js +513 -0
  186. package/dist/services/oracle-coverage/service.d.ts +28 -0
  187. package/dist/services/oracle-coverage/service.js +50 -0
  188. package/dist/services/oracle-coverage-witness/service.d.ts +130 -0
  189. package/dist/services/oracle-coverage-witness/service.js +538 -0
  190. package/dist/services/pipeline-challenge/service.d.ts +551 -0
  191. package/dist/services/pipeline-challenge/service.js +427 -0
  192. package/dist/services/pipeline-controls/service.d.ts +130 -0
  193. package/dist/services/pipeline-controls/service.js +483 -0
  194. package/dist/services/pipeline-oracle/service.d.ts +8 -0
  195. package/dist/services/pipeline-oracle/service.js +256 -0
  196. package/dist/services/pipeline-seed/service.d.ts +298 -0
  197. package/dist/services/pipeline-seed/service.js +428 -0
  198. package/dist/services/pipeline-spec/service.d.ts +103 -0
  199. package/dist/services/pipeline-spec/service.js +619 -0
  200. package/dist/services/pipeline-tournament/service.d.ts +258 -0
  201. package/dist/services/pipeline-tournament/service.js +476 -0
  202. package/dist/services/quality-gate/service.d.ts +233 -0
  203. package/dist/services/quality-gate/service.js +136 -0
  204. package/dist/services/repository-bundle/service.d.ts +33 -0
  205. package/dist/services/repository-bundle/service.js +114 -0
  206. package/dist/services/repository-model/service.d.ts +105 -0
  207. package/dist/services/repository-model/service.js +250 -0
  208. package/dist/services/repository-public-artifact/service.d.ts +133 -0
  209. package/dist/services/repository-public-artifact/service.js +330 -0
  210. package/dist/services/routing-benchmark/service.d.ts +362 -0
  211. package/dist/services/routing-benchmark/service.js +96 -0
  212. package/dist/services/specification-critic/service.d.ts +92 -0
  213. package/dist/services/specification-critic/service.js +172 -0
  214. package/dist/services/task-family/service.d.ts +40 -0
  215. package/dist/services/task-family/service.js +55 -0
  216. package/dist/services/task-seed/service.d.ts +906 -0
  217. package/dist/services/task-seed/service.js +1406 -0
  218. package/dist/services/task-specification/service.d.ts +27 -0
  219. package/dist/services/task-specification/service.js +40 -0
  220. package/dist/services/trajectory-policy/service.d.ts +110 -0
  221. package/dist/services/trajectory-policy/service.js +216 -0
  222. package/dist/test/agentic-capabilities-protocol.test.d.ts +1 -0
  223. package/dist/test/agentic-capabilities-protocol.test.js +570 -0
  224. package/dist/test/agentic-capabilities.test.d.ts +1 -0
  225. package/dist/test/agentic-capabilities.test.js +1461 -0
  226. package/dist/test/agentic-environment.test.d.ts +1 -0
  227. package/dist/test/agentic-environment.test.js +213 -0
  228. package/dist/test/case-pipeline-foundation.test.d.ts +1 -0
  229. package/dist/test/case-pipeline-foundation.test.js +535 -0
  230. package/dist/test/case-pipeline-protocol-v2.test.d.ts +1 -0
  231. package/dist/test/case-pipeline-protocol-v2.test.js +124 -0
  232. package/dist/test/case-pipeline-v2.test.d.ts +1 -0
  233. package/dist/test/case-pipeline-v2.test.js +286 -0
  234. package/dist/test/case-pipeline.test.d.ts +1 -0
  235. package/dist/test/case-pipeline.test.js +851 -0
  236. package/dist/test/eval-capability-policy.test.d.ts +1 -0
  237. package/dist/test/eval-capability-policy.test.js +50 -0
  238. package/dist/test/eval-event-log.test.d.ts +1 -0
  239. package/dist/test/eval-event-log.test.js +125 -0
  240. package/dist/test/evaluation-evidence-freshness.test.d.ts +1 -0
  241. package/dist/test/evaluation-evidence-freshness.test.js +44 -0
  242. package/dist/test/evaluation-evidence.test.d.ts +1 -0
  243. package/dist/test/evaluation-evidence.test.js +230 -0
  244. package/dist/test/evaluation-grader-calibration.test.d.ts +1 -0
  245. package/dist/test/evaluation-grader-calibration.test.js +373 -0
  246. package/dist/test/evaluation-proposal-digest.test.d.ts +1 -0
  247. package/dist/test/evaluation-proposal-digest.test.js +187 -0
  248. package/dist/test/evaluation-source-retrieval.test.d.ts +1 -0
  249. package/dist/test/evaluation-source-retrieval.test.js +237 -0
  250. package/dist/test/evaluation-structure-policy.test.d.ts +1 -0
  251. package/dist/test/evaluation-structure-policy.test.js +196 -0
  252. package/dist/test/fixtures/repository-resource-panel.d.ts +39 -0
  253. package/dist/test/fixtures/repository-resource-panel.js +111 -0
  254. package/dist/test/fixtures/vitest-boundary-panel.d.ts +84 -0
  255. package/dist/test/fixtures/vitest-boundary-panel.js +120 -0
  256. package/dist/test/fixtures/vitest-phase-panel.d.ts +135 -0
  257. package/dist/test/fixtures/vitest-phase-panel.js +213 -0
  258. package/dist/test/fixtures/vitest-reporter-results.d.ts +76 -0
  259. package/dist/test/fixtures/vitest-reporter-results.js +94 -0
  260. package/dist/test/grounded-authoring.test.d.ts +1 -0
  261. package/dist/test/grounded-authoring.test.js +565 -0
  262. package/dist/test/integrated-repository-history.test.d.ts +1 -0
  263. package/dist/test/integrated-repository-history.test.js +227 -0
  264. package/dist/test/project-authoring.test.js +593 -43
  265. package/dist/test/project-workflow.test.js +419 -40
  266. package/dist/test/repository-authoring-artifacts.test.d.ts +1 -0
  267. package/dist/test/repository-authoring-artifacts.test.js +185 -0
  268. package/dist/test/repository-bundle.test.d.ts +1 -0
  269. package/dist/test/repository-bundle.test.js +52 -0
  270. package/dist/test/repository-case-generation.test.d.ts +1 -0
  271. package/dist/test/repository-case-generation.test.js +3465 -0
  272. package/dist/test/repository-command-diagnostic.test.d.ts +1 -0
  273. package/dist/test/repository-command-diagnostic.test.js +55 -0
  274. package/dist/test/repository-command-signals.test.d.ts +1 -0
  275. package/dist/test/repository-command-signals.test.js +124 -0
  276. package/dist/test/repository-fixture-scope-coverage.test.d.ts +1 -0
  277. package/dist/test/repository-fixture-scope-coverage.test.js +127 -0
  278. package/dist/test/repository-fixture-validation.test.d.ts +1 -0
  279. package/dist/test/repository-fixture-validation.test.js +362 -0
  280. package/dist/test/repository-foundry-progress.test.d.ts +1 -0
  281. package/dist/test/repository-foundry-progress.test.js +110 -0
  282. package/dist/test/repository-foundry-quality.test.d.ts +1 -0
  283. package/dist/test/repository-foundry-quality.test.js +1138 -0
  284. package/dist/test/repository-import-context.test.d.ts +1 -0
  285. package/dist/test/repository-import-context.test.js +354 -0
  286. package/dist/test/repository-model-authoring.test.d.ts +1 -0
  287. package/dist/test/repository-model-authoring.test.js +544 -0
  288. package/dist/test/repository-model.test.d.ts +1 -0
  289. package/dist/test/repository-model.test.js +2195 -0
  290. package/dist/test/repository-node-test-reporter.test.d.ts +1 -0
  291. package/dist/test/repository-node-test-reporter.test.js +104 -0
  292. package/dist/test/repository-oracle-concurrency.test.d.ts +1 -0
  293. package/dist/test/repository-oracle-concurrency.test.js +542 -0
  294. package/dist/test/repository-oracle-coverage-witness.test.d.ts +1 -0
  295. package/dist/test/repository-oracle-coverage-witness.test.js +511 -0
  296. package/dist/test/repository-oracle-coverage.test.d.ts +1 -0
  297. package/dist/test/repository-oracle-coverage.test.js +168 -0
  298. package/dist/test/repository-oracle-evidence.test.d.ts +1 -0
  299. package/dist/test/repository-oracle-evidence.test.js +185 -0
  300. package/dist/test/repository-oracle-plan.test.d.ts +1 -0
  301. package/dist/test/repository-oracle-plan.test.js +176 -0
  302. package/dist/test/repository-overlay-isolation.test.d.ts +1 -0
  303. package/dist/test/repository-overlay-isolation.test.js +85 -0
  304. package/dist/test/repository-preparation-cache.test.d.ts +1 -0
  305. package/dist/test/repository-preparation-cache.test.js +414 -0
  306. package/dist/test/repository-public-artifact.test.d.ts +1 -0
  307. package/dist/test/repository-public-artifact.test.js +273 -0
  308. package/dist/test/repository-qualification-diagnostics.test.d.ts +1 -0
  309. package/dist/test/repository-qualification-diagnostics.test.js +524 -0
  310. package/dist/test/repository-reference-authoring.test.d.ts +1 -0
  311. package/dist/test/repository-reference-authoring.test.js +1633 -0
  312. package/dist/test/repository-review-evidence-v2.test.d.ts +1 -0
  313. package/dist/test/repository-review-evidence-v2.test.js +183 -0
  314. package/dist/test/repository-review-evidence.test.d.ts +1 -0
  315. package/dist/test/repository-review-evidence.test.js +124 -0
  316. package/dist/test/repository-seed-exclusions.test.d.ts +1 -0
  317. package/dist/test/repository-seed-exclusions.test.js +96 -0
  318. package/dist/test/repository-seed-selection.test.d.ts +1 -0
  319. package/dist/test/repository-seed-selection.test.js +504 -0
  320. package/dist/test/repository-semantic-calibration.test.d.ts +1 -0
  321. package/dist/test/repository-semantic-calibration.test.js +688 -0
  322. package/dist/test/repository-solution-edits.test.d.ts +1 -0
  323. package/dist/test/repository-solution-edits.test.js +377 -0
  324. package/dist/test/repository-specification-budget.test.d.ts +1 -0
  325. package/dist/test/repository-specification-budget.test.js +171 -0
  326. package/dist/test/repository-specification-contract-checkpoint.test.d.ts +1 -0
  327. package/dist/test/repository-specification-contract-checkpoint.test.js +228 -0
  328. package/dist/test/repository-specification-contract-facts.test.d.ts +1 -0
  329. package/dist/test/repository-specification-contract-facts.test.js +177 -0
  330. package/dist/test/repository-trajectory-authoring.test.d.ts +1 -0
  331. package/dist/test/repository-trajectory-authoring.test.js +176 -0
  332. package/dist/test/repository-valid-control-plan.test.d.ts +1 -0
  333. package/dist/test/repository-valid-control-plan.test.js +45 -0
  334. package/dist/test/repository-vitest-phase.test.d.ts +1 -0
  335. package/dist/test/repository-vitest-phase.test.js +848 -0
  336. package/dist/test/repository-vitest-reporter.test.d.ts +1 -0
  337. package/dist/test/repository-vitest-reporter.test.js +158 -0
  338. package/dist/test/repository-workspace-build.test.d.ts +1 -0
  339. package/dist/test/repository-workspace-build.test.js +160 -0
  340. package/dist/test/strict-authoring-schema.test.d.ts +1 -0
  341. package/dist/test/strict-authoring-schema.test.js +169 -0
  342. package/package.json +48 -6
@@ -0,0 +1,150 @@
1
+ import { Schema } from "effect";
2
+ import type { RepositoryHiddenFixtureSuiteV1 } from "./repository-fixture-protocol.js";
3
+ import type { RepositoryOracleClauseV1, RepositoryReferenceSolutionV1 } from "./repository-oracle-protocol.js";
4
+ import type { RepositoryTaskSeedV1 } from "./repository-task-seed-protocol.js";
5
+ export declare const RepositoryCommandExecutionStageV1: Schema.Literals<readonly ["trusted-preparation", "candidate-validation", "grade"]>;
6
+ export type RepositoryCommandExecutionStageV1 = typeof RepositoryCommandExecutionStageV1.Type;
7
+ export type RepositoryCommandObservationV1 = {
8
+ readonly version: 1;
9
+ readonly kind: "started";
10
+ readonly at: string;
11
+ readonly commandId: string;
12
+ readonly recipeId: string;
13
+ readonly repetition: number;
14
+ readonly stage: RepositoryCommandExecutionStageV1;
15
+ } | {
16
+ readonly version: 1;
17
+ readonly kind: "output";
18
+ readonly at: string;
19
+ readonly commandId: string;
20
+ readonly recipeId: string;
21
+ readonly repetition: number;
22
+ readonly stage: RepositoryCommandExecutionStageV1;
23
+ readonly stream: "stdout" | "stderr";
24
+ readonly sequence: number;
25
+ readonly chunk: string;
26
+ readonly chunkBytes: number;
27
+ readonly commandBytes: number;
28
+ readonly truncated: boolean;
29
+ } | {
30
+ readonly version: 1;
31
+ readonly kind: "completed";
32
+ readonly at: string;
33
+ readonly commandId: string;
34
+ readonly recipeId: string;
35
+ readonly repetition: number;
36
+ readonly stage: RepositoryCommandExecutionStageV1;
37
+ readonly exitCode: number | null;
38
+ readonly timedOut: boolean;
39
+ readonly durationMs: number;
40
+ readonly commandBytes: number;
41
+ readonly truncated: boolean;
42
+ };
43
+ export declare const RepositoryCommandInvocationResultV1: Schema.Struct<{
44
+ readonly recipeId: Schema.String;
45
+ readonly commit: Schema.String;
46
+ readonly repetition: Schema.Finite;
47
+ readonly stage: Schema.Literals<readonly ["trusted-preparation", "candidate-validation", "grade"]>;
48
+ readonly exitCode: Schema.NullOr<Schema.Finite>;
49
+ readonly timedOut: Schema.Boolean;
50
+ readonly outputTruncated: Schema.Boolean;
51
+ readonly stdout: Schema.String;
52
+ readonly stderr: Schema.String;
53
+ readonly durationMs: Schema.Finite;
54
+ /** Host-selected evidence protocol; candidate stdout cannot select a grader. */
55
+ readonly testReporter: Schema.optionalKey<Schema.Literal<"vitest-v1">>;
56
+ }>;
57
+ export type RepositoryCommandInvocationResultV1 = typeof RepositoryCommandInvocationResultV1.Type;
58
+ export declare const RepositoryCommandResultV1: Schema.Struct<{
59
+ readonly gradeExecuted: Schema.Boolean;
60
+ readonly trustedPreparationResults: Schema.$Array<Schema.Struct<{
61
+ readonly recipeId: Schema.String;
62
+ readonly commit: Schema.String;
63
+ readonly repetition: Schema.Finite;
64
+ readonly stage: Schema.Literals<readonly ["trusted-preparation", "candidate-validation", "grade"]>;
65
+ readonly exitCode: Schema.NullOr<Schema.Finite>;
66
+ readonly timedOut: Schema.Boolean;
67
+ readonly outputTruncated: Schema.Boolean;
68
+ readonly stdout: Schema.String;
69
+ readonly stderr: Schema.String;
70
+ readonly durationMs: Schema.Finite;
71
+ /** Host-selected evidence protocol; candidate stdout cannot select a grader. */
72
+ readonly testReporter: Schema.optionalKey<Schema.Literal<"vitest-v1">>;
73
+ }>>;
74
+ readonly candidateValidationResults: Schema.$Array<Schema.Struct<{
75
+ readonly recipeId: Schema.String;
76
+ readonly commit: Schema.String;
77
+ readonly repetition: Schema.Finite;
78
+ readonly stage: Schema.Literals<readonly ["trusted-preparation", "candidate-validation", "grade"]>;
79
+ readonly exitCode: Schema.NullOr<Schema.Finite>;
80
+ readonly timedOut: Schema.Boolean;
81
+ readonly outputTruncated: Schema.Boolean;
82
+ readonly stdout: Schema.String;
83
+ readonly stderr: Schema.String;
84
+ readonly durationMs: Schema.Finite;
85
+ /** Host-selected evidence protocol; candidate stdout cannot select a grader. */
86
+ readonly testReporter: Schema.optionalKey<Schema.Literal<"vitest-v1">>;
87
+ }>>;
88
+ readonly isolationTimings: Schema.optionalKey<Schema.Struct<{
89
+ readonly checkoutDurationMs: Schema.Finite;
90
+ readonly overlayDurationMs: Schema.Finite;
91
+ readonly cleanupDurationMs: Schema.Finite;
92
+ }>>;
93
+ readonly preparation: Schema.optionalKey<Schema.Struct<{
94
+ readonly kind: Schema.Literal<"pristine-install-template">;
95
+ readonly templateKey: Schema.String;
96
+ readonly sourceCommit: Schema.String;
97
+ readonly cloneDurationMs: Schema.Finite;
98
+ readonly sharedResults: Schema.$Array<Schema.Struct<{
99
+ readonly recipeId: Schema.String;
100
+ readonly commit: Schema.String;
101
+ readonly repetition: Schema.Finite;
102
+ readonly stage: Schema.Literals<readonly ["trusted-preparation", "candidate-validation", "grade"]>;
103
+ readonly exitCode: Schema.NullOr<Schema.Finite>;
104
+ readonly timedOut: Schema.Boolean;
105
+ readonly outputTruncated: Schema.Boolean;
106
+ readonly stdout: Schema.String;
107
+ readonly stderr: Schema.String;
108
+ readonly durationMs: Schema.Finite;
109
+ /** Host-selected evidence protocol; candidate stdout cannot select a grader. */
110
+ readonly testReporter: Schema.optionalKey<Schema.Literal<"vitest-v1">>;
111
+ }>>;
112
+ }>>;
113
+ readonly recipeId: Schema.String;
114
+ readonly commit: Schema.String;
115
+ readonly repetition: Schema.Finite;
116
+ readonly stage: Schema.Literals<readonly ["trusted-preparation", "candidate-validation", "grade"]>;
117
+ readonly exitCode: Schema.NullOr<Schema.Finite>;
118
+ readonly timedOut: Schema.Boolean;
119
+ readonly outputTruncated: Schema.Boolean;
120
+ readonly stdout: Schema.String;
121
+ readonly stderr: Schema.String;
122
+ readonly durationMs: Schema.Finite;
123
+ /** Host-selected evidence protocol; candidate stdout cannot select a grader. */
124
+ readonly testReporter: Schema.optionalKey<Schema.Literal<"vitest-v1">>;
125
+ }>;
126
+ export type RepositoryCommandResultV1 = typeof RepositoryCommandResultV1.Type;
127
+ export type RepositoryCommandFileOverrideV1 = {
128
+ readonly path: string;
129
+ readonly content: string;
130
+ } | {
131
+ readonly path: string;
132
+ readonly delete: true;
133
+ };
134
+ export type RepositoryStructuralOracleClauseV1 = Extract<RepositoryOracleClauseV1, {
135
+ readonly kind: "architecture" | "transformation-completeness";
136
+ }>;
137
+ export type RepositoryExecutableSolutionV1 = RepositoryReferenceSolutionV1 & {
138
+ readonly commit: string;
139
+ readonly fileOverrides?: readonly RepositoryCommandFileOverrideV1[];
140
+ };
141
+ export type RepositoryHistoricalOracleInputV1 = {
142
+ readonly repositoryRoot: string;
143
+ readonly caseId: string;
144
+ readonly seed: RepositoryTaskSeedV1;
145
+ readonly additionalSolutions: readonly RepositoryExecutableSolutionV1[];
146
+ readonly hiddenFixtureSuite?: RepositoryHiddenFixtureSuiteV1;
147
+ readonly structuralClauses?: readonly RepositoryStructuralOracleClauseV1[];
148
+ readonly repetitions?: number;
149
+ readonly oracleConcurrency?: number;
150
+ };
@@ -0,0 +1,38 @@
1
+ import { Schema } from "effect";
2
+ export const RepositoryCommandExecutionStageV1 = Schema.Literals([
3
+ "trusted-preparation",
4
+ "candidate-validation",
5
+ "grade"
6
+ ]);
7
+ export const RepositoryCommandInvocationResultV1 = Schema.Struct({
8
+ recipeId: Schema.String,
9
+ commit: Schema.String,
10
+ repetition: Schema.Finite,
11
+ stage: RepositoryCommandExecutionStageV1,
12
+ exitCode: Schema.NullOr(Schema.Finite),
13
+ timedOut: Schema.Boolean,
14
+ outputTruncated: Schema.Boolean,
15
+ stdout: Schema.String,
16
+ stderr: Schema.String,
17
+ durationMs: Schema.Finite,
18
+ /** Host-selected evidence protocol; candidate stdout cannot select a grader. */
19
+ testReporter: Schema.optionalKey(Schema.Literal("vitest-v1"))
20
+ });
21
+ export const RepositoryCommandResultV1 = Schema.Struct({
22
+ ...RepositoryCommandInvocationResultV1.fields,
23
+ gradeExecuted: Schema.Boolean,
24
+ trustedPreparationResults: Schema.Array(RepositoryCommandInvocationResultV1),
25
+ candidateValidationResults: Schema.Array(RepositoryCommandInvocationResultV1),
26
+ isolationTimings: Schema.optionalKey(Schema.Struct({
27
+ checkoutDurationMs: Schema.Finite,
28
+ overlayDurationMs: Schema.Finite,
29
+ cleanupDurationMs: Schema.Finite
30
+ })),
31
+ preparation: Schema.optionalKey(Schema.Struct({
32
+ kind: Schema.Literal("pristine-install-template"),
33
+ templateKey: Schema.String,
34
+ sourceCommit: Schema.String,
35
+ cloneDurationMs: Schema.Finite,
36
+ sharedResults: Schema.Array(RepositoryCommandInvocationResultV1)
37
+ }))
38
+ });
@@ -0,0 +1,3 @@
1
+ /** Shared authoring contract for new fixtures and bounded fixture repairs. */
2
+ export declare const REPOSITORY_FIXTURE_EVIDENCE_INSTRUCTIONS = "The original historical tests run separately for every solution.\nPreserve that baseline and use generated overlays for additional discriminating behavior; do not reproduce unrelated\nhistorical tests as extra fixture modules. Each fixture starts a separate clean checkout and build for every control\nand repetition. Group related requirements into a small number of coherent fixture modules, usually three to five\nfor a bounded task, with many independently named tests and table-driven examples inside each module. One fixture\nmay cover several related scope clauses; map each clause to the module that actually asserts it. Group only behavior\nthat its description, expectedBehavior, kind, and expectationMode can accurately describe. Keep distinct expectation\nmodes separate when combining them would misrepresent the fixture. Do not create one module per scope clause or\ninput value by default. Fixture count is a packaging choice, never a quality target: preserve every required\nassertion, boundary, counterfactual, and invariant even when more modules are necessary. Use separate named tests\nso a failing example does not prevent unrelated examples in the module from executing.\n\nExercise the boundaries and preservation rules in the visible contract, using the pinned reference to resolve\nexpected behavior. When two fields or representations can describe the same fact, include conflicting values\nthat establish which one is authoritative; examples where they agree cannot test precedence. Vary advisory\nmetadata independently from the actual payload or state, including empty, zero, missing, and stale values\nwhere the contract permits them. Check that metadata which is not an eligibility condition cannot introduce\na shortcut around required behavior. Do not invent requirements outside the visible contract. Prefer compact\ntable-driven combinations within a fixture to separate fixture modules for every value.\n\nDerive variations from the relevant public signatures and preserved behavior, not only the historical example.\nExercise omitted, default, and explicit optional settings alongside the primary operation modes, including\ncombinations where an advisory setting could incorrectly override an explicit mode. Where the contract says\nlogical inputs are equivalent, test different representations or delivery patterns of that same input.\nFor incremental or batched processing, compare whole-input delivery with deterministic partitions at, before,\nand after meaningful boundaries, including apparent terminators followed by additional permitted input.\nFor indexed collections, include empty and sparse positions as well as dense examples when supported.\nOnly assert invariance where the pinned reference and visible contract establish it; do not assume ordering,\nbatching, or representation is irrelevant when it has specified meaning. Use independently named cases and\ndeterministic data so these variations remain reproducible across controls and repetitions.\n\nrepositoryEnvironment.localImports contains complete helper and dependency files from the initial snapshot.\nWhen supplied, referenceLocalImports contains the corresponding reference-snapshot context for oracle work.\nReuse demonstrated fixture factories and public constructors rather than guessing how imported objects are\ninitialized. Treat omitted and unresolved entries as explicit context limits, not evidence that an API exists.\nSupporting context does not expand the allowed edit paths. Keep setup faithful to the repository's existing\nhelpers, especially resource lifecycle, authentication, clocks, and dependency injection.\n\nFor Node test recipes, only completed test-body AssertionErrors are behavioral failure evidence. Plain Error or\nTypeError exceptions, hook failures, process crashes, missing tests, and test-runner timeouts are inconclusive.\nExpress required behavior with node:assert/strict. Required success is itself a behavior to assert: capture the\nresult of an application operation inside an awaited assert.doesNotReject callback, or a helper that does so\nand returns that result. A bare await of an operation expected to succeed lets an incorrect implementation's\nexception become inconclusive instead of an assertion failure. Apply this to required-success calls, response\nbody reads, and asynchronous races. Use assert.doesNotThrow for required synchronous success. Keep fixture\nconstruction, environment setup, and imports outside these behavioral assertions; do not wrap an entire test.\nFor a specified asynchronous deadline or streaming-return\nrequirement, race against a resolved tagged sentinel and assert that the sentinel did not win; do not reject a\ntimer with a plain Error or use the test-runner timeout as the behavioral assertion. Await assert.rejects for\nrequired rejections and assert structural preconditions before reading nested result fields.\nKeep assertions tied to the visible contract. Never catch all setup, import, or harness errors and relabel them\nas assertion failures, suppress failures, or replace behavioral checks with constants.";
3
+ export declare const repositoryFixtureAuthoringInstructionsV1: (instructions: string, witnessVersion?: 1 | 2, oracleRepairFeedbackVersion?: 1) => string;
@@ -0,0 +1,91 @@
1
+ /** Shared authoring contract for new fixtures and bounded fixture repairs. */
2
+ export const REPOSITORY_FIXTURE_EVIDENCE_INSTRUCTIONS = `The original historical tests run separately for every solution.
3
+ Preserve that baseline and use generated overlays for additional discriminating behavior; do not reproduce unrelated
4
+ historical tests as extra fixture modules. Each fixture starts a separate clean checkout and build for every control
5
+ and repetition. Group related requirements into a small number of coherent fixture modules, usually three to five
6
+ for a bounded task, with many independently named tests and table-driven examples inside each module. One fixture
7
+ may cover several related scope clauses; map each clause to the module that actually asserts it. Group only behavior
8
+ that its description, expectedBehavior, kind, and expectationMode can accurately describe. Keep distinct expectation
9
+ modes separate when combining them would misrepresent the fixture. Do not create one module per scope clause or
10
+ input value by default. Fixture count is a packaging choice, never a quality target: preserve every required
11
+ assertion, boundary, counterfactual, and invariant even when more modules are necessary. Use separate named tests
12
+ so a failing example does not prevent unrelated examples in the module from executing.
13
+
14
+ Exercise the boundaries and preservation rules in the visible contract, using the pinned reference to resolve
15
+ expected behavior. When two fields or representations can describe the same fact, include conflicting values
16
+ that establish which one is authoritative; examples where they agree cannot test precedence. Vary advisory
17
+ metadata independently from the actual payload or state, including empty, zero, missing, and stale values
18
+ where the contract permits them. Check that metadata which is not an eligibility condition cannot introduce
19
+ a shortcut around required behavior. Do not invent requirements outside the visible contract. Prefer compact
20
+ table-driven combinations within a fixture to separate fixture modules for every value.
21
+
22
+ Derive variations from the relevant public signatures and preserved behavior, not only the historical example.
23
+ Exercise omitted, default, and explicit optional settings alongside the primary operation modes, including
24
+ combinations where an advisory setting could incorrectly override an explicit mode. Where the contract says
25
+ logical inputs are equivalent, test different representations or delivery patterns of that same input.
26
+ For incremental or batched processing, compare whole-input delivery with deterministic partitions at, before,
27
+ and after meaningful boundaries, including apparent terminators followed by additional permitted input.
28
+ For indexed collections, include empty and sparse positions as well as dense examples when supported.
29
+ Only assert invariance where the pinned reference and visible contract establish it; do not assume ordering,
30
+ batching, or representation is irrelevant when it has specified meaning. Use independently named cases and
31
+ deterministic data so these variations remain reproducible across controls and repetitions.
32
+
33
+ repositoryEnvironment.localImports contains complete helper and dependency files from the initial snapshot.
34
+ When supplied, referenceLocalImports contains the corresponding reference-snapshot context for oracle work.
35
+ Reuse demonstrated fixture factories and public constructors rather than guessing how imported objects are
36
+ initialized. Treat omitted and unresolved entries as explicit context limits, not evidence that an API exists.
37
+ Supporting context does not expand the allowed edit paths. Keep setup faithful to the repository's existing
38
+ helpers, especially resource lifecycle, authentication, clocks, and dependency injection.
39
+
40
+ For Node test recipes, only completed test-body AssertionErrors are behavioral failure evidence. Plain Error or
41
+ TypeError exceptions, hook failures, process crashes, missing tests, and test-runner timeouts are inconclusive.
42
+ Express required behavior with node:assert/strict. Required success is itself a behavior to assert: capture the
43
+ result of an application operation inside an awaited assert.doesNotReject callback, or a helper that does so
44
+ and returns that result. A bare await of an operation expected to succeed lets an incorrect implementation's
45
+ exception become inconclusive instead of an assertion failure. Apply this to required-success calls, response
46
+ body reads, and asynchronous races. Use assert.doesNotThrow for required synchronous success. Keep fixture
47
+ construction, environment setup, and imports outside these behavioral assertions; do not wrap an entire test.
48
+ For a specified asynchronous deadline or streaming-return
49
+ requirement, race against a resolved tagged sentinel and assert that the sentinel did not win; do not reject a
50
+ timer with a plain Error or use the test-runner timeout as the behavioral assertion. Await assert.rejects for
51
+ required rejections and assert structural preconditions before reading nested result fields.
52
+ Keep assertions tied to the visible contract. Never catch all setup, import, or harness errors and relabel them
53
+ as assertion failures, suppress failures, or replace behavioral checks with constants.`;
54
+ // Existing plans reconstruct the exact original prompt. Only a V2 plan opts in
55
+ // to the corrected observation guidance.
56
+ const REPOSITORY_FIXTURE_EVIDENCE_INSTRUCTIONS_V2 = REPOSITORY_FIXTURE_EVIDENCE_INSTRUCTIONS.replace(`For a specified asynchronous deadline or streaming-return
57
+ requirement, race against a resolved tagged sentinel and assert that the sentinel did not win; do not reject a
58
+ timer with a plain Error or use the test-runner timeout as the behavioral assertion.`, `For a specified asynchronous deadline or streaming-return requirement, withhold the input or state
59
+ transition whose premature dependency would violate the contract, and observe the required output while it
60
+ remains withheld. Use a generous explicit observation watchdog within the reviewed command budget and assert
61
+ on its tagged result. A resolved-promise race or fixed count of microtasks measures implementation scheduling,
62
+ not the contract. Do not require a particular number of turns or immediate promise settlement. Release readers,
63
+ gates and timers in finally blocks so a negative control cannot hang the runner. Do not use a plain Error or
64
+ the test-runner timeout as the behavioral assertion.
65
+ Transport chunks are not logical event boundaries. Accumulate reads to the required byte or event boundary
66
+ before comparing output, allowing a correct implementation to split or coalesce chunks and to schedule delivery
67
+ asynchronously. Assert complete bytes, framing and semantic ordering only where the contract requires them.
68
+ Snapshot expected mutable input metadata before invoking the operation, so in-place corruption cannot change
69
+ both the result and its expected value.`);
70
+ const BOUNDED_FAILURE_EVIDENCE_INSTRUCTIONS = `A fixture must finish with usable assertion evidence on plausible wrong implementations as well as on the reference.
71
+ Keep assertion diagnostics bounded independently of input size. For large binary or textual payloads, compare
72
+ the complete length and complete content, then assert the boolean or small comparison result with a concise
73
+ message. For example, Buffer.equals compares all bytes; assert.ok(actual.equals(expected), "complete bytes
74
+ must match") avoids formatting multi-megabyte actual/expected buffers. Do not deepEqual large buffers or put
75
+ large payloads in assertion messages. Do not replace complete equality with prefix, length-only, or sampled
76
+ checks. A process crash while constructing or reporting an assertion is inconclusive, never a semantic kill.
77
+ Bound generated input production and release streams/resources even when assertions fail.
78
+
79
+ When priorRejectedAttempts includes candidateFixtureProposal and candidateObservations, these describe the
80
+ actual post-preflight rejected revision and its measured per-clause outcomes. Use that concrete evidence to
81
+ repair the failed revision while preserving its demonstrated behavioral checks and every incumbent obligation.
82
+ The rejected revision has not become the incumbent or admission evidence. Never treat missing, unstable, or
83
+ inconclusive observations as passes or kills; the replacement must complete the full unchanged tournament.`;
84
+ export const repositoryFixtureAuthoringInstructionsV1 = (instructions, witnessVersion, oracleRepairFeedbackVersion) => {
85
+ const versioned = witnessVersion === 2
86
+ ? instructions.replace(REPOSITORY_FIXTURE_EVIDENCE_INSTRUCTIONS, REPOSITORY_FIXTURE_EVIDENCE_INSTRUCTIONS_V2)
87
+ : instructions;
88
+ return oracleRepairFeedbackVersion === 1
89
+ ? `${versioned}\n\n${BOUNDED_FAILURE_EVIDENCE_INSTRUCTIONS}`
90
+ : versioned;
91
+ };
@@ -0,0 +1,79 @@
1
+ import { Schema } from "effect";
2
+ export declare const RepositoryOracleFixtureV1: Schema.Union<readonly [Schema.Struct<{
3
+ readonly kind: Schema.Literal<"historical-regression">;
4
+ readonly expectationMode: Schema.Literal<"changes">;
5
+ readonly id: Schema.String;
6
+ readonly description: Schema.String;
7
+ readonly expectedBehavior: Schema.String;
8
+ readonly source: Schema.Literals<readonly ["historical", "generated", "reviewed"]>;
9
+ readonly testPath: Schema.String;
10
+ }>, Schema.Struct<{
11
+ readonly kind: Schema.Literal<"boundary">;
12
+ readonly expectationMode: Schema.Literals<readonly ["changes", "preserved"]>;
13
+ readonly id: Schema.String;
14
+ readonly description: Schema.String;
15
+ readonly expectedBehavior: Schema.String;
16
+ readonly source: Schema.Literals<readonly ["historical", "generated", "reviewed"]>;
17
+ readonly testPath: Schema.String;
18
+ }>, Schema.Struct<{
19
+ readonly kind: Schema.Literal<"counterfactual">;
20
+ readonly expectationMode: Schema.Literal<"changes">;
21
+ readonly id: Schema.String;
22
+ readonly description: Schema.String;
23
+ readonly expectedBehavior: Schema.String;
24
+ readonly source: Schema.Literals<readonly ["historical", "generated", "reviewed"]>;
25
+ readonly testPath: Schema.String;
26
+ }>, Schema.Struct<{
27
+ readonly kind: Schema.Literal<"metamorphic">;
28
+ readonly expectationMode: Schema.Literal<"preserved">;
29
+ readonly id: Schema.String;
30
+ readonly description: Schema.String;
31
+ readonly expectedBehavior: Schema.String;
32
+ readonly source: Schema.Literals<readonly ["historical", "generated", "reviewed"]>;
33
+ readonly testPath: Schema.String;
34
+ }>]>;
35
+ export type RepositoryOracleFixtureV1 = typeof RepositoryOracleFixtureV1.Type;
36
+ export declare const RepositoryHiddenFixtureSuiteV1: Schema.Struct<{
37
+ readonly version: Schema.Literal<1>;
38
+ readonly caseId: Schema.String;
39
+ readonly fixtures: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
40
+ readonly kind: Schema.Literal<"historical-regression">;
41
+ readonly expectationMode: Schema.Literal<"changes">;
42
+ readonly id: Schema.String;
43
+ readonly description: Schema.String;
44
+ readonly expectedBehavior: Schema.String;
45
+ readonly source: Schema.Literals<readonly ["historical", "generated", "reviewed"]>;
46
+ readonly testPath: Schema.String;
47
+ }>, Schema.Struct<{
48
+ readonly kind: Schema.Literal<"boundary">;
49
+ readonly expectationMode: Schema.Literals<readonly ["changes", "preserved"]>;
50
+ readonly id: Schema.String;
51
+ readonly description: Schema.String;
52
+ readonly expectedBehavior: Schema.String;
53
+ readonly source: Schema.Literals<readonly ["historical", "generated", "reviewed"]>;
54
+ readonly testPath: Schema.String;
55
+ }>, Schema.Struct<{
56
+ readonly kind: Schema.Literal<"counterfactual">;
57
+ readonly expectationMode: Schema.Literal<"changes">;
58
+ readonly id: Schema.String;
59
+ readonly description: Schema.String;
60
+ readonly expectedBehavior: Schema.String;
61
+ readonly source: Schema.Literals<readonly ["historical", "generated", "reviewed"]>;
62
+ readonly testPath: Schema.String;
63
+ }>, Schema.Struct<{
64
+ readonly kind: Schema.Literal<"metamorphic">;
65
+ readonly expectationMode: Schema.Literal<"preserved">;
66
+ readonly id: Schema.String;
67
+ readonly description: Schema.String;
68
+ readonly expectedBehavior: Schema.String;
69
+ readonly source: Schema.Literals<readonly ["historical", "generated", "reviewed"]>;
70
+ readonly testPath: Schema.String;
71
+ }>]>>;
72
+ readonly overlays: Schema.$Array<Schema.Struct<{
73
+ readonly path: Schema.String;
74
+ readonly content: Schema.String;
75
+ readonly fixtureIds: Schema.$Array<Schema.String>;
76
+ }>>;
77
+ }>;
78
+ export type RepositoryHiddenFixtureSuiteV1 = typeof RepositoryHiddenFixtureSuiteV1.Type;
79
+ export declare function assertRepositoryHiddenFixtureSuiteV1(value: unknown): asserts value is RepositoryHiddenFixtureSuiteV1;
@@ -0,0 +1,79 @@
1
+ import { Schema } from "effect";
2
+ const RepositoryOracleFixtureBaseV1 = {
3
+ id: Schema.String,
4
+ description: Schema.String,
5
+ expectedBehavior: Schema.String,
6
+ source: Schema.Literals(["historical", "generated", "reviewed"]),
7
+ testPath: Schema.String
8
+ };
9
+ export const RepositoryOracleFixtureV1 = Schema.Union([
10
+ Schema.Struct({
11
+ ...RepositoryOracleFixtureBaseV1,
12
+ kind: Schema.Literal("historical-regression"),
13
+ expectationMode: Schema.Literal("changes")
14
+ }),
15
+ Schema.Struct({
16
+ ...RepositoryOracleFixtureBaseV1,
17
+ kind: Schema.Literal("boundary"),
18
+ expectationMode: Schema.Literals(["changes", "preserved"])
19
+ }),
20
+ Schema.Struct({
21
+ ...RepositoryOracleFixtureBaseV1,
22
+ kind: Schema.Literal("counterfactual"),
23
+ expectationMode: Schema.Literal("changes")
24
+ }),
25
+ Schema.Struct({
26
+ ...RepositoryOracleFixtureBaseV1,
27
+ kind: Schema.Literal("metamorphic"),
28
+ expectationMode: Schema.Literal("preserved")
29
+ })
30
+ ]);
31
+ export const RepositoryHiddenFixtureSuiteV1 = Schema.Struct({
32
+ version: Schema.Literal(1),
33
+ caseId: Schema.String,
34
+ fixtures: Schema.Array(RepositoryOracleFixtureV1),
35
+ overlays: Schema.Array(Schema.Struct({
36
+ path: Schema.String,
37
+ content: Schema.String,
38
+ fixtureIds: Schema.Array(Schema.String)
39
+ }))
40
+ });
41
+ export function assertRepositoryHiddenFixtureSuiteV1(value) {
42
+ const suite = Schema.decodeUnknownSync(RepositoryHiddenFixtureSuiteV1)(value);
43
+ const fixtureIds = new Set(suite.fixtures.map((fixture) => fixture.id));
44
+ if (suite.caseId.trim().length === 0 ||
45
+ suite.fixtures.length === 0 ||
46
+ fixtureIds.size !== suite.fixtures.length) {
47
+ throw new Error("repository hidden fixture suite requires a case id and unique fixtures");
48
+ }
49
+ if (!suite.fixtures.some((fixture) => fixture.kind === "counterfactual" ||
50
+ fixture.kind === "metamorphic")) {
51
+ throw new Error("repository hidden fixture suite requires a counterfactual or metamorphic fixture");
52
+ }
53
+ const coveredFixtureIds = new Set(suite.overlays.flatMap((overlay) => overlay.fixtureIds));
54
+ const overlayCountByFixtureId = new Map();
55
+ for (const overlay of suite.overlays) {
56
+ for (const fixtureId of overlay.fixtureIds) {
57
+ overlayCountByFixtureId.set(fixtureId, (overlayCountByFixtureId.get(fixtureId) ?? 0) + 1);
58
+ }
59
+ }
60
+ if (suite.overlays.length === 0 ||
61
+ suite.overlays.some((overlay) => overlay.path.trim().length === 0 ||
62
+ overlay.content.trim().length === 0 ||
63
+ overlay.fixtureIds.length !== 1 ||
64
+ new Set(overlay.fixtureIds).size !== overlay.fixtureIds.length ||
65
+ overlay.fixtureIds.some((id) => !fixtureIds.has(id))) ||
66
+ [...fixtureIds].some((id) => !coveredFixtureIds.has(id) ||
67
+ overlayCountByFixtureId.get(id) !== 1)) {
68
+ throw new Error("every repository hidden fixture must be implemented by exactly one independently executable overlay");
69
+ }
70
+ for (const fixture of suite.fixtures) {
71
+ if (fixture.id.trim().length === 0 ||
72
+ fixture.description.trim().length === 0 ||
73
+ fixture.expectedBehavior.trim().length === 0 ||
74
+ !suite.overlays.some((overlay) => overlay.path === fixture.testPath &&
75
+ overlay.fixtureIds.includes(fixture.id))) {
76
+ throw new Error("repository hidden fixture metadata must match its test overlay");
77
+ }
78
+ }
79
+ }
@@ -0,0 +1,118 @@
1
+ import { Schema } from "effect";
2
+ import { type RepositoryFoundryModelRoleV1 } from "./repository-language-model-protocol.js";
3
+ export declare const REPOSITORY_FOUNDRY_BASE_MODEL_CALLS: number;
4
+ export declare const REPOSITORY_FOUNDRY_TRAJECTORY_REPAIR_ATTEMPTS = 2;
5
+ export declare const REPOSITORY_FOUNDRY_TRAJECTORY_REPAIR_CALLS: number;
6
+ export declare const REPOSITORY_FOUNDRY_VALID_SOLUTION_REPAIR_ATTEMPTS = 2;
7
+ export declare const REPOSITORY_FOUNDRY_VALID_SOLUTION_REPAIR_CALLS: number;
8
+ export declare const REPOSITORY_FOUNDRY_HELD_OUT_REPAIR_CALLS = 2;
9
+ export declare const REPOSITORY_FOUNDRY_MAXIMUM_HILL_CLIMB_ATTEMPTS = 3;
10
+ export declare const REPOSITORY_FOUNDRY_MAXIMUM_SPECIFICATION_REVISIONS = 2;
11
+ export declare const REPOSITORY_FOUNDRY_MAXIMUM_ORACLE_COVERAGE_REVISIONS = 2;
12
+ export declare const REPOSITORY_FOUNDRY_MAXIMUM_VALID_CONTROL_REGENERATIONS = 3;
13
+ export declare const REPOSITORY_FOUNDRY_TRANSIENT_RETRY_RESERVE = 3;
14
+ export declare const REPOSITORY_FOUNDRY_REQUEST_INPUT_CEILING = 512000;
15
+ export declare const REPOSITORY_FOUNDRY_STANDARD_OUTPUT_CEILING = 32768;
16
+ export declare const REPOSITORY_FOUNDRY_EXPANSIVE_OUTPUT_CEILING = 65536;
17
+ export declare const REPOSITORY_FOUNDRY_PER_CALL_OUTPUT_CEILING = 65536;
18
+ export declare const repositoryFoundryRoleOutputCeilingV1: (role: RepositoryFoundryModelRoleV1) => number;
19
+ export declare const REPOSITORY_FOUNDRY_BASE_OUTPUT_CEILING: number;
20
+ export declare const REPOSITORY_FOUNDRY_HILL_CLIMB_OUTPUT_CEILING: number;
21
+ export declare const REPOSITORY_FOUNDRY_DEFAULT_WALL_TIME_MS: number;
22
+ export declare const REPOSITORY_FOUNDRY_MINIMUM_WALL_TIME_MS: number;
23
+ export declare const REPOSITORY_FOUNDRY_MAXIMUM_WALL_TIME_MS: number;
24
+ export declare const RepositoryFoundryGenerationBudgetV1: Schema.Struct<{
25
+ readonly plannedModelCalls: Schema.Finite;
26
+ readonly maximumTransientRetries: Schema.Finite;
27
+ readonly maximumHillClimbAttempts: Schema.Finite;
28
+ readonly maximumSpecificationRevisions: Schema.optionalKey<Schema.Finite>;
29
+ readonly maximumOracleCoverageRevisions: Schema.optionalKey<Schema.Finite>;
30
+ readonly maximumFixtureRepairAttempts: Schema.optionalKey<Schema.Finite>;
31
+ readonly requiredTotalInputTokens: Schema.Finite;
32
+ readonly requiredTotalOutputTokens: Schema.Finite;
33
+ readonly perCallOutputTokens: Schema.Finite;
34
+ readonly wallTimeMs: Schema.Finite;
35
+ }>;
36
+ export type RepositoryFoundryGenerationBudgetV1 = typeof RepositoryFoundryGenerationBudgetV1.Type;
37
+ export declare const RepositoryIntegratedHistoryProvenanceV1: Schema.Struct<{
38
+ readonly method: Schema.Literal<"integrated-retained-history-v1">;
39
+ readonly requestedRef: Schema.String;
40
+ readonly requestedTipCommit: Schema.String;
41
+ readonly requestedTipTree: Schema.String;
42
+ readonly integrationCommit: Schema.String;
43
+ readonly pathBlobs: Schema.$Array<Schema.Struct<{
44
+ readonly path: Schema.String;
45
+ readonly blob: Schema.String;
46
+ }>>;
47
+ }>;
48
+ export type RepositoryIntegratedHistoryProvenanceV1 = typeof RepositoryIntegratedHistoryProvenanceV1.Type;
49
+ export declare const REPOSITORY_INTEGRATED_HISTORY_MAXIMUM_PATHS = 32;
50
+ export declare const validIntegratedHistoryProvenanceV1: (proof: RepositoryIntegratedHistoryProvenanceV1) => boolean;
51
+ export declare const RepositoryFoundryGenerationPlanV1: Schema.Struct<{
52
+ readonly version: Schema.Literal<1>;
53
+ readonly planDigest: Schema.String;
54
+ readonly repository: Schema.Struct<{
55
+ readonly root: Schema.String;
56
+ readonly requestedRef: Schema.String;
57
+ readonly commit: Schema.String;
58
+ readonly tree: Schema.String;
59
+ }>;
60
+ readonly caseId: Schema.String;
61
+ readonly requestedDimension: Schema.optionalKey<Schema.String>;
62
+ readonly excludedReferenceCommits: Schema.optionalKey<Schema.$Array<Schema.String>>;
63
+ readonly historyProvenance: Schema.optionalKey<Schema.Struct<{
64
+ readonly method: Schema.Literal<"integrated-retained-history-v1">;
65
+ readonly requestedRef: Schema.String;
66
+ readonly requestedTipCommit: Schema.String;
67
+ readonly requestedTipTree: Schema.String;
68
+ readonly integrationCommit: Schema.String;
69
+ readonly pathBlobs: Schema.$Array<Schema.Struct<{
70
+ readonly path: Schema.String;
71
+ readonly blob: Schema.String;
72
+ }>>;
73
+ }>>;
74
+ readonly validControlRegenerationSequence: Schema.optionalKey<Schema.Finite>;
75
+ readonly validControlReviewVersion: Schema.optionalKey<Schema.Literals<readonly [1, 2]>>;
76
+ readonly dependencyContextVersion: Schema.optionalKey<Schema.Literals<readonly [1, 2]>>;
77
+ readonly oracleCoverageWitnessVersion: Schema.optionalKey<Schema.Literals<readonly [1, 2]>>;
78
+ readonly oracleCoverageWitnessRepairVersion: Schema.optionalKey<Schema.Literal<1>>;
79
+ readonly oracleRepairFeedbackVersion: Schema.optionalKey<Schema.Literal<1>>;
80
+ readonly reviewInputVersion: Schema.optionalKey<Schema.Literal<2>>;
81
+ readonly specificationContractFactsVersion: Schema.optionalKey<Schema.Literal<1>>;
82
+ readonly seedId: Schema.String;
83
+ readonly initialCommit: Schema.String;
84
+ readonly referenceCommit: Schema.String;
85
+ readonly modelPlan: Schema.Struct<{
86
+ readonly version: Schema.Literal<1>;
87
+ readonly assignments: Schema.$Array<Schema.Struct<{
88
+ readonly role: Schema.Literals<readonly ["repository-analyst", "specification-writer", "specification-critic-a", "specification-critic-b", "trajectory-designer", "trajectory-critic", "oracle-designer", "valid-solution-generator-a", "valid-solution-generator-b", "adversary", "solution-critic-a", "solution-critic-b", "held-out-adversary", "held-out-solution-critic-a", "held-out-solution-critic-b", "quality-reviewer", "hill-climb-planner", "oracle-critic"]>;
89
+ readonly model: Schema.String;
90
+ readonly reasoningEffort: Schema.Literals<readonly ["low", "medium", "high", "xhigh", "max", "ultra"]>;
91
+ }>>;
92
+ }>;
93
+ readonly qualification: Schema.Struct<{
94
+ readonly batches: Schema.Finite;
95
+ readonly repetitionsPerBatch: Schema.Finite;
96
+ readonly oracleRepetitions: Schema.Finite;
97
+ readonly oracleConcurrency: Schema.optionalKey<Schema.Finite>;
98
+ }>;
99
+ readonly budget: Schema.Struct<{
100
+ readonly plannedModelCalls: Schema.Finite;
101
+ readonly maximumTransientRetries: Schema.Finite;
102
+ readonly maximumHillClimbAttempts: Schema.Finite;
103
+ readonly maximumSpecificationRevisions: Schema.optionalKey<Schema.Finite>;
104
+ readonly maximumOracleCoverageRevisions: Schema.optionalKey<Schema.Finite>;
105
+ readonly maximumFixtureRepairAttempts: Schema.optionalKey<Schema.Finite>;
106
+ readonly requiredTotalInputTokens: Schema.Finite;
107
+ readonly requiredTotalOutputTokens: Schema.Finite;
108
+ readonly perCallOutputTokens: Schema.Finite;
109
+ readonly wallTimeMs: Schema.Finite;
110
+ }>;
111
+ }>;
112
+ export type RepositoryFoundryGenerationPlanV1 = typeof RepositoryFoundryGenerationPlanV1.Type;
113
+ type PlanWithoutDigest = Omit<RepositoryFoundryGenerationPlanV1, "planDigest">;
114
+ export declare function assertRepositoryFoundryReferenceExclusionsV1(references: readonly string[] | undefined): void;
115
+ export declare const repositoryFoundryGenerationBudgetV1: (maximumHillClimbAttempts: number, wallTimeMs?: number, maximumSpecificationRevisions?: number, maximumOracleCoverageRevisions?: number, maximumFixtureRepairAttempts?: number, reviewInputVersion?: 2, specificationContractFactsVersion?: 1) => RepositoryFoundryGenerationBudgetV1;
116
+ export declare const repositoryFoundryGenerationPlanDigestV1: (plan: PlanWithoutDigest) => string;
117
+ export declare function assertRepositoryFoundryGenerationPlanV1(value: unknown): asserts value is RepositoryFoundryGenerationPlanV1;
118
+ export {};