audit-tools 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.audit.md +223 -0
- package/README.md +42 -0
- package/README.remediate.md +113 -0
- package/audit-code-wrapper-build.mjs +185 -0
- package/audit-code-wrapper-install-hosts.mjs +1079 -0
- package/audit-code-wrapper-install-renderers.mjs +58 -0
- package/audit-code-wrapper-io.mjs +155 -0
- package/audit-code-wrapper-legacy.mjs +125 -0
- package/audit-code-wrapper-lib.mjs +314 -0
- package/audit-code-wrapper-opencode.mjs +241 -0
- package/audit-code.mjs +12 -0
- package/dispatch/lens-definitions.json +46 -0
- package/dispatch/merge-results.mjs +110 -0
- package/dispatch/validate-result.mjs +59 -0
- package/dispatch/validate.mjs +16 -0
- package/dist/audit/adapters/coverageSummary.d.ts +9 -0
- package/dist/audit/adapters/coverageSummary.d.ts.map +1 -0
- package/dist/audit/adapters/coverageSummary.js +18 -0
- package/dist/audit/adapters/coverageSummary.js.map +1 -0
- package/dist/audit/adapters/eslint.d.ts +14 -0
- package/dist/audit/adapters/eslint.d.ts.map +1 -0
- package/dist/audit/adapters/eslint.js +28 -0
- package/dist/audit/adapters/eslint.js.map +1 -0
- package/dist/audit/adapters/normalizeExternal.d.ts +13 -0
- package/dist/audit/adapters/normalizeExternal.d.ts.map +1 -0
- package/dist/audit/adapters/normalizeExternal.js +44 -0
- package/dist/audit/adapters/normalizeExternal.js.map +1 -0
- package/dist/audit/adapters/npmAudit.d.ts +16 -0
- package/dist/audit/adapters/npmAudit.d.ts.map +1 -0
- package/dist/audit/adapters/npmAudit.js +24 -0
- package/dist/audit/adapters/npmAudit.js.map +1 -0
- package/dist/audit/adapters/semgrep.d.ts +23 -0
- package/dist/audit/adapters/semgrep.d.ts.map +1 -0
- package/dist/audit/adapters/semgrep.js +40 -0
- package/dist/audit/adapters/semgrep.js.map +1 -0
- package/dist/audit/cli/advanceAuditCommand.d.ts +2 -0
- package/dist/audit/cli/advanceAuditCommand.d.ts.map +1 -0
- package/dist/audit/cli/advanceAuditCommand.js +95 -0
- package/dist/audit/cli/advanceAuditCommand.js.map +1 -0
- package/dist/audit/cli/args.d.ts +95 -0
- package/dist/audit/cli/args.d.ts.map +1 -0
- package/dist/audit/cli/args.js +274 -0
- package/dist/audit/cli/args.js.map +1 -0
- package/dist/audit/cli/auditStep.d.ts +34 -0
- package/dist/audit/cli/auditStep.d.ts.map +1 -0
- package/dist/audit/cli/auditStep.js +162 -0
- package/dist/audit/cli/auditStep.js.map +1 -0
- package/dist/audit/cli/cleanup.d.ts +12 -0
- package/dist/audit/cli/cleanup.d.ts.map +1 -0
- package/dist/audit/cli/cleanup.js +44 -0
- package/dist/audit/cli/cleanup.js.map +1 -0
- package/dist/audit/cli/cleanupCommand.d.ts +2 -0
- package/dist/audit/cli/cleanupCommand.d.ts.map +1 -0
- package/dist/audit/cli/cleanupCommand.js +25 -0
- package/dist/audit/cli/cleanupCommand.js.map +1 -0
- package/dist/audit/cli/conceptualDispatch.d.ts +74 -0
- package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -0
- package/dist/audit/cli/conceptualDispatch.js +118 -0
- package/dist/audit/cli/conceptualDispatch.js.map +1 -0
- package/dist/audit/cli/confirmIntentStep.d.ts +25 -0
- package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -0
- package/dist/audit/cli/confirmIntentStep.js +210 -0
- package/dist/audit/cli/confirmIntentStep.js.map +1 -0
- package/dist/audit/cli/dispatch/packetFilter.d.ts +102 -0
- package/dist/audit/cli/dispatch/packetFilter.d.ts.map +1 -0
- package/dist/audit/cli/dispatch/packetFilter.js +148 -0
- package/dist/audit/cli/dispatch/packetFilter.js.map +1 -0
- package/dist/audit/cli/dispatch/packetPrompt.d.ts +48 -0
- package/dist/audit/cli/dispatch/packetPrompt.d.ts.map +1 -0
- package/dist/audit/cli/dispatch/packetPrompt.js +258 -0
- package/dist/audit/cli/dispatch/packetPrompt.js.map +1 -0
- package/dist/audit/cli/dispatch/paths.d.ts +7 -0
- package/dist/audit/cli/dispatch/paths.d.ts.map +1 -0
- package/dist/audit/cli/dispatch/paths.js +38 -0
- package/dist/audit/cli/dispatch/paths.js.map +1 -0
- package/dist/audit/cli/dispatch/quotaPool.d.ts +75 -0
- package/dist/audit/cli/dispatch/quotaPool.d.ts.map +1 -0
- package/dist/audit/cli/dispatch/quotaPool.js +163 -0
- package/dist/audit/cli/dispatch/quotaPool.js.map +1 -0
- package/dist/audit/cli/dispatch/tierRouting.d.ts +36 -0
- package/dist/audit/cli/dispatch/tierRouting.d.ts.map +1 -0
- package/dist/audit/cli/dispatch/tierRouting.js +121 -0
- package/dist/audit/cli/dispatch/tierRouting.js.map +1 -0
- package/dist/audit/cli/dispatch/types.d.ts +90 -0
- package/dist/audit/cli/dispatch/types.d.ts.map +1 -0
- package/dist/audit/cli/dispatch/types.js +15 -0
- package/dist/audit/cli/dispatch/types.js.map +1 -0
- package/dist/audit/cli/dispatch.d.ts +29 -0
- package/dist/audit/cli/dispatch.d.ts.map +1 -0
- package/dist/audit/cli/dispatch.js +303 -0
- package/dist/audit/cli/dispatch.js.map +1 -0
- package/dist/audit/cli/dispatchStatusCommand.d.ts +2 -0
- package/dist/audit/cli/dispatchStatusCommand.d.ts.map +1 -0
- package/dist/audit/cli/dispatchStatusCommand.js +81 -0
- package/dist/audit/cli/dispatchStatusCommand.js.map +1 -0
- package/dist/audit/cli/envelope.d.ts +50 -0
- package/dist/audit/cli/envelope.d.ts.map +1 -0
- package/dist/audit/cli/envelope.js +69 -0
- package/dist/audit/cli/envelope.js.map +1 -0
- package/dist/audit/cli/explainTaskCommand.d.ts +2 -0
- package/dist/audit/cli/explainTaskCommand.d.ts.map +1 -0
- package/dist/audit/cli/explainTaskCommand.js +34 -0
- package/dist/audit/cli/explainTaskCommand.js.map +1 -0
- package/dist/audit/cli/importExternalAnalyzerCommand.d.ts +2 -0
- package/dist/audit/cli/importExternalAnalyzerCommand.d.ts.map +1 -0
- package/dist/audit/cli/importExternalAnalyzerCommand.js +25 -0
- package/dist/audit/cli/importExternalAnalyzerCommand.js.map +1 -0
- package/dist/audit/cli/ingestResultsCommand.d.ts +2 -0
- package/dist/audit/cli/ingestResultsCommand.d.ts.map +1 -0
- package/dist/audit/cli/ingestResultsCommand.js +42 -0
- package/dist/audit/cli/ingestResultsCommand.js.map +1 -0
- package/dist/audit/cli/intakeCommand.d.ts +2 -0
- package/dist/audit/cli/intakeCommand.d.ts.map +1 -0
- package/dist/audit/cli/intakeCommand.js +18 -0
- package/dist/audit/cli/intakeCommand.js.map +1 -0
- package/dist/audit/cli/lineIndex.d.ts +5 -0
- package/dist/audit/cli/lineIndex.d.ts.map +1 -0
- package/dist/audit/cli/lineIndex.js +70 -0
- package/dist/audit/cli/lineIndex.js.map +1 -0
- package/dist/audit/cli/mergeAndIngestCommand.d.ts +46 -0
- package/dist/audit/cli/mergeAndIngestCommand.d.ts.map +1 -0
- package/dist/audit/cli/mergeAndIngestCommand.js +541 -0
- package/dist/audit/cli/mergeAndIngestCommand.js.map +1 -0
- package/dist/audit/cli/nextStepCommand.d.ts +22 -0
- package/dist/audit/cli/nextStepCommand.d.ts.map +1 -0
- package/dist/audit/cli/nextStepCommand.js +531 -0
- package/dist/audit/cli/nextStepCommand.js.map +1 -0
- package/dist/audit/cli/nextStepHelpers.d.ts +303 -0
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -0
- package/dist/audit/cli/nextStepHelpers.js +861 -0
- package/dist/audit/cli/nextStepHelpers.js.map +1 -0
- package/dist/audit/cli/paths.d.ts +2 -0
- package/dist/audit/cli/paths.d.ts.map +1 -0
- package/dist/audit/cli/paths.js +10 -0
- package/dist/audit/cli/paths.js.map +1 -0
- package/dist/audit/cli/planCommand.d.ts +2 -0
- package/dist/audit/cli/planCommand.d.ts.map +1 -0
- package/dist/audit/cli/planCommand.js +17 -0
- package/dist/audit/cli/planCommand.js.map +1 -0
- package/dist/audit/cli/prepareDispatchCommand.d.ts +2 -0
- package/dist/audit/cli/prepareDispatchCommand.d.ts.map +1 -0
- package/dist/audit/cli/prepareDispatchCommand.js +37 -0
- package/dist/audit/cli/prepareDispatchCommand.js.map +1 -0
- package/dist/audit/cli/prompts.d.ts +54 -0
- package/dist/audit/cli/prompts.d.ts.map +1 -0
- package/dist/audit/cli/prompts.js +324 -0
- package/dist/audit/cli/prompts.js.map +1 -0
- package/dist/audit/cli/quotaCommand.d.ts +2 -0
- package/dist/audit/cli/quotaCommand.d.ts.map +1 -0
- package/dist/audit/cli/quotaCommand.js +64 -0
- package/dist/audit/cli/quotaCommand.js.map +1 -0
- package/dist/audit/cli/requeueCommand.d.ts +2 -0
- package/dist/audit/cli/requeueCommand.d.ts.map +1 -0
- package/dist/audit/cli/requeueCommand.js +11 -0
- package/dist/audit/cli/requeueCommand.js.map +1 -0
- package/dist/audit/cli/resynthesizeCommand.d.ts +2 -0
- package/dist/audit/cli/resynthesizeCommand.d.ts.map +1 -0
- package/dist/audit/cli/resynthesizeCommand.js +57 -0
- package/dist/audit/cli/resynthesizeCommand.js.map +1 -0
- package/dist/audit/cli/reviewRun.d.ts +57 -0
- package/dist/audit/cli/reviewRun.d.ts.map +1 -0
- package/dist/audit/cli/reviewRun.js +180 -0
- package/dist/audit/cli/reviewRun.js.map +1 -0
- package/dist/audit/cli/rollingAuditDispatch.d.ts +119 -0
- package/dist/audit/cli/rollingAuditDispatch.d.ts.map +1 -0
- package/dist/audit/cli/rollingAuditDispatch.js +264 -0
- package/dist/audit/cli/rollingAuditDispatch.js.map +1 -0
- package/dist/audit/cli/sampleRunCommand.d.ts +2 -0
- package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -0
- package/dist/audit/cli/sampleRunCommand.js +106 -0
- package/dist/audit/cli/sampleRunCommand.js.map +1 -0
- package/dist/audit/cli/semanticReviewStep.d.ts +23 -0
- package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -0
- package/dist/audit/cli/semanticReviewStep.js +123 -0
- package/dist/audit/cli/semanticReviewStep.js.map +1 -0
- package/dist/audit/cli/statusCommand.d.ts +2 -0
- package/dist/audit/cli/statusCommand.d.ts.map +1 -0
- package/dist/audit/cli/statusCommand.js +133 -0
- package/dist/audit/cli/statusCommand.js.map +1 -0
- package/dist/audit/cli/steps.d.ts +204 -0
- package/dist/audit/cli/steps.d.ts.map +1 -0
- package/dist/audit/cli/steps.js +105 -0
- package/dist/audit/cli/steps.js.map +1 -0
- package/dist/audit/cli/submitPacketCommand.d.ts +2 -0
- package/dist/audit/cli/submitPacketCommand.d.ts.map +1 -0
- package/dist/audit/cli/submitPacketCommand.js +126 -0
- package/dist/audit/cli/submitPacketCommand.js.map +1 -0
- package/dist/audit/cli/synthesizeCommand.d.ts +2 -0
- package/dist/audit/cli/synthesizeCommand.d.ts.map +1 -0
- package/dist/audit/cli/synthesizeCommand.js +16 -0
- package/dist/audit/cli/synthesizeCommand.js.map +1 -0
- package/dist/audit/cli/updateRuntimeValidationCommand.d.ts +2 -0
- package/dist/audit/cli/updateRuntimeValidationCommand.d.ts.map +1 -0
- package/dist/audit/cli/updateRuntimeValidationCommand.js +17 -0
- package/dist/audit/cli/updateRuntimeValidationCommand.js.map +1 -0
- package/dist/audit/cli/validateCommand.d.ts +2 -0
- package/dist/audit/cli/validateCommand.d.ts.map +1 -0
- package/dist/audit/cli/validateCommand.js +42 -0
- package/dist/audit/cli/validateCommand.js.map +1 -0
- package/dist/audit/cli/validateResultCommand.d.ts +2 -0
- package/dist/audit/cli/validateResultCommand.d.ts.map +1 -0
- package/dist/audit/cli/validateResultCommand.js +92 -0
- package/dist/audit/cli/validateResultCommand.js.map +1 -0
- package/dist/audit/cli/validateResultsCommand.d.ts +2 -0
- package/dist/audit/cli/validateResultsCommand.d.ts.map +1 -0
- package/dist/audit/cli/validateResultsCommand.js +32 -0
- package/dist/audit/cli/validateResultsCommand.js.map +1 -0
- package/dist/audit/cli/waveManifest.d.ts +41 -0
- package/dist/audit/cli/waveManifest.d.ts.map +1 -0
- package/dist/audit/cli/waveManifest.js +42 -0
- package/dist/audit/cli/waveManifest.js.map +1 -0
- package/dist/audit/cli/workerResult.d.ts +19 -0
- package/dist/audit/cli/workerResult.d.ts.map +1 -0
- package/dist/audit/cli/workerResult.js +43 -0
- package/dist/audit/cli/workerResult.js.map +1 -0
- package/dist/audit/cli/workerRunCommand.d.ts +16 -0
- package/dist/audit/cli/workerRunCommand.d.ts.map +1 -0
- package/dist/audit/cli/workerRunCommand.js +132 -0
- package/dist/audit/cli/workerRunCommand.js.map +1 -0
- package/dist/audit/cli.d.ts +21 -0
- package/dist/audit/cli.d.ts.map +1 -0
- package/dist/audit/cli.js +137 -0
- package/dist/audit/cli.js.map +1 -0
- package/dist/audit/contracts/workerSchemas.d.ts +1448 -0
- package/dist/audit/contracts/workerSchemas.d.ts.map +1 -0
- package/dist/audit/contracts/workerSchemas.js +117 -0
- package/dist/audit/contracts/workerSchemas.js.map +1 -0
- package/dist/audit/contracts/wrapperResponse.d.ts +316 -0
- package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -0
- package/dist/audit/contracts/wrapperResponse.js +96 -0
- package/dist/audit/contracts/wrapperResponse.js.map +1 -0
- package/dist/audit/coverage.d.ts +11 -0
- package/dist/audit/coverage.d.ts.map +1 -0
- package/dist/audit/coverage.js +78 -0
- package/dist/audit/coverage.js.map +1 -0
- package/dist/audit/extractors/analyzers/css.d.ts +3 -0
- package/dist/audit/extractors/analyzers/css.d.ts.map +1 -0
- package/dist/audit/extractors/analyzers/css.js +102 -0
- package/dist/audit/extractors/analyzers/css.js.map +1 -0
- package/dist/audit/extractors/analyzers/html.d.ts +3 -0
- package/dist/audit/extractors/analyzers/html.d.ts.map +1 -0
- package/dist/audit/extractors/analyzers/html.js +93 -0
- package/dist/audit/extractors/analyzers/html.js.map +1 -0
- package/dist/audit/extractors/analyzers/merge.d.ts +15 -0
- package/dist/audit/extractors/analyzers/merge.d.ts.map +1 -0
- package/dist/audit/extractors/analyzers/merge.js +86 -0
- package/dist/audit/extractors/analyzers/merge.js.map +1 -0
- package/dist/audit/extractors/analyzers/python.d.ts +3 -0
- package/dist/audit/extractors/analyzers/python.d.ts.map +1 -0
- package/dist/audit/extractors/analyzers/python.js +105 -0
- package/dist/audit/extractors/analyzers/python.js.map +1 -0
- package/dist/audit/extractors/analyzers/registry.d.ts +34 -0
- package/dist/audit/extractors/analyzers/registry.d.ts.map +1 -0
- package/dist/audit/extractors/analyzers/registry.js +82 -0
- package/dist/audit/extractors/analyzers/registry.js.map +1 -0
- package/dist/audit/extractors/analyzers/resourceUrl.d.ts +8 -0
- package/dist/audit/extractors/analyzers/resourceUrl.d.ts.map +1 -0
- package/dist/audit/extractors/analyzers/resourceUrl.js +26 -0
- package/dist/audit/extractors/analyzers/resourceUrl.js.map +1 -0
- package/dist/audit/extractors/analyzers/sql.d.ts +3 -0
- package/dist/audit/extractors/analyzers/sql.d.ts.map +1 -0
- package/dist/audit/extractors/analyzers/sql.js +23 -0
- package/dist/audit/extractors/analyzers/sql.js.map +1 -0
- package/dist/audit/extractors/analyzers/treeSitter.d.ts +44 -0
- package/dist/audit/extractors/analyzers/treeSitter.d.ts.map +1 -0
- package/dist/audit/extractors/analyzers/treeSitter.js +148 -0
- package/dist/audit/extractors/analyzers/treeSitter.js.map +1 -0
- package/dist/audit/extractors/analyzers/types.d.ts +54 -0
- package/dist/audit/extractors/analyzers/types.d.ts.map +1 -0
- package/dist/audit/extractors/analyzers/types.js +2 -0
- package/dist/audit/extractors/analyzers/types.js.map +1 -0
- package/dist/audit/extractors/analyzers/typescript.d.ts +3 -0
- package/dist/audit/extractors/analyzers/typescript.d.ts.map +1 -0
- package/dist/audit/extractors/analyzers/typescript.js +279 -0
- package/dist/audit/extractors/analyzers/typescript.js.map +1 -0
- package/dist/audit/extractors/browserExtension.d.ts +12 -0
- package/dist/audit/extractors/browserExtension.d.ts.map +1 -0
- package/dist/audit/extractors/browserExtension.js +388 -0
- package/dist/audit/extractors/browserExtension.js.map +1 -0
- package/dist/audit/extractors/bucketing.d.ts +12 -0
- package/dist/audit/extractors/bucketing.d.ts.map +1 -0
- package/dist/audit/extractors/bucketing.js +56 -0
- package/dist/audit/extractors/bucketing.js.map +1 -0
- package/dist/audit/extractors/designAssessment.d.ts +10 -0
- package/dist/audit/extractors/designAssessment.d.ts.map +1 -0
- package/dist/audit/extractors/designAssessment.js +280 -0
- package/dist/audit/extractors/designAssessment.js.map +1 -0
- package/dist/audit/extractors/disposition.d.ts +76 -0
- package/dist/audit/extractors/disposition.d.ts.map +1 -0
- package/dist/audit/extractors/disposition.js +265 -0
- package/dist/audit/extractors/disposition.js.map +1 -0
- package/dist/audit/extractors/fileInventory.d.ts +8 -0
- package/dist/audit/extractors/fileInventory.d.ts.map +1 -0
- package/dist/audit/extractors/fileInventory.js +36 -0
- package/dist/audit/extractors/fileInventory.js.map +1 -0
- package/dist/audit/extractors/flows.d.ts +9 -0
- package/dist/audit/extractors/flows.d.ts.map +1 -0
- package/dist/audit/extractors/flows.js +111 -0
- package/dist/audit/extractors/flows.js.map +1 -0
- package/dist/audit/extractors/fsIntake.d.ts +9 -0
- package/dist/audit/extractors/fsIntake.d.ts.map +1 -0
- package/dist/audit/extractors/fsIntake.js +95 -0
- package/dist/audit/extractors/fsIntake.js.map +1 -0
- package/dist/audit/extractors/graph.d.ts +11 -0
- package/dist/audit/extractors/graph.d.ts.map +1 -0
- package/dist/audit/extractors/graph.js +472 -0
- package/dist/audit/extractors/graph.js.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/cargo.d.ts +15 -0
- package/dist/audit/extractors/graphManifestEdges/cargo.d.ts.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/cargo.js +74 -0
- package/dist/audit/extractors/graphManifestEdges/cargo.js.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/go.d.ts +6 -0
- package/dist/audit/extractors/graphManifestEdges/go.d.ts.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/go.js +152 -0
- package/dist/audit/extractors/graphManifestEdges/go.js.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/index.d.ts +9 -0
- package/dist/audit/extractors/graphManifestEdges/index.d.ts.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/index.js +12 -0
- package/dist/audit/extractors/graphManifestEdges/index.js.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/jsonc.d.ts +4 -0
- package/dist/audit/extractors/graphManifestEdges/jsonc.d.ts.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/jsonc.js +98 -0
- package/dist/audit/extractors/graphManifestEdges/jsonc.js.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/maven.d.ts +4 -0
- package/dist/audit/extractors/graphManifestEdges/maven.d.ts.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/maven.js +74 -0
- package/dist/audit/extractors/graphManifestEdges/maven.js.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/packageJson.d.ts +20 -0
- package/dist/audit/extractors/graphManifestEdges/packageJson.d.ts.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/packageJson.js +205 -0
- package/dist/audit/extractors/graphManifestEdges/packageJson.js.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/pnpm.d.ts +10 -0
- package/dist/audit/extractors/graphManifestEdges/pnpm.d.ts.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/pnpm.js +18 -0
- package/dist/audit/extractors/graphManifestEdges/pnpm.js.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/pyproject.d.ts +4 -0
- package/dist/audit/extractors/graphManifestEdges/pyproject.d.ts.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/pyproject.js +45 -0
- package/dist/audit/extractors/graphManifestEdges/pyproject.js.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/toml.d.ts +25 -0
- package/dist/audit/extractors/graphManifestEdges/toml.d.ts.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/toml.js +49 -0
- package/dist/audit/extractors/graphManifestEdges/toml.js.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/typescript.d.ts +4 -0
- package/dist/audit/extractors/graphManifestEdges/typescript.d.ts.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/typescript.js +57 -0
- package/dist/audit/extractors/graphManifestEdges/typescript.js.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/workspace.d.ts +11 -0
- package/dist/audit/extractors/graphManifestEdges/workspace.d.ts.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/workspace.js +73 -0
- package/dist/audit/extractors/graphManifestEdges/workspace.js.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/yaml.d.ts +24 -0
- package/dist/audit/extractors/graphManifestEdges/yaml.d.ts.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/yaml.js +57 -0
- package/dist/audit/extractors/graphManifestEdges/yaml.js.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/yamlPaths.d.ts +5 -0
- package/dist/audit/extractors/graphManifestEdges/yamlPaths.d.ts.map +1 -0
- package/dist/audit/extractors/graphManifestEdges/yamlPaths.js +75 -0
- package/dist/audit/extractors/graphManifestEdges/yamlPaths.js.map +1 -0
- package/dist/audit/extractors/graphPathUtils.d.ts +34 -0
- package/dist/audit/extractors/graphPathUtils.d.ts.map +1 -0
- package/dist/audit/extractors/graphPathUtils.js +174 -0
- package/dist/audit/extractors/graphPathUtils.js.map +1 -0
- package/dist/audit/extractors/graphPythonImports.d.ts +19 -0
- package/dist/audit/extractors/graphPythonImports.d.ts.map +1 -0
- package/dist/audit/extractors/graphPythonImports.js +318 -0
- package/dist/audit/extractors/graphPythonImports.js.map +1 -0
- package/dist/audit/extractors/graphRoutes.d.ts +13 -0
- package/dist/audit/extractors/graphRoutes.d.ts.map +1 -0
- package/dist/audit/extractors/graphRoutes.js +447 -0
- package/dist/audit/extractors/graphRoutes.js.map +1 -0
- package/dist/audit/extractors/graphSuites.d.ts +5 -0
- package/dist/audit/extractors/graphSuites.d.ts.map +1 -0
- package/dist/audit/extractors/graphSuites.js +248 -0
- package/dist/audit/extractors/graphSuites.js.map +1 -0
- package/dist/audit/extractors/graphTestSources.d.ts +3 -0
- package/dist/audit/extractors/graphTestSources.d.ts.map +1 -0
- package/dist/audit/extractors/graphTestSources.js +103 -0
- package/dist/audit/extractors/graphTestSources.js.map +1 -0
- package/dist/audit/extractors/ignore.d.ts +2 -0
- package/dist/audit/extractors/ignore.d.ts.map +1 -0
- package/dist/audit/extractors/ignore.js +18 -0
- package/dist/audit/extractors/ignore.js.map +1 -0
- package/dist/audit/extractors/languageMap.generated.d.ts +2 -0
- package/dist/audit/extractors/languageMap.generated.d.ts.map +1 -0
- package/dist/audit/extractors/languageMap.generated.js +1456 -0
- package/dist/audit/extractors/languageMap.generated.js.map +1 -0
- package/dist/audit/extractors/pathPatterns.d.ts +55 -0
- package/dist/audit/extractors/pathPatterns.d.ts.map +1 -0
- package/dist/audit/extractors/pathPatterns.js +303 -0
- package/dist/audit/extractors/pathPatterns.js.map +1 -0
- package/dist/audit/extractors/risk.d.ts +5 -0
- package/dist/audit/extractors/risk.d.ts.map +1 -0
- package/dist/audit/extractors/risk.js +54 -0
- package/dist/audit/extractors/risk.js.map +1 -0
- package/dist/audit/extractors/surfaces.d.ts +10 -0
- package/dist/audit/extractors/surfaces.d.ts.map +1 -0
- package/dist/audit/extractors/surfaces.js +49 -0
- package/dist/audit/extractors/surfaces.js.map +1 -0
- package/dist/audit/index.d.ts +2 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/index.js +3 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/audit/io/artifacts.d.ts +152 -0
- package/dist/audit/io/artifacts.d.ts.map +1 -0
- package/dist/audit/io/artifacts.js +239 -0
- package/dist/audit/io/artifacts.js.map +1 -0
- package/dist/audit/io/runArtifactTypes.d.ts +19 -0
- package/dist/audit/io/runArtifactTypes.d.ts.map +1 -0
- package/dist/audit/io/runArtifactTypes.js +2 -0
- package/dist/audit/io/runArtifactTypes.js.map +1 -0
- package/dist/audit/io/runArtifacts.d.ts +33 -0
- package/dist/audit/io/runArtifacts.d.ts.map +1 -0
- package/dist/audit/io/runArtifacts.js +254 -0
- package/dist/audit/io/runArtifacts.js.map +1 -0
- package/dist/audit/io/toolingManifest.d.ts +4 -0
- package/dist/audit/io/toolingManifest.d.ts.map +1 -0
- package/dist/audit/io/toolingManifest.js +79 -0
- package/dist/audit/io/toolingManifest.js.map +1 -0
- package/dist/audit/orchestrator/advance.d.ts +5 -0
- package/dist/audit/orchestrator/advance.d.ts.map +1 -0
- package/dist/audit/orchestrator/advance.js +172 -0
- package/dist/audit/orchestrator/advance.js.map +1 -0
- package/dist/audit/orchestrator/advanceTypes.d.ts +50 -0
- package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -0
- package/dist/audit/orchestrator/advanceTypes.js +2 -0
- package/dist/audit/orchestrator/advanceTypes.js.map +1 -0
- package/dist/audit/orchestrator/artifactFreshness.d.ts +4 -0
- package/dist/audit/orchestrator/artifactFreshness.d.ts.map +1 -0
- package/dist/audit/orchestrator/artifactFreshness.js +99 -0
- package/dist/audit/orchestrator/artifactFreshness.js.map +1 -0
- package/dist/audit/orchestrator/artifactMetadata.d.ts +6 -0
- package/dist/audit/orchestrator/artifactMetadata.d.ts.map +1 -0
- package/dist/audit/orchestrator/artifactMetadata.js +98 -0
- package/dist/audit/orchestrator/artifactMetadata.js.map +1 -0
- package/dist/audit/orchestrator/auditTaskUtils.d.ts +10 -0
- package/dist/audit/orchestrator/auditTaskUtils.d.ts.map +1 -0
- package/dist/audit/orchestrator/auditTaskUtils.js +53 -0
- package/dist/audit/orchestrator/auditTaskUtils.js.map +1 -0
- package/dist/audit/orchestrator/autoFixExecutor.d.ts +4 -0
- package/dist/audit/orchestrator/autoFixExecutor.d.ts.map +1 -0
- package/dist/audit/orchestrator/autoFixExecutor.js +152 -0
- package/dist/audit/orchestrator/autoFixExecutor.js.map +1 -0
- package/dist/audit/orchestrator/chunking.d.ts +6 -0
- package/dist/audit/orchestrator/chunking.d.ts.map +1 -0
- package/dist/audit/orchestrator/chunking.js +14 -0
- package/dist/audit/orchestrator/chunking.js.map +1 -0
- package/dist/audit/orchestrator/dependencyMap.d.ts +74 -0
- package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -0
- package/dist/audit/orchestrator/dependencyMap.js +193 -0
- package/dist/audit/orchestrator/dependencyMap.js.map +1 -0
- package/dist/audit/orchestrator/designReviewProjection.d.ts +66 -0
- package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -0
- package/dist/audit/orchestrator/designReviewProjection.js +215 -0
- package/dist/audit/orchestrator/designReviewProjection.js.map +1 -0
- package/dist/audit/orchestrator/designReviewPrompt.d.ts +82 -0
- package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -0
- package/dist/audit/orchestrator/designReviewPrompt.js +474 -0
- package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -0
- package/dist/audit/orchestrator/designReviewSnapshot.d.ts +69 -0
- package/dist/audit/orchestrator/designReviewSnapshot.d.ts.map +1 -0
- package/dist/audit/orchestrator/designReviewSnapshot.js +135 -0
- package/dist/audit/orchestrator/designReviewSnapshot.js.map +1 -0
- package/dist/audit/orchestrator/edgeReasoning.d.ts +40 -0
- package/dist/audit/orchestrator/edgeReasoning.d.ts.map +1 -0
- package/dist/audit/orchestrator/edgeReasoning.js +126 -0
- package/dist/audit/orchestrator/edgeReasoning.js.map +1 -0
- package/dist/audit/orchestrator/executorResult.d.ts +71 -0
- package/dist/audit/orchestrator/executorResult.d.ts.map +1 -0
- package/dist/audit/orchestrator/executorResult.js +2 -0
- package/dist/audit/orchestrator/executorResult.js.map +1 -0
- package/dist/audit/orchestrator/executorRunners.d.ts +34 -0
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -0
- package/dist/audit/orchestrator/executorRunners.js +85 -0
- package/dist/audit/orchestrator/executorRunners.js.map +1 -0
- package/dist/audit/orchestrator/executors.d.ts +13 -0
- package/dist/audit/orchestrator/executors.d.ts.map +1 -0
- package/dist/audit/orchestrator/executors.js +114 -0
- package/dist/audit/orchestrator/executors.js.map +1 -0
- package/dist/audit/orchestrator/fileAnchors.d.ts +33 -0
- package/dist/audit/orchestrator/fileAnchors.d.ts.map +1 -0
- package/dist/audit/orchestrator/fileAnchors.js +242 -0
- package/dist/audit/orchestrator/fileAnchors.js.map +1 -0
- package/dist/audit/orchestrator/fileIntegrity.d.ts +9 -0
- package/dist/audit/orchestrator/fileIntegrity.d.ts.map +1 -0
- package/dist/audit/orchestrator/fileIntegrity.js +58 -0
- package/dist/audit/orchestrator/fileIntegrity.js.map +1 -0
- package/dist/audit/orchestrator/flowCoverage.d.ts +5 -0
- package/dist/audit/orchestrator/flowCoverage.d.ts.map +1 -0
- package/dist/audit/orchestrator/flowCoverage.js +46 -0
- package/dist/audit/orchestrator/flowCoverage.js.map +1 -0
- package/dist/audit/orchestrator/flowPlanning.d.ts +8 -0
- package/dist/audit/orchestrator/flowPlanning.d.ts.map +1 -0
- package/dist/audit/orchestrator/flowPlanning.js +65 -0
- package/dist/audit/orchestrator/flowPlanning.js.map +1 -0
- package/dist/audit/orchestrator/flowRequeue.d.ts +6 -0
- package/dist/audit/orchestrator/flowRequeue.d.ts.map +1 -0
- package/dist/audit/orchestrator/flowRequeue.js +73 -0
- package/dist/audit/orchestrator/flowRequeue.js.map +1 -0
- package/dist/audit/orchestrator/graphEnrichmentExecutor.d.ts +30 -0
- package/dist/audit/orchestrator/graphEnrichmentExecutor.d.ts.map +1 -0
- package/dist/audit/orchestrator/graphEnrichmentExecutor.js +227 -0
- package/dist/audit/orchestrator/graphEnrichmentExecutor.js.map +1 -0
- package/dist/audit/orchestrator/ingestionExecutors.d.ts +10 -0
- package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -0
- package/dist/audit/orchestrator/ingestionExecutors.js +262 -0
- package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -0
- package/dist/audit/orchestrator/intakeExecutors.d.ts +26 -0
- package/dist/audit/orchestrator/intakeExecutors.d.ts.map +1 -0
- package/dist/audit/orchestrator/intakeExecutors.js +138 -0
- package/dist/audit/orchestrator/intakeExecutors.js.map +1 -0
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +89 -0
- package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -0
- package/dist/audit/orchestrator/intentCheckpointExecutor.js +264 -0
- package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -0
- package/dist/audit/orchestrator/intentInterpreter.d.ts +49 -0
- package/dist/audit/orchestrator/intentInterpreter.d.ts.map +1 -0
- package/dist/audit/orchestrator/intentInterpreter.js +110 -0
- package/dist/audit/orchestrator/intentInterpreter.js.map +1 -0
- package/dist/audit/orchestrator/lensSelection.d.ts +35 -0
- package/dist/audit/orchestrator/lensSelection.d.ts.map +1 -0
- package/dist/audit/orchestrator/lensSelection.js +81 -0
- package/dist/audit/orchestrator/lensSelection.js.map +1 -0
- package/dist/audit/orchestrator/localCommands.d.ts +16 -0
- package/dist/audit/orchestrator/localCommands.d.ts.map +1 -0
- package/dist/audit/orchestrator/localCommands.js +113 -0
- package/dist/audit/orchestrator/localCommands.js.map +1 -0
- package/dist/audit/orchestrator/nextStep.d.ts +12 -0
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -0
- package/dist/audit/orchestrator/nextStep.js +63 -0
- package/dist/audit/orchestrator/nextStep.js.map +1 -0
- package/dist/audit/orchestrator/partitionTaskGraph.d.ts +32 -0
- package/dist/audit/orchestrator/partitionTaskGraph.d.ts.map +1 -0
- package/dist/audit/orchestrator/partitionTaskGraph.js +98 -0
- package/dist/audit/orchestrator/partitionTaskGraph.js.map +1 -0
- package/dist/audit/orchestrator/planning.d.ts +5 -0
- package/dist/audit/orchestrator/planning.d.ts.map +1 -0
- package/dist/audit/orchestrator/planning.js +81 -0
- package/dist/audit/orchestrator/planning.js.map +1 -0
- package/dist/audit/orchestrator/planningExecutors.d.ts +21 -0
- package/dist/audit/orchestrator/planningExecutors.d.ts.map +1 -0
- package/dist/audit/orchestrator/planningExecutors.js +228 -0
- package/dist/audit/orchestrator/planningExecutors.js.map +1 -0
- package/dist/audit/orchestrator/providerConfirmation.d.ts +21 -0
- package/dist/audit/orchestrator/providerConfirmation.d.ts.map +1 -0
- package/dist/audit/orchestrator/providerConfirmation.js +54 -0
- package/dist/audit/orchestrator/providerConfirmation.js.map +1 -0
- package/dist/audit/orchestrator/requeue.d.ts +4 -0
- package/dist/audit/orchestrator/requeue.d.ts.map +1 -0
- package/dist/audit/orchestrator/requeue.js +33 -0
- package/dist/audit/orchestrator/requeue.js.map +1 -0
- package/dist/audit/orchestrator/requeueCommand.d.ts +32 -0
- package/dist/audit/orchestrator/requeueCommand.d.ts.map +1 -0
- package/dist/audit/orchestrator/requeueCommand.js +45 -0
- package/dist/audit/orchestrator/requeueCommand.js.map +1 -0
- package/dist/audit/orchestrator/requeueUtils.d.ts +14 -0
- package/dist/audit/orchestrator/requeueUtils.d.ts.map +1 -0
- package/dist/audit/orchestrator/requeueUtils.js +22 -0
- package/dist/audit/orchestrator/requeueUtils.js.map +1 -0
- package/dist/audit/orchestrator/resultIngestion.d.ts +18 -0
- package/dist/audit/orchestrator/resultIngestion.d.ts.map +1 -0
- package/dist/audit/orchestrator/resultIngestion.js +63 -0
- package/dist/audit/orchestrator/resultIngestion.js.map +1 -0
- package/dist/audit/orchestrator/reviewPacketGraph.d.ts +5 -0
- package/dist/audit/orchestrator/reviewPacketGraph.d.ts.map +1 -0
- package/dist/audit/orchestrator/reviewPacketGraph.js +11 -0
- package/dist/audit/orchestrator/reviewPacketGraph.js.map +1 -0
- package/dist/audit/orchestrator/reviewPacketGraphClustering.d.ts +4 -0
- package/dist/audit/orchestrator/reviewPacketGraphClustering.d.ts.map +1 -0
- package/dist/audit/orchestrator/reviewPacketGraphClustering.js +481 -0
- package/dist/audit/orchestrator/reviewPacketGraphClustering.js.map +1 -0
- package/dist/audit/orchestrator/reviewPacketGraphContext.d.ts +10 -0
- package/dist/audit/orchestrator/reviewPacketGraphContext.d.ts.map +1 -0
- package/dist/audit/orchestrator/reviewPacketGraphContext.js +95 -0
- package/dist/audit/orchestrator/reviewPacketGraphContext.js.map +1 -0
- package/dist/audit/orchestrator/reviewPacketGraphEdges.d.ts +23 -0
- package/dist/audit/orchestrator/reviewPacketGraphEdges.d.ts.map +1 -0
- package/dist/audit/orchestrator/reviewPacketGraphEdges.js +169 -0
- package/dist/audit/orchestrator/reviewPacketGraphEdges.js.map +1 -0
- package/dist/audit/orchestrator/reviewPacketMetrics.d.ts +17 -0
- package/dist/audit/orchestrator/reviewPacketMetrics.d.ts.map +1 -0
- package/dist/audit/orchestrator/reviewPacketMetrics.js +322 -0
- package/dist/audit/orchestrator/reviewPacketMetrics.js.map +1 -0
- package/dist/audit/orchestrator/reviewPacketSizing.d.ts +27 -0
- package/dist/audit/orchestrator/reviewPacketSizing.d.ts.map +1 -0
- package/dist/audit/orchestrator/reviewPacketSizing.js +64 -0
- package/dist/audit/orchestrator/reviewPacketSizing.js.map +1 -0
- package/dist/audit/orchestrator/reviewPackets.d.ts +54 -0
- package/dist/audit/orchestrator/reviewPackets.d.ts.map +1 -0
- package/dist/audit/orchestrator/reviewPackets.js +318 -0
- package/dist/audit/orchestrator/reviewPackets.js.map +1 -0
- package/dist/audit/orchestrator/rollingDispatch.d.ts +45 -0
- package/dist/audit/orchestrator/rollingDispatch.d.ts.map +1 -0
- package/dist/audit/orchestrator/rollingDispatch.js +103 -0
- package/dist/audit/orchestrator/rollingDispatch.js.map +1 -0
- package/dist/audit/orchestrator/runtimeCommand.d.ts +10 -0
- package/dist/audit/orchestrator/runtimeCommand.d.ts.map +1 -0
- package/dist/audit/orchestrator/runtimeCommand.js +129 -0
- package/dist/audit/orchestrator/runtimeCommand.js.map +1 -0
- package/dist/audit/orchestrator/runtimeValidation.d.ts +13 -0
- package/dist/audit/orchestrator/runtimeValidation.d.ts.map +1 -0
- package/dist/audit/orchestrator/runtimeValidation.js +94 -0
- package/dist/audit/orchestrator/runtimeValidation.js.map +1 -0
- package/dist/audit/orchestrator/runtimeValidationUpdate.d.ts +3 -0
- package/dist/audit/orchestrator/runtimeValidationUpdate.d.ts.map +1 -0
- package/dist/audit/orchestrator/runtimeValidationUpdate.js +57 -0
- package/dist/audit/orchestrator/runtimeValidationUpdate.js.map +1 -0
- package/dist/audit/orchestrator/scope.d.ts +75 -0
- package/dist/audit/orchestrator/scope.d.ts.map +1 -0
- package/dist/audit/orchestrator/scope.js +268 -0
- package/dist/audit/orchestrator/scope.js.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/conflict.d.ts +9 -0
- package/dist/audit/orchestrator/selectiveDeepening/conflict.d.ts.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/conflict.js +72 -0
- package/dist/audit/orchestrator/selectiveDeepening/conflict.js.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts +11 -0
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js +53 -0
- package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.d.ts +8 -0
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.d.ts.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js +46 -0
- package/dist/audit/orchestrator/selectiveDeepening/highRiskClean.js.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/index.d.ts +25 -0
- package/dist/audit/orchestrator/selectiveDeepening/index.d.ts.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/index.js +157 -0
- package/dist/audit/orchestrator/selectiveDeepening/index.js.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.d.ts +13 -0
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.d.ts.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js +269 -0
- package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.d.ts +14 -0
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.d.ts.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js +58 -0
- package/dist/audit/orchestrator/selectiveDeepening/runtimeValidation.js.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts +42 -0
- package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/shared.js +121 -0
- package/dist/audit/orchestrator/selectiveDeepening/shared.js.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.d.ts +7 -0
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.d.ts.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js +73 -0
- package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening.d.ts +3 -0
- package/dist/audit/orchestrator/selectiveDeepening.d.ts.map +1 -0
- package/dist/audit/orchestrator/selectiveDeepening.js +7 -0
- package/dist/audit/orchestrator/selectiveDeepening.js.map +1 -0
- package/dist/audit/orchestrator/staleness.d.ts +3 -0
- package/dist/audit/orchestrator/staleness.d.ts.map +1 -0
- package/dist/audit/orchestrator/staleness.js +102 -0
- package/dist/audit/orchestrator/staleness.js.map +1 -0
- package/dist/audit/orchestrator/state.d.ts +4 -0
- package/dist/audit/orchestrator/state.d.ts.map +1 -0
- package/dist/audit/orchestrator/state.js +158 -0
- package/dist/audit/orchestrator/state.js.map +1 -0
- package/dist/audit/orchestrator/structureExecutors.d.ts +6 -0
- package/dist/audit/orchestrator/structureExecutors.d.ts.map +1 -0
- package/dist/audit/orchestrator/structureExecutors.js +116 -0
- package/dist/audit/orchestrator/structureExecutors.js.map +1 -0
- package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts +4 -0
- package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts.map +1 -0
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js +260 -0
- package/dist/audit/orchestrator/syntaxResolutionExecutor.js.map +1 -0
- package/dist/audit/orchestrator/synthesisExecutors.d.ts +13 -0
- package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -0
- package/dist/audit/orchestrator/synthesisExecutors.js +107 -0
- package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -0
- package/dist/audit/orchestrator/taskAffinityGraph.d.ts +154 -0
- package/dist/audit/orchestrator/taskAffinityGraph.d.ts.map +1 -0
- package/dist/audit/orchestrator/taskAffinityGraph.js +216 -0
- package/dist/audit/orchestrator/taskAffinityGraph.js.map +1 -0
- package/dist/audit/orchestrator/taskBuilder.d.ts +43 -0
- package/dist/audit/orchestrator/taskBuilder.d.ts.map +1 -0
- package/dist/audit/orchestrator/taskBuilder.js +355 -0
- package/dist/audit/orchestrator/taskBuilder.js.map +1 -0
- package/dist/audit/orchestrator/trivialAudit.d.ts +5 -0
- package/dist/audit/orchestrator/trivialAudit.d.ts.map +1 -0
- package/dist/audit/orchestrator/trivialAudit.js +50 -0
- package/dist/audit/orchestrator/trivialAudit.js.map +1 -0
- package/dist/audit/orchestrator/unionFind.d.ts +8 -0
- package/dist/audit/orchestrator/unionFind.d.ts.map +1 -0
- package/dist/audit/orchestrator/unionFind.js +43 -0
- package/dist/audit/orchestrator/unionFind.js.map +1 -0
- package/dist/audit/orchestrator/unitBuilder.d.ts +8 -0
- package/dist/audit/orchestrator/unitBuilder.d.ts.map +1 -0
- package/dist/audit/orchestrator/unitBuilder.js +171 -0
- package/dist/audit/orchestrator/unitBuilder.js.map +1 -0
- package/dist/audit/orchestrator.d.ts +7 -0
- package/dist/audit/orchestrator.d.ts.map +1 -0
- package/dist/audit/orchestrator.js +68 -0
- package/dist/audit/orchestrator.js.map +1 -0
- package/dist/audit/prompts/renderWorkerPrompt.d.ts +3 -0
- package/dist/audit/prompts/renderWorkerPrompt.d.ts.map +1 -0
- package/dist/audit/prompts/renderWorkerPrompt.js +87 -0
- package/dist/audit/prompts/renderWorkerPrompt.js.map +1 -0
- package/dist/audit/providers/claudeCodeProvider.d.ts +11 -0
- package/dist/audit/providers/claudeCodeProvider.d.ts.map +1 -0
- package/dist/audit/providers/claudeCodeProvider.js +23 -0
- package/dist/audit/providers/claudeCodeProvider.js.map +1 -0
- package/dist/audit/providers/constants.d.ts +2 -0
- package/dist/audit/providers/constants.d.ts.map +1 -0
- package/dist/audit/providers/constants.js +2 -0
- package/dist/audit/providers/constants.js.map +1 -0
- package/dist/audit/providers/index.d.ts +14 -0
- package/dist/audit/providers/index.d.ts.map +1 -0
- package/dist/audit/providers/index.js +21 -0
- package/dist/audit/providers/index.js.map +1 -0
- package/dist/audit/providers/opencodeProvider.d.ts +5 -0
- package/dist/audit/providers/opencodeProvider.d.ts.map +1 -0
- package/dist/audit/providers/opencodeProvider.js +10 -0
- package/dist/audit/providers/opencodeProvider.js.map +1 -0
- package/dist/audit/quota/discoveredLimits.d.ts +27 -0
- package/dist/audit/quota/discoveredLimits.d.ts.map +1 -0
- package/dist/audit/quota/discoveredLimits.js +91 -0
- package/dist/audit/quota/discoveredLimits.js.map +1 -0
- package/dist/audit/quota/headerExtraction.d.ts +9 -0
- package/dist/audit/quota/headerExtraction.d.ts.map +1 -0
- package/dist/audit/quota/headerExtraction.js +148 -0
- package/dist/audit/quota/headerExtraction.js.map +1 -0
- package/dist/audit/quota/headerExtractors/claudeCodeHeaderExtractor.d.ts +7 -0
- package/dist/audit/quota/headerExtractors/claudeCodeHeaderExtractor.d.ts.map +1 -0
- package/dist/audit/quota/headerExtractors/claudeCodeHeaderExtractor.js +27 -0
- package/dist/audit/quota/headerExtractors/claudeCodeHeaderExtractor.js.map +1 -0
- package/dist/audit/quota/headerExtractors/genericHeaderExtractor.d.ts +10 -0
- package/dist/audit/quota/headerExtractors/genericHeaderExtractor.d.ts.map +1 -0
- package/dist/audit/quota/headerExtractors/genericHeaderExtractor.js +8 -0
- package/dist/audit/quota/headerExtractors/genericHeaderExtractor.js.map +1 -0
- package/dist/audit/quota/headerExtractors/index.d.ts +6 -0
- package/dist/audit/quota/headerExtractors/index.d.ts.map +1 -0
- package/dist/audit/quota/headerExtractors/index.js +11 -0
- package/dist/audit/quota/headerExtractors/index.js.map +1 -0
- package/dist/audit/quota/hostLimits.d.ts +8 -0
- package/dist/audit/quota/hostLimits.d.ts.map +1 -0
- package/dist/audit/quota/hostLimits.js +9 -0
- package/dist/audit/quota/hostLimits.js.map +1 -0
- package/dist/audit/quota/index.d.ts +383 -0
- package/dist/audit/quota/index.d.ts.map +1 -0
- package/dist/audit/quota/index.js +45 -0
- package/dist/audit/quota/index.js.map +1 -0
- package/dist/audit/reporting/findingIdentity.d.ts +34 -0
- package/dist/audit/reporting/findingIdentity.d.ts.map +1 -0
- package/dist/audit/reporting/findingIdentity.js +64 -0
- package/dist/audit/reporting/findingIdentity.js.map +1 -0
- package/dist/audit/reporting/findingRanks.d.ts +2 -0
- package/dist/audit/reporting/findingRanks.d.ts.map +1 -0
- package/dist/audit/reporting/findingRanks.js +7 -0
- package/dist/audit/reporting/findingRanks.js.map +1 -0
- package/dist/audit/reporting/mergeFindings.d.ts +6 -0
- package/dist/audit/reporting/mergeFindings.d.ts.map +1 -0
- package/dist/audit/reporting/mergeFindings.js +326 -0
- package/dist/audit/reporting/mergeFindings.js.map +1 -0
- package/dist/audit/reporting/synthesis.d.ts +124 -0
- package/dist/audit/reporting/synthesis.d.ts.map +1 -0
- package/dist/audit/reporting/synthesis.js +369 -0
- package/dist/audit/reporting/synthesis.js.map +1 -0
- package/dist/audit/reporting/synthesisNarrativePrompt.d.ts +8 -0
- package/dist/audit/reporting/synthesisNarrativePrompt.d.ts.map +1 -0
- package/dist/audit/reporting/synthesisNarrativePrompt.js +66 -0
- package/dist/audit/reporting/synthesisNarrativePrompt.js.map +1 -0
- package/dist/audit/reporting/workBlocks.d.ts +10 -0
- package/dist/audit/reporting/workBlocks.d.ts.map +1 -0
- package/dist/audit/reporting/workBlocks.js +154 -0
- package/dist/audit/reporting/workBlocks.js.map +1 -0
- package/dist/audit/supervisor/operatorHandoff.d.ts +65 -0
- package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -0
- package/dist/audit/supervisor/operatorHandoff.js +277 -0
- package/dist/audit/supervisor/operatorHandoff.js.map +1 -0
- package/dist/audit/supervisor/runLedger.d.ts +4 -0
- package/dist/audit/supervisor/runLedger.d.ts.map +1 -0
- package/dist/audit/supervisor/runLedger.js +118 -0
- package/dist/audit/supervisor/runLedger.js.map +1 -0
- package/dist/audit/supervisor/sessionConfig.d.ts +12 -0
- package/dist/audit/supervisor/sessionConfig.d.ts.map +1 -0
- package/dist/audit/supervisor/sessionConfig.js +49 -0
- package/dist/audit/supervisor/sessionConfig.js.map +1 -0
- package/dist/audit/types/activeDispatch.d.ts +36 -0
- package/dist/audit/types/activeDispatch.d.ts.map +1 -0
- package/dist/audit/types/activeDispatch.js +3 -0
- package/dist/audit/types/activeDispatch.js.map +1 -0
- package/dist/audit/types/analyzerCapability.d.ts +17 -0
- package/dist/audit/types/analyzerCapability.d.ts.map +1 -0
- package/dist/audit/types/analyzerCapability.js +2 -0
- package/dist/audit/types/analyzerCapability.js.map +1 -0
- package/dist/audit/types/artifactMetadata.d.ts +9 -0
- package/dist/audit/types/artifactMetadata.d.ts.map +1 -0
- package/dist/audit/types/artifactMetadata.js +2 -0
- package/dist/audit/types/artifactMetadata.js.map +1 -0
- package/dist/audit/types/auditScope.d.ts +58 -0
- package/dist/audit/types/auditScope.d.ts.map +1 -0
- package/dist/audit/types/auditScope.js +15 -0
- package/dist/audit/types/auditScope.js.map +1 -0
- package/dist/audit/types/auditState.d.ts +18 -0
- package/dist/audit/types/auditState.d.ts.map +1 -0
- package/dist/audit/types/auditState.js +2 -0
- package/dist/audit/types/auditState.js.map +1 -0
- package/dist/audit/types/designAssessment.d.ts +22 -0
- package/dist/audit/types/designAssessment.d.ts.map +1 -0
- package/dist/audit/types/designAssessment.js +8 -0
- package/dist/audit/types/designAssessment.js.map +1 -0
- package/dist/audit/types/externalAnalyzer.d.ts +225 -0
- package/dist/audit/types/externalAnalyzer.d.ts.map +1 -0
- package/dist/audit/types/externalAnalyzer.js +56 -0
- package/dist/audit/types/externalAnalyzer.js.map +1 -0
- package/dist/audit/types/flowCoverage.d.ts +16 -0
- package/dist/audit/types/flowCoverage.d.ts.map +1 -0
- package/dist/audit/types/flowCoverage.js +6 -0
- package/dist/audit/types/flowCoverage.js.map +1 -0
- package/dist/audit/types/reviewPlanning.d.ts +513 -0
- package/dist/audit/types/reviewPlanning.d.ts.map +1 -0
- package/dist/audit/types/reviewPlanning.js +109 -0
- package/dist/audit/types/reviewPlanning.js.map +1 -0
- package/dist/audit/types/runtimeValidation.d.ts +155 -0
- package/dist/audit/types/runtimeValidation.d.ts.map +1 -0
- package/dist/audit/types/runtimeValidation.js +52 -0
- package/dist/audit/types/runtimeValidation.js.map +1 -0
- package/dist/audit/types/synthesisNarrative.d.ts +8 -0
- package/dist/audit/types/synthesisNarrative.d.ts.map +1 -0
- package/dist/audit/types/synthesisNarrative.js +6 -0
- package/dist/audit/types/synthesisNarrative.js.map +1 -0
- package/dist/audit/types/toolingManifest.d.ts +8 -0
- package/dist/audit/types/toolingManifest.d.ts.map +1 -0
- package/dist/audit/types/toolingManifest.js +2 -0
- package/dist/audit/types/toolingManifest.js.map +1 -0
- package/dist/audit/types/workerResult.d.ts +14 -0
- package/dist/audit/types/workerResult.d.ts.map +1 -0
- package/dist/audit/types/workerResult.js +2 -0
- package/dist/audit/types/workerResult.js.map +1 -0
- package/dist/audit/types/workerSession.d.ts +28 -0
- package/dist/audit/types/workerSession.d.ts.map +1 -0
- package/dist/audit/types/workerSession.js +5 -0
- package/dist/audit/types/workerSession.js.map +1 -0
- package/dist/audit/types.d.ts +1077 -0
- package/dist/audit/types.d.ts.map +1 -0
- package/dist/audit/types.js +160 -0
- package/dist/audit/types.js.map +1 -0
- package/dist/audit/validation/anchorGrounding.d.ts +49 -0
- package/dist/audit/validation/anchorGrounding.d.ts.map +1 -0
- package/dist/audit/validation/anchorGrounding.js +183 -0
- package/dist/audit/validation/anchorGrounding.js.map +1 -0
- package/dist/audit/validation/artifacts.d.ts +4 -0
- package/dist/audit/validation/artifacts.d.ts.map +1 -0
- package/dist/audit/validation/artifacts.js +313 -0
- package/dist/audit/validation/artifacts.js.map +1 -0
- package/dist/audit/validation/auditResults.d.ts +16 -0
- package/dist/audit/validation/auditResults.d.ts.map +1 -0
- package/dist/audit/validation/auditResults.js +619 -0
- package/dist/audit/validation/auditResults.js.map +1 -0
- package/dist/audit/validation/designFindingGrounding.d.ts +33 -0
- package/dist/audit/validation/designFindingGrounding.d.ts.map +1 -0
- package/dist/audit/validation/designFindingGrounding.js +43 -0
- package/dist/audit/validation/designFindingGrounding.js.map +1 -0
- package/dist/audit/validation/quoteGrounding.d.ts +18 -0
- package/dist/audit/validation/quoteGrounding.d.ts.map +1 -0
- package/dist/audit/validation/quoteGrounding.js +18 -0
- package/dist/audit/validation/quoteGrounding.js.map +1 -0
- package/dist/audit/validation/sessionConfig.d.ts +8 -0
- package/dist/audit/validation/sessionConfig.d.ts.map +1 -0
- package/dist/audit/validation/sessionConfig.js +334 -0
- package/dist/audit/validation/sessionConfig.js.map +1 -0
- package/dist/remediate/contractPipeline/artifactStore.d.ts +58 -0
- package/dist/remediate/contractPipeline/artifactStore.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/artifactStore.js +201 -0
- package/dist/remediate/contractPipeline/artifactStore.js.map +1 -0
- package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts +68 -0
- package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js +151 -0
- package/dist/remediate/contractPipeline/cyclicSeamResolution.js.map +1 -0
- package/dist/remediate/contractPipeline/derive.d.ts +88 -0
- package/dist/remediate/contractPipeline/derive.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/derive.js +216 -0
- package/dist/remediate/contractPipeline/derive.js.map +1 -0
- package/dist/remediate/contractPipeline/idRegistry.d.ts +49 -0
- package/dist/remediate/contractPipeline/idRegistry.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/idRegistry.js +57 -0
- package/dist/remediate/contractPipeline/idRegistry.js.map +1 -0
- package/dist/remediate/contractPipeline/reviewSnapshot.d.ts +52 -0
- package/dist/remediate/contractPipeline/reviewSnapshot.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/reviewSnapshot.js +116 -0
- package/dist/remediate/contractPipeline/reviewSnapshot.js.map +1 -0
- package/dist/remediate/contractPipeline/semanticProjection.d.ts +46 -0
- package/dist/remediate/contractPipeline/semanticProjection.d.ts.map +1 -0
- package/dist/remediate/contractPipeline/semanticProjection.js +102 -0
- package/dist/remediate/contractPipeline/semanticProjection.js.map +1 -0
- package/dist/remediate/coverage/findingLedger.d.ts +99 -0
- package/dist/remediate/coverage/findingLedger.d.ts.map +1 -0
- package/dist/remediate/coverage/findingLedger.js +110 -0
- package/dist/remediate/coverage/findingLedger.js.map +1 -0
- package/dist/remediate/dedup/crossLensDedup.d.ts +9 -0
- package/dist/remediate/dedup/crossLensDedup.d.ts.map +1 -0
- package/dist/remediate/dedup/crossLensDedup.js +191 -0
- package/dist/remediate/dedup/crossLensDedup.js.map +1 -0
- package/dist/remediate/dispatch/amendmentClaim.d.ts +41 -0
- package/dist/remediate/dispatch/amendmentClaim.d.ts.map +1 -0
- package/dist/remediate/dispatch/amendmentClaim.js +60 -0
- package/dist/remediate/dispatch/amendmentClaim.js.map +1 -0
- package/dist/remediate/dispatch/ownershipRegistry.d.ts +97 -0
- package/dist/remediate/dispatch/ownershipRegistry.d.ts.map +1 -0
- package/dist/remediate/dispatch/ownershipRegistry.js +217 -0
- package/dist/remediate/dispatch/ownershipRegistry.js.map +1 -0
- package/dist/remediate/findingFilter.d.ts +42 -0
- package/dist/remediate/findingFilter.d.ts.map +1 -0
- package/dist/remediate/findingFilter.js +62 -0
- package/dist/remediate/findingFilter.js.map +1 -0
- package/dist/remediate/index.d.ts +45 -0
- package/dist/remediate/index.d.ts.map +1 -0
- package/dist/remediate/index.js +434 -0
- package/dist/remediate/index.js.map +1 -0
- package/dist/remediate/intake.d.ts +168 -0
- package/dist/remediate/intake.d.ts.map +1 -0
- package/dist/remediate/intake.js +340 -0
- package/dist/remediate/intake.js.map +1 -0
- package/dist/remediate/intent/checkpointFilter.d.ts +14 -0
- package/dist/remediate/intent/checkpointFilter.d.ts.map +1 -0
- package/dist/remediate/intent/checkpointFilter.js +111 -0
- package/dist/remediate/intent/checkpointFilter.js.map +1 -0
- package/dist/remediate/phases/close.d.ts +32 -0
- package/dist/remediate/phases/close.d.ts.map +1 -0
- package/dist/remediate/phases/close.js +992 -0
- package/dist/remediate/phases/close.js.map +1 -0
- package/dist/remediate/phases/constants.d.ts +3 -0
- package/dist/remediate/phases/constants.d.ts.map +1 -0
- package/dist/remediate/phases/constants.js +3 -0
- package/dist/remediate/phases/constants.js.map +1 -0
- package/dist/remediate/phases/grounding.d.ts +77 -0
- package/dist/remediate/phases/grounding.d.ts.map +1 -0
- package/dist/remediate/phases/grounding.js +153 -0
- package/dist/remediate/phases/grounding.js.map +1 -0
- package/dist/remediate/phases/plan.d.ts +113 -0
- package/dist/remediate/phases/plan.d.ts.map +1 -0
- package/dist/remediate/phases/plan.js +988 -0
- package/dist/remediate/phases/plan.js.map +1 -0
- package/dist/remediate/phases/triage.d.ts +4 -0
- package/dist/remediate/phases/triage.d.ts.map +1 -0
- package/dist/remediate/phases/triage.js +175 -0
- package/dist/remediate/phases/triage.js.map +1 -0
- package/dist/remediate/phases/workerTasks.d.ts +21 -0
- package/dist/remediate/phases/workerTasks.d.ts.map +1 -0
- package/dist/remediate/phases/workerTasks.js +31 -0
- package/dist/remediate/phases/workerTasks.js.map +1 -0
- package/dist/remediate/providers/claudeCodeProvider.d.ts +12 -0
- package/dist/remediate/providers/claudeCodeProvider.d.ts.map +1 -0
- package/dist/remediate/providers/claudeCodeProvider.js +24 -0
- package/dist/remediate/providers/claudeCodeProvider.js.map +1 -0
- package/dist/remediate/providers/constants.d.ts +2 -0
- package/dist/remediate/providers/constants.d.ts.map +1 -0
- package/dist/remediate/providers/constants.js +2 -0
- package/dist/remediate/providers/constants.js.map +1 -0
- package/dist/remediate/providers/index.d.ts +15 -0
- package/dist/remediate/providers/index.d.ts.map +1 -0
- package/dist/remediate/providers/index.js +22 -0
- package/dist/remediate/providers/index.js.map +1 -0
- package/dist/remediate/providers/opencodeProvider.d.ts +5 -0
- package/dist/remediate/providers/opencodeProvider.d.ts.map +1 -0
- package/dist/remediate/providers/opencodeProvider.js +10 -0
- package/dist/remediate/providers/opencodeProvider.js.map +1 -0
- package/dist/remediate/quota/hostLimits.d.ts +8 -0
- package/dist/remediate/quota/hostLimits.d.ts.map +1 -0
- package/dist/remediate/quota/hostLimits.js +9 -0
- package/dist/remediate/quota/hostLimits.js.map +1 -0
- package/dist/remediate/quota/index.d.ts +8 -0
- package/dist/remediate/quota/index.d.ts.map +1 -0
- package/dist/remediate/quota/index.js +12 -0
- package/dist/remediate/quota/index.js.map +1 -0
- package/dist/remediate/review/reviewGate.d.ts +72 -0
- package/dist/remediate/review/reviewGate.d.ts.map +1 -0
- package/dist/remediate/review/reviewGate.js +112 -0
- package/dist/remediate/review/reviewGate.js.map +1 -0
- package/dist/remediate/review/reviewNecessity.d.ts +53 -0
- package/dist/remediate/review/reviewNecessity.d.ts.map +1 -0
- package/dist/remediate/review/reviewNecessity.js +129 -0
- package/dist/remediate/review/reviewNecessity.js.map +1 -0
- package/dist/remediate/state/closingActions.d.ts +3 -0
- package/dist/remediate/state/closingActions.d.ts.map +1 -0
- package/dist/remediate/state/closingActions.js +10 -0
- package/dist/remediate/state/closingActions.js.map +1 -0
- package/dist/remediate/state/itemStatus.d.ts +40 -0
- package/dist/remediate/state/itemStatus.d.ts.map +1 -0
- package/dist/remediate/state/itemStatus.js +138 -0
- package/dist/remediate/state/itemStatus.js.map +1 -0
- package/dist/remediate/state/store.d.ts +65 -0
- package/dist/remediate/state/store.d.ts.map +1 -0
- package/dist/remediate/state/store.js +141 -0
- package/dist/remediate/state/store.js.map +1 -0
- package/dist/remediate/state/types.d.ts +766 -0
- package/dist/remediate/state/types.d.ts.map +1 -0
- package/dist/remediate/state/types.js +122 -0
- package/dist/remediate/state/types.js.map +1 -0
- package/dist/remediate/steps/contractPipeline.d.ts +173 -0
- package/dist/remediate/steps/contractPipeline.d.ts.map +1 -0
- package/dist/remediate/steps/contractPipeline.js +1229 -0
- package/dist/remediate/steps/contractPipeline.js.map +1 -0
- package/dist/remediate/steps/contractPipelinePrompts.d.ts +72 -0
- package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -0
- package/dist/remediate/steps/contractPipelinePrompts.js +438 -0
- package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -0
- package/dist/remediate/steps/dispatch.d.ts +434 -0
- package/dist/remediate/steps/dispatch.d.ts.map +1 -0
- package/dist/remediate/steps/dispatch.js +2180 -0
- package/dist/remediate/steps/dispatch.js.map +1 -0
- package/dist/remediate/steps/intakeResolver.d.ts +32 -0
- package/dist/remediate/steps/intakeResolver.d.ts.map +1 -0
- package/dist/remediate/steps/intakeResolver.js +310 -0
- package/dist/remediate/steps/intakeResolver.js.map +1 -0
- package/dist/remediate/steps/leanFastPath.d.ts +49 -0
- package/dist/remediate/steps/leanFastPath.d.ts.map +1 -0
- package/dist/remediate/steps/leanFastPath.js +151 -0
- package/dist/remediate/steps/leanFastPath.js.map +1 -0
- package/dist/remediate/steps/nextStep.d.ts +323 -0
- package/dist/remediate/steps/nextStep.d.ts.map +1 -0
- package/dist/remediate/steps/nextStep.js +2721 -0
- package/dist/remediate/steps/nextStep.js.map +1 -0
- package/dist/remediate/steps/prompts.d.ts +26 -0
- package/dist/remediate/steps/prompts.d.ts.map +1 -0
- package/dist/remediate/steps/prompts.js +370 -0
- package/dist/remediate/steps/prompts.js.map +1 -0
- package/dist/remediate/steps/providerNodeDispatch.d.ts +42 -0
- package/dist/remediate/steps/providerNodeDispatch.d.ts.map +1 -0
- package/dist/remediate/steps/providerNodeDispatch.js +100 -0
- package/dist/remediate/steps/providerNodeDispatch.js.map +1 -0
- package/dist/remediate/steps/rollingSession.d.ts +84 -0
- package/dist/remediate/steps/rollingSession.d.ts.map +1 -0
- package/dist/remediate/steps/rollingSession.js +147 -0
- package/dist/remediate/steps/rollingSession.js.map +1 -0
- package/dist/remediate/steps/stepUtils.d.ts +63 -0
- package/dist/remediate/steps/stepUtils.d.ts.map +1 -0
- package/dist/remediate/steps/stepUtils.js +117 -0
- package/dist/remediate/steps/stepUtils.js.map +1 -0
- package/dist/remediate/steps/stepWriter.d.ts +27 -0
- package/dist/remediate/steps/stepWriter.d.ts.map +1 -0
- package/dist/remediate/steps/stepWriter.js +37 -0
- package/dist/remediate/steps/stepWriter.js.map +1 -0
- package/dist/remediate/steps/types.d.ts +83 -0
- package/dist/remediate/steps/types.d.ts.map +1 -0
- package/dist/remediate/steps/types.js +6 -0
- package/dist/remediate/steps/types.js.map +1 -0
- package/dist/remediate/types/options.d.ts +6 -0
- package/dist/remediate/types/options.d.ts.map +1 -0
- package/dist/remediate/types/options.js +2 -0
- package/dist/remediate/types/options.js.map +1 -0
- package/dist/remediate/types/workerSession.d.ts +36 -0
- package/dist/remediate/types/workerSession.d.ts.map +1 -0
- package/dist/remediate/types/workerSession.js +13 -0
- package/dist/remediate/types/workerSession.js.map +1 -0
- package/dist/remediate/utils/commands.d.ts +17 -0
- package/dist/remediate/utils/commands.d.ts.map +1 -0
- package/dist/remediate/utils/commands.js +26 -0
- package/dist/remediate/utils/commands.js.map +1 -0
- package/dist/remediate/utils/fileIntegrity.d.ts +27 -0
- package/dist/remediate/utils/fileIntegrity.d.ts.map +1 -0
- package/dist/remediate/utils/fileIntegrity.js +201 -0
- package/dist/remediate/utils/fileIntegrity.js.map +1 -0
- package/dist/remediate/utils/hostAssets.d.ts +18 -0
- package/dist/remediate/utils/hostAssets.d.ts.map +1 -0
- package/dist/remediate/utils/hostAssets.js +31 -0
- package/dist/remediate/utils/hostAssets.js.map +1 -0
- package/dist/remediate/validation/artifacts.d.ts +9 -0
- package/dist/remediate/validation/artifacts.d.ts.map +1 -0
- package/dist/remediate/validation/artifacts.js +316 -0
- package/dist/remediate/validation/artifacts.js.map +1 -0
- package/dist/remediate/validation/contractPipeline.d.ts +36 -0
- package/dist/remediate/validation/contractPipeline.d.ts.map +1 -0
- package/dist/remediate/validation/contractPipeline.js +569 -0
- package/dist/remediate/validation/contractPipeline.js.map +1 -0
- package/dist/remediate/validation/contractPipelineGates.d.ts +161 -0
- package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -0
- package/dist/remediate/validation/contractPipelineGates.js +739 -0
- package/dist/remediate/validation/contractPipelineGates.js.map +1 -0
- package/dist/remediate/validation/remediationState.d.ts +8 -0
- package/dist/remediate/validation/remediationState.d.ts.map +1 -0
- package/dist/remediate/validation/remediationState.js +187 -0
- package/dist/remediate/validation/remediationState.js.map +1 -0
- package/dist/shared/agentReflections.d.ts +61 -0
- package/dist/shared/agentReflections.d.ts.map +1 -0
- package/dist/shared/agentReflections.js +180 -0
- package/dist/shared/agentReflections.js.map +1 -0
- package/dist/shared/concurrency.d.ts +16 -0
- package/dist/shared/concurrency.d.ts.map +1 -0
- package/dist/shared/concurrency.js +34 -0
- package/dist/shared/concurrency.js.map +1 -0
- package/dist/shared/contracts.d.ts +2 -0
- package/dist/shared/contracts.d.ts.map +1 -0
- package/dist/shared/contracts.js +2 -0
- package/dist/shared/contracts.js.map +1 -0
- package/dist/shared/dispatch/rollingDispatch.d.ts +192 -0
- package/dist/shared/dispatch/rollingDispatch.d.ts.map +1 -0
- package/dist/shared/dispatch/rollingDispatch.js +389 -0
- package/dist/shared/dispatch/rollingDispatch.js.map +1 -0
- package/dist/shared/dispatch/tierRank.d.ts +53 -0
- package/dist/shared/dispatch/tierRank.d.ts.map +1 -0
- package/dist/shared/dispatch/tierRank.js +69 -0
- package/dist/shared/dispatch/tierRank.js.map +1 -0
- package/dist/shared/engine/obligationEngine.d.ts +159 -0
- package/dist/shared/engine/obligationEngine.d.ts.map +1 -0
- package/dist/shared/engine/obligationEngine.js +124 -0
- package/dist/shared/engine/obligationEngine.js.map +1 -0
- package/dist/shared/findingIdentitySignature.d.ts +82 -0
- package/dist/shared/findingIdentitySignature.d.ts.map +1 -0
- package/dist/shared/findingIdentitySignature.js +114 -0
- package/dist/shared/findingIdentitySignature.js.map +1 -0
- package/dist/shared/git.d.ts +18 -0
- package/dist/shared/git.d.ts.map +1 -0
- package/dist/shared/git.js +63 -0
- package/dist/shared/git.js.map +1 -0
- package/dist/shared/hash.d.ts +16 -0
- package/dist/shared/hash.d.ts.map +1 -0
- package/dist/shared/hash.js +36 -0
- package/dist/shared/hash.js.map +1 -0
- package/dist/shared/hostAssets.d.ts +40 -0
- package/dist/shared/hostAssets.d.ts.map +1 -0
- package/dist/shared/hostAssets.js +110 -0
- package/dist/shared/hostAssets.js.map +1 -0
- package/dist/shared/ids.d.ts +18 -0
- package/dist/shared/ids.d.ts.map +1 -0
- package/dist/shared/ids.js +27 -0
- package/dist/shared/ids.js.map +1 -0
- package/dist/shared/index.d.ts +150 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +112 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/intent/clauseInterpreter.d.ts +84 -0
- package/dist/shared/intent/clauseInterpreter.d.ts.map +1 -0
- package/dist/shared/intent/clauseInterpreter.js +183 -0
- package/dist/shared/intent/clauseInterpreter.js.map +1 -0
- package/dist/shared/intent/freeFormIntentInterpreter.d.ts +46 -0
- package/dist/shared/intent/freeFormIntentInterpreter.d.ts.map +1 -0
- package/dist/shared/intent/freeFormIntentInterpreter.js +126 -0
- package/dist/shared/intent/freeFormIntentInterpreter.js.map +1 -0
- package/dist/shared/intent/sharedIntentData.d.ts +16 -0
- package/dist/shared/intent/sharedIntentData.d.ts.map +1 -0
- package/dist/shared/intent/sharedIntentData.js +38 -0
- package/dist/shared/intent/sharedIntentData.js.map +1 -0
- package/dist/shared/io/auditToolsPaths.d.ts +36 -0
- package/dist/shared/io/auditToolsPaths.d.ts.map +1 -0
- package/dist/shared/io/auditToolsPaths.js +47 -0
- package/dist/shared/io/auditToolsPaths.js.map +1 -0
- package/dist/shared/io/json.d.ts +30 -0
- package/dist/shared/io/json.d.ts.map +1 -0
- package/dist/shared/io/json.js +183 -0
- package/dist/shared/io/json.js.map +1 -0
- package/dist/shared/io/stepContractWriter.d.ts +103 -0
- package/dist/shared/io/stepContractWriter.d.ts.map +1 -0
- package/dist/shared/io/stepContractWriter.js +85 -0
- package/dist/shared/io/stepContractWriter.js.map +1 -0
- package/dist/shared/observability/runLog.d.ts +37 -0
- package/dist/shared/observability/runLog.d.ts.map +1 -0
- package/dist/shared/observability/runLog.js +40 -0
- package/dist/shared/observability/runLog.js.map +1 -0
- package/dist/shared/opencodePermissions.d.ts +49 -0
- package/dist/shared/opencodePermissions.d.ts.map +1 -0
- package/dist/shared/opencodePermissions.js +118 -0
- package/dist/shared/opencodePermissions.js.map +1 -0
- package/dist/shared/parsing/stringAwareScanner.d.ts +32 -0
- package/dist/shared/parsing/stringAwareScanner.d.ts.map +1 -0
- package/dist/shared/parsing/stringAwareScanner.js +51 -0
- package/dist/shared/parsing/stringAwareScanner.js.map +1 -0
- package/dist/shared/prompts.d.ts +47 -0
- package/dist/shared/prompts.d.ts.map +1 -0
- package/dist/shared/prompts.js +41 -0
- package/dist/shared/prompts.js.map +1 -0
- package/dist/shared/providers/claudeCodeProvider.d.ts +56 -0
- package/dist/shared/providers/claudeCodeProvider.d.ts.map +1 -0
- package/dist/shared/providers/claudeCodeProvider.js +67 -0
- package/dist/shared/providers/claudeCodeProvider.js.map +1 -0
- package/dist/shared/providers/codexProvider.d.ts +37 -0
- package/dist/shared/providers/codexProvider.d.ts.map +1 -0
- package/dist/shared/providers/codexProvider.js +79 -0
- package/dist/shared/providers/codexProvider.js.map +1 -0
- package/dist/shared/providers/constants.d.ts +4 -0
- package/dist/shared/providers/constants.d.ts.map +1 -0
- package/dist/shared/providers/constants.js +4 -0
- package/dist/shared/providers/constants.js.map +1 -0
- package/dist/shared/providers/localSubprocessProvider.d.ts +10 -0
- package/dist/shared/providers/localSubprocessProvider.d.ts.map +1 -0
- package/dist/shared/providers/localSubprocessProvider.js +20 -0
- package/dist/shared/providers/localSubprocessProvider.js.map +1 -0
- package/dist/shared/providers/openAiCompatibleProvider.d.ts +62 -0
- package/dist/shared/providers/openAiCompatibleProvider.d.ts.map +1 -0
- package/dist/shared/providers/openAiCompatibleProvider.js +333 -0
- package/dist/shared/providers/openAiCompatibleProvider.js.map +1 -0
- package/dist/shared/providers/opencodeLaunch.d.ts +28 -0
- package/dist/shared/providers/opencodeLaunch.d.ts.map +1 -0
- package/dist/shared/providers/opencodeLaunch.js +39 -0
- package/dist/shared/providers/opencodeLaunch.js.map +1 -0
- package/dist/shared/providers/opencodeProvider.d.ts +19 -0
- package/dist/shared/providers/opencodeProvider.d.ts.map +1 -0
- package/dist/shared/providers/opencodeProvider.js +41 -0
- package/dist/shared/providers/opencodeProvider.js.map +1 -0
- package/dist/shared/providers/providerConfirmation.d.ts +56 -0
- package/dist/shared/providers/providerConfirmation.d.ts.map +1 -0
- package/dist/shared/providers/providerConfirmation.js +195 -0
- package/dist/shared/providers/providerConfirmation.js.map +1 -0
- package/dist/shared/providers/providerDiagnostics.d.ts +11 -0
- package/dist/shared/providers/providerDiagnostics.d.ts.map +1 -0
- package/dist/shared/providers/providerDiagnostics.js +28 -0
- package/dist/shared/providers/providerDiagnostics.js.map +1 -0
- package/dist/shared/providers/providerFactory.d.ts +72 -0
- package/dist/shared/providers/providerFactory.d.ts.map +1 -0
- package/dist/shared/providers/providerFactory.js +246 -0
- package/dist/shared/providers/providerFactory.js.map +1 -0
- package/dist/shared/providers/providerKeyedFactory.d.ts +14 -0
- package/dist/shared/providers/providerKeyedFactory.d.ts.map +1 -0
- package/dist/shared/providers/providerKeyedFactory.js +16 -0
- package/dist/shared/providers/providerKeyedFactory.js.map +1 -0
- package/dist/shared/providers/spawnLoggedCommand.d.ts +10 -0
- package/dist/shared/providers/spawnLoggedCommand.d.ts.map +1 -0
- package/dist/shared/providers/spawnLoggedCommand.js +304 -0
- package/dist/shared/providers/spawnLoggedCommand.js.map +1 -0
- package/dist/shared/providers/subprocessTemplateProvider.d.ts +19 -0
- package/dist/shared/providers/subprocessTemplateProvider.d.ts.map +1 -0
- package/dist/shared/providers/subprocessTemplateProvider.js +91 -0
- package/dist/shared/providers/subprocessTemplateProvider.js.map +1 -0
- package/dist/shared/providers/types.d.ts +43 -0
- package/dist/shared/providers/types.d.ts.map +1 -0
- package/dist/shared/providers/types.js +2 -0
- package/dist/shared/providers/types.js.map +1 -0
- package/dist/shared/providers/workerTaskLaunch.d.ts +32 -0
- package/dist/shared/providers/workerTaskLaunch.d.ts.map +1 -0
- package/dist/shared/providers/workerTaskLaunch.js +27 -0
- package/dist/shared/providers/workerTaskLaunch.js.map +1 -0
- package/dist/shared/quota/antigravityQuotaSource.d.ts +44 -0
- package/dist/shared/quota/antigravityQuotaSource.d.ts.map +1 -0
- package/dist/shared/quota/antigravityQuotaSource.js +101 -0
- package/dist/shared/quota/antigravityQuotaSource.js.map +1 -0
- package/dist/shared/quota/capacity.d.ts +283 -0
- package/dist/shared/quota/capacity.d.ts.map +1 -0
- package/dist/shared/quota/capacity.js +290 -0
- package/dist/shared/quota/capacity.js.map +1 -0
- package/dist/shared/quota/claudeCodeJsonLines.d.ts +15 -0
- package/dist/shared/quota/claudeCodeJsonLines.d.ts.map +1 -0
- package/dist/shared/quota/claudeCodeJsonLines.js +34 -0
- package/dist/shared/quota/claudeCodeJsonLines.js.map +1 -0
- package/dist/shared/quota/claudeOAuthQuotaSource.d.ts +56 -0
- package/dist/shared/quota/claudeOAuthQuotaSource.d.ts.map +1 -0
- package/dist/shared/quota/claudeOAuthQuotaSource.js +136 -0
- package/dist/shared/quota/claudeOAuthQuotaSource.js.map +1 -0
- package/dist/shared/quota/codexQuotaSource.d.ts +49 -0
- package/dist/shared/quota/codexQuotaSource.d.ts.map +1 -0
- package/dist/shared/quota/codexQuotaSource.js +96 -0
- package/dist/shared/quota/codexQuotaSource.js.map +1 -0
- package/dist/shared/quota/compositeQuotaSource.d.ts +29 -0
- package/dist/shared/quota/compositeQuotaSource.d.ts.map +1 -0
- package/dist/shared/quota/compositeQuotaSource.js +58 -0
- package/dist/shared/quota/compositeQuotaSource.js.map +1 -0
- package/dist/shared/quota/copilotQuotaSource.d.ts +57 -0
- package/dist/shared/quota/copilotQuotaSource.d.ts.map +1 -0
- package/dist/shared/quota/copilotQuotaSource.js +141 -0
- package/dist/shared/quota/copilotQuotaSource.js.map +1 -0
- package/dist/shared/quota/errorParsers/claudeCodeErrorParser.d.ts +7 -0
- package/dist/shared/quota/errorParsers/claudeCodeErrorParser.d.ts.map +1 -0
- package/dist/shared/quota/errorParsers/claudeCodeErrorParser.js +33 -0
- package/dist/shared/quota/errorParsers/claudeCodeErrorParser.js.map +1 -0
- package/dist/shared/quota/errorParsers/genericErrorParser.d.ts +10 -0
- package/dist/shared/quota/errorParsers/genericErrorParser.d.ts.map +1 -0
- package/dist/shared/quota/errorParsers/genericErrorParser.js +8 -0
- package/dist/shared/quota/errorParsers/genericErrorParser.js.map +1 -0
- package/dist/shared/quota/errorParsers/index.d.ts +6 -0
- package/dist/shared/quota/errorParsers/index.d.ts.map +1 -0
- package/dist/shared/quota/errorParsers/index.js +16 -0
- package/dist/shared/quota/errorParsers/index.js.map +1 -0
- package/dist/shared/quota/errorParsing.d.ts +8 -0
- package/dist/shared/quota/errorParsing.d.ts.map +1 -0
- package/dist/shared/quota/errorParsing.js +129 -0
- package/dist/shared/quota/errorParsing.js.map +1 -0
- package/dist/shared/quota/fileLock.d.ts +9 -0
- package/dist/shared/quota/fileLock.d.ts.map +1 -0
- package/dist/shared/quota/fileLock.js +202 -0
- package/dist/shared/quota/fileLock.js.map +1 -0
- package/dist/shared/quota/hostLimits.d.ts +16 -0
- package/dist/shared/quota/hostLimits.d.ts.map +1 -0
- package/dist/shared/quota/hostLimits.js +57 -0
- package/dist/shared/quota/hostLimits.js.map +1 -0
- package/dist/shared/quota/httpQuotaSource.d.ts +87 -0
- package/dist/shared/quota/httpQuotaSource.d.ts.map +1 -0
- package/dist/shared/quota/httpQuotaSource.js +90 -0
- package/dist/shared/quota/httpQuotaSource.js.map +1 -0
- package/dist/shared/quota/learnedQuotaSource.d.ts +8 -0
- package/dist/shared/quota/learnedQuotaSource.d.ts.map +1 -0
- package/dist/shared/quota/learnedQuotaSource.js +26 -0
- package/dist/shared/quota/learnedQuotaSource.js.map +1 -0
- package/dist/shared/quota/limits.d.ts +35 -0
- package/dist/shared/quota/limits.d.ts.map +1 -0
- package/dist/shared/quota/limits.js +110 -0
- package/dist/shared/quota/limits.js.map +1 -0
- package/dist/shared/quota/openCodeQuotaSource.d.ts +18 -0
- package/dist/shared/quota/openCodeQuotaSource.d.ts.map +1 -0
- package/dist/shared/quota/openCodeQuotaSource.js +84 -0
- package/dist/shared/quota/openCodeQuotaSource.js.map +1 -0
- package/dist/shared/quota/quotaSource.d.ts +29 -0
- package/dist/shared/quota/quotaSource.d.ts.map +1 -0
- package/dist/shared/quota/quotaSource.js +12 -0
- package/dist/shared/quota/quotaSource.js.map +1 -0
- package/dist/shared/quota/rollingEngine.d.ts +130 -0
- package/dist/shared/quota/rollingEngine.d.ts.map +1 -0
- package/dist/shared/quota/rollingEngine.js +153 -0
- package/dist/shared/quota/rollingEngine.js.map +1 -0
- package/dist/shared/quota/scheduler.d.ts +94 -0
- package/dist/shared/quota/scheduler.d.ts.map +1 -0
- package/dist/shared/quota/scheduler.js +313 -0
- package/dist/shared/quota/scheduler.js.map +1 -0
- package/dist/shared/quota/slidingWindow.d.ts +5 -0
- package/dist/shared/quota/slidingWindow.d.ts.map +1 -0
- package/dist/shared/quota/slidingWindow.js +29 -0
- package/dist/shared/quota/slidingWindow.js.map +1 -0
- package/dist/shared/quota/state.d.ts +27 -0
- package/dist/shared/quota/state.d.ts.map +1 -0
- package/dist/shared/quota/state.js +204 -0
- package/dist/shared/quota/state.js.map +1 -0
- package/dist/shared/quota/types.d.ts +109 -0
- package/dist/shared/quota/types.d.ts.map +1 -0
- package/dist/shared/quota/types.js +56 -0
- package/dist/shared/quota/types.js.map +1 -0
- package/dist/shared/reReview/projectionDiff.d.ts +65 -0
- package/dist/shared/reReview/projectionDiff.d.ts.map +1 -0
- package/dist/shared/reReview/projectionDiff.js +144 -0
- package/dist/shared/reReview/projectionDiff.js.map +1 -0
- package/dist/shared/rolling/pausedState.d.ts +109 -0
- package/dist/shared/rolling/pausedState.d.ts.map +1 -0
- package/dist/shared/rolling/pausedState.js +100 -0
- package/dist/shared/rolling/pausedState.js.map +1 -0
- package/dist/shared/tokens.d.ts +24 -0
- package/dist/shared/tokens.d.ts.map +1 -0
- package/dist/shared/tokens.js +54 -0
- package/dist/shared/tokens.js.map +1 -0
- package/dist/shared/tooling/allowlistedExec.d.ts +45 -0
- package/dist/shared/tooling/allowlistedExec.d.ts.map +1 -0
- package/dist/shared/tooling/allowlistedExec.js +340 -0
- package/dist/shared/tooling/allowlistedExec.js.map +1 -0
- package/dist/shared/tooling/analyzerDeps.d.ts +65 -0
- package/dist/shared/tooling/analyzerDeps.d.ts.map +1 -0
- package/dist/shared/tooling/analyzerDeps.js +130 -0
- package/dist/shared/tooling/analyzerDeps.js.map +1 -0
- package/dist/shared/tooling/exec.d.ts +99 -0
- package/dist/shared/tooling/exec.d.ts.map +1 -0
- package/dist/shared/tooling/exec.js +217 -0
- package/dist/shared/tooling/exec.js.map +1 -0
- package/dist/shared/tooling/repoConventions.d.ts +23 -0
- package/dist/shared/tooling/repoConventions.d.ts.map +1 -0
- package/dist/shared/tooling/repoConventions.js +177 -0
- package/dist/shared/tooling/repoConventions.js.map +1 -0
- package/dist/shared/tooling/testCommand.d.ts +17 -0
- package/dist/shared/tooling/testCommand.d.ts.map +1 -0
- package/dist/shared/tooling/testCommand.js +106 -0
- package/dist/shared/tooling/testCommand.js.map +1 -0
- package/dist/shared/types/accessDeclaration.d.ts +16 -0
- package/dist/shared/types/accessDeclaration.d.ts.map +1 -0
- package/dist/shared/types/accessDeclaration.js +9 -0
- package/dist/shared/types/accessDeclaration.js.map +1 -0
- package/dist/shared/types/contractPipeline/design.d.ts +74 -0
- package/dist/shared/types/contractPipeline/design.d.ts.map +1 -0
- package/dist/shared/types/contractPipeline/design.js +10 -0
- package/dist/shared/types/contractPipeline/design.js.map +1 -0
- package/dist/shared/types/contractPipeline/goal.d.ts +41 -0
- package/dist/shared/types/contractPipeline/goal.d.ts.map +1 -0
- package/dist/shared/types/contractPipeline/goal.js +10 -0
- package/dist/shared/types/contractPipeline/goal.js.map +1 -0
- package/dist/shared/types/contractPipeline/implementation.d.ts +64 -0
- package/dist/shared/types/contractPipeline/implementation.d.ts.map +1 -0
- package/dist/shared/types/contractPipeline/implementation.js +8 -0
- package/dist/shared/types/contractPipeline/implementation.js.map +1 -0
- package/dist/shared/types/contractPipeline/obligations.d.ts +141 -0
- package/dist/shared/types/contractPipeline/obligations.d.ts.map +1 -0
- package/dist/shared/types/contractPipeline/obligations.js +16 -0
- package/dist/shared/types/contractPipeline/obligations.js.map +1 -0
- package/dist/shared/types/contractPipeline/verification.d.ts +64 -0
- package/dist/shared/types/contractPipeline/verification.d.ts.map +1 -0
- package/dist/shared/types/contractPipeline/verification.js +10 -0
- package/dist/shared/types/contractPipeline/verification.js.map +1 -0
- package/dist/shared/types/contractPipeline.d.ts +36 -0
- package/dist/shared/types/contractPipeline.d.ts.map +1 -0
- package/dist/shared/types/contractPipeline.js +31 -0
- package/dist/shared/types/contractPipeline.js.map +1 -0
- package/dist/shared/types/disposition.d.ts +46 -0
- package/dist/shared/types/disposition.d.ts.map +1 -0
- package/dist/shared/types/disposition.js +22 -0
- package/dist/shared/types/disposition.js.map +1 -0
- package/dist/shared/types/finding.d.ts +1463 -0
- package/dist/shared/types/finding.d.ts.map +1 -0
- package/dist/shared/types/finding.js +234 -0
- package/dist/shared/types/finding.js.map +1 -0
- package/dist/shared/types/flows.d.ts +84 -0
- package/dist/shared/types/flows.d.ts.map +1 -0
- package/dist/shared/types/flows.js +23 -0
- package/dist/shared/types/flows.js.map +1 -0
- package/dist/shared/types/graph.d.ts +359 -0
- package/dist/shared/types/graph.d.ts.map +1 -0
- package/dist/shared/types/graph.js +38 -0
- package/dist/shared/types/graph.js.map +1 -0
- package/dist/shared/types/intentCheckpoint.d.ts +95 -0
- package/dist/shared/types/intentCheckpoint.d.ts.map +1 -0
- package/dist/shared/types/intentCheckpoint.js +2 -0
- package/dist/shared/types/intentCheckpoint.js.map +1 -0
- package/dist/shared/types/intentInterpretation.d.ts +57 -0
- package/dist/shared/types/intentInterpretation.d.ts.map +1 -0
- package/dist/shared/types/intentInterpretation.js +20 -0
- package/dist/shared/types/intentInterpretation.js.map +1 -0
- package/dist/shared/types/lens.d.ts +38 -0
- package/dist/shared/types/lens.d.ts.map +1 -0
- package/dist/shared/types/lens.js +80 -0
- package/dist/shared/types/lens.js.map +1 -0
- package/dist/shared/types/obligationLedger.d.ts +35 -0
- package/dist/shared/types/obligationLedger.d.ts.map +1 -0
- package/dist/shared/types/obligationLedger.js +77 -0
- package/dist/shared/types/obligationLedger.js.map +1 -0
- package/dist/shared/types/providerConfirmation.d.ts +51 -0
- package/dist/shared/types/providerConfirmation.d.ts.map +1 -0
- package/dist/shared/types/providerConfirmation.js +19 -0
- package/dist/shared/types/providerConfirmation.js.map +1 -0
- package/dist/shared/types/remediationOutcome.d.ts +41 -0
- package/dist/shared/types/remediationOutcome.d.ts.map +1 -0
- package/dist/shared/types/remediationOutcome.js +7 -0
- package/dist/shared/types/remediationOutcome.js.map +1 -0
- package/dist/shared/types/risk.d.ts +52 -0
- package/dist/shared/types/risk.d.ts.map +1 -0
- package/dist/shared/types/risk.js +17 -0
- package/dist/shared/types/risk.js.map +1 -0
- package/dist/shared/types/rollingDispatch.d.ts +61 -0
- package/dist/shared/types/rollingDispatch.d.ts.map +1 -0
- package/dist/shared/types/rollingDispatch.js +19 -0
- package/dist/shared/types/rollingDispatch.js.map +1 -0
- package/dist/shared/types/runLedger.d.ts +18 -0
- package/dist/shared/types/runLedger.d.ts.map +1 -0
- package/dist/shared/types/runLedger.js +7 -0
- package/dist/shared/types/runLedger.js.map +1 -0
- package/dist/shared/types/sessionConfig.d.ts +294 -0
- package/dist/shared/types/sessionConfig.d.ts.map +1 -0
- package/dist/shared/types/sessionConfig.js +44 -0
- package/dist/shared/types/sessionConfig.js.map +1 -0
- package/dist/shared/types/stepContract.d.ts +10 -0
- package/dist/shared/types/stepContract.d.ts.map +1 -0
- package/dist/shared/types/stepContract.js +4 -0
- package/dist/shared/types/stepContract.js.map +1 -0
- package/dist/shared/types/surfaces.d.ts +73 -0
- package/dist/shared/types/surfaces.d.ts.map +1 -0
- package/dist/shared/types/surfaces.js +21 -0
- package/dist/shared/types/surfaces.js.map +1 -0
- package/dist/shared/validation/basic.d.ts +24 -0
- package/dist/shared/validation/basic.d.ts.map +1 -0
- package/dist/shared/validation/basic.js +57 -0
- package/dist/shared/validation/basic.js.map +1 -0
- package/dist/shared/validation/findingGrounding.d.ts +45 -0
- package/dist/shared/validation/findingGrounding.d.ts.map +1 -0
- package/dist/shared/validation/findingGrounding.js +103 -0
- package/dist/shared/validation/findingGrounding.js.map +1 -0
- package/dist/shared/validation/findingsReport.d.ts +42 -0
- package/dist/shared/validation/findingsReport.d.ts.map +1 -0
- package/dist/shared/validation/findingsReport.js +76 -0
- package/dist/shared/validation/findingsReport.js.map +1 -0
- package/dist/shared/validation/sessionConfig.d.ts +22 -0
- package/dist/shared/validation/sessionConfig.d.ts.map +1 -0
- package/dist/shared/validation/sessionConfig.js +38 -0
- package/dist/shared/validation/sessionConfig.js.map +1 -0
- package/docs/audit-pkg/contracts.md +227 -0
- package/docs/audit-pkg/development.md +112 -0
- package/docs/audit-pkg/history.md +66 -0
- package/docs/audit-pkg/operator-guide.md +204 -0
- package/docs/audit-pkg/product.md +119 -0
- package/docs/audit-pkg/release.md +131 -0
- package/opencode.json +159 -0
- package/package.json +104 -0
- package/remediate-code.mjs +116 -0
- package/schemas/audit_result.schema.json +510 -0
- package/schemas/audit_results.schema.json +514 -0
- package/schemas/audit_task.schema.json +127 -0
- package/schemas/finding.schema.json +261 -0
- package/schemas/lens.schema.json +19 -0
- package/scripts/audit/postinstall.mjs +385 -0
- package/scripts/postinstall.mjs +24 -0
- package/scripts/remediate/postinstall.mjs +387 -0
- package/skills/audit-code/SKILL.md +166 -0
- package/skills/audit-code/agents/openai.yaml +4 -0
- package/skills/audit-code/audit-code.prompt.md +112 -0
- package/skills/audit-code/opencode-command-template.txt +13 -0
- package/skills/remediate-code/SKILL.md +90 -0
- package/skills/remediate-code/agents/openai.yaml +4 -0
- package/skills/remediate-code/remediate-code.prompt.md +94 -0
- package/templates/AGENTS.remediate-code.md +6 -0
|
@@ -0,0 +1,1229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contract-pipeline gate for ALL remediation starts (both paths).
|
|
3
|
+
*
|
|
4
|
+
* When intake is ready, next-step routes through the resumable
|
|
5
|
+
* contract_goal → context → design → critique → obligations → assessment →
|
|
6
|
+
* critic → judge → implementation DAG pipeline before producing an extracted
|
|
7
|
+
* plan that feeds the document/implement/close flow.
|
|
8
|
+
*
|
|
9
|
+
* Path A (structured audit-findings.json): a path_a_seed.json is written to
|
|
10
|
+
* the contract directory before the first phase step, so goal_normalization
|
|
11
|
+
* and context_collection prompts can reference the auditor findings directly.
|
|
12
|
+
* Path B (document/conversation): enters the pipeline directly from intake.
|
|
13
|
+
*
|
|
14
|
+
* Worker outputs are untrusted until validated: each invocation first ingests
|
|
15
|
+
* raw worker-written payloads into validated envelopes (recording dependency
|
|
16
|
+
* content hashes), then archives stale artifacts so the staleness DAG
|
|
17
|
+
* re-derives everything downstream of a repair. The adversarial critic →
|
|
18
|
+
* judge → repair loop lives across next-step invocations with its state in
|
|
19
|
+
* the contract artifacts plus repair-state.json; repairs are capped so a
|
|
20
|
+
* non-converging judge can never oscillate forever.
|
|
21
|
+
*/
|
|
22
|
+
import { existsSync } from "node:fs";
|
|
23
|
+
import { mkdir, rename } from "node:fs/promises";
|
|
24
|
+
import { join } from "node:path";
|
|
25
|
+
import { writeJsonFile, readOptionalJsonFile, formatValidationIssues, isRecord, withFsRetry, } from "audit-tools/shared";
|
|
26
|
+
import { CP_ARTIFACT_NAMES, contractArtifactExists, contractArtifactFilePath, contractPipelineDir, detectStaleArtifacts, pathASeedFilePath, readContractArtifact, writeContractArtifact, } from "../contractPipeline/artifactStore.js";
|
|
27
|
+
import { detectCyclicSeamObligations, validateCycleBreak, } from "../contractPipeline/cyclicSeamResolution.js";
|
|
28
|
+
import { deriveObligationLedger, buildTestValidatorPlanScaffold, buildImplementationDagScaffold, acceptedCounterexampleIds, } from "../contractPipeline/derive.js";
|
|
29
|
+
import { ensureNodeId, toBlockId } from "../contractPipeline/idRegistry.js";
|
|
30
|
+
import { captureReviewSnapshot, computeReReviewDelta, isReviewArtifact, readReviewSnapshot, renderReReviewSection, reviewSnapshotExists, } from "../contractPipeline/reviewSnapshot.js";
|
|
31
|
+
import { renderContractPipelinePrompt, renderContractRepairPrompt, CONTRACT_PIPELINE_PHASE_ORDER, } from "./contractPipelinePrompts.js";
|
|
32
|
+
import { CONTRACT_PIPELINE_VALIDATORS, validateDesignSpecGates, validateGoalIdConsistency, validateImplementationDAGIntegrity, validatePairedObligations, validateEvidenceThreaded, validateDigestCoverage, validateReconciliationDerivation, deriveNodeModelTierFromNode, } from "../validation/contractPipeline.js";
|
|
33
|
+
import { writeCurrentStep } from "./stepWriter.js";
|
|
34
|
+
import { loaderCommand } from "./prompts.js";
|
|
35
|
+
import { intakePaths } from "../intake.js";
|
|
36
|
+
// ── Phase → artifact name mapping ─────────────────────────────────────────────
|
|
37
|
+
const PHASE_TO_ARTIFACT = {
|
|
38
|
+
goal_normalization: "goal_spec",
|
|
39
|
+
context_collection: "context_bundle",
|
|
40
|
+
decomposition: "module_decomposition",
|
|
41
|
+
module_contract_drafting: "module_contracts",
|
|
42
|
+
seam_reconciliation: "seam_reconciliation_report",
|
|
43
|
+
contract_finalization: "finalized_module_contracts",
|
|
44
|
+
critique: "conceptual_design_critique",
|
|
45
|
+
obligation_ledger: "obligation_ledger",
|
|
46
|
+
cyclic_seam_resolution: "cyclic_seam_resolution",
|
|
47
|
+
test_validator_plan: "test_validator_plan",
|
|
48
|
+
assessment: "contract_assessment_report",
|
|
49
|
+
critic: "counterexample",
|
|
50
|
+
judge: "judge_report",
|
|
51
|
+
implementation_planning: "implementation_dag",
|
|
52
|
+
closing: "verification_report",
|
|
53
|
+
};
|
|
54
|
+
/** Producing phase per artifact, for re-emitting a step after failed validation. */
|
|
55
|
+
const ARTIFACT_TO_PHASE = {
|
|
56
|
+
...Object.fromEntries(Object.entries(PHASE_TO_ARTIFACT).map(([phase, artifact]) => [artifact, phase])),
|
|
57
|
+
};
|
|
58
|
+
// ── Phase → step kind mapping ──────────────────────────────────────────────────
|
|
59
|
+
const CONTRACT_STEP_KIND = "contract_pipeline";
|
|
60
|
+
const PRE_IMPLEMENTATION_PHASE_ORDER = CONTRACT_PIPELINE_PHASE_ORDER.filter((phase) => phase !== "closing");
|
|
61
|
+
// ── Bounded-loop caps ─────────────────────────────────────────────────────────
|
|
62
|
+
/**
|
|
63
|
+
* Maximum judge-ordered contract repairs per run. After the cap, the run
|
|
64
|
+
* proceeds to implementation planning with the unrepaired counterexamples
|
|
65
|
+
* carried as residual risks — an unbounded critic↔repair oscillation is the
|
|
66
|
+
* failure mode this exists to prevent.
|
|
67
|
+
*/
|
|
68
|
+
export const MAX_CONTRACT_REPAIR_ITERATIONS = 2;
|
|
69
|
+
/** Maximum implementation_dag regenerations after traceability rejections. */
|
|
70
|
+
export const MAX_DAG_REGENERATION_ATTEMPTS = 2;
|
|
71
|
+
/**
|
|
72
|
+
* Maximum LLM cycle-break resolution attempts before routing to user-decision
|
|
73
|
+
* (and, if that also fails, to `blocked`).
|
|
74
|
+
*/
|
|
75
|
+
export const MAX_CYCLIC_SEAM_RESOLUTION_ATTEMPTS = 2;
|
|
76
|
+
function repairStatePath(artifactsDir) {
|
|
77
|
+
return join(contractPipelineDir(artifactsDir), "repair-state.json");
|
|
78
|
+
}
|
|
79
|
+
async function readRepairState(artifactsDir) {
|
|
80
|
+
const state = await readOptionalJsonFile(repairStatePath(artifactsDir));
|
|
81
|
+
return (state ?? {
|
|
82
|
+
schema_version: "remediate-code-contract-pipeline/repair-state/v1alpha1",
|
|
83
|
+
repairs: [],
|
|
84
|
+
dag_regenerations: [],
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
async function writeRepairState(artifactsDir, state) {
|
|
88
|
+
await mkdir(contractPipelineDir(artifactsDir), { recursive: true });
|
|
89
|
+
await writeJsonFile(repairStatePath(artifactsDir), state);
|
|
90
|
+
}
|
|
91
|
+
function cyclicSeamRepairStatePath(artifactsDir) {
|
|
92
|
+
return join(contractPipelineDir(artifactsDir), "cyclic-seam-repair-state.json");
|
|
93
|
+
}
|
|
94
|
+
export async function readCyclicSeamRepairState(artifactsDir) {
|
|
95
|
+
const state = await readOptionalJsonFile(cyclicSeamRepairStatePath(artifactsDir));
|
|
96
|
+
return (state ?? {
|
|
97
|
+
schema_version: "remediate-code-contract-pipeline/cyclic-seam-repair-state/v1alpha1",
|
|
98
|
+
attempts: [],
|
|
99
|
+
user_decision_emitted: false,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
export async function writeCyclicSeamRepairState(artifactsDir, state) {
|
|
103
|
+
await mkdir(contractPipelineDir(artifactsDir), { recursive: true });
|
|
104
|
+
await writeJsonFile(cyclicSeamRepairStatePath(artifactsDir), state);
|
|
105
|
+
}
|
|
106
|
+
// ── Envelope handling ─────────────────────────────────────────────────────────
|
|
107
|
+
function isEnvelope(value) {
|
|
108
|
+
return (isRecord(value) &&
|
|
109
|
+
typeof value.artifact_name === "string" &&
|
|
110
|
+
typeof value.content_hash === "string" &&
|
|
111
|
+
"payload" in value);
|
|
112
|
+
}
|
|
113
|
+
/** Payload of a stored artifact whether or not it has been enveloped yet. */
|
|
114
|
+
function envelopePayload(envelope) {
|
|
115
|
+
if (!envelope)
|
|
116
|
+
return undefined;
|
|
117
|
+
return isEnvelope(envelope) ? envelope.payload : envelope;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Render a pre-filled skeleton section (S3 scaffold) for the partially-derivable
|
|
121
|
+
* phases. The tool derives the structure/ids/cross-refs from the already-present
|
|
122
|
+
* obligation ledger and leaves only the judgment slots blank, so the worker fills
|
|
123
|
+
* sentences/commands rather than emitting a whole artifact from scratch. Returns
|
|
124
|
+
* undefined when there is nothing to scaffold (no testable obligations / no nodes).
|
|
125
|
+
*/
|
|
126
|
+
async function buildScaffoldSection(phase, artifactsDir) {
|
|
127
|
+
const ledger = envelopePayload(await readContractArtifact(artifactsDir, "obligation_ledger"));
|
|
128
|
+
if (phase === "test_validator_plan") {
|
|
129
|
+
const scaffold = buildTestValidatorPlanScaffold(ledger);
|
|
130
|
+
if (scaffold.test_specs.length === 0)
|
|
131
|
+
return undefined;
|
|
132
|
+
const path = contractArtifactFilePath(artifactsDir, "test_validator_plan");
|
|
133
|
+
return `## Pre-filled Skeleton — fill only the blank slots
|
|
134
|
+
|
|
135
|
+
The obligation ledger was derived deterministically. Below is the test-plan skeleton: one spec per testable obligation, with \`obligation_id\`, \`name\`, and \`kind\` already filled. Fill ONLY each \`assertions\` array — every spec needs at least one positive (satisfied-path) assertion AND one negative (failure-path) assertion. Do not add, remove, or rename specs. If an obligation is genuinely untestable, replace its spec body with an \`inapplicable_claim\` citing its \`obligation_id\` and a falsifiable reason.
|
|
136
|
+
|
|
137
|
+
\`\`\`json
|
|
138
|
+
${JSON.stringify(scaffold, null, 2)}
|
|
139
|
+
\`\`\`
|
|
140
|
+
|
|
141
|
+
Self-check before next-step: \`${loaderCommand(`validate-artifact --name test_validator_plan --file ${path}`)}\``;
|
|
142
|
+
}
|
|
143
|
+
if (phase === "implementation_planning") {
|
|
144
|
+
const judge = envelopePayload(await readContractArtifact(artifactsDir, "judge_report"));
|
|
145
|
+
const scaffold = buildImplementationDagScaffold(ledger, acceptedCounterexampleIds(judge));
|
|
146
|
+
if (scaffold.nodes.length === 0)
|
|
147
|
+
return undefined;
|
|
148
|
+
const path = contractArtifactFilePath(artifactsDir, "implementation_dag");
|
|
149
|
+
return `## Pre-filled Skeleton — fill only the blank slots
|
|
150
|
+
|
|
151
|
+
Below is the implementation-DAG skeleton: one node per obligation (covering every obligation and accepted counterexample). Fill ONLY each node's \`title\`, \`description\`, and \`targeted_commands\`. You MAY merge nodes that belong together and add real \`depends_on\`/\`edges\` ordering, as long as every obligation stays covered (in \`satisfies_obligations\` or \`verification_obligation_ids\`) and every accepted counterexample stays in some node's \`addresses_counterexamples\`.
|
|
152
|
+
|
|
153
|
+
\`\`\`json
|
|
154
|
+
${JSON.stringify(scaffold, null, 2)}
|
|
155
|
+
\`\`\`
|
|
156
|
+
|
|
157
|
+
Self-check before next-step: \`${loaderCommand(`validate-artifact --name implementation_dag --file ${path}`)}\``;
|
|
158
|
+
}
|
|
159
|
+
return undefined;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Archive an artifact file into `<contract>/history/` instead of deleting it,
|
|
163
|
+
* so a repair loop never silently destroys an LLM output.
|
|
164
|
+
*/
|
|
165
|
+
async function archiveContractArtifact(artifactsDir, name, label) {
|
|
166
|
+
const source = contractArtifactFilePath(artifactsDir, name);
|
|
167
|
+
if (!existsSync(source))
|
|
168
|
+
return;
|
|
169
|
+
const historyDir = join(contractPipelineDir(artifactsDir), "history");
|
|
170
|
+
await mkdir(historyDir, { recursive: true });
|
|
171
|
+
await withFsRetry(() => rename(source, join(historyDir, `${name}.${label}-${Date.now()}.json`)));
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Wrap raw worker-written artifact payloads into validated envelopes. Workers
|
|
175
|
+
* write the bare payload the role schema describes; the envelope (content hash
|
|
176
|
+
* + dependency hashes) is the orchestrator's deterministic bookkeeping, added
|
|
177
|
+
* here. CP_ARTIFACT_NAMES is dependency-ordered, so dependencies are enveloped
|
|
178
|
+
* before their dependents and dependency hashes are always available.
|
|
179
|
+
*/
|
|
180
|
+
export async function ingestContractArtifacts(artifactsDir) {
|
|
181
|
+
const ingested = [];
|
|
182
|
+
const invalid = [];
|
|
183
|
+
for (const name of CP_ARTIFACT_NAMES) {
|
|
184
|
+
const raw = await readOptionalJsonFile(contractArtifactFilePath(artifactsDir, name));
|
|
185
|
+
if (raw === undefined || raw === null || isEnvelope(raw))
|
|
186
|
+
continue;
|
|
187
|
+
const issues = CONTRACT_PIPELINE_VALIDATORS[name](raw, name).filter((issue) => issue.severity === "error");
|
|
188
|
+
if (issues.length > 0) {
|
|
189
|
+
invalid.push({ name, issues });
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
await writeContractArtifact(artifactsDir, name, raw);
|
|
193
|
+
ingested.push(name);
|
|
194
|
+
// Snapshot a freshly-produced review verdict + the upstreams it reviewed, so
|
|
195
|
+
// a later staleness re-emit can be diff-based (B2). No-op for non-review
|
|
196
|
+
// artifacts. Captured at ingest, when the upstreams are in the exact state
|
|
197
|
+
// the worker reviewed.
|
|
198
|
+
if (isReviewArtifact(name)) {
|
|
199
|
+
await captureReviewSnapshot(artifactsDir, name, raw, new Date().toISOString());
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return { ingested, invalid };
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Determine whether the contract pipeline should be entered for this run.
|
|
206
|
+
* The pipeline is entered for ALL intake source types (structured_audit,
|
|
207
|
+
* document, conversation) when an extracted-plan.json has not yet been
|
|
208
|
+
* produced. Path A (structured_audit) seeds the pipeline via a path_a_seed.json
|
|
209
|
+
* before the first phase step, so goal_normalization and context_collection
|
|
210
|
+
* prompts can reference the auditor findings.
|
|
211
|
+
*/
|
|
212
|
+
export function shouldEnterContractPipeline(artifactsDir, _intakeSourceType) {
|
|
213
|
+
const paths = intakePaths(artifactsDir);
|
|
214
|
+
// If an extracted plan already exists, the pipeline has completed.
|
|
215
|
+
if (existsSync(paths.extractedPlan)) {
|
|
216
|
+
return { shouldHandleContractPipeline: false, pipelineComplete: true };
|
|
217
|
+
}
|
|
218
|
+
// Check whether the implementation_dag exists (pipeline complete, awaiting extraction).
|
|
219
|
+
if (contractArtifactExists(artifactsDir, "implementation_dag")) {
|
|
220
|
+
return { shouldHandleContractPipeline: true, pipelineComplete: true };
|
|
221
|
+
}
|
|
222
|
+
return { shouldHandleContractPipeline: true, pipelineComplete: false };
|
|
223
|
+
}
|
|
224
|
+
/** Return the first pipeline phase whose output artifact does not exist. */
|
|
225
|
+
export function nextMissingContractPhase(artifactsDir) {
|
|
226
|
+
for (const phase of PRE_IMPLEMENTATION_PHASE_ORDER) {
|
|
227
|
+
const artifactName = PHASE_TO_ARTIFACT[phase];
|
|
228
|
+
if (!artifactName)
|
|
229
|
+
continue;
|
|
230
|
+
if (!contractArtifactExists(artifactsDir, artifactName)) {
|
|
231
|
+
return phase;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Write a Path-A seed file from a parsed audit-findings report.
|
|
238
|
+
* The seed is written once (idempotent: skipped when it already exists).
|
|
239
|
+
* goal_normalization and context_collection prompts detect the seed and
|
|
240
|
+
* include its contents so every pipeline node traces to an auditor finding.
|
|
241
|
+
*/
|
|
242
|
+
export async function writePathASeedFromFindings(artifactsDir, auditFindingsPath, auditFindings) {
|
|
243
|
+
const seedPath = pathASeedFilePath(artifactsDir);
|
|
244
|
+
if (existsSync(seedPath))
|
|
245
|
+
return; // idempotent
|
|
246
|
+
const findings = isRecord(auditFindings) && Array.isArray(auditFindings.findings)
|
|
247
|
+
? auditFindings.findings
|
|
248
|
+
: [];
|
|
249
|
+
const affectedFilesSet = new Set();
|
|
250
|
+
const findingsSummary = [];
|
|
251
|
+
for (const f of findings) {
|
|
252
|
+
if (typeof f.id === "string" && typeof f.title === "string") {
|
|
253
|
+
findingsSummary.push({
|
|
254
|
+
id: f.id,
|
|
255
|
+
title: f.title,
|
|
256
|
+
lens: typeof f.lens === "string" ? f.lens : "correctness",
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
if (Array.isArray(f.affected_files)) {
|
|
260
|
+
for (const af of f.affected_files) {
|
|
261
|
+
if (typeof af.path === "string") {
|
|
262
|
+
affectedFilesSet.add(af.path);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
const seed = {
|
|
268
|
+
schema_version: "remediate-code-contract-pipeline/path-a-seed/v1alpha1",
|
|
269
|
+
audit_findings_path: auditFindingsPath,
|
|
270
|
+
finding_count: findings.length,
|
|
271
|
+
findings_summary: findingsSummary,
|
|
272
|
+
affected_files: [...affectedFilesSet],
|
|
273
|
+
created_at: new Date().toISOString(),
|
|
274
|
+
};
|
|
275
|
+
await mkdir(contractPipelineDir(artifactsDir), { recursive: true });
|
|
276
|
+
await writeJsonFile(seedPath, seed);
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Infer the most appropriate repair target from judge classifications when no
|
|
280
|
+
* explicit repair_directive is provided. Examines only accepted classifications
|
|
281
|
+
* and keyword-matches their rationale text.
|
|
282
|
+
*
|
|
283
|
+
* Priority (first match wins):
|
|
284
|
+
* obligation/ledger/invariant/constraint keywords → obligation_ledger
|
|
285
|
+
* assessment/finding/gap keywords → contract_assessment_report
|
|
286
|
+
* fallback → finalized_module_contracts
|
|
287
|
+
*/
|
|
288
|
+
export function inferRepairTarget(classifications) {
|
|
289
|
+
const accepted = (classifications ?? []).filter((c) => c.classification === "accepted");
|
|
290
|
+
const text = accepted.map((c) => c.rationale).join(" ").toLowerCase();
|
|
291
|
+
if (/obligation|ledger|invariant violated|constraint/.test(text)) {
|
|
292
|
+
return "obligation_ledger";
|
|
293
|
+
}
|
|
294
|
+
if (/assessment|contract finding|gap identified/.test(text)) {
|
|
295
|
+
return "contract_assessment_report";
|
|
296
|
+
}
|
|
297
|
+
return "finalized_module_contracts";
|
|
298
|
+
}
|
|
299
|
+
function inferRepairDirective(judge) {
|
|
300
|
+
return {
|
|
301
|
+
target: inferRepairTarget(judge.classifications),
|
|
302
|
+
instruction: "Address every judge-accepted counterexample in the judge report's classifications.",
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Decide whether implementation planning may proceed: an approved judge
|
|
307
|
+
* verdict proceeds; a failing verdict triggers one targeted repair per judge
|
|
308
|
+
* report, capped at MAX_CONTRACT_REPAIR_ITERATIONS — after the cap, the run
|
|
309
|
+
* proceeds with the unrepaired counterexamples recorded as residual risks.
|
|
310
|
+
*/
|
|
311
|
+
async function evaluateJudgeGate(artifactsDir) {
|
|
312
|
+
const judgeEnvelope = await readContractArtifact(artifactsDir, "judge_report");
|
|
313
|
+
if (!judgeEnvelope)
|
|
314
|
+
return { kind: "proceed" };
|
|
315
|
+
const judge = envelopePayload(judgeEnvelope);
|
|
316
|
+
if (!judge || judge.verdict === "approved")
|
|
317
|
+
return { kind: "proceed" };
|
|
318
|
+
const repairState = await readRepairState(artifactsDir);
|
|
319
|
+
const judgeHash = judgeEnvelope.content_hash;
|
|
320
|
+
const alreadyHandled = repairState.repairs.some((repair) => repair.judge_hash === judgeHash);
|
|
321
|
+
if (!alreadyHandled && repairState.repairs.length >= MAX_CONTRACT_REPAIR_ITERATIONS) {
|
|
322
|
+
return {
|
|
323
|
+
kind: "proceed_residual",
|
|
324
|
+
note: `The judge verdict remains "needs_repair" after ${repairState.repairs.length} repair iteration(s) (the cap). Proceed anyway: treat every judge-accepted counterexample that remains unaddressed as a residual risk, and cover each one with an implementation or verification node.`,
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
// Map judge.repair_directive.target if present; if absent, infer from classifications.
|
|
328
|
+
const rawDirective = judge.repair_directive;
|
|
329
|
+
const directive = rawDirective
|
|
330
|
+
? {
|
|
331
|
+
target: (rawDirective.target === "design_spec"
|
|
332
|
+
? "finalized_module_contracts"
|
|
333
|
+
: rawDirective.target),
|
|
334
|
+
instruction: rawDirective.instruction,
|
|
335
|
+
}
|
|
336
|
+
: inferRepairDirective(judge);
|
|
337
|
+
return { kind: "repair", directive, judgeHash };
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* The traceability invariant: no implementation_dag node may exist without
|
|
341
|
+
* tracing to an obligation from the ledger (satisfies_obligations or
|
|
342
|
+
* verification_obligation_ids) or to a judge-accepted counterexample
|
|
343
|
+
* (addresses_counterexamples). Untraceable nodes are unattributable work — the
|
|
344
|
+
* exact thing the contract pipeline exists to prevent.
|
|
345
|
+
*/
|
|
346
|
+
export async function validateImplementationDagTraceability(artifactsDir) {
|
|
347
|
+
const dag = envelopePayload(await readContractArtifact(artifactsDir, "implementation_dag"));
|
|
348
|
+
if (!dag) {
|
|
349
|
+
return { ok: false, violations: ["implementation_dag is missing."] };
|
|
350
|
+
}
|
|
351
|
+
const ledger = envelopePayload(await readContractArtifact(artifactsDir, "obligation_ledger"));
|
|
352
|
+
const judge = envelopePayload(await readContractArtifact(artifactsDir, "judge_report"));
|
|
353
|
+
const obligationIds = new Set((ledger?.obligations ?? []).map((obligation) => obligation.id));
|
|
354
|
+
const acceptedCounterexampleIds = new Set((judge?.classifications ?? [])
|
|
355
|
+
.filter((entry) => entry.classification === "accepted")
|
|
356
|
+
.map((entry) => entry.counterexample_id));
|
|
357
|
+
const violations = [];
|
|
358
|
+
const nodes = Array.isArray(dag.nodes) ? dag.nodes : [];
|
|
359
|
+
if (nodes.length === 0) {
|
|
360
|
+
violations.push("implementation_dag has no nodes; nothing would be implemented.");
|
|
361
|
+
}
|
|
362
|
+
for (const node of nodes) {
|
|
363
|
+
const tracedObligations = [
|
|
364
|
+
...(node.satisfies_obligations ?? []),
|
|
365
|
+
...(node.verification_obligation_ids ?? []),
|
|
366
|
+
].filter((id) => obligationIds.has(id));
|
|
367
|
+
const tracedCounterexamples = (node.addresses_counterexamples ?? []).filter((id) => acceptedCounterexampleIds.has(id));
|
|
368
|
+
if (tracedObligations.length === 0 && tracedCounterexamples.length === 0) {
|
|
369
|
+
violations.push(`Node "${node.id}" traces to no obligation from the obligation ledger and no judge-accepted counterexample.`);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
return { ok: violations.length === 0, violations };
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Run the fail-closed contract-obligation gates against the persisted contract
|
|
376
|
+
* artifacts. Aggregates:
|
|
377
|
+
* - validatePairedObligations (obligation_ledger × test_validator_plan)
|
|
378
|
+
* - validateEvidenceThreaded (assessment × judge × implementation_dag)
|
|
379
|
+
* - validateDigestCoverage (goal_spec.source_type × finding-enumeration × ledger)
|
|
380
|
+
* - validateReconciliationDerivation (seam report × finalized contracts)
|
|
381
|
+
*
|
|
382
|
+
* Only error-severity issues fail the gate. Each gate is individually tolerant
|
|
383
|
+
* of an absent input artifact (the upstream phase order guarantees presence by
|
|
384
|
+
* the time this runs, except the source-scoped digest-coverage check which is
|
|
385
|
+
* vacuous for non-enumerable sources).
|
|
386
|
+
*/
|
|
387
|
+
export async function evaluateContractObligationsPromotionGate(artifactsDir) {
|
|
388
|
+
const obligationLedger = envelopePayload(await readContractArtifact(artifactsDir, "obligation_ledger"));
|
|
389
|
+
const testValidatorPlan = envelopePayload(await readContractArtifact(artifactsDir, "test_validator_plan"));
|
|
390
|
+
const assessment = envelopePayload(await readContractArtifact(artifactsDir, "contract_assessment_report"));
|
|
391
|
+
const judge = envelopePayload(await readContractArtifact(artifactsDir, "judge_report"));
|
|
392
|
+
const dag = envelopePayload(await readContractArtifact(artifactsDir, "implementation_dag"));
|
|
393
|
+
const seamReport = envelopePayload(await readContractArtifact(artifactsDir, "seam_reconciliation_report"));
|
|
394
|
+
const finalizedContracts = envelopePayload(await readContractArtifact(artifactsDir, "finalized_module_contracts"));
|
|
395
|
+
const goalSpec = envelopePayload(await readContractArtifact(artifactsDir, "goal_spec"));
|
|
396
|
+
const sourceType = isRecord(goalSpec) && typeof goalSpec.source_type === "string"
|
|
397
|
+
? goalSpec.source_type
|
|
398
|
+
: undefined;
|
|
399
|
+
const findingEnumeration = await readOptionalJsonFile(intakePaths(artifactsDir).findingEnumeration);
|
|
400
|
+
const issues = [
|
|
401
|
+
...validatePairedObligations(obligationLedger, testValidatorPlan),
|
|
402
|
+
...validateEvidenceThreaded(assessment, judge, dag),
|
|
403
|
+
...validateDigestCoverage(sourceType, findingEnumeration, obligationLedger),
|
|
404
|
+
...validateReconciliationDerivation(seamReport, finalizedContracts),
|
|
405
|
+
].filter((issue) => issue.severity === "error");
|
|
406
|
+
return {
|
|
407
|
+
ok: issues.length === 0,
|
|
408
|
+
violations: issues.map((issue) => `[${issue.path}] ${issue.message}`),
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Pre-adversarial structural floor (S5). The subset of the contract-obligation
|
|
413
|
+
* gates whose inputs all exist by the time the critic phase is reached
|
|
414
|
+
* (paired-obligation coverage, source-scoped digest coverage, and seam
|
|
415
|
+
* reconciliation derivation — none of which need the judge verdict or the
|
|
416
|
+
* implementation_dag). Running them BEFORE the expensive critic/judge loop means
|
|
417
|
+
* the adversarial phases only ever see structurally-sound obligations, tests, and
|
|
418
|
+
* contracts, and a structural gap is re-emitted to the precise responsible phase
|
|
419
|
+
* instead of being discovered at promotion (after the adversarial budget is spent)
|
|
420
|
+
* and re-emitted to the wrong phase. The full {@link evaluateContractObligationsPromotionGate}
|
|
421
|
+
* — including the evidence-threading check that needs the judge + DAG — still runs
|
|
422
|
+
* at promotion as the fail-closed backstop; this gate never replaces it.
|
|
423
|
+
*
|
|
424
|
+
* Returns the first failing gate's responsible phase + rendered error lines, or
|
|
425
|
+
* null when the structural floor is clean. Each underlying validator is tolerant
|
|
426
|
+
* of an absent input, so this is safe to call at the critic boundary.
|
|
427
|
+
*/
|
|
428
|
+
export async function evaluatePreCriticStructuralGate(artifactsDir) {
|
|
429
|
+
const obligationLedger = envelopePayload(await readContractArtifact(artifactsDir, "obligation_ledger"));
|
|
430
|
+
const testValidatorPlan = envelopePayload(await readContractArtifact(artifactsDir, "test_validator_plan"));
|
|
431
|
+
const seamReport = envelopePayload(await readContractArtifact(artifactsDir, "seam_reconciliation_report"));
|
|
432
|
+
const finalizedContracts = envelopePayload(await readContractArtifact(artifactsDir, "finalized_module_contracts"));
|
|
433
|
+
const goalSpec = envelopePayload(await readContractArtifact(artifactsDir, "goal_spec"));
|
|
434
|
+
const sourceType = isRecord(goalSpec) && typeof goalSpec.source_type === "string"
|
|
435
|
+
? goalSpec.source_type
|
|
436
|
+
: undefined;
|
|
437
|
+
const findingEnumeration = await readOptionalJsonFile(intakePaths(artifactsDir).findingEnumeration);
|
|
438
|
+
// Upstream-owned checks first: a derivation/coverage gap is fixed in the
|
|
439
|
+
// finalized contracts (the obligation ledger is derived from them).
|
|
440
|
+
const designErrors = [
|
|
441
|
+
...validateReconciliationDerivation(seamReport, finalizedContracts),
|
|
442
|
+
...validateDigestCoverage(sourceType, findingEnumeration, obligationLedger),
|
|
443
|
+
].filter((issue) => issue.severity === "error");
|
|
444
|
+
if (designErrors.length > 0) {
|
|
445
|
+
return {
|
|
446
|
+
phase: "contract_finalization",
|
|
447
|
+
errorLines: designErrors.map((issue) => `- [${issue.path}] ${issue.message}`),
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
// A testable obligation without a paired spec is fixed in the test plan
|
|
451
|
+
// (skeleton-scaffolded from the derived ledger).
|
|
452
|
+
const testErrors = validatePairedObligations(obligationLedger, testValidatorPlan).filter((issue) => issue.severity === "error");
|
|
453
|
+
if (testErrors.length > 0) {
|
|
454
|
+
return {
|
|
455
|
+
phase: "test_validator_plan",
|
|
456
|
+
errorLines: testErrors.map((issue) => `- [${issue.path}] ${issue.message}`),
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
return null;
|
|
460
|
+
}
|
|
461
|
+
// ── Step builder ──────────────────────────────────────────────────────────────
|
|
462
|
+
/**
|
|
463
|
+
* Build and write the next contract-pipeline step.
|
|
464
|
+
* Returns null when the pipeline is complete and the extracted plan is ready.
|
|
465
|
+
*/
|
|
466
|
+
export async function buildNextContractPipelineStep(options) {
|
|
467
|
+
const { root, artifactsDir, runId, sourcePaths } = options;
|
|
468
|
+
const cpDir = contractPipelineDir(artifactsDir);
|
|
469
|
+
const paths = intakePaths(artifactsDir);
|
|
470
|
+
// Detect the path-A seed file: present only for structured_audit runs.
|
|
471
|
+
const seedPath = pathASeedFilePath(artifactsDir);
|
|
472
|
+
const pathASeedPath = existsSync(seedPath) ? seedPath : undefined;
|
|
473
|
+
// Resolve artifact paths for the prompt renderers.
|
|
474
|
+
const artifactPaths = {};
|
|
475
|
+
for (const name of CP_ARTIFACT_NAMES) {
|
|
476
|
+
artifactPaths[name] = join(cpDir, `${name}.json`);
|
|
477
|
+
}
|
|
478
|
+
const buildStep = (params) => {
|
|
479
|
+
const nextCommand = loaderCommand("next-step");
|
|
480
|
+
const prompt = `${params.prompt}
|
|
481
|
+
|
|
482
|
+
After writing the output file, run:
|
|
483
|
+
|
|
484
|
+
\`${nextCommand}\`
|
|
485
|
+
`;
|
|
486
|
+
const stepArtifactPaths = {
|
|
487
|
+
output: params.outputPath,
|
|
488
|
+
};
|
|
489
|
+
for (const [k, v] of Object.entries(artifactPaths)) {
|
|
490
|
+
if (v && existsSync(v)) {
|
|
491
|
+
stepArtifactPaths[k] = v;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
if (sourcePaths) {
|
|
495
|
+
stepArtifactPaths.source_manifest = paths.sourceManifest;
|
|
496
|
+
stepArtifactPaths.remediation_brief = paths.brief;
|
|
497
|
+
}
|
|
498
|
+
return writeCurrentStep({
|
|
499
|
+
stepKind: CONTRACT_STEP_KIND,
|
|
500
|
+
status: "ready",
|
|
501
|
+
runId,
|
|
502
|
+
repoRoot: root,
|
|
503
|
+
artifactsDir,
|
|
504
|
+
prompt,
|
|
505
|
+
allowedCommands: [nextCommand],
|
|
506
|
+
stopCondition: params.stopCondition,
|
|
507
|
+
artifactPaths: stepArtifactPaths,
|
|
508
|
+
});
|
|
509
|
+
};
|
|
510
|
+
const buildPhaseStep = (phase, extraSection) => {
|
|
511
|
+
const rendered = renderContractPipelinePrompt({
|
|
512
|
+
role: phase,
|
|
513
|
+
artifactPaths,
|
|
514
|
+
sourcePaths,
|
|
515
|
+
repoRoot: root,
|
|
516
|
+
pathASeedPath,
|
|
517
|
+
});
|
|
518
|
+
return buildStep({
|
|
519
|
+
prompt: extraSection ? `${rendered.prompt}\n${extraSection}` : rendered.prompt,
|
|
520
|
+
outputPath: rendered.outputPath,
|
|
521
|
+
stopCondition: `Stop after writing the contract-pipeline output for phase "${phase}" and running next-step.`,
|
|
522
|
+
});
|
|
523
|
+
};
|
|
524
|
+
const buildParallelModuleWaveStep = async (phase) => {
|
|
525
|
+
// For the parallel module phases, build a single step that notes the parallel
|
|
526
|
+
// wave nature. The actual wave dispatch is handled by the host reading the prompt.
|
|
527
|
+
// We emit a single agent step: the worker reads the module list and produces
|
|
528
|
+
// the aggregated artifact for all modules (since true parallel dispatch uses
|
|
529
|
+
// the waveScheduler from implement phase, not the contract pipeline).
|
|
530
|
+
// The prompt instructs the single agent to process all modules in sequence
|
|
531
|
+
// and emit the aggregated output — a pure contract-pipeline workaround for
|
|
532
|
+
// environments that do not support parallel sub-agents.
|
|
533
|
+
return buildPhaseStep(phase);
|
|
534
|
+
};
|
|
535
|
+
// 1. Ingest raw worker outputs into validated envelopes. An output that
|
|
536
|
+
// fails validation is archived and its producing phase re-emitted with
|
|
537
|
+
// the validation errors — LLM output is untrusted until validated.
|
|
538
|
+
const ingestion = await ingestContractArtifacts(artifactsDir);
|
|
539
|
+
if (ingestion.invalid.length > 0) {
|
|
540
|
+
const first = ingestion.invalid[0];
|
|
541
|
+
await archiveContractArtifact(artifactsDir, first.name, "invalid");
|
|
542
|
+
const phase = ARTIFACT_TO_PHASE[first.name] ?? "goal_normalization";
|
|
543
|
+
return buildPhaseStep(phase, `## Validation Errors From the Previous Attempt
|
|
544
|
+
|
|
545
|
+
The previous \`${first.name}\` output failed validation and was archived. Fix every issue below in the rewritten output:
|
|
546
|
+
|
|
547
|
+
${formatValidationIssues(first.issues)}
|
|
548
|
+
`);
|
|
549
|
+
}
|
|
550
|
+
// 2. Archive stale artifacts so the staleness DAG re-derives everything
|
|
551
|
+
// downstream of a repaired (re-ingested) upstream artifact.
|
|
552
|
+
const staleness = await detectStaleArtifacts(artifactsDir);
|
|
553
|
+
for (const name of staleness.stale) {
|
|
554
|
+
await archiveContractArtifact(artifactsDir, name, "stale");
|
|
555
|
+
}
|
|
556
|
+
const nextPhase = nextMissingContractPhase(artifactsDir);
|
|
557
|
+
// 2.5. Goal-ID consistency gate (ARC-86b18f1b): every persisted artifact that
|
|
558
|
+
// carries a goal_id must agree on the same value. A mismatch means two
|
|
559
|
+
// runs were interleaved; re-emit the earliest mismatched phase so the
|
|
560
|
+
// worker can correct it.
|
|
561
|
+
{
|
|
562
|
+
const goalIdArtifacts = {};
|
|
563
|
+
for (const name of CP_ARTIFACT_NAMES) {
|
|
564
|
+
const env = await readContractArtifact(artifactsDir, name);
|
|
565
|
+
if (env)
|
|
566
|
+
goalIdArtifacts[name] = envelopePayload(env);
|
|
567
|
+
}
|
|
568
|
+
const goalIdIssues = validateGoalIdConsistency(goalIdArtifacts);
|
|
569
|
+
const goalIdErrors = goalIdIssues.filter((i) => i.severity === "error");
|
|
570
|
+
if (goalIdErrors.length > 0) {
|
|
571
|
+
// Re-emit the producing phase of the first mismatched artifact.
|
|
572
|
+
// issue.path is "<artifact_name>.goal_id"; extract the artifact name.
|
|
573
|
+
const firstPath = goalIdErrors[0]?.path ?? "";
|
|
574
|
+
const mismatchedArtifact = firstPath.replace(/\.goal_id$/, "");
|
|
575
|
+
const phase = ARTIFACT_TO_PHASE[mismatchedArtifact] ?? "goal_normalization";
|
|
576
|
+
await archiveContractArtifact(artifactsDir, mismatchedArtifact, "invalid");
|
|
577
|
+
return buildPhaseStep(phase, `## Goal-ID Consistency Error
|
|
578
|
+
|
|
579
|
+
Every contract-pipeline artifact must share the same goal_id. The following mismatch was detected:
|
|
580
|
+
|
|
581
|
+
${goalIdErrors.map((i) => `- [${i.path}] ${i.message}`).join("\n")}
|
|
582
|
+
|
|
583
|
+
Rewrite the output so its goal_id matches the goal_id established in goal_spec.json.
|
|
584
|
+
`);
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
// 2.7. Deterministic artifact derivation (S1, contract-authoring determinism).
|
|
588
|
+
// The obligation ledger is a pure function of the finalized module
|
|
589
|
+
// contracts (every invariant/failure mode/module → an obligation), so it
|
|
590
|
+
// is generated by the tool rather than authored by an LLM phase: the
|
|
591
|
+
// structure can never be malformed, no judgment is spent on a mechanical
|
|
592
|
+
// restructuring, and a weak model is never asked to emit it from scratch.
|
|
593
|
+
// Mirrors the cyclic_seam no-cycles fast path — write the artifact, then
|
|
594
|
+
// re-derive the next phase.
|
|
595
|
+
if (nextPhase === "obligation_ledger") {
|
|
596
|
+
const finalizedPayload = envelopePayload(await readContractArtifact(artifactsDir, "finalized_module_contracts"));
|
|
597
|
+
const ledger = deriveObligationLedger(finalizedPayload);
|
|
598
|
+
await writeContractArtifact(artifactsDir, "obligation_ledger", ledger);
|
|
599
|
+
return buildNextContractPipelineStep(options);
|
|
600
|
+
}
|
|
601
|
+
// 3. Judge gate: implementation planning is reachable only through an
|
|
602
|
+
// approved verdict, a bounded targeted repair, or the repair cap.
|
|
603
|
+
if (nextPhase === "implementation_planning") {
|
|
604
|
+
const gate = await evaluateJudgeGate(artifactsDir);
|
|
605
|
+
if (gate.kind === "repair") {
|
|
606
|
+
const repairTarget = gate.directive.target;
|
|
607
|
+
const repairState = await readRepairState(artifactsDir);
|
|
608
|
+
if (!repairState.repairs.some((r) => r.judge_hash === gate.judgeHash)) {
|
|
609
|
+
repairState.repairs.push({
|
|
610
|
+
judge_hash: gate.judgeHash,
|
|
611
|
+
target: repairTarget,
|
|
612
|
+
at: new Date().toISOString(),
|
|
613
|
+
});
|
|
614
|
+
await writeRepairState(artifactsDir, repairState);
|
|
615
|
+
}
|
|
616
|
+
const rendered = renderContractRepairPrompt({
|
|
617
|
+
target: repairTarget,
|
|
618
|
+
instruction: gate.directive.instruction,
|
|
619
|
+
artifactPaths,
|
|
620
|
+
repoRoot: root,
|
|
621
|
+
});
|
|
622
|
+
return buildStep({
|
|
623
|
+
prompt: rendered.prompt,
|
|
624
|
+
outputPath: rendered.outputPath,
|
|
625
|
+
stopCondition: `Stop after rewriting "${repairTarget}" per the judge repair directive and running next-step.`,
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
if (gate.kind === "proceed_residual") {
|
|
629
|
+
return buildPhaseStep("implementation_planning", `## Repair Cap Reached — Residual Risks
|
|
630
|
+
|
|
631
|
+
${gate.note}
|
|
632
|
+
`);
|
|
633
|
+
}
|
|
634
|
+
// gate.kind === "proceed": fall through to the normal phase step below.
|
|
635
|
+
}
|
|
636
|
+
// 4. All phases exist: enforce traceability + referential integrity, then
|
|
637
|
+
// convert the implementation_dag to an extracted plan.
|
|
638
|
+
if (!nextPhase) {
|
|
639
|
+
// 4a. DAG referential integrity + bidirectional coverage (ARC-86b18f1b-2).
|
|
640
|
+
// Run before the traceability check so specific referential violations
|
|
641
|
+
// are reported first (traceability is a superset check).
|
|
642
|
+
const dagPayload = envelopePayload(await readContractArtifact(artifactsDir, "implementation_dag"));
|
|
643
|
+
const ledgerPayload = envelopePayload(await readContractArtifact(artifactsDir, "obligation_ledger"));
|
|
644
|
+
const cePayload = envelopePayload(await readContractArtifact(artifactsDir, "counterexample"));
|
|
645
|
+
const judgePayload = envelopePayload(await readContractArtifact(artifactsDir, "judge_report"));
|
|
646
|
+
const integrityIssues = validateImplementationDAGIntegrity(dagPayload, ledgerPayload, cePayload, judgePayload);
|
|
647
|
+
const integrityErrors = integrityIssues.filter((i) => i.severity === "error");
|
|
648
|
+
if (integrityErrors.length > 0) {
|
|
649
|
+
const repairState = await readRepairState(artifactsDir);
|
|
650
|
+
if (repairState.dag_regenerations.length >= MAX_DAG_REGENERATION_ATTEMPTS) {
|
|
651
|
+
return writeCurrentStep({
|
|
652
|
+
stepKind: CONTRACT_STEP_KIND,
|
|
653
|
+
status: "blocked",
|
|
654
|
+
runId,
|
|
655
|
+
repoRoot: root,
|
|
656
|
+
artifactsDir,
|
|
657
|
+
prompt: `# Implementation DAG Failed Referential Integrity ${repairState.dag_regenerations.length + 1} Times
|
|
658
|
+
|
|
659
|
+
The implementation_dag repeatedly contains referential integrity or coverage violations:
|
|
660
|
+
|
|
661
|
+
${integrityErrors.map((i) => `- [${i.path}] ${i.message}`).join("\n")}
|
|
662
|
+
|
|
663
|
+
Report this to the user and stop. The contract pipeline cannot promote a plan with integrity violations; the run needs a corrected implementation_dag or obligation_ledger.
|
|
664
|
+
`,
|
|
665
|
+
allowedCommands: [],
|
|
666
|
+
stopCondition: "Stop after reporting the integrity failure to the user.",
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
repairState.dag_regenerations.push({
|
|
670
|
+
violations: integrityErrors.map((i) => i.message),
|
|
671
|
+
at: new Date().toISOString(),
|
|
672
|
+
});
|
|
673
|
+
await writeRepairState(artifactsDir, repairState);
|
|
674
|
+
await archiveContractArtifact(artifactsDir, "implementation_dag", "invalid");
|
|
675
|
+
return buildPhaseStep("implementation_planning", `## Referential Integrity Errors From the Previous Attempt
|
|
676
|
+
|
|
677
|
+
The previous implementation_dag was rejected and archived due to referential integrity violations. Fix every issue below:
|
|
678
|
+
|
|
679
|
+
${integrityErrors.map((i) => `- [${i.path}] ${i.message}`).join("\n")}
|
|
680
|
+
`);
|
|
681
|
+
}
|
|
682
|
+
const traceability = await validateImplementationDagTraceability(artifactsDir);
|
|
683
|
+
if (!traceability.ok) {
|
|
684
|
+
const repairState = await readRepairState(artifactsDir);
|
|
685
|
+
if (repairState.dag_regenerations.length >= MAX_DAG_REGENERATION_ATTEMPTS) {
|
|
686
|
+
return writeCurrentStep({
|
|
687
|
+
stepKind: CONTRACT_STEP_KIND,
|
|
688
|
+
status: "blocked",
|
|
689
|
+
runId,
|
|
690
|
+
repoRoot: root,
|
|
691
|
+
artifactsDir,
|
|
692
|
+
prompt: `# Implementation DAG Failed Traceability ${repairState.dag_regenerations.length + 1} Times
|
|
693
|
+
|
|
694
|
+
The implementation_dag repeatedly contains nodes that trace to no obligation and no judge-accepted counterexample:
|
|
695
|
+
|
|
696
|
+
${traceability.violations.map((v) => `- ${v}`).join("\n")}
|
|
697
|
+
|
|
698
|
+
Report this to the user and stop. The contract pipeline cannot promote an untraceable plan; the run needs a corrected goal/design or manual intervention.
|
|
699
|
+
`,
|
|
700
|
+
allowedCommands: [],
|
|
701
|
+
stopCondition: "Stop after reporting the traceability failure to the user.",
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
repairState.dag_regenerations.push({
|
|
705
|
+
violations: traceability.violations,
|
|
706
|
+
at: new Date().toISOString(),
|
|
707
|
+
});
|
|
708
|
+
await writeRepairState(artifactsDir, repairState);
|
|
709
|
+
await archiveContractArtifact(artifactsDir, "implementation_dag", "invalid");
|
|
710
|
+
return buildPhaseStep("implementation_planning", `## Traceability Errors From the Previous Attempt
|
|
711
|
+
|
|
712
|
+
The previous implementation_dag was rejected and archived. Every node must trace to at least one obligation from the obligation ledger or one judge-accepted counterexample:
|
|
713
|
+
|
|
714
|
+
${traceability.violations.map((v) => `- ${v}`).join("\n")}
|
|
715
|
+
`);
|
|
716
|
+
}
|
|
717
|
+
// 4c. Contract-obligations promotion gates (CP-BLOCK-N-contract-obligations):
|
|
718
|
+
// fail-closed cross-artifact checks that must pass before a plan is
|
|
719
|
+
// promoted — paired obligations, evidence threading, source-scoped
|
|
720
|
+
// digest coverage, and INV-CO-12 reconciliation derivation. Reuses the
|
|
721
|
+
// dag_regenerations cap: bounded re-emit of implementation_planning, then
|
|
722
|
+
// blocked. These are the invariants that keep the workflow correct
|
|
723
|
+
// regardless of host strength, so they are enforced here, never left to
|
|
724
|
+
// host discretion.
|
|
725
|
+
const obligationGate = await evaluateContractObligationsPromotionGate(artifactsDir);
|
|
726
|
+
if (!obligationGate.ok) {
|
|
727
|
+
const repairState = await readRepairState(artifactsDir);
|
|
728
|
+
if (repairState.dag_regenerations.length >= MAX_DAG_REGENERATION_ATTEMPTS) {
|
|
729
|
+
return writeCurrentStep({
|
|
730
|
+
stepKind: CONTRACT_STEP_KIND,
|
|
731
|
+
status: "blocked",
|
|
732
|
+
runId,
|
|
733
|
+
repoRoot: root,
|
|
734
|
+
artifactsDir,
|
|
735
|
+
prompt: `# Contract-Obligation Gates Failed ${repairState.dag_regenerations.length + 1} Times
|
|
736
|
+
|
|
737
|
+
The contract-obligation promotion gates repeatedly failed and the plan cannot be promoted:
|
|
738
|
+
|
|
739
|
+
${obligationGate.violations.map((v) => `- ${v}`).join("\n")}
|
|
740
|
+
|
|
741
|
+
Report this to the user and stop. The contract pipeline cannot promote a plan that drops obligation coverage, evidence, or a reconciled seam; the run needs a corrected obligation_ledger, test_validator_plan, finalized_module_contracts, or implementation_dag.
|
|
742
|
+
`,
|
|
743
|
+
allowedCommands: [],
|
|
744
|
+
stopCondition: "Stop after reporting the contract-obligation gate failure to the user.",
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
repairState.dag_regenerations.push({
|
|
748
|
+
violations: obligationGate.violations,
|
|
749
|
+
at: new Date().toISOString(),
|
|
750
|
+
});
|
|
751
|
+
await writeRepairState(artifactsDir, repairState);
|
|
752
|
+
await archiveContractArtifact(artifactsDir, "implementation_dag", "invalid");
|
|
753
|
+
return buildPhaseStep("implementation_planning", `## Contract-Obligation Gate Errors From the Previous Attempt
|
|
754
|
+
|
|
755
|
+
The previous implementation_dag (and/or upstream contract artifacts) failed the fail-closed contract-obligation gates. Fix every issue below before the plan can be promoted:
|
|
756
|
+
|
|
757
|
+
${obligationGate.violations.map((v) => `- ${v}`).join("\n")}
|
|
758
|
+
`);
|
|
759
|
+
}
|
|
760
|
+
await promoteImplementationDagToExtractedPlan(artifactsDir);
|
|
761
|
+
return null;
|
|
762
|
+
}
|
|
763
|
+
// 5a. Cyclic-seam resolution gate: runs after obligation_ledger is present and
|
|
764
|
+
// before assessment. Detects circular interface-definition obligations in
|
|
765
|
+
// the DAG of module contracts, then routes to an LLM resolution step when
|
|
766
|
+
// cycles are found. The resolution is re-checked by the same detector
|
|
767
|
+
// before being accepted. Cap: MAX_CYCLIC_SEAM_RESOLUTION_ATTEMPTS; on
|
|
768
|
+
// exhaustion, route to a user-decision step (then blocked if unresolved).
|
|
769
|
+
if (nextPhase === "cyclic_seam_resolution") {
|
|
770
|
+
const obligationLedgerPayload = envelopePayload(await readContractArtifact(artifactsDir, "obligation_ledger"));
|
|
771
|
+
// Build seam-obligation graph from obligation ledger: each obligation whose
|
|
772
|
+
// depends_on references other obligation IDs forms a seam-obligation node.
|
|
773
|
+
const obligationIds = new Set((obligationLedgerPayload?.obligations ?? []).map((o) => o.id));
|
|
774
|
+
const seamNodes = (obligationLedgerPayload?.obligations ?? []).map((obl) => ({
|
|
775
|
+
id: obl.id,
|
|
776
|
+
needs: (obl.depends_on ?? []).filter((dep) => obligationIds.has(dep)),
|
|
777
|
+
}));
|
|
778
|
+
const detectedCycles = detectCyclicSeamObligations(seamNodes);
|
|
779
|
+
const ledgerEnvelope = await readContractArtifact(artifactsDir, "obligation_ledger");
|
|
780
|
+
const ledgerHash = ledgerEnvelope?.content_hash ?? "unknown";
|
|
781
|
+
if (detectedCycles.length === 0) {
|
|
782
|
+
// No cycles — write the no_cycles artifact and let the pipeline proceed.
|
|
783
|
+
await writeContractArtifact(artifactsDir, "cyclic_seam_resolution", {
|
|
784
|
+
contract_version: "remediate-code-contract-pipeline/cyclic-seam-resolution/v1alpha1",
|
|
785
|
+
goal_id: obligationLedgerPayload?.goal_id ?? "",
|
|
786
|
+
cycles: [],
|
|
787
|
+
status: "no_cycles",
|
|
788
|
+
created_at: new Date().toISOString(),
|
|
789
|
+
});
|
|
790
|
+
// Re-derive next phase now that the artifact is written.
|
|
791
|
+
return buildNextContractPipelineStep(options);
|
|
792
|
+
}
|
|
793
|
+
// Cycles detected — check repair state.
|
|
794
|
+
const repairState = await readCyclicSeamRepairState(artifactsDir);
|
|
795
|
+
const attemptsForLedger = repairState.attempts.filter((a) => a.ledger_hash === ledgerHash);
|
|
796
|
+
// Check whether the existing cyclic_seam_resolution artifact (if any) has
|
|
797
|
+
// a re-check that passed — in that case the cycle is resolved; write the
|
|
798
|
+
// resolved artifact and proceed.
|
|
799
|
+
const existingResolution = envelopePayload(await readContractArtifact(artifactsDir, "cyclic_seam_resolution"));
|
|
800
|
+
if (existingResolution &&
|
|
801
|
+
(existingResolution.status === "resolved" ||
|
|
802
|
+
existingResolution.status === "no_cycles")) {
|
|
803
|
+
// The cyclic_seam_resolution artifact is already present and marked
|
|
804
|
+
// resolved/no_cycles — this branch should not normally be reached (the
|
|
805
|
+
// artifact exists so nextMissingContractPhase skips it), but guard anyway.
|
|
806
|
+
return buildNextContractPipelineStep(options);
|
|
807
|
+
}
|
|
808
|
+
if (attemptsForLedger.length >= MAX_CYCLIC_SEAM_RESOLUTION_ATTEMPTS &&
|
|
809
|
+
!repairState.user_decision_emitted) {
|
|
810
|
+
// Cap exhausted — emit user-decision step.
|
|
811
|
+
repairState.user_decision_emitted = true;
|
|
812
|
+
await writeCyclicSeamRepairState(artifactsDir, repairState);
|
|
813
|
+
const cycleDescriptions = detectedCycles
|
|
814
|
+
.map((c, i) => `Cycle ${i + 1}: [${c.members.join(", ")}]`)
|
|
815
|
+
.join("\n");
|
|
816
|
+
return writeCurrentStep({
|
|
817
|
+
stepKind: CONTRACT_STEP_KIND,
|
|
818
|
+
status: "blocked",
|
|
819
|
+
runId,
|
|
820
|
+
repoRoot: root,
|
|
821
|
+
artifactsDir,
|
|
822
|
+
prompt: `# Cyclic Seam Resolution — User Decision Required
|
|
823
|
+
|
|
824
|
+
The automatic cycle-break resolution reached its cap (${MAX_CYCLIC_SEAM_RESOLUTION_ATTEMPTS} attempt(s)) without producing a valid cycle-free obligation graph. The following obligation cycles remain unresolved:
|
|
825
|
+
|
|
826
|
+
${cycleDescriptions}
|
|
827
|
+
|
|
828
|
+
**Choose one of the two sanctioned break strategies per cycle:**
|
|
829
|
+
|
|
830
|
+
1. **Mediator module** — Introduce a third obligation/module that both sides depend on. The mediator owns the shared primitive; neither original module defines an interface for the other.
|
|
831
|
+
2. **Single authority** — Designate one obligation/module as the definitive owner of the co-defined interface. The other becomes a consumer only. This is recorded as a named, scoped exception.
|
|
832
|
+
|
|
833
|
+
To proceed, manually rewrite \`${join(cpDir, "obligation_ledger.json")}\` so that no circular \`depends_on\` references exist, then delete \`${join(cpDir, "cyclic_seam_resolution.json")}\` and \`${cyclicSeamRepairStatePath(artifactsDir)}\` and re-run next-step.
|
|
834
|
+
|
|
835
|
+
If you choose to stop instead, this run will remain blocked.
|
|
836
|
+
`,
|
|
837
|
+
allowedCommands: [],
|
|
838
|
+
stopCondition: "Stop after presenting the user-decision prompt. Do not attempt further resolution.",
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
if (attemptsForLedger.length >= MAX_CYCLIC_SEAM_RESOLUTION_ATTEMPTS &&
|
|
842
|
+
repairState.user_decision_emitted) {
|
|
843
|
+
// User decision was emitted but cycles are still present — blocked.
|
|
844
|
+
const cycleDescriptions = detectedCycles
|
|
845
|
+
.map((c, i) => `Cycle ${i + 1}: [${c.members.join(", ")}]`)
|
|
846
|
+
.join("\n");
|
|
847
|
+
return writeCurrentStep({
|
|
848
|
+
stepKind: CONTRACT_STEP_KIND,
|
|
849
|
+
status: "blocked",
|
|
850
|
+
runId,
|
|
851
|
+
repoRoot: root,
|
|
852
|
+
artifactsDir,
|
|
853
|
+
prompt: `# Cyclic Seam Resolution — Blocked
|
|
854
|
+
|
|
855
|
+
Cycles in the obligation graph remain unresolved after the automatic cap and a user-decision step. The run cannot proceed without manual intervention.
|
|
856
|
+
|
|
857
|
+
${cycleDescriptions}
|
|
858
|
+
|
|
859
|
+
Manually rewrite the obligation_ledger to remove circular depends_on references, delete the cyclic_seam_resolution artifact and cyclic-seam-repair-state.json, and re-run next-step.
|
|
860
|
+
`,
|
|
861
|
+
allowedCommands: [],
|
|
862
|
+
stopCondition: "Stop — the run is blocked on cyclic seam resolution.",
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
// Emit the LLM cyclic-seam-resolution step.
|
|
866
|
+
const cycleDescriptions = detectedCycles
|
|
867
|
+
.map((c, i) => `Cycle ${i + 1}: [${c.members.join(", ")}]`)
|
|
868
|
+
.join("\n");
|
|
869
|
+
const outputPath = join(cpDir, "cyclic_seam_resolution.json");
|
|
870
|
+
const nextCommand = loaderCommand("next-step");
|
|
871
|
+
repairState.attempts.push({
|
|
872
|
+
ledger_hash: ledgerHash,
|
|
873
|
+
at: new Date().toISOString(),
|
|
874
|
+
recheck_passed: false,
|
|
875
|
+
});
|
|
876
|
+
await writeCyclicSeamRepairState(artifactsDir, repairState);
|
|
877
|
+
return buildStep({
|
|
878
|
+
prompt: `# Cyclic Seam Resolution
|
|
879
|
+
|
|
880
|
+
Circular interface-definition obligations were detected in the obligation ledger. You must resolve every cycle using one of the two sanctioned strategies below, then write the resolution record.
|
|
881
|
+
|
|
882
|
+
## Detected Cycles
|
|
883
|
+
|
|
884
|
+
${cycleDescriptions}
|
|
885
|
+
|
|
886
|
+
## Sanctioned Break Strategies
|
|
887
|
+
|
|
888
|
+
For each cycle, choose one:
|
|
889
|
+
|
|
890
|
+
1. **Mediator module** — Introduce a third obligation/module that both sides depend on. The mediator owns the shared primitive; neither original module defines an interface for the other.
|
|
891
|
+
2. **Single authority** — Designate one side as the definitive owner of the interface. The other becomes a consumer only. Record this as an explicit, scoped exception.
|
|
892
|
+
|
|
893
|
+
## Required Inputs
|
|
894
|
+
|
|
895
|
+
- \`${join(cpDir, "obligation_ledger.json")}\` (obligation_ledger)
|
|
896
|
+
|
|
897
|
+
## Your Task
|
|
898
|
+
|
|
899
|
+
Read the obligation_ledger. For each detected cycle, decide which break strategy to apply, verify mentally that the break does not re-introduce a cycle, then write the resolution record to exactly:
|
|
900
|
+
|
|
901
|
+
\`${outputPath}\`
|
|
902
|
+
|
|
903
|
+
\`\`\`json
|
|
904
|
+
{
|
|
905
|
+
"contract_version": "remediate-code-contract-pipeline/cyclic-seam-resolution/v1alpha1",
|
|
906
|
+
"goal_id": "<from obligation_ledger>",
|
|
907
|
+
"cycles": [
|
|
908
|
+
{
|
|
909
|
+
"members": ["<obligation-id>", "..."],
|
|
910
|
+
"break_strategy": "mediator | single_authority",
|
|
911
|
+
"resolution_description": "<what was changed and why>",
|
|
912
|
+
"exception_registration": "<if single_authority: the named scoped exception; otherwise null>"
|
|
913
|
+
}
|
|
914
|
+
],
|
|
915
|
+
"status": "resolved",
|
|
916
|
+
"created_at": "<ISO-8601>"
|
|
917
|
+
}
|
|
918
|
+
\`\`\`
|
|
919
|
+
|
|
920
|
+
If after analysis you find the cycles are already broken (e.g. upon re-reading the ledger the depends_on edges do not actually form a cycle), set status to "no_cycles" and cycles to [].
|
|
921
|
+
|
|
922
|
+
**Stop after writing the output file.** Do not edit source files. Do not advance to the next pipeline step.
|
|
923
|
+
|
|
924
|
+
After writing the output file, run:
|
|
925
|
+
|
|
926
|
+
\`${nextCommand}\`
|
|
927
|
+
`,
|
|
928
|
+
outputPath,
|
|
929
|
+
stopCondition: 'Stop after writing the cyclic_seam_resolution output file and running next-step.',
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
// 5b. Cyclic-seam re-check: after the LLM writes the cyclic_seam_resolution
|
|
933
|
+
// artifact (status=resolved or no_cycles), verify the proposed break does
|
|
934
|
+
// not re-introduce a cycle. If it does, archive and re-emit the resolution
|
|
935
|
+
// step. This check runs as part of the ingestion/staleness pass — the
|
|
936
|
+
// artifact is validated structurally by the validator; here we run the
|
|
937
|
+
// graph re-check on the cycles array to confirm the break is sound.
|
|
938
|
+
// (Note: this pass runs only when cyclic_seam_resolution already exists
|
|
939
|
+
// and nextPhase is NOT cyclic_seam_resolution — i.e. the artifact was just
|
|
940
|
+
// ingested. We do a soft re-check here; if the break re-introduces a cycle,
|
|
941
|
+
// archive and loop back.)
|
|
942
|
+
{
|
|
943
|
+
const resolutionEnvelope = await readContractArtifact(artifactsDir, "cyclic_seam_resolution");
|
|
944
|
+
if (resolutionEnvelope) {
|
|
945
|
+
const resolution = envelopePayload(resolutionEnvelope);
|
|
946
|
+
if (resolution &&
|
|
947
|
+
resolution.status === "resolved" &&
|
|
948
|
+
Array.isArray(resolution.cycles) &&
|
|
949
|
+
resolution.cycles.length > 0) {
|
|
950
|
+
// Re-check: build the patched graph and verify no cycles remain.
|
|
951
|
+
const obligationLedgerPayload = envelopePayload(await readContractArtifact(artifactsDir, "obligation_ledger"));
|
|
952
|
+
const obligationIds = new Set((obligationLedgerPayload?.obligations ?? []).map((o) => o.id));
|
|
953
|
+
const seamNodes = (obligationLedgerPayload?.obligations ?? []).map((obl) => ({
|
|
954
|
+
id: obl.id,
|
|
955
|
+
needs: (obl.depends_on ?? []).filter((dep) => obligationIds.has(dep)),
|
|
956
|
+
}));
|
|
957
|
+
// For each cycle in the resolution, apply the stated break and re-check.
|
|
958
|
+
let recheckFailed = false;
|
|
959
|
+
for (const cycleRecord of resolution.cycles) {
|
|
960
|
+
if (!Array.isArray(cycleRecord.members))
|
|
961
|
+
continue;
|
|
962
|
+
const members = cycleRecord.members;
|
|
963
|
+
const mediatorId = cycleRecord.break_strategy === "mediator"
|
|
964
|
+
? `_mediator_${members.join("_")}`
|
|
965
|
+
: null;
|
|
966
|
+
const validationResult = validateCycleBreak({ members }, seamNodes, mediatorId
|
|
967
|
+
? { id: mediatorId, needs: [] }
|
|
968
|
+
: // single_authority: the designated owner keeps all edges;
|
|
969
|
+
// non-owner loses edges to cycle members — model as mediator=no-op.
|
|
970
|
+
{ id: `_authority_${members.join("_")}`, needs: [] });
|
|
971
|
+
if (!validationResult.accepted) {
|
|
972
|
+
recheckFailed = true;
|
|
973
|
+
break;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
if (recheckFailed) {
|
|
977
|
+
const ledgerEnvelope = await readContractArtifact(artifactsDir, "obligation_ledger");
|
|
978
|
+
const ledgerHash = ledgerEnvelope?.content_hash ?? "unknown";
|
|
979
|
+
const repairState = await readCyclicSeamRepairState(artifactsDir);
|
|
980
|
+
// Mark the last attempt as recheck_failed.
|
|
981
|
+
const last = repairState.attempts.at(-1);
|
|
982
|
+
if (last && last.ledger_hash === ledgerHash) {
|
|
983
|
+
last.recheck_passed = false;
|
|
984
|
+
}
|
|
985
|
+
await writeCyclicSeamRepairState(artifactsDir, repairState);
|
|
986
|
+
await archiveContractArtifact(artifactsDir, "cyclic_seam_resolution", "invalid");
|
|
987
|
+
// Re-enter to emit the next attempt or cap.
|
|
988
|
+
return buildNextContractPipelineStep(options);
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
// 5. Design-spec structural gates: run deterministic checks on the
|
|
994
|
+
// finalized_module_contracts (the "design" artifact) and obligation_ledger
|
|
995
|
+
// before emitting the adversarial critic phase. Error-severity gate failures
|
|
996
|
+
// re-emit the contract_finalization (design) phase so the worker can fix the
|
|
997
|
+
// structural issues before adversarial review begins. Warning-only results
|
|
998
|
+
// (e.g. circular obligation dependencies → N-R21) are appended as an
|
|
999
|
+
// advisory section to the critic prompt so the critic can take them into account.
|
|
1000
|
+
if (nextPhase === "critic") {
|
|
1001
|
+
// 5a. Design-spec structural gates on the finalized_module_contracts (the
|
|
1002
|
+
// "design" artifact) + obligation_ledger run first: a malformed design
|
|
1003
|
+
// artifact (error) re-emits the design phase, and a circular-obligation
|
|
1004
|
+
// dependency (warning) is appended to the critic prompt as advisory.
|
|
1005
|
+
const finalizedModuleContractsPayload = envelopePayload(await readContractArtifact(artifactsDir, "finalized_module_contracts"));
|
|
1006
|
+
const obligationLedgerPayload = envelopePayload(await readContractArtifact(artifactsDir, "obligation_ledger"));
|
|
1007
|
+
const gateIssues = validateDesignSpecGates(finalizedModuleContractsPayload, obligationLedgerPayload);
|
|
1008
|
+
const gateErrors = gateIssues.filter((issue) => issue.severity === "error");
|
|
1009
|
+
const gateWarnings = gateIssues.filter((issue) => issue.severity === "warning");
|
|
1010
|
+
if (gateErrors.length > 0) {
|
|
1011
|
+
// Re-emit the contract_finalization (design) phase with gate errors appended.
|
|
1012
|
+
const errorLines = gateErrors
|
|
1013
|
+
.map((issue) => `- [${issue.path}] ${issue.message}`)
|
|
1014
|
+
.join("\n");
|
|
1015
|
+
return buildPhaseStep("contract_finalization", `## Design Structural Gate Errors
|
|
1016
|
+
|
|
1017
|
+
The contract_finalization output failed deterministic structural gates. Fix every issue below before adversarial review can begin:
|
|
1018
|
+
|
|
1019
|
+
${errorLines}
|
|
1020
|
+
`);
|
|
1021
|
+
}
|
|
1022
|
+
if (gateWarnings.length > 0) {
|
|
1023
|
+
const warningLines = gateWarnings
|
|
1024
|
+
.map((issue) => `- [${issue.path}] ${issue.message}`)
|
|
1025
|
+
.join("\n");
|
|
1026
|
+
return buildPhaseStep("critic", `## Advisory: Design Structural Warnings
|
|
1027
|
+
|
|
1028
|
+
The following structural issues were detected and should inform your adversarial review. They do not block the pipeline but may indicate areas of design fragility:
|
|
1029
|
+
|
|
1030
|
+
${warningLines}
|
|
1031
|
+
`);
|
|
1032
|
+
}
|
|
1033
|
+
// 5b. Pre-adversarial structural floor (S5): once the design artifact itself
|
|
1034
|
+
// is clean, run the cheap cross-artifact checks whose inputs all exist by
|
|
1035
|
+
// the critic phase (paired-obligation coverage, source-scoped digest
|
|
1036
|
+
// coverage, seam reconciliation derivation) so the adversarial loop only
|
|
1037
|
+
// ever sees structurally-sound obligations/tests/contracts, and a gap is
|
|
1038
|
+
// re-emitted to the precise responsible phase instead of being discovered
|
|
1039
|
+
// at promotion after the adversarial budget is spent. evaluateContract
|
|
1040
|
+
// ObligationsPromotionGate stays the fail-closed backstop at promotion.
|
|
1041
|
+
const preCriticGate = await evaluatePreCriticStructuralGate(artifactsDir);
|
|
1042
|
+
if (preCriticGate) {
|
|
1043
|
+
return buildPhaseStep(preCriticGate.phase, `## Pre-Adversarial Structural Gate Errors
|
|
1044
|
+
|
|
1045
|
+
The ${preCriticGate.phase} output failed deterministic structural gates. Fix every issue below before adversarial review begins:
|
|
1046
|
+
|
|
1047
|
+
${preCriticGate.errorLines.join("\n")}
|
|
1048
|
+
`);
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
// Parallel-capable phases: module_contract_drafting and contract_finalization
|
|
1052
|
+
// both benefit from parallel per-module dispatch.
|
|
1053
|
+
if (nextPhase === "module_contract_drafting" || nextPhase === "contract_finalization") {
|
|
1054
|
+
return buildParallelModuleWaveStep(nextPhase);
|
|
1055
|
+
}
|
|
1056
|
+
// Skeleton-scaffolded phases (S3): the tool pre-fills structure/ids from the
|
|
1057
|
+
// derived obligation ledger so the worker fills only the judgment slots.
|
|
1058
|
+
if (nextPhase === "test_validator_plan" || nextPhase === "implementation_planning") {
|
|
1059
|
+
const scaffold = await buildScaffoldSection(nextPhase, artifactsDir);
|
|
1060
|
+
return buildPhaseStep(nextPhase, scaffold);
|
|
1061
|
+
}
|
|
1062
|
+
// Diff-based re-review (B2): when a verdict-bearing review phase is re-emitted
|
|
1063
|
+
// because an upstream changed, hand the worker its prior verdict + the precise
|
|
1064
|
+
// changed-since-last-review delta so it re-affirms cheaply or revises only the
|
|
1065
|
+
// affected items — never a blind full re-run. The section appears only when a
|
|
1066
|
+
// prior snapshot exists (i.e. this is a re-review, not first authoring).
|
|
1067
|
+
const reReviewSection = await buildReReviewSection(nextPhase, artifactsDir);
|
|
1068
|
+
return buildPhaseStep(nextPhase, reReviewSection);
|
|
1069
|
+
}
|
|
1070
|
+
/**
|
|
1071
|
+
* Build the diff-based re-review section for a review phase being re-emitted after
|
|
1072
|
+
* staleness, or undefined when this is not a re-review (non-review phase, or no
|
|
1073
|
+
* prior snapshot). See `reviewSnapshot.ts`.
|
|
1074
|
+
*/
|
|
1075
|
+
async function buildReReviewSection(phase, artifactsDir) {
|
|
1076
|
+
const artifact = PHASE_TO_ARTIFACT[phase];
|
|
1077
|
+
if (!artifact || !isReviewArtifact(artifact))
|
|
1078
|
+
return undefined;
|
|
1079
|
+
if (!reviewSnapshotExists(artifactsDir, artifact))
|
|
1080
|
+
return undefined;
|
|
1081
|
+
const snapshot = await readReviewSnapshot(artifactsDir, artifact);
|
|
1082
|
+
if (!snapshot)
|
|
1083
|
+
return undefined;
|
|
1084
|
+
const delta = await computeReReviewDelta(artifactsDir, artifact, snapshot);
|
|
1085
|
+
return renderReReviewSection(artifact, snapshot, delta);
|
|
1086
|
+
}
|
|
1087
|
+
/** Priority order: higher index = higher priority (invariant is highest). */
|
|
1088
|
+
const OBLIGATION_KIND_PRIORITY = [
|
|
1089
|
+
"test",
|
|
1090
|
+
"structural",
|
|
1091
|
+
"behavioral",
|
|
1092
|
+
"invariant",
|
|
1093
|
+
];
|
|
1094
|
+
function deriveObligationLensAndSeverity(kinds) {
|
|
1095
|
+
if (kinds.length === 0) {
|
|
1096
|
+
return { lens: "correctness", severity: "medium" };
|
|
1097
|
+
}
|
|
1098
|
+
// Pick the highest-priority kind.
|
|
1099
|
+
let topKind = kinds[0];
|
|
1100
|
+
for (const kind of kinds) {
|
|
1101
|
+
if (OBLIGATION_KIND_PRIORITY.indexOf(kind) >
|
|
1102
|
+
OBLIGATION_KIND_PRIORITY.indexOf(topKind)) {
|
|
1103
|
+
topKind = kind;
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
const lensMap = {
|
|
1107
|
+
invariant: "security",
|
|
1108
|
+
behavioral: "correctness",
|
|
1109
|
+
structural: "architecture",
|
|
1110
|
+
test: "tests",
|
|
1111
|
+
};
|
|
1112
|
+
const severityMap = {
|
|
1113
|
+
invariant: "high",
|
|
1114
|
+
behavioral: "medium",
|
|
1115
|
+
structural: "low",
|
|
1116
|
+
test: "low",
|
|
1117
|
+
};
|
|
1118
|
+
return { lens: lensMap[topKind], severity: severityMap[topKind] };
|
|
1119
|
+
}
|
|
1120
|
+
/**
|
|
1121
|
+
* Convert a completed ImplementationDAG into the extracted-plan.json format
|
|
1122
|
+
* that the existing handlePendingExtractedPlan/applyPlanPipeline path consumes.
|
|
1123
|
+
*/
|
|
1124
|
+
export async function promoteImplementationDagToExtractedPlan(artifactsDir) {
|
|
1125
|
+
const paths = intakePaths(artifactsDir);
|
|
1126
|
+
const dagEnvelope = await readContractArtifact(artifactsDir, "implementation_dag");
|
|
1127
|
+
if (!dagEnvelope)
|
|
1128
|
+
return;
|
|
1129
|
+
const dag = envelopePayload(dagEnvelope);
|
|
1130
|
+
// Load obligation_ledger for lens/severity derivation (graceful: may be absent).
|
|
1131
|
+
const ledgerPayload = envelopePayload(await readContractArtifact(artifactsDir, "obligation_ledger"));
|
|
1132
|
+
const obligationMap = new Map();
|
|
1133
|
+
if (ledgerPayload?.obligations) {
|
|
1134
|
+
for (const obl of ledgerPayload.obligations) {
|
|
1135
|
+
obligationMap.set(obl.id, obl.kind);
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
const nodes = Array.isArray(dag?.nodes) ? dag.nodes : [];
|
|
1139
|
+
const findings = nodes.map((node, index) => {
|
|
1140
|
+
const id = ensureNodeId(node.id, index);
|
|
1141
|
+
const contractObligations = [...new Set(node.satisfies_obligations ?? [])];
|
|
1142
|
+
const verificationObligations = [
|
|
1143
|
+
...new Set(node.verification_obligation_ids ?? []),
|
|
1144
|
+
];
|
|
1145
|
+
const addressedCounterexamples = [
|
|
1146
|
+
...new Set(node.addresses_counterexamples ?? []),
|
|
1147
|
+
];
|
|
1148
|
+
const obligationEvidence = [
|
|
1149
|
+
...contractObligations.map((obligationId) => `Satisfies contract obligation: ${obligationId}`),
|
|
1150
|
+
...verificationObligations.map((obligationId) => `Verifies contract obligation: ${obligationId}`),
|
|
1151
|
+
...addressedCounterexamples.map((counterexampleId) => `Addresses accepted counterexample: ${counterexampleId}`),
|
|
1152
|
+
];
|
|
1153
|
+
// Derive lens and severity from obligation kinds; fall back when ledger absent.
|
|
1154
|
+
const satisfiedKinds = contractObligations
|
|
1155
|
+
.map((id) => obligationMap.get(id))
|
|
1156
|
+
.filter((k) => k !== undefined);
|
|
1157
|
+
const { lens, severity } = deriveObligationLensAndSeverity(satisfiedKinds);
|
|
1158
|
+
return {
|
|
1159
|
+
id,
|
|
1160
|
+
title: node.title ?? node.description ?? `Contract-pipeline task ${index + 1}`,
|
|
1161
|
+
category: "General",
|
|
1162
|
+
severity,
|
|
1163
|
+
confidence: "high",
|
|
1164
|
+
lens,
|
|
1165
|
+
summary: node.description ?? node.title ?? "",
|
|
1166
|
+
// output_files (declared write scope) takes priority over files_likely_touched.
|
|
1167
|
+
// Map each path to the { path } shape that Finding.affected_files expects.
|
|
1168
|
+
affected_files: (node.output_files ?? node.files_likely_touched ?? []).map((p) => ({ path: p })),
|
|
1169
|
+
evidence: obligationEvidence.length > 0
|
|
1170
|
+
? obligationEvidence
|
|
1171
|
+
: [node.description ?? node.title ?? `Contract-pipeline task ${id}`],
|
|
1172
|
+
concrete_change: node.description ?? "",
|
|
1173
|
+
contract_goal_id: dag?.goal_id,
|
|
1174
|
+
contract_obligation_ids: contractObligations,
|
|
1175
|
+
verification_obligation_ids: verificationObligations,
|
|
1176
|
+
addresses_counterexamples: addressedCounterexamples,
|
|
1177
|
+
// Relative model rank for this node (small | standard | deep) derived from
|
|
1178
|
+
// complexity — never a model name (no-hardcoded-models invariant).
|
|
1179
|
+
model_tier: deriveNodeModelTierFromNode(node),
|
|
1180
|
+
targeted_commands: node.targeted_commands ?? [],
|
|
1181
|
+
preconditions: node.preconditions ?? [],
|
|
1182
|
+
expected_changes: node.expected_changes ?? "",
|
|
1183
|
+
};
|
|
1184
|
+
});
|
|
1185
|
+
// finding_id → { obligation_ids, node_ids } trace. Each promoted finding maps
|
|
1186
|
+
// 1:1 to a DAG node, so its node_ids are itself plus every node it depends on
|
|
1187
|
+
// (the upstream nodes whose output it builds on). obligation_ids unions the
|
|
1188
|
+
// satisfied and verification obligations. This is the auditable backward trace
|
|
1189
|
+
// from a remediation finding to the contract obligations it discharges.
|
|
1190
|
+
const nodeIdSet = new Set(nodes.map((n, i) => ensureNodeId(n.id, i)));
|
|
1191
|
+
const traceability = {};
|
|
1192
|
+
for (const [index, node] of nodes.entries()) {
|
|
1193
|
+
const id = ensureNodeId(node.id, index);
|
|
1194
|
+
const obligationIds = [
|
|
1195
|
+
...new Set([
|
|
1196
|
+
...(node.satisfies_obligations ?? []),
|
|
1197
|
+
...(node.verification_obligation_ids ?? []),
|
|
1198
|
+
]),
|
|
1199
|
+
];
|
|
1200
|
+
const dependsOn = (node.depends_on ?? []).filter((dep) => nodeIdSet.has(dep));
|
|
1201
|
+
const nodeIds = [...new Set([id, ...dependsOn])];
|
|
1202
|
+
traceability[id] = { obligation_ids: obligationIds, node_ids: nodeIds };
|
|
1203
|
+
}
|
|
1204
|
+
const blocks = nodes.map((node, index) => {
|
|
1205
|
+
const nodeId = ensureNodeId(node.id, index);
|
|
1206
|
+
const deps = (node.depends_on ?? []).map((depId) => toBlockId(depId));
|
|
1207
|
+
return {
|
|
1208
|
+
block_id: toBlockId(nodeId),
|
|
1209
|
+
items: [nodeId],
|
|
1210
|
+
// INV-remediate-pipeline-02: a block with prerequisites is never
|
|
1211
|
+
// wave-dispatched as independent — parallel_safe derives from depends_on.
|
|
1212
|
+
parallel_safe: deps.length === 0,
|
|
1213
|
+
dependencies: deps,
|
|
1214
|
+
};
|
|
1215
|
+
});
|
|
1216
|
+
const extractedPlan = {
|
|
1217
|
+
plan_id: dag?.goal_id ?? `CP-PLAN-${Date.now()}`,
|
|
1218
|
+
goal_id: dag?.goal_id,
|
|
1219
|
+
findings,
|
|
1220
|
+
blocks,
|
|
1221
|
+
// finding_id → { obligation_ids, node_ids } backward trace.
|
|
1222
|
+
traceability,
|
|
1223
|
+
project_type: "unknown",
|
|
1224
|
+
candidate_closing_actions: ["none"],
|
|
1225
|
+
source: "contract_pipeline",
|
|
1226
|
+
};
|
|
1227
|
+
await writeJsonFile(paths.extractedPlan, extractedPlan);
|
|
1228
|
+
}
|
|
1229
|
+
//# sourceMappingURL=contractPipeline.js.map
|