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
@@ -24,6 +24,7 @@
24
24
  * each owns the projection table for its own artifact set.
25
25
  */
26
26
  import { isRecord, stableStringifyProjection } from "audit-tools/shared";
27
+ import { DERIVABLE_MODULE_CONTRACT_FIELDS } from "./finalizedContractFields.js";
27
28
  export { stableStringifyProjection };
28
29
  /**
29
30
  * Non-semantic top-level fields stripped from EVERY artifact before projecting.
@@ -48,15 +49,11 @@ const UNIVERSAL_NON_SEMANTIC_FIELDS = ["created_at", "generated_at"];
48
49
  * whole obligation-bearing chain fresh, while a changed interface, a new
49
50
  * invariant, or a changed side effect correctly re-stales it.
50
51
  */
51
- const DERIVABLE_MODULE_CONTRACT_FIELDS = [
52
- "name",
53
- "inputs",
54
- "outputs",
55
- "invariants",
56
- "failure_modes",
57
- "side_effects",
58
- "validation_boundary",
59
- ];
52
+ // The projection's field list is the COPIED half of the ONE module-contract
53
+ // vocabulary (`finalizedContractFields.ts`) — see that module for why
54
+ // `seam_adjustments` (DERIVED at finalization, read by no deterministic
55
+ // consumer) is excluded: a re-agreed seam must not re-stale the ledger.
56
+ export { DERIVABLE_MODULE_CONTRACT_FIELDS };
60
57
  function stripFields(record, fields) {
61
58
  const drop = new Set(fields);
62
59
  return Object.fromEntries(Object.entries(record).filter(([key]) => !drop.has(key)));
@@ -1 +1 @@
1
- {"version":3,"file":"semanticProjection.js","sourceRoot":"","sources":["../../../src/remediate/contractPipeline/semanticProjection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,QAAQ,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAGzE,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,6BAA6B,GAAsB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;AAExF;;;;;;;;;;;;;;GAcG;AACH,MAAM,gCAAgC,GAAsB;IAC1D,MAAM;IACN,QAAQ;IACR,SAAS;IACT,YAAY;IACZ,eAAe;IACf,cAAc;IACd,qBAAqB;CACtB,CAAC;AAEF,SAAS,WAAW,CAClB,MAA+B,EAC/B,MAAyB;IAEzB,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CACzD,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB,CAC5B,KAAc,EACd,MAAyB;IAEzB,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5C,MAAM,GAAG,GAA4B,EAAE,CAAC;IACxC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,4EAA4E;QAC5E,0EAA0E;QAC1E,0EAA0E;QAC1E,0EAA0E;QAC1E,sEAAsE;QACtE,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,SAAS;YAAE,SAAS;QAC1C,GAAG,CAAC,KAAK,CAAC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AAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACxD,qBAAqB,CAAC,KAAK,EAAE,gCAAgC,CAAC,CAC/D;aACF,CAAC,CAAC;QACL,CAAC;QACD,OAAO,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;GAKG"}
1
+ {"version":3,"file":"semanticProjection.js","sourceRoot":"","sources":["../../../src/remediate/contractPipeline/semanticProjection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,QAAQ,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAAE,gCAAgC,EAAE,MAAM,8BAA8B,CAAC;AAEhF,OAAO,EAAE,yBAAyB,EAAE,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,6BAA6B,GAAsB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;AAExF;;;;;;;;;;;;;;GAcG;AACH,4EAA4E;AAC5E,sEAAsE;AACtE,wEAAwE;AACxE,wEAAwE;AACxE,OAAO,EAAE,gCAAgC,EAAE,CAAC;AAE5C,SAAS,WAAW,CAClB,MAA+B,EAC/B,MAAyB;IAEzB,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CACzD,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB,CAC5B,KAAc,EACd,MAAyB;IAEzB,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5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,+EAA+E;IAC/E,iEAAiE;IACjE,IAAI,IAAI,KAAK,4BAA4B,IAAI,IAAI,KAAK,kBAAkB,EAAE,CAAC;QACzE,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC7C,OAAO,uBAAuB,CAAC;gBAC7B,GAAG,QAAQ;gBACX,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACxD,qBAAqB,CAAC,KAAK,EAAE,gCAAgC,CAAC,CAC/D;aACF,CAAC,CAAC;QACL,CAAC;QACD,OAAO,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;GAKG"}
@@ -0,0 +1,183 @@
1
+ /**
2
+ * The value vocabularies a step prompt's schema sketch and its VALIDATOR both
3
+ * read — declared once, here, so they cannot disagree.
4
+ *
5
+ * Why this module exists. A step prompt hands the worker a JSON shape to write,
6
+ * and a validator in `src/remediate/validation/` decides whether what came back
7
+ * is admissible. Those were two independent statements of the same fact: the
8
+ * prompt carried a hand-written sketch (`contractPipelinePrompts.ts`, plus two
9
+ * extra sketches in `contractPipeline.ts`) and the validator carried its own
10
+ * literal list. Measured drifts at HEAD before this module existed:
11
+ *
12
+ * - `cyclic_seam_resolution.status` — sketch offered 2 values, the validator
13
+ * admits 4 (`user_decision_required` and `blocked` were unrenderable but
14
+ * required by the refusal path);
15
+ * - `judge_report.repair_directive.target` — sketch offered 3, the validator 4
16
+ * (the fourth, `counterexample`, could never be asked for);
17
+ * - `verification_report.finding.traces[].kind` — sketch offered 5, the
18
+ * validator 6;
19
+ * - `implementation_dag.node.status` — sketch showed exactly 1 of the 4 the
20
+ * validator admits.
21
+ *
22
+ * Every one is the same failure: a worker reads the sketch, emits a value the
23
+ * sketch allowed, and the tool refuses it — or, worse in the opposite
24
+ * direction, never learns a legal value exists. A drift test made of "remember
25
+ * to update the other one" is exactly the class of guarantee this repo bans
26
+ * (enforce in tooling, never host — or author — discretion), so the fix is not
27
+ * a test that watches two lists. It is ONE declaration, with the validator and
28
+ * the sketch both deriving from it.
29
+ *
30
+ * What is MINED vs DECLARED. The values are declared here; they are NOT read out
31
+ * of the validator module, because a validator states its values as inline
32
+ * `requireOneOf(...)` literals inside a function body — a declaration a test can
33
+ * only reach by parsing source text, which is the brittle thing this replaces.
34
+ * Instead the exported constants are the single declaration and the VALIDATOR
35
+ * imports them, so the drift is impossible by construction rather than detected
36
+ * after the fact. The test in
37
+ * `tests/remediate/step-prompt-sketch-drift.test.ts` then re-derives each
38
+ * vocabulary from what each validator actually REFUSES (by feeding it values),
39
+ * and compares that to the sketch the prompt renders — so a value added to a
40
+ * validator without the sketch still reds, without depending on how the
41
+ * validator happens to spell its list.
42
+ *
43
+ * NOT A LIST. Every value vocabulary that the CONTRACT-PIPELINE role sketches
44
+ * render as an alternation is declared here — the four drifted ones above, the
45
+ * obligation/test-plan pairs, and the nine that were still hand-written literals
46
+ * in `contractPipelinePrompts.ts` (goal `source_type`; context-entry `kind`; the
47
+ * critique item `kind` and `severity`; the critique `verdict`; the assessment
48
+ * finding `status` and report `verdict`; the judge `verdict`; and the judge's
49
+ * counterexample `classification`). That is the whole point: a vocabulary kept
50
+ * as a literal is only safe while someone remembers, and the drift test below
51
+ * sweeps every rendered alternation of those sketches rather than a hand-kept
52
+ * field list, so the next literal to appear reds immediately instead of waiting
53
+ * to be noticed.
54
+ *
55
+ * The scope is those sketches, NOT every sketch in the repository, and the
56
+ * difference is recorded rather than implied: the sweep reaches the modules in
57
+ * `SKETCH_SOURCE_MODULES`, and the clarification-resolution sketch in
58
+ * `steps/prompts.ts` is outside them — a declared-gap row in
59
+ * `tests/shared/promptContractRegistry.ts`. So this module claims nothing about
60
+ * that one, and widening the sweep is its own change.
61
+ */
62
+ /**
63
+ * `cyclic_seam_resolution.status`. Four values: two describe a resolution the
64
+ * worker authored, two describe a resolution the tool must escalate or refuse.
65
+ */
66
+ export declare const CYCLIC_SEAM_RESOLUTION_STATUSES: readonly ["no_cycles", "resolved", "user_decision_required", "blocked"];
67
+ /** `cyclic_seam_resolution.cycles[].break_strategy`. */
68
+ export declare const CYCLIC_SEAM_BREAK_STRATEGIES: readonly ["mediator", "single_authority"];
69
+ /**
70
+ * `judge_report.repair_directive.target`, its legacy aliases, and the offered
71
+ * subset — DECLARED in `src/shared/types/contractPipeline/obligations.ts`,
72
+ * beside the `JudgeRepairTarget` type that derives from them, and re-exported
73
+ * here so the validator and the prompt sketches keep reading them from this
74
+ * module.
75
+ *
76
+ * Why they moved. `src/shared` is the base layer; this module lives in
77
+ * `src/remediate`. A value import from the base layer into an orchestrator is
78
+ * the dependency direction inverted, and the declaration had to live on the
79
+ * side the TYPE could reach.
80
+ */
81
+ export { CONTRACT_REPAIR_TARGETS, CONTRACT_REPAIR_TARGETS_LEGACY, CONTRACT_REPAIR_TARGETS_OFFERED, } from "audit-tools/shared";
82
+ /** `verification_report` trace `kind`. */
83
+ export declare const VERIFICATION_TRACE_KINDS: readonly ["requirement", "invariant", "counterexample", "task", "file", "command"];
84
+ /** `verification_report` finding-level `overall_status` (report level excludes `skipped`). */
85
+ export declare const VERIFICATION_FINDING_STATUSES: readonly ["passed", "failed", "skipped"];
86
+ /** `verification_report` report-level `overall_status`. */
87
+ export declare const VERIFICATION_REPORT_STATUSES: readonly ["passed", "failed"];
88
+ /** `verification_report` trace `status`. */
89
+ export declare const VERIFICATION_TRACE_STATUSES: readonly ["passed", "failed"];
90
+ /** `implementation_dag.nodes[].status`. */
91
+ export declare const IMPLEMENTATION_NODE_STATUSES: readonly ["pending", "in_progress", "resolved", "blocked"];
92
+ /** `implementation_dag.edges[].kind`. */
93
+ export declare const IMPLEMENTATION_EDGE_KINDS: readonly ["dependency", "verification"];
94
+ /**
95
+ * `obligation_ledger.obligations[].status`. `satisfied` is reachable only
96
+ * through the tool's own derivation (`contractPipeline/derive.ts`) — a worker
97
+ * emits `pending` and the tool advances it — but the value is part of the
98
+ * contract the prompt describes, so it is declared here rather than implied.
99
+ */
100
+ export declare const OBLIGATION_STATUSES: readonly ["pending", "satisfied", "failed"];
101
+ /** `obligation_ledger.obligations[].kind`. */
102
+ export declare const OBLIGATION_KINDS: readonly ["invariant", "behavioral", "structural", "test"];
103
+ /** `test_validator_plan.test_specs[].kind`. */
104
+ export declare const TEST_SPEC_KINDS: readonly ["unit", "integration", "schema", "invariant", "e2e"];
105
+ /** `goal_spec.source_type`. */
106
+ export declare const GOAL_SOURCE_TYPES: readonly ["conversation", "document", "structured_audit", "mixed"];
107
+ /** `context_bundle.entries[].kind`. */
108
+ export declare const CONTEXT_ENTRY_KINDS: readonly ["source", "test", "config", "doc"];
109
+ /** `conceptual_design_critique.items[].kind`. */
110
+ export declare const CRITIQUE_ITEM_KINDS: readonly ["concern", "alternative", "suggestion"];
111
+ /** `conceptual_design_critique.items[].severity`. */
112
+ export declare const CRITIQUE_ITEM_SEVERITIES: readonly ["blocking", "advisory"];
113
+ /** `conceptual_design_critique.verdict`. */
114
+ export declare const CRITIQUE_VERDICTS: readonly ["approved", "approved_with_concerns", "rejected"];
115
+ /** `contract_assessment_report.findings[].status`. */
116
+ export declare const ASSESSMENT_FINDING_STATUSES: readonly ["satisfied", "violated", "uncertain"];
117
+ /** `contract_assessment_report.verdict`. */
118
+ export declare const ASSESSMENT_VERDICTS: readonly ["passed", "failed", "partial"];
119
+ /** `judge_report.verdict`. */
120
+ export declare const JUDGE_VERDICTS: readonly ["approved", "needs_repair"];
121
+ /**
122
+ * `judge_report.classifications[].classification` — what the judge may decide
123
+ * about one counterexample.
124
+ *
125
+ * Declared here rather than in the validator that reads it, because the judge
126
+ * role's prompt sketch states the same five values and a sketch that renders a
127
+ * hand-written copy of a validator's list is the drift this module bans. The
128
+ * validator imports THIS declaration (it was a local `as const` beside
129
+ * `validateJudgeReport`), so the two are one fact.
130
+ */
131
+ export declare const COUNTEREXAMPLE_CLASSIFICATIONS: readonly ["accepted", "out_of_scope", "duplicate", "invalid", "residual_risk"];
132
+ /**
133
+ * `seam_reconciliation_report.mismatches[].resolution.decision` — which side of
134
+ * a seam adjusts. Declared here beside the rest for ONE reason: the alternative
135
+ * would be to exclude it from the drift test by hand, and an exclusion list is
136
+ * the drift this module exists to make impossible (see the test's alternation
137
+ * sweep, which matches EVERY rendered alternation to a validator probe).
138
+ */
139
+ export declare const SEAM_RESOLUTION_DECISIONS: readonly ["A", "B", "both"];
140
+ /**
141
+ * The vocabularies that carry a `created_at`, and the ones that do not.
142
+ *
143
+ * `created_at` asymmetry, resolved in one place. Every contract-pipeline
144
+ * validator ends with `requireString(v.created_at, ...)`, and NO sketch
145
+ * declares the field — the reconciliation is `stampToolCreatedAt`
146
+ * (`contractPipeline/artifactStore.ts`), which the tool calls on the payload at
147
+ * ingest and at the `validate-artifact` self-check. The host has no clock, so
148
+ * asking it for a timestamp is asking it to invent one; the tool owns the field
149
+ * and stamps it.
150
+ *
151
+ * The decision, stated once rather than left implicit: THE VALIDATORS KEEP
152
+ * REQUIRING IT AND THE SKETCHES KEEP OMITTING IT — because the requirement is
153
+ * enforced on the POST-STAMP payload, not on what the worker wrote. The
154
+ * asymmetry is not a drift to be closed in either direction: declaring
155
+ * `created_at` in the sketches would tell the worker to supply a value the tool
156
+ * then overrides (the stamp is `created_at`-wins-if-present, but a host-invented
157
+ * clock reading is still worse than the tool's), and dropping the requirement
158
+ * from the validators would let an artifact that never passed the stamp path —
159
+ * a hand-written file validated directly — carry no timestamp at all.
160
+ *
161
+ * This is a DECISION, not a drift (see the drift test's `created_at` block):
162
+ * the validators keep requiring it and the sketches keep omitting it, because
163
+ * the requirement is enforced on the POST-STAMP payload rather than on what the
164
+ * worker wrote. Closing the asymmetry in either direction is worse — declaring
165
+ * it in the sketches asks the host for a clock reading the tool then overrides,
166
+ * and dropping it from the validators lets a directly-validated hand-written
167
+ * file carry no timestamp at all.
168
+ */
169
+ export declare const CREATED_AT_OWNER: "stampToolCreatedAt";
170
+ /**
171
+ * Whether `value` is one of {@link CYCLIC_SEAM_BREAK_STRATEGIES} — the ONE
172
+ * membership test for the vocabulary, so the tool's post-hoc cycle-break check
173
+ * and the prompt's sketch read the same declaration.
174
+ */
175
+ export declare function isCyclicSeamBreakStrategy(value: unknown): value is (typeof CYCLIC_SEAM_BREAK_STRATEGIES)[number];
176
+ /**
177
+ * Render a sketch fragment for a value vocabulary: `"a | b | c"`.
178
+ *
179
+ * The ONE renderer for every `requireOneOf`-style vocabulary in the sketches,
180
+ * so the separators and quoting in a prompt cannot drift from each other either.
181
+ */
182
+ export declare function sketchValues(values: readonly string[]): string;
183
+ //# sourceMappingURL=sketchSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sketchSource.d.ts","sourceRoot":"","sources":["../../../src/remediate/contractPipeline/sketchSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH;;;GAGG;AACH,eAAO,MAAM,+BAA+B,yEAKlC,CAAC;AAEX,wDAAwD;AACxD,eAAO,MAAM,4BAA4B,2CAG/B,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,OAAO,EACL,uBAAuB,EACvB,8BAA8B,EAC9B,+BAA+B,GAChC,MAAM,oBAAoB,CAAC;AAE5B,0CAA0C;AAC1C,eAAO,MAAM,wBAAwB,oFAO3B,CAAC;AAEX,8FAA8F;AAC9F,eAAO,MAAM,6BAA6B,0CAIhC,CAAC;AAEX,2DAA2D;AAC3D,eAAO,MAAM,4BAA4B,+BAAgC,CAAC;AAE1E,4CAA4C;AAC5C,eAAO,MAAM,2BAA2B,+BAAgC,CAAC;AAEzE,2CAA2C;AAC3C,eAAO,MAAM,4BAA4B,4DAK/B,CAAC;AAEX,yCAAyC;AACzC,eAAO,MAAM,yBAAyB,yCAA0C,CAAC;AAEjF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,6CAItB,CAAC;AAEX,8CAA8C;AAC9C,eAAO,MAAM,gBAAgB,4DAKnB,CAAC;AAEX,+CAA+C;AAC/C,eAAO,MAAM,eAAe,gEAMlB,CAAC;AAEX,+BAA+B;AAC/B,eAAO,MAAM,iBAAiB,oEAKpB,CAAC;AAEX,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,8CAKtB,CAAC;AAEX,iDAAiD;AACjD,eAAO,MAAM,mBAAmB,mDAItB,CAAC;AAEX,qDAAqD;AACrD,eAAO,MAAM,wBAAwB,mCAAoC,CAAC;AAE1E,4CAA4C;AAC5C,eAAO,MAAM,iBAAiB,6DAIpB,CAAC;AAEX,sDAAsD;AACtD,eAAO,MAAM,2BAA2B,iDAI9B,CAAC;AAEX,4CAA4C;AAC5C,eAAO,MAAM,mBAAmB,0CAA2C,CAAC;AAE5E,8BAA8B;AAC9B,eAAO,MAAM,cAAc,uCAAwC,CAAC;AAEpE;;;;;;;;;GASG;AACH,eAAO,MAAM,8BAA8B,gFAMjC,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,6BAA8B,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,gBAAgB,EAAG,oBAA6B,CAAC;AAE9D;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAKxD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAE9D"}
@@ -0,0 +1,255 @@
1
+ /**
2
+ * The value vocabularies a step prompt's schema sketch and its VALIDATOR both
3
+ * read — declared once, here, so they cannot disagree.
4
+ *
5
+ * Why this module exists. A step prompt hands the worker a JSON shape to write,
6
+ * and a validator in `src/remediate/validation/` decides whether what came back
7
+ * is admissible. Those were two independent statements of the same fact: the
8
+ * prompt carried a hand-written sketch (`contractPipelinePrompts.ts`, plus two
9
+ * extra sketches in `contractPipeline.ts`) and the validator carried its own
10
+ * literal list. Measured drifts at HEAD before this module existed:
11
+ *
12
+ * - `cyclic_seam_resolution.status` — sketch offered 2 values, the validator
13
+ * admits 4 (`user_decision_required` and `blocked` were unrenderable but
14
+ * required by the refusal path);
15
+ * - `judge_report.repair_directive.target` — sketch offered 3, the validator 4
16
+ * (the fourth, `counterexample`, could never be asked for);
17
+ * - `verification_report.finding.traces[].kind` — sketch offered 5, the
18
+ * validator 6;
19
+ * - `implementation_dag.node.status` — sketch showed exactly 1 of the 4 the
20
+ * validator admits.
21
+ *
22
+ * Every one is the same failure: a worker reads the sketch, emits a value the
23
+ * sketch allowed, and the tool refuses it — or, worse in the opposite
24
+ * direction, never learns a legal value exists. A drift test made of "remember
25
+ * to update the other one" is exactly the class of guarantee this repo bans
26
+ * (enforce in tooling, never host — or author — discretion), so the fix is not
27
+ * a test that watches two lists. It is ONE declaration, with the validator and
28
+ * the sketch both deriving from it.
29
+ *
30
+ * What is MINED vs DECLARED. The values are declared here; they are NOT read out
31
+ * of the validator module, because a validator states its values as inline
32
+ * `requireOneOf(...)` literals inside a function body — a declaration a test can
33
+ * only reach by parsing source text, which is the brittle thing this replaces.
34
+ * Instead the exported constants are the single declaration and the VALIDATOR
35
+ * imports them, so the drift is impossible by construction rather than detected
36
+ * after the fact. The test in
37
+ * `tests/remediate/step-prompt-sketch-drift.test.ts` then re-derives each
38
+ * vocabulary from what each validator actually REFUSES (by feeding it values),
39
+ * and compares that to the sketch the prompt renders — so a value added to a
40
+ * validator without the sketch still reds, without depending on how the
41
+ * validator happens to spell its list.
42
+ *
43
+ * NOT A LIST. Every value vocabulary that the CONTRACT-PIPELINE role sketches
44
+ * render as an alternation is declared here — the four drifted ones above, the
45
+ * obligation/test-plan pairs, and the nine that were still hand-written literals
46
+ * in `contractPipelinePrompts.ts` (goal `source_type`; context-entry `kind`; the
47
+ * critique item `kind` and `severity`; the critique `verdict`; the assessment
48
+ * finding `status` and report `verdict`; the judge `verdict`; and the judge's
49
+ * counterexample `classification`). That is the whole point: a vocabulary kept
50
+ * as a literal is only safe while someone remembers, and the drift test below
51
+ * sweeps every rendered alternation of those sketches rather than a hand-kept
52
+ * field list, so the next literal to appear reds immediately instead of waiting
53
+ * to be noticed.
54
+ *
55
+ * The scope is those sketches, NOT every sketch in the repository, and the
56
+ * difference is recorded rather than implied: the sweep reaches the modules in
57
+ * `SKETCH_SOURCE_MODULES`, and the clarification-resolution sketch in
58
+ * `steps/prompts.ts` is outside them — a declared-gap row in
59
+ * `tests/shared/promptContractRegistry.ts`. So this module claims nothing about
60
+ * that one, and widening the sweep is its own change.
61
+ */
62
+ /**
63
+ * `cyclic_seam_resolution.status`. Four values: two describe a resolution the
64
+ * worker authored, two describe a resolution the tool must escalate or refuse.
65
+ */
66
+ export const CYCLIC_SEAM_RESOLUTION_STATUSES = [
67
+ "no_cycles",
68
+ "resolved",
69
+ "user_decision_required",
70
+ "blocked",
71
+ ];
72
+ /** `cyclic_seam_resolution.cycles[].break_strategy`. */
73
+ export const CYCLIC_SEAM_BREAK_STRATEGIES = [
74
+ "mediator",
75
+ "single_authority",
76
+ ];
77
+ /**
78
+ * `judge_report.repair_directive.target`, its legacy aliases, and the offered
79
+ * subset — DECLARED in `src/shared/types/contractPipeline/obligations.ts`,
80
+ * beside the `JudgeRepairTarget` type that derives from them, and re-exported
81
+ * here so the validator and the prompt sketches keep reading them from this
82
+ * module.
83
+ *
84
+ * Why they moved. `src/shared` is the base layer; this module lives in
85
+ * `src/remediate`. A value import from the base layer into an orchestrator is
86
+ * the dependency direction inverted, and the declaration had to live on the
87
+ * side the TYPE could reach.
88
+ */
89
+ export { CONTRACT_REPAIR_TARGETS, CONTRACT_REPAIR_TARGETS_LEGACY, CONTRACT_REPAIR_TARGETS_OFFERED, } from "audit-tools/shared";
90
+ /** `verification_report` trace `kind`. */
91
+ export const VERIFICATION_TRACE_KINDS = [
92
+ "requirement",
93
+ "invariant",
94
+ "counterexample",
95
+ "task",
96
+ "file",
97
+ "command",
98
+ ];
99
+ /** `verification_report` finding-level `overall_status` (report level excludes `skipped`). */
100
+ export const VERIFICATION_FINDING_STATUSES = [
101
+ "passed",
102
+ "failed",
103
+ "skipped",
104
+ ];
105
+ /** `verification_report` report-level `overall_status`. */
106
+ export const VERIFICATION_REPORT_STATUSES = ["passed", "failed"];
107
+ /** `verification_report` trace `status`. */
108
+ export const VERIFICATION_TRACE_STATUSES = ["passed", "failed"];
109
+ /** `implementation_dag.nodes[].status`. */
110
+ export const IMPLEMENTATION_NODE_STATUSES = [
111
+ "pending",
112
+ "in_progress",
113
+ "resolved",
114
+ "blocked",
115
+ ];
116
+ /** `implementation_dag.edges[].kind`. */
117
+ export const IMPLEMENTATION_EDGE_KINDS = ["dependency", "verification"];
118
+ /**
119
+ * `obligation_ledger.obligations[].status`. `satisfied` is reachable only
120
+ * through the tool's own derivation (`contractPipeline/derive.ts`) — a worker
121
+ * emits `pending` and the tool advances it — but the value is part of the
122
+ * contract the prompt describes, so it is declared here rather than implied.
123
+ */
124
+ export const OBLIGATION_STATUSES = [
125
+ "pending",
126
+ "satisfied",
127
+ "failed",
128
+ ];
129
+ /** `obligation_ledger.obligations[].kind`. */
130
+ export const OBLIGATION_KINDS = [
131
+ "invariant",
132
+ "behavioral",
133
+ "structural",
134
+ "test",
135
+ ];
136
+ /** `test_validator_plan.test_specs[].kind`. */
137
+ export const TEST_SPEC_KINDS = [
138
+ "unit",
139
+ "integration",
140
+ "schema",
141
+ "invariant",
142
+ "e2e",
143
+ ];
144
+ /** `goal_spec.source_type`. */
145
+ export const GOAL_SOURCE_TYPES = [
146
+ "conversation",
147
+ "document",
148
+ "structured_audit",
149
+ "mixed",
150
+ ];
151
+ /** `context_bundle.entries[].kind`. */
152
+ export const CONTEXT_ENTRY_KINDS = [
153
+ "source",
154
+ "test",
155
+ "config",
156
+ "doc",
157
+ ];
158
+ /** `conceptual_design_critique.items[].kind`. */
159
+ export const CRITIQUE_ITEM_KINDS = [
160
+ "concern",
161
+ "alternative",
162
+ "suggestion",
163
+ ];
164
+ /** `conceptual_design_critique.items[].severity`. */
165
+ export const CRITIQUE_ITEM_SEVERITIES = ["blocking", "advisory"];
166
+ /** `conceptual_design_critique.verdict`. */
167
+ export const CRITIQUE_VERDICTS = [
168
+ "approved",
169
+ "approved_with_concerns",
170
+ "rejected",
171
+ ];
172
+ /** `contract_assessment_report.findings[].status`. */
173
+ export const ASSESSMENT_FINDING_STATUSES = [
174
+ "satisfied",
175
+ "violated",
176
+ "uncertain",
177
+ ];
178
+ /** `contract_assessment_report.verdict`. */
179
+ export const ASSESSMENT_VERDICTS = ["passed", "failed", "partial"];
180
+ /** `judge_report.verdict`. */
181
+ export const JUDGE_VERDICTS = ["approved", "needs_repair"];
182
+ /**
183
+ * `judge_report.classifications[].classification` — what the judge may decide
184
+ * about one counterexample.
185
+ *
186
+ * Declared here rather than in the validator that reads it, because the judge
187
+ * role's prompt sketch states the same five values and a sketch that renders a
188
+ * hand-written copy of a validator's list is the drift this module bans. The
189
+ * validator imports THIS declaration (it was a local `as const` beside
190
+ * `validateJudgeReport`), so the two are one fact.
191
+ */
192
+ export const COUNTEREXAMPLE_CLASSIFICATIONS = [
193
+ "accepted",
194
+ "out_of_scope",
195
+ "duplicate",
196
+ "invalid",
197
+ "residual_risk",
198
+ ];
199
+ /**
200
+ * `seam_reconciliation_report.mismatches[].resolution.decision` — which side of
201
+ * a seam adjusts. Declared here beside the rest for ONE reason: the alternative
202
+ * would be to exclude it from the drift test by hand, and an exclusion list is
203
+ * the drift this module exists to make impossible (see the test's alternation
204
+ * sweep, which matches EVERY rendered alternation to a validator probe).
205
+ */
206
+ export const SEAM_RESOLUTION_DECISIONS = ["A", "B", "both"];
207
+ /**
208
+ * The vocabularies that carry a `created_at`, and the ones that do not.
209
+ *
210
+ * `created_at` asymmetry, resolved in one place. Every contract-pipeline
211
+ * validator ends with `requireString(v.created_at, ...)`, and NO sketch
212
+ * declares the field — the reconciliation is `stampToolCreatedAt`
213
+ * (`contractPipeline/artifactStore.ts`), which the tool calls on the payload at
214
+ * ingest and at the `validate-artifact` self-check. The host has no clock, so
215
+ * asking it for a timestamp is asking it to invent one; the tool owns the field
216
+ * and stamps it.
217
+ *
218
+ * The decision, stated once rather than left implicit: THE VALIDATORS KEEP
219
+ * REQUIRING IT AND THE SKETCHES KEEP OMITTING IT — because the requirement is
220
+ * enforced on the POST-STAMP payload, not on what the worker wrote. The
221
+ * asymmetry is not a drift to be closed in either direction: declaring
222
+ * `created_at` in the sketches would tell the worker to supply a value the tool
223
+ * then overrides (the stamp is `created_at`-wins-if-present, but a host-invented
224
+ * clock reading is still worse than the tool's), and dropping the requirement
225
+ * from the validators would let an artifact that never passed the stamp path —
226
+ * a hand-written file validated directly — carry no timestamp at all.
227
+ *
228
+ * This is a DECISION, not a drift (see the drift test's `created_at` block):
229
+ * the validators keep requiring it and the sketches keep omitting it, because
230
+ * the requirement is enforced on the POST-STAMP payload rather than on what the
231
+ * worker wrote. Closing the asymmetry in either direction is worse — declaring
232
+ * it in the sketches asks the host for a clock reading the tool then overrides,
233
+ * and dropping it from the validators lets a directly-validated hand-written
234
+ * file carry no timestamp at all.
235
+ */
236
+ export const CREATED_AT_OWNER = "stampToolCreatedAt";
237
+ /**
238
+ * Whether `value` is one of {@link CYCLIC_SEAM_BREAK_STRATEGIES} — the ONE
239
+ * membership test for the vocabulary, so the tool's post-hoc cycle-break check
240
+ * and the prompt's sketch read the same declaration.
241
+ */
242
+ export function isCyclicSeamBreakStrategy(value) {
243
+ return (typeof value === "string" &&
244
+ CYCLIC_SEAM_BREAK_STRATEGIES.includes(value));
245
+ }
246
+ /**
247
+ * Render a sketch fragment for a value vocabulary: `"a | b | c"`.
248
+ *
249
+ * The ONE renderer for every `requireOneOf`-style vocabulary in the sketches,
250
+ * so the separators and quoting in a prompt cannot drift from each other either.
251
+ */
252
+ export function sketchValues(values) {
253
+ return values.join(" | ");
254
+ }
255
+ //# sourceMappingURL=sketchSource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sketchSource.js","sourceRoot":"","sources":["../../../src/remediate/contractPipeline/sketchSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,WAAW;IACX,UAAU;IACV,wBAAwB;IACxB,SAAS;CACD,CAAC;AAEX,wDAAwD;AACxD,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,UAAU;IACV,kBAAkB;CACV,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,OAAO,EACL,uBAAuB,EACvB,8BAA8B,EAC9B,+BAA+B,GAChC,MAAM,oBAAoB,CAAC;AAE5B,0CAA0C;AAC1C,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,aAAa;IACb,WAAW;IACX,gBAAgB;IAChB,MAAM;IACN,MAAM;IACN,SAAS;CACD,CAAC;AAEX,8FAA8F;AAC9F,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,QAAQ;IACR,QAAQ;IACR,SAAS;CACD,CAAC;AAEX,2DAA2D;AAC3D,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAE1E,4CAA4C;AAC5C,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAEzE,2CAA2C;AAC3C,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,SAAS;IACT,aAAa;IACb,UAAU;IACV,SAAS;CACD,CAAC;AAEX,yCAAyC;AACzC,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,YAAY,EAAE,cAAc,CAAU,CAAC;AAEjF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,SAAS;IACT,WA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sB,oBAAoB,CACxC,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,mBAAmB,CAAC,CAsC9B"}
@@ -1,3 +1,4 @@
1
+ // <!-- comment-symbol-exempt: names deliberately-retired symbols; this block records that history -->
1
2
  // Single finding-filter pass (review-gate convergence, chunk A).
2
3
  //
3
4
  // The pre-planning filters — no-evidence drop, cross-lens dedup, phantom-path
@@ -1 +1 @@
1
- {"version":3,"file":"findingFilter.js","sourceRoot":"","sources":["../../src/remediate/findingFilter.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,6EAA6E;AAC7E,+EAA+E;AAC/E,kFAAkF;AAClF,+EAA+E;AAC/E,qEAAqE;AACrE,EAAE;AACF,kFAAkF;AAClF,2EAA2E;AAC3E,0EAA0E;AAC1E,gFAAgF;AAChF,aAAa;AACb,EAAE;AACF,iFAAiF;AACjF,0EAA0E;AAG1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EACL,uBAAuB,GAExB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAgC1E;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,QAAmB,EACnB,OAAoC;IAEpC,uBAAuB;IACvB,MAAM,iBAAiB,GAAG,QAAQ;SAC/B,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC;SACpE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACpB,IAAI,IAAI,GAAG,QAAQ,CAAC,MAAM,CACxB,CAAC,CAAC,EAAE,EAAE,CAAC,KAA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GAAG,CAAC,OAAO,CAAC,sBAAsB;YAChC,CAAC,CAAC,EAAE,sBAAsB,EAAE,OAAO,CAAC,sBAAsB,EAAE;YAC5D,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAC;IACH,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC;IAE1B,kCAAkC;IAClC,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,mBAAmB,EAAE,GAC7D,0BAA0B,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACvD,IAAI,GAAG,cAAc,CAAC;IAEtB,OAAO;QACL,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,iBAAiB;QACjB,mBAAmB,EAAE,IAAI,GAAG,CAC1B,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAC7D;QACD,mBAAmB,EAAE,SAAS,CAAC,qBAAqB;QACpD,mBAAmB;KACpB,CAAC;AACJ,CAAC"}
@@ -83,6 +83,87 @@ export declare function resolveRootOption(rawRoot: string | undefined): string;
83
83
  * supplied at all.
84
84
  */
85
85
  export declare function resolveArtifactsDirOption(root: string, artifactsDir: string): string;
86
+ /**
87
+ * The outcome of one operator recovery verb, as data: the JSON body to print,
88
+ * the process exit code, and (for a failure that should read as a reason rather
89
+ * than as a result) the message to print on stderr. Both recovery verbs return
90
+ * this so the commander action branches are thin argv→call→print shims and the
91
+ * real decisions — the recovered-nothing classification, the exit code, the
92
+ * step-contract invalidation — are callable directly by a test. The branches
93
+ * used to be testable only by spawning the CLI, which is why the
94
+ * nothing-recovered path and the two `process.exit(1)` sites were covered by
95
+ * exactly nothing.
96
+ */
97
+ export type RecoveryVerbResult = {
98
+ readonly status: "recovered";
99
+ readonly body: Record<string, unknown>;
100
+ } | {
101
+ readonly status: "recovered-with-issues" | "nothing-to-recover" | "pending";
102
+ readonly body: Record<string, unknown>;
103
+ readonly exitCode: number;
104
+ }
105
+ /** The verb could not run at all (an exception, or no live binding). */
106
+ | {
107
+ readonly status: "unrunnable";
108
+ readonly message: string;
109
+ };
110
+ /**
111
+ * `recover-ingest`'s whole decision, minus argv parsing and printing.
112
+ *
113
+ * Exit code, not prose, is what an operator scripts on — so the three outcomes
114
+ * are told apart mechanically, in this precedence:
115
+ *
116
+ * 75 the EXPECTED-PENDING outcome, tested FIRST: every issue is
117
+ * `submission_missing`, i.e. the run is waiting on results the host simply
118
+ * has not written yet. No operator action is implied, so this must not read
119
+ * as a fault — not even when a sibling item was accepted in the same pass,
120
+ * because the issues are what an operator acts on and none of them asks for
121
+ * anything. (`accepted_count` in the body still reports the acceptance.)
122
+ * 2 ACCEPTED-WITH-ISSUES: something was accepted AND something was really
123
+ * refused. Tested before the clean arm, because the clean arm's condition
124
+ * ("something was accepted") is a strict superset: without this arm a
125
+ * partial recovery reports the same status token as a complete one, and a
126
+ * caller scripting on the token cannot see the refusal at all.
127
+ * 0 otherwise, everything the pass saw was accepted
128
+ * 1 otherwise (nothing accepted, and not every issue is expected-pending): a
129
+ * run that recovered NOTHING is not a recovery, and any REAL issue — a
130
+ * partial ingest, a moved tree, a refused payload — is a failure.
131
+ *
132
+ * The pending arm is the distinction the entry asks for: "the host hasn't
133
+ * finished" must not read identically to "the run is wedged", or an operator's
134
+ * retry loop cannot tell a normal wait from a real fault. `submission_missing`
135
+ * is the ONLY issue code that means expected-pending — every other code
136
+ * describes something the operator must act on. (75 = EX_TEMPFAIL, the
137
+ * conventional "try again" code.)
138
+ *
139
+ * The accepted-with-issues arm applies the same rule one level down: a pass that
140
+ * landed real work AND refused real work is neither a clean success nor a
141
+ * nothing-to-recover, and it gets its own token so the three are told apart
142
+ * without reading `issues`.
143
+ */
144
+ export declare function recoverIngestVerb(options: {
145
+ root: string;
146
+ artifactsDir: string;
147
+ runId: string;
148
+ }): Promise<RecoveryVerbResult>;
149
+ /**
150
+ * `recover-submission`'s whole decision, minus argv parsing and printing — the
151
+ * same extraction, so its no-live-binding refusal and its refusal path are
152
+ * covered by a test instead of by a manual smoke log.
153
+ *
154
+ * A successful rescue LANDS a submission, which changes what the run's persisted
155
+ * step contract is still asking for, so it invalidates that contract exactly as
156
+ * `recover-ingest` does. The invalidation is best-effort by construction
157
+ * (`invalidateStepContracts` swallows a missing steps tree), so a rescue can
158
+ * never be reported as failed because a stale prompt could not be removed.
159
+ */
160
+ export declare function recoverSubmissionVerb(options: {
161
+ root: string;
162
+ artifactsDir: string;
163
+ runId: string;
164
+ submissionId: string;
165
+ from: string;
166
+ }): Promise<RecoveryVerbResult>;
86
167
  export declare function runValidateCommand(deps?: {
87
168
  run?: typeof runTracked;
88
169
  log?: (message: string) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/remediate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,OAAO,EAML,KAAK,4BAA4B,EAClC,MAAM,qCAAqC,CAAC;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EASL,UAAU,EAEX,MAAM,oBAAoB,CAAC;AAiB5B,QAAA,MAAM,OAAO,SAAgB,CAAC;AAiS9B,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,4BAA4B,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,yBAAyB,CAAC,OAAO,EAAE;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,I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