devcontour-harness 0.0.0-stage → 0.1.0-alpha.12

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 (466) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +268 -2
  3. package/docs/architecture.md +496 -0
  4. package/docs/compatibility-versions.md +60 -0
  5. package/docs/compatibility.md +192 -0
  6. package/docs/connectors.md +323 -0
  7. package/docs/contracts.md +630 -0
  8. package/docs/integrations/hindsight.md +148 -0
  9. package/docs/quickstart.md +185 -0
  10. package/docs/release-notes/0.1.0-alpha.10.md +50 -0
  11. package/docs/release-notes/0.1.0-alpha.11.md +44 -0
  12. package/docs/release-notes/0.1.0-alpha.12.md +66 -0
  13. package/docs/release-notes/0.1.0-alpha.6.md +238 -0
  14. package/docs/release-notes/0.1.0-alpha.7.md +71 -0
  15. package/docs/release-notes/0.1.0-alpha.8.md +73 -0
  16. package/docs/release-notes/0.1.0-alpha.9.md +55 -0
  17. package/docs/review-probes.md +199 -0
  18. package/docs/review-protocol.md +251 -0
  19. package/docs/standalone.md +271 -0
  20. package/docs/toolchains.md +167 -0
  21. package/docs/turbo-starter.md +269 -0
  22. package/docs/upgrade.md +219 -0
  23. package/examples/README.md +27 -0
  24. package/examples/external-connector/README.md +19 -0
  25. package/examples/external-connector/connector.mjs +55 -0
  26. package/examples/files-only/README.md +28 -0
  27. package/examples/files-only/context/norms/rules.md +4 -0
  28. package/examples/files-only/graph.json +23 -0
  29. package/examples/files-only/policy.json +30 -0
  30. package/examples/one-vendor/README.md +19 -0
  31. package/examples/one-vendor/policy.json +27 -0
  32. package/examples/single-task/README.md +18 -0
  33. package/examples/single-task/graph.json +27 -0
  34. package/examples/single-task/policy-same-vendor.json +55 -0
  35. package/examples/single-task/policy.json +52 -0
  36. package/examples/single-task/src/.gitkeep +0 -0
  37. package/examples/single-task/test/run.js +19 -0
  38. package/examples/toolchains/README.md +32 -0
  39. package/examples/toolchains/go/bad/label/label.go +9 -0
  40. package/examples/toolchains/go/good/label/label.go +9 -0
  41. package/examples/toolchains/go/policy.json +79 -0
  42. package/examples/toolchains/go/repo/REQUIREMENTS.md +9 -0
  43. package/examples/toolchains/go/repo/_gitignore +1 -0
  44. package/examples/toolchains/go/repo/go.mod +5 -0
  45. package/examples/toolchains/go/repo/go.sum +2 -0
  46. package/examples/toolchains/go/repo/label/label.go +9 -0
  47. package/examples/toolchains/go/repo/label/label_test.go +27 -0
  48. package/examples/toolchains/go/repo/label/version.go +9 -0
  49. package/examples/toolchains/go/task.json +25 -0
  50. package/examples/toolchains/mixed-go/bad/backend/label/label.go +9 -0
  51. package/examples/toolchains/mixed-go/bad/frontend/src/label.js +4 -0
  52. package/examples/toolchains/mixed-go/good/backend/label/label.go +9 -0
  53. package/examples/toolchains/mixed-go/good/frontend/src/label.js +4 -0
  54. package/examples/toolchains/mixed-go/policy.json +126 -0
  55. package/examples/toolchains/mixed-go/repo/REQUIREMENTS.md +9 -0
  56. package/examples/toolchains/mixed-go/repo/_gitignore +6 -0
  57. package/examples/toolchains/mixed-go/repo/backend/go.mod +3 -0
  58. package/examples/toolchains/mixed-go/repo/backend/label/label.go +9 -0
  59. package/examples/toolchains/mixed-go/repo/backend/label/label_test.go +30 -0
  60. package/examples/toolchains/mixed-go/repo/contract/check.mjs +17 -0
  61. package/examples/toolchains/mixed-go/repo/contract/label.json +9 -0
  62. package/examples/toolchains/mixed-go/repo/frontend/package.json +15 -0
  63. package/examples/toolchains/mixed-go/repo/frontend/pnpm-lock.yaml +22 -0
  64. package/examples/toolchains/mixed-go/repo/frontend/src/label.js +4 -0
  65. package/examples/toolchains/mixed-go/repo/frontend/test/label.test.js +11 -0
  66. package/examples/toolchains/mixed-go/task.json +25 -0
  67. package/examples/toolchains/mixed-python/bad/backend/src/fx_backend/__init__.py +6 -0
  68. package/examples/toolchains/mixed-python/bad/frontend/src/label.js +4 -0
  69. package/examples/toolchains/mixed-python/good/backend/src/fx_backend/__init__.py +6 -0
  70. package/examples/toolchains/mixed-python/good/frontend/src/label.js +4 -0
  71. package/examples/toolchains/mixed-python/policy.json +121 -0
  72. package/examples/toolchains/mixed-python/repo/REQUIREMENTS.md +9 -0
  73. package/examples/toolchains/mixed-python/repo/_gitignore +6 -0
  74. package/examples/toolchains/mixed-python/repo/backend/.python-version +1 -0
  75. package/examples/toolchains/mixed-python/repo/backend/pyproject.toml +19 -0
  76. package/examples/toolchains/mixed-python/repo/backend/src/fx_backend/__init__.py +6 -0
  77. package/examples/toolchains/mixed-python/repo/backend/tests/test_label.py +11 -0
  78. package/examples/toolchains/mixed-python/repo/backend/uv.lock +108 -0
  79. package/examples/toolchains/mixed-python/repo/contract/check.mjs +17 -0
  80. package/examples/toolchains/mixed-python/repo/contract/label.json +9 -0
  81. package/examples/toolchains/mixed-python/repo/frontend/package.json +15 -0
  82. package/examples/toolchains/mixed-python/repo/frontend/pnpm-lock.yaml +22 -0
  83. package/examples/toolchains/mixed-python/repo/frontend/src/label.js +4 -0
  84. package/examples/toolchains/mixed-python/repo/frontend/test/label.test.js +11 -0
  85. package/examples/toolchains/mixed-python/task.json +25 -0
  86. package/examples/toolchains/npm/bad/src/label.js +4 -0
  87. package/examples/toolchains/npm/good/src/label.js +4 -0
  88. package/examples/toolchains/npm/policy.json +82 -0
  89. package/examples/toolchains/npm/repo/REQUIREMENTS.md +9 -0
  90. package/examples/toolchains/npm/repo/_gitignore +4 -0
  91. package/examples/toolchains/npm/repo/package-lock.json +22 -0
  92. package/examples/toolchains/npm/repo/package.json +13 -0
  93. package/examples/toolchains/npm/repo/src/label.js +4 -0
  94. package/examples/toolchains/npm/repo/test/label.test.js +13 -0
  95. package/examples/toolchains/npm/task.json +25 -0
  96. package/examples/toolchains/pnpm/bad/packages/label/src/label.js +4 -0
  97. package/examples/toolchains/pnpm/good/packages/label/src/label.js +4 -0
  98. package/examples/toolchains/pnpm/policy.json +85 -0
  99. package/examples/toolchains/pnpm/repo/REQUIREMENTS.md +9 -0
  100. package/examples/toolchains/pnpm/repo/_gitignore +4 -0
  101. package/examples/toolchains/pnpm/repo/package.json +10 -0
  102. package/examples/toolchains/pnpm/repo/packages/checker/check.mjs +5 -0
  103. package/examples/toolchains/pnpm/repo/packages/checker/package.json +9 -0
  104. package/examples/toolchains/pnpm/repo/packages/label/package.json +14 -0
  105. package/examples/toolchains/pnpm/repo/packages/label/src/label.js +4 -0
  106. package/examples/toolchains/pnpm/repo/packages/label/test/label.test.js +13 -0
  107. package/examples/toolchains/pnpm/repo/pnpm-lock.yaml +29 -0
  108. package/examples/toolchains/pnpm/repo/pnpm-workspace.yaml +2 -0
  109. package/examples/toolchains/pnpm/task.json +25 -0
  110. package/examples/toolchains/python/bad/src/fx_label/__init__.py +6 -0
  111. package/examples/toolchains/python/good/src/fx_label/__init__.py +6 -0
  112. package/examples/toolchains/python/policy.json +80 -0
  113. package/examples/toolchains/python/repo/.python-version +1 -0
  114. package/examples/toolchains/python/repo/REQUIREMENTS.md +9 -0
  115. package/examples/toolchains/python/repo/_gitignore +5 -0
  116. package/examples/toolchains/python/repo/pyproject.toml +19 -0
  117. package/examples/toolchains/python/repo/src/fx_label/__init__.py +6 -0
  118. package/examples/toolchains/python/repo/tests/test_label.py +13 -0
  119. package/examples/toolchains/python/repo/uv.lock +108 -0
  120. package/examples/toolchains/python/task.json +25 -0
  121. package/examples/toolchains/turbo/bad/packages/label/src/label.js +4 -0
  122. package/examples/toolchains/turbo/good/packages/label/src/label.js +4 -0
  123. package/examples/toolchains/turbo/policy.json +110 -0
  124. package/examples/toolchains/turbo/repo/REQUIREMENTS.md +9 -0
  125. package/examples/toolchains/turbo/repo/_gitignore +4 -0
  126. package/examples/toolchains/turbo/repo/package.json +13 -0
  127. package/examples/toolchains/turbo/repo/packages/checker/check.mjs +5 -0
  128. package/examples/toolchains/turbo/repo/packages/checker/package.json +9 -0
  129. package/examples/toolchains/turbo/repo/packages/label/package.json +14 -0
  130. package/examples/toolchains/turbo/repo/packages/label/src/label.js +4 -0
  131. package/examples/toolchains/turbo/repo/packages/label/test/label.test.js +13 -0
  132. package/examples/toolchains/turbo/repo/pnpm-lock.yaml +94 -0
  133. package/examples/toolchains/turbo/repo/pnpm-workspace.yaml +2 -0
  134. package/examples/toolchains/turbo/repo/turbo.json +7 -0
  135. package/examples/toolchains/turbo/task.json +25 -0
  136. package/examples/turbo-starter/README.md +16 -0
  137. package/examples/turbo-starter/changes/issued-at-consumer-only.patch +12 -0
  138. package/examples/turbo-starter/changes/issued-at.patch +130 -0
  139. package/examples/turbo-starter/cleanup.mjs +58 -0
  140. package/examples/turbo-starter/graph.json +32 -0
  141. package/examples/turbo-starter/harness/acceptance/db-isolation.test.mjs +97 -0
  142. package/examples/turbo-starter/harness/acceptance/env-probe.test.mjs +75 -0
  143. package/examples/turbo-starter/harness/acceptance/generation.test.mjs +54 -0
  144. package/examples/turbo-starter/harness/acceptance/issued-at.test.mjs +43 -0
  145. package/examples/turbo-starter/harness/acceptance/lifecycle-probe.test.mjs +47 -0
  146. package/examples/turbo-starter/harness/compose-bridge.mjs +593 -0
  147. package/examples/turbo-starter/harness/compose.acceptance.yml +23 -0
  148. package/examples/turbo-starter/harness/env/backend.env.template +7 -0
  149. package/examples/turbo-starter/harness/env/compose.env.template +6 -0
  150. package/examples/turbo-starter/policy.json +109 -0
  151. package/examples/turbo-starter/policy.lifecycle.json +114 -0
  152. package/examples/turbo-starter/setup.mjs +352 -0
  153. package/examples/two-vendors/policy.json +30 -0
  154. package/lib/agents/cli-adapter.d.ts +48 -0
  155. package/lib/agents/cli-adapter.js +393 -0
  156. package/lib/agents/inspect.d.ts +60 -0
  157. package/lib/agents/inspect.js +296 -0
  158. package/lib/agents/probe-server.d.ts +2 -0
  159. package/lib/agents/probe-server.js +13 -0
  160. package/lib/agents/review-probe.d.ts +345 -0
  161. package/lib/agents/review-probe.js +1037 -0
  162. package/lib/agents/runtime-events.d.ts +11 -0
  163. package/lib/agents/runtime-events.js +21 -0
  164. package/lib/agents/schemas.d.ts +217 -0
  165. package/lib/agents/schemas.js +124 -0
  166. package/lib/agents/usage.d.ts +8 -0
  167. package/lib/agents/usage.js +83 -0
  168. package/lib/catalog/bytes.d.ts +9 -0
  169. package/lib/catalog/bytes.js +14 -0
  170. package/lib/catalog/harness.d.ts +3 -0
  171. package/lib/catalog/harness.js +11 -0
  172. package/lib/catalog/index.d.ts +5 -0
  173. package/lib/catalog/index.js +5 -0
  174. package/lib/catalog/operations.d.ts +24 -0
  175. package/lib/catalog/operations.js +74 -0
  176. package/lib/catalog/page.d.ts +46 -0
  177. package/lib/catalog/page.js +128 -0
  178. package/lib/catalog/shared.d.ts +37 -0
  179. package/lib/catalog/shared.js +67 -0
  180. package/lib/cli.d.ts +2 -0
  181. package/lib/cli.js +673 -0
  182. package/lib/connectors/files.d.ts +108 -0
  183. package/lib/connectors/files.js +133 -0
  184. package/lib/contracts/catalog.d.ts +31 -0
  185. package/lib/contracts/catalog.js +18 -0
  186. package/lib/contracts/checks.d.ts +307 -0
  187. package/lib/contracts/checks.js +181 -0
  188. package/lib/contracts/cli.d.ts +4665 -0
  189. package/lib/contracts/cli.js +840 -0
  190. package/lib/contracts/context.d.ts +135 -0
  191. package/lib/contracts/context.js +129 -0
  192. package/lib/contracts/diagnosis.d.ts +108 -0
  193. package/lib/contracts/diagnosis.js +69 -0
  194. package/lib/contracts/digest.d.ts +9 -0
  195. package/lib/contracts/digest.js +22 -0
  196. package/lib/contracts/errors.d.ts +89 -0
  197. package/lib/contracts/errors.js +74 -0
  198. package/lib/contracts/events.d.ts +827 -0
  199. package/lib/contracts/events.js +258 -0
  200. package/lib/contracts/execution.d.ts +3423 -0
  201. package/lib/contracts/execution.js +936 -0
  202. package/lib/contracts/failure.d.ts +38 -0
  203. package/lib/contracts/failure.js +53 -0
  204. package/lib/contracts/index.d.ts +22 -0
  205. package/lib/contracts/index.js +22 -0
  206. package/lib/contracts/planning.d.ts +433 -0
  207. package/lib/contracts/planning.js +159 -0
  208. package/lib/contracts/policy.d.ts +1075 -0
  209. package/lib/contracts/policy.js +544 -0
  210. package/lib/contracts/ports.d.ts +417 -0
  211. package/lib/contracts/ports.js +1 -0
  212. package/lib/contracts/primitives.d.ts +63 -0
  213. package/lib/contracts/primitives.js +73 -0
  214. package/lib/contracts/profiles.d.ts +340 -0
  215. package/lib/contracts/profiles.js +109 -0
  216. package/lib/contracts/project.d.ts +69 -0
  217. package/lib/contracts/project.js +47 -0
  218. package/lib/contracts/published.d.ts +3467 -0
  219. package/lib/contracts/published.js +40 -0
  220. package/lib/contracts/repair-policy.d.ts +31 -0
  221. package/lib/contracts/repair-policy.js +77 -0
  222. package/lib/contracts/result.d.ts +1284 -0
  223. package/lib/contracts/result.js +311 -0
  224. package/lib/contracts/review.d.ts +441 -0
  225. package/lib/contracts/review.js +477 -0
  226. package/lib/contracts/toolchain.d.ts +96 -0
  227. package/lib/contracts/toolchain.js +89 -0
  228. package/lib/contracts/version.d.ts +17 -0
  229. package/lib/contracts/version.js +17 -0
  230. package/lib/contracts/work.d.ts +171 -0
  231. package/lib/contracts/work.js +178 -0
  232. package/lib/control/base-move.d.ts +44 -0
  233. package/lib/control/base-move.js +90 -0
  234. package/lib/control/doctor.d.ts +50 -0
  235. package/lib/control/doctor.js +113 -0
  236. package/lib/control/harness.d.ts +1125 -0
  237. package/lib/control/harness.js +741 -0
  238. package/lib/control/provenance.d.ts +17 -0
  239. package/lib/control/provenance.js +25 -0
  240. package/lib/control/recovery.d.ts +237 -0
  241. package/lib/control/recovery.js +236 -0
  242. package/lib/control/review.d.ts +62 -0
  243. package/lib/control/review.js +182 -0
  244. package/lib/control/workflow.d.ts +256 -0
  245. package/lib/control/workflow.js +277 -0
  246. package/lib/engine/budget.d.ts +345 -0
  247. package/lib/engine/budget.js +278 -0
  248. package/lib/engine/classify.d.ts +8 -0
  249. package/lib/engine/classify.js +41 -0
  250. package/lib/engine/engine.d.ts +1564 -0
  251. package/lib/engine/engine.js +2283 -0
  252. package/lib/engine/failure.d.ts +1 -0
  253. package/lib/engine/failure.js +3 -0
  254. package/lib/engine/joint-runner.d.ts +257 -0
  255. package/lib/engine/joint-runner.js +254 -0
  256. package/lib/engine/measured.d.ts +15 -0
  257. package/lib/engine/measured.js +82 -0
  258. package/lib/engine/prompt.d.ts +66 -0
  259. package/lib/engine/prompt.js +131 -0
  260. package/lib/engine/property-recovery.d.ts +50 -0
  261. package/lib/engine/property-recovery.js +171 -0
  262. package/lib/engine/repair.d.ts +33 -0
  263. package/lib/engine/repair.js +82 -0
  264. package/lib/engine/result.d.ts +9 -0
  265. package/lib/engine/result.js +194 -0
  266. package/lib/engine/reuse.d.ts +80 -0
  267. package/lib/engine/reuse.js +102 -0
  268. package/lib/engine/runner.d.ts +360 -0
  269. package/lib/engine/runner.js +1844 -0
  270. package/lib/engine/standalone.d.ts +6 -0
  271. package/lib/engine/standalone.js +48 -0
  272. package/lib/engine/usage.d.ts +87 -0
  273. package/lib/engine/usage.js +165 -0
  274. package/lib/environment/isolation.d.ts +110 -0
  275. package/lib/environment/isolation.js +238 -0
  276. package/lib/environment/lifecycle.d.ts +40 -0
  277. package/lib/environment/lifecycle.js +197 -0
  278. package/lib/environment/live-calls.d.ts +14 -0
  279. package/lib/environment/live-calls.js +73 -0
  280. package/lib/environment/os-tools.d.ts +16 -0
  281. package/lib/environment/os-tools.js +35 -0
  282. package/lib/environment/process.d.ts +40 -0
  283. package/lib/environment/process.js +375 -0
  284. package/lib/environment/redaction.d.ts +22 -0
  285. package/lib/environment/redaction.js +102 -0
  286. package/lib/environment/resources.d.ts +31 -0
  287. package/lib/environment/resources.js +120 -0
  288. package/lib/explain/diagnose.d.ts +25 -0
  289. package/lib/explain/diagnose.js +60 -0
  290. package/lib/explain/state.d.ts +18 -0
  291. package/lib/explain/state.js +305 -0
  292. package/lib/index.d.ts +72 -0
  293. package/lib/index.js +74 -0
  294. package/lib/init/policy.d.ts +40 -0
  295. package/lib/init/policy.js +73 -0
  296. package/lib/init/project.d.ts +52 -0
  297. package/lib/init/project.js +412 -0
  298. package/lib/integrations/connector/commands.d.ts +358 -0
  299. package/lib/integrations/connector/commands.js +428 -0
  300. package/lib/integrations/connector/config.d.ts +215 -0
  301. package/lib/integrations/connector/config.js +214 -0
  302. package/lib/integrations/connector/delivery.d.ts +107 -0
  303. package/lib/integrations/connector/delivery.js +591 -0
  304. package/lib/integrations/connector/fake.d.ts +291 -0
  305. package/lib/integrations/connector/fake.js +786 -0
  306. package/lib/integrations/connector/history.d.ts +124 -0
  307. package/lib/integrations/connector/history.js +497 -0
  308. package/lib/integrations/connector/index.d.ts +16 -0
  309. package/lib/integrations/connector/index.js +16 -0
  310. package/lib/integrations/connector/redact.d.ts +19 -0
  311. package/lib/integrations/connector/redact.js +91 -0
  312. package/lib/integrations/connector/registry.d.ts +15 -0
  313. package/lib/integrations/connector/registry.js +43 -0
  314. package/lib/integrations/connector/snapshot.d.ts +131 -0
  315. package/lib/integrations/connector/snapshot.js +422 -0
  316. package/lib/integrations/connector/source.d.ts +37 -0
  317. package/lib/integrations/connector/source.js +73 -0
  318. package/lib/integrations/connector/steps.d.ts +71 -0
  319. package/lib/integrations/connector/steps.js +188 -0
  320. package/lib/integrations/connector/store.d.ts +140 -0
  321. package/lib/integrations/connector/store.js +277 -0
  322. package/lib/integrations/connector/summary.d.ts +38 -0
  323. package/lib/integrations/connector/summary.js +59 -0
  324. package/lib/integrations/connector/testing-worker.d.ts +1 -0
  325. package/lib/integrations/connector/testing-worker.js +81 -0
  326. package/lib/integrations/connector/testing.d.ts +205 -0
  327. package/lib/integrations/connector/testing.js +1615 -0
  328. package/lib/integrations/connector/transport.d.ts +240 -0
  329. package/lib/integrations/connector/transport.js +28 -0
  330. package/lib/integrations/memory/context.d.ts +120 -0
  331. package/lib/integrations/memory/context.js +239 -0
  332. package/lib/integrations/memory/index.d.ts +8 -0
  333. package/lib/integrations/memory/index.js +8 -0
  334. package/lib/integrations/memory/provider.d.ts +79 -0
  335. package/lib/integrations/memory/provider.js +22 -0
  336. package/lib/integrations/memory/sink.d.ts +56 -0
  337. package/lib/integrations/memory/sink.js +116 -0
  338. package/lib/integrations/memory/testing.d.ts +44 -0
  339. package/lib/integrations/memory/testing.js +61 -0
  340. package/lib/integrations/relay-v1/index.d.ts +122 -0
  341. package/lib/integrations/relay-v1/index.js +860 -0
  342. package/lib/integrations/relay-v2/index.d.ts +145 -0
  343. package/lib/integrations/relay-v2/index.js +752 -0
  344. package/lib/integrations/relay-v2/process.d.ts +32 -0
  345. package/lib/integrations/relay-v2/process.js +112 -0
  346. package/lib/integrations/relay-v2/protocol.d.ts +172 -0
  347. package/lib/integrations/relay-v2/protocol.js +142 -0
  348. package/lib/package.d.ts +2 -0
  349. package/lib/package.js +3 -0
  350. package/lib/planning/check.d.ts +26 -0
  351. package/lib/planning/check.js +174 -0
  352. package/lib/planning/facts.d.ts +13 -0
  353. package/lib/planning/facts.js +47 -0
  354. package/lib/planning/graph.d.ts +20 -0
  355. package/lib/planning/graph.js +114 -0
  356. package/lib/planning/index.d.ts +6 -0
  357. package/lib/planning/index.js +6 -0
  358. package/lib/planning/issues.d.ts +19 -0
  359. package/lib/planning/issues.js +210 -0
  360. package/lib/planning/request.d.ts +19 -0
  361. package/lib/planning/request.js +57 -0
  362. package/lib/planning/standalone.d.ts +16 -0
  363. package/lib/planning/standalone.js +19 -0
  364. package/lib/planning/stub.d.ts +2 -0
  365. package/lib/planning/stub.js +5 -0
  366. package/lib/profiles/resolve.d.ts +266 -0
  367. package/lib/profiles/resolve.js +322 -0
  368. package/lib/projections/chain.d.ts +35 -0
  369. package/lib/projections/chain.js +72 -0
  370. package/lib/projections/clip.d.ts +6 -0
  371. package/lib/projections/clip.js +23 -0
  372. package/lib/projections/enums.d.ts +7 -0
  373. package/lib/projections/enums.js +19 -0
  374. package/lib/projections/index.d.ts +8 -0
  375. package/lib/projections/index.js +9 -0
  376. package/lib/projections/next.d.ts +28 -0
  377. package/lib/projections/next.js +75 -0
  378. package/lib/projections/progress.d.ts +27 -0
  379. package/lib/projections/progress.js +37 -0
  380. package/lib/projections/queue.d.ts +21 -0
  381. package/lib/projections/queue.js +18 -0
  382. package/lib/projections/stop.d.ts +98 -0
  383. package/lib/projections/stop.js +532 -0
  384. package/lib/setup/files.d.ts +45 -0
  385. package/lib/setup/files.js +280 -0
  386. package/lib/storage/document.d.ts +1286 -0
  387. package/lib/storage/document.js +80 -0
  388. package/lib/storage/sqlite.d.ts +35 -0
  389. package/lib/storage/sqlite.js +260 -0
  390. package/lib/testing/index.d.ts +5 -0
  391. package/lib/testing/index.js +5 -0
  392. package/lib/testing/store-contract.d.ts +8 -0
  393. package/lib/testing/store-contract.js +167 -0
  394. package/lib/toolchains/index.d.ts +9 -0
  395. package/lib/toolchains/index.js +9 -0
  396. package/lib/toolchains/inspect.d.ts +105 -0
  397. package/lib/toolchains/inspect.js +831 -0
  398. package/lib/toolchains/manifests.d.ts +67 -0
  399. package/lib/toolchains/manifests.js +238 -0
  400. package/lib/toolchains/probe.d.ts +28 -0
  401. package/lib/toolchains/probe.js +54 -0
  402. package/lib/toolchains/recipes.d.ts +33 -0
  403. package/lib/toolchains/recipes.js +51 -0
  404. package/lib/validate.d.ts +37 -0
  405. package/lib/validate.js +182 -0
  406. package/lib/verification/acceptance.d.ts +284 -0
  407. package/lib/verification/acceptance.js +670 -0
  408. package/lib/verification/checks.d.ts +72 -0
  409. package/lib/verification/checks.js +190 -0
  410. package/lib/verification/confirm.d.ts +125 -0
  411. package/lib/verification/confirm.js +411 -0
  412. package/lib/verification/corpus.d.ts +1303 -0
  413. package/lib/verification/corpus.js +744 -0
  414. package/lib/verification/dependencies.d.ts +66 -0
  415. package/lib/verification/dependencies.js +144 -0
  416. package/lib/verification/gates.d.ts +182 -0
  417. package/lib/verification/gates.js +641 -0
  418. package/lib/verification/joint.d.ts +63 -0
  419. package/lib/verification/joint.js +121 -0
  420. package/lib/verification/proof.d.ts +54 -0
  421. package/lib/verification/proof.js +96 -0
  422. package/lib/verification/property.d.ts +86 -0
  423. package/lib/verification/property.js +214 -0
  424. package/lib/verification/requirements.d.ts +25 -0
  425. package/lib/verification/requirements.js +69 -0
  426. package/lib/verification/self-check.d.ts +29 -0
  427. package/lib/verification/self-check.js +99 -0
  428. package/lib/verification/spike.d.ts +79 -0
  429. package/lib/verification/spike.js +124 -0
  430. package/package.json +104 -4
  431. package/profiles/expo-mobile.json +15 -0
  432. package/profiles/go-api.json +15 -0
  433. package/profiles/go-gotestsum.json +21 -0
  434. package/profiles/mobile-maestro.json +29 -0
  435. package/profiles/nest-api.json +26 -0
  436. package/profiles/next-product.json +72 -0
  437. package/profiles/node-checks.json +77 -0
  438. package/profiles/npm-ci.json +22 -0
  439. package/profiles/pnpm-frozen.json +24 -0
  440. package/profiles/python-api.json +32 -0
  441. package/profiles/python-uv.json +26 -0
  442. package/profiles/react-native.json +50 -0
  443. package/profiles/react-vite-admin.json +71 -0
  444. package/schemas/context-snapshot.schema.json +231 -0
  445. package/schemas/contract-document.schema.json +385 -0
  446. package/schemas/execution-document.schema.json +3881 -0
  447. package/schemas/execution-policy.schema.json +2196 -0
  448. package/schemas/joint-verification.schema.json +617 -0
  449. package/schemas/plan-draft.schema.json +217 -0
  450. package/schemas/project-manifest.schema.json +167 -0
  451. package/schemas/result-envelope.schema.json +1654 -0
  452. package/schemas/review-record.schema.json +177 -0
  453. package/schemas/run-event.schema.json +2458 -0
  454. package/schemas/run-result.schema.json +1572 -0
  455. package/schemas/stack-profile.schema.json +535 -0
  456. package/schemas/stop-diagnosis.schema.json +169 -0
  457. package/schemas/work-graph.schema.json +381 -0
  458. package/schemas/work-order.schema.json +256 -0
  459. package/skills/harness/SKILL.md +247 -0
  460. package/skills/harness-setup/SKILL.md +356 -0
  461. package/templates/AGENTS.md +13 -0
  462. package/templates/controller-mode/AGENTS.controller.md +58 -0
  463. package/templates/controller-mode/README.md +44 -0
  464. package/templates/graph.json +22 -0
  465. package/templates/plan-draft.json +35 -0
  466. package/templates/policy.json +28 -0
@@ -0,0 +1,1286 @@
1
+ import { type AttemptState, type ControlState, type ControllerLease, type ExecutionDocument, type GraphState, type JointVerificationState, type WorkState } from '../contracts/index.ts';
2
+ /**
3
+ * Пустой документ: очередь ещё не запускалась — пауза без причины. Причина
4
+ * появляется только у решения (оператор, штатная остановка, отказ, операция):
5
+ * так первый запуск отличим от паузы, которую поставил человек.
6
+ */
7
+ export declare const emptyDocument: () => ExecutionDocument;
8
+ /** Чтение и запись записей модели поверх документа — общая часть адаптеров хранилища. */
9
+ export declare class DocumentView {
10
+ readonly doc: ExecutionDocument;
11
+ constructor(doc: ExecutionDocument);
12
+ control(): ControlState;
13
+ controller(): ControllerLease | undefined;
14
+ graph(id: string): {
15
+ id: string;
16
+ digest: string;
17
+ graph: {
18
+ apiVersion: "devcontour-harness/v1alpha1";
19
+ id: string;
20
+ source: {
21
+ connector: string;
22
+ ref: string;
23
+ revision: string;
24
+ };
25
+ orders: {
26
+ apiVersion: "devcontour-harness/v1alpha1";
27
+ id: string;
28
+ source: {
29
+ connector: string;
30
+ ref: string;
31
+ revision: string;
32
+ };
33
+ title: string;
34
+ goal: string;
35
+ acceptance: string[];
36
+ role: string;
37
+ repositoryId: string;
38
+ relatedRepositories: string[];
39
+ writeScope: string[];
40
+ dependsOn: string[];
41
+ requirements: {
42
+ id: string;
43
+ source: string;
44
+ digest: string;
45
+ text: string;
46
+ gate: string;
47
+ scenario: string;
48
+ testId?: string | undefined;
49
+ }[];
50
+ contracts: {
51
+ id: string;
52
+ digest: string;
53
+ }[];
54
+ context: string[];
55
+ gates?: string[] | undefined;
56
+ consumers?: {
57
+ repositoryId: string;
58
+ gates: string[];
59
+ }[] | undefined;
60
+ properties?: string[] | undefined;
61
+ resources?: string[] | undefined;
62
+ }[];
63
+ prerequisites: {
64
+ id: string;
65
+ repositoryId: string;
66
+ resultSha: string;
67
+ receipt: {
68
+ kind: "engine";
69
+ runId: string;
70
+ } | {
71
+ kind: "trusted";
72
+ issuer: string;
73
+ digest: string;
74
+ };
75
+ }[];
76
+ };
77
+ policyDigest: string;
78
+ registeredAt: string;
79
+ approval?: {
80
+ actor: "agent" | "operator";
81
+ at: string;
82
+ authorRuntime?: "codex" | "claude" | "fixture" | undefined;
83
+ reviewerRuntime?: "codex" | "claude" | "fixture" | undefined;
84
+ artifact?: string | undefined;
85
+ digest?: string | undefined;
86
+ context?: {
87
+ digest: string | null;
88
+ } | undefined;
89
+ } | undefined;
90
+ } | undefined;
91
+ graphs(): {
92
+ id: string;
93
+ digest: string;
94
+ graph: {
95
+ apiVersion: "devcontour-harness/v1alpha1";
96
+ id: string;
97
+ source: {
98
+ connector: string;
99
+ ref: string;
100
+ revision: string;
101
+ };
102
+ orders: {
103
+ apiVersion: "devcontour-harness/v1alpha1";
104
+ id: string;
105
+ source: {
106
+ connector: string;
107
+ ref: string;
108
+ revision: string;
109
+ };
110
+ title: string;
111
+ goal: string;
112
+ acceptance: string[];
113
+ role: string;
114
+ repositoryId: string;
115
+ relatedRepositories: string[];
116
+ writeScope: string[];
117
+ dependsOn: string[];
118
+ requirements: {
119
+ id: string;
120
+ source: string;
121
+ digest: string;
122
+ text: string;
123
+ gate: string;
124
+ scenario: string;
125
+ testId?: string | undefined;
126
+ }[];
127
+ contracts: {
128
+ id: string;
129
+ digest: string;
130
+ }[];
131
+ context: string[];
132
+ gates?: string[] | undefined;
133
+ consumers?: {
134
+ repositoryId: string;
135
+ gates: string[];
136
+ }[] | undefined;
137
+ properties?: string[] | undefined;
138
+ resources?: string[] | undefined;
139
+ }[];
140
+ prerequisites: {
141
+ id: string;
142
+ repositoryId: string;
143
+ resultSha: string;
144
+ receipt: {
145
+ kind: "engine";
146
+ runId: string;
147
+ } | {
148
+ kind: "trusted";
149
+ issuer: string;
150
+ digest: string;
151
+ };
152
+ }[];
153
+ };
154
+ policyDigest: string;
155
+ registeredAt: string;
156
+ approval?: {
157
+ actor: "agent" | "operator";
158
+ at: string;
159
+ authorRuntime?: "codex" | "claude" | "fixture" | undefined;
160
+ reviewerRuntime?: "codex" | "claude" | "fixture" | undefined;
161
+ artifact?: string | undefined;
162
+ digest?: string | undefined;
163
+ context?: {
164
+ digest: string | null;
165
+ } | undefined;
166
+ } | undefined;
167
+ }[];
168
+ work(id: string): {
169
+ id: string;
170
+ graphId: string;
171
+ order: {
172
+ apiVersion: "devcontour-harness/v1alpha1";
173
+ id: string;
174
+ source: {
175
+ connector: string;
176
+ ref: string;
177
+ revision: string;
178
+ };
179
+ title: string;
180
+ goal: string;
181
+ acceptance: string[];
182
+ role: string;
183
+ repositoryId: string;
184
+ relatedRepositories: string[];
185
+ writeScope: string[];
186
+ dependsOn: string[];
187
+ requirements: {
188
+ id: string;
189
+ source: string;
190
+ digest: string;
191
+ text: string;
192
+ gate: string;
193
+ scenario: string;
194
+ testId?: string | undefined;
195
+ }[];
196
+ contracts: {
197
+ id: string;
198
+ digest: string;
199
+ }[];
200
+ context: string[];
201
+ gates?: string[] | undefined;
202
+ consumers?: {
203
+ repositoryId: string;
204
+ gates: string[];
205
+ }[] | undefined;
206
+ properties?: string[] | undefined;
207
+ resources?: string[] | undefined;
208
+ };
209
+ status: "ready" | "failed" | "cancelled" | "draft" | "running" | "verifying" | "reviewing" | "integrating" | "done";
210
+ attempt: number;
211
+ activeRunId?: string | undefined;
212
+ resultSha?: string | undefined;
213
+ failure?: string | undefined;
214
+ failureKind?: "gate" | "unknown" | "review" | "environment" | "cancelled" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "scope-violation" | "review-protocol" | "merge" | "budget" | undefined;
215
+ failureFingerprint?: string | undefined;
216
+ approvedAt?: string | undefined;
217
+ approvedDigest?: string | undefined;
218
+ approvedScope?: string | undefined;
219
+ approval?: {
220
+ actor: "agent" | "operator";
221
+ authorRuntime?: "codex" | "claude" | "fixture" | undefined;
222
+ reviewerRuntime?: "codex" | "claude" | "fixture" | undefined;
223
+ artifact?: string | undefined;
224
+ digest?: string | undefined;
225
+ context?: {
226
+ digest: string | null;
227
+ } | undefined;
228
+ } | undefined;
229
+ hold?: {
230
+ operation: string;
231
+ reason: string;
232
+ } | undefined;
233
+ budgetBlock?: {
234
+ reason: string;
235
+ at: string;
236
+ } | undefined;
237
+ checkVersion?: {
238
+ suite: string;
239
+ number: number;
240
+ digest: string;
241
+ } | undefined;
242
+ recovery?: {
243
+ id: string;
244
+ property: string;
245
+ basis: string;
246
+ runs: string[];
247
+ openedAt: string;
248
+ status: "closed" | "stopped" | "awaiting-lead" | "analyzing" | "applying" | "retry" | "retrying" | "awaiting-user";
249
+ calls: number;
250
+ history: {
251
+ at: string;
252
+ event: string;
253
+ detail?: string | undefined;
254
+ }[];
255
+ version: number;
256
+ decision?: {
257
+ action: "environment" | "add-cases" | "new-approach" | "strengthen-checker" | "split-task" | "clarify-obligation";
258
+ reason: string;
259
+ evidence: string[];
260
+ source: {
261
+ kind: "operator" | "lead";
262
+ runtime?: string | undefined;
263
+ model?: string | undefined;
264
+ };
265
+ decidedAt: string;
266
+ hypothesis?: string | undefined;
267
+ plan?: string | undefined;
268
+ cases?: {
269
+ input: string;
270
+ expected?: string | null | undefined;
271
+ }[] | undefined;
272
+ proposal?: string | undefined;
273
+ conflict?: string | undefined;
274
+ } | undefined;
275
+ retryRun?: string | undefined;
276
+ reason?: string | undefined;
277
+ } | undefined;
278
+ recoveryHistory?: {
279
+ id: string;
280
+ property: string;
281
+ basis: string;
282
+ runs: string[];
283
+ openedAt: string;
284
+ status: "closed" | "stopped" | "awaiting-lead" | "analyzing" | "applying" | "retry" | "retrying" | "awaiting-user";
285
+ calls: number;
286
+ history: {
287
+ at: string;
288
+ event: string;
289
+ detail?: string | undefined;
290
+ }[];
291
+ version: number;
292
+ decision?: {
293
+ action: "environment" | "add-cases" | "new-approach" | "strengthen-checker" | "split-task" | "clarify-obligation";
294
+ reason: string;
295
+ evidence: string[];
296
+ source: {
297
+ kind: "operator" | "lead";
298
+ runtime?: string | undefined;
299
+ model?: string | undefined;
300
+ };
301
+ decidedAt: string;
302
+ hypothesis?: string | undefined;
303
+ plan?: string | undefined;
304
+ cases?: {
305
+ input: string;
306
+ expected?: string | null | undefined;
307
+ }[] | undefined;
308
+ proposal?: string | undefined;
309
+ conflict?: string | undefined;
310
+ } | undefined;
311
+ retryRun?: string | undefined;
312
+ reason?: string | undefined;
313
+ }[] | undefined;
314
+ } | undefined;
315
+ works(graphId?: string): {
316
+ id: string;
317
+ graphId: string;
318
+ order: {
319
+ apiVersion: "devcontour-harness/v1alpha1";
320
+ id: string;
321
+ source: {
322
+ connector: string;
323
+ ref: string;
324
+ revision: string;
325
+ };
326
+ title: string;
327
+ goal: string;
328
+ acceptance: string[];
329
+ role: string;
330
+ repositoryId: string;
331
+ relatedRepositories: string[];
332
+ writeScope: string[];
333
+ dependsOn: string[];
334
+ requirements: {
335
+ id: string;
336
+ source: string;
337
+ digest: string;
338
+ text: string;
339
+ gate: string;
340
+ scenario: string;
341
+ testId?: string | undefined;
342
+ }[];
343
+ contracts: {
344
+ id: string;
345
+ digest: string;
346
+ }[];
347
+ context: string[];
348
+ gates?: string[] | undefined;
349
+ consumers?: {
350
+ repositoryId: string;
351
+ gates: string[];
352
+ }[] | undefined;
353
+ properties?: string[] | undefined;
354
+ resources?: string[] | undefined;
355
+ };
356
+ status: "ready" | "failed" | "cancelled" | "draft" | "running" | "verifying" | "reviewing" | "integrating" | "done";
357
+ attempt: number;
358
+ activeRunId?: string | undefined;
359
+ resultSha?: string | undefined;
360
+ failure?: string | undefined;
361
+ failureKind?: "gate" | "unknown" | "review" | "environment" | "cancelled" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "scope-violation" | "review-protocol" | "merge" | "budget" | undefined;
362
+ failureFingerprint?: string | undefined;
363
+ approvedAt?: string | undefined;
364
+ approvedDigest?: string | undefined;
365
+ approvedScope?: string | undefined;
366
+ approval?: {
367
+ actor: "agent" | "operator";
368
+ authorRuntime?: "codex" | "claude" | "fixture" | undefined;
369
+ reviewerRuntime?: "codex" | "claude" | "fixture" | undefined;
370
+ artifact?: string | undefined;
371
+ digest?: string | undefined;
372
+ context?: {
373
+ digest: string | null;
374
+ } | undefined;
375
+ } | undefined;
376
+ hold?: {
377
+ operation: string;
378
+ reason: string;
379
+ } | undefined;
380
+ budgetBlock?: {
381
+ reason: string;
382
+ at: string;
383
+ } | undefined;
384
+ checkVersion?: {
385
+ suite: string;
386
+ number: number;
387
+ digest: string;
388
+ } | undefined;
389
+ recovery?: {
390
+ id: string;
391
+ property: string;
392
+ basis: string;
393
+ runs: string[];
394
+ openedAt: string;
395
+ status: "closed" | "stopped" | "awaiting-lead" | "analyzing" | "applying" | "retry" | "retrying" | "awaiting-user";
396
+ calls: number;
397
+ history: {
398
+ at: string;
399
+ event: string;
400
+ detail?: string | undefined;
401
+ }[];
402
+ version: number;
403
+ decision?: {
404
+ action: "environment" | "add-cases" | "new-approach" | "strengthen-checker" | "split-task" | "clarify-obligation";
405
+ reason: string;
406
+ evidence: string[];
407
+ source: {
408
+ kind: "operator" | "lead";
409
+ runtime?: string | undefined;
410
+ model?: string | undefined;
411
+ };
412
+ decidedAt: string;
413
+ hypothesis?: string | undefined;
414
+ plan?: string | undefined;
415
+ cases?: {
416
+ input: string;
417
+ expected?: string | null | undefined;
418
+ }[] | undefined;
419
+ proposal?: string | undefined;
420
+ conflict?: string | undefined;
421
+ } | undefined;
422
+ retryRun?: string | undefined;
423
+ reason?: string | undefined;
424
+ } | undefined;
425
+ recoveryHistory?: {
426
+ id: string;
427
+ property: string;
428
+ basis: string;
429
+ runs: string[];
430
+ openedAt: string;
431
+ status: "closed" | "stopped" | "awaiting-lead" | "analyzing" | "applying" | "retry" | "retrying" | "awaiting-user";
432
+ calls: number;
433
+ history: {
434
+ at: string;
435
+ event: string;
436
+ detail?: string | undefined;
437
+ }[];
438
+ version: number;
439
+ decision?: {
440
+ action: "environment" | "add-cases" | "new-approach" | "strengthen-checker" | "split-task" | "clarify-obligation";
441
+ reason: string;
442
+ evidence: string[];
443
+ source: {
444
+ kind: "operator" | "lead";
445
+ runtime?: string | undefined;
446
+ model?: string | undefined;
447
+ };
448
+ decidedAt: string;
449
+ hypothesis?: string | undefined;
450
+ plan?: string | undefined;
451
+ cases?: {
452
+ input: string;
453
+ expected?: string | null | undefined;
454
+ }[] | undefined;
455
+ proposal?: string | undefined;
456
+ conflict?: string | undefined;
457
+ } | undefined;
458
+ retryRun?: string | undefined;
459
+ reason?: string | undefined;
460
+ }[] | undefined;
461
+ }[];
462
+ attempt(id: string): {
463
+ id: string;
464
+ workId: string;
465
+ repositoryId: string;
466
+ attempt: number;
467
+ token: string;
468
+ owner: string;
469
+ runtime: "codex" | "claude" | "fixture";
470
+ reviewer: "codex" | "claude" | "fixture";
471
+ policyDigest: string;
472
+ status: "failed" | "cancelled" | "active" | "expired" | "succeeded";
473
+ phase: "ready" | "failed" | "cancelled" | "draft" | "running" | "verifying" | "reviewing" | "integrating" | "done";
474
+ startedAt: string;
475
+ leaseUntil: number;
476
+ evidence: {
477
+ id: string;
478
+ runId: string;
479
+ kind: "test" | "review";
480
+ phase: "candidate" | "integration";
481
+ sha: string;
482
+ gate: string;
483
+ passed: boolean;
484
+ createdAt: string;
485
+ command: string[];
486
+ exitCode: number;
487
+ log: string;
488
+ digest: string;
489
+ summary: string;
490
+ consumer?: string | undefined;
491
+ inspection?: {
492
+ mode: "commands" | "diff-only";
493
+ source: "codex-events" | "unavailable" | "controller-probes" | "runtime-and-controller";
494
+ commands: {
495
+ command: string;
496
+ exitCode: number | null;
497
+ output: string;
498
+ origins?: ({
499
+ type: "runtime";
500
+ runtime: string;
501
+ item: string | null;
502
+ } | {
503
+ type: "controller";
504
+ runId: string;
505
+ })[] | undefined;
506
+ status?: "error" | "passed" | "failed" | "cancelled" | "completed" | "timeout" | undefined;
507
+ failure?: "report" | "environment" | undefined;
508
+ gate?: string | undefined;
509
+ note?: string | undefined;
510
+ }[];
511
+ reason: string | null;
512
+ context?: {
513
+ attempt: string;
514
+ phase: "candidate" | "integration";
515
+ sha: string;
516
+ call: number;
517
+ } | undefined;
518
+ total?: number | undefined;
519
+ excluded?: {
520
+ runId: string;
521
+ status: string | null;
522
+ reason: "not-started" | "legacy-unconfirmed" | "foreign-scope" | "unknown-status" | "unfinished" | "abandoned";
523
+ }[] | undefined;
524
+ excludedTotal?: number | undefined;
525
+ invalid?: number | undefined;
526
+ } | undefined;
527
+ findings?: {
528
+ severity: string;
529
+ message: string;
530
+ path?: string | null | undefined;
531
+ line?: number | null | undefined;
532
+ id?: string | undefined;
533
+ status?: "open" | "closed" | "withdrawn" | undefined;
534
+ }[] | undefined;
535
+ reviewRound?: {
536
+ version: 1;
537
+ scope: string;
538
+ round: number;
539
+ call: number;
540
+ calls: number;
541
+ protocol: "valid" | "invalid" | "unsafe";
542
+ expected: string[];
543
+ issues?: {
544
+ path: string;
545
+ reason: "unknown" | "missing" | "schema" | "duplicate" | "not-open" | "approved-with-blocking";
546
+ message: string;
547
+ }[] | undefined;
548
+ transitions?: {
549
+ id: string;
550
+ from: "open" | "closed" | "withdrawn";
551
+ to: "open" | "closed" | "withdrawn";
552
+ basis: string;
553
+ }[] | undefined;
554
+ spec?: string | undefined;
555
+ mode?: "legacy" | "strict" | undefined;
556
+ } | undefined;
557
+ tests?: {
558
+ id: string;
559
+ status: "passed" | "failed" | "skipped";
560
+ opaque?: true | undefined;
561
+ }[] | undefined;
562
+ testsTruncated?: boolean | undefined;
563
+ property?: {
564
+ seed: number;
565
+ reproduce: string;
566
+ contracts: Record<string, string>;
567
+ artifacts: {
568
+ path: string;
569
+ blob: string;
570
+ }[];
571
+ report?: {
572
+ version: 1;
573
+ properties: {
574
+ testId: string;
575
+ status: "passed" | "failed" | "running";
576
+ cases: number;
577
+ families?: Record<string, number> | undefined;
578
+ error?: string | undefined;
579
+ current?: unknown;
580
+ counterexample?: {
581
+ original: unknown;
582
+ reduced?: unknown;
583
+ expected?: unknown;
584
+ actual?: unknown;
585
+ reductionTimedOut?: boolean | undefined;
586
+ case?: string | undefined;
587
+ } | undefined;
588
+ }[];
589
+ seed?: number | undefined;
590
+ corpus?: {
591
+ digest: string;
592
+ executed: number;
593
+ passed: number;
594
+ witness: string;
595
+ failed: {
596
+ id: string;
597
+ property: string;
598
+ expected?: unknown;
599
+ actual?: unknown;
600
+ }[];
601
+ } | undefined;
602
+ } | undefined;
603
+ problem?: string | undefined;
604
+ level?: "manifest" | "legacy" | undefined;
605
+ manifest?: {
606
+ digest: string;
607
+ properties: string[];
608
+ corpus?: {
609
+ digest: string;
610
+ cases: number;
611
+ } | undefined;
612
+ } | undefined;
613
+ coverage?: string[] | undefined;
614
+ } | undefined;
615
+ checks?: string | undefined;
616
+ }[];
617
+ model?: string | undefined;
618
+ reviewerModel?: string | undefined;
619
+ effort?: string | undefined;
620
+ reviewerEffort?: string | undefined;
621
+ finishedAt?: string | undefined;
622
+ worktree?: string | undefined;
623
+ baseSha?: string | undefined;
624
+ candidateSha?: string | undefined;
625
+ integrationSha?: string | undefined;
626
+ error?: string | undefined;
627
+ blocked?: boolean | undefined;
628
+ failureKind?: "gate" | "unknown" | "review" | "environment" | "cancelled" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "scope-violation" | "review-protocol" | "merge" | "budget" | undefined;
629
+ failureFingerprint?: string | undefined;
630
+ requiredGates?: string[] | undefined;
631
+ consumers?: {
632
+ repositoryId: string;
633
+ gates: string[];
634
+ checked?: {
635
+ sha: string;
636
+ tree: string;
637
+ dependencies: {
638
+ repositoryId: string;
639
+ sha: string;
640
+ tree: string;
641
+ artifacts: {
642
+ path: string;
643
+ digest: string;
644
+ }[];
645
+ }[];
646
+ freshness?: {
647
+ repositoryId: string;
648
+ snapshot: string;
649
+ head: string;
650
+ fresh: boolean;
651
+ }[] | undefined;
652
+ observedAt?: string | undefined;
653
+ } | undefined;
654
+ }[] | undefined;
655
+ checks?: {
656
+ effective: string;
657
+ corpus?: {
658
+ suite: string;
659
+ number: number;
660
+ digest: string;
661
+ } | undefined;
662
+ } | undefined;
663
+ context?: {
664
+ id: string;
665
+ version: string;
666
+ repositoryId: string;
667
+ revision: string;
668
+ digest: string;
669
+ }[] | undefined;
670
+ contextSnapshot?: string | undefined;
671
+ resources?: {
672
+ id: string;
673
+ kind: "device" | "port" | "account" | "service";
674
+ value: string;
675
+ }[] | undefined;
676
+ dependencies?: {
677
+ repositoryId: string;
678
+ sha: string;
679
+ tree: string;
680
+ path: string;
681
+ artifacts: {
682
+ path: string;
683
+ digest: string;
684
+ }[];
685
+ }[] | undefined;
686
+ dependencyFreshness?: {
687
+ repositoryId: string;
688
+ snapshot: string;
689
+ head: string;
690
+ fresh: boolean;
691
+ }[] | undefined;
692
+ properties?: string[] | undefined;
693
+ unboundProperties?: string[] | undefined;
694
+ episodeBasis?: string | undefined;
695
+ implementationBasis?: string | undefined;
696
+ reusedFrom?: {
697
+ runId: string;
698
+ candidateSha: string;
699
+ } | undefined;
700
+ partial?: {
701
+ patch: string;
702
+ digest: string;
703
+ files: string[];
704
+ spec: string;
705
+ contracts: Record<string, string>;
706
+ } | undefined;
707
+ continuedFrom?: {
708
+ runId: string;
709
+ kind: "candidate" | "unfinished";
710
+ applied: boolean;
711
+ files: string[];
712
+ reason?: "gate" | "unknown" | "review" | "environment" | "cancelled" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "scope-violation" | "review-protocol" | "merge" | "budget" | undefined;
713
+ respecified?: boolean | undefined;
714
+ } | undefined;
715
+ callsRecorded?: true | undefined;
716
+ dispatch?: {
717
+ policy: "fifo-ready-v1";
718
+ at: string;
719
+ eligible: {
720
+ taskId: string;
721
+ attempt: number;
722
+ repositoryId?: string | undefined;
723
+ }[];
724
+ activeCount: number;
725
+ concurrency: number;
726
+ inputDigest: string;
727
+ } | undefined;
728
+ wait?: {
729
+ approvedAt?: string | undefined;
730
+ readyAt?: string | undefined;
731
+ } | undefined;
732
+ timings?: {
733
+ id: string;
734
+ stage: string;
735
+ startedAt: string;
736
+ finishedAt?: string | undefined;
737
+ outcome?: "passed" | "failed" | undefined;
738
+ }[] | undefined;
739
+ pinned?: {
740
+ graphId: string;
741
+ graphDigest: string;
742
+ orderDigest: string;
743
+ targetRef: string;
744
+ source: {
745
+ connector: string;
746
+ ref: string;
747
+ revision: string;
748
+ };
749
+ } | undefined;
750
+ engineVersion?: string | undefined;
751
+ consumerVersion?: string | undefined;
752
+ } | undefined;
753
+ attempts(workId?: string): {
754
+ id: string;
755
+ workId: string;
756
+ repositoryId: string;
757
+ attempt: number;
758
+ token: string;
759
+ owner: string;
760
+ runtime: "codex" | "claude" | "fixture";
761
+ reviewer: "codex" | "claude" | "fixture";
762
+ policyDigest: string;
763
+ status: "failed" | "cancelled" | "active" | "expired" | "succeeded";
764
+ phase: "ready" | "failed" | "cancelled" | "draft" | "running" | "verifying" | "reviewing" | "integrating" | "done";
765
+ startedAt: string;
766
+ leaseUntil: number;
767
+ evidence: {
768
+ id: string;
769
+ runId: string;
770
+ kind: "test" | "review";
771
+ phase: "candidate" | "integration";
772
+ sha: string;
773
+ gate: string;
774
+ passed: boolean;
775
+ createdAt: string;
776
+ command: string[];
777
+ exitCode: number;
778
+ log: string;
779
+ digest: string;
780
+ summary: string;
781
+ consumer?: string | undefined;
782
+ inspection?: {
783
+ mode: "commands" | "diff-only";
784
+ source: "codex-events" | "unavailable" | "controller-probes" | "runtime-and-controller";
785
+ commands: {
786
+ command: string;
787
+ exitCode: number | null;
788
+ output: string;
789
+ origins?: ({
790
+ type: "runtime";
791
+ runtime: string;
792
+ item: string | null;
793
+ } | {
794
+ type: "controller";
795
+ runId: string;
796
+ })[] | undefined;
797
+ status?: "error" | "passed" | "failed" | "cancelled" | "completed" | "timeout" | undefined;
798
+ failure?: "report" | "environment" | undefined;
799
+ gate?: string | undefined;
800
+ note?: string | undefined;
801
+ }[];
802
+ reason: string | null;
803
+ context?: {
804
+ attempt: string;
805
+ phase: "candidate" | "integration";
806
+ sha: string;
807
+ call: number;
808
+ } | undefined;
809
+ total?: number | undefined;
810
+ excluded?: {
811
+ runId: string;
812
+ status: string | null;
813
+ reason: "not-started" | "legacy-unconfirmed" | "foreign-scope" | "unknown-status" | "unfinished" | "abandoned";
814
+ }[] | undefined;
815
+ excludedTotal?: number | undefined;
816
+ invalid?: number | undefined;
817
+ } | undefined;
818
+ findings?: {
819
+ severity: string;
820
+ message: string;
821
+ path?: string | null | undefined;
822
+ line?: number | null | undefined;
823
+ id?: string | undefined;
824
+ status?: "open" | "closed" | "withdrawn" | undefined;
825
+ }[] | undefined;
826
+ reviewRound?: {
827
+ version: 1;
828
+ scope: string;
829
+ round: number;
830
+ call: number;
831
+ calls: number;
832
+ protocol: "valid" | "invalid" | "unsafe";
833
+ expected: string[];
834
+ issues?: {
835
+ path: string;
836
+ reason: "unknown" | "missing" | "schema" | "duplicate" | "not-open" | "approved-with-blocking";
837
+ message: string;
838
+ }[] | undefined;
839
+ transitions?: {
840
+ id: string;
841
+ from: "open" | "closed" | "withdrawn";
842
+ to: "open" | "closed" | "withdrawn";
843
+ basis: string;
844
+ }[] | undefined;
845
+ spec?: string | undefined;
846
+ mode?: "legacy" | "strict" | undefined;
847
+ } | undefined;
848
+ tests?: {
849
+ id: string;
850
+ status: "passed" | "failed" | "skipped";
851
+ opaque?: true | undefined;
852
+ }[] | undefined;
853
+ testsTruncated?: boolean | undefined;
854
+ property?: {
855
+ seed: number;
856
+ reproduce: string;
857
+ contracts: Record<string, string>;
858
+ artifacts: {
859
+ path: string;
860
+ blob: string;
861
+ }[];
862
+ report?: {
863
+ version: 1;
864
+ properties: {
865
+ testId: string;
866
+ status: "passed" | "failed" | "running";
867
+ cases: number;
868
+ families?: Record<string, number> | undefined;
869
+ error?: string | undefined;
870
+ current?: unknown;
871
+ counterexample?: {
872
+ original: unknown;
873
+ reduced?: unknown;
874
+ expected?: unknown;
875
+ actual?: unknown;
876
+ reductionTimedOut?: boolean | undefined;
877
+ case?: string | undefined;
878
+ } | undefined;
879
+ }[];
880
+ seed?: number | undefined;
881
+ corpus?: {
882
+ digest: string;
883
+ executed: number;
884
+ passed: number;
885
+ witness: string;
886
+ failed: {
887
+ id: string;
888
+ property: string;
889
+ expected?: unknown;
890
+ actual?: unknown;
891
+ }[];
892
+ } | undefined;
893
+ } | undefined;
894
+ problem?: string | undefined;
895
+ level?: "manifest" | "legacy" | undefined;
896
+ manifest?: {
897
+ digest: string;
898
+ properties: string[];
899
+ corpus?: {
900
+ digest: string;
901
+ cases: number;
902
+ } | undefined;
903
+ } | undefined;
904
+ coverage?: string[] | undefined;
905
+ } | undefined;
906
+ checks?: string | undefined;
907
+ }[];
908
+ model?: string | undefined;
909
+ reviewerModel?: string | undefined;
910
+ effort?: string | undefined;
911
+ reviewerEffort?: string | undefined;
912
+ finishedAt?: string | undefined;
913
+ worktree?: string | undefined;
914
+ baseSha?: string | undefined;
915
+ candidateSha?: string | undefined;
916
+ integrationSha?: string | undefined;
917
+ error?: string | undefined;
918
+ blocked?: boolean | undefined;
919
+ failureKind?: "gate" | "unknown" | "review" | "environment" | "cancelled" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "scope-violation" | "review-protocol" | "merge" | "budget" | undefined;
920
+ failureFingerprint?: string | undefined;
921
+ requiredGates?: string[] | undefined;
922
+ consumers?: {
923
+ repositoryId: string;
924
+ gates: string[];
925
+ checked?: {
926
+ sha: string;
927
+ tree: string;
928
+ dependencies: {
929
+ repositoryId: string;
930
+ sha: string;
931
+ tree: string;
932
+ artifacts: {
933
+ path: string;
934
+ digest: string;
935
+ }[];
936
+ }[];
937
+ freshness?: {
938
+ repositoryId: string;
939
+ snapshot: string;
940
+ head: string;
941
+ fresh: boolean;
942
+ }[] | undefined;
943
+ observedAt?: string | undefined;
944
+ } | undefined;
945
+ }[] | undefined;
946
+ checks?: {
947
+ effective: string;
948
+ corpus?: {
949
+ suite: string;
950
+ number: number;
951
+ digest: string;
952
+ } | undefined;
953
+ } | undefined;
954
+ context?: {
955
+ id: string;
956
+ version: string;
957
+ repositoryId: string;
958
+ revision: string;
959
+ digest: string;
960
+ }[] | undefined;
961
+ contextSnapshot?: string | undefined;
962
+ resources?: {
963
+ id: string;
964
+ kind: "device" | "port" | "account" | "service";
965
+ value: string;
966
+ }[] | undefined;
967
+ dependencies?: {
968
+ repositoryId: string;
969
+ sha: string;
970
+ tree: string;
971
+ path: string;
972
+ artifacts: {
973
+ path: string;
974
+ digest: string;
975
+ }[];
976
+ }[] | undefined;
977
+ dependencyFreshness?: {
978
+ repositoryId: string;
979
+ snapshot: string;
980
+ head: string;
981
+ fresh: boolean;
982
+ }[] | undefined;
983
+ properties?: string[] | undefined;
984
+ unboundProperties?: string[] | undefined;
985
+ episodeBasis?: string | undefined;
986
+ implementationBasis?: string | undefined;
987
+ reusedFrom?: {
988
+ runId: string;
989
+ candidateSha: string;
990
+ } | undefined;
991
+ partial?: {
992
+ patch: string;
993
+ digest: string;
994
+ files: string[];
995
+ spec: string;
996
+ contracts: Record<string, string>;
997
+ } | undefined;
998
+ continuedFrom?: {
999
+ runId: string;
1000
+ kind: "candidate" | "unfinished";
1001
+ applied: boolean;
1002
+ files: string[];
1003
+ reason?: "gate" | "unknown" | "review" | "environment" | "cancelled" | "timeout" | "provider-auth" | "stale-base" | "empty-result" | "scope-violation" | "review-protocol" | "merge" | "budget" | undefined;
1004
+ respecified?: boolean | undefined;
1005
+ } | undefined;
1006
+ callsRecorded?: true | undefined;
1007
+ dispatch?: {
1008
+ policy: "fifo-ready-v1";
1009
+ at: string;
1010
+ eligible: {
1011
+ taskId: string;
1012
+ attempt: number;
1013
+ repositoryId?: string | undefined;
1014
+ }[];
1015
+ activeCount: number;
1016
+ concurrency: number;
1017
+ inputDigest: string;
1018
+ } | undefined;
1019
+ wait?: {
1020
+ approvedAt?: string | undefined;
1021
+ readyAt?: string | undefined;
1022
+ } | undefined;
1023
+ timings?: {
1024
+ id: string;
1025
+ stage: string;
1026
+ startedAt: string;
1027
+ finishedAt?: string | undefined;
1028
+ outcome?: "passed" | "failed" | undefined;
1029
+ }[] | undefined;
1030
+ pinned?: {
1031
+ graphId: string;
1032
+ graphDigest: string;
1033
+ orderDigest: string;
1034
+ targetRef: string;
1035
+ source: {
1036
+ connector: string;
1037
+ ref: string;
1038
+ revision: string;
1039
+ };
1040
+ } | undefined;
1041
+ engineVersion?: string | undefined;
1042
+ consumerVersion?: string | undefined;
1043
+ }[];
1044
+ verification(id: string): {
1045
+ status: "active";
1046
+ apiVersion: "devcontour-harness/v1alpha1";
1047
+ id: string;
1048
+ startedAt: string;
1049
+ policyDigest: string;
1050
+ specDigest: string;
1051
+ workIds: string[];
1052
+ evidence: {
1053
+ gate: string;
1054
+ passed: boolean;
1055
+ command: string[];
1056
+ exitCode: number;
1057
+ log: string;
1058
+ digest: string;
1059
+ summary: string;
1060
+ artifacts: {
1061
+ path: string;
1062
+ digest: string;
1063
+ }[];
1064
+ durationMs?: number | undefined;
1065
+ }[];
1066
+ token: string;
1067
+ leaseUntil: number;
1068
+ manifest?: Record<string, {
1069
+ sha: string;
1070
+ tree: string;
1071
+ }> | undefined;
1072
+ manifestDigest?: string | undefined;
1073
+ impact?: {
1074
+ changed: string[];
1075
+ affected: string[];
1076
+ gateIds: string[];
1077
+ mode: "all" | "affected";
1078
+ reason: string;
1079
+ baseline?: string | undefined;
1080
+ } | undefined;
1081
+ engineVersion?: string | undefined;
1082
+ } | {
1083
+ status: "failed";
1084
+ finishedAt: string;
1085
+ error: string;
1086
+ apiVersion: "devcontour-harness/v1alpha1";
1087
+ id: string;
1088
+ startedAt: string;
1089
+ policyDigest: string;
1090
+ specDigest: string;
1091
+ workIds: string[];
1092
+ evidence: {
1093
+ gate: string;
1094
+ passed: boolean;
1095
+ command: string[];
1096
+ exitCode: number;
1097
+ log: string;
1098
+ digest: string;
1099
+ summary: string;
1100
+ artifacts: {
1101
+ path: string;
1102
+ digest: string;
1103
+ }[];
1104
+ durationMs?: number | undefined;
1105
+ }[];
1106
+ token: string;
1107
+ leaseUntil: number;
1108
+ manifest?: Record<string, {
1109
+ sha: string;
1110
+ tree: string;
1111
+ }> | undefined;
1112
+ manifestDigest?: string | undefined;
1113
+ impact?: {
1114
+ changed: string[];
1115
+ affected: string[];
1116
+ gateIds: string[];
1117
+ mode: "all" | "affected";
1118
+ reason: string;
1119
+ baseline?: string | undefined;
1120
+ } | undefined;
1121
+ engineVersion?: string | undefined;
1122
+ } | {
1123
+ status: "passed";
1124
+ finishedAt: string;
1125
+ manifest: Record<string, {
1126
+ sha: string;
1127
+ tree: string;
1128
+ }>;
1129
+ manifestDigest: string;
1130
+ apiVersion: "devcontour-harness/v1alpha1";
1131
+ id: string;
1132
+ startedAt: string;
1133
+ policyDigest: string;
1134
+ specDigest: string;
1135
+ workIds: string[];
1136
+ evidence: {
1137
+ gate: string;
1138
+ passed: boolean;
1139
+ command: string[];
1140
+ exitCode: number;
1141
+ log: string;
1142
+ digest: string;
1143
+ summary: string;
1144
+ artifacts: {
1145
+ path: string;
1146
+ digest: string;
1147
+ }[];
1148
+ durationMs?: number | undefined;
1149
+ }[];
1150
+ token: string;
1151
+ leaseUntil: number;
1152
+ impact?: {
1153
+ changed: string[];
1154
+ affected: string[];
1155
+ gateIds: string[];
1156
+ mode: "all" | "affected";
1157
+ reason: string;
1158
+ baseline?: string | undefined;
1159
+ } | undefined;
1160
+ engineVersion?: string | undefined;
1161
+ } | undefined;
1162
+ verifications(): ({
1163
+ status: "active";
1164
+ apiVersion: "devcontour-harness/v1alpha1";
1165
+ id: string;
1166
+ startedAt: string;
1167
+ policyDigest: string;
1168
+ specDigest: string;
1169
+ workIds: string[];
1170
+ evidence: {
1171
+ gate: string;
1172
+ passed: boolean;
1173
+ command: string[];
1174
+ exitCode: number;
1175
+ log: string;
1176
+ digest: string;
1177
+ summary: string;
1178
+ artifacts: {
1179
+ path: string;
1180
+ digest: string;
1181
+ }[];
1182
+ durationMs?: number | undefined;
1183
+ }[];
1184
+ token: string;
1185
+ leaseUntil: number;
1186
+ manifest?: Record<string, {
1187
+ sha: string;
1188
+ tree: string;
1189
+ }> | undefined;
1190
+ manifestDigest?: string | undefined;
1191
+ impact?: {
1192
+ changed: string[];
1193
+ affected: string[];
1194
+ gateIds: string[];
1195
+ mode: "all" | "affected";
1196
+ reason: string;
1197
+ baseline?: string | undefined;
1198
+ } | undefined;
1199
+ engineVersion?: string | undefined;
1200
+ } | {
1201
+ status: "failed";
1202
+ finishedAt: string;
1203
+ error: string;
1204
+ apiVersion: "devcontour-harness/v1alpha1";
1205
+ id: string;
1206
+ startedAt: string;
1207
+ policyDigest: string;
1208
+ specDigest: string;
1209
+ workIds: string[];
1210
+ evidence: {
1211
+ gate: string;
1212
+ passed: boolean;
1213
+ command: string[];
1214
+ exitCode: number;
1215
+ log: string;
1216
+ digest: string;
1217
+ summary: string;
1218
+ artifacts: {
1219
+ path: string;
1220
+ digest: string;
1221
+ }[];
1222
+ durationMs?: number | undefined;
1223
+ }[];
1224
+ token: string;
1225
+ leaseUntil: number;
1226
+ manifest?: Record<string, {
1227
+ sha: string;
1228
+ tree: string;
1229
+ }> | undefined;
1230
+ manifestDigest?: string | undefined;
1231
+ impact?: {
1232
+ changed: string[];
1233
+ affected: string[];
1234
+ gateIds: string[];
1235
+ mode: "all" | "affected";
1236
+ reason: string;
1237
+ baseline?: string | undefined;
1238
+ } | undefined;
1239
+ engineVersion?: string | undefined;
1240
+ } | {
1241
+ status: "passed";
1242
+ finishedAt: string;
1243
+ manifest: Record<string, {
1244
+ sha: string;
1245
+ tree: string;
1246
+ }>;
1247
+ manifestDigest: string;
1248
+ apiVersion: "devcontour-harness/v1alpha1";
1249
+ id: string;
1250
+ startedAt: string;
1251
+ policyDigest: string;
1252
+ specDigest: string;
1253
+ workIds: string[];
1254
+ evidence: {
1255
+ gate: string;
1256
+ passed: boolean;
1257
+ command: string[];
1258
+ exitCode: number;
1259
+ log: string;
1260
+ digest: string;
1261
+ summary: string;
1262
+ artifacts: {
1263
+ path: string;
1264
+ digest: string;
1265
+ }[];
1266
+ durationMs?: number | undefined;
1267
+ }[];
1268
+ token: string;
1269
+ leaseUntil: number;
1270
+ impact?: {
1271
+ changed: string[];
1272
+ affected: string[];
1273
+ gateIds: string[];
1274
+ mode: "all" | "affected";
1275
+ reason: string;
1276
+ baseline?: string | undefined;
1277
+ } | undefined;
1278
+ engineVersion?: string | undefined;
1279
+ })[];
1280
+ putGraph(graph: GraphState): void;
1281
+ putWork(work: WorkState): void;
1282
+ putAttempt(attempt: AttemptState): void;
1283
+ putVerification(verification: JointVerificationState): void;
1284
+ setControl(control: ControlState): void;
1285
+ setController(lease: ControllerLease | undefined): void;
1286
+ }