audit-tools 0.55.20 → 0.56.1
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.
- package/dist/audit/cli/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +6 -8
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.d.ts +2 -4
- package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
- package/dist/audit/cli/charterExtractionPrompt.js +15 -0
- package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
- package/dist/audit/cli/cleanup.js +2 -2
- package/dist/audit/cli/cleanup.js.map +1 -1
- package/dist/audit/cli/cleanupCommand.d.ts.map +1 -1
- package/dist/audit/cli/cleanupCommand.js +11 -10
- package/dist/audit/cli/cleanupCommand.js.map +1 -1
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
- package/dist/audit/cli/conceptualDispatch.js +26 -20
- package/dist/audit/cli/conceptualDispatch.js.map +1 -1
- package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
- package/dist/audit/cli/confirmIntentStep.js +3 -5
- package/dist/audit/cli/confirmIntentStep.js.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/audit/cli/dispatch/hostHandoff.js +46 -68
- package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
- package/dist/audit/cli/explainTaskCommand.d.ts.map +1 -1
- package/dist/audit/cli/explainTaskCommand.js +3 -2
- package/dist/audit/cli/explainTaskCommand.js.map +1 -1
- package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
- package/dist/audit/cli/fanoutLanes.js +7 -6
- package/dist/audit/cli/fanoutLanes.js.map +1 -1
- package/dist/audit/cli/laneSubmissions.d.ts +0 -13
- package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
- package/dist/audit/cli/laneSubmissions.js +28 -19
- package/dist/audit/cli/laneSubmissions.js.map +1 -1
- package/dist/audit/cli/laneValidators.d.ts +7 -1
- package/dist/audit/cli/laneValidators.d.ts.map +1 -1
- package/dist/audit/cli/laneValidators.js +15 -10
- package/dist/audit/cli/laneValidators.js.map +1 -1
- package/dist/audit/cli/lineIndex.d.ts.map +1 -1
- package/dist/audit/cli/lineIndex.js +4 -3
- package/dist/audit/cli/lineIndex.js.map +1 -1
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
- package/dist/audit/cli/nextStepCommand.js +6 -7
- package/dist/audit/cli/nextStepCommand.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts +29 -17
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +75 -130
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/recoverSubmissionCommand.d.ts.map +1 -1
- package/dist/audit/cli/recoverSubmissionCommand.js +5 -4
- package/dist/audit/cli/recoverSubmissionCommand.js.map +1 -1
- package/dist/audit/cli/resynthesizeCommand.d.ts.map +1 -1
- package/dist/audit/cli/resynthesizeCommand.js +3 -1
- package/dist/audit/cli/resynthesizeCommand.js.map +1 -1
- package/dist/audit/cli/reviewRun.d.ts +0 -6
- package/dist/audit/cli/reviewRun.d.ts.map +1 -1
- package/dist/audit/cli/reviewRun.js +11 -18
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/cli/reviewSubmission.d.ts.map +1 -1
- package/dist/audit/cli/reviewSubmission.js +16 -8
- package/dist/audit/cli/reviewSubmission.js.map +1 -1
- package/dist/audit/cli/semanticReviewStep.d.ts +5 -5
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
- package/dist/audit/cli/semanticReviewStep.js +5 -0
- package/dist/audit/cli/semanticReviewStep.js.map +1 -1
- package/dist/audit/cli/statusCommand.d.ts.map +1 -1
- package/dist/audit/cli/statusCommand.js +3 -2
- package/dist/audit/cli/statusCommand.js.map +1 -1
- package/dist/audit/cli/steps.d.ts +11 -11
- package/dist/audit/cli/steps.d.ts.map +1 -1
- package/dist/audit/cli/steps.js +11 -11
- package/dist/audit/cli/steps.js.map +1 -1
- package/dist/audit/cli/submitCommand.d.ts.map +1 -1
- package/dist/audit/cli/submitCommand.js +9 -4
- package/dist/audit/cli/submitCommand.js.map +1 -1
- package/dist/audit/cli/submitGateResult.d.ts.map +1 -1
- package/dist/audit/cli/submitGateResult.js +2 -1
- package/dist/audit/cli/submitGateResult.js.map +1 -1
- package/dist/audit/cli/unacceptResultsCommand.d.ts +3 -2
- package/dist/audit/cli/unacceptResultsCommand.d.ts.map +1 -1
- package/dist/audit/cli/unacceptResultsCommand.js +8 -6
- package/dist/audit/cli/unacceptResultsCommand.js.map +1 -1
- package/dist/audit/cli/validateResultsCommand.d.ts.map +1 -1
- package/dist/audit/cli/validateResultsCommand.js +5 -4
- package/dist/audit/cli/validateResultsCommand.js.map +1 -1
- package/dist/audit/cli.d.ts +0 -2
- package/dist/audit/cli.d.ts.map +1 -1
- package/dist/audit/cli.js +2 -2
- package/dist/audit/cli.js.map +1 -1
- package/dist/audit/decompose/buildStructureDecomposition.d.ts.map +1 -1
- package/dist/audit/decompose/buildStructureDecomposition.js +5 -5
- package/dist/audit/decompose/buildStructureDecomposition.js.map +1 -1
- package/dist/audit/extractors/analyzers/merge.d.ts.map +1 -1
- package/dist/audit/extractors/analyzers/merge.js +4 -11
- package/dist/audit/extractors/analyzers/merge.js.map +1 -1
- package/dist/audit/extractors/analyzers/typescript.d.ts.map +1 -1
- package/dist/audit/extractors/analyzers/typescript.js +3 -14
- package/dist/audit/extractors/analyzers/typescript.js.map +1 -1
- package/dist/audit/extractors/browserExtension.d.ts.map +1 -1
- package/dist/audit/extractors/browserExtension.js +3 -2
- package/dist/audit/extractors/browserExtension.js.map +1 -1
- package/dist/audit/extractors/commentDecomposition.d.ts +1 -1
- package/dist/audit/extractors/commentDecomposition.d.ts.map +1 -1
- package/dist/audit/extractors/commentDecomposition.js +16 -33
- package/dist/audit/extractors/commentDecomposition.js.map +1 -1
- package/dist/audit/extractors/dataStateCoupling.d.ts +4 -0
- package/dist/audit/extractors/dataStateCoupling.d.ts.map +1 -1
- package/dist/audit/extractors/dataStateCoupling.js +26 -12
- package/dist/audit/extractors/dataStateCoupling.js.map +1 -1
- package/dist/audit/extractors/designAssessment.js +1 -1
- package/dist/audit/extractors/designAssessment.js.map +1 -1
- package/dist/audit/extractors/disposition.d.ts.map +1 -1
- package/dist/audit/extractors/disposition.js +24 -40
- package/dist/audit/extractors/disposition.js.map +1 -1
- package/dist/audit/extractors/docsDigest.js +1 -1
- package/dist/audit/extractors/docsDigest.js.map +1 -1
- package/dist/audit/extractors/flows.d.ts.map +1 -1
- package/dist/audit/extractors/flows.js +23 -19
- package/dist/audit/extractors/flows.js.map +1 -1
- package/dist/audit/extractors/fsIntake.d.ts.map +1 -1
- package/dist/audit/extractors/fsIntake.js +8 -5
- package/dist/audit/extractors/fsIntake.js.map +1 -1
- package/dist/audit/extractors/gitHistory.d.ts +6 -6
- package/dist/audit/extractors/gitHistory.d.ts.map +1 -1
- package/dist/audit/extractors/gitHistory.js +6 -6
- package/dist/audit/extractors/gitHistory.js.map +1 -1
- package/dist/audit/extractors/graph.d.ts +3 -1
- package/dist/audit/extractors/graph.d.ts.map +1 -1
- package/dist/audit/extractors/graph.js +15 -17
- package/dist/audit/extractors/graph.js.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/packageJson.d.ts.map +1 -1
- package/dist/audit/extractors/graphManifestEdges/packageJson.js +23 -40
- package/dist/audit/extractors/graphManifestEdges/packageJson.js.map +1 -1
- package/dist/audit/extractors/graphPathUtils.d.ts +9 -0
- package/dist/audit/extractors/graphPathUtils.d.ts.map +1 -1
- package/dist/audit/extractors/graphPathUtils.js +35 -16
- package/dist/audit/extractors/graphPathUtils.js.map +1 -1
- package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
- package/dist/audit/extractors/graphRoutes.js +3 -7
- package/dist/audit/extractors/graphRoutes.js.map +1 -1
- package/dist/audit/extractors/graphSignals.d.ts.map +1 -1
- package/dist/audit/extractors/graphSignals.js +40 -29
- package/dist/audit/extractors/graphSignals.js.map +1 -1
- package/dist/audit/extractors/graphSuites.d.ts.map +1 -1
- package/dist/audit/extractors/graphSuites.js +4 -7
- package/dist/audit/extractors/graphSuites.js.map +1 -1
- package/dist/audit/extractors/graphTestSources.d.ts.map +1 -1
- package/dist/audit/extractors/graphTestSources.js +3 -10
- package/dist/audit/extractors/graphTestSources.js.map +1 -1
- package/dist/audit/extractors/pathPatterns.d.ts +4 -2
- package/dist/audit/extractors/pathPatterns.d.ts.map +1 -1
- package/dist/audit/extractors/pathPatterns.js +13 -21
- package/dist/audit/extractors/pathPatterns.js.map +1 -1
- package/dist/audit/extractors/risk.d.ts.map +1 -1
- package/dist/audit/extractors/risk.js +7 -7
- package/dist/audit/extractors/risk.js.map +1 -1
- package/dist/audit/extractors/surfaces.d.ts.map +1 -1
- package/dist/audit/extractors/surfaces.js +3 -9
- package/dist/audit/extractors/surfaces.js.map +1 -1
- package/dist/audit/io/artifacts.d.ts +1 -3
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +9 -9
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/io/rollover.d.ts.map +1 -1
- package/dist/audit/io/rollover.js +0 -1
- package/dist/audit/io/rollover.js.map +1 -1
- package/dist/audit/io/runArtifacts.d.ts +30 -2
- package/dist/audit/io/runArtifacts.d.ts.map +1 -1
- package/dist/audit/io/runArtifacts.js +23 -23
- package/dist/audit/io/runArtifacts.js.map +1 -1
- package/dist/audit/io/runSnapshot.js +2 -2
- package/dist/audit/io/runSnapshot.js.map +1 -1
- package/dist/audit/io/toolingManifest.d.ts.map +1 -1
- package/dist/audit/io/toolingManifest.js +7 -9
- package/dist/audit/io/toolingManifest.js.map +1 -1
- package/dist/audit/orchestrator/advance.d.ts +6 -0
- package/dist/audit/orchestrator/advance.d.ts.map +1 -1
- package/dist/audit/orchestrator/advance.js +70 -95
- package/dist/audit/orchestrator/advance.js.map +1 -1
- package/dist/audit/orchestrator/architectureDiscovery.d.ts +6 -2
- package/dist/audit/orchestrator/architectureDiscovery.d.ts.map +1 -1
- package/dist/audit/orchestrator/architectureDiscovery.js +19 -14
- package/dist/audit/orchestrator/architectureDiscovery.js.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.d.ts.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.js +12 -15
- package/dist/audit/orchestrator/artifactMetadata.js.map +1 -1
- package/dist/audit/orchestrator/auditTaskUtils.d.ts +13 -0
- package/dist/audit/orchestrator/auditTaskUtils.d.ts.map +1 -1
- package/dist/audit/orchestrator/auditTaskUtils.js +10 -3
- package/dist/audit/orchestrator/auditTaskUtils.js.map +1 -1
- package/dist/audit/orchestrator/autoFixExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/autoFixExecutor.js +2 -8
- package/dist/audit/orchestrator/autoFixExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.d.ts +4 -2
- package/dist/audit/orchestrator/charterClarificationExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterClarificationExecutor.js +12 -20
- package/dist/audit/orchestrator/charterClarificationExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterComparisonExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterComparisonExecutor.js +5 -9
- package/dist/audit/orchestrator/charterComparisonExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts +5 -0
- package/dist/audit/orchestrator/charterExtractionExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterExtractionExecutor.js +10 -5
- package/dist/audit/orchestrator/charterExtractionExecutor.js.map +1 -1
- package/dist/audit/orchestrator/charterFidelityPacket.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterFidelityPacket.js +1 -2
- package/dist/audit/orchestrator/charterFidelityPacket.js.map +1 -1
- package/dist/audit/orchestrator/charterPacketArchive.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterPacketArchive.js +11 -7
- package/dist/audit/orchestrator/charterPacketArchive.js.map +1 -1
- package/dist/audit/orchestrator/charterPackets.d.ts.map +1 -1
- package/dist/audit/orchestrator/charterPackets.js +30 -69
- package/dist/audit/orchestrator/charterPackets.js.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.d.ts +0 -1
- package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.js +0 -7
- package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.d.ts +20 -0
- package/dist/audit/orchestrator/dependencySlices.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencySlices.js +20 -20
- package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.d.ts +1 -3
- package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewProjection.js +8 -2
- package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.d.ts +2 -11
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewPrompt.js +10 -25
- package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
- package/dist/audit/orchestrator/designReviewSnapshot.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewSnapshot.js +1 -2
- package/dist/audit/orchestrator/designReviewSnapshot.js.map +1 -1
- package/dist/audit/orchestrator/designReviewTask.d.ts.map +1 -1
- package/dist/audit/orchestrator/designReviewTask.js +2 -2
- package/dist/audit/orchestrator/designReviewTask.js.map +1 -1
- package/dist/audit/orchestrator/edgeReasoning.d.ts.map +1 -1
- package/dist/audit/orchestrator/edgeReasoning.js +1 -3
- package/dist/audit/orchestrator/edgeReasoning.js.map +1 -1
- package/dist/audit/orchestrator/executorResult.d.ts +3 -32
- package/dist/audit/orchestrator/executorResult.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +33 -43
- package/dist/audit/orchestrator/executorRunners.js.map +1 -1
- package/dist/audit/orchestrator/executors.d.ts +34 -0
- package/dist/audit/orchestrator/executors.d.ts.map +1 -1
- package/dist/audit/orchestrator/executors.js +19 -4
- package/dist/audit/orchestrator/executors.js.map +1 -1
- package/dist/audit/orchestrator/fileIntegrity.d.ts.map +1 -1
- package/dist/audit/orchestrator/fileIntegrity.js +4 -3
- package/dist/audit/orchestrator/fileIntegrity.js.map +1 -1
- package/dist/audit/orchestrator/flowPlanning.d.ts.map +1 -1
- package/dist/audit/orchestrator/flowPlanning.js +2 -2
- package/dist/audit/orchestrator/flowPlanning.js.map +1 -1
- package/dist/audit/orchestrator/flowRequeue.d.ts.map +1 -1
- package/dist/audit/orchestrator/flowRequeue.js +2 -3
- package/dist/audit/orchestrator/flowRequeue.js.map +1 -1
- package/dist/audit/orchestrator/graphEnrichmentExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/graphEnrichmentExecutor.js +5 -18
- package/dist/audit/orchestrator/graphEnrichmentExecutor.js.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.d.ts +4 -20
- package/dist/audit/orchestrator/hostInputPause.d.ts.map +1 -1
- package/dist/audit/orchestrator/hostInputPause.js +4 -3
- package/dist/audit/orchestrator/hostInputPause.js.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.js +5 -17
- package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +1 -2
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointExecutor.js +42 -53
- package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.js +12 -8
- package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
- package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts.map +1 -1
- package/dist/audit/orchestrator/intentEquivalenceExecutor.js +13 -22
- package/dist/audit/orchestrator/intentEquivalenceExecutor.js.map +1 -1
- package/dist/audit/orchestrator/lineCounts.d.ts +2 -0
- package/dist/audit/orchestrator/lineCounts.d.ts.map +1 -1
- package/dist/audit/orchestrator/lineCounts.js +4 -0
- package/dist/audit/orchestrator/lineCounts.js.map +1 -1
- package/dist/audit/orchestrator/obligationPolicy.d.ts.map +1 -1
- package/dist/audit/orchestrator/obligationPolicy.js +46 -48
- package/dist/audit/orchestrator/obligationPolicy.js.map +1 -1
- package/dist/audit/orchestrator/pendingTasks.d.ts.map +1 -1
- package/dist/audit/orchestrator/pendingTasks.js +4 -3
- package/dist/audit/orchestrator/pendingTasks.js.map +1 -1
- package/dist/audit/orchestrator/planningExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/planningExecutors.js +5 -1
- package/dist/audit/orchestrator/planningExecutors.js.map +1 -1
- package/dist/audit/orchestrator/requeue.d.ts.map +1 -1
- package/dist/audit/orchestrator/requeue.js +2 -2
- package/dist/audit/orchestrator/requeue.js.map +1 -1
- package/dist/audit/orchestrator/requeueCommand.d.ts.map +1 -1
- package/dist/audit/orchestrator/requeueCommand.js +13 -21
- package/dist/audit/orchestrator/requeueCommand.js.map +1 -1
- package/dist/audit/orchestrator/resultIngestion.d.ts.map +1 -1
- package/dist/audit/orchestrator/resultIngestion.js +3 -4
- package/dist/audit/orchestrator/resultIngestion.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketGraphContext.js +1 -1
- package/dist/audit/orchestrator/reviewPacketGraphContext.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketGraphEdges.d.ts +2 -8
- package/dist/audit/orchestrator/reviewPacketGraphEdges.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketGraphEdges.js +6 -38
- package/dist/audit/orchestrator/reviewPacketGraphEdges.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketMetrics.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketMetrics.js +7 -68
- package/dist/audit/orchestrator/reviewPacketMetrics.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketShared.d.ts +0 -2
- package/dist/audit/orchestrator/reviewPacketShared.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketShared.js.map +1 -1
- package/dist/audit/orchestrator/reviewPacketSizing.d.ts +1 -3
- package/dist/audit/orchestrator/reviewPacketSizing.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPacketSizing.js +3 -13
- package/dist/audit/orchestrator/reviewPacketSizing.js.map +1 -1
- package/dist/audit/orchestrator/reviewPackets.d.ts +7 -8
- package/dist/audit/orchestrator/reviewPackets.d.ts.map +1 -1
- package/dist/audit/orchestrator/reviewPackets.js +17 -32
- package/dist/audit/orchestrator/reviewPackets.js.map +1 -1
- package/dist/audit/orchestrator/runtimeValidation.js +2 -2
- package/dist/audit/orchestrator/runtimeValidation.js.map +1 -1
- package/dist/audit/orchestrator/scope.d.ts.map +1 -1
- package/dist/audit/orchestrator/scope.js +3 -2
- package/dist/audit/orchestrator/scope.js.map +1 -1
- package/dist/audit/orchestrator/scopeIndexBaseline.d.ts.map +1 -1
- package/dist/audit/orchestrator/scopeIndexBaseline.js +1 -2
- package/dist/audit/orchestrator/scopeIndexBaseline.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/conflict.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/conflict.js +2 -2
- package/dist/audit/orchestrator/selectiveDeepening/conflict.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts +3 -5
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js +8 -6
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js +15 -11
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/index.d.ts +3 -3
- package/dist/audit/orchestrator/selectiveDeepening/index.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/index.js +50 -77
- package/dist/audit/orchestrator/selectiveDeepening/index.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js +27 -18
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.d.ts +1 -2
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js +6 -3
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts +12 -9
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/shared.js +15 -35
- package/dist/audit/orchestrator/selectiveDeepening/shared.js.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.d.ts.map +1 -1
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js +9 -16
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js.map +1 -1
- package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
- package/dist/audit/orchestrator/staleness.js +40 -36
- package/dist/audit/orchestrator/staleness.js.map +1 -1
- package/dist/audit/orchestrator/state.d.ts.map +1 -1
- package/dist/audit/orchestrator/state.js +16 -17
- package/dist/audit/orchestrator/state.js.map +1 -1
- package/dist/audit/orchestrator/structureExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/structureExecutors.js +5 -4
- package/dist/audit/orchestrator/structureExecutors.js.map +1 -1
- package/dist/audit/orchestrator/taskAffinityGraph.d.ts.map +1 -1
- package/dist/audit/orchestrator/taskAffinityGraph.js +19 -15
- package/dist/audit/orchestrator/taskAffinityGraph.js.map +1 -1
- package/dist/audit/orchestrator/taskBuilder.d.ts.map +1 -1
- package/dist/audit/orchestrator/taskBuilder.js +2 -3
- package/dist/audit/orchestrator/taskBuilder.js.map +1 -1
- package/dist/audit/orchestrator/trivialAudit.d.ts.map +1 -1
- package/dist/audit/orchestrator/trivialAudit.js +2 -1
- package/dist/audit/orchestrator/trivialAudit.js.map +1 -1
- package/dist/audit/reporting/mergeFindings.d.ts.map +1 -1
- package/dist/audit/reporting/mergeFindings.js +6 -4
- package/dist/audit/reporting/mergeFindings.js.map +1 -1
- package/dist/audit/reporting/synthesis.d.ts.map +1 -1
- package/dist/audit/reporting/synthesis.js +5 -10
- package/dist/audit/reporting/synthesis.js.map +1 -1
- package/dist/audit/reporting/workBlocks.d.ts +0 -1
- package/dist/audit/reporting/workBlocks.d.ts.map +1 -1
- package/dist/audit/reporting/workBlocks.js +8 -15
- package/dist/audit/reporting/workBlocks.js.map +1 -1
- package/dist/audit/systemic/reviewFileMap.js +2 -2
- package/dist/audit/systemic/reviewFileMap.js.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js +2 -2
- package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
- package/dist/audit/systemic/systemicChallengeLoop.js +3 -3
- package/dist/audit/systemic/systemicChallengeLoop.js.map +1 -1
- package/dist/audit/types/reviewPlanning.d.ts +10 -8
- package/dist/audit/types/reviewPlanning.d.ts.map +1 -1
- package/dist/audit/types/reviewPlanning.js +3 -1
- package/dist/audit/types/reviewPlanning.js.map +1 -1
- package/dist/remediate/contractPipeline/executionPlan.d.ts +3 -0
- package/dist/remediate/contractPipeline/executionPlan.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/executionPlan.js +27 -22
- package/dist/remediate/contractPipeline/executionPlan.js.map +1 -1
- package/dist/remediate/contractPipeline/runtimePlanAuthority.d.ts +1 -0
- package/dist/remediate/contractPipeline/runtimePlanAuthority.d.ts.map +1 -1
- package/dist/remediate/contractPipeline/runtimePlanAuthority.js +4 -3
- package/dist/remediate/contractPipeline/runtimePlanAuthority.js.map +1 -1
- package/dist/remediate/dedup/crossLensDedup.d.ts +0 -2
- package/dist/remediate/dedup/crossLensDedup.d.ts.map +1 -1
- package/dist/remediate/dedup/crossLensDedup.js +1 -4
- package/dist/remediate/dedup/crossLensDedup.js.map +1 -1
- package/dist/remediate/droppedFindingsRecord.d.ts.map +1 -1
- package/dist/remediate/droppedFindingsRecord.js +3 -1
- package/dist/remediate/droppedFindingsRecord.js.map +1 -1
- package/dist/remediate/index.d.ts +2 -3
- package/dist/remediate/index.d.ts.map +1 -1
- package/dist/remediate/index.js +51 -27
- package/dist/remediate/index.js.map +1 -1
- package/dist/remediate/intake.d.ts +9 -8
- package/dist/remediate/intake.d.ts.map +1 -1
- package/dist/remediate/intake.js +9 -5
- package/dist/remediate/intake.js.map +1 -1
- package/dist/remediate/intakeSelection.js +3 -3
- package/dist/remediate/intakeSelection.js.map +1 -1
- package/dist/remediate/intent/intentOrdering.d.ts +10 -9
- package/dist/remediate/intent/intentOrdering.d.ts.map +1 -1
- package/dist/remediate/intent/intentOrdering.js +10 -9
- package/dist/remediate/intent/intentOrdering.js.map +1 -1
- package/dist/remediate/intent/intentPersistence.d.ts +1 -0
- package/dist/remediate/intent/intentPersistence.d.ts.map +1 -1
- package/dist/remediate/intent/intentPersistence.js +18 -10
- package/dist/remediate/intent/intentPersistence.js.map +1 -1
- package/dist/remediate/phases/close.d.ts +16 -15
- package/dist/remediate/phases/close.d.ts.map +1 -1
- package/dist/remediate/phases/close.js +172 -163
- package/dist/remediate/phases/close.js.map +1 -1
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js +1 -1
- package/dist/remediate/phases/closeVerifyAnalyzerLeads.js.map +1 -1
- package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts.map +1 -1
- package/dist/remediate/phases/closeVerifyHeadEvidence.js +11 -11
- package/dist/remediate/phases/closeVerifyHeadEvidence.js.map +1 -1
- package/dist/remediate/phases/closeVerifyLandingGates.d.ts +6 -0
- package/dist/remediate/phases/closeVerifyLandingGates.d.ts.map +1 -1
- package/dist/remediate/phases/closeVerifyLandingGates.js +10 -6
- package/dist/remediate/phases/closeVerifyLandingGates.js.map +1 -1
- package/dist/remediate/phases/grounding.d.ts +1 -1
- package/dist/remediate/phases/grounding.d.ts.map +1 -1
- package/dist/remediate/phases/triage.d.ts.map +1 -1
- package/dist/remediate/phases/triage.js +19 -25
- package/dist/remediate/phases/triage.js.map +1 -1
- package/dist/remediate/phases/triageConformance.d.ts.map +1 -1
- package/dist/remediate/phases/triageConformance.js +11 -15
- package/dist/remediate/phases/triageConformance.js.map +1 -1
- package/dist/remediate/review/autonomousGate.d.ts +5 -5
- package/dist/remediate/review/autonomousGate.d.ts.map +1 -1
- package/dist/remediate/review/autonomousGate.js +5 -0
- package/dist/remediate/review/autonomousGate.js.map +1 -1
- package/dist/remediate/review/reviewGate.d.ts.map +1 -1
- package/dist/remediate/review/reviewGate.js +12 -11
- package/dist/remediate/review/reviewGate.js.map +1 -1
- package/dist/remediate/riskSignal.d.ts +0 -1
- package/dist/remediate/riskSignal.d.ts.map +1 -1
- package/dist/remediate/riskSignal.js.map +1 -1
- package/dist/remediate/state/decisionConsumption.d.ts +2 -0
- package/dist/remediate/state/decisionConsumption.d.ts.map +1 -1
- package/dist/remediate/state/decisionConsumption.js +12 -10
- package/dist/remediate/state/decisionConsumption.js.map +1 -1
- package/dist/remediate/state/itemStatus.d.ts +3 -3
- package/dist/remediate/state/itemStatus.js +5 -5
- package/dist/remediate/state/store.d.ts +4 -3
- package/dist/remediate/state/store.d.ts.map +1 -1
- package/dist/remediate/state/store.js +11 -24
- package/dist/remediate/state/store.js.map +1 -1
- package/dist/remediate/state/types.d.ts +2 -2
- package/dist/remediate/state/types.d.ts.map +1 -1
- package/dist/remediate/state/types.js +12 -14
- package/dist/remediate/state/types.js.map +1 -1
- package/dist/remediate/steps/clarificationResolution.d.ts.map +1 -1
- package/dist/remediate/steps/clarificationResolution.js +4 -2
- package/dist/remediate/steps/clarificationResolution.js.map +1 -1
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipeline.js +26 -23
- package/dist/remediate/steps/contractPipeline.js.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
- package/dist/remediate/steps/contractPipelinePrompts.js +3 -2
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
- package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts +8 -3
- package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/contractConformanceReview.js +15 -12
- package/dist/remediate/steps/dispatch/contractConformanceReview.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostContracts.d.ts +2 -0
- package/dist/remediate/steps/dispatch/hostContracts.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostContracts.js +6 -3
- package/dist/remediate/steps/dispatch/hostContracts.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostCorroboration.d.ts +11 -12
- package/dist/remediate/steps/dispatch/hostCorroboration.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostCorroboration.js +13 -6
- package/dist/remediate/steps/dispatch/hostCorroboration.js.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts +5 -7
- package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/hostHandoff.js +162 -265
- package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
- package/dist/remediate/steps/dispatch/requiredTests.d.ts +18 -0
- package/dist/remediate/steps/dispatch/requiredTests.d.ts.map +1 -1
- package/dist/remediate/steps/dispatch/requiredTests.js +9 -11
- package/dist/remediate/steps/dispatch/requiredTests.js.map +1 -1
- package/dist/remediate/steps/finalGate.d.ts +1 -1
- package/dist/remediate/steps/finalGate.d.ts.map +1 -1
- package/dist/remediate/steps/finalGate.js +12 -12
- package/dist/remediate/steps/finalGate.js.map +1 -1
- package/dist/remediate/steps/frictionCloseout.d.ts.map +1 -1
- package/dist/remediate/steps/frictionCloseout.js +0 -1
- package/dist/remediate/steps/frictionCloseout.js.map +1 -1
- package/dist/remediate/steps/gateCommands.d.ts +5 -10
- package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
- package/dist/remediate/steps/gateCommands.js +8 -12
- package/dist/remediate/steps/gateCommands.js.map +1 -1
- package/dist/remediate/steps/intakeResolver.d.ts +5 -7
- package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
- package/dist/remediate/steps/intakeResolver.js +30 -33
- package/dist/remediate/steps/intakeResolver.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +1 -1
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +134 -158
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/remediate/steps/prompts.d.ts +4 -30
- package/dist/remediate/steps/prompts.d.ts.map +1 -1
- package/dist/remediate/steps/prompts.js +5 -114
- package/dist/remediate/steps/prompts.js.map +1 -1
- package/dist/remediate/steps/recoverIngest.d.ts +5 -13
- package/dist/remediate/steps/recoverIngest.d.ts.map +1 -1
- package/dist/remediate/steps/recoverIngest.js +20 -26
- package/dist/remediate/steps/recoverIngest.js.map +1 -1
- package/dist/remediate/steps/stepWriter.d.ts +5 -4
- package/dist/remediate/steps/stepWriter.d.ts.map +1 -1
- package/dist/remediate/steps/stepWriter.js +8 -5
- package/dist/remediate/steps/stepWriter.js.map +1 -1
- package/dist/remediate/steps/submitGateResult.d.ts +0 -5
- package/dist/remediate/steps/submitGateResult.d.ts.map +1 -1
- package/dist/remediate/steps/submitGateResult.js +8 -8
- package/dist/remediate/steps/submitGateResult.js.map +1 -1
- package/dist/remediate/steps/types.d.ts +1 -1
- package/dist/remediate/steps/types.d.ts.map +1 -1
- package/dist/remediate/steps/types.js +0 -1
- package/dist/remediate/steps/types.js.map +1 -1
- package/dist/remediate/validation/artifacts.d.ts.map +1 -1
- package/dist/remediate/validation/artifacts.js +11 -9
- package/dist/remediate/validation/artifacts.js.map +1 -1
- package/dist/remediate/validation/remediationState.d.ts +0 -2
- package/dist/remediate/validation/remediationState.d.ts.map +1 -1
- package/dist/remediate/validation/remediationState.js +9 -46
- package/dist/remediate/validation/remediationState.js.map +1 -1
- package/dist/shared/accessMemory.d.ts +3 -9
- package/dist/shared/accessMemory.d.ts.map +1 -1
- package/dist/shared/accessMemory.js +2 -4
- package/dist/shared/accessMemory.js.map +1 -1
- package/dist/shared/affinityArtifacts.d.ts.map +1 -1
- package/dist/shared/affinityArtifacts.js +5 -7
- package/dist/shared/affinityArtifacts.js.map +1 -1
- package/dist/shared/agentReflections.d.ts.map +1 -1
- package/dist/shared/agentReflections.js +11 -14
- package/dist/shared/agentReflections.js.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.d.ts.map +1 -1
- package/dist/shared/analyzers/binaryAcquisition.js +2 -1
- package/dist/shared/analyzers/binaryAcquisition.js.map +1 -1
- package/dist/shared/analyzers/candidates.js +1 -1
- package/dist/shared/analyzers/candidates.js.map +1 -1
- package/dist/shared/analyzers/clippy.d.ts +2 -25
- package/dist/shared/analyzers/clippy.d.ts.map +1 -1
- package/dist/shared/analyzers/clippy.js +1 -17
- package/dist/shared/analyzers/clippy.js.map +1 -1
- package/dist/shared/analyzers/normalizeExternal.d.ts +0 -15
- package/dist/shared/analyzers/normalizeExternal.d.ts.map +1 -1
- package/dist/shared/analyzers/normalizeExternal.js +2 -1
- package/dist/shared/analyzers/normalizeExternal.js.map +1 -1
- package/dist/shared/analyzers/rubocop.d.ts +1 -19
- package/dist/shared/analyzers/rubocop.d.ts.map +1 -1
- package/dist/shared/analyzers/rubocop.js +0 -23
- package/dist/shared/analyzers/rubocop.js.map +1 -1
- package/dist/shared/artifactFreshness.d.ts.map +1 -1
- package/dist/shared/artifactFreshness.js +4 -6
- package/dist/shared/artifactFreshness.js.map +1 -1
- package/dist/shared/chunkByBudget.d.ts +1 -24
- package/dist/shared/chunkByBudget.d.ts.map +1 -1
- package/dist/shared/chunkByBudget.js +2 -13
- package/dist/shared/chunkByBudget.js.map +1 -1
- package/dist/shared/compareCodeUnits.d.ts +2 -0
- package/dist/shared/compareCodeUnits.d.ts.map +1 -1
- package/dist/shared/compareCodeUnits.js +5 -0
- package/dist/shared/compareCodeUnits.js.map +1 -1
- package/dist/shared/contentKey.d.ts.map +1 -1
- package/dist/shared/contentKey.js +3 -1
- package/dist/shared/contentKey.js.map +1 -1
- package/dist/shared/countBy.d.ts.map +1 -1
- package/dist/shared/countBy.js +4 -3
- package/dist/shared/countBy.js.map +1 -1
- package/dist/shared/decompose/charterExtraction.d.ts.map +1 -1
- package/dist/shared/decompose/charterExtraction.js +11 -20
- package/dist/shared/decompose/charterExtraction.js.map +1 -1
- package/dist/shared/decompose/consensus.d.ts.map +1 -1
- package/dist/shared/decompose/consensus.js +4 -12
- package/dist/shared/decompose/consensus.js.map +1 -1
- package/dist/shared/decompose/contentCoherence.d.ts.map +1 -1
- package/dist/shared/decompose/contentCoherence.js +12 -15
- package/dist/shared/decompose/contentCoherence.js.map +1 -1
- package/dist/shared/decompose/modularity.d.ts.map +1 -1
- package/dist/shared/decompose/modularity.js +7 -19
- package/dist/shared/decompose/modularity.js.map +1 -1
- package/dist/shared/decompose/systemicChallenge.d.ts +8 -0
- package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
- package/dist/shared/decompose/systemicChallenge.js +8 -8
- package/dist/shared/decompose/systemicChallenge.js.map +1 -1
- package/dist/shared/findingIdentitySignature.d.ts +6 -1
- package/dist/shared/findingIdentitySignature.d.ts.map +1 -1
- package/dist/shared/findingIdentitySignature.js +8 -6
- package/dist/shared/findingIdentitySignature.js.map +1 -1
- package/dist/shared/findingSimilarity.d.ts.map +1 -1
- package/dist/shared/findingSimilarity.js +9 -14
- package/dist/shared/findingSimilarity.js.map +1 -1
- package/dist/shared/findings/dedupe.d.ts.map +1 -1
- package/dist/shared/findings/dedupe.js +1 -10
- package/dist/shared/findings/dedupe.js.map +1 -1
- package/dist/shared/friction/captureFrictionEvent.d.ts +1 -1
- package/dist/shared/friction/captureFrictionEvent.d.ts.map +1 -1
- package/dist/shared/friction/frictionRecord.d.ts.map +1 -1
- package/dist/shared/friction/frictionRecord.js +3 -2
- package/dist/shared/friction/frictionRecord.js.map +1 -1
- package/dist/shared/friction/stepBoundaryCapture.d.ts +1 -2
- package/dist/shared/friction/stepBoundaryCapture.d.ts.map +1 -1
- package/dist/shared/friction/stepBoundaryCapture.js.map +1 -1
- package/dist/shared/friction/triage.d.ts.map +1 -1
- package/dist/shared/friction/triage.js +4 -3
- package/dist/shared/friction/triage.js.map +1 -1
- package/dist/shared/git.d.ts +2 -10
- package/dist/shared/git.d.ts.map +1 -1
- package/dist/shared/git.js +6 -17
- package/dist/shared/git.js.map +1 -1
- package/dist/shared/graph/graphPaths.d.ts +2 -5
- package/dist/shared/graph/graphPaths.d.ts.map +1 -1
- package/dist/shared/graph/graphPaths.js +5 -6
- package/dist/shared/graph/graphPaths.js.map +1 -1
- package/dist/shared/index.d.ts +41 -61
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +25 -7
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/intent/pathScope.d.ts +5 -0
- package/dist/shared/intent/pathScope.d.ts.map +1 -1
- package/dist/shared/intent/pathScope.js +17 -8
- package/dist/shared/intent/pathScope.js.map +1 -1
- package/dist/shared/io/auditToolsPaths.d.ts +9 -16
- package/dist/shared/io/auditToolsPaths.d.ts.map +1 -1
- package/dist/shared/io/auditToolsPaths.js +9 -18
- package/dist/shared/io/auditToolsPaths.js.map +1 -1
- package/dist/shared/io/frictionCapture.d.ts.map +1 -1
- package/dist/shared/io/frictionCapture.js +3 -2
- package/dist/shared/io/frictionCapture.js.map +1 -1
- package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
- package/dist/shared/io/stepContractWriter.js +10 -8
- package/dist/shared/io/stepContractWriter.js.map +1 -1
- package/dist/shared/mcp/submitServer.d.ts.map +1 -1
- package/dist/shared/mcp/submitServer.js +21 -29
- package/dist/shared/mcp/submitServer.js.map +1 -1
- package/dist/shared/observability/rootLogObservations.d.ts.map +1 -1
- package/dist/shared/observability/rootLogObservations.js +3 -2
- package/dist/shared/observability/rootLogObservations.js.map +1 -1
- package/dist/shared/parsing/toml.d.ts.map +1 -1
- package/dist/shared/parsing/toml.js +3 -4
- package/dist/shared/parsing/toml.js.map +1 -1
- package/dist/shared/reporting/auditDeliverable.d.ts.map +1 -1
- package/dist/shared/reporting/auditDeliverable.js +6 -15
- package/dist/shared/reporting/auditDeliverable.js.map +1 -1
- package/dist/shared/reporting/lensCoverage.d.ts.map +1 -1
- package/dist/shared/reporting/lensCoverage.js +4 -5
- package/dist/shared/reporting/lensCoverage.js.map +1 -1
- package/dist/shared/reporting/markdown.d.ts +3 -0
- package/dist/shared/reporting/markdown.d.ts.map +1 -0
- package/dist/shared/reporting/markdown.js +6 -0
- package/dist/shared/reporting/markdown.js.map +1 -0
- package/dist/shared/sessionConfig.d.ts.map +1 -1
- package/dist/shared/sessionConfig.js +3 -7
- package/dist/shared/sessionConfig.js.map +1 -1
- package/dist/shared/submission/handRecovery.d.ts.map +1 -1
- package/dist/shared/submission/handRecovery.js +3 -2
- package/dist/shared/submission/handRecovery.js.map +1 -1
- package/dist/shared/submission/hostResultOutcomes.d.ts +1 -1
- package/dist/shared/submission/hostResultOutcomes.js +2 -2
- package/dist/shared/submission/hostResultOutcomes.js.map +1 -1
- package/dist/shared/submission/submissionClassifier.d.ts.map +1 -1
- package/dist/shared/submission/submissionClassifier.js +4 -3
- package/dist/shared/submission/submissionClassifier.js.map +1 -1
- package/dist/shared/submission/submissionIdentity.d.ts.map +1 -1
- package/dist/shared/submission/submissionIdentity.js +3 -1
- package/dist/shared/submission/submissionIdentity.js.map +1 -1
- package/dist/shared/submission/submissionLedger.d.ts +1 -0
- package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
- package/dist/shared/submission/submissionLedger.js +9 -5
- package/dist/shared/submission/submissionLedger.js.map +1 -1
- package/dist/shared/tooling/allowlistedExec.d.ts.map +1 -1
- package/dist/shared/tooling/allowlistedExec.js +35 -67
- package/dist/shared/tooling/allowlistedExec.js.map +1 -1
- package/dist/shared/tooling/analyzerDeps.d.ts.map +1 -1
- package/dist/shared/tooling/analyzerDeps.js +2 -1
- package/dist/shared/tooling/analyzerDeps.js.map +1 -1
- package/dist/shared/tooling/exec.d.ts +1 -1
- package/dist/shared/tooling/exec.d.ts.map +1 -1
- package/dist/shared/tooling/exec.js +3 -2
- package/dist/shared/tooling/exec.js.map +1 -1
- package/dist/shared/tooling/landingGates.d.ts +3 -3
- package/dist/shared/tooling/landingGates.js +3 -3
- package/dist/shared/tooling/ownedProcessLifecycle.d.ts +0 -1
- package/dist/shared/tooling/ownedProcessLifecycle.d.ts.map +1 -1
- package/dist/shared/tooling/ownedProcessLifecycle.js +1 -1
- package/dist/shared/tooling/ownedProcessLifecycle.js.map +1 -1
- package/dist/shared/tooling/projectTestAdmission.d.ts +7 -12
- package/dist/shared/tooling/projectTestAdmission.d.ts.map +1 -1
- package/dist/shared/tooling/projectTestAdmission.js.map +1 -1
- package/dist/shared/tooling/testCommand.d.ts +0 -14
- package/dist/shared/tooling/testCommand.d.ts.map +1 -1
- package/dist/shared/tooling/testCommand.js +2 -3
- package/dist/shared/tooling/testCommand.js.map +1 -1
- package/dist/shared/tooling/windowsOwnedJob.d.ts +2 -1
- package/dist/shared/tooling/windowsOwnedJob.d.ts.map +1 -1
- package/dist/shared/types/accessMemory.d.ts +3 -19
- package/dist/shared/types/accessMemory.d.ts.map +1 -1
- package/dist/shared/types/accessMemory.js +3 -19
- package/dist/shared/types/accessMemory.js.map +1 -1
- package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
- package/dist/shared/types/intentCheckpoint.js +2 -1
- package/dist/shared/types/intentCheckpoint.js.map +1 -1
- package/dist/shared/types/lens.d.ts +5 -0
- package/dist/shared/types/lens.d.ts.map +1 -1
- package/dist/shared/types/lens.js +13 -0
- package/dist/shared/types/lens.js.map +1 -1
- package/dist/shared/types/remediationOutcome.d.ts +10 -0
- package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
- package/dist/shared/types/remediationOutcome.js +3 -0
- package/dist/shared/types/remediationOutcome.js.map +1 -1
- package/dist/shared/validation/contractConstructionSites.d.ts.map +1 -1
- package/dist/shared/validation/contractConstructionSites.js +2 -1
- package/dist/shared/validation/contractConstructionSites.js.map +1 -1
- package/dist/shared/validation/findingGrounding.d.ts +2 -1
- package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
- package/dist/shared/validation/findingGrounding.js +9 -5
- package/dist/shared/validation/findingGrounding.js.map +1 -1
- package/dist/shared/validation/findingsReport.d.ts +6 -0
- package/dist/shared/validation/findingsReport.d.ts.map +1 -1
- package/dist/shared/validation/findingsReport.js +29 -19
- package/dist/shared/validation/findingsReport.js.map +1 -1
- package/docs/audit-pkg/contracts.md +73 -6
- package/docs/audit-pkg/operator-guide.md +10 -2
- package/docs/audit-pkg/product.md +1 -1
- package/package.json +1 -3
- package/remediate-code.mjs +13 -5
- package/scripts/audit/postinstall.mjs +6 -21
- package/scripts/remediate/postinstall.mjs +2 -17
- package/scripts/shared/install-host-assets.mjs +11 -3
- package/scripts/shared/primitives.mjs +14 -3
- package/wrapper/audit-code-wrapper-build.mjs +21 -18
- package/wrapper/audit-code-wrapper-install-hosts.mjs +6 -120
- package/wrapper/audit-code-wrapper-lib.mjs +28 -42
- package/wrapper/audit-code-wrapper-opencode.mjs +11 -24
- package/wrapper/installer-verb-help.mjs +21 -8
- package/wrapper/remediate-code-wrapper-install-hosts.mjs +15 -130
- package/wrapper/remediate-code-wrapper-opencode.mjs +11 -24
- package/wrapper/repo-root.mjs +2 -2
- package/wrapper/shared-install-hosts.mjs +119 -0
- package/wrapper/shared-project-opencode.mjs +22 -0
- package/dist/audit/io/runArtifactTypes.d.ts +0 -8
- package/dist/audit/io/runArtifactTypes.d.ts.map +0 -1
- package/dist/audit/io/runArtifactTypes.js +0 -2
- package/dist/audit/io/runArtifactTypes.js.map +0 -1
- package/dist/audit/orchestrator/accessMemory.d.ts +0 -35
- package/dist/audit/orchestrator/accessMemory.d.ts.map +0 -1
- package/dist/audit/orchestrator/accessMemory.js +0 -54
- package/dist/audit/orchestrator/accessMemory.js.map +0 -1
- package/dist/audit/orchestrator/reviewPacketGraph.d.ts +0 -4
- package/dist/audit/orchestrator/reviewPacketGraph.d.ts.map +0 -1
- package/dist/audit/orchestrator/reviewPacketGraph.js +0 -7
- package/dist/audit/orchestrator/reviewPacketGraph.js.map +0 -1
- package/dist/shared/continuityScore.d.ts +0 -13
- package/dist/shared/continuityScore.d.ts.map +0 -1
- package/dist/shared/continuityScore.js +0 -164
- package/dist/shared/continuityScore.js.map +0 -1
- package/dist/shared/graph/directedCycles.d.ts +0 -61
- package/dist/shared/graph/directedCycles.d.ts.map +0 -1
- package/dist/shared/graph/directedCycles.js +0 -190
- package/dist/shared/graph/directedCycles.js.map +0 -1
- package/dist/shared/io/pathIdentity.d.ts +0 -26
- package/dist/shared/io/pathIdentity.d.ts.map +0 -1
- package/dist/shared/io/pathIdentity.js +0 -50
- package/dist/shared/io/pathIdentity.js.map +0 -1
|
@@ -1,37 +1,40 @@
|
|
|
1
|
+
import { backtickList } from "../../shared/reporting/markdown.js";
|
|
1
2
|
import { readPlanClarificationResolutions, planClarificationRefusal, pausedClarifications } from "./clarificationResolution.js";
|
|
2
3
|
import { admitRemediationDirtyBaseline, RemediationDirtyBaselineError } from "../state/dirtyBaseline.js";
|
|
3
|
-
import { readDecisionSnapshot, decisionContextDigest } from "../state/decisionConsumption.js";
|
|
4
|
+
import { CLARIFICATION_RESOLUTION_FILENAME, TRIAGE_RESOLUTION_FILENAME, readDecisionSnapshot, decisionContextDigest } from "../state/decisionConsumption.js";
|
|
4
5
|
import { RemediationPlanAuthorityError } from "../contractPipeline/runtimePlanAuthority.js";
|
|
5
6
|
import { reopenStaleTriageSuccesses } from "../phases/triageConformance.js";
|
|
6
7
|
import { stateRunId, requireStateRunId, currentHostBoundaryState } from "../state/runIdentity.js";
|
|
7
8
|
import { presentReportStep } from "./frictionCloseout.js";
|
|
8
9
|
import { reviewFilterDispositionsPath, persistReviewFilterDispositions } from "../review/filterDispositions.js";
|
|
9
|
-
import {
|
|
10
|
+
import { intentInterpretationPath, readPersistedIntentInterpretationSync, readOrRepairIntentInterpretation } from "../intent/intentPersistence.js";
|
|
10
11
|
import { requestedFindingSelection, renderFindingSelection } from "../intakeSelection.js";
|
|
11
12
|
import { parseCommandString } from "../../shared/tooling/commandShape.js";
|
|
12
13
|
// sites-pinned: tests/remediate/path-a-source-provenance.test.ts, tests/remediate/path-a-phantom-source.test.ts, tests/remediate/next-step-replan-safety.test.ts, tests/remediate/close-plan-authority.test.ts, tests/remediate/friction-capture-closeout.test.ts, tests/remediate/next-step-lifecycle.test.ts, tests/remediate/next-step-pipeline-dispatch.test.ts, tests/remediate/next-step-outcomes-contract.test.ts, tests/remediate/integration-pipeline.test.ts, tests/remediate/outcomes-roundtrip.test.ts, tests/remediate/phase-close.test.ts, tests/remediate/grounding.test.ts, tests/remediate/clarification-round-contract.test.ts, tests/remediate/next-step-review-gate.test.ts, tests/remediate/n-r04-intent-checkpoint.test.ts, tests/remediate/final-gate-red-pause.test.ts, tests/remediate/deferred-clarification.test.ts, tests/remediate/intake-mixed-audit-provenance.test.ts
|
|
13
14
|
// (the free-form branch's write
|
|
14
15
|
// scope is normalized — a backslash-spelled citation no longer wedges prepare)
|
|
15
16
|
import { AUDIT_TOOLS_DIRNAME } from "../../shared/io/auditToolsPaths.js";
|
|
17
|
+
import { errorMessage } from "../../shared/io/json.js";
|
|
16
18
|
import { loadRemediateSessionConfig } from "./sessionConfigLoad.js";
|
|
17
19
|
import { existsSync, statSync } from "node:fs";
|
|
18
20
|
import { mkdir, readFile, rename } from "node:fs/promises";
|
|
19
21
|
import { dirname, join, resolve } from "node:path";
|
|
20
|
-
import { StateStore, OPERATOR_LIFECYCLE_FILENAME } from "../state/store.js";
|
|
22
|
+
import { StateStore, PHASE_LOCK_FILENAME, STATE_FILENAME, OPERATOR_LIFECYCLE_FILENAME } from "../state/store.js";
|
|
21
23
|
// IO / validation / rendering helpers
|
|
22
24
|
import { discardOnSchemaVersionMismatch, applyGuidanceFile, applyGuidanceText, readOptionalJsonFile, stagedAndUntracked, writeJsonFile, stableStringify, writeTextFile, buildAuditDeliverablePair, auditReadOf, isRecord, renderIngestReportLines, withFsRetry, RunLogger, coerceJsonObjectArg, renderPromptCommand, headCommit, hashContent, projectAuditFindingsReportSubset,
|
|
23
25
|
// obligation engine + intent
|
|
24
26
|
interpretFreeFormIntent, unresolvedFromClauses, advance, describeStoppedFold, linkFrictionRunIds,
|
|
25
27
|
// domain constants
|
|
26
|
-
LENSES, SEVERITIES, CLOSING_ACTIONS, detectProjectFacts, isClosingAction, neutralProjectFacts, } from "audit-tools/shared";
|
|
28
|
+
LENSES, SEVERITIES, CLOSING_ACTIONS, countBy, detectProjectFacts, isClosingAction, neutralProjectFacts, } from "audit-tools/shared";
|
|
27
29
|
import { buildCoverageLedger } from "../phases/plan.js";
|
|
28
30
|
import { runTriagePhase } from "../phases/triage.js";
|
|
29
|
-
import { runClosePhase } from "../phases/close.js";
|
|
31
|
+
import { retryIncompleteCloseReport, runClosePhase } from "../phases/close.js";
|
|
30
32
|
import { hasBoundRemediationSubmission, ingestRemediationHostResults, hostDependencyLevels, permanentlyDeadPendingUnits, prepareRemediationHostHandoff, RemediationHostPreparationError, remediationIssueRemedy } from "./dispatch/hostHandoff.js";
|
|
33
|
+
import { RETIRED_DISPATCH_SHAPE_MESSAGE } from "./dispatch/hostContracts.js";
|
|
31
34
|
import { FileLockTimeoutError, withFileLock, } from "../../shared/io/fileLock.js";
|
|
32
35
|
import { AUDIT_FINDINGS_FILENAME, AUDIT_REPORT_FILENAME, auditArtifactsDir, auditFindingsPath, auditReportPath, promotedAuditFindingsPath, promotedAuditReportPath, remediationArtifactsDir, remediationRequiredTestLogsDir, } from "../../shared/io/auditToolsPaths.js";
|
|
33
36
|
import { callerWorkingDirectory, discoverRepoRoot, resolveRepoRoot, } from "../../shared/io/repoRoot.js";
|
|
34
|
-
import { writeCurrentStep } from "./stepWriter.js";
|
|
37
|
+
import { randomRunId, writeCurrentStep } from "./stepWriter.js";
|
|
35
38
|
import { isTerminalStatus, isVerifiedCompleteStatus, } from "../state/itemStatus.js";
|
|
36
39
|
import { applyIntentOrdering } from "../intent/intentOrdering.js";
|
|
37
40
|
import { resolveIntakeStep } from "./intakeResolver.js";
|
|
@@ -39,7 +42,7 @@ import { RUNTIME_RESIDUAL_DECLARATION, finalGateDisabledReason, finalGateRecordP
|
|
|
39
42
|
import { renderGateAttribution, worktreeContentId, finalGateBinding, } from "./gateCommands.js";
|
|
40
43
|
import { buildNextContractPipelineStep, readApprovedExecutionPlan, writePathASeedFromFindings, } from "./contractPipeline.js";
|
|
41
44
|
import { compareCodeUnits } from "../../shared/compareCodeUnits.js";
|
|
42
|
-
import { executionPlanPaths, readCanonicalPlan, readPlanSource
|
|
45
|
+
import { executionPlanPaths, readCanonicalPlan, readPlanSource } from "../contractPipeline/executionPlan.js";
|
|
43
46
|
import { buildReviewRequest, applyReviewResolution, parseReviewResolution, REVIEW_REQUEST_SCHEMA_VERSION, } from "../review/reviewGate.js";
|
|
44
47
|
import { buildAutonomousReviewDecision } from "../review/autonomousGate.js";
|
|
45
48
|
import { runFindingFilterPass } from "../findingFilter.js";
|
|
@@ -52,8 +55,9 @@ import { clarificationPrompt, collectIntakeClarificationsPrompt, collectStarting
|
|
|
52
55
|
// prompt copy. Previously these 11-lens / 5-severity lists were hand-copied as
|
|
53
56
|
// backtick-quoted literals in three places in this file and would silently drift
|
|
54
57
|
// from the canonical enum (the very drift `types/lens.ts` exists to prevent).
|
|
55
|
-
const VALID_LENSES_PROSE = LENSES
|
|
56
|
-
const VALID_SEVERITIES_PROSE = SEVERITIES
|
|
58
|
+
const VALID_LENSES_PROSE = backtickList(LENSES);
|
|
59
|
+
const VALID_SEVERITIES_PROSE = backtickList(SEVERITIES);
|
|
60
|
+
const VALID_CLOSING_ACTIONS_PROSE = backtickList(CLOSING_ACTIONS);
|
|
57
61
|
const SESSION_INTENT_RESULT = Symbol("session-intent-result");
|
|
58
62
|
function sessionIntentResult(options) {
|
|
59
63
|
if (!(SESSION_INTENT_RESULT in options)) {
|
|
@@ -61,9 +65,6 @@ function sessionIntentResult(options) {
|
|
|
61
65
|
}
|
|
62
66
|
return options[SESSION_INTENT_RESULT];
|
|
63
67
|
}
|
|
64
|
-
function randomRunId(prefix = "RUN") {
|
|
65
|
-
return `${prefix}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
66
|
-
}
|
|
67
68
|
function resolveRoot(root) {
|
|
68
69
|
// The library-entry arm of the same two-arm resolution the CLI performs
|
|
69
70
|
// (`resolveRootOption` in src/remediate/index.ts). A SUPPLIED root is honored
|
|
@@ -177,18 +178,6 @@ function resolveInputPaths(root, input) {
|
|
|
177
178
|
allExisting,
|
|
178
179
|
};
|
|
179
180
|
}
|
|
180
|
-
/**
|
|
181
|
-
* True when a supplied `--input` is the SAME input the existing run was already
|
|
182
|
-
* built from (its recorded intake source manifest is input-bound — `"input"`, or
|
|
183
|
-
* `"mixed"` when a guidance file rode along — with an input path set equal to the
|
|
184
|
-
* supplied paths; the guidance entry is not an input, so it is excluded from the
|
|
185
|
-
* comparison). The `/remediate-code` loader re-passes the same `--input` on every
|
|
186
|
-
* `next-step`; treating that unchanged input as a RESUME — not an
|
|
187
|
-
* `input_conflict` — spares the host a needless resume/restart ack dance, while a
|
|
188
|
-
* genuinely DIFFERENT input still trips the conflict gate. Enforced in the tool,
|
|
189
|
-
* never by asking the loader to remember to drop the flag (a needed manual flag
|
|
190
|
-
* is a bug signal).
|
|
191
|
-
*/
|
|
192
181
|
/**
|
|
193
182
|
* True when `candidatePath` (the best default-discovered input, e.g.
|
|
194
183
|
* `.audit-tools/audit-findings.json`) was modified more recently than
|
|
@@ -209,6 +198,18 @@ function isDefaultCandidateFresherThanReport(candidatePath, reportPath) {
|
|
|
209
198
|
return false;
|
|
210
199
|
}
|
|
211
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* True when a supplied `--input` is the SAME input the existing run was already
|
|
203
|
+
* built from (its recorded intake source manifest is input-bound — `"input"`, or
|
|
204
|
+
* `"mixed"` when a guidance file rode along — with an input path set equal to the
|
|
205
|
+
* supplied paths; the guidance entry is not an input, so it is excluded from the
|
|
206
|
+
* comparison). The `/remediate-code` loader re-passes the same `--input` on every
|
|
207
|
+
* `next-step`; treating that unchanged input as a RESUME — not an
|
|
208
|
+
* `input_conflict` — spares the host a needless resume/restart ack dance, while a
|
|
209
|
+
* genuinely DIFFERENT input still trips the conflict gate. Enforced in the tool,
|
|
210
|
+
* never by asking the loader to remember to drop the flag (a needed manual flag
|
|
211
|
+
* is a bug signal).
|
|
212
|
+
*/
|
|
212
213
|
function suppliedInputMatchesRun(inputResolution, manifest, boundSourcePaths = []) {
|
|
213
214
|
if (!inputResolution.supplied)
|
|
214
215
|
return false;
|
|
@@ -257,22 +258,20 @@ function sweepPermanentlyDeadBlocks(state) {
|
|
|
257
258
|
let changed = false;
|
|
258
259
|
const now = new Date().toISOString();
|
|
259
260
|
for (const block of permanentlyDeadPendingUnits(state)) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
it.failure_reason
|
|
268
|
-
|
|
269
|
-
"
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
changed = true;
|
|
275
|
-
}
|
|
261
|
+
const it = state.items?.[block.id];
|
|
262
|
+
if (!it || it.status !== "pending")
|
|
263
|
+
continue;
|
|
264
|
+
it.status = "blocked";
|
|
265
|
+
it.started_at ??= now;
|
|
266
|
+
it.completed_at = now;
|
|
267
|
+
it.failure_reason =
|
|
268
|
+
it.failure_reason ??
|
|
269
|
+
"A prerequisite can never reach a verified-complete disposition " +
|
|
270
|
+
"(a dependency or lower-phase block was skipped, blocked, or abandoned; " +
|
|
271
|
+
"a declared dependency resolves to no block; or the dependencies are " +
|
|
272
|
+
"cyclic); the host handoff will not expose this node against an " +
|
|
273
|
+
"upstream surface that never landed (INV-RS-01).";
|
|
274
|
+
changed = true;
|
|
276
275
|
}
|
|
277
276
|
return changed;
|
|
278
277
|
}
|
|
@@ -285,7 +284,6 @@ function sweepPermanentlyDeadBlocks(state) {
|
|
|
285
284
|
function hasUnansweredClarification(state) {
|
|
286
285
|
return Object.values(state.items ?? {}).some((it) => it.status === "needs_clarification");
|
|
287
286
|
}
|
|
288
|
-
// Dependency-level partitioning is single-sourced with the host handoff boundary.
|
|
289
287
|
/**
|
|
290
288
|
* The phase ordinal whose UNTOUCHED entry a whole-repo test-suite gate must run
|
|
291
289
|
* before, or null when no per-phase gate is due this pass (auto-phasing, T3 —
|
|
@@ -339,7 +337,7 @@ function allItemsTerminal(state) {
|
|
|
339
337
|
return state.plan !== undefined && resolvedOrTerminalItems(state).length === items.length;
|
|
340
338
|
}
|
|
341
339
|
/**
|
|
342
|
-
* Reorder
|
|
340
|
+
* Reorder execution units using the checkpoint's interpreted intent. Preserve source finding order.
|
|
343
341
|
*
|
|
344
342
|
* The checkpoint persists the operator's `free_form_intent` verbatim; the
|
|
345
343
|
* structured `InterpretedIntent` is derived from it by the single shared
|
|
@@ -355,31 +353,13 @@ async function applyCheckpointIntentOrdering(artifactsDir, plan) {
|
|
|
355
353
|
// it, so an unreadable checkpoint degrades to "no intent" here rather than
|
|
356
354
|
// failing the planning step. (Every other read site is a GATE and lets the
|
|
357
355
|
// throw out — see `readIntentCheckpoint`.)
|
|
358
|
-
const checkpoint = await readIntentCheckpoint(
|
|
356
|
+
const checkpoint = await readIntentCheckpoint(intakePaths(artifactsDir).intentCheckpoint).catch(() => undefined);
|
|
359
357
|
const freeForm = checkpoint?.free_form_intent;
|
|
360
358
|
if (typeof freeForm !== "string" || freeForm.trim().length === 0)
|
|
361
359
|
return plan;
|
|
362
360
|
const ordered = applyIntentOrdering(plan.findings, plan.units, interpretFreeFormIntent(freeForm));
|
|
363
361
|
return { ...plan, findings: ordered.findings, units: ordered.units };
|
|
364
362
|
}
|
|
365
|
-
/**
|
|
366
|
-
* The write scope a free-form finding's `affected_files` implies, in the ONE
|
|
367
|
-
* form the block contract accepts.
|
|
368
|
-
*
|
|
369
|
-
* The paths arriving here have been GROUNDED but never normalized: grounding
|
|
370
|
-
* asks whether a path resolves to a real file (`existsSync`), and on Windows
|
|
371
|
-
* `src\a.ts` does — so a Windows-spelled citation survives grounding and, copied
|
|
372
|
-
* verbatim, becomes a `touched_files` entry `assertBlockContract` refuses. The
|
|
373
|
-
* run then wedges at handoff preparation and every retry reproduces the refusal.
|
|
374
|
-
*
|
|
375
|
-
* It normalizes through the SAME shared `repoRelativePath` the handoff boundary
|
|
376
|
-
* resolves declared entries with, so this producer's output is in the form its
|
|
377
|
-
* consumer demands by construction rather than by a second, drifting rule. A
|
|
378
|
-
* path that cannot be contained (`../outside.ts`) is DROPPED rather than
|
|
379
|
-
* resolved: the block contract refuses it later anyway, and dropping it here
|
|
380
|
-
* leaves the finding itself intact — grounding already decided which paths are
|
|
381
|
-
* real, and this decides only how they are SPELLED.
|
|
382
|
-
*/
|
|
383
363
|
/**
|
|
384
364
|
* The closing plan the HOST chose on the confirmed checkpoint: its action, or
|
|
385
365
|
* `none` when the field is absent, plus the argv a `custom` choice carries.
|
|
@@ -398,7 +378,7 @@ async function confirmedClosingPlan(artifactsDir) {
|
|
|
398
378
|
// and never touches `readIntentCheckpointLenient`'s raw rejections: the value
|
|
399
379
|
// returned is one the schema accepts, and `isClosingAction` / `customCommandOf`
|
|
400
380
|
// are the point-of-use checks on top of it.
|
|
401
|
-
const checkpoint = await readIntentCheckpoint(
|
|
381
|
+
const checkpoint = await readIntentCheckpoint(intakePaths(artifactsDir).intentCheckpoint, { lenient: true });
|
|
402
382
|
if (!checkpoint || checkpoint.confirmed_by !== "host")
|
|
403
383
|
return { action: "none" };
|
|
404
384
|
const chosen = checkpoint.closing_action;
|
|
@@ -419,7 +399,7 @@ function customCommandOf(checkpoint) {
|
|
|
419
399
|
async function saveStateForPlan(artifactsDir, existing, plan, planCoverage) {
|
|
420
400
|
const { host_handoff: _staleHostHandoff, conformance_review: priorConformance, ...carryForwardState } = existing;
|
|
421
401
|
const items = {};
|
|
422
|
-
const owner = await readOptionalJsonFile(
|
|
402
|
+
const owner = await readOptionalJsonFile(executionPlanPaths(artifactsDir).ownerDecision);
|
|
423
403
|
for (const unit of plan.units) {
|
|
424
404
|
const prior = existing.plan?.units.find(entry => entry.id === unit.id);
|
|
425
405
|
items[unit.id] = prior && stableStringify(prior) === stableStringify(unit) && existing.items?.[unit.id]
|
|
@@ -441,7 +421,7 @@ async function saveStateForPlan(artifactsDir, existing, plan, planCoverage) {
|
|
|
441
421
|
await writeJsonFile(join(artifactsDir, "remediation_plan.json"), plan);
|
|
442
422
|
return state;
|
|
443
423
|
}
|
|
444
|
-
async function forceReplanFromExistingIntake(root, artifactsDir, previous
|
|
424
|
+
async function forceReplanFromExistingIntake(root, artifactsDir, previous) {
|
|
445
425
|
admitRemediationDirtyBaseline(previous);
|
|
446
426
|
const step = await buildNextContractPipelineStep({ root, artifactsDir, runId: requireStateRunId(previous), forceRevision: false });
|
|
447
427
|
if (step)
|
|
@@ -449,7 +429,7 @@ async function forceReplanFromExistingIntake(root, artifactsDir, previous, runLo
|
|
|
449
429
|
const approved = await readApprovedExecutionPlan(artifactsDir);
|
|
450
430
|
if (!approved)
|
|
451
431
|
return { kind: "blocked", reason: "Revise and independently approve the current executable plan before replanning. Accepted execution history is preserved." };
|
|
452
|
-
const activated = await activateApprovedPlan(root, artifactsDir, previous,
|
|
432
|
+
const activated = await activateApprovedPlan(root, artifactsDir, previous, "existing_run");
|
|
453
433
|
if (activated.kind === "blocked")
|
|
454
434
|
return activated;
|
|
455
435
|
// Activation already carries unchanged history and applies CURRENT owner
|
|
@@ -496,7 +476,7 @@ async function buildImplementDispatchStep(ctx) {
|
|
|
496
476
|
state: boundaryState,
|
|
497
477
|
});
|
|
498
478
|
if (ingested === "unsupported_retired_state") {
|
|
499
|
-
throw new Error(
|
|
479
|
+
throw new Error(RETIRED_DISPATCH_SHAPE_MESSAGE);
|
|
500
480
|
}
|
|
501
481
|
// DURABLY RECORD EVERY CLASSIFIED ISSUE BEFORE ANY EXIT PATH.
|
|
502
482
|
//
|
|
@@ -574,7 +554,7 @@ async function buildImplementDispatchStep(ctx) {
|
|
|
574
554
|
catch (error) {
|
|
575
555
|
if (!(error instanceof RemediationHostPreparationError))
|
|
576
556
|
throw error;
|
|
577
|
-
const sourcePath = join(artifactsDir,
|
|
557
|
+
const sourcePath = join(artifactsDir, STATE_FILENAME);
|
|
578
558
|
const diagnosticsPath = join(artifactsDir, "steps", "handoff-repair.json");
|
|
579
559
|
await writeJsonFile(diagnosticsPath, { code: error.code, message: error.message, source: sourcePath });
|
|
580
560
|
const excerpt = error.message.length <= 3_000 ? error.message : `${error.message.slice(0, 3_000)}… [excerpt truncated]`;
|
|
@@ -584,7 +564,7 @@ async function buildImplementDispatchStep(ctx) {
|
|
|
584
564
|
stepKind: "repair_handoff", status: "blocked", runId, repoRoot: root, artifactsDir,
|
|
585
565
|
prompt: `# Repair the planning output before dispatch\n\n${excerpt}\n\nFull validation details: ${diagnosticsPath}\n\n` +
|
|
586
566
|
`Owning source: ${sourcePath} (plan.units and its generated handoff binding).\n` +
|
|
587
|
-
`Upstream
|
|
567
|
+
`Upstream reviewed plan: ${executionPlanPaths(artifactsDir).canonical}.\n\n` +
|
|
588
568
|
"The current run and completed work are preserved. This dispatch cannot safely repair its upstream producer. " +
|
|
589
569
|
"Return the named validation errors to the planning producer; do not edit generated state, discard accepted work, or submit results under invalid bindings. " +
|
|
590
570
|
"After the upstream producer has corrected the plan, run next-step again.\n",
|
|
@@ -596,7 +576,7 @@ async function buildImplementDispatchStep(ctx) {
|
|
|
596
576
|
};
|
|
597
577
|
}
|
|
598
578
|
if (handoff === "unsupported_retired_state") {
|
|
599
|
-
throw new Error(
|
|
579
|
+
throw new Error(RETIRED_DISPATCH_SHAPE_MESSAGE);
|
|
600
580
|
}
|
|
601
581
|
if (!state.conformance_review || state.host_handoff?.workload_sha256 !==
|
|
602
582
|
handoff.handoff_record.workload_sha256) {
|
|
@@ -710,7 +690,13 @@ async function emitPlanRevisionBlockedStep(root, artifactsDir, blocked) {
|
|
|
710
690
|
prompt: `# Executable plan requires attention\n\n${blocked.reason}\nThe current plan and accepted execution history are preserved. Revise the plan through its tool-issued submission and obtain fresh review before continuing.`,
|
|
711
691
|
allowedCommands: [loaderCommand("next-step")], stopCondition: "Resolve the named plan/review issue before implementation.", artifactPaths: { execution_plan: executionPlanPaths(artifactsDir).canonical } });
|
|
712
692
|
}
|
|
713
|
-
|
|
693
|
+
/** A blocked activation is reported as its step; a planned one hands its state on. */
|
|
694
|
+
function settleActivation(root, artifactsDir, outcome) {
|
|
695
|
+
return outcome.kind === "blocked"
|
|
696
|
+
? emitPlanRevisionBlockedStep(root, artifactsDir, outcome)
|
|
697
|
+
: outcome.state;
|
|
698
|
+
}
|
|
699
|
+
async function activateApprovedPlan(root, artifactsDir, existing, origin) {
|
|
714
700
|
if (origin === "existing_run")
|
|
715
701
|
admitRemediationDirtyBaseline(existing);
|
|
716
702
|
else if ("run_start_dirty" in existing || "run_start_dirty_encoding" in existing)
|
|
@@ -726,7 +712,7 @@ async function activateApprovedPlan(root, artifactsDir, existing, _input, _runLo
|
|
|
726
712
|
findings: source.findings,
|
|
727
713
|
...(source.request ? { request: source.request } : {}),
|
|
728
714
|
review_revision_sha256: canonical.revision_sha256,
|
|
729
|
-
review_counterexamples:
|
|
715
|
+
review_counterexamples: approved.history.counterexamples.filter(example => canonical.plan.units.some(unit => unit.addresses_counterexample_ids.includes(example.id))),
|
|
730
716
|
project_type: facts.project_type,
|
|
731
717
|
candidate_closing_actions: facts.candidate_closing_actions,
|
|
732
718
|
audit_read: source.audit_read,
|
|
@@ -1011,14 +997,12 @@ sourceAuditRead) {
|
|
|
1011
997
|
`path=${findingsPath}`,
|
|
1012
998
|
});
|
|
1013
999
|
}
|
|
1014
|
-
async function handleReadyIntakeContractPipeline(root, artifactsDir, options,
|
|
1000
|
+
async function handleReadyIntakeContractPipeline(root, artifactsDir, options, origin) {
|
|
1015
1001
|
// Resume the tool-owned plan without reconstructing completed intake.
|
|
1016
1002
|
const earlyExtractedPlan = await readApprovedExecutionPlan(artifactsDir);
|
|
1017
1003
|
if (earlyExtractedPlan && !existsSync(executionPlanPaths(artifactsDir).submission)) {
|
|
1018
|
-
const outcome = await activateApprovedPlan(root, artifactsDir, { status: "pending" },
|
|
1019
|
-
return
|
|
1020
|
-
? emitPlanRevisionBlockedStep(root, artifactsDir, outcome)
|
|
1021
|
-
: outcome.state;
|
|
1004
|
+
const outcome = await activateApprovedPlan(root, artifactsDir, { status: "pending" }, origin);
|
|
1005
|
+
return settleActivation(root, artifactsDir, outcome);
|
|
1022
1006
|
}
|
|
1023
1007
|
if (await readPlanSource(artifactsDir)) {
|
|
1024
1008
|
const step = await buildNextContractPipelineStep({
|
|
@@ -1029,10 +1013,8 @@ async function handleReadyIntakeContractPipeline(root, artifactsDir, options, ru
|
|
|
1029
1013
|
const approved = await readApprovedExecutionPlan(artifactsDir);
|
|
1030
1014
|
if (!approved)
|
|
1031
1015
|
return null;
|
|
1032
|
-
const outcome = await activateApprovedPlan(root, artifactsDir, { status: "pending" },
|
|
1033
|
-
return
|
|
1034
|
-
? emitPlanRevisionBlockedStep(root, artifactsDir, outcome)
|
|
1035
|
-
: outcome.state;
|
|
1016
|
+
const outcome = await activateApprovedPlan(root, artifactsDir, { status: "pending" }, origin);
|
|
1017
|
+
return settleActivation(root, artifactsDir, outcome);
|
|
1036
1018
|
}
|
|
1037
1019
|
const intake = await readIntakeArtifacts(artifactsDir);
|
|
1038
1020
|
if (!intake.summary || !isIntakeReady(intake.summary)) {
|
|
@@ -1099,7 +1081,7 @@ async function handleReadyIntakeContractPipeline(root, artifactsDir, options, ru
|
|
|
1099
1081
|
const auditFindings = await readAuditFindingsOnce();
|
|
1100
1082
|
const originals = extractAuditFindings(auditFindings);
|
|
1101
1083
|
if (originals.length > 0) {
|
|
1102
|
-
const checkpoint = await readIntentCheckpoint(
|
|
1084
|
+
const checkpoint = await readIntentCheckpoint(intakePaths(artifactsDir).intentCheckpoint);
|
|
1103
1085
|
const filter = await runFindingFilterPass(structuredClone(originals), {
|
|
1104
1086
|
root,
|
|
1105
1087
|
checkpoint: checkpoint ?? undefined,
|
|
@@ -1148,8 +1130,9 @@ async function handleReadyIntakeContractPipeline(root, artifactsDir, options, ru
|
|
|
1148
1130
|
const approvedPayload = projectAuditFindingsReportSubset(auditFindings, approvedOriginals);
|
|
1149
1131
|
let seedSourcePath = auditSource.path;
|
|
1150
1132
|
if (gate.approved.length < originals.length) {
|
|
1151
|
-
|
|
1152
|
-
|
|
1133
|
+
const planDirectory = executionPlanPaths(artifactsDir).directory;
|
|
1134
|
+
await mkdir(planDirectory, { recursive: true });
|
|
1135
|
+
seedSourcePath = join(planDirectory, "approved-findings.json");
|
|
1153
1136
|
await writeJsonFile(seedSourcePath, approvedPayload);
|
|
1154
1137
|
reviewSourceSwap = { from: auditSource.path, to: seedSourcePath };
|
|
1155
1138
|
}
|
|
@@ -1188,22 +1171,19 @@ async function handleReadyIntakeContractPipeline(root, artifactsDir, options, ru
|
|
|
1188
1171
|
if (!extractedPlan) {
|
|
1189
1172
|
return null;
|
|
1190
1173
|
}
|
|
1191
|
-
const outcome = await activateApprovedPlan(root, artifactsDir, { status: "pending" },
|
|
1192
|
-
return
|
|
1193
|
-
? emitPlanRevisionBlockedStep(root, artifactsDir, outcome)
|
|
1194
|
-
: outcome.state;
|
|
1174
|
+
const outcome = await activateApprovedPlan(root, artifactsDir, { status: "pending" }, origin);
|
|
1175
|
+
return settleActivation(root, artifactsDir, outcome);
|
|
1195
1176
|
}
|
|
1196
|
-
async function handlePendingIntake(root, artifactsDir, options,
|
|
1177
|
+
async function handlePendingIntake(root, artifactsDir, options, origin) {
|
|
1197
1178
|
// Existing source ownership survives pending review and approval invalidation.
|
|
1198
1179
|
// The earlier confirm_intent obligation still guards this continuation.
|
|
1199
1180
|
if (await readPlanSource(artifactsDir)) {
|
|
1200
|
-
return handleReadyIntakeContractPipeline(root, artifactsDir, options,
|
|
1181
|
+
return handleReadyIntakeContractPipeline(root, artifactsDir, options, origin);
|
|
1201
1182
|
}
|
|
1202
1183
|
const inputResolution = resolveInputPaths(root, options.input);
|
|
1203
1184
|
const intakeResult = await resolveIntakeStep({
|
|
1204
1185
|
root,
|
|
1205
1186
|
artifactsDir,
|
|
1206
|
-
input: options.input,
|
|
1207
1187
|
findingSelection: options,
|
|
1208
1188
|
inputResolution,
|
|
1209
1189
|
loaderCommand,
|
|
@@ -1216,7 +1196,7 @@ async function handlePendingIntake(root, artifactsDir, options, runLogger, origi
|
|
|
1216
1196
|
return intakeResult.step;
|
|
1217
1197
|
}
|
|
1218
1198
|
// Intake is complete — route both paths through the contract pipeline.
|
|
1219
|
-
return handleReadyIntakeContractPipeline(root, artifactsDir, options,
|
|
1199
|
+
return handleReadyIntakeContractPipeline(root, artifactsDir, options, origin);
|
|
1220
1200
|
}
|
|
1221
1201
|
async function handleNoState(root, artifactsDir) {
|
|
1222
1202
|
const paths = intakePaths(artifactsDir);
|
|
@@ -1239,7 +1219,7 @@ async function handleInputConflict(root, artifactsDir, state, inputResolution, s
|
|
|
1239
1219
|
const planId = state.plan?.plan_id ?? "(none)";
|
|
1240
1220
|
const itemCount = state.items ? Object.keys(state.items).length : 0;
|
|
1241
1221
|
const suppliedInline = inputResolution.checked.length > 0
|
|
1242
|
-
? inputResolution.checked
|
|
1222
|
+
? backtickList(inputResolution.checked)
|
|
1243
1223
|
: "(new intake source via `--guidance-file`)";
|
|
1244
1224
|
const selectionPrompt = selectionConflict ? [
|
|
1245
1225
|
"# Finding selection changed during an existing intake", "",
|
|
@@ -1283,7 +1263,7 @@ Stop after presenting this choice. Do not advance the run until the user decides
|
|
|
1283
1263
|
],
|
|
1284
1264
|
stopCondition: "Stop after presenting the resume-vs-restart choice to the user.",
|
|
1285
1265
|
artifactPaths: {
|
|
1286
|
-
state_file: join(artifactsDir,
|
|
1266
|
+
state_file: join(artifactsDir, STATE_FILENAME),
|
|
1287
1267
|
},
|
|
1288
1268
|
});
|
|
1289
1269
|
}
|
|
@@ -1319,12 +1299,14 @@ function applyClarificationActionToItem(item, res, now) {
|
|
|
1319
1299
|
/**
|
|
1320
1300
|
* Consume clarification_resolution.json for plan-phase clarifications.
|
|
1321
1301
|
* Mirrors the triage resolution consume: reject_finding → terminal,
|
|
1322
|
-
* clarified → re-open (pending) for implement dispatch.
|
|
1302
|
+
* clarified → re-open (pending) for implement dispatch. A refused file is
|
|
1303
|
+
* archived aside with nothing applied; an applied one is recorded in
|
|
1304
|
+
* `decision_applications`.
|
|
1323
1305
|
*/
|
|
1324
1306
|
async function applyPlanClarificationResolution(root, artifactsDir, state, store) {
|
|
1325
1307
|
if (!state.plan || !state.items)
|
|
1326
1308
|
return { kind: "applied", state };
|
|
1327
|
-
const resolutionPath = join(artifactsDir,
|
|
1309
|
+
const resolutionPath = join(artifactsDir, CLARIFICATION_RESOLUTION_FILENAME);
|
|
1328
1310
|
const inputSnapshot = await readDecisionSnapshot(resolutionPath);
|
|
1329
1311
|
const contextDigest = decisionContextDigest(state);
|
|
1330
1312
|
const parsed = await readPlanClarificationResolutions(resolutionPath, inputSnapshot?.bytes);
|
|
@@ -1362,7 +1344,7 @@ async function applyPlanClarificationResolution(root, artifactsDir, state, store
|
|
|
1362
1344
|
delete state.host_handoff;
|
|
1363
1345
|
if (!inputSnapshot)
|
|
1364
1346
|
throw new Error("Clarification input changed during application; retry without accepting it.");
|
|
1365
|
-
(state.decision_applications ??= []).push({ input:
|
|
1347
|
+
(state.decision_applications ??= []).push({ input: CLARIFICATION_RESOLUTION_FILENAME, input_sha256: inputSnapshot.sha256, input_identity_sha256: inputSnapshot.identity_sha256,
|
|
1366
1348
|
context_sha256: contextDigest, run_id: state.plan.plan_id, revision_sha256: state.plan.review_revision_sha256,
|
|
1367
1349
|
applied_at: now, retry_results: [] });
|
|
1368
1350
|
const remainingPending = state.plan.units.some((f) => state.items?.[f.id]?.status === "pending");
|
|
@@ -1389,7 +1371,7 @@ async function applyPlanClarificationResolution(root, artifactsDir, state, store
|
|
|
1389
1371
|
return { kind: "applied", state };
|
|
1390
1372
|
}
|
|
1391
1373
|
async function handleWaitingForClarification(root, artifactsDir, state, refusal) {
|
|
1392
|
-
const resolutionPath = join(artifactsDir,
|
|
1374
|
+
const resolutionPath = join(artifactsDir, CLARIFICATION_RESOLUTION_FILENAME);
|
|
1393
1375
|
return writeCurrentStep({
|
|
1394
1376
|
stepKind: "collect_clarifications",
|
|
1395
1377
|
status: "blocked",
|
|
@@ -1405,7 +1387,7 @@ async function handleWaitingForClarification(root, artifactsDir, state, refusal)
|
|
|
1405
1387
|
});
|
|
1406
1388
|
}
|
|
1407
1389
|
async function handleWaitingForTriage(root, artifactsDir, state) {
|
|
1408
|
-
const resolutionPath = join(artifactsDir,
|
|
1390
|
+
const resolutionPath = join(artifactsDir, TRIAGE_RESOLUTION_FILENAME);
|
|
1409
1391
|
return writeCurrentStep({
|
|
1410
1392
|
stepKind: "collect_triage",
|
|
1411
1393
|
status: "blocked",
|
|
@@ -1422,20 +1404,11 @@ async function handleWaitingForTriage(root, artifactsDir, state) {
|
|
|
1422
1404
|
});
|
|
1423
1405
|
}
|
|
1424
1406
|
/**
|
|
1425
|
-
*
|
|
1426
|
-
*
|
|
1427
|
-
*
|
|
1428
|
-
*
|
|
1429
|
-
*
|
|
1430
|
-
* is gated here instead. The decision is applied to the existing plan state:
|
|
1431
|
-
* declined nodes become a RECORDED terminal disposition (`ignored`) rather than
|
|
1432
|
-
* being silently bulk-dispositioned inside a quality-tail node — the 2026-06-15
|
|
1433
|
-
* failure this gate exists to prevent.
|
|
1434
|
-
*
|
|
1435
|
-
* The caller fires this only when `review_decision.json` is ABSENT, so Path A
|
|
1436
|
-
* (decision already written at intake) never reaches it — no double review.
|
|
1437
|
-
* Returns a halt step while awaiting the user's decision, or null to proceed
|
|
1438
|
-
* (decision recorded, any declined nodes marked terminal).
|
|
1407
|
+
* The planning → implementing transition. Emits a blocked step when no approved
|
|
1408
|
+
* executable plan exists or its revision is not the one this run's plan was
|
|
1409
|
+
* reviewed at. Otherwise, when the dispatch frontier is empty, sweeps the
|
|
1410
|
+
* permanently dead blocks first; then sets `implementing`, saves, and
|
|
1411
|
+
* transitions.
|
|
1439
1412
|
*/
|
|
1440
1413
|
async function handlePlanning(root, artifactsDir, state, store) {
|
|
1441
1414
|
const approved = await readApprovedExecutionPlan(artifactsDir);
|
|
@@ -1602,6 +1575,10 @@ ${bindingBlock}
|
|
|
1602
1575
|
}),
|
|
1603
1576
|
};
|
|
1604
1577
|
}
|
|
1578
|
+
function explicitFinalGateTestCommand(state) {
|
|
1579
|
+
return state.plan?.test_command && state.plan.test_command_source !== "project_facts"
|
|
1580
|
+
? parseCommandString(state.plan.test_command) : undefined;
|
|
1581
|
+
}
|
|
1605
1582
|
/**
|
|
1606
1583
|
* Whole-repo test-suite gate at a foundations→consumers PHASE BOUNDARY (T3). Runs
|
|
1607
1584
|
* the tool-owned final gate (INV-RS-10) INLINE before the next phase dispatches,
|
|
@@ -1619,10 +1596,6 @@ ${bindingBlock}
|
|
|
1619
1596
|
* pass OR the gate is GREEN — in which case the caller proceeds to dispatch the
|
|
1620
1597
|
* phase.
|
|
1621
1598
|
*/
|
|
1622
|
-
function explicitFinalGateTestCommand(state) {
|
|
1623
|
-
return state.plan?.test_command && state.plan.test_command_source !== "project_facts"
|
|
1624
|
-
? parseCommandString(state.plan.test_command) : undefined;
|
|
1625
|
-
}
|
|
1626
1599
|
async function runPhaseBoundaryGate(ctx) {
|
|
1627
1600
|
const { root, artifactsDir, state, options, runLogger } = ctx;
|
|
1628
1601
|
admitRemediationDirtyBaseline(state);
|
|
@@ -1635,13 +1608,14 @@ async function runPhaseBoundaryGate(ctx) {
|
|
|
1635
1608
|
return null;
|
|
1636
1609
|
const scope = `phase ${phase} boundary`;
|
|
1637
1610
|
const where = `At the phase ${phase} boundary`;
|
|
1611
|
+
const gateKey = `phase_boundary_gate phase=${phase}`;
|
|
1638
1612
|
const disabledReason = finalGateDisabledReason(options);
|
|
1639
1613
|
if (disabledReason !== null) {
|
|
1640
1614
|
await recordFinalGateOutcome({
|
|
1641
1615
|
artifactsDir,
|
|
1642
1616
|
state,
|
|
1643
1617
|
scope,
|
|
1644
|
-
gateKey
|
|
1618
|
+
gateKey,
|
|
1645
1619
|
runLogger,
|
|
1646
1620
|
outcome: "disabled",
|
|
1647
1621
|
passed: false,
|
|
@@ -1660,7 +1634,6 @@ async function runPhaseBoundaryGate(ctx) {
|
|
|
1660
1634
|
const tree = await worktreeContentId(root);
|
|
1661
1635
|
const testCommand = explicitFinalGateTestCommand(state);
|
|
1662
1636
|
const binding = finalGateBinding(root, testCommand);
|
|
1663
|
-
const gateKey = `phase_boundary_gate phase=${phase}`;
|
|
1664
1637
|
// THE CACHE. The fold re-enters this boundary on every next-step taken before
|
|
1665
1638
|
// the next phase dispatches, and the floor is build + typecheck + the whole
|
|
1666
1639
|
// suite — minutes, holding the phase lock. Re-running it on a tree that cannot
|
|
@@ -1720,7 +1693,7 @@ async function runPhaseBoundaryGate(ctx) {
|
|
|
1720
1693
|
obligation: state.status,
|
|
1721
1694
|
note: gateKey,
|
|
1722
1695
|
});
|
|
1723
|
-
const gate = await runToolOwnedFinalGate(root, { runner: options.finalGateRunner, testCommand
|
|
1696
|
+
const gate = await runToolOwnedFinalGate(root, { runner: options.finalGateRunner, testCommand });
|
|
1724
1697
|
await writeFinalGateVerdict(artifactsDir, {
|
|
1725
1698
|
scope,
|
|
1726
1699
|
tree,
|
|
@@ -1763,13 +1736,11 @@ async function runPhaseBoundaryGate(ctx) {
|
|
|
1763
1736
|
}
|
|
1764
1737
|
async function handleAllTerminalTransition(state, store, root, artifactsDir) {
|
|
1765
1738
|
// sites-pinned: tests/remediate/host-handoff-corroboration-obligations.test.ts
|
|
1766
|
-
if (await reopenStaleTriageSuccesses(root, artifactsDir, state)) {
|
|
1767
|
-
|
|
1768
|
-
|
|
1739
|
+
if (!(await reopenStaleTriageSuccesses(root, artifactsDir, state))) {
|
|
1740
|
+
// Final acceptance belongs to the actual close execution, after preview
|
|
1741
|
+
// pauses. A transition carries no executable verification verdict.
|
|
1742
|
+
state.status = "closing";
|
|
1769
1743
|
}
|
|
1770
|
-
// Final acceptance belongs to the actual close execution, after preview
|
|
1771
|
-
// pauses. A transition carries no executable verification verdict.
|
|
1772
|
-
state.status = "closing";
|
|
1773
1744
|
await store.saveState(state);
|
|
1774
1745
|
return { kind: "transition", state };
|
|
1775
1746
|
}
|
|
@@ -1854,7 +1825,7 @@ async function handleClosing(root, artifactsDir, state, runLogger, store, option
|
|
|
1854
1825
|
async function handleZeroDocumentableFindings(root, artifactsDir, state) {
|
|
1855
1826
|
const nextStepCommand = loaderCommand("next-step");
|
|
1856
1827
|
const nextStepInputCommand = loaderCommand("next-step --input <path>");
|
|
1857
|
-
const checkpointPath =
|
|
1828
|
+
const checkpointPath = intakePaths(artifactsDir).intentCheckpoint;
|
|
1858
1829
|
return writeCurrentStep({
|
|
1859
1830
|
stepKind: "zero_documentable_findings",
|
|
1860
1831
|
status: "blocked",
|
|
@@ -1916,7 +1887,7 @@ The deterministic fold ${stalled.cause}.
|
|
|
1916
1887
|
|
|
1917
1888
|
- **Spinning obligation**: \`${stalled.spinning}\`
|
|
1918
1889
|
- **Backstop that fired**: \`${stalled.stopped}\`
|
|
1919
|
-
- **State file**: \`${join(artifactsDir,
|
|
1890
|
+
- **State file**: \`${join(artifactsDir, STATE_FILENAME)}\`
|
|
1920
1891
|
|
|
1921
1892
|
An obligation is re-selecting without clearing its own actionable state, so the
|
|
1922
1893
|
engine stopped the fold rather than looping forever. This is a blocking
|
|
@@ -1949,7 +1920,7 @@ async function handleUnhandledState(root, artifactsDir, state) {
|
|
|
1949
1920
|
The remediation workflow reached a state it has no transition for.
|
|
1950
1921
|
|
|
1951
1922
|
- **State status**: \`${state.status}\`
|
|
1952
|
-
- **State file**: \`${join(artifactsDir,
|
|
1923
|
+
- **State file**: \`${join(artifactsDir, STATE_FILENAME)}\`
|
|
1953
1924
|
|
|
1954
1925
|
## Item Breakdown
|
|
1955
1926
|
|
|
@@ -1989,7 +1960,7 @@ export async function changeOperatorLifecycle(options) {
|
|
|
1989
1960
|
const artifactsDir = resolveArtifactsDir(root, options.artifactsDir);
|
|
1990
1961
|
await mkdir(artifactsDir, { recursive: true });
|
|
1991
1962
|
const store = new StateStore(artifactsDir);
|
|
1992
|
-
return withFileLock(join(artifactsDir,
|
|
1963
|
+
return withFileLock(join(artifactsDir, PHASE_LOCK_FILENAME), async () => {
|
|
1993
1964
|
const control = await store.setOperatorLifecycleUnderPhaseLock(options.action, options.hostReport);
|
|
1994
1965
|
return buildOperatorControlStep(root, artifactsDir, await store.loadState(), control);
|
|
1995
1966
|
});
|
|
@@ -2008,7 +1979,7 @@ export async function decideNextStep(options = {}) {
|
|
|
2008
1979
|
});
|
|
2009
1980
|
const startedAt = Date.now();
|
|
2010
1981
|
try {
|
|
2011
|
-
const step = await decideNextStepLoop(internalOptions, runLogger);
|
|
1982
|
+
const step = await decideNextStepLoop(root, artifactsDir, internalOptions, runLogger);
|
|
2012
1983
|
runLogger.event({
|
|
2013
1984
|
phase: "next-step",
|
|
2014
1985
|
kind: "step",
|
|
@@ -2023,7 +1994,7 @@ export async function decideNextStep(options = {}) {
|
|
|
2023
1994
|
phase: "next-step",
|
|
2024
1995
|
kind: "error",
|
|
2025
1996
|
duration_ms: Date.now() - startedAt,
|
|
2026
|
-
note:
|
|
1997
|
+
note: errorMessage(error),
|
|
2027
1998
|
});
|
|
2028
1999
|
throw error;
|
|
2029
2000
|
}
|
|
@@ -2032,10 +2003,7 @@ async function buildConfirmResumeOrRestartStep(ctx) {
|
|
|
2032
2003
|
const { root, artifactsDir, state, ackPath } = ctx;
|
|
2033
2004
|
const runId = stateRunId(state);
|
|
2034
2005
|
const nextCommand = loaderCommand("next-step");
|
|
2035
|
-
const itemsByStatus = {};
|
|
2036
|
-
for (const item of Object.values(state.items ?? {})) {
|
|
2037
|
-
itemsByStatus[item.status] = (itemsByStatus[item.status] ?? 0) + 1;
|
|
2038
|
-
}
|
|
2006
|
+
const itemsByStatus = countBy(Object.values(state.items ?? {}), (item) => item.status);
|
|
2039
2007
|
const statusLines = Object.entries(itemsByStatus)
|
|
2040
2008
|
.map(([status, count]) => `- **${status}**: ${count}`)
|
|
2041
2009
|
.join("\n");
|
|
@@ -2086,7 +2054,7 @@ async function buildConfirmResumeOrRestartStep(ctx) {
|
|
|
2086
2054
|
allowedCommands: [nextCommand, loaderCommand("next-step --input <path>")],
|
|
2087
2055
|
stopCondition: "Stop after presenting the resume/restart/merge choice to the user and writing the ack.",
|
|
2088
2056
|
artifactPaths: {
|
|
2089
|
-
state_file: join(artifactsDir,
|
|
2057
|
+
state_file: join(artifactsDir, STATE_FILENAME),
|
|
2090
2058
|
confirm_resume_ack: ackPath,
|
|
2091
2059
|
},
|
|
2092
2060
|
});
|
|
@@ -2101,7 +2069,7 @@ function renderClosingActionSection(facts) {
|
|
|
2101
2069
|
const candidateLines = facts.candidate_closing_actions
|
|
2102
2070
|
.map((action) => `- \`${action}\` — ${facts.candidate_rationale[action] ?? ""}`)
|
|
2103
2071
|
.join("\n");
|
|
2104
|
-
const vocabulary =
|
|
2072
|
+
const vocabulary = VALID_CLOSING_ACTIONS_PROSE;
|
|
2105
2073
|
return [
|
|
2106
2074
|
"## Closing Action — you choose",
|
|
2107
2075
|
"",
|
|
@@ -2116,7 +2084,7 @@ async function buildConfirmIntentStep(ctx) {
|
|
|
2116
2084
|
const { root, artifactsDir, state } = ctx;
|
|
2117
2085
|
const runId = stateRunId(state);
|
|
2118
2086
|
const nextCommand = loaderCommand("next-step");
|
|
2119
|
-
const checkpointPath =
|
|
2087
|
+
const checkpointPath = intakePaths(artifactsDir).intentCheckpoint;
|
|
2120
2088
|
// Read a checkpoint the host already wrote, if one exists.
|
|
2121
2089
|
//
|
|
2122
2090
|
// This is the GATE, and it reads LENIENTLY on purpose: a checkpoint whose
|
|
@@ -2149,7 +2117,7 @@ async function buildConfirmIntentStep(ctx) {
|
|
|
2149
2117
|
? (existing.closing_action ?? rejectedClosingAction?.value)
|
|
2150
2118
|
: undefined;
|
|
2151
2119
|
const refusal = rawChoice !== undefined && !isClosingAction(rawChoice)
|
|
2152
|
-
? `> **Refused:** \`closing_action\` ${JSON.stringify(rawChoice)} is not one of ${
|
|
2120
|
+
? `> **Refused:** \`closing_action\` ${JSON.stringify(rawChoice)} is not one of ${VALID_CLOSING_ACTIONS_PROSE}. Rewrite the checkpoint with a valid value, or omit the field for \`none\`.\n`
|
|
2153
2121
|
: rawChoice === "custom" && customCommandOf(existing) === null
|
|
2154
2122
|
? "> **Refused:** `closing_action` \"custom\" needs `closing_custom_command`, a non-empty argv array such as [\"npm\", \"run\", \"release\"]. Add it, or choose another action.\n"
|
|
2155
2123
|
: "";
|
|
@@ -2306,11 +2274,11 @@ export function buildPreIntakeObligations(ctx, snapshot) {
|
|
|
2306
2274
|
const { artifactsDir, inputResolution } = ctx;
|
|
2307
2275
|
const { existingCheckpoint, rejectedCheckpointFields, resumeAck, entryState, suppliedInputUnchanged, sourceAlreadyBound, inputSelectionChanged, selectionAlreadyBound, selectedSourceChanged, guidanceFileSupplied } = snapshot;
|
|
2308
2276
|
const ip = intakePaths(artifactsDir);
|
|
2309
|
-
const checkpointPath =
|
|
2277
|
+
const checkpointPath = ip.intentCheckpoint;
|
|
2310
2278
|
const ackPath = join(artifactsDir, "confirm_resume_ack.json");
|
|
2311
2279
|
/** The refused `closing_action`, if the schema dropped one — see the `fires` note. */
|
|
2312
2280
|
const rejectedClosingAction = rejectedCheckpointFields.find((field) => field.key === "closing_action");
|
|
2313
|
-
const interpretationPath =
|
|
2281
|
+
const interpretationPath = intentInterpretationPath(artifactsDir);
|
|
2314
2282
|
const reportPath = join(dirname(artifactsDir), "remediation-report.md");
|
|
2315
2283
|
return [
|
|
2316
2284
|
{
|
|
@@ -2397,11 +2365,12 @@ export function buildPreIntakeObligations(ctx, snapshot) {
|
|
|
2397
2365
|
state.status !== "pending" &&
|
|
2398
2366
|
state.status !== "complete" &&
|
|
2399
2367
|
state.status !== "closing";
|
|
2368
|
+
const planPaths = executionPlanPaths(artifactsDir);
|
|
2400
2369
|
const fires = invalidClosingAction ||
|
|
2401
2370
|
(!existsSync(checkpointPath) &&
|
|
2402
2371
|
(existsSync(ip.summary) ||
|
|
2403
|
-
existsSync(
|
|
2404
|
-
existsSync(
|
|
2372
|
+
existsSync(planPaths.canonical) ||
|
|
2373
|
+
existsSync(planPaths.source) ||
|
|
2405
2374
|
activeRunState));
|
|
2406
2375
|
return fires ? "missing" : "satisfied";
|
|
2407
2376
|
},
|
|
@@ -2449,7 +2418,6 @@ export function buildPreIntakeObligations(ctx, snapshot) {
|
|
|
2449
2418
|
if (unresolved.length === 0)
|
|
2450
2419
|
return { kind: "transition", state };
|
|
2451
2420
|
const nextCommand = loaderCommand("next-step");
|
|
2452
|
-
const checkpointPath = join(artifactsDir, "intent_checkpoint.json");
|
|
2453
2421
|
const clauseLines = unresolved
|
|
2454
2422
|
.map((clause) => `- **${clause.clause_id}** — "${clause.text}"\n Question: ${clause.checkpoint_question}`)
|
|
2455
2423
|
.join("\n");
|
|
@@ -2547,7 +2515,7 @@ Then run:
|
|
|
2547
2515
|
id: "pending_intake",
|
|
2548
2516
|
derive: (state) => (state == null ? "missing" : "satisfied"),
|
|
2549
2517
|
execute: async (_state, c) => {
|
|
2550
|
-
const outcome = await handlePendingIntake(c.root, c.artifactsDir, c.options,
|
|
2518
|
+
const outcome = await handlePendingIntake(c.root, c.artifactsDir, c.options, "new_pre_edit_run");
|
|
2551
2519
|
if (outcome && "step_kind" in outcome) {
|
|
2552
2520
|
return { kind: "emit", step: outcome };
|
|
2553
2521
|
}
|
|
@@ -2571,8 +2539,8 @@ Then run:
|
|
|
2571
2539
|
*/
|
|
2572
2540
|
export function buildMainObligations(ctx) {
|
|
2573
2541
|
const { root, artifactsDir, options, runLogger, store } = ctx;
|
|
2574
|
-
const clarificationResolutionPath = join(artifactsDir,
|
|
2575
|
-
const triageResolutionPath = join(artifactsDir,
|
|
2542
|
+
const clarificationResolutionPath = join(artifactsDir, CLARIFICATION_RESOLUTION_FILENAME);
|
|
2543
|
+
const triageResolutionPath = join(artifactsDir, TRIAGE_RESOLUTION_FILENAME);
|
|
2576
2544
|
return [
|
|
2577
2545
|
{
|
|
2578
2546
|
id: "operator_plan_only",
|
|
@@ -2774,9 +2742,7 @@ export function buildMainObligations(ctx) {
|
|
|
2774
2742
|
* `phase_busy` step; the advance re-loads under the lock, so a peer that
|
|
2775
2743
|
* persisted between the two is never clobbered.
|
|
2776
2744
|
*/
|
|
2777
|
-
async function decideNextStepLoop(options, runLogger) {
|
|
2778
|
-
const root = resolveRoot(options.root);
|
|
2779
|
-
const artifactsDir = resolveArtifactsDir(root, options.artifactsDir);
|
|
2745
|
+
async function decideNextStepLoop(root, artifactsDir, options, runLogger) {
|
|
2780
2746
|
await mkdir(artifactsDir, { recursive: true });
|
|
2781
2747
|
const store = new StateStore(artifactsDir);
|
|
2782
2748
|
const entryState = await store.loadState();
|
|
@@ -2786,7 +2752,7 @@ async function decideNextStepLoop(options, runLogger) {
|
|
|
2786
2752
|
obligation: entryState?.status ?? "pending",
|
|
2787
2753
|
});
|
|
2788
2754
|
try {
|
|
2789
|
-
return await withFileLock(join(artifactsDir,
|
|
2755
|
+
return await withFileLock(join(artifactsDir, PHASE_LOCK_FILENAME), () => advanceUnderPhaseLock({ root, artifactsDir, store, options, runLogger }), PHASE_LOCK_TIMEOUT_MS);
|
|
2790
2756
|
}
|
|
2791
2757
|
catch (error) {
|
|
2792
2758
|
if (error instanceof FileLockTimeoutError) {
|
|
@@ -2809,10 +2775,10 @@ async function advanceUnderPhaseLock(deps) {
|
|
|
2809
2775
|
// Loaded FRESH under the mutex: a peer may have advanced and persisted state
|
|
2810
2776
|
// between the entry read and this process winning the lock.
|
|
2811
2777
|
let state = await store.loadState();
|
|
2812
|
-
const
|
|
2813
|
-
options.input === undefined && options.severity === undefined && options.findingIds === undefined &&
|
|
2778
|
+
const bareRequest = options.input === undefined && options.severity === undefined && options.findingIds === undefined &&
|
|
2814
2779
|
options.guidanceFile === undefined && options.guidanceText === undefined && options.verificationCommand === undefined &&
|
|
2815
2780
|
options.guidanceFileSupplied !== true && options.forceReplan !== true && options.planOnly !== true && options.finalizeClosing !== true;
|
|
2781
|
+
const reportOnlyRequest = state?.status === "complete" && bareRequest;
|
|
2816
2782
|
// Only a potential complete/report-only request may inspect plan freshness
|
|
2817
2783
|
// before baseline admission. No authority write can precede this fence.
|
|
2818
2784
|
if (state && !reportOnlyRequest)
|
|
@@ -2820,8 +2786,12 @@ async function advanceUnderPhaseLock(deps) {
|
|
|
2820
2786
|
const currentCanonical = state?.plan ? await readCanonicalPlan(artifactsDir) : undefined;
|
|
2821
2787
|
const pendingPlanSubmission = existsSync(executionPlanPaths(artifactsDir).submission);
|
|
2822
2788
|
const revisionMismatch = Boolean(currentCanonical && currentCanonical.revision_sha256 !== state?.plan?.review_revision_sha256);
|
|
2823
|
-
|
|
2789
|
+
const unchangedPlan = !pendingPlanSubmission && !revisionMismatch;
|
|
2790
|
+
// sites-pinned: tests/remediate/phase-close.test.ts
|
|
2791
|
+
if (state && reportOnlyRequest && unchangedPlan) {
|
|
2792
|
+
await retryIncompleteCloseReport(state, { root, artifactsDir }, runLogger);
|
|
2824
2793
|
return handleComplete(root, artifactsDir, state);
|
|
2794
|
+
}
|
|
2825
2795
|
if (state && reportOnlyRequest)
|
|
2826
2796
|
admitRemediationDirtyBaseline(state);
|
|
2827
2797
|
if (state)
|
|
@@ -2838,6 +2808,11 @@ async function advanceUnderPhaseLock(deps) {
|
|
|
2838
2808
|
control = await store.setOperatorLifecycleUnderPhaseLock("pause", undefined, "plan-only");
|
|
2839
2809
|
return buildOperatorControlStep(root, artifactsDir, state, control);
|
|
2840
2810
|
}
|
|
2811
|
+
if (state?.status === "closing" && bareRequest && unchangedPlan) {
|
|
2812
|
+
const completed = await retryIncompleteCloseReport(state, { root, artifactsDir }, runLogger);
|
|
2813
|
+
if (completed)
|
|
2814
|
+
return handleComplete(root, artifactsDir, await store.loadState());
|
|
2815
|
+
}
|
|
2841
2816
|
if (options.guidanceFile && options.guidanceText !== undefined)
|
|
2842
2817
|
throw new Error("Choose --guidance or --guidance-file, not both.");
|
|
2843
2818
|
const boundSource = await readPlanSource(artifactsDir);
|
|
@@ -2880,7 +2855,7 @@ async function advanceUnderPhaseLock(deps) {
|
|
|
2880
2855
|
// transitions, never a recursive decideNextStepLoop), so this fires at most once.
|
|
2881
2856
|
if (state != null && (options.forceReplan || pendingPlanSubmission || revisionMismatch)) {
|
|
2882
2857
|
await countStep(state);
|
|
2883
|
-
const replanOutcome = await forceReplanFromExistingIntake(root, artifactsDir, state
|
|
2858
|
+
const replanOutcome = await forceReplanFromExistingIntake(root, artifactsDir, state);
|
|
2884
2859
|
// A discarded plan is REPORTED here, not collapsed into `state = null`. Once
|
|
2885
2860
|
// it is null the loop can no longer tell "the plan was destroyed, and here is
|
|
2886
2861
|
// why" from "there was never an input", and it emits the second.
|
|
@@ -2893,7 +2868,8 @@ async function advanceUnderPhaseLock(deps) {
|
|
|
2893
2868
|
}
|
|
2894
2869
|
// Pre-read the once-async signals the pre-intake derive()s consume
|
|
2895
2870
|
// synchronously (no transition inside this advance call rewrites either file).
|
|
2896
|
-
const
|
|
2871
|
+
const ip = intakePaths(artifactsDir);
|
|
2872
|
+
const checkpointPath = ip.intentCheckpoint;
|
|
2897
2873
|
// LENIENT: this read feeds the pre-intake derive()s, whose confirmation
|
|
2898
2874
|
// obligation is what REFUSES a malformed checkpoint by name and re-asks. A
|
|
2899
2875
|
// strict read here would pre-empt that obligation with a thrown load error.
|
|
@@ -2927,14 +2903,14 @@ async function advanceUnderPhaseLock(deps) {
|
|
|
2927
2903
|
// Whether a supplied `--input` matches the input the existing run was built
|
|
2928
2904
|
// from — so re-passing the same `--input` (the loader does this each next-step)
|
|
2929
2905
|
// resumes rather than tripping the input_conflict gate.
|
|
2930
|
-
const sourceManifest = await readSourceManifest(
|
|
2906
|
+
const sourceManifest = await readSourceManifest(ip.sourceManifest);
|
|
2931
2907
|
const requestedSelection = requestedFindingSelection(options);
|
|
2932
2908
|
const recordedSelection = sourceManifest?.finding_selection;
|
|
2933
2909
|
const selectedSourceChanged = recordedSelection !== undefined && (!existsSync(recordedSelection.source_path) ||
|
|
2934
2910
|
hashContent(await readFile(recordedSelection.source_path, "utf8")) !== recordedSelection.source_hash);
|
|
2935
2911
|
const inputSelectionChanged = selectedSourceChanged ||
|
|
2936
2912
|
(requestedSelection !== undefined && JSON.stringify(requestedSelection) !== JSON.stringify(recordedSelection?.criteria));
|
|
2937
|
-
const suppliedInputUnchanged = !inputSelectionChanged && suppliedInputMatchesRun(inputResolution, sourceManifest, boundSource?.sources.map(source => source.path).filter(path => resolve(path) !== resolve(
|
|
2913
|
+
const suppliedInputUnchanged = !inputSelectionChanged && suppliedInputMatchesRun(inputResolution, sourceManifest, boundSource?.sources.map(source => source.path).filter(path => resolve(path) !== resolve(ip.brief)));
|
|
2938
2914
|
// The linear pre-intake gates run as obligations through the shared advance
|
|
2939
2915
|
// loop. An emit returns to the host; a transition re-scans within this call;
|
|
2940
2916
|
// exhausting them (step === null) means the run is past intake and falls
|