audit-tools 0.56.1 → 0.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (369) hide show
  1. package/README.md +8 -22
  2. package/dist/audit/cli/args.d.ts +0 -1
  3. package/dist/audit/cli/args.d.ts.map +1 -1
  4. package/dist/audit/cli/args.js +0 -14
  5. package/dist/audit/cli/args.js.map +1 -1
  6. package/dist/audit/cli/auditStep.d.ts +0 -59
  7. package/dist/audit/cli/auditStep.d.ts.map +1 -1
  8. package/dist/audit/cli/auditStep.js +2 -136
  9. package/dist/audit/cli/auditStep.js.map +1 -1
  10. package/dist/audit/cli/cleanup.d.ts.map +1 -1
  11. package/dist/audit/cli/cleanup.js +4 -1
  12. package/dist/audit/cli/cleanup.js.map +1 -1
  13. package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
  14. package/dist/audit/cli/confirmIntentStep.js +16 -31
  15. package/dist/audit/cli/confirmIntentStep.js.map +1 -1
  16. package/dist/audit/cli/dispatch/hostHandoff.d.ts +414 -1
  17. package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
  18. package/dist/audit/cli/dispatch/hostHandoff.js +223 -1
  19. package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
  20. package/dist/audit/cli/dispatch/questionReviewAcceptance.d.ts +254 -0
  21. package/dist/audit/cli/dispatch/questionReviewAcceptance.d.ts.map +1 -0
  22. package/dist/audit/cli/dispatch/questionReviewAcceptance.js +181 -0
  23. package/dist/audit/cli/dispatch/questionReviewAcceptance.js.map +1 -0
  24. package/dist/audit/cli/functionalPreflight.d.ts +4 -4
  25. package/dist/audit/cli/laneSubmissions.d.ts +4 -4
  26. package/dist/audit/cli/nextStepCommand.d.ts +3 -20
  27. package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
  28. package/dist/audit/cli/nextStepCommand.js +39 -133
  29. package/dist/audit/cli/nextStepCommand.js.map +1 -1
  30. package/dist/audit/cli/nextStepHelpers.d.ts +10 -72
  31. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  32. package/dist/audit/cli/nextStepHelpers.js +95 -363
  33. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  34. package/dist/audit/cli/prompts.d.ts +0 -2
  35. package/dist/audit/cli/prompts.d.ts.map +1 -1
  36. package/dist/audit/cli/prompts.js +3 -14
  37. package/dist/audit/cli/prompts.js.map +1 -1
  38. package/dist/audit/cli/questionReviewCycle.d.ts +239 -0
  39. package/dist/audit/cli/questionReviewCycle.d.ts.map +1 -0
  40. package/dist/audit/cli/questionReviewCycle.js +55 -0
  41. package/dist/audit/cli/questionReviewCycle.js.map +1 -0
  42. package/dist/audit/cli/questionReviewSession.d.ts +7 -0
  43. package/dist/audit/cli/questionReviewSession.d.ts.map +1 -0
  44. package/dist/audit/cli/questionReviewSession.js +46 -0
  45. package/dist/audit/cli/questionReviewSession.js.map +1 -0
  46. package/dist/audit/cli/questionWorkloadBindings.d.ts +7 -0
  47. package/dist/audit/cli/questionWorkloadBindings.d.ts.map +1 -0
  48. package/dist/audit/cli/questionWorkloadBindings.js +66 -0
  49. package/dist/audit/cli/questionWorkloadBindings.js.map +1 -0
  50. package/dist/audit/cli/resynthesizeCommand.d.ts +1 -0
  51. package/dist/audit/cli/resynthesizeCommand.d.ts.map +1 -1
  52. package/dist/audit/cli/resynthesizeCommand.js +52 -51
  53. package/dist/audit/cli/resynthesizeCommand.js.map +1 -1
  54. package/dist/audit/cli/sampleRunCommand.d.ts +565 -160
  55. package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
  56. package/dist/audit/cli/sampleRunCommand.js +66 -152
  57. package/dist/audit/cli/sampleRunCommand.js.map +1 -1
  58. package/dist/audit/cli/statusCommand.d.ts.map +1 -1
  59. package/dist/audit/cli/statusCommand.js +20 -14
  60. package/dist/audit/cli/statusCommand.js.map +1 -1
  61. package/dist/audit/cli/steps.d.ts +10 -10
  62. package/dist/audit/cli/submitCommand.d.ts +11 -6
  63. package/dist/audit/cli/submitCommand.d.ts.map +1 -1
  64. package/dist/audit/cli/submitCommand.js +91 -24
  65. package/dist/audit/cli/submitCommand.js.map +1 -1
  66. package/dist/audit/cli.d.ts.map +1 -1
  67. package/dist/audit/cli.js +6 -17
  68. package/dist/audit/cli.js.map +1 -1
  69. package/dist/audit/contracts/findingContractPrompt.d.ts +4 -4
  70. package/dist/audit/contracts/workerSchemas.d.ts +69 -68
  71. package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
  72. package/dist/audit/contracts/workerSchemas.js +8 -1
  73. package/dist/audit/contracts/workerSchemas.js.map +1 -1
  74. package/dist/audit/contracts/wrapperResponse.d.ts +13 -13
  75. package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
  76. package/dist/audit/contracts/wrapperResponse.js +0 -1
  77. package/dist/audit/contracts/wrapperResponse.js.map +1 -1
  78. package/dist/audit/extractors/designAssessment.js +2 -2
  79. package/dist/audit/extractors/designAssessment.js.map +1 -1
  80. package/dist/audit/io/artifacts.d.ts +31 -9
  81. package/dist/audit/io/artifacts.d.ts.map +1 -1
  82. package/dist/audit/io/artifacts.js +197 -31
  83. package/dist/audit/io/artifacts.js.map +1 -1
  84. package/dist/audit/io/rollover.d.ts.map +1 -1
  85. package/dist/audit/io/rollover.js +7 -16
  86. package/dist/audit/io/rollover.js.map +1 -1
  87. package/dist/audit/io/runSnapshot.d.ts +1 -1
  88. package/dist/audit/io/runSnapshot.js +1 -1
  89. package/dist/audit/orchestrator/architectureDiscovery.d.ts +9 -10
  90. package/dist/audit/orchestrator/architectureDiscovery.d.ts.map +1 -1
  91. package/dist/audit/orchestrator/architectureDiscovery.js +95 -13
  92. package/dist/audit/orchestrator/architectureDiscovery.js.map +1 -1
  93. package/dist/audit/orchestrator/charterPacketArchive.d.ts +3 -0
  94. package/dist/audit/orchestrator/charterPacketArchive.d.ts.map +1 -1
  95. package/dist/audit/orchestrator/charterPacketArchive.js +31 -2
  96. package/dist/audit/orchestrator/charterPacketArchive.js.map +1 -1
  97. package/dist/audit/orchestrator/dependencyMap.d.ts +2 -8
  98. package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
  99. package/dist/audit/orchestrator/dependencyMap.js +10 -105
  100. package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
  101. package/dist/audit/orchestrator/dependencySlices.d.ts +2 -3
  102. package/dist/audit/orchestrator/dependencySlices.d.ts.map +1 -1
  103. package/dist/audit/orchestrator/dependencySlices.js +2 -35
  104. package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
  105. package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
  106. package/dist/audit/orchestrator/designReviewPrompt.js +24 -14
  107. package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
  108. package/dist/audit/orchestrator/executorRunners.d.ts +1 -1
  109. package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
  110. package/dist/audit/orchestrator/executorRunners.js +14 -21
  111. package/dist/audit/orchestrator/executorRunners.js.map +1 -1
  112. package/dist/audit/orchestrator/executors.d.ts.map +1 -1
  113. package/dist/audit/orchestrator/executors.js +1 -131
  114. package/dist/audit/orchestrator/executors.js.map +1 -1
  115. package/dist/audit/orchestrator/flowPlanning.d.ts +1 -1
  116. package/dist/audit/orchestrator/flowPlanning.js +1 -1
  117. package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -1
  118. package/dist/audit/orchestrator/ingestionExecutors.js +19 -12
  119. package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
  120. package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +2 -2
  121. package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
  122. package/dist/audit/orchestrator/intentCheckpointExecutor.js +37 -36
  123. package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
  124. package/dist/audit/orchestrator/lensSelection.d.ts +6 -37
  125. package/dist/audit/orchestrator/lensSelection.d.ts.map +1 -1
  126. package/dist/audit/orchestrator/lensSelection.js +42 -68
  127. package/dist/audit/orchestrator/lensSelection.js.map +1 -1
  128. package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
  129. package/dist/audit/orchestrator/nextStep.js +1 -4
  130. package/dist/audit/orchestrator/nextStep.js.map +1 -1
  131. package/dist/audit/orchestrator/questionEvidence.d.ts +67 -0
  132. package/dist/audit/orchestrator/questionEvidence.d.ts.map +1 -0
  133. package/dist/audit/orchestrator/questionEvidence.js +177 -0
  134. package/dist/audit/orchestrator/questionEvidence.js.map +1 -0
  135. package/dist/audit/orchestrator/questionPlanExecutor.d.ts +10 -0
  136. package/dist/audit/orchestrator/questionPlanExecutor.d.ts.map +1 -0
  137. package/dist/audit/orchestrator/questionPlanExecutor.js +23 -0
  138. package/dist/audit/orchestrator/questionPlanExecutor.js.map +1 -0
  139. package/dist/audit/orchestrator/questionPlanning.d.ts +48 -0
  140. package/dist/audit/orchestrator/questionPlanning.d.ts.map +1 -0
  141. package/dist/audit/orchestrator/questionPlanning.js +326 -0
  142. package/dist/audit/orchestrator/questionPlanning.js.map +1 -0
  143. package/dist/audit/orchestrator/reviewLensPlaybooks.d.ts +11 -0
  144. package/dist/audit/orchestrator/reviewLensPlaybooks.d.ts.map +1 -0
  145. package/dist/audit/orchestrator/reviewLensPlaybooks.js +11 -0
  146. package/dist/audit/orchestrator/reviewLensPlaybooks.js.map +1 -0
  147. package/dist/audit/orchestrator/runtimeValidation.d.ts.map +1 -1
  148. package/dist/audit/orchestrator/runtimeValidation.js +14 -0
  149. package/dist/audit/orchestrator/runtimeValidation.js.map +1 -1
  150. package/dist/audit/orchestrator/runtimeValidationUpdate.d.ts +1 -1
  151. package/dist/audit/orchestrator/runtimeValidationUpdate.d.ts.map +1 -1
  152. package/dist/audit/orchestrator/runtimeValidationUpdate.js +13 -4
  153. package/dist/audit/orchestrator/runtimeValidationUpdate.js.map +1 -1
  154. package/dist/audit/orchestrator/selectiveDeepening/conflict.js +1 -1
  155. package/dist/audit/orchestrator/selectiveDeepening/conflict.js.map +1 -1
  156. package/dist/audit/orchestrator/selectiveDeepening/index.js +1 -1
  157. package/dist/audit/orchestrator/selectiveDeepening/index.js.map +1 -1
  158. package/dist/audit/orchestrator/state.d.ts.map +1 -1
  159. package/dist/audit/orchestrator/state.js +8 -60
  160. package/dist/audit/orchestrator/state.js.map +1 -1
  161. package/dist/audit/orchestrator/synthesisExecutors.d.ts +15 -1
  162. package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
  163. package/dist/audit/orchestrator/synthesisExecutors.js +76 -25
  164. package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
  165. package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts.map +1 -1
  166. package/dist/audit/orchestrator/systemicChallengeExecutor.js +11 -6
  167. package/dist/audit/orchestrator/systemicChallengeExecutor.js.map +1 -1
  168. package/dist/audit/orchestrator/taskAffinityGraph.d.ts +4 -4
  169. package/dist/audit/reporting/questionReport.d.ts +27 -0
  170. package/dist/audit/reporting/questionReport.d.ts.map +1 -0
  171. package/dist/audit/reporting/questionReport.js +183 -0
  172. package/dist/audit/reporting/questionReport.js.map +1 -0
  173. package/dist/audit/reporting/synthesis.d.ts +10 -1
  174. package/dist/audit/reporting/synthesis.d.ts.map +1 -1
  175. package/dist/audit/reporting/synthesis.js +161 -24
  176. package/dist/audit/reporting/synthesis.js.map +1 -1
  177. package/dist/audit/reporting/synthesisNarrativePrompt.d.ts +4 -1
  178. package/dist/audit/reporting/synthesisNarrativePrompt.d.ts.map +1 -1
  179. package/dist/audit/reporting/synthesisNarrativePrompt.js +5 -1
  180. package/dist/audit/reporting/synthesisNarrativePrompt.js.map +1 -1
  181. package/dist/audit/supervisor/operatorHandoff.d.ts +2 -3
  182. package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
  183. package/dist/audit/supervisor/operatorHandoff.js +3 -18
  184. package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
  185. package/dist/audit/systemic/aggregateMetricsDigest.d.ts.map +1 -1
  186. package/dist/audit/systemic/aggregateMetricsDigest.js +0 -2
  187. package/dist/audit/systemic/aggregateMetricsDigest.js.map +1 -1
  188. package/dist/audit/types/artifactMetadata.d.ts +1 -2
  189. package/dist/audit/types/artifactMetadata.d.ts.map +1 -1
  190. package/dist/audit/types/auditState.d.ts +6 -6
  191. package/dist/audit/types/conceptualAdjudication.d.ts +708 -50
  192. package/dist/audit/types/conceptualAdjudication.d.ts.map +1 -1
  193. package/dist/audit/types/conceptualAdjudication.js +2 -0
  194. package/dist/audit/types/conceptualAdjudication.js.map +1 -1
  195. package/dist/audit/types/runtimeValidation.d.ts +58 -6
  196. package/dist/audit/types/runtimeValidation.d.ts.map +1 -1
  197. package/dist/audit/types/runtimeValidation.js +8 -0
  198. package/dist/audit/types/runtimeValidation.js.map +1 -1
  199. package/dist/audit/types.d.ts +539 -22
  200. package/dist/audit/types.d.ts.map +1 -1
  201. package/dist/audit/validation/auditResults.d.ts +1 -1
  202. package/dist/audit/validation/auditResults.js +1 -1
  203. package/dist/audit/validation/ingestIssueCodes.d.ts.map +1 -1
  204. package/dist/audit/validation/ingestIssueCodes.js +0 -1
  205. package/dist/audit/validation/ingestIssueCodes.js.map +1 -1
  206. package/dist/remediate/contractPipeline/executionPlan.d.ts +679 -52
  207. package/dist/remediate/contractPipeline/executionPlan.d.ts.map +1 -1
  208. package/dist/remediate/contractPipeline/executionPlan.js +23 -0
  209. package/dist/remediate/contractPipeline/executionPlan.js.map +1 -1
  210. package/dist/remediate/findingFilter.d.ts.map +1 -1
  211. package/dist/remediate/findingFilter.js +6 -2
  212. package/dist/remediate/findingFilter.js.map +1 -1
  213. package/dist/remediate/intake.d.ts +4 -4
  214. package/dist/remediate/phases/close.d.ts.map +1 -1
  215. package/dist/remediate/phases/close.js +15 -5
  216. package/dist/remediate/phases/close.js.map +1 -1
  217. package/dist/remediate/phases/closeVerifyAnalyzerLeads.d.ts +5 -0
  218. package/dist/remediate/phases/closeVerifyAnalyzerLeads.d.ts.map +1 -1
  219. package/dist/remediate/phases/closeVerifyAnalyzerLeads.js +37 -8
  220. package/dist/remediate/phases/closeVerifyAnalyzerLeads.js.map +1 -1
  221. package/dist/remediate/state/types.d.ts +619 -26
  222. package/dist/remediate/state/types.d.ts.map +1 -1
  223. package/dist/remediate/state/types.js +2 -1
  224. package/dist/remediate/state/types.js.map +1 -1
  225. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  226. package/dist/remediate/steps/contractPipeline.js +2 -0
  227. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  228. package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
  229. package/dist/remediate/steps/contractPipelinePrompts.js +2 -0
  230. package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
  231. package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts +3 -3
  232. package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
  233. package/dist/remediate/steps/intakeResolver.js +31 -6
  234. package/dist/remediate/steps/intakeResolver.js.map +1 -1
  235. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  236. package/dist/remediate/steps/nextStep.js +31 -40
  237. package/dist/remediate/steps/nextStep.js.map +1 -1
  238. package/dist/remediate/steps/prompts.d.ts.map +1 -1
  239. package/dist/remediate/steps/prompts.js +3 -0
  240. package/dist/remediate/steps/prompts.js.map +1 -1
  241. package/dist/shared/analyzers/types.d.ts +18 -18
  242. package/dist/shared/contentKey.d.ts +1 -1
  243. package/dist/shared/contentKey.js +1 -1
  244. package/dist/shared/decompose/charterClarification.d.ts +4 -4
  245. package/dist/shared/decompose/charterExtraction.d.ts +30 -30
  246. package/dist/shared/decompose/contentCoherence.d.ts +1 -1
  247. package/dist/shared/decompose/contentCoherence.js +1 -1
  248. package/dist/shared/decompose/systemicChallenge.d.ts +629 -18
  249. package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
  250. package/dist/shared/engine/obligationEngine.d.ts +2 -2
  251. package/dist/shared/index.d.ts +2 -0
  252. package/dist/shared/index.d.ts.map +1 -1
  253. package/dist/shared/index.js +2 -0
  254. package/dist/shared/index.js.map +1 -1
  255. package/dist/shared/io/stepContractWriter.js +1 -1
  256. package/dist/shared/io/stepContractWriter.js.map +1 -1
  257. package/dist/shared/loopCorePaths.d.ts.map +1 -1
  258. package/dist/shared/loopCorePaths.js +5 -2
  259. package/dist/shared/loopCorePaths.js.map +1 -1
  260. package/dist/shared/mcp/submitServer.d.ts +1 -0
  261. package/dist/shared/mcp/submitServer.d.ts.map +1 -1
  262. package/dist/shared/mcp/submitServer.js +1 -1
  263. package/dist/shared/mcp/submitServer.js.map +1 -1
  264. package/dist/shared/submission/hostResultOutcomes.js +1 -1
  265. package/dist/shared/submission/hostResultOutcomes.js.map +1 -1
  266. package/dist/shared/tooling/exec.js +1 -1
  267. package/dist/shared/tooling/exec.js.map +1 -1
  268. package/dist/shared/types/charter.d.ts +38 -38
  269. package/dist/shared/types/contractPropertyShapes.d.ts.map +1 -1
  270. package/dist/shared/types/contractPropertyShapes.js +7 -0
  271. package/dist/shared/types/contractPropertyShapes.js.map +1 -1
  272. package/dist/shared/types/executionPlan.d.ts +88 -12
  273. package/dist/shared/types/executionPlan.d.ts.map +1 -1
  274. package/dist/shared/types/executionPlan.js +1 -0
  275. package/dist/shared/types/executionPlan.js.map +1 -1
  276. package/dist/shared/types/finding.d.ts +1721 -56
  277. package/dist/shared/types/finding.d.ts.map +1 -1
  278. package/dist/shared/types/finding.js +7 -10
  279. package/dist/shared/types/finding.js.map +1 -1
  280. package/dist/shared/types/findingVocabulary.d.ts +8 -0
  281. package/dist/shared/types/findingVocabulary.d.ts.map +1 -0
  282. package/dist/shared/types/findingVocabulary.js +13 -0
  283. package/dist/shared/types/findingVocabulary.js.map +1 -0
  284. package/dist/shared/types/intentCheckpoint.d.ts +8 -3
  285. package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
  286. package/dist/shared/types/intentCheckpoint.js +4 -3
  287. package/dist/shared/types/intentCheckpoint.js.map +1 -1
  288. package/dist/shared/types/questionReviewReport.d.ts +9912 -0
  289. package/dist/shared/types/questionReviewReport.d.ts.map +1 -0
  290. package/dist/shared/types/questionReviewReport.js +185 -0
  291. package/dist/shared/types/questionReviewReport.js.map +1 -0
  292. package/dist/shared/types/remediationOutcome.d.ts +1379 -148
  293. package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
  294. package/dist/shared/types/remediationOutcome.js +5 -0
  295. package/dist/shared/types/remediationOutcome.js.map +1 -1
  296. package/dist/shared/types/reviewIndependence.d.ts +24 -24
  297. package/dist/shared/types/reviewQuestion.d.ts +4359 -0
  298. package/dist/shared/types/reviewQuestion.d.ts.map +1 -0
  299. package/dist/shared/types/reviewQuestion.js +182 -0
  300. package/dist/shared/types/reviewQuestion.js.map +1 -0
  301. package/dist/shared/types/stepContract.js +1 -1
  302. package/dist/shared/types/stepContract.js.map +1 -1
  303. package/dist/shared/validation/designFindingGrounding.js +1 -1
  304. package/dist/shared/validation/designFindingGrounding.js.map +1 -1
  305. package/dist/shared/validation/findingsReport.d.ts.map +1 -1
  306. package/dist/shared/validation/findingsReport.js +19 -4
  307. package/dist/shared/validation/findingsReport.js.map +1 -1
  308. package/docs/audit-pkg/contracts.md +27 -56
  309. package/docs/audit-pkg/operator-guide.md +31 -17
  310. package/docs/audit-pkg/product.md +17 -23
  311. package/package.json +1 -1
  312. package/schemas/audit-code-v1alpha1.schema.json +0 -1
  313. package/schemas/review_submission.schema.json +514 -0
  314. package/scripts/postinstall.mjs +16 -9
  315. package/skills/audit-code/audit-code.prompt.md +7 -5
  316. package/wrapper/audit-code-wrapper-lib.mjs +1 -5
  317. package/wrapper/installer-verb-help.mjs +1 -1
  318. package/dist/audit/cli/explainTaskCommand.d.ts +0 -4
  319. package/dist/audit/cli/explainTaskCommand.d.ts.map +0 -1
  320. package/dist/audit/cli/explainTaskCommand.js +0 -45
  321. package/dist/audit/cli/explainTaskCommand.js.map +0 -1
  322. package/dist/audit/cli/ingestResultsCommand.d.ts +0 -2
  323. package/dist/audit/cli/ingestResultsCommand.d.ts.map +0 -1
  324. package/dist/audit/cli/ingestResultsCommand.js +0 -42
  325. package/dist/audit/cli/ingestResultsCommand.js.map +0 -1
  326. package/dist/audit/cli/requeueCommand.d.ts +0 -2
  327. package/dist/audit/cli/requeueCommand.d.ts.map +0 -1
  328. package/dist/audit/cli/requeueCommand.js +0 -12
  329. package/dist/audit/cli/requeueCommand.js.map +0 -1
  330. package/dist/audit/cli/semanticReviewStep.d.ts +0 -41
  331. package/dist/audit/cli/semanticReviewStep.d.ts.map +0 -1
  332. package/dist/audit/cli/semanticReviewStep.js +0 -185
  333. package/dist/audit/cli/semanticReviewStep.js.map +0 -1
  334. package/dist/audit/cli/unacceptResultsCommand.d.ts +0 -19
  335. package/dist/audit/cli/unacceptResultsCommand.d.ts.map +0 -1
  336. package/dist/audit/cli/unacceptResultsCommand.js +0 -52
  337. package/dist/audit/cli/unacceptResultsCommand.js.map +0 -1
  338. package/dist/audit/cli/updateRuntimeValidationCommand.d.ts +0 -2
  339. package/dist/audit/cli/updateRuntimeValidationCommand.d.ts.map +0 -1
  340. package/dist/audit/cli/updateRuntimeValidationCommand.js +0 -18
  341. package/dist/audit/cli/updateRuntimeValidationCommand.js.map +0 -1
  342. package/dist/audit/cli/validateResultsCommand.d.ts +0 -13
  343. package/dist/audit/cli/validateResultsCommand.d.ts.map +0 -1
  344. package/dist/audit/cli/validateResultsCommand.js +0 -87
  345. package/dist/audit/cli/validateResultsCommand.js.map +0 -1
  346. package/dist/audit/cli/workerResult.d.ts +0 -2
  347. package/dist/audit/cli/workerResult.d.ts.map +0 -1
  348. package/dist/audit/cli/workerResult.js +0 -6
  349. package/dist/audit/cli/workerResult.js.map +0 -1
  350. package/dist/audit/orchestrator/coverageElementBaseline.d.ts +0 -54
  351. package/dist/audit/orchestrator/coverageElementBaseline.d.ts.map +0 -1
  352. package/dist/audit/orchestrator/coverageElementBaseline.js +0 -136
  353. package/dist/audit/orchestrator/coverageElementBaseline.js.map +0 -1
  354. package/dist/audit/orchestrator/planning.d.ts +0 -5
  355. package/dist/audit/orchestrator/planning.d.ts.map +0 -1
  356. package/dist/audit/orchestrator/planning.js +0 -79
  357. package/dist/audit/orchestrator/planning.js.map +0 -1
  358. package/dist/audit/orchestrator/planningExecutors.d.ts +0 -21
  359. package/dist/audit/orchestrator/planningExecutors.d.ts.map +0 -1
  360. package/dist/audit/orchestrator/planningExecutors.js +0 -273
  361. package/dist/audit/orchestrator/planningExecutors.js.map +0 -1
  362. package/dist/audit/orchestrator/taskBuilder.d.ts +0 -62
  363. package/dist/audit/orchestrator/taskBuilder.d.ts.map +0 -1
  364. package/dist/audit/orchestrator/taskBuilder.js +0 -412
  365. package/dist/audit/orchestrator/taskBuilder.js.map +0 -1
  366. package/dist/audit/orchestrator/trivialAudit.d.ts +0 -21
  367. package/dist/audit/orchestrator/trivialAudit.d.ts.map +0 -1
  368. package/dist/audit/orchestrator/trivialAudit.js +0 -80
  369. package/dist/audit/orchestrator/trivialAudit.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"sampleRunCommand.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/sampleRunCommand.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAW7D;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,OAiBnC,CAAC;AAEF;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,QAAQ,GAAE,OAAO,EAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EpE;AAED,wBAAsB,SAAS,CAAC,IAAI,GAAE,MAAM,EAAiB,GAA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-correctness.test.ts
1
2
  import { existsSync } from "node:fs";
2
- import { mkdir } from "node:fs/promises";
3
3
  import { join } from "node:path";
4
- import { buildRepoManifest } from "../extractors/fileInventory.js";
5
- import { buildFileDisposition } from "../extractors/disposition.js";
6
- import { buildCriticalFlowManifest } from "../extractors/flows.js";
7
- import { buildSurfaceManifest } from "../extractors/surfaces.js";
8
- import { buildUnitManifest } from "../orchestrator/unitBuilder.js";
9
- import { buildFlowCoverage } from "../orchestrator/flowCoverage.js";
10
- import { buildRuntimeValidationTasks } from "../orchestrator/runtimeValidation.js";
11
- import { initializeCoverageFromPlan } from "../orchestrator/planning.js";
12
- import { writeCoreArtifacts } from "../io/artifacts.js";
13
- import { buildAuditReportModel, renderAuditReportMarkdown, } from "../reporting/synthesis.js";
14
- import { deriveAuditState } from "../orchestrator/state.js";
15
- import { getArtifactsDir, hasFlag } from "./args.js";
4
+ import { AUDIT_FINDINGS_FILENAME, AUDIT_REPORT_FILENAME, auditToolsDir, writeJsonFile, writeTextFile } from "audit-tools/shared";
5
+ import { withArtifactTreeHold } from "../../shared/io/artifactTreeHold.js";
6
+ import { REVIEW_QUESTION_CONTRACT_VERSION } from "../../shared/types/reviewQuestion.js";
7
+ import { QuestionAuditFindingsReportSchema } from "../../shared/types/questionReviewReport.js";
8
+ import { buildQuestionAuditFindingsReport } from "../reporting/questionReport.js";
9
+ import { renderAuditReportMarkdown } from "../reporting/synthesis.js";
10
+ import { getArtifactsDir, getFlag, getRootDir, hasFlag } from "./args.js";
16
11
  import { outputJson } from "./cliHelpers.js";
17
- const SAMPLE_REPO_FILES = [
18
- { path: "src/api/auth.ts", size_bytes: 1240, hash: "abc123" },
19
- { path: "src/lib/session.ts", size_bytes: 980, hash: "def456" },
20
- { path: "infra/deploy.yml", size_bytes: 420, hash: "ghi789" },
21
- { path: "docs/notes.md", size_bytes: 300, hash: "doc111" },
22
- ];
23
- /**
24
- * Fabricated fixture finding for the README sample-report block. It cites the
25
- * fabricated sample repo above, never this repository. Typed here so tsc
26
- * checks the fixture against the real contract; the README generator
27
- * (scripts/check-readme-sample-report.mjs) renders it through the real
28
- * renderer and excerpts the output.
29
- */
12
+ const version = { schema_version: REVIEW_QUESTION_CONTRACT_VERSION };
13
+ const identity = { ...version, question_id: "sample-review-queue", revision_id: "sample-v1", snapshot_id: "fabricated-sample" };
14
+ const source = { path: "src/queue.ts", start_line: 12, end_line: 16 };
15
+ const dependency = { kind: "source", key: source.path, fingerprint: "fabricated-queue-v1" };
16
+ /** Benign fabricated finding for the README generator, not a finding in any real repository. */
30
17
  export const SAMPLE_REPORT_FINDING = {
31
- id: "FND-001",
32
- title: "Expired session tokens are accepted on the refresh path",
33
- category: "auth-token-lifecycle",
34
- severity: "high",
35
- confidence: "high",
36
- lens: "security",
37
- summary: "refreshSession() checks the token signature but never the expiry, so an expired token mints a fresh session.",
38
- affected_files: [{ path: "src/api/auth.ts", line_start: 41, line_end: 58 }],
39
- impact: "A leaked token stays usable indefinitely.",
40
- likelihood: "Any expired token replayed against the refresh endpoint.",
41
- evidence: [
42
- "The expiry field read at line 44 is never compared against the clock.",
43
- ],
44
- grounding: { status: "grounded" },
45
- systemic: false,
18
+ ...version, question_id: identity.question_id, revision_id: identity.revision_id, finding_id: "sample-queue-001",
19
+ kind: "confirmed_defect", observation_ids: ["sample-source-observation"], severity: "medium", confidence: "high",
20
+ claim: "Queue summary omits pending entries",
21
+ consequence: "The reported total differs from the number of queued entries.",
22
+ next_step: "Count pending entries in the same total.",
23
+ source_refs: [source], evidence_ids: [],
24
+ verification: [{ kind: "assertion", obligation_id: "queue-summary-total", expected: "Both ready and pending entries count toward the total.", source_refs: [source] }],
46
25
  };
47
- /**
48
- * Build the fabricated sample bundle. Pure — nothing is written. `sample-run`
49
- * persists it with no findings; the README sample-report generator threads
50
- * SAMPLE_REPORT_FINDING through it so the rendered report exercises the
51
- * per-finding template.
52
- */
53
- export async function buildSampleAuditBundle(findings = []) {
54
- const repoManifest = buildRepoManifest("sample-repo", SAMPLE_REPO_FILES);
55
- const disposition = await buildFileDisposition(repoManifest);
56
- const unitManifest = buildUnitManifest(repoManifest, disposition);
57
- const surfaceManifest = buildSurfaceManifest(repoManifest, disposition);
58
- const criticalFlows = buildCriticalFlowManifest(repoManifest, surfaceManifest, disposition);
59
- const coverage = initializeCoverageFromPlan(repoManifest, unitManifest, disposition);
60
- const sampleUnitId = unitManifest.units[0]?.unit_id ?? "sample-unit";
61
- const sampleLens = "security";
62
- // Derive task_id from the actual unit ID + lens, matching the real planning
63
- // pipeline format (COR-a278fbe0 fix: no hardcoded task_id).
64
- const sampleTaskId = `${sampleUnitId}:${sampleLens}`;
65
- const sampleResults = [
66
- {
67
- task_id: sampleTaskId,
68
- unit_id: sampleUnitId,
69
- pass_id: `pass:${sampleLens}`,
70
- lens: sampleLens,
71
- agent_role: "security-auditor",
72
- file_coverage: [
73
- {
74
- path: "src/api/auth.ts",
75
- total_lines: SAMPLE_REPO_FILES.find((f) => f.path === "src/api/auth.ts")
76
- ? 100
77
- : 0,
78
- },
79
- ],
80
- findings,
81
- notes: ["Sample result ingestion path."],
82
- requires_followup: false,
83
- },
84
- ];
85
- const flowCoverage = buildFlowCoverage(criticalFlows, coverage);
86
- const runtimeValidationTasks = buildRuntimeValidationTasks({
87
- unitManifest,
88
- criticalFlows,
89
- flowCoverage,
90
- command: ["npm", "test"],
91
- });
92
- const runtimeValidationReport = {
93
- results: runtimeValidationTasks.tasks.map((task) => ({
94
- task_id: task.id,
95
- status: "confirmed",
96
- summary: "Sample runtime validation completed.",
97
- evidence: [],
98
- notes: [],
99
- })),
26
+ /** Fabricate only inputs to the production v2 report projection; never a live ledger or planner. */
27
+ export function buildSampleAuditBundle(findings = []) {
28
+ const part = { part_id: "queue-summary", expectation: "Count every queued entry once." };
29
+ const plan = {
30
+ ...version, snapshot_id: identity.snapshot_id,
31
+ inventory: [{ inventory_item_id: "sample-queue", kind: "operation", title: "Synthetic queue summary",
32
+ contract_refs: [], source_refs: [source], scope: "in_scope" }],
33
+ questions: [{ ...identity, lens: "behavior", inventory_item_ids: ["sample-queue"],
34
+ expected_outcome: part.expectation, requested_parts: [part],
35
+ plan_status: "active", source_dependencies: [dependency], evidence_dependencies: [] }],
36
+ lens_decisions: [{ lens: "behavior", decision: "selected", reason: "Illustrative fabricated fixture only; no repository was inspected." }],
37
+ omissions: [],
100
38
  };
101
- const auditReport = renderAuditReportMarkdown(buildAuditReportModel({
102
- results: sampleResults,
103
- unitManifest,
104
- criticalFlows,
105
- coverageMatrix: coverage,
106
- runtimeValidationReport,
39
+ const accepted = findings.length === 0 ? [] : [{
40
+ ...version, accepted_at: "2026-01-01T00:00:00.000Z", dependency_bindings: [dependency],
41
+ submission: {
42
+ ...identity, assignment_id: "sample-assignment", submission_id: "sample-answer",
43
+ inspected_sources: [source], evidence_ids: [], limitations: ["Fabricated source evidence for documentation; no runtime check was executed."],
44
+ answer: {
45
+ outcome: "findings", findings,
46
+ parts: [{ part_id: part.part_id, outcome: "findings", observation_ids: ["sample-source-observation"] }],
47
+ observations: [{ ...identity, observation_id: "sample-source-observation", part_id: part.part_id,
48
+ kind: "source_confirmed", statement: "The fabricated counter includes ready entries only.", source_refs: [source], evidence_refs: [] }],
49
+ },
50
+ },
51
+ }];
52
+ const auditFindings = QuestionAuditFindingsReportSchema.parse(buildQuestionAuditFindingsReport({
53
+ plan, accepted, evidence: [], dependenciesByQuestion: new Map([[identity.question_id, [dependency]]]), auditRead: null,
107
54
  }));
108
- return {
109
- repoManifest,
110
- disposition,
111
- unitManifest,
112
- surfaceManifest,
113
- criticalFlows,
114
- coverage,
115
- flowCoverage,
116
- runtimeValidationTasks,
117
- runtimeValidationReport,
118
- sampleResults,
119
- auditReport,
120
- };
55
+ return { plan, auditFindings, auditReport: renderAuditReportMarkdown(auditFindings) };
121
56
  }
122
57
  export async function runSample(argv = process.argv) {
123
- const { repoManifest, disposition, unitManifest, surfaceManifest, criticalFlows, coverage, flowCoverage, runtimeValidationTasks, runtimeValidationReport, sampleResults, auditReport, } = await buildSampleAuditBundle();
124
- const auditState = deriveAuditState({
125
- repo_manifest: repoManifest,
126
- file_disposition: disposition,
127
- unit_manifest: unitManifest,
128
- surface_manifest: surfaceManifest,
129
- critical_flows: criticalFlows,
130
- flow_coverage: flowCoverage,
131
- coverage_matrix: coverage,
132
- runtime_validation_tasks: runtimeValidationTasks,
133
- runtime_validation_report: runtimeValidationReport,
134
- audit_results: sampleResults,
135
- audit_report: auditReport,
136
- });
137
- const artifactsDir = getArtifactsDir(argv);
138
- // A live bundle (audit_state.json present) is real run state — fabricated
139
- // sample artifacts must never overwrite it. `--force` is the explicit
140
- // disposable-target override, mirroring the cleanup verb.
141
- if (existsSync(join(artifactsDir, "audit_state.json")) &&
142
- !hasFlag(argv, "--force")) {
143
- console.error(`Refusing to write sample artifacts into '${artifactsDir}': an audit state file is present. Pass --force to overwrite a disposable target.`);
144
- process.exitCode = 1;
145
- return;
146
- }
147
- await mkdir(artifactsDir, { recursive: true });
148
- await writeCoreArtifacts(artifactsDir, {
149
- repo_manifest: repoManifest,
150
- file_disposition: disposition,
151
- unit_manifest: unitManifest,
152
- surface_manifest: surfaceManifest,
153
- critical_flows: criticalFlows,
154
- flow_coverage: flowCoverage,
155
- coverage_matrix: coverage,
156
- runtime_validation_tasks: runtimeValidationTasks,
157
- runtime_validation_report: runtimeValidationReport,
158
- audit_results: sampleResults,
159
- audit_report: auditReport,
160
- audit_state: auditState,
58
+ const artifactsDir = getFlag(argv, "--artifacts-dir") === undefined
59
+ ? join(auditToolsDir(getRootDir(argv)), "sample")
60
+ : getArtifactsDir(argv);
61
+ await withArtifactTreeHold(artifactsDir, undefined, async (assertOwnership) => {
62
+ const protectedNames = ["audit_state.json", "review_session.json", "review_plan.json", AUDIT_FINDINGS_FILENAME, AUDIT_REPORT_FILENAME];
63
+ if (!hasFlag(argv, "--force") && protectedNames.some(name => existsSync(join(artifactsDir, name)))) {
64
+ console.error("Refusing to overwrite an audit state or report. Use --force only for a disposable sample target.");
65
+ process.exitCode = 1;
66
+ return;
67
+ }
68
+ const { auditFindings, auditReport } = buildSampleAuditBundle();
69
+ const findingsPath = join(artifactsDir, AUDIT_FINDINGS_FILENAME);
70
+ const reportPath = join(artifactsDir, AUDIT_REPORT_FILENAME);
71
+ assertOwnership();
72
+ await writeJsonFile(findingsPath, auditFindings);
73
+ assertOwnership();
74
+ await writeTextFile(reportPath, auditReport);
75
+ outputJson({ sample: true, artifacts_dir: artifactsDir, findings: findingsPath, report: reportPath });
161
76
  });
162
- outputJson({ audit_state: auditState, artifacts_dir: artifactsDir });
163
77
  }
164
78
  //# sourceMappingURL=sampleRunCommand.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sampleRunCommand.js","sourceRoot":"","sources":["../../../src/audit/cli/sampleRunCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EACL,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAA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CAwF7D"}
1
+ {"version":3,"file":"statusCommand.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/statusCommand.ts"],"names":[],"mappings":"AAYA,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA8F7D"}
@@ -4,6 +4,8 @@ import { isFileMissingError, readJsonFile } from "audit-tools/shared";
4
4
  import { getArtifactsDir } from "./args.js";
5
5
  import { outputJson } from "./cliHelpers.js";
6
6
  import { ARTIFACT_DEFINITIONS } from "../io/artifacts.js";
7
+ import { ReviewPlanSchema } from "../../shared/types/reviewQuestion.js";
8
+ import { readQuestionReviewRunId } from "./questionReviewSession.js";
7
9
  import { loadCurrentActiveReviewRun } from "./reviewRun.js";
8
10
  export async function cmdStatus(argv) {
9
11
  const artifactsDir = getArtifactsDir(argv);
@@ -38,19 +40,21 @@ export async function cmdStatus(argv) {
38
40
  obligationStates[state]++;
39
41
  }
40
42
  }
41
- // 2. Read the ACTIVE run's pending-audit-tasks.json
42
- //
43
- // The active run is the one the loop is on, named by the review-run manifest
44
- // the pause wrote — never "the newest directory under runs/". That inference
45
- // sorted the directory NAMES, which only meant "newest" while a run id began
46
- // with a UTC timestamp: with the derived id (obligation slug + digest) the
47
- // sort is alphabetical, so the command would report an arbitrary obligation's
48
- // pending count and call it current.
49
- //
50
- // Both reads degrade to "no run" rather than to a stack. A malformed
51
- // manifest, an unreadable manifest and an absent manifest all say the same
52
- // true thing about the ACTIVE run: `status` does not know of one. A status
53
- // command that throws tells an operator nothing it could have reported.
43
+ // Read only the prepared plan; planned questions are not outstanding answers.
44
+ let questionReview = null;
45
+ let questionReviewUnreadable = false;
46
+ try {
47
+ const plan = ReviewPlanSchema.parse(await readJsonFile(join(artifactsDir, ARTIFACT_DEFINITIONS.review_plan.fileName)));
48
+ questionReview = {
49
+ run_id: await readQuestionReviewRunId(artifactsDir) ?? null,
50
+ snapshot_id: plan.snapshot_id,
51
+ planned_questions: plan.questions.length,
52
+ };
53
+ }
54
+ catch (error) {
55
+ questionReviewUnreadable = !isFileMissingError(error);
56
+ }
57
+ // Legacy task counts describe an archive, not current dispatch.
54
58
  let pendingTasksSummary = null;
55
59
  try {
56
60
  const activeRun = await loadCurrentActiveReviewRun(artifactsDir);
@@ -78,7 +82,9 @@ export async function cmdStatus(argv) {
78
82
  last_executor: auditState.last_executor ?? null,
79
83
  blockers: auditState.blockers ?? [],
80
84
  obligations_summary: obligationStates,
81
- pending_tasks: pendingTasksSummary,
85
+ archived_pending_tasks: pendingTasksSummary,
86
+ question_review: questionReview,
87
+ question_review_unreadable: questionReviewUnreadable,
82
88
  });
83
89
  }
84
90
  //# sourceMappingURL=statusCommand.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"statusCommand.js","sourceRoot":"","sources":["../../../src/audit/cli/statusCommand.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGtE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAE5D,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAc;IAC5C,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,cAAc,GAAG,IAAI,CAAC,YAAY,EAAE,oBAAoB,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAErF,2BAA2B;IAC3B,IAAI,UAAU,GAAsB,IAAI,CAAC;IACzC,IAAI,CAAC;QACH,UAAU,GAAG,MAAM,YAAY,CAAa,cAAc,CAAC,CAAC;IAC9D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC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,IAAI,EAAE;QACnC,mBAAmB,EAAE,gBAAgB;QACrC,sBAAsB,EAAE,mBAAmB;QAC3C,eAAe,EAAE,cAAc;QAC/B,0BAA0B,EAAE,wBAAwB;KACrD,CAAC,CAAC;AACL,CAAC"}
@@ -152,14 +152,14 @@ export declare const StepArtifactSchema: z.ZodObject<{
152
152
  message: z.ZodString;
153
153
  }, "strict", z.ZodTypeAny, {
154
154
  message: string;
155
- lane: string;
156
155
  submission_id: string;
156
+ lane: string;
157
157
  issue_code: string;
158
158
  submission_path: string;
159
159
  }, {
160
160
  message: string;
161
- lane: string;
162
161
  submission_id: string;
162
+ lane: string;
163
163
  issue_code: string;
164
164
  submission_path: string;
165
165
  }>, "many">;
@@ -168,8 +168,8 @@ export declare const StepArtifactSchema: z.ZodObject<{
168
168
  accepted: number;
169
169
  outstanding: {
170
170
  message: string;
171
- lane: string;
172
171
  submission_id: string;
172
+ lane: string;
173
173
  issue_code: string;
174
174
  submission_path: string;
175
175
  }[];
@@ -178,18 +178,18 @@ export declare const StepArtifactSchema: z.ZodObject<{
178
178
  accepted: number;
179
179
  outstanding: {
180
180
  message: string;
181
- lane: string;
182
181
  submission_id: string;
182
+ lane: string;
183
183
  issue_code: string;
184
184
  submission_path: string;
185
185
  }[];
186
186
  }>>;
187
187
  }, "strict", z.ZodTypeAny, {
188
- status: "ready" | "blocked" | "complete";
188
+ status: "blocked" | "ready" | "complete";
189
189
  run_id: string | null;
190
190
  contract_version: "audit-code-step/v1alpha1";
191
191
  prompt_path: string;
192
- step_kind: "design_review" | "charter_clarification" | "blocked" | "analyzer_consent" | "systemic_challenge" | "design_review_contract" | "design_review_conceptual" | "critical_flow_fallback" | "intent_equivalence" | "synthesis_narrative" | "charter_comparison" | "charter_fidelity" | "functional_preflight" | "dispatch_review" | "design_review_parallel" | "charter_extraction" | "confirm_intent" | "analyzer_install" | "edge_reasoning_dispatch" | "present_report";
192
+ step_kind: "blocked" | "design_review" | "charter_clarification" | "analyzer_consent" | "systemic_challenge" | "design_review_contract" | "design_review_conceptual" | "critical_flow_fallback" | "intent_equivalence" | "synthesis_narrative" | "charter_comparison" | "charter_fidelity" | "functional_preflight" | "dispatch_review" | "design_review_parallel" | "charter_extraction" | "confirm_intent" | "analyzer_install" | "edge_reasoning_dispatch" | "present_report";
193
193
  allowed_commands: string[];
194
194
  stop_condition: string;
195
195
  repo_root: string;
@@ -217,18 +217,18 @@ export declare const StepArtifactSchema: z.ZodObject<{
217
217
  accepted: number;
218
218
  outstanding: {
219
219
  message: string;
220
- lane: string;
221
220
  submission_id: string;
221
+ lane: string;
222
222
  issue_code: string;
223
223
  submission_path: string;
224
224
  }[];
225
225
  } | undefined;
226
226
  }, {
227
- status: "ready" | "blocked" | "complete";
227
+ status: "blocked" | "ready" | "complete";
228
228
  run_id: string | null;
229
229
  contract_version: "audit-code-step/v1alpha1";
230
230
  prompt_path: string;
231
- step_kind: "design_review" | "charter_clarification" | "blocked" | "analyzer_consent" | "systemic_challenge" | "design_review_contract" | "design_review_conceptual" | "critical_flow_fallback" | "intent_equivalence" | "synthesis_narrative" | "charter_comparison" | "charter_fidelity" | "functional_preflight" | "dispatch_review" | "design_review_parallel" | "charter_extraction" | "confirm_intent" | "analyzer_install" | "edge_reasoning_dispatch" | "present_report";
231
+ step_kind: "blocked" | "design_review" | "charter_clarification" | "analyzer_consent" | "systemic_challenge" | "design_review_contract" | "design_review_conceptual" | "critical_flow_fallback" | "intent_equivalence" | "synthesis_narrative" | "charter_comparison" | "charter_fidelity" | "functional_preflight" | "dispatch_review" | "design_review_parallel" | "charter_extraction" | "confirm_intent" | "analyzer_install" | "edge_reasoning_dispatch" | "present_report";
232
232
  allowed_commands: string[];
233
233
  stop_condition: string;
234
234
  repo_root: string;
@@ -256,8 +256,8 @@ export declare const StepArtifactSchema: z.ZodObject<{
256
256
  accepted: number;
257
257
  outstanding: {
258
258
  message: string;
259
- lane: string;
260
259
  submission_id: string;
260
+ lane: string;
261
261
  issue_code: string;
262
262
  submission_path: string;
263
263
  }[];
@@ -1,15 +1,19 @@
1
- import { type AuditHostResultCheck } from "./dispatch/hostHandoff.js";
2
1
  /**
3
- * Submit one work item's result by its id (decision 4, 2026-11-06). The shared
4
- * core of `audit-code submit` and the `submit_result` MCP tool: load what the
5
- * judgment reads, then judge and, only on acceptance, write the bound path.
2
+ * Both entrypoints accept through the current question assignment's ledger.
3
+ * Legacy file-review artifacts are archives, not a fallback submission route.
6
4
  */
7
5
  export declare function submitWorkItemResult(params: {
8
6
  readonly root: string;
9
7
  readonly artifactsDir: string;
10
8
  readonly workItemId: string;
11
9
  readonly source: string;
12
- }): Promise<AuditHostResultCheck>;
10
+ }): Promise<{
11
+ run_id: string;
12
+ work_item_id: string;
13
+ submission_id: string;
14
+ disposition: "accepted" | "replay";
15
+ written: boolean;
16
+ }>;
13
17
  /**
14
18
  * `audit-code mcp` — serve the submit-only MCP tool over stdio. The server is
15
19
  * imported here, not at the top, so no other command loads the MCP SDK. The
@@ -20,7 +24,8 @@ export declare function cmdMcp(_argv: string[]): Promise<void>;
20
24
  * `audit-code submit --work-item <id> --from <file>` — the route for a host
21
25
  * without the MCP tool. The reader writes its result JSON with its file tool to
22
26
  * any file; only the id and that path pass the shell, so no payload is escaped.
23
- * Exit 0 means the result is at its bound path and ingestion will accept it.
27
+ * Exit 0 means the response has been durably accepted or was an exact replay.
24
28
  */
25
29
  export declare function cmdSubmit(argv: string[]): Promise<void>;
30
+ export declare function cmdConsolidateFindings(argv: string[]): Promise<void>;
26
31
  //# sourceMappingURL=submitCommand.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"submitCommand.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/submitCommand.ts"],"names":[],"mappings":"AASA,OAAO,EAAyB,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAE7F;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAahC;AAOD;;;;GAIG;AACH,wBAAsB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB3D;AAED;;;;;GAKG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B7D"}
1
+ {"version":3,"file":"submitCommand.d.ts","sourceRoot":"","sources":["../../../src/audit/cli/submitCommand.ts"],"names":[],"mappings":"AAmCA;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;;;;;;GAqCA;AAOD;;;;GAIG;AACH,wBAAsB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAyB3D;AAED;;;;;GAKG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuB7D;AAMD,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB1E"}