audit-tools 0.51.7 → 0.51.9

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 (665) hide show
  1. package/dist/audit/clarification/blastRadius.d.ts +17 -16
  2. package/dist/audit/clarification/blastRadius.d.ts.map +1 -1
  3. package/dist/audit/clarification/blastRadius.js +48 -44
  4. package/dist/audit/clarification/blastRadius.js.map +1 -1
  5. package/dist/audit/clarification/dials.d.ts +4 -4
  6. package/dist/audit/clarification/dials.d.ts.map +1 -1
  7. package/dist/audit/clarification/dials.js +1 -0
  8. package/dist/audit/clarification/dials.js.map +1 -1
  9. package/dist/audit/clarification/partition.d.ts +12 -21
  10. package/dist/audit/clarification/partition.d.ts.map +1 -1
  11. package/dist/audit/clarification/partition.js +52 -59
  12. package/dist/audit/clarification/partition.js.map +1 -1
  13. package/dist/audit/clarification/riskGate.d.ts +2 -2
  14. package/dist/audit/clarification/riskGate.d.ts.map +1 -1
  15. package/dist/audit/clarification/riskGate.js +1 -0
  16. package/dist/audit/clarification/riskGate.js.map +1 -1
  17. package/dist/audit/clarification/voiQueue.d.ts +3 -3
  18. package/dist/audit/clarification/voiQueue.d.ts.map +1 -1
  19. package/dist/audit/clarification/voiQueue.js +1 -0
  20. package/dist/audit/clarification/voiQueue.js.map +1 -1
  21. package/dist/audit/cli/auditStep.d.ts +14 -2
  22. package/dist/audit/cli/auditStep.d.ts.map +1 -1
  23. package/dist/audit/cli/auditStep.js +13 -5
  24. package/dist/audit/cli/auditStep.js.map +1 -1
  25. package/dist/audit/cli/charterClarificationPrompt.d.ts +6 -9
  26. package/dist/audit/cli/charterClarificationPrompt.d.ts.map +1 -1
  27. package/dist/audit/cli/charterClarificationPrompt.js +35 -47
  28. package/dist/audit/cli/charterClarificationPrompt.js.map +1 -1
  29. package/dist/audit/cli/charterComparisonPrompt.d.ts +14 -0
  30. package/dist/audit/cli/charterComparisonPrompt.d.ts.map +1 -0
  31. package/dist/audit/cli/charterComparisonPrompt.js +111 -0
  32. package/dist/audit/cli/charterComparisonPrompt.js.map +1 -0
  33. package/dist/audit/cli/charterExtractionPrompt.d.ts +14 -17
  34. package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
  35. package/dist/audit/cli/charterExtractionPrompt.js +81 -104
  36. package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
  37. package/dist/audit/cli/charterFidelityPrompt.d.ts +14 -0
  38. package/dist/audit/cli/charterFidelityPrompt.d.ts.map +1 -0
  39. package/dist/audit/cli/charterFidelityPrompt.js +58 -0
  40. package/dist/audit/cli/charterFidelityPrompt.js.map +1 -0
  41. package/dist/audit/cli/conceptualDispatch.d.ts +39 -6
  42. package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
  43. package/dist/audit/cli/conceptualDispatch.js +59 -12
  44. package/dist/audit/cli/conceptualDispatch.js.map +1 -1
  45. package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
  46. package/dist/audit/cli/confirmIntentStep.js +46 -2
  47. package/dist/audit/cli/confirmIntentStep.js.map +1 -1
  48. package/dist/audit/cli/dispatch/hostHandoff.d.ts +18 -6
  49. package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
  50. package/dist/audit/cli/dispatch/hostHandoff.js +525 -67
  51. package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
  52. package/dist/audit/cli/fanoutLanes.d.ts +24 -0
  53. package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
  54. package/dist/audit/cli/fanoutLanes.js +9 -1
  55. package/dist/audit/cli/fanoutLanes.js.map +1 -1
  56. package/dist/audit/cli/foldTransaction.d.ts.map +1 -1
  57. package/dist/audit/cli/foldTransaction.js +14 -3
  58. package/dist/audit/cli/foldTransaction.js.map +1 -1
  59. package/dist/audit/cli/forceSynthesisCommand.d.ts.map +1 -1
  60. package/dist/audit/cli/forceSynthesisCommand.js +4 -1
  61. package/dist/audit/cli/forceSynthesisCommand.js.map +1 -1
  62. package/dist/audit/cli/intakeCommand.d.ts.map +1 -1
  63. package/dist/audit/cli/intakeCommand.js +1 -0
  64. package/dist/audit/cli/intakeCommand.js.map +1 -1
  65. package/dist/audit/cli/laneSubmissions.d.ts +18 -12
  66. package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
  67. package/dist/audit/cli/laneSubmissions.js +40 -4
  68. package/dist/audit/cli/laneSubmissions.js.map +1 -1
  69. package/dist/audit/cli/laneValidators.d.ts.map +1 -1
  70. package/dist/audit/cli/laneValidators.js +14 -14
  71. package/dist/audit/cli/laneValidators.js.map +1 -1
  72. package/dist/audit/cli/nextStepCommand.d.ts +7 -0
  73. package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
  74. package/dist/audit/cli/nextStepCommand.js +206 -31
  75. package/dist/audit/cli/nextStepCommand.js.map +1 -1
  76. package/dist/audit/cli/nextStepHelpers.d.ts +92 -28
  77. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  78. package/dist/audit/cli/nextStepHelpers.js +363 -126
  79. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  80. package/dist/audit/cli/prompts.d.ts +10 -0
  81. package/dist/audit/cli/prompts.d.ts.map +1 -1
  82. package/dist/audit/cli/prompts.js +3 -1
  83. package/dist/audit/cli/prompts.js.map +1 -1
  84. package/dist/audit/cli/reviewRun.d.ts +12 -0
  85. package/dist/audit/cli/reviewRun.d.ts.map +1 -1
  86. package/dist/audit/cli/reviewRun.js +242 -29
  87. package/dist/audit/cli/reviewRun.js.map +1 -1
  88. package/dist/audit/cli/sampleRunCommand.d.ts +12 -4
  89. package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
  90. package/dist/audit/cli/semanticReviewStep.d.ts +9 -0
  91. package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
  92. package/dist/audit/cli/semanticReviewStep.js +71 -30
  93. package/dist/audit/cli/semanticReviewStep.js.map +1 -1
  94. package/dist/audit/cli/statusCommand.d.ts.map +1 -1
  95. package/dist/audit/cli/statusCommand.js +29 -66
  96. package/dist/audit/cli/statusCommand.js.map +1 -1
  97. package/dist/audit/cli/stepScaffold.d.ts +43 -2
  98. package/dist/audit/cli/stepScaffold.d.ts.map +1 -1
  99. package/dist/audit/cli/stepScaffold.js +24 -10
  100. package/dist/audit/cli/stepScaffold.js.map +1 -1
  101. package/dist/audit/cli/steps.d.ts +52 -29
  102. package/dist/audit/cli/steps.d.ts.map +1 -1
  103. package/dist/audit/cli/steps.js +44 -14
  104. package/dist/audit/cli/steps.js.map +1 -1
  105. package/dist/audit/cli/synthesizeCommand.d.ts.map +1 -1
  106. package/dist/audit/cli/synthesizeCommand.js +4 -1
  107. package/dist/audit/cli/synthesizeCommand.js.map +1 -1
  108. package/dist/audit/contracts/workerSchemas.d.ts +65 -16
  109. package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
  110. package/dist/audit/contracts/workerSchemas.js +89 -8
  111. package/dist/audit/contracts/workerSchemas.js.map +1 -1
  112. package/dist/audit/contracts/wrapperResponse.d.ts +14 -21
  113. package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
  114. package/dist/audit/contracts/wrapperResponse.js +0 -1
  115. package/dist/audit/contracts/wrapperResponse.js.map +1 -1
  116. package/dist/audit/decompose/findings.d.ts.map +1 -1
  117. package/dist/audit/decompose/findings.js +10 -2
  118. package/dist/audit/decompose/findings.js.map +1 -1
  119. package/dist/audit/extractors/designAssessment.d.ts.map +1 -1
  120. package/dist/audit/extractors/designAssessment.js +13 -4
  121. package/dist/audit/extractors/designAssessment.js.map +1 -1
  122. package/dist/audit/extractors/disposition.d.ts.map +1 -1
  123. package/dist/audit/extractors/disposition.js +17 -5
  124. package/dist/audit/extractors/disposition.js.map +1 -1
  125. package/dist/audit/extractors/graph.d.ts +1 -1
  126. package/dist/audit/extractors/graph.js +1 -1
  127. package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
  128. package/dist/audit/extractors/graphRoutes.js +224 -17
  129. package/dist/audit/extractors/graphRoutes.js.map +1 -1
  130. package/dist/audit/extractors/leadLineage.d.ts +10 -0
  131. package/dist/audit/extractors/leadLineage.d.ts.map +1 -0
  132. package/dist/audit/extractors/leadLineage.js +44 -0
  133. package/dist/audit/extractors/leadLineage.js.map +1 -0
  134. package/dist/audit/io/artifacts.d.ts.map +1 -1
  135. package/dist/audit/io/artifacts.js +25 -8
  136. package/dist/audit/io/artifacts.js.map +1 -1
  137. package/dist/audit/io/runArtifacts.d.ts +76 -1
  138. package/dist/audit/io/runArtifacts.d.ts.map +1 -1
  139. package/dist/audit/io/runArtifacts.js +113 -20
  140. package/dist/audit/io/runArtifacts.js.map +1 -1
  141. package/dist/audit/io/toolingManifest.d.ts +15 -0
  142. package/dist/audit/io/toolingManifest.d.ts.map +1 -1
  143. package/dist/audit/io/toolingManifest.js +158 -11
  144. package/dist/audit/io/toolingManifest.js.map +1 -1
  145. package/dist/audit/orchestrator/advance.d.ts.map +1 -1
  146. package/dist/audit/orchestrator/advance.js +30 -4
  147. package/dist/audit/orchestrator/advance.js.map +1 -1
  148. package/dist/audit/orchestrator/advanceTypes.d.ts +28 -5
  149. package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
  150. package/dist/audit/orchestrator/artifactMetadata.d.ts.map +1 -1
  151. package/dist/audit/orchestrator/artifactMetadata.js +39 -1
  152. package/dist/audit/orchestrator/artifactMetadata.js.map +1 -1
  153. package/dist/audit/orchestrator/auditTaskUtils.d.ts.map +1 -1
  154. package/dist/audit/orchestrator/auditTaskUtils.js +4 -1
  155. package/dist/audit/orchestrator/auditTaskUtils.js.map +1 -1
  156. package/dist/audit/orchestrator/charterClarificationExecutor.d.ts +11 -17
  157. package/dist/audit/orchestrator/charterClarificationExecutor.d.ts.map +1 -1
  158. package/dist/audit/orchestrator/charterClarificationExecutor.js +61 -93
  159. package/dist/audit/orchestrator/charterClarificationExecutor.js.map +1 -1
  160. package/dist/audit/orchestrator/charterComparisonExecutor.d.ts +24 -0
  161. package/dist/audit/orchestrator/charterComparisonExecutor.d.ts.map +1 -0
  162. package/dist/audit/orchestrator/charterComparisonExecutor.js +110 -0
  163. package/dist/audit/orchestrator/charterComparisonExecutor.js.map +1 -0
  164. package/dist/audit/orchestrator/charterExtractionExecutor.d.ts +34 -20
  165. package/dist/audit/orchestrator/charterExtractionExecutor.d.ts.map +1 -1
  166. package/dist/audit/orchestrator/charterExtractionExecutor.js +80 -106
  167. package/dist/audit/orchestrator/charterExtractionExecutor.js.map +1 -1
  168. package/dist/audit/orchestrator/charterFidelityExecutor.d.ts +20 -0
  169. package/dist/audit/orchestrator/charterFidelityExecutor.d.ts.map +1 -0
  170. package/dist/audit/orchestrator/charterFidelityExecutor.js +76 -0
  171. package/dist/audit/orchestrator/charterFidelityExecutor.js.map +1 -0
  172. package/dist/audit/orchestrator/charterFidelityPacket.d.ts +7 -0
  173. package/dist/audit/orchestrator/charterFidelityPacket.d.ts.map +1 -0
  174. package/dist/audit/orchestrator/charterFidelityPacket.js +68 -0
  175. package/dist/audit/orchestrator/charterFidelityPacket.js.map +1 -0
  176. package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
  177. package/dist/audit/orchestrator/dependencyMap.js +9 -8
  178. package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
  179. package/dist/audit/orchestrator/dependencySlices.d.ts.map +1 -1
  180. package/dist/audit/orchestrator/dependencySlices.js +7 -6
  181. package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
  182. package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
  183. package/dist/audit/orchestrator/designReviewProjection.js +7 -0
  184. package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
  185. package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
  186. package/dist/audit/orchestrator/designReviewPrompt.js +58 -19
  187. package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
  188. package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
  189. package/dist/audit/orchestrator/executorRunners.js +6 -2
  190. package/dist/audit/orchestrator/executorRunners.js.map +1 -1
  191. package/dist/audit/orchestrator/executors.d.ts.map +1 -1
  192. package/dist/audit/orchestrator/executors.js +22 -8
  193. package/dist/audit/orchestrator/executors.js.map +1 -1
  194. package/dist/audit/orchestrator/hostInputPause.js +1 -0
  195. package/dist/audit/orchestrator/hostInputPause.js.map +1 -1
  196. package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +40 -0
  197. package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
  198. package/dist/audit/orchestrator/intentCheckpointExecutor.js +32 -2
  199. package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
  200. package/dist/audit/orchestrator/intentCheckpointGate.d.ts +5 -3
  201. package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
  202. package/dist/audit/orchestrator/intentCheckpointGate.js +34 -5
  203. package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
  204. package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts +2 -2
  205. package/dist/audit/orchestrator/intentInterpreter.d.ts +1 -1
  206. package/dist/audit/orchestrator/intentInterpreter.js +1 -1
  207. package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
  208. package/dist/audit/orchestrator/nextStep.js +3 -1
  209. package/dist/audit/orchestrator/nextStep.js.map +1 -1
  210. package/dist/audit/orchestrator/obligationPolicy.d.ts +2 -1
  211. package/dist/audit/orchestrator/obligationPolicy.d.ts.map +1 -1
  212. package/dist/audit/orchestrator/obligationPolicy.js +19 -7
  213. package/dist/audit/orchestrator/obligationPolicy.js.map +1 -1
  214. package/dist/audit/orchestrator/partitionTaskGraph.d.ts.map +1 -1
  215. package/dist/audit/orchestrator/partitionTaskGraph.js +1 -0
  216. package/dist/audit/orchestrator/partitionTaskGraph.js.map +1 -1
  217. package/dist/audit/orchestrator/resultIngestion.d.ts.map +1 -1
  218. package/dist/audit/orchestrator/resultIngestion.js +3 -1
  219. package/dist/audit/orchestrator/resultIngestion.js.map +1 -1
  220. package/dist/audit/orchestrator/runtimeCommand.d.ts +72 -0
  221. package/dist/audit/orchestrator/runtimeCommand.d.ts.map +1 -1
  222. package/dist/audit/orchestrator/runtimeCommand.js +177 -20
  223. package/dist/audit/orchestrator/runtimeCommand.js.map +1 -1
  224. package/dist/audit/orchestrator/scopeIndexBaseline.d.ts +56 -0
  225. package/dist/audit/orchestrator/scopeIndexBaseline.d.ts.map +1 -0
  226. package/dist/audit/orchestrator/scopeIndexBaseline.js +114 -0
  227. package/dist/audit/orchestrator/scopeIndexBaseline.js.map +1 -0
  228. package/dist/audit/orchestrator/staleness.d.ts +70 -1
  229. package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
  230. package/dist/audit/orchestrator/staleness.js +171 -21
  231. package/dist/audit/orchestrator/staleness.js.map +1 -1
  232. package/dist/audit/orchestrator/state.d.ts.map +1 -1
  233. package/dist/audit/orchestrator/state.js +49 -25
  234. package/dist/audit/orchestrator/state.js.map +1 -1
  235. package/dist/audit/orchestrator/structureExecutors.d.ts.map +1 -1
  236. package/dist/audit/orchestrator/structureExecutors.js +7 -5
  237. package/dist/audit/orchestrator/structureExecutors.js.map +1 -1
  238. package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts.map +1 -1
  239. package/dist/audit/orchestrator/syntaxResolutionExecutor.js +1 -0
  240. package/dist/audit/orchestrator/syntaxResolutionExecutor.js.map +1 -1
  241. package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts +13 -2
  242. package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts.map +1 -1
  243. package/dist/audit/orchestrator/systemicChallengeExecutor.js +166 -12
  244. package/dist/audit/orchestrator/systemicChallengeExecutor.js.map +1 -1
  245. package/dist/audit/reporting/mergeFindings.d.ts.map +1 -1
  246. package/dist/audit/reporting/mergeFindings.js +6 -5
  247. package/dist/audit/reporting/mergeFindings.js.map +1 -1
  248. package/dist/audit/reporting/synthesis.d.ts +117 -0
  249. package/dist/audit/reporting/synthesis.d.ts.map +1 -1
  250. package/dist/audit/reporting/synthesis.js +277 -10
  251. package/dist/audit/reporting/synthesis.js.map +1 -1
  252. package/dist/audit/supervisor/operatorHandoff.d.ts +0 -2
  253. package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
  254. package/dist/audit/supervisor/operatorHandoff.js +0 -3
  255. package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
  256. package/dist/audit/systemic/coveredThemes.d.ts +28 -0
  257. package/dist/audit/systemic/coveredThemes.d.ts.map +1 -0
  258. package/dist/audit/systemic/coveredThemes.js +52 -0
  259. package/dist/audit/systemic/coveredThemes.js.map +1 -0
  260. package/dist/audit/systemic/reviewFileMap.d.ts +81 -0
  261. package/dist/audit/systemic/reviewFileMap.d.ts.map +1 -0
  262. package/dist/audit/systemic/reviewFileMap.js +169 -0
  263. package/dist/audit/systemic/reviewFileMap.js.map +1 -0
  264. package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
  265. package/dist/audit/systemic/secondOrderAdversaryPrompt.js +149 -26
  266. package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
  267. package/dist/audit/systemic/systemicChallengeLoop.d.ts +44 -4
  268. package/dist/audit/systemic/systemicChallengeLoop.d.ts.map +1 -1
  269. package/dist/audit/systemic/systemicChallengeLoop.js +114 -10
  270. package/dist/audit/systemic/systemicChallengeLoop.js.map +1 -1
  271. package/dist/audit/types/auditState.d.ts +6 -6
  272. package/dist/audit/types/charterClarification.d.ts +9 -4
  273. package/dist/audit/types/charterClarification.d.ts.map +1 -1
  274. package/dist/audit/types/charterRegister.d.ts +48 -93
  275. package/dist/audit/types/charterRegister.d.ts.map +1 -1
  276. package/dist/audit/types/charterRegister.js +15 -26
  277. package/dist/audit/types/charterRegister.js.map +1 -1
  278. package/dist/audit/types/conceptualAdjudication.d.ts +88 -18
  279. package/dist/audit/types/conceptualAdjudication.d.ts.map +1 -1
  280. package/dist/audit/types/conceptualAdjudication.js +77 -16
  281. package/dist/audit/types/conceptualAdjudication.js.map +1 -1
  282. package/dist/audit/types/designAssessment.d.ts +8 -6
  283. package/dist/audit/types/designAssessment.d.ts.map +1 -1
  284. package/dist/audit/types/reviewPlanning.d.ts +2 -2
  285. package/dist/audit/types/systemicChallenge.d.ts +43 -7
  286. package/dist/audit/types/systemicChallenge.d.ts.map +1 -1
  287. package/dist/audit/types.d.ts +71 -10
  288. package/dist/audit/types.d.ts.map +1 -1
  289. package/dist/audit/types.js +23 -2
  290. package/dist/audit/types.js.map +1 -1
  291. package/dist/audit/validation/auditResults.d.ts +30 -0
  292. package/dist/audit/validation/auditResults.d.ts.map +1 -1
  293. package/dist/audit/validation/auditResults.js +50 -8
  294. package/dist/audit/validation/auditResults.js.map +1 -1
  295. package/dist/audit/validation/ingestIssueCodes.d.ts +1 -1
  296. package/dist/audit/validation/ingestIssueCodes.d.ts.map +1 -1
  297. package/dist/audit/validation/ingestIssueCodes.js +14 -0
  298. package/dist/audit/validation/ingestIssueCodes.js.map +1 -1
  299. package/dist/remediate/contractPipeline/artifactStore.d.ts +97 -2
  300. package/dist/remediate/contractPipeline/artifactStore.d.ts.map +1 -1
  301. package/dist/remediate/contractPipeline/artifactStore.js +163 -9
  302. package/dist/remediate/contractPipeline/artifactStore.js.map +1 -1
  303. package/dist/remediate/contractPipeline/changeClassification.d.ts.map +1 -1
  304. package/dist/remediate/contractPipeline/changeClassification.js +93 -3
  305. package/dist/remediate/contractPipeline/changeClassification.js.map +1 -1
  306. package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts.map +1 -1
  307. package/dist/remediate/contractPipeline/cyclicSeamResolution.js +31 -0
  308. package/dist/remediate/contractPipeline/cyclicSeamResolution.js.map +1 -1
  309. package/dist/remediate/contractPipeline/derive.d.ts +0 -14
  310. package/dist/remediate/contractPipeline/derive.d.ts.map +1 -1
  311. package/dist/remediate/contractPipeline/derive.js +52 -24
  312. package/dist/remediate/contractPipeline/derive.js.map +1 -1
  313. package/dist/remediate/contractPipeline/finalizedContractFields.d.ts +50 -0
  314. package/dist/remediate/contractPipeline/finalizedContractFields.d.ts.map +1 -0
  315. package/dist/remediate/contractPipeline/finalizedContractFields.js +77 -0
  316. package/dist/remediate/contractPipeline/finalizedContractFields.js.map +1 -0
  317. package/dist/remediate/contractPipeline/idRegistry.d.ts +85 -0
  318. package/dist/remediate/contractPipeline/idRegistry.d.ts.map +1 -1
  319. package/dist/remediate/contractPipeline/idRegistry.js +147 -0
  320. package/dist/remediate/contractPipeline/idRegistry.js.map +1 -1
  321. package/dist/remediate/contractPipeline/phaseCut.d.ts +13 -16
  322. package/dist/remediate/contractPipeline/phaseCut.d.ts.map +1 -1
  323. package/dist/remediate/contractPipeline/phaseCut.js +15 -30
  324. package/dist/remediate/contractPipeline/phaseCut.js.map +1 -1
  325. package/dist/remediate/contractPipeline/reviewSnapshot.d.ts +20 -1
  326. package/dist/remediate/contractPipeline/reviewSnapshot.d.ts.map +1 -1
  327. package/dist/remediate/contractPipeline/reviewSnapshot.js +23 -7
  328. package/dist/remediate/contractPipeline/reviewSnapshot.js.map +1 -1
  329. package/dist/remediate/contractPipeline/semanticProjection.d.ts +17 -0
  330. package/dist/remediate/contractPipeline/semanticProjection.d.ts.map +1 -1
  331. package/dist/remediate/contractPipeline/semanticProjection.js +6 -9
  332. package/dist/remediate/contractPipeline/semanticProjection.js.map +1 -1
  333. package/dist/remediate/contractPipeline/sketchSource.d.ts +183 -0
  334. package/dist/remediate/contractPipeline/sketchSource.d.ts.map +1 -0
  335. package/dist/remediate/contractPipeline/sketchSource.js +255 -0
  336. package/dist/remediate/contractPipeline/sketchSource.js.map +1 -0
  337. package/dist/remediate/findingFilter.d.ts.map +1 -1
  338. package/dist/remediate/findingFilter.js +1 -0
  339. package/dist/remediate/findingFilter.js.map +1 -1
  340. package/dist/remediate/index.d.ts +81 -0
  341. package/dist/remediate/index.d.ts.map +1 -1
  342. package/dist/remediate/index.js +162 -53
  343. package/dist/remediate/index.js.map +1 -1
  344. package/dist/remediate/intake.d.ts +43 -0
  345. package/dist/remediate/intake.d.ts.map +1 -1
  346. package/dist/remediate/intake.js +82 -13
  347. package/dist/remediate/intake.js.map +1 -1
  348. package/dist/remediate/phases/close.d.ts +33 -2
  349. package/dist/remediate/phases/close.d.ts.map +1 -1
  350. package/dist/remediate/phases/close.js +227 -13
  351. package/dist/remediate/phases/close.js.map +1 -1
  352. package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts +154 -0
  353. package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts.map +1 -0
  354. package/dist/remediate/phases/closeVerifyHeadEvidence.js +242 -0
  355. package/dist/remediate/phases/closeVerifyHeadEvidence.js.map +1 -0
  356. package/dist/remediate/state/runStatus.d.ts +35 -0
  357. package/dist/remediate/state/runStatus.d.ts.map +1 -0
  358. package/dist/remediate/state/runStatus.js +46 -0
  359. package/dist/remediate/state/runStatus.js.map +1 -0
  360. package/dist/remediate/state/store.d.ts +52 -2
  361. package/dist/remediate/state/store.d.ts.map +1 -1
  362. package/dist/remediate/state/store.js +124 -21
  363. package/dist/remediate/state/store.js.map +1 -1
  364. package/dist/remediate/state/types.d.ts +83 -13
  365. package/dist/remediate/state/types.d.ts.map +1 -1
  366. package/dist/remediate/steps/contractPipeline.d.ts +65 -1
  367. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  368. package/dist/remediate/steps/contractPipeline.js +302 -85
  369. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  370. package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
  371. package/dist/remediate/steps/contractPipelinePrompts.js +58 -21
  372. package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
  373. package/dist/remediate/steps/dispatch/hostHandoff.d.ts +87 -2
  374. package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
  375. package/dist/remediate/steps/dispatch/hostHandoff.js +344 -44
  376. package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
  377. package/dist/remediate/steps/finalGate.d.ts +109 -5
  378. package/dist/remediate/steps/finalGate.d.ts.map +1 -1
  379. package/dist/remediate/steps/finalGate.js +135 -27
  380. package/dist/remediate/steps/finalGate.js.map +1 -1
  381. package/dist/remediate/steps/gateCommands.d.ts +167 -0
  382. package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
  383. package/dist/remediate/steps/gateCommands.js +428 -1
  384. package/dist/remediate/steps/gateCommands.js.map +1 -1
  385. package/dist/remediate/steps/intakeResolver.d.ts +2 -13
  386. package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
  387. package/dist/remediate/steps/intakeResolver.js +22 -4
  388. package/dist/remediate/steps/intakeResolver.js.map +1 -1
  389. package/dist/remediate/steps/nextStep.d.ts +44 -40
  390. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  391. package/dist/remediate/steps/nextStep.js +501 -106
  392. package/dist/remediate/steps/nextStep.js.map +1 -1
  393. package/dist/remediate/steps/stepWriter.d.ts +1 -1
  394. package/dist/remediate/steps/stepWriter.d.ts.map +1 -1
  395. package/dist/remediate/steps/stepWriter.js +1 -0
  396. package/dist/remediate/steps/stepWriter.js.map +1 -1
  397. package/dist/remediate/steps/types.d.ts +32 -1
  398. package/dist/remediate/steps/types.d.ts.map +1 -1
  399. package/dist/remediate/steps/types.js +1 -0
  400. package/dist/remediate/steps/types.js.map +1 -1
  401. package/dist/remediate/types/options.d.ts +8 -0
  402. package/dist/remediate/types/options.d.ts.map +1 -1
  403. package/dist/remediate/utils/fileIntegrity.d.ts +8 -0
  404. package/dist/remediate/utils/fileIntegrity.d.ts.map +1 -1
  405. package/dist/remediate/utils/fileIntegrity.js +12 -1
  406. package/dist/remediate/utils/fileIntegrity.js.map +1 -1
  407. package/dist/remediate/validation/artifacts.d.ts +1 -1
  408. package/dist/remediate/validation/artifacts.d.ts.map +1 -1
  409. package/dist/remediate/validation/artifacts.js +19 -2
  410. package/dist/remediate/validation/artifacts.js.map +1 -1
  411. package/dist/remediate/validation/contractPipeline.d.ts.map +1 -1
  412. package/dist/remediate/validation/contractPipeline.js +26 -39
  413. package/dist/remediate/validation/contractPipeline.js.map +1 -1
  414. package/dist/remediate/validation/contractPipelineGates.d.ts +18 -1
  415. package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
  416. package/dist/remediate/validation/contractPipelineGates.js +33 -5
  417. package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
  418. package/dist/shared/analyzers/acquisitionEngine.d.ts +83 -5
  419. package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
  420. package/dist/shared/analyzers/acquisitionEngine.js +46 -14
  421. package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
  422. package/dist/shared/analyzers/binaryAcquisition.d.ts +35 -2
  423. package/dist/shared/analyzers/binaryAcquisition.d.ts.map +1 -1
  424. package/dist/shared/analyzers/binaryAcquisition.js +5 -5
  425. package/dist/shared/analyzers/binaryAcquisition.js.map +1 -1
  426. package/dist/shared/analyzers/candidates.d.ts.map +1 -1
  427. package/dist/shared/analyzers/candidates.js +1 -0
  428. package/dist/shared/analyzers/candidates.js.map +1 -1
  429. package/dist/shared/analyzers/clippy.d.ts +9 -1
  430. package/dist/shared/analyzers/clippy.d.ts.map +1 -1
  431. package/dist/shared/analyzers/clippy.js +10 -2
  432. package/dist/shared/analyzers/clippy.js.map +1 -1
  433. package/dist/shared/analyzers/normalizeExternal.d.ts.map +1 -1
  434. package/dist/shared/analyzers/normalizeExternal.js +1 -0
  435. package/dist/shared/analyzers/normalizeExternal.js.map +1 -1
  436. package/dist/shared/analyzers/rubocop.d.ts +7 -1
  437. package/dist/shared/analyzers/rubocop.d.ts.map +1 -1
  438. package/dist/shared/analyzers/rubocop.js +8 -2
  439. package/dist/shared/analyzers/rubocop.js.map +1 -1
  440. package/dist/shared/analyzers/types.d.ts +24 -24
  441. package/dist/shared/analyzers/types.d.ts.map +1 -1
  442. package/dist/shared/analyzers/types.js +15 -0
  443. package/dist/shared/analyzers/types.js.map +1 -1
  444. package/dist/shared/artifactFreshness.d.ts.map +1 -1
  445. package/dist/shared/artifactFreshness.js +42 -7
  446. package/dist/shared/artifactFreshness.js.map +1 -1
  447. package/dist/shared/chunkByBudget.d.ts.map +1 -1
  448. package/dist/shared/chunkByBudget.js.map +1 -1
  449. package/dist/shared/continuityScore.d.ts.map +1 -1
  450. package/dist/shared/continuityScore.js +12 -4
  451. package/dist/shared/continuityScore.js.map +1 -1
  452. package/dist/shared/decompose/charterClarification.d.ts +49 -45
  453. package/dist/shared/decompose/charterClarification.d.ts.map +1 -1
  454. package/dist/shared/decompose/charterClarification.js +50 -57
  455. package/dist/shared/decompose/charterClarification.js.map +1 -1
  456. package/dist/shared/decompose/charterExtraction.d.ts +616 -342
  457. package/dist/shared/decompose/charterExtraction.d.ts.map +1 -1
  458. package/dist/shared/decompose/charterExtraction.js +590 -488
  459. package/dist/shared/decompose/charterExtraction.js.map +1 -1
  460. package/dist/shared/decompose/contentCoherence.d.ts +36 -2
  461. package/dist/shared/decompose/contentCoherence.d.ts.map +1 -1
  462. package/dist/shared/decompose/contentCoherence.js +45 -5
  463. package/dist/shared/decompose/contentCoherence.js.map +1 -1
  464. package/dist/shared/decompose/modularity.d.ts +98 -1
  465. package/dist/shared/decompose/modularity.d.ts.map +1 -1
  466. package/dist/shared/decompose/modularity.js +89 -8
  467. package/dist/shared/decompose/modularity.js.map +1 -1
  468. package/dist/shared/decompose/systemicChallenge.d.ts +111 -0
  469. package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
  470. package/dist/shared/decompose/systemicChallenge.js +28 -0
  471. package/dist/shared/decompose/systemicChallenge.js.map +1 -1
  472. package/dist/shared/engine/obligationEngine.d.ts +2 -2
  473. package/dist/shared/engine/obligationEngine.d.ts.map +1 -1
  474. package/dist/shared/engine/obligationEngine.js +8 -2
  475. package/dist/shared/engine/obligationEngine.js.map +1 -1
  476. package/dist/shared/findingSimilarity.d.ts +8 -0
  477. package/dist/shared/findingSimilarity.d.ts.map +1 -1
  478. package/dist/shared/findingSimilarity.js +10 -3
  479. package/dist/shared/findingSimilarity.js.map +1 -1
  480. package/dist/shared/findings/dedupe.d.ts +15 -0
  481. package/dist/shared/findings/dedupe.d.ts.map +1 -1
  482. package/dist/shared/findings/dedupe.js +137 -1
  483. package/dist/shared/findings/dedupe.js.map +1 -1
  484. package/dist/shared/friction/frictionRecord.d.ts.map +1 -1
  485. package/dist/shared/friction/frictionRecord.js +14 -1
  486. package/dist/shared/friction/frictionRecord.js.map +1 -1
  487. package/dist/shared/friction/triage.d.ts +4 -0
  488. package/dist/shared/friction/triage.d.ts.map +1 -1
  489. package/dist/shared/friction/triage.js +41 -29
  490. package/dist/shared/friction/triage.js.map +1 -1
  491. package/dist/shared/git.d.ts +14 -0
  492. package/dist/shared/git.d.ts.map +1 -1
  493. package/dist/shared/git.js +22 -0
  494. package/dist/shared/git.js.map +1 -1
  495. package/dist/shared/index.d.ts +42 -38
  496. package/dist/shared/index.d.ts.map +1 -1
  497. package/dist/shared/index.js +35 -23
  498. package/dist/shared/index.js.map +1 -1
  499. package/dist/shared/intent/clauseBoundaries.d.ts +75 -0
  500. package/dist/shared/intent/clauseBoundaries.d.ts.map +1 -0
  501. package/dist/shared/intent/clauseBoundaries.js +134 -0
  502. package/dist/shared/intent/clauseBoundaries.js.map +1 -0
  503. package/dist/shared/intent/clauseInterpreter.d.ts +11 -5
  504. package/dist/shared/intent/clauseInterpreter.d.ts.map +1 -1
  505. package/dist/shared/intent/clauseInterpreter.js +16 -41
  506. package/dist/shared/intent/clauseInterpreter.js.map +1 -1
  507. package/dist/shared/intent/freeFormIntentInterpreter.d.ts +11 -0
  508. package/dist/shared/intent/freeFormIntentInterpreter.d.ts.map +1 -1
  509. package/dist/shared/intent/freeFormIntentInterpreter.js +31 -17
  510. package/dist/shared/intent/freeFormIntentInterpreter.js.map +1 -1
  511. package/dist/shared/io/fileLock.d.ts.map +1 -1
  512. package/dist/shared/io/fileLock.js +18 -6
  513. package/dist/shared/io/fileLock.js.map +1 -1
  514. package/dist/shared/io/frictionCapture.d.ts +25 -5
  515. package/dist/shared/io/frictionCapture.d.ts.map +1 -1
  516. package/dist/shared/io/frictionCapture.js +30 -9
  517. package/dist/shared/io/frictionCapture.js.map +1 -1
  518. package/dist/shared/io/schemaVersion.d.ts +4 -3
  519. package/dist/shared/io/schemaVersion.d.ts.map +1 -1
  520. package/dist/shared/io/schemaVersion.js +27 -4
  521. package/dist/shared/io/schemaVersion.js.map +1 -1
  522. package/dist/shared/io/stepContractWriter.d.ts +38 -4
  523. package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
  524. package/dist/shared/io/stepContractWriter.js +59 -1
  525. package/dist/shared/io/stepContractWriter.js.map +1 -1
  526. package/dist/shared/loopCorePaths.d.ts.map +1 -1
  527. package/dist/shared/loopCorePaths.js +8 -0
  528. package/dist/shared/loopCorePaths.js.map +1 -1
  529. package/dist/shared/opencodePermissions.d.ts +27 -3
  530. package/dist/shared/opencodePermissions.d.ts.map +1 -1
  531. package/dist/shared/opencodePermissions.js +77 -26
  532. package/dist/shared/opencodePermissions.js.map +1 -1
  533. package/dist/shared/prompts.d.ts +12 -1
  534. package/dist/shared/prompts.d.ts.map +1 -1
  535. package/dist/shared/prompts.js +11 -1
  536. package/dist/shared/prompts.js.map +1 -1
  537. package/dist/shared/reReview/projectionDiff.d.ts +13 -0
  538. package/dist/shared/reReview/projectionDiff.d.ts.map +1 -1
  539. package/dist/shared/reReview/projectionDiff.js +1 -1
  540. package/dist/shared/reReview/projectionDiff.js.map +1 -1
  541. package/dist/shared/reporting/findingDisplay.d.ts +7 -0
  542. package/dist/shared/reporting/findingDisplay.d.ts.map +1 -1
  543. package/dist/shared/reporting/findingDisplay.js +8 -1
  544. package/dist/shared/reporting/findingDisplay.js.map +1 -1
  545. package/dist/shared/steps/stepEmissionScaffold.d.ts +15 -3
  546. package/dist/shared/steps/stepEmissionScaffold.d.ts.map +1 -1
  547. package/dist/shared/steps/stepEmissionScaffold.js +8 -6
  548. package/dist/shared/steps/stepEmissionScaffold.js.map +1 -1
  549. package/dist/shared/submission/hostHandoffCore.d.ts +37 -12
  550. package/dist/shared/submission/hostHandoffCore.d.ts.map +1 -1
  551. package/dist/shared/submission/hostHandoffCore.js +81 -18
  552. package/dist/shared/submission/hostHandoffCore.js.map +1 -1
  553. package/dist/shared/submission/hostResultOutcomes.d.ts +70 -1
  554. package/dist/shared/submission/hostResultOutcomes.d.ts.map +1 -1
  555. package/dist/shared/submission/hostResultOutcomes.js +66 -1
  556. package/dist/shared/submission/hostResultOutcomes.js.map +1 -1
  557. package/dist/shared/submission/submissionLedger.d.ts +86 -1
  558. package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
  559. package/dist/shared/submission/submissionLedger.js +108 -0
  560. package/dist/shared/submission/submissionLedger.js.map +1 -1
  561. package/dist/shared/submission/submissionScan.d.ts.map +1 -1
  562. package/dist/shared/submission/submissionScan.js +1 -0
  563. package/dist/shared/submission/submissionScan.js.map +1 -1
  564. package/dist/shared/tooling/analyzerDeps.d.ts +14 -0
  565. package/dist/shared/tooling/analyzerDeps.d.ts.map +1 -1
  566. package/dist/shared/tooling/analyzerDeps.js +23 -0
  567. package/dist/shared/tooling/analyzerDeps.js.map +1 -1
  568. package/dist/shared/tooling/commandShape.d.ts +35 -1
  569. package/dist/shared/tooling/commandShape.d.ts.map +1 -1
  570. package/dist/shared/tooling/commandShape.js +66 -4
  571. package/dist/shared/tooling/commandShape.js.map +1 -1
  572. package/dist/shared/tooling/exec.d.ts +62 -4
  573. package/dist/shared/tooling/exec.d.ts.map +1 -1
  574. package/dist/shared/tooling/exec.js +127 -8
  575. package/dist/shared/tooling/exec.js.map +1 -1
  576. package/dist/shared/types/charter.d.ts +674 -156
  577. package/dist/shared/types/charter.d.ts.map +1 -1
  578. package/dist/shared/types/charter.js +172 -118
  579. package/dist/shared/types/charter.js.map +1 -1
  580. package/dist/shared/types/closingActions.d.ts +25 -0
  581. package/dist/shared/types/closingActions.d.ts.map +1 -1
  582. package/dist/shared/types/closingActions.js +26 -0
  583. package/dist/shared/types/closingActions.js.map +1 -1
  584. package/dist/shared/types/contractPipeline/obligations.d.ts +63 -2
  585. package/dist/shared/types/contractPipeline/obligations.d.ts.map +1 -1
  586. package/dist/shared/types/contractPipeline/obligations.js +51 -0
  587. package/dist/shared/types/contractPipeline/obligations.js.map +1 -1
  588. package/dist/shared/types/contractPipeline.d.ts +1 -0
  589. package/dist/shared/types/contractPipeline.d.ts.map +1 -1
  590. package/dist/shared/types/contractPipeline.js +1 -0
  591. package/dist/shared/types/contractPipeline.js.map +1 -1
  592. package/dist/shared/types/contractPropertyShapes.d.ts +34 -0
  593. package/dist/shared/types/contractPropertyShapes.d.ts.map +1 -0
  594. package/dist/shared/types/contractPropertyShapes.js +255 -0
  595. package/dist/shared/types/contractPropertyShapes.js.map +1 -0
  596. package/dist/shared/types/finding.d.ts +376 -18
  597. package/dist/shared/types/finding.d.ts.map +1 -1
  598. package/dist/shared/types/finding.js +111 -0
  599. package/dist/shared/types/finding.js.map +1 -1
  600. package/dist/shared/types/intentCheckpoint.d.ts +214 -2
  601. package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
  602. package/dist/shared/types/intentCheckpoint.js +273 -0
  603. package/dist/shared/types/intentCheckpoint.js.map +1 -1
  604. package/dist/shared/types/intentInterpretation.d.ts +1 -1
  605. package/dist/shared/types/intentInterpretation.js +1 -1
  606. package/dist/shared/types/remediationOutcome.d.ts +294 -30
  607. package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
  608. package/dist/shared/types/remediationOutcome.js +96 -7
  609. package/dist/shared/types/remediationOutcome.js.map +1 -1
  610. package/dist/shared/types/stepContract.d.ts +47 -0
  611. package/dist/shared/types/stepContract.d.ts.map +1 -1
  612. package/dist/shared/types/stepContract.js +113 -0
  613. package/dist/shared/types/stepContract.js.map +1 -1
  614. package/dist/shared/validation/charterGate.d.ts +13 -28
  615. package/dist/shared/validation/charterGate.d.ts.map +1 -1
  616. package/dist/shared/validation/charterGate.js +13 -35
  617. package/dist/shared/validation/charterGate.js.map +1 -1
  618. package/dist/shared/validation/contractConstructionSites.d.ts +116 -0
  619. package/dist/shared/validation/contractConstructionSites.d.ts.map +1 -0
  620. package/dist/shared/validation/contractConstructionSites.js +277 -0
  621. package/dist/shared/validation/contractConstructionSites.js.map +1 -0
  622. package/dist/shared/validation/designFindingGrounding.d.ts +33 -4
  623. package/dist/shared/validation/designFindingGrounding.d.ts.map +1 -1
  624. package/dist/shared/validation/designFindingGrounding.js +40 -6
  625. package/dist/shared/validation/designFindingGrounding.js.map +1 -1
  626. package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
  627. package/dist/shared/validation/findingGrounding.js +11 -1
  628. package/dist/shared/validation/findingGrounding.js.map +1 -1
  629. package/dist/shared/validation/findingsReport.d.ts.map +1 -1
  630. package/dist/shared/validation/findingsReport.js +5 -0
  631. package/dist/shared/validation/findingsReport.js.map +1 -1
  632. package/docs/audit-pkg/contracts.md +8 -2
  633. package/opencode.json +29 -29
  634. package/package.json +16 -3
  635. package/schemas/audit-code-v1alpha1.schema.json +0 -4
  636. package/scripts/audit/postinstall.mjs +81 -96
  637. package/scripts/remediate/postinstall.mjs +43 -83
  638. package/scripts/shared/host-asset-plan.mjs +176 -0
  639. package/scripts/shared/install-host-assets.mjs +44 -1
  640. package/scripts/shared/primitives.mjs +89 -0
  641. package/skills/audit-code/SKILL.md +4 -4
  642. package/skills/audit-code/audit-code.prompt.md +14 -10
  643. package/skills/remediate-code/SKILL.md +9 -5
  644. package/skills/remediate-code/remediate-code.prompt.md +11 -4
  645. package/wrapper/audit-code-wrapper-build.mjs +6 -3
  646. package/dist/audit/cli/charterDeltaPrompt.d.ts +0 -18
  647. package/dist/audit/cli/charterDeltaPrompt.d.ts.map +0 -1
  648. package/dist/audit/cli/charterDeltaPrompt.js +0 -150
  649. package/dist/audit/cli/charterDeltaPrompt.js.map +0 -1
  650. package/dist/audit/orchestrator/charterDeltaExecutor.d.ts +0 -24
  651. package/dist/audit/orchestrator/charterDeltaExecutor.d.ts.map +0 -1
  652. package/dist/audit/orchestrator/charterDeltaExecutor.js +0 -128
  653. package/dist/audit/orchestrator/charterDeltaExecutor.js.map +0 -1
  654. package/dist/audit/supervisor/runLedger.d.ts +0 -3
  655. package/dist/audit/supervisor/runLedger.d.ts.map +0 -1
  656. package/dist/audit/supervisor/runLedger.js +0 -69
  657. package/dist/audit/supervisor/runLedger.js.map +0 -1
  658. package/dist/shared/types/executionRecord.d.ts +0 -58
  659. package/dist/shared/types/executionRecord.d.ts.map +0 -1
  660. package/dist/shared/types/executionRecord.js +0 -26
  661. package/dist/shared/types/executionRecord.js.map +0 -1
  662. package/dist/shared/types/runLedger.d.ts +0 -17
  663. package/dist/shared/types/runLedger.d.ts.map +0 -1
  664. package/dist/shared/types/runLedger.js +0 -7
  665. package/dist/shared/types/runLedger.js.map +0 -1
@@ -1,19 +1,44 @@
1
1
  import { mkdir } from "node:fs/promises";
2
2
  import { join } from "node:path";
3
- import { createLockedJsonStore, LOCKED_JSON_STORE_TIMEOUT_MS, assertNotNodeWorktreeCwd, } from "audit-tools/shared";
3
+ import { createLockedJsonStore, LOCKED_JSON_STORE_TIMEOUT_MS, SchemaVersionMismatchError, SKIP_WRITE, assertNotNodeWorktreeCwd, } from "audit-tools/shared";
4
4
  import { RemediationHostHandoffRecordSchema, } from "./types.js";
5
5
  import { validateRemediationBlock } from "../validation/remediationState.js";
6
- /** Known status values for RemediationState — used for schema validation on load. */
7
- const KNOWN_STATUSES = new Set([
8
- "pending",
9
- "planning",
10
- "waiting_for_clarification",
11
- "implementing",
12
- "triage",
13
- "waiting_for_triage",
14
- "closing",
15
- "complete",
16
- ]);
6
+ import { REMEDIATION_RUN_STATUSES, isRemediationRunStatus, } from "./runStatus.js";
7
+ /**
8
+ * The schema version stamped on every persisted `state.json`.
9
+ *
10
+ * The VALUE is unchanged from the literal three modules already spelled out
11
+ * (the host-handoff parser, the state-shaping helper in `nextStep.ts`, and the
12
+ * test fixtures). What changes is that it is now ONE declaration that the store
13
+ * actually writes and reads back, rather than a constant a reader FABRICATED
14
+ * onto the loaded value to satisfy its own parser — see `parseCurrentState`'s
15
+ * call site in `steps/dispatch/hostHandoff.ts`. An identity that the reader
16
+ * supplies itself is not a check; it is the check's answer written in advance.
17
+ *
18
+ * A run's state is COSTLY / AUTHORED state in the sense
19
+ * `audit-tools/shared/io/schemaVersion.ts` names: it records work an operator
20
+ * or a host has already done, and it cannot be rebuilt from anything else on
21
+ * disk. That module's policy is therefore THROW on a mismatch — silently
22
+ * discarding a state would read as "this run never started" and destroy the
23
+ * plan, the item ledger and every recorded acceptance with it.
24
+ *
25
+ * ABSENT IS NOT A MISMATCH, and the distinction is deliberate here rather than
26
+ * inherited. Every run already in flight when this field was introduced has a
27
+ * `state.json` with no `contract_version`; treating its absence as a mismatch
28
+ * would refuse to load exactly the runs this field exists to protect. An
29
+ * unstamped state is read under the CURRENT version's semantics (it was written
30
+ * by a release whose shape this one still admits — that is what makes the field
31
+ * safe to add), and the next write stamps it. A stamped-but-DIFFERENT version
32
+ * is the case that throws, because at that point the file positively claims
33
+ * another release's semantics rather than merely predating the field.
34
+ *
35
+ * Same asymmetry as `intent_checkpoint` (absent ⇒ nothing to check; present
36
+ * and different ⇒ refuse loudly), inverted for a version that is newly added
37
+ * rather than newly REQUIRED.
38
+ */
39
+ export const REMEDIATION_STATE_CONTRACT_VERSION = "remediate-code-state/v1alpha1";
40
+ /** The file this store owns, named once so the version error can name it too. */
41
+ const STATE_FILENAME = "state.json";
17
42
  /**
18
43
  * Statuses whose derived step decisions READ the plan/items — a state in one of
19
44
  * these with those fields missing is unusable (the state machine would crash or,
@@ -35,15 +60,30 @@ function validateState(value) {
35
60
  return errors;
36
61
  }
37
62
  const obj = value;
63
+ // The contract version, checked BEFORE anything is read off the state: a file
64
+ // that positively claims another release's semantics must not have its fields
65
+ // interpreted under this one's. ABSENT is admitted (see
66
+ // REMEDIATION_STATE_CONTRACT_VERSION) — this is the stamped-and-different case
67
+ // only, which throws rather than degrading because the state is authored,
68
+ // unrebuildable work.
69
+ if (obj["contract_version"] !== undefined &&
70
+ obj["contract_version"] !== REMEDIATION_STATE_CONTRACT_VERSION) {
71
+ throw new SchemaVersionMismatchError(STATE_FILENAME, REMEDIATION_STATE_CONTRACT_VERSION, String(obj["contract_version"]));
72
+ }
38
73
  if (!("status" in obj)) {
39
74
  errors.push("Missing required field: status");
40
75
  return errors;
41
76
  }
42
- const status = obj["status"];
43
- if (!KNOWN_STATUSES.has(status)) {
44
- errors.push(`Unknown status "${String(obj["status"])}"; expected one of: ${[...KNOWN_STATUSES].join(", ")}`);
77
+ // The ONE membership test, derived from the same array the `status` type is —
78
+ // so the gate and the type cannot drift apart with no red build. This used to
79
+ // be a module-private `Set` hand-mirroring the inline union (DAT-017d52ff):
80
+ // adding a status to the union without updating the set compiled cleanly and
81
+ // then made the load gate reject every persisted state carrying it.
82
+ if (!isRemediationRunStatus(obj["status"])) {
83
+ errors.push(`Unknown status "${String(obj["status"])}"; expected one of: ${REMEDIATION_RUN_STATUSES.join(", ")}`);
45
84
  return errors;
46
85
  }
86
+ const status = obj["status"];
47
87
  // Status-conditional completeness (INV-RSM-STATE-COMPLETE): every field the
48
88
  // status's decision path reads must be present, or the load fails loudly
49
89
  // instead of handing the state machine a partially-persisted state.
@@ -121,7 +161,6 @@ function validateState(value) {
121
161
  }
122
162
  return errors;
123
163
  }
124
- const STATE_FILENAME = "state.json";
125
164
  const LOCK_FILENAME = "state.lock";
126
165
  // Acquire timeout for the shared file lock — the STALE_LOCK_MS-minus-margin
127
166
  // derivation is single-sourced in the shared locked JSON store (a fresh-but-held
@@ -157,12 +196,35 @@ export class StateStore {
157
196
  if (raw === undefined) {
158
197
  return null;
159
198
  }
199
+ // `validateState` throws SchemaVersionMismatchError for a state stamped
200
+ // with another release's contract version; that propagates out of the
201
+ // read exactly as the policy requires (see the constant's doc).
160
202
  const errors = validateState(raw);
161
203
  if (errors.length > 0) {
162
204
  throw new Error(`state.json failed schema validation: ${errors.join("; ")}`);
163
205
  }
206
+ // Returned as READ. The version is stamped on the way IN (the write
207
+ // hook below), so a state that has been through this store carries it
208
+ // on disk and this read is byte-faithful: what `loadState` returns is
209
+ // what the file says, with no field conjured at read time. A state
210
+ // written before the field existed has none until its next write, and
211
+ // `validateState` admits that (see the constant's doc) — which is the
212
+ // whole reason the field is optional on the type rather than required.
164
213
  return raw;
165
214
  },
215
+ // The WRITE hook. Without it the store's own `persist` wrote whatever a
216
+ // caller handed it — the load gate was the only validation on the path,
217
+ // so a state that was never round-tripped (constructed in memory and
218
+ // saved, which is every transition) could reach disk carrying fields no
219
+ // reader would accept. The gate and the writer now share ONE validator.
220
+ validate: (next) => {
221
+ if (next === null)
222
+ return;
223
+ const errors = validateState(next);
224
+ if (errors.length > 0) {
225
+ throw new Error(`refusing to write state.json: ${errors.join("; ")}`);
226
+ }
227
+ },
166
228
  });
167
229
  }
168
230
  async init() {
@@ -185,18 +247,41 @@ export class StateStore {
185
247
  * current state (or null), passes it to `fn`, and writes the returned state
186
248
  * before releasing the lock. No other holder can interleave between the load
187
249
  * and the save. INV-remediate-state-02 + INV-remediate-state-03.
250
+ *
251
+ * Returning the shared `SKIP_WRITE` sentinel from `fn` is the no-op: the write
252
+ * is skipped and this resolves with the state that was READ. The skip decision
253
+ * is taken inside the SAME held lock as the write it avoids, so it cannot race
254
+ * a concurrent writer. Whole-run verbs that routinely change nothing — the
255
+ * `recover-ingest` retry loop is the live one — otherwise replace `state.json`
256
+ * with byte-identical content on every pass, which makes "did anything
257
+ * change?" unanswerable from the file and rewrites an artifact other readers
258
+ * treat as the run's ground truth.
188
259
  */
189
260
  async mutate(fn) {
190
261
  // Node-worktree guard (defense-in-depth behind the CLI-entry guard): a
191
262
  // dispatched worker's process must never transition shared run state,
192
263
  // whatever invocation shape reached this writer.
193
264
  assertNotNodeWorktreeCwd("a remediation state.json transition");
194
- let next;
195
- await this.store.mutate(async (current) => {
196
- next = await fn(current);
265
+ let next = SKIP_WRITE;
266
+ const readValue = await this.store.mutate(async (current) => {
267
+ const produced = await fn(current);
268
+ // Same stamp as `saveState`, at the other write door: the version is a
269
+ // property of the store's writes, so no transition can produce an
270
+ // unstamped file. The value RESOLVED to the caller is the newly stamped
271
+ // state (matching what `saveState` put on disk); the SKIP_WRITE arm below
272
+ // still resolves with what was READ.
273
+ next = produced === SKIP_WRITE ? SKIP_WRITE : stampedState(produced);
197
274
  return next;
198
275
  });
199
- return next;
276
+ if (next !== SKIP_WRITE)
277
+ return next;
278
+ // The store resolves a skipped write with the value it read. A skipped write
279
+ // over an ABSENT file has no state to resolve with — the caller asked to
280
+ // leave nothing there and nothing was there, so there is nothing to return.
281
+ if (readValue === null) {
282
+ throw new Error("StateStore.mutate returned SKIP_WRITE but no state.json exists to resolve with");
283
+ }
284
+ return readValue;
200
285
  }
201
286
  /**
202
287
  * Save state.json unconditionally (no TOCTOU protection, no read — so a
@@ -208,7 +293,25 @@ export class StateStore {
208
293
  // Same node-worktree guard as `mutate` — the unconditional-write recovery
209
294
  // path must not be the one door a worker-context write can still use.
210
295
  assertNotNodeWorktreeCwd("a remediation state.json write");
211
- await this.store.replace(state);
296
+ await this.store.replace(stampedState(state));
212
297
  }
213
298
  }
299
+ /**
300
+ * The state as it goes to disk: its own `contract_version` when it has one,
301
+ * else the current constant.
302
+ *
303
+ * Stamping here — at the two write doors, not in the read path — is what keeps
304
+ * `loadState` byte-faithful. A version conjured at READ time would make
305
+ * `loadState()` return a key the file does not contain, so the round trip
306
+ * `saveState(x)` → `loadState()` would not equal `x`, and a caller comparing
307
+ * states (the ingress's `state_changed`, the tests) would see a change that
308
+ * never happened. A state that already carries a DIFFERENT version is left
309
+ * alone: the write hook's validator refuses it loudly rather than this helper
310
+ * silently overwriting the caller's claim.
311
+ */
312
+ function stampedState(state) {
313
+ return state.contract_version === undefined
314
+ ? { ...state, contract_version: REMEDIATION_STATE_CONTRACT_VERSION }
315
+ : state;
316
+ }
214
317
  //# sourceMappingURL=store.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":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AAuB;QACrC,0EAA0E;QAC1E,sEAAsE;QACtE,wBAAwB,CAAC,gCAAgC,CAAC,CAAC;QAC3D,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD,CAAC;CACF;AAED;;;;;;;;;;;;GAYG;AACH,SAAS,YAAY,CAAC,KAAuB;IAC3C,OAAO,KAAK,CAAC,gBAAgB,KAAK,SAAS;QACzC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,gBAAgB,EAAE,kCAAkC,EAAE;QACpE,CAAC,CAAC,KAAK,CAAC;AACZ,CAAC"}
@@ -114,6 +114,7 @@ export declare const RemediationPlanSchema: z.ZodObject<{
114
114
  title: z.ZodString;
115
115
  category: z.ZodString;
116
116
  severity: z.ZodEnum<["critical", "high", "medium", "low", "info"]>;
117
+ severity_downgraded_from: z.ZodOptional<z.ZodEnum<["critical", "high", "medium", "low", "info"]>>;
117
118
  confidence: z.ZodEnum<["high", "medium", "low"]>;
118
119
  lens: z.ZodString;
119
120
  summary: z.ZodString;
@@ -172,6 +173,7 @@ export declare const RemediationPlanSchema: z.ZodObject<{
172
173
  status: "grounded" | "ungrounded" | "refuted";
173
174
  reason?: string | undefined;
174
175
  }>>;
176
+ evidence_lane: z.ZodOptional<z.ZodEnum<["per-file-lane", "design-review-lane"]>>;
175
177
  verification_status: z.ZodOptional<z.ZodEnum<["judge_confirmed", "asserted", "refuted_at_head"]>>;
176
178
  executable_anchor: z.ZodOptional<z.ZodObject<{
177
179
  command: z.ZodArray<z.ZodString, "many">;
@@ -256,6 +258,19 @@ export declare const RemediationPlanSchema: z.ZodObject<{
256
258
  snippet_hash: string;
257
259
  rule?: string | undefined;
258
260
  }>>;
261
+ lead_lineage: z.ZodOptional<z.ZodObject<{
262
+ producer: z.ZodString;
263
+ source_hash: z.ZodString;
264
+ confirmation: z.ZodLiteral<"lead">;
265
+ }, "strict", z.ZodTypeAny, {
266
+ producer: string;
267
+ source_hash: string;
268
+ confirmation: "lead";
269
+ }, {
270
+ producer: string;
271
+ source_hash: string;
272
+ confirmation: "lead";
273
+ }>>;
259
274
  }, "strip", z.ZodTypeAny, {
260
275
  id: string;
261
276
  confidence: "high" | "low" | "medium";
@@ -272,6 +287,7 @@ export declare const RemediationPlanSchema: z.ZodObject<{
272
287
  quoted_text?: string | undefined;
273
288
  hash_at_plan_time?: string | undefined;
274
289
  }[];
290
+ severity_downgraded_from?: "high" | "low" | "critical" | "medium" | "info" | undefined;
275
291
  impact?: string | undefined;
276
292
  likelihood?: string | undefined;
277
293
  evidence?: string[] | undefined;
@@ -285,6 +301,7 @@ export declare const RemediationPlanSchema: z.ZodObject<{
285
301
  status: "grounded" | "ungrounded" | "refuted";
286
302
  reason?: string | undefined;
287
303
  } | undefined;
304
+ evidence_lane?: "per-file-lane" | "design-review-lane" | undefined;
288
305
  verification_status?: "judge_confirmed" | "asserted" | "refuted_at_head" | undefined;
289
306
  executable_anchor?: {
290
307
  command: string[];
@@ -311,6 +328,11 @@ export declare const RemediationPlanSchema: z.ZodObject<{
311
328
  snippet_hash: string;
312
329
  rule?: string | undefined;
313
330
  } | undefined;
331
+ lead_lineage?: {
332
+ producer: string;
333
+ source_hash: string;
334
+ confirmation: "lead";
335
+ } | undefined;
314
336
  }, {
315
337
  id: string;
316
338
  confidence: "high" | "low" | "medium";
@@ -327,6 +349,7 @@ export declare const RemediationPlanSchema: z.ZodObject<{
327
349
  quoted_text?: string | undefined;
328
350
  hash_at_plan_time?: string | undefined;
329
351
  }[];
352
+ severity_downgraded_from?: "high" | "low" | "critical" | "medium" | "info" | undefined;
330
353
  impact?: string | undefined;
331
354
  likelihood?: string | undefined;
332
355
  evidence?: string[] | undefined;
@@ -340,6 +363,7 @@ export declare const RemediationPlanSchema: z.ZodObject<{
340
363
  status: "grounded" | "ungrounded" | "refuted";
341
364
  reason?: string | undefined;
342
365
  } | undefined;
366
+ evidence_lane?: "per-file-lane" | "design-review-lane" | undefined;
343
367
  verification_status?: "judge_confirmed" | "asserted" | "refuted_at_head" | undefined;
344
368
  executable_anchor?: {
345
369
  command: string[];
@@ -366,6 +390,11 @@ export declare const RemediationPlanSchema: z.ZodObject<{
366
390
  snippet_hash: string;
367
391
  rule?: string | undefined;
368
392
  } | undefined;
393
+ lead_lineage?: {
394
+ producer: string;
395
+ source_hash: string;
396
+ confirmation: "lead";
397
+ } | undefined;
369
398
  }>, "many">;
370
399
  blocks: z.ZodArray<z.ZodObject<{
371
400
  block_id: z.ZodString;
@@ -511,6 +540,7 @@ export declare const RemediationPlanSchema: z.ZodObject<{
511
540
  quoted_text?: string | undefined;
512
541
  hash_at_plan_time?: string | undefined;
513
542
  }[];
543
+ severity_downgraded_from?: "high" | "low" | "critical" | "medium" | "info" | undefined;
514
544
  impact?: string | undefined;
515
545
  likelihood?: string | undefined;
516
546
  evidence?: string[] | undefined;
@@ -524,6 +554,7 @@ export declare const RemediationPlanSchema: z.ZodObject<{
524
554
  status: "grounded" | "ungrounded" | "refuted";
525
555
  reason?: string | undefined;
526
556
  } | undefined;
557
+ evidence_lane?: "per-file-lane" | "design-review-lane" | undefined;
527
558
  verification_status?: "judge_confirmed" | "asserted" | "refuted_at_head" | undefined;
528
559
  executable_anchor?: {
529
560
  command: string[];
@@ -550,8 +581,13 @@ export declare const RemediationPlanSchema: z.ZodObject<{
550
581
  snippet_hash: string;
551
582
  rule?: string | undefined;
552
583
  } | undefined;
584
+ lead_lineage?: {
585
+ producer: string;
586
+ source_hash: string;
587
+ confirmation: "lead";
588
+ } | undefined;
553
589
  }[];
554
- candidate_closing_actions: ("push" | "custom" | "commit" | "open-pr" | "publish" | "tag" | "none")[];
590
+ candidate_closing_actions: ("push" | "custom" | "none" | "commit" | "open-pr" | "publish" | "tag")[];
555
591
  project_type: string;
556
592
  blocks: {
557
593
  items: string[];
@@ -582,7 +618,7 @@ export declare const RemediationPlanSchema: z.ZodObject<{
582
618
  e2e_command?: string | undefined;
583
619
  test_command_source?: "project_facts" | "explicit" | undefined;
584
620
  e2e_command_source?: "project_facts" | "explicit" | undefined;
585
- block_strategy?: "manual" | "test_graph" | "git_cocommit" | "file_overlap" | undefined;
621
+ block_strategy?: "file_overlap" | "manual" | "test_graph" | "git_cocommit" | undefined;
586
622
  }, {
587
623
  findings: {
588
624
  id: string;
@@ -600,6 +636,7 @@ export declare const RemediationPlanSchema: z.ZodObject<{
600
636
  quoted_text?: string | undefined;
601
637
  hash_at_plan_time?: string | undefined;
602
638
  }[];
639
+ severity_downgraded_from?: "high" | "low" | "critical" | "medium" | "info" | undefined;
603
640
  impact?: string | undefined;
604
641
  likelihood?: string | undefined;
605
642
  evidence?: string[] | undefined;
@@ -613,6 +650,7 @@ export declare const RemediationPlanSchema: z.ZodObject<{
613
650
  status: "grounded" | "ungrounded" | "refuted";
614
651
  reason?: string | undefined;
615
652
  } | undefined;
653
+ evidence_lane?: "per-file-lane" | "design-review-lane" | undefined;
616
654
  verification_status?: "judge_confirmed" | "asserted" | "refuted_at_head" | undefined;
617
655
  executable_anchor?: {
618
656
  command: string[];
@@ -639,8 +677,13 @@ export declare const RemediationPlanSchema: z.ZodObject<{
639
677
  snippet_hash: string;
640
678
  rule?: string | undefined;
641
679
  } | undefined;
680
+ lead_lineage?: {
681
+ producer: string;
682
+ source_hash: string;
683
+ confirmation: "lead";
684
+ } | undefined;
642
685
  }[];
643
- candidate_closing_actions: ("push" | "custom" | "commit" | "open-pr" | "publish" | "tag" | "none")[];
686
+ candidate_closing_actions: ("push" | "custom" | "none" | "commit" | "open-pr" | "publish" | "tag")[];
644
687
  project_type: string;
645
688
  blocks: {
646
689
  items: string[];
@@ -671,7 +714,7 @@ export declare const RemediationPlanSchema: z.ZodObject<{
671
714
  e2e_command?: string | undefined;
672
715
  test_command_source?: "project_facts" | "explicit" | undefined;
673
716
  e2e_command_source?: "project_facts" | "explicit" | undefined;
674
- block_strategy?: "manual" | "test_graph" | "git_cocommit" | "file_overlap" | undefined;
717
+ block_strategy?: "file_overlap" | "manual" | "test_graph" | "git_cocommit" | undefined;
675
718
  }>;
676
719
  export type RemediationPlan = z.infer<typeof RemediationPlanSchema>;
677
720
  /**
@@ -690,14 +733,14 @@ export declare const RemediationHostHandoffRecordSchema: z.ZodDiscriminatedUnion
690
733
  work_item_ids: z.ZodArray<z.ZodString, "many">;
691
734
  contract_version: z.ZodLiteral<"remediation-host-handoff-record/v1alpha1">;
692
735
  }, "strict", z.ZodTypeAny, {
693
- contract_version: "remediation-host-handoff-record/v1alpha1";
694
736
  run_id: string;
737
+ contract_version: "remediation-host-handoff-record/v1alpha1";
695
738
  baseline_commit: string;
696
739
  workload_sha256: string;
697
740
  work_item_ids: string[];
698
741
  }, {
699
- contract_version: "remediation-host-handoff-record/v1alpha1";
700
742
  run_id: string;
743
+ contract_version: "remediation-host-handoff-record/v1alpha1";
701
744
  baseline_commit: string;
702
745
  workload_sha256: string;
703
746
  work_item_ids: string[];
@@ -709,15 +752,15 @@ export declare const RemediationHostHandoffRecordSchema: z.ZodDiscriminatedUnion
709
752
  contract_version: z.ZodLiteral<"remediation-host-handoff-record/v1alpha2">;
710
753
  scope_semantics: z.ZodLiteral<"explicit-directory-markers/v1">;
711
754
  }, "strict", z.ZodTypeAny, {
712
- contract_version: "remediation-host-handoff-record/v1alpha2";
713
755
  run_id: string;
756
+ contract_version: "remediation-host-handoff-record/v1alpha2";
714
757
  baseline_commit: string;
715
758
  workload_sha256: string;
716
759
  work_item_ids: string[];
717
760
  scope_semantics: "explicit-directory-markers/v1";
718
761
  }, {
719
- contract_version: "remediation-host-handoff-record/v1alpha2";
720
762
  run_id: string;
763
+ contract_version: "remediation-host-handoff-record/v1alpha2";
721
764
  baseline_commit: string;
722
765
  workload_sha256: string;
723
766
  work_item_ids: string[];
@@ -805,7 +848,7 @@ export declare const ClosingPlanSchema: z.ZodObject<{
805
848
  leftover_files?: string[] | undefined;
806
849
  }>>;
807
850
  }, "strict", z.ZodTypeAny, {
808
- action: "push" | "custom" | "commit" | "open-pr" | "publish" | "tag" | "none";
851
+ action: "push" | "custom" | "none" | "commit" | "open-pr" | "publish" | "tag";
809
852
  custom_command?: string[] | undefined;
810
853
  pre_authorized?: boolean | undefined;
811
854
  closing_action_preview?: {
@@ -814,7 +857,7 @@ export declare const ClosingPlanSchema: z.ZodObject<{
814
857
  leftover_files?: string[] | undefined;
815
858
  } | undefined;
816
859
  }, {
817
- action: "push" | "custom" | "commit" | "open-pr" | "publish" | "tag" | "none";
860
+ action: "push" | "custom" | "none" | "commit" | "open-pr" | "publish" | "tag";
818
861
  custom_command?: string[] | undefined;
819
862
  pre_authorized?: boolean | undefined;
820
863
  closing_action_preview?: {
@@ -921,6 +964,29 @@ export interface RemediationItemState {
921
964
  failure_reason?: string;
922
965
  /** Prompt-bound evidence supplied for a verified no-change host outcome. */
923
966
  host_result_evidence?: string[];
967
+ /**
968
+ * WHAT LANDED for this item, persisted at acceptance — the corroborated
969
+ * worktree outcome, not the host's claim. `commit_evidence.after` was verified
970
+ * reachable from HEAD and its diff-tree was verified to equal
971
+ * {@link host_landed_files} and to lie inside the item's prompt-bound write
972
+ * scope, so this is ground truth by the time it is written.
973
+ *
974
+ * It is persisted PER ITEM so a later boundary — the outcomes contract, the
975
+ * report — can attribute the landing to this item without re-running the
976
+ * ingest's git probes. `applied_edit_surface` is the run-wide union of
977
+ * {@link host_landed_files}; this is the per-item attribution that union
978
+ * cannot express.
979
+ *
980
+ * ITS READER IS `hasLandedCommitFor` (`steps/dispatch/hostHandoff.ts`), which
981
+ * asks whether ANY finding of a work item carries one. The ingest uses that
982
+ * answer to tell PARTIAL PROGRESS from unfinished work: a refusal that is
983
+ * "nothing is at the bound path" splits on it, so an item whose edits landed
984
+ * but whose result file is missing is reported to the host rather than
985
+ * disappearing as a bare missing-result line.
986
+ */
987
+ host_landed_commit?: string;
988
+ /** Repo-relative, path-sorted files the landed commit changed (see above). */
989
+ host_landed_files?: string[];
924
990
  /**
925
991
  * Item C — close-gate mechanical re-verify verdict for an analyzer-born
926
992
  * finding (set by `verifyAnalyzerLeads`; copied into the outcomes contract).
@@ -951,9 +1017,13 @@ export interface RemediationItemState {
951
1017
  * CDC-25/CDC-26 — SOURCE-SIDE SHAPE. The per-finding verification-evidence
952
1018
  * triple (file/line/mechanism) a producing module RECORDS onto this item at
953
1019
  * its OWN phase (INV-COVERAGE's "evidence producer" half) before the single
954
- * run-terminal `runClosePhase` PERSISTS it (INV-ISC-EVIDENCE-EMITTED). A
955
- * runtime data flow through this already-existing state item, not a
956
- * build-phase dependency: no cross-phase artifact token is minted for it.
1020
+ * run-terminal `runClosePhase` PERSISTS it (INV-ISC-EVIDENCE-EMITTED). The
1021
+ * producer is `verifyHeadEvidenceAgainstFindings`
1022
+ * (`src/remediate/phases/closeVerifyHeadEvidence.ts`), whose own reads of the
1023
+ * finding's cited location — at the audit's commit and at HEAD — are what the
1024
+ * triple names. A runtime data flow through this already-existing state item,
1025
+ * not a build-phase dependency: no cross-phase artifact token is minted for
1026
+ * it.
957
1027
  * This field lives here — inside item-status-partition-and-close's own
958
1028
  * file_scope — and is therefore owned BY SCOPE, not by a clause 1(c)
959
1029
  * declaration (that channel is only for a file outside every module's
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/remediate/state/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAM7D,OAAO,KAAK,EACV,OAAO,EACP,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,OAAO,EAAE,CAAC;AAWxB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAIzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAE9D,eAAO,MAAM,sBAAsB;;;IAI/B;;;OAGG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;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EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,EAAE,qBAAqB,CAAC;CAC9C"}
@@ -1,6 +1,7 @@
1
1
  import { type ValidationIssue, type JudgeReport, type WorkBlock, type WorkBlockSeam } from "audit-tools/shared";
2
2
  import { OBLIGATION_KIND_PRIORITY, type ObligationKind } from "../contractPipeline/obligationKinds.js";
3
3
  import { readIntakeRiskSignal, type AdversarialDepth } from "../riskSignal.js";
4
+ import type { JudgeRepairTarget } from "audit-tools/shared";
4
5
  import { type ContractPipelineCrossGateInputs, type GateOutcome } from "../validation/contractPipelineGates.js";
5
6
  import type { ContractPipelineArtifactName } from "../contractPipeline/artifactStore.js";
6
7
  import type { RemediationStep } from "./types.js";
@@ -187,6 +188,65 @@ export interface SeedSourceDigestMismatch {
187
188
  /** The path's current sha256, or `null` when it is no longer readable. */
188
189
  actual: string | null;
189
190
  }
191
+ /**
192
+ * The tool-named accept lane for seed-source drift — the file an OPERATOR writes
193
+ * to record "this drift is reviewed and does not invalidate the findings".
194
+ *
195
+ * A digest is a whole-file byte binding, so it moves for changes no finding is
196
+ * about: a release `version` bump in `package.json` moves the digest of every
197
+ * finding that cited `package.json` and blocked the run. The alarm was right
198
+ * that SOMETHING moved and wrong about whether the findings still held — there
199
+ * was no way to say so, and the run's remaining options were re-auditing or
200
+ * deleting the seed.
201
+ *
202
+ * WHY THE ACCEPT IS AN OPERATOR FILE AND NOT A DERIVED VERDICT. The tempting
203
+ * mechanical predicate is "do the drifted file's cited locations still exist"
204
+ * (line N still present). It is unsound in the direction that matters: a finding
205
+ * asserting "the config parser returns null on malformed input" cites line 42,
206
+ * and rewriting that line to throw leaves line 42 present, the digest
207
+ * moved, and the finding FALSE — the predicate accepts and the run designs
208
+ * against a claim the code no longer makes. That inference cannot be made from
209
+ * line counts by a language-neutral tool, and a predicate that is right about
210
+ * version bumps and wrong about behaviour changes is worse than no predicate:
211
+ * it silently converts "the alarm fired" into "the alarm was satisfied". So the
212
+ * judgment stays where it can actually be made — with the operator, recorded,
213
+ * and attributable — and the tool enforces only the shape of the record.
214
+ */
215
+ export interface SeedSourceAcceptance {
216
+ /** The seed-recorded source path this decision covers (repo-relative). */
217
+ path: string;
218
+ /** Why the drift does not invalidate the findings. Required, non-empty. */
219
+ rationale: string;
220
+ /**
221
+ * Who decided. Attributable identity, like the counterexample waiver and the
222
+ * loop-core review attestation — no mechanical channel can prove WHO decided,
223
+ * so the record names the decider rather than pretending to verify them.
224
+ */
225
+ accepted_by: string;
226
+ }
227
+ /** The tool-named host lane: the operator's drift acceptances land here. */
228
+ export declare function seedSourceAcceptancesPath(artifactsDir: string): string;
229
+ /**
230
+ * Read the operator's acceptances, keyed by the same path normalization the
231
+ * mismatch side uses. A malformed entry is DROPPED, never widened: an acceptance
232
+ * missing its rationale or its decider records no decision, and treating it as
233
+ * one would turn a shape defect into a silent bypass of the alarm.
234
+ */
235
+ export declare function readSeedSourceAcceptances(artifactsDir: string): Promise<Map<string, SeedSourceAcceptance>>;
236
+ /**
237
+ * The seed paths the operator's acceptance file covers, applied to the drifted
238
+ * set under the ONE path normalization both sides share; everything else blocks.
239
+ *
240
+ * This is the accept path and it is deliberately the ONLY automatic one: the
241
+ * gate cannot tell a benign drift from a falsifying one, and the one predicate
242
+ * that claimed to (cited line counts) was unsound — see {@link SeedSourceAcceptance}.
243
+ */
244
+ export declare function partitionSeedSourceDrift(artifactsDir: string, mismatches: readonly SeedSourceDigestMismatch[]): Promise<{
245
+ accepted: Array<SeedSourceAcceptance & {
246
+ mismatch: SeedSourceDigestMismatch;
247
+ }>;
248
+ blocking: SeedSourceDigestMismatch[];
249
+ }>;
190
250
  /**
191
251
  * Seed source-digest binding — re-hash every path the path_a seed recorded and
192
252
  * report the ones that moved. Pure over (root, seed): the caller decides what a
@@ -201,7 +261,7 @@ export declare function detectSeedSourceDigestMismatches(root: string, seed: Pat
201
261
  * the failing classifications. Post-redesign the default is
202
262
  * `finalized_module_contracts` (not `design_spec`).
203
263
  */
204
- type ExtendedRepairTarget = "finalized_module_contracts" | "obligation_ledger" | "contract_assessment_report";
264
+ type ExtendedRepairTarget = Exclude<JudgeRepairTarget, "counterexample" | "design_spec">;
205
265
  /**
206
266
  * Infer the most appropriate repair target from judge classifications when no
207
267
  * explicit repair_directive is provided. Examines only accepted classifications
@@ -501,6 +561,10 @@ export declare function collectDagWriteScopeRefusals(artifactsDir: string, root:
501
561
  * an invalid `source_finding_ids` declaration takes the same bounded re-emit as
502
562
  * every other promotion rejection, with no gate having executed past it.
503
563
  *
564
+ * The checks themselves are {@link evaluatePathACanonicalGroups} — the ONE body
565
+ * both this gate and the promoter call, so the gate can never certify a DAG the
566
+ * promoter then refuses.
567
+ *
504
568
  * Returns one line per violation; empty means the DAG is promotable on this
505
569
  * axis (or Path A is not in play at all).
506
570
  */