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,38 @@
1
+ import type { FailureKind } from './execution.ts';
2
+ /** Отказ окружения до начала работы: попытка не засчитывается. */
3
+ export declare class BlockedError extends Error {
4
+ name: string;
5
+ }
6
+ /** Отказ с известным классом. Класс ставит тот, кто отказ обнаружил. */
7
+ export declare class TaskFailure extends Error {
8
+ readonly kind: FailureKind;
9
+ /**
10
+ * Свойства, с которыми связан отказ: `bound` — объявленные задачей
11
+ * property ID, `unbound` — названные проверкой или ревьюером, но не
12
+ * объявленные (только для разбора, счётчик эпизода они не выбирают).
13
+ */
14
+ readonly properties?: {
15
+ bound: string[];
16
+ unbound: string[];
17
+ } | undefined;
18
+ constructor(kind: FailureKind, message: string,
19
+ /**
20
+ * Свойства, с которыми связан отказ: `bound` — объявленные задачей
21
+ * property ID, `unbound` — названные проверкой или ревьюером, но не
22
+ * объявленные (только для разбора, счётчик эпизода они не выбирают).
23
+ */
24
+ properties?: {
25
+ bound: string[];
26
+ unbound: string[];
27
+ } | undefined);
28
+ }
29
+ /**
30
+ * Отпечаток отказа: одинаковые сбои должны совпадать, разные — расходиться.
31
+ *
32
+ * Из сообщения убирается всё, что меняется от попытки к попытке, — SHA, id
33
+ * прогонов, пути с временными каталогами, числа, время. Иначе два одинаковых
34
+ * провала одной проверки выглядели бы как два разных, и предел одинаковых
35
+ * повторов не сработал бы ни разу.
36
+ */
37
+ export declare function failureFingerprint(kind: FailureKind, message: string): string;
38
+ export { repairPolicy, type RepairRule } from './repair-policy.ts';
@@ -0,0 +1,53 @@
1
+ import { createHash } from 'node:crypto';
2
+ /** Отказ окружения до начала работы: попытка не засчитывается. */
3
+ export class BlockedError extends Error {
4
+ name = 'BlockedError';
5
+ }
6
+ /** Отказ с известным классом. Класс ставит тот, кто отказ обнаружил. */
7
+ export class TaskFailure extends Error {
8
+ kind;
9
+ properties;
10
+ constructor(kind, message,
11
+ /**
12
+ * Свойства, с которыми связан отказ: `bound` — объявленные задачей
13
+ * property ID, `unbound` — названные проверкой или ревьюером, но не
14
+ * объявленные (только для разбора, счётчик эпизода они не выбирают).
15
+ */
16
+ properties) {
17
+ super(message);
18
+ this.kind = kind;
19
+ this.properties = properties;
20
+ this.name = 'TaskFailure';
21
+ }
22
+ }
23
+ /**
24
+ * Отпечаток отказа: одинаковые сбои должны совпадать, разные — расходиться.
25
+ *
26
+ * Из сообщения убирается всё, что меняется от попытки к попытке, — SHA, id
27
+ * прогонов, пути с временными каталогами, числа, время. Иначе два одинаковых
28
+ * провала одной проверки выглядели бы как два разных, и предел одинаковых
29
+ * повторов не сработал бы ни разу.
30
+ */
31
+ export function failureFingerprint(kind, message) {
32
+ const normalized = message
33
+ .toLowerCase()
34
+ // UUID раньше SHA: шаблон SHA съедает его восьми- и двенадцатисимвольные
35
+ // группы, после чего целого UUID уже не видно, а середина остаётся
36
+ // случайной — и один и тот же отказ с новым request id считался разным.
37
+ .replace(/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/g, '<id>')
38
+ .replace(/\b[0-9a-f]{7,40}\b/g, '<sha>')
39
+ .replace(/\d{4}-\d{2}-\d{2}t[\d:.]+z?/g, '<time>')
40
+ .replace(/\/[^\s'"]*\/[^\s'"]*/g, '<path>')
41
+ .replace(/\d+/g, '<n>')
42
+ .replace(/\s+/g, ' ')
43
+ .trim()
44
+ // Предел выше всей диагностики проверки (оба потока и упавшие testcases,
45
+ // каждое со своим лимитом): при прежних 300 символах ошибка stderr
46
+ // оказывалась за пределом, и разные провалы получали один отпечаток.
47
+ .slice(0, 2000);
48
+ return createHash('sha256')
49
+ .update(kind + '\n' + normalized)
50
+ .digest('hex')
51
+ .slice(0, 16);
52
+ }
53
+ export { repairPolicy } from "./repair-policy.js";
@@ -0,0 +1,22 @@
1
+ export * from './version.ts';
2
+ export * from './primitives.ts';
3
+ export * from './errors.ts';
4
+ export * from './digest.ts';
5
+ export * from './work.ts';
6
+ export * from './policy.ts';
7
+ export * from './context.ts';
8
+ export * from './result.ts';
9
+ export * from './events.ts';
10
+ export * from './execution.ts';
11
+ export * from './review.ts';
12
+ export * from './checks.ts';
13
+ export * from './profiles.ts';
14
+ export * from './toolchain.ts';
15
+ export * from './ports.ts';
16
+ export * from './cli.ts';
17
+ export * from './published.ts';
18
+ export * from './failure.ts';
19
+ export * from './project.ts';
20
+ export * from './diagnosis.ts';
21
+ export * from './planning.ts';
22
+ export * from './catalog.ts';
@@ -0,0 +1,22 @@
1
+ export * from "./version.js";
2
+ export * from "./primitives.js";
3
+ export * from "./errors.js";
4
+ export * from "./digest.js";
5
+ export * from "./work.js";
6
+ export * from "./policy.js";
7
+ export * from "./context.js";
8
+ export * from "./result.js";
9
+ export * from "./events.js";
10
+ export * from "./execution.js";
11
+ export * from "./review.js";
12
+ export * from "./checks.js";
13
+ export * from "./profiles.js";
14
+ export * from "./toolchain.js";
15
+ export * from "./ports.js";
16
+ export * from "./cli.js";
17
+ export * from "./published.js";
18
+ export * from "./failure.js";
19
+ export * from "./project.js";
20
+ export * from "./diagnosis.js";
21
+ export * from "./planning.js";
22
+ export * from "./catalog.js";
@@ -0,0 +1,433 @@
1
+ import { z } from 'zod';
2
+ export declare const draftPathSchema: z.ZodString;
3
+ export declare const draftRequirementSchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ source: z.ZodString;
6
+ digest: z.ZodString;
7
+ text: z.ZodString;
8
+ gate: z.ZodString;
9
+ scenario: z.ZodString;
10
+ testId: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strict>;
12
+ /** Общие поля задачи draft. Порядок ключей нормативен: по нему строится JSON Schema. */
13
+ export declare const planDraftTaskShape: {
14
+ requirements: z.ZodOptional<z.ZodArray<z.ZodObject<{
15
+ id: z.ZodString;
16
+ source: z.ZodString;
17
+ digest: z.ZodString;
18
+ text: z.ZodString;
19
+ gate: z.ZodString;
20
+ scenario: z.ZodString;
21
+ testId: z.ZodOptional<z.ZodString>;
22
+ }, z.core.$strict>>>;
23
+ scope: z.ZodDefault<z.ZodEnum<{
24
+ component: "component";
25
+ workspace: "workspace";
26
+ }>>;
27
+ relatedRepositories: z.ZodOptional<z.ZodArray<z.ZodString>>;
28
+ contextPacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
29
+ writePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
30
+ gates: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
+ properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
32
+ resources: z.ZodOptional<z.ZodArray<z.ZodString>>;
33
+ repositoryId: z.ZodDefault<z.ZodString>;
34
+ key: z.ZodString;
35
+ title: z.ZodString;
36
+ description: z.ZodString;
37
+ role: z.ZodString;
38
+ dependsOn: z.ZodArray<z.ZodString>;
39
+ acceptance: z.ZodArray<z.ZodString>;
40
+ contracts: z.ZodArray<z.ZodString>;
41
+ };
42
+ export type PlanDraftTaskShape = typeof planDraftTaskShape;
43
+ /**
44
+ * Схема draft с полями хоста. `keyOrder` — полная перестановка ключей задачи:
45
+ * хост сохраняет прежний порядок полей своей схемы (а с ним байты JSON Schema
46
+ * и digest своего каталога). Без него — общие поля, затем поля расширения.
47
+ */
48
+ export declare function planDraft<E extends z.ZodRawShape = Record<never, never>>(taskExtension?: E, options?: {
49
+ keyOrder?: readonly string[];
50
+ }): z.ZodObject<{
51
+ title: z.ZodString;
52
+ description: z.ZodString;
53
+ tasks: z.ZodArray<z.ZodObject<{
54
+ requirements: z.ZodOptional<z.ZodArray<z.ZodObject<{
55
+ id: z.ZodString;
56
+ source: z.ZodString;
57
+ digest: z.ZodString;
58
+ text: z.ZodString;
59
+ gate: z.ZodString;
60
+ scenario: z.ZodString;
61
+ testId: z.ZodOptional<z.ZodString>;
62
+ }, z.core.$strict>>>;
63
+ scope: z.ZodDefault<z.ZodEnum<{
64
+ component: "component";
65
+ workspace: "workspace";
66
+ }>>;
67
+ relatedRepositories: z.ZodOptional<z.ZodArray<z.ZodString>>;
68
+ contextPacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
69
+ writePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
70
+ gates: z.ZodOptional<z.ZodArray<z.ZodString>>;
71
+ properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
72
+ resources: z.ZodOptional<z.ZodArray<z.ZodString>>;
73
+ repositoryId: z.ZodDefault<z.ZodString>;
74
+ key: z.ZodString;
75
+ title: z.ZodString;
76
+ description: z.ZodString;
77
+ role: z.ZodString;
78
+ dependsOn: z.ZodArray<z.ZodString>;
79
+ acceptance: z.ZodArray<z.ZodString>;
80
+ contracts: z.ZodArray<z.ZodString>;
81
+ } & E extends infer T ? { -readonly [P in keyof T]: T[P]; } : never, z.core.$strip>>;
82
+ }, z.core.$strip>;
83
+ /** Draft самостоятельного проекта: общие поля и проверка потребителей библиотеки. */
84
+ export declare const planDraftSchema: z.ZodObject<{
85
+ title: z.ZodString;
86
+ description: z.ZodString;
87
+ tasks: z.ZodArray<z.ZodObject<{
88
+ requirements: z.ZodOptional<z.ZodArray<z.ZodObject<{
89
+ id: z.ZodString;
90
+ source: z.ZodString;
91
+ digest: z.ZodString;
92
+ text: z.ZodString;
93
+ gate: z.ZodString;
94
+ scenario: z.ZodString;
95
+ testId: z.ZodOptional<z.ZodString>;
96
+ }, z.core.$strict>>>;
97
+ scope: z.ZodDefault<z.ZodEnum<{
98
+ component: "component";
99
+ workspace: "workspace";
100
+ }>>;
101
+ relatedRepositories: z.ZodOptional<z.ZodArray<z.ZodString>>;
102
+ contextPacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
103
+ writePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
104
+ gates: z.ZodOptional<z.ZodArray<z.ZodString>>;
105
+ properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
106
+ resources: z.ZodOptional<z.ZodArray<z.ZodString>>;
107
+ repositoryId: z.ZodDefault<z.ZodString>;
108
+ key: z.ZodString;
109
+ title: z.ZodString;
110
+ description: z.ZodString;
111
+ role: z.ZodString;
112
+ dependsOn: z.ZodArray<z.ZodString>;
113
+ acceptance: z.ZodArray<z.ZodString>;
114
+ contracts: z.ZodArray<z.ZodString>;
115
+ consumers: z.ZodOptional<z.ZodArray<z.ZodObject<{
116
+ repositoryId: z.ZodString;
117
+ gates: z.ZodArray<z.ZodString>;
118
+ }, z.core.$strict>>>;
119
+ }, z.core.$strip>>;
120
+ }, z.core.$strip>;
121
+ export type PlanDraft = z.output<ReturnType<typeof planDraft<Record<never, never>>>>;
122
+ export type StandalonePlanDraft = z.output<typeof planDraftSchema>;
123
+ /** JSON Schema draft для `--output-schema` runtime и для агента. */
124
+ export declare function planDraftJsonSchema(schema: z.ZodType): Record<string, unknown>;
125
+ /** Факты проекта, по которым составляется и проверяется план. */
126
+ export interface PlanningFacts {
127
+ repositories: {
128
+ id: string;
129
+ name?: string;
130
+ kind?: string;
131
+ path: string;
132
+ }[];
133
+ roles: {
134
+ repositoryId: string;
135
+ roles: {
136
+ role: string;
137
+ title?: string;
138
+ writePaths?: string[];
139
+ requiresContract: boolean;
140
+ }[];
141
+ }[];
142
+ gates: {
143
+ repositoryId: string;
144
+ gates: {
145
+ id: string;
146
+ kind: string;
147
+ }[];
148
+ groups?: Record<string, string[]>;
149
+ }[];
150
+ contextPacks: {
151
+ id: string;
152
+ version?: string;
153
+ repositoryId?: string;
154
+ roles?: string[];
155
+ files?: string[];
156
+ }[];
157
+ resources: {
158
+ id: string;
159
+ kind: string;
160
+ }[];
161
+ /** Записи контрактов целиком: prompt получает их как есть. */
162
+ contracts: (Record<string, unknown> & {
163
+ id: string;
164
+ digest: string;
165
+ })[];
166
+ }
167
+ export declare const planningFactsSchema: z.ZodObject<{
168
+ repositories: z.ZodArray<z.ZodObject<{
169
+ id: z.ZodString;
170
+ name: z.ZodOptional<z.ZodString>;
171
+ kind: z.ZodOptional<z.ZodString>;
172
+ path: z.ZodString;
173
+ }, z.core.$strict>>;
174
+ roles: z.ZodArray<z.ZodObject<{
175
+ repositoryId: z.ZodString;
176
+ roles: z.ZodArray<z.ZodObject<{
177
+ role: z.ZodString;
178
+ title: z.ZodOptional<z.ZodString>;
179
+ writePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
180
+ requiresContract: z.ZodBoolean;
181
+ }, z.core.$strict>>;
182
+ }, z.core.$strict>>;
183
+ gates: z.ZodArray<z.ZodObject<{
184
+ repositoryId: z.ZodString;
185
+ gates: z.ZodArray<z.ZodObject<{
186
+ id: z.ZodString;
187
+ kind: z.ZodString;
188
+ }, z.core.$strict>>;
189
+ groups: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
190
+ }, z.core.$strict>>;
191
+ contextPacks: z.ZodArray<z.ZodObject<{
192
+ id: z.ZodString;
193
+ version: z.ZodOptional<z.ZodString>;
194
+ repositoryId: z.ZodOptional<z.ZodString>;
195
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
196
+ files: z.ZodOptional<z.ZodArray<z.ZodString>>;
197
+ }, z.core.$strict>>;
198
+ resources: z.ZodArray<z.ZodObject<{
199
+ id: z.ZodString;
200
+ kind: z.ZodString;
201
+ }, z.core.$strict>>;
202
+ contracts: z.ZodArray<z.ZodObject<{
203
+ id: z.ZodString;
204
+ digest: z.ZodString;
205
+ }, z.core.$loose>>;
206
+ }, z.core.$strict>;
207
+ export declare const codedIssueSchema: z.ZodObject<{
208
+ code: z.ZodEnum<{
209
+ INVALID_INPUT: "INVALID_INPUT";
210
+ UNSUPPORTED_COMMAND: "UNSUPPORTED_COMMAND";
211
+ UNSUPPORTED_VERSION: "UNSUPPORTED_VERSION";
212
+ GRAPH_CYCLE: "GRAPH_CYCLE";
213
+ GRAPH_UNKNOWN_DEPENDENCY: "GRAPH_UNKNOWN_DEPENDENCY";
214
+ GRAPH_DUPLICATE_ID: "GRAPH_DUPLICATE_ID";
215
+ GATE_UNKNOWN: "GATE_UNKNOWN";
216
+ GATE_GROUP_CYCLE: "GATE_GROUP_CYCLE";
217
+ REVIEWER_SAME_VENDOR: "REVIEWER_SAME_VENDOR";
218
+ REVIEWER_MISSING: "REVIEWER_MISSING";
219
+ RESPONSE_TOO_LARGE: "RESPONSE_TOO_LARGE";
220
+ APPROVAL_STALE: "APPROVAL_STALE";
221
+ APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
222
+ LEASE_STALE: "LEASE_STALE";
223
+ CONTROLLER_BUSY: "CONTROLLER_BUSY";
224
+ PAUSED: "PAUSED";
225
+ NOT_READY: "NOT_READY";
226
+ SCOPE_VIOLATION: "SCOPE_VIOLATION";
227
+ GATE_FAILED: "GATE_FAILED";
228
+ REVIEW_REJECTED: "REVIEW_REJECTED";
229
+ BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
230
+ BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
231
+ ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
232
+ REVISION_CONFLICT: "REVISION_CONFLICT";
233
+ CANCELLED: "CANCELLED";
234
+ NOT_FOUND: "NOT_FOUND";
235
+ PATH_CONFLICT: "PATH_CONFLICT";
236
+ STATE_VERSION_UNSUPPORTED: "STATE_VERSION_UNSUPPORTED";
237
+ RUNTIME_UNAVAILABLE: "RUNTIME_UNAVAILABLE";
238
+ REVIEW_PROTOCOL_INVALID: "REVIEW_PROTOCOL_INVALID";
239
+ SANDBOX_UNAVAILABLE: "SANDBOX_UNAVAILABLE";
240
+ GIT_FAILED: "GIT_FAILED";
241
+ STORAGE_FAILED: "STORAGE_FAILED";
242
+ DELIVERY_FAILED: "DELIVERY_FAILED";
243
+ INTERNAL: "INTERNAL";
244
+ }>;
245
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
246
+ message: z.ZodString;
247
+ }, z.core.$strict>;
248
+ /** Чего не хватает для проверки плана: агент готовит проверку, а не убирает её. */
249
+ export declare const checkGapKinds: readonly ["gate-undeclared", "test-gate-missing"];
250
+ export declare const checkGapSchema: z.ZodObject<{
251
+ kind: z.ZodEnum<{
252
+ "gate-undeclared": "gate-undeclared";
253
+ "test-gate-missing": "test-gate-missing";
254
+ }>;
255
+ taskKey: z.ZodString;
256
+ repositoryId: z.ZodString;
257
+ ref: z.ZodOptional<z.ZodString>;
258
+ testGates: z.ZodArray<z.ZodString>;
259
+ action: z.ZodEnum<{
260
+ "declare-gate": "declare-gate";
261
+ "add-test-gate": "add-test-gate";
262
+ }>;
263
+ }, z.core.$strict>;
264
+ export type CheckGap = z.infer<typeof checkGapSchema>;
265
+ /** `plan-request`: запрос планирования для ведущего агента; модель не вызывается. */
266
+ export declare const planRequestDataSchema: z.ZodObject<{
267
+ prompt: z.ZodString;
268
+ readOnly: z.ZodLiteral<true>;
269
+ recommendedTasks: z.ZodNumber;
270
+ maxTasks: z.ZodLiteral<30>;
271
+ basis: z.ZodString;
272
+ facts: z.ZodObject<{
273
+ repositories: z.ZodArray<z.ZodObject<{
274
+ id: z.ZodString;
275
+ name: z.ZodOptional<z.ZodString>;
276
+ kind: z.ZodOptional<z.ZodString>;
277
+ path: z.ZodString;
278
+ }, z.core.$strict>>;
279
+ roles: z.ZodArray<z.ZodObject<{
280
+ repositoryId: z.ZodString;
281
+ roles: z.ZodArray<z.ZodObject<{
282
+ role: z.ZodString;
283
+ title: z.ZodOptional<z.ZodString>;
284
+ writePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
285
+ requiresContract: z.ZodBoolean;
286
+ }, z.core.$strict>>;
287
+ }, z.core.$strict>>;
288
+ gates: z.ZodArray<z.ZodObject<{
289
+ repositoryId: z.ZodString;
290
+ gates: z.ZodArray<z.ZodObject<{
291
+ id: z.ZodString;
292
+ kind: z.ZodString;
293
+ }, z.core.$strict>>;
294
+ groups: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
295
+ }, z.core.$strict>>;
296
+ contextPacks: z.ZodArray<z.ZodObject<{
297
+ id: z.ZodString;
298
+ version: z.ZodOptional<z.ZodString>;
299
+ repositoryId: z.ZodOptional<z.ZodString>;
300
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
301
+ files: z.ZodOptional<z.ZodArray<z.ZodString>>;
302
+ }, z.core.$strict>>;
303
+ resources: z.ZodArray<z.ZodObject<{
304
+ id: z.ZodString;
305
+ kind: z.ZodString;
306
+ }, z.core.$strict>>;
307
+ contracts: z.ZodArray<z.ZodObject<{
308
+ id: z.ZodString;
309
+ digest: z.ZodString;
310
+ }, z.core.$loose>>;
311
+ }, z.core.$strict>;
312
+ draftSchema: z.ZodLiteral<"plan-draft">;
313
+ }, z.core.$strict>;
314
+ /** `plan-check`: проблемы draft либо собранный граф; согласования не выдаёт. */
315
+ export declare const planCheckDataSchema: z.ZodObject<{
316
+ issues: z.ZodArray<z.ZodObject<{
317
+ code: z.ZodEnum<{
318
+ INVALID_INPUT: "INVALID_INPUT";
319
+ UNSUPPORTED_COMMAND: "UNSUPPORTED_COMMAND";
320
+ UNSUPPORTED_VERSION: "UNSUPPORTED_VERSION";
321
+ GRAPH_CYCLE: "GRAPH_CYCLE";
322
+ GRAPH_UNKNOWN_DEPENDENCY: "GRAPH_UNKNOWN_DEPENDENCY";
323
+ GRAPH_DUPLICATE_ID: "GRAPH_DUPLICATE_ID";
324
+ GATE_UNKNOWN: "GATE_UNKNOWN";
325
+ GATE_GROUP_CYCLE: "GATE_GROUP_CYCLE";
326
+ REVIEWER_SAME_VENDOR: "REVIEWER_SAME_VENDOR";
327
+ REVIEWER_MISSING: "REVIEWER_MISSING";
328
+ RESPONSE_TOO_LARGE: "RESPONSE_TOO_LARGE";
329
+ APPROVAL_STALE: "APPROVAL_STALE";
330
+ APPROVAL_REQUIRED: "APPROVAL_REQUIRED";
331
+ LEASE_STALE: "LEASE_STALE";
332
+ CONTROLLER_BUSY: "CONTROLLER_BUSY";
333
+ PAUSED: "PAUSED";
334
+ NOT_READY: "NOT_READY";
335
+ SCOPE_VIOLATION: "SCOPE_VIOLATION";
336
+ GATE_FAILED: "GATE_FAILED";
337
+ REVIEW_REJECTED: "REVIEW_REJECTED";
338
+ BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
339
+ BUDGET_UNKNOWN: "BUDGET_UNKNOWN";
340
+ ATTEMPTS_EXHAUSTED: "ATTEMPTS_EXHAUSTED";
341
+ REVISION_CONFLICT: "REVISION_CONFLICT";
342
+ CANCELLED: "CANCELLED";
343
+ NOT_FOUND: "NOT_FOUND";
344
+ PATH_CONFLICT: "PATH_CONFLICT";
345
+ STATE_VERSION_UNSUPPORTED: "STATE_VERSION_UNSUPPORTED";
346
+ RUNTIME_UNAVAILABLE: "RUNTIME_UNAVAILABLE";
347
+ REVIEW_PROTOCOL_INVALID: "REVIEW_PROTOCOL_INVALID";
348
+ SANDBOX_UNAVAILABLE: "SANDBOX_UNAVAILABLE";
349
+ GIT_FAILED: "GIT_FAILED";
350
+ STORAGE_FAILED: "STORAGE_FAILED";
351
+ DELIVERY_FAILED: "DELIVERY_FAILED";
352
+ INTERNAL: "INTERNAL";
353
+ }>;
354
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
355
+ message: z.ZodString;
356
+ }, z.core.$strict>>;
357
+ checkPlan: z.ZodArray<z.ZodObject<{
358
+ kind: z.ZodEnum<{
359
+ "gate-undeclared": "gate-undeclared";
360
+ "test-gate-missing": "test-gate-missing";
361
+ }>;
362
+ taskKey: z.ZodString;
363
+ repositoryId: z.ZodString;
364
+ ref: z.ZodOptional<z.ZodString>;
365
+ testGates: z.ZodArray<z.ZodString>;
366
+ action: z.ZodEnum<{
367
+ "declare-gate": "declare-gate";
368
+ "add-test-gate": "add-test-gate";
369
+ }>;
370
+ }, z.core.$strict>>;
371
+ graph: z.ZodOptional<z.ZodObject<{
372
+ apiVersion: z.ZodLiteral<"devcontour-harness/v1alpha1">;
373
+ id: z.ZodString;
374
+ source: z.ZodObject<{
375
+ connector: z.ZodString;
376
+ ref: z.ZodString;
377
+ revision: z.ZodString;
378
+ }, z.core.$strict>;
379
+ orders: z.ZodArray<z.ZodObject<{
380
+ apiVersion: z.ZodLiteral<"devcontour-harness/v1alpha1">;
381
+ id: z.ZodString;
382
+ source: z.ZodObject<{
383
+ connector: z.ZodString;
384
+ ref: z.ZodString;
385
+ revision: z.ZodString;
386
+ }, z.core.$strict>;
387
+ title: z.ZodString;
388
+ goal: z.ZodString;
389
+ acceptance: z.ZodArray<z.ZodString>;
390
+ role: z.ZodString;
391
+ repositoryId: z.ZodString;
392
+ relatedRepositories: z.ZodDefault<z.ZodArray<z.ZodString>>;
393
+ writeScope: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<".">, z.ZodString]>>;
394
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
395
+ gates: z.ZodOptional<z.ZodArray<z.ZodString>>;
396
+ consumers: z.ZodOptional<z.ZodArray<z.ZodObject<{
397
+ repositoryId: z.ZodString;
398
+ gates: z.ZodArray<z.ZodString>;
399
+ }, z.core.$strict>>>;
400
+ properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
401
+ resources: z.ZodOptional<z.ZodArray<z.ZodString>>;
402
+ requirements: z.ZodDefault<z.ZodArray<z.ZodObject<{
403
+ id: z.ZodString;
404
+ source: z.ZodString;
405
+ digest: z.ZodString;
406
+ text: z.ZodString;
407
+ gate: z.ZodString;
408
+ scenario: z.ZodString;
409
+ testId: z.ZodOptional<z.ZodString>;
410
+ }, z.core.$strict>>>;
411
+ contracts: z.ZodDefault<z.ZodArray<z.ZodObject<{
412
+ id: z.ZodString;
413
+ digest: z.ZodString;
414
+ }, z.core.$strict>>>;
415
+ context: z.ZodDefault<z.ZodArray<z.ZodString>>;
416
+ }, z.core.$strict>>;
417
+ prerequisites: z.ZodDefault<z.ZodArray<z.ZodObject<{
418
+ id: z.ZodString;
419
+ repositoryId: z.ZodString;
420
+ resultSha: z.ZodString;
421
+ receipt: z.ZodDiscriminatedUnion<[z.ZodObject<{
422
+ kind: z.ZodLiteral<"engine">;
423
+ runId: z.ZodString;
424
+ }, z.core.$strict>, z.ZodObject<{
425
+ kind: z.ZodLiteral<"trusted">;
426
+ issuer: z.ZodString;
427
+ digest: z.ZodString;
428
+ }, z.core.$strict>], "kind">;
429
+ }, z.core.$strict>>>;
430
+ }, z.core.$strict>>;
431
+ graphDigest: z.ZodOptional<z.ZodString>;
432
+ basis: z.ZodOptional<z.ZodString>;
433
+ }, z.core.$strict>;