agentskeptic 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +342 -0
- package/dist/actionableFailure.d.ts +53 -0
- package/dist/actionableFailure.d.ts.map +1 -0
- package/dist/actionableFailure.js +424 -0
- package/dist/actionableFailure.js.map +1 -0
- package/dist/actionableFailure.partitionExhaustive.test.d.ts +2 -0
- package/dist/actionableFailure.partitionExhaustive.test.d.ts.map +1 -0
- package/dist/actionableFailure.partitionExhaustive.test.js +20 -0
- package/dist/actionableFailure.partitionExhaustive.test.js.map +1 -0
- package/dist/actionableFailure.remediationExhaustive.test.d.ts +2 -0
- package/dist/actionableFailure.remediationExhaustive.test.d.ts.map +1 -0
- package/dist/actionableFailure.remediationExhaustive.test.js +297 -0
- package/dist/actionableFailure.remediationExhaustive.test.js.map +1 -0
- package/dist/actionableFailure.test.d.ts +2 -0
- package/dist/actionableFailure.test.d.ts.map +1 -0
- package/dist/actionableFailure.test.js +211 -0
- package/dist/actionableFailure.test.js.map +1 -0
- package/dist/agentRunBundle.d.ts +24 -0
- package/dist/agentRunBundle.d.ts.map +1 -0
- package/dist/agentRunBundle.js +114 -0
- package/dist/agentRunBundle.js.map +1 -0
- package/dist/agentRunBundle.rollback.test.d.ts +2 -0
- package/dist/agentRunBundle.rollback.test.d.ts.map +1 -0
- package/dist/agentRunBundle.rollback.test.js +65 -0
- package/dist/agentRunBundle.rollback.test.js.map +1 -0
- package/dist/agentRunBundle.test.d.ts +2 -0
- package/dist/agentRunBundle.test.d.ts.map +1 -0
- package/dist/agentRunBundle.test.js +126 -0
- package/dist/agentRunBundle.test.js.map +1 -0
- package/dist/agentRunRecord.d.ts +82 -0
- package/dist/agentRunRecord.d.ts.map +1 -0
- package/dist/agentRunRecord.js +51 -0
- package/dist/agentRunRecord.js.map +1 -0
- package/dist/agentRunRecord.test.d.ts +2 -0
- package/dist/agentRunRecord.test.d.ts.map +1 -0
- package/dist/agentRunRecord.test.js +49 -0
- package/dist/agentRunRecord.test.js.map +1 -0
- package/dist/aggregate.d.ts +3 -0
- package/dist/aggregate.d.ts.map +1 -0
- package/dist/aggregate.js +36 -0
- package/dist/aggregate.js.map +1 -0
- package/dist/assurance/assurancePathArgs.d.ts +10 -0
- package/dist/assurance/assurancePathArgs.d.ts.map +1 -0
- package/dist/assurance/assurancePathArgs.js +54 -0
- package/dist/assurance/assurancePathArgs.js.map +1 -0
- package/dist/assurance/checkStale.d.ts +14 -0
- package/dist/assurance/checkStale.d.ts.map +1 -0
- package/dist/assurance/checkStale.js +48 -0
- package/dist/assurance/checkStale.js.map +1 -0
- package/dist/assurance/findRepoRoot.d.ts +6 -0
- package/dist/assurance/findRepoRoot.d.ts.map +1 -0
- package/dist/assurance/findRepoRoot.js +27 -0
- package/dist/assurance/findRepoRoot.js.map +1 -0
- package/dist/assurance/runAssurance.d.ts +24 -0
- package/dist/assurance/runAssurance.d.ts.map +1 -0
- package/dist/assurance/runAssurance.js +105 -0
- package/dist/assurance/runAssurance.js.map +1 -0
- package/dist/bundleSignatureCodes.d.ts +13 -0
- package/dist/bundleSignatureCodes.d.ts.map +1 -0
- package/dist/bundleSignatureCodes.js +12 -0
- package/dist/bundleSignatureCodes.js.map +1 -0
- package/dist/canonicalParams.d.ts +3 -0
- package/dist/canonicalParams.d.ts.map +1 -0
- package/dist/canonicalParams.js +16 -0
- package/dist/canonicalParams.js.map +1 -0
- package/dist/ciLock.d.ts +52 -0
- package/dist/ciLock.d.ts.map +1 -0
- package/dist/ciLock.js +117 -0
- package/dist/ciLock.js.map +1 -0
- package/dist/ciLockWorkflow.d.ts +4 -0
- package/dist/ciLockWorkflow.d.ts.map +1 -0
- package/dist/ciLockWorkflow.js +278 -0
- package/dist/ciLockWorkflow.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.failureExplanationInvariant.test.d.ts +2 -0
- package/dist/cli.failureExplanationInvariant.test.d.ts.map +1 -0
- package/dist/cli.failureExplanationInvariant.test.js +40 -0
- package/dist/cli.failureExplanationInvariant.test.js.map +1 -0
- package/dist/cli.js +998 -0
- package/dist/cli.js.map +1 -0
- package/dist/cliArgv.d.ts +40 -0
- package/dist/cliArgv.d.ts.map +1 -0
- package/dist/cliArgv.js +149 -0
- package/dist/cliArgv.js.map +1 -0
- package/dist/cliOperationalCodes.d.ts +65 -0
- package/dist/cliOperationalCodes.d.ts.map +1 -0
- package/dist/cliOperationalCodes.js +64 -0
- package/dist/cliOperationalCodes.js.map +1 -0
- package/dist/commercial/licensePreflight.d.ts +7 -0
- package/dist/commercial/licensePreflight.d.ts.map +1 -0
- package/dist/commercial/licensePreflight.js +95 -0
- package/dist/commercial/licensePreflight.js.map +1 -0
- package/dist/commercial/licensePreflight.test.d.ts +2 -0
- package/dist/commercial/licensePreflight.test.d.ts.map +1 -0
- package/dist/commercial/licensePreflight.test.js +123 -0
- package/dist/commercial/licensePreflight.test.js.map +1 -0
- package/dist/compare.acceptance.test.d.ts +2 -0
- package/dist/compare.acceptance.test.d.ts.map +1 -0
- package/dist/compare.acceptance.test.js +80 -0
- package/dist/compare.acceptance.test.js.map +1 -0
- package/dist/correctnessDefinition.d.ts +23 -0
- package/dist/correctnessDefinition.d.ts.map +1 -0
- package/dist/correctnessDefinition.docParity.test.d.ts +2 -0
- package/dist/correctnessDefinition.docParity.test.d.ts.map +1 -0
- package/dist/correctnessDefinition.docParity.test.js +22 -0
- package/dist/correctnessDefinition.docParity.test.js.map +1 -0
- package/dist/correctnessDefinition.js +283 -0
- package/dist/correctnessDefinition.js.map +1 -0
- package/dist/correctnessDefinitionTemplates.d.ts +70 -0
- package/dist/correctnessDefinitionTemplates.d.ts.map +1 -0
- package/dist/correctnessDefinitionTemplates.js +121 -0
- package/dist/correctnessDefinitionTemplates.js.map +1 -0
- package/dist/debug-ui/app.css +188 -0
- package/dist/debug-ui/app.js +245 -0
- package/dist/debug-ui/index.html +79 -0
- package/dist/debugCorpus.d.ts +68 -0
- package/dist/debugCorpus.d.ts.map +1 -0
- package/dist/debugCorpus.js +544 -0
- package/dist/debugCorpus.js.map +1 -0
- package/dist/debugCorpus.test.d.ts +2 -0
- package/dist/debugCorpus.test.d.ts.map +1 -0
- package/dist/debugCorpus.test.js +159 -0
- package/dist/debugCorpus.test.js.map +1 -0
- package/dist/debugFocus.d.ts +16 -0
- package/dist/debugFocus.d.ts.map +1 -0
- package/dist/debugFocus.js +51 -0
- package/dist/debugFocus.js.map +1 -0
- package/dist/debugFocus.test.d.ts +2 -0
- package/dist/debugFocus.test.d.ts.map +1 -0
- package/dist/debugFocus.test.js +43 -0
- package/dist/debugFocus.test.js.map +1 -0
- package/dist/debugPanels.d.ts +13 -0
- package/dist/debugPanels.d.ts.map +1 -0
- package/dist/debugPanels.js +113 -0
- package/dist/debugPanels.js.map +1 -0
- package/dist/debugPanels.test.d.ts +2 -0
- package/dist/debugPanels.test.d.ts.map +1 -0
- package/dist/debugPanels.test.js +204 -0
- package/dist/debugPanels.test.js.map +1 -0
- package/dist/debugPatterns.d.ts +47 -0
- package/dist/debugPatterns.d.ts.map +1 -0
- package/dist/debugPatterns.js +113 -0
- package/dist/debugPatterns.js.map +1 -0
- package/dist/debugPatterns.test.d.ts +2 -0
- package/dist/debugPatterns.test.d.ts.map +1 -0
- package/dist/debugPatterns.test.js +48 -0
- package/dist/debugPatterns.test.js.map +1 -0
- package/dist/debugRunFilters.d.ts +31 -0
- package/dist/debugRunFilters.d.ts.map +1 -0
- package/dist/debugRunFilters.js +118 -0
- package/dist/debugRunFilters.js.map +1 -0
- package/dist/debugRunFilters.test.d.ts +2 -0
- package/dist/debugRunFilters.test.d.ts.map +1 -0
- package/dist/debugRunFilters.test.js +78 -0
- package/dist/debugRunFilters.test.js.map +1 -0
- package/dist/debugRunIndex.d.ts +27 -0
- package/dist/debugRunIndex.d.ts.map +1 -0
- package/dist/debugRunIndex.js +58 -0
- package/dist/debugRunIndex.js.map +1 -0
- package/dist/debugServer.d.ts +19 -0
- package/dist/debugServer.d.ts.map +1 -0
- package/dist/debugServer.js +315 -0
- package/dist/debugServer.js.map +1 -0
- package/dist/debugServer.test.d.ts +2 -0
- package/dist/debugServer.test.d.ts.map +1 -0
- package/dist/debugServer.test.js +207 -0
- package/dist/debugServer.test.js.map +1 -0
- package/dist/discovery-payload-v1.json +75 -0
- package/dist/distributionFooter.d.ts +3 -0
- package/dist/distributionFooter.d.ts.map +1 -0
- package/dist/distributionFooter.js +3 -0
- package/dist/distributionFooter.js.map +1 -0
- package/dist/documentationCopyConsistency.test.d.ts +2 -0
- package/dist/documentationCopyConsistency.test.d.ts.map +1 -0
- package/dist/documentationCopyConsistency.test.js +94 -0
- package/dist/documentationCopyConsistency.test.js.map +1 -0
- package/dist/enforceCli.d.ts +4 -0
- package/dist/enforceCli.d.ts.map +1 -0
- package/dist/enforceCli.js +93 -0
- package/dist/enforceCli.js.map +1 -0
- package/dist/eventSequenceIntegrity.d.ts +7 -0
- package/dist/eventSequenceIntegrity.d.ts.map +1 -0
- package/dist/eventSequenceIntegrity.js +47 -0
- package/dist/eventSequenceIntegrity.js.map +1 -0
- package/dist/eventSequenceIntegrity.test.d.ts +2 -0
- package/dist/eventSequenceIntegrity.test.d.ts.map +1 -0
- package/dist/eventSequenceIntegrity.test.js +65 -0
- package/dist/eventSequenceIntegrity.test.js.map +1 -0
- package/dist/executionPathFindings.d.ts +15 -0
- package/dist/executionPathFindings.d.ts.map +1 -0
- package/dist/executionPathFindings.js +299 -0
- package/dist/executionPathFindings.js.map +1 -0
- package/dist/executionPathFindings.requirements.test.d.ts +2 -0
- package/dist/executionPathFindings.requirements.test.d.ts.map +1 -0
- package/dist/executionPathFindings.requirements.test.js +332 -0
- package/dist/executionPathFindings.requirements.test.js.map +1 -0
- package/dist/executionTrace.d.ts +13 -0
- package/dist/executionTrace.d.ts.map +1 -0
- package/dist/executionTrace.js +272 -0
- package/dist/executionTrace.js.map +1 -0
- package/dist/executionTrace.test.d.ts +2 -0
- package/dist/executionTrace.test.d.ts.map +1 -0
- package/dist/executionTrace.test.js +200 -0
- package/dist/executionTrace.test.js.map +1 -0
- package/dist/failureAnalysis.d.ts +8 -0
- package/dist/failureAnalysis.d.ts.map +1 -0
- package/dist/failureAnalysis.js +337 -0
- package/dist/failureAnalysis.js.map +1 -0
- package/dist/failureAnalysis.test.d.ts +2 -0
- package/dist/failureAnalysis.test.d.ts.map +1 -0
- package/dist/failureAnalysis.test.js +196 -0
- package/dist/failureAnalysis.test.js.map +1 -0
- package/dist/failureCatalog.d.ts +26 -0
- package/dist/failureCatalog.d.ts.map +1 -0
- package/dist/failureCatalog.js +51 -0
- package/dist/failureCatalog.js.map +1 -0
- package/dist/failureCatalog.test.d.ts +2 -0
- package/dist/failureCatalog.test.d.ts.map +1 -0
- package/dist/failureCatalog.test.js +25 -0
- package/dist/failureCatalog.test.js.map +1 -0
- package/dist/failureExplanation.d.ts +52 -0
- package/dist/failureExplanation.d.ts.map +1 -0
- package/dist/failureExplanation.failureAnalysisMock.test.d.ts +2 -0
- package/dist/failureExplanation.failureAnalysisMock.test.d.ts.map +1 -0
- package/dist/failureExplanation.failureAnalysisMock.test.js +200 -0
- package/dist/failureExplanation.failureAnalysisMock.test.js.map +1 -0
- package/dist/failureExplanation.golden.test.d.ts +2 -0
- package/dist/failureExplanation.golden.test.d.ts.map +1 -0
- package/dist/failureExplanation.golden.test.js +530 -0
- package/dist/failureExplanation.golden.test.js.map +1 -0
- package/dist/failureExplanation.js +389 -0
- package/dist/failureExplanation.js.map +1 -0
- package/dist/failureExplanationDocumentationParity.test.d.ts +2 -0
- package/dist/failureExplanationDocumentationParity.test.d.ts.map +1 -0
- package/dist/failureExplanationDocumentationParity.test.js +56 -0
- package/dist/failureExplanationDocumentationParity.test.js.map +1 -0
- package/dist/failureOriginCatalog.d.ts +30 -0
- package/dist/failureOriginCatalog.d.ts.map +1 -0
- package/dist/failureOriginCatalog.js +106 -0
- package/dist/failureOriginCatalog.js.map +1 -0
- package/dist/failureOriginCatalog.test.d.ts +2 -0
- package/dist/failureOriginCatalog.test.d.ts.map +1 -0
- package/dist/failureOriginCatalog.test.js +17 -0
- package/dist/failureOriginCatalog.test.js.map +1 -0
- package/dist/failureOriginSchemaEnum.test.d.ts +2 -0
- package/dist/failureOriginSchemaEnum.test.d.ts.map +1 -0
- package/dist/failureOriginSchemaEnum.test.js +21 -0
- package/dist/failureOriginSchemaEnum.test.js.map +1 -0
- package/dist/failureOriginSchemaParity.test.d.ts +2 -0
- package/dist/failureOriginSchemaParity.test.d.ts.map +1 -0
- package/dist/failureOriginSchemaParity.test.js +33 -0
- package/dist/failureOriginSchemaParity.test.js.map +1 -0
- package/dist/failureOriginTypes.d.ts +4 -0
- package/dist/failureOriginTypes.d.ts.map +1 -0
- package/dist/failureOriginTypes.generated.d.ts +4 -0
- package/dist/failureOriginTypes.generated.d.ts.map +1 -0
- package/dist/failureOriginTypes.generated.js +10 -0
- package/dist/failureOriginTypes.generated.js.map +1 -0
- package/dist/failureOriginTypes.js +3 -0
- package/dist/failureOriginTypes.js.map +1 -0
- package/dist/generated/commercialBuildFlags.d.ts +4 -0
- package/dist/generated/commercialBuildFlags.d.ts.map +1 -0
- package/dist/generated/commercialBuildFlags.js +5 -0
- package/dist/generated/commercialBuildFlags.js.map +1 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/jsonPointer.d.ts +3 -0
- package/dist/jsonPointer.d.ts.map +1 -0
- package/dist/jsonPointer.js +28 -0
- package/dist/jsonPointer.js.map +1 -0
- package/dist/jsonStableStringify.d.ts +3 -0
- package/dist/jsonStableStringify.d.ts.map +1 -0
- package/dist/jsonStableStringify.js +3 -0
- package/dist/jsonStableStringify.js.map +1 -0
- package/dist/loadEvents.d.ts +3 -0
- package/dist/loadEvents.d.ts.map +1 -0
- package/dist/loadEvents.eventFileAggregateCounts.test.d.ts +2 -0
- package/dist/loadEvents.eventFileAggregateCounts.test.d.ts.map +1 -0
- package/dist/loadEvents.eventFileAggregateCounts.test.js +18 -0
- package/dist/loadEvents.eventFileAggregateCounts.test.js.map +1 -0
- package/dist/loadEvents.js +85 -0
- package/dist/loadEvents.js.map +1 -0
- package/dist/multiEffectRollup.d.ts +43 -0
- package/dist/multiEffectRollup.d.ts.map +1 -0
- package/dist/multiEffectRollup.js +164 -0
- package/dist/multiEffectRollup.js.map +1 -0
- package/dist/multiEffectRollup.test.d.ts +2 -0
- package/dist/multiEffectRollup.test.d.ts.map +1 -0
- package/dist/multiEffectRollup.test.js +128 -0
- package/dist/multiEffectRollup.test.js.map +1 -0
- package/dist/noStepsMessage.d.ts +7 -0
- package/dist/noStepsMessage.d.ts.map +1 -0
- package/dist/noStepsMessage.js +12 -0
- package/dist/noStepsMessage.js.map +1 -0
- package/dist/noStepsMessage.test.d.ts +2 -0
- package/dist/noStepsMessage.test.d.ts.map +1 -0
- package/dist/noStepsMessage.test.js +15 -0
- package/dist/noStepsMessage.test.js.map +1 -0
- package/dist/operationalDisposition.d.ts +498 -0
- package/dist/operationalDisposition.d.ts.map +1 -0
- package/dist/operationalDisposition.js +490 -0
- package/dist/operationalDisposition.js.map +1 -0
- package/dist/operationalDispositionDerivation.test.d.ts +2 -0
- package/dist/operationalDispositionDerivation.test.d.ts.map +1 -0
- package/dist/operationalDispositionDerivation.test.js +19 -0
- package/dist/operationalDispositionDerivation.test.js.map +1 -0
- package/dist/operationalFailureDiagnosis.d.ts +3 -0
- package/dist/operationalFailureDiagnosis.d.ts.map +1 -0
- package/dist/operationalFailureDiagnosis.js +25 -0
- package/dist/operationalFailureDiagnosis.js.map +1 -0
- package/dist/pipeline.d.ts +38 -0
- package/dist/pipeline.d.ts.map +1 -0
- package/dist/pipeline.js +457 -0
- package/dist/pipeline.js.map +1 -0
- package/dist/planLogicalSteps.d.ts +16 -0
- package/dist/planLogicalSteps.d.ts.map +1 -0
- package/dist/planLogicalSteps.js +51 -0
- package/dist/planLogicalSteps.js.map +1 -0
- package/dist/planLogicalSteps.test.d.ts +2 -0
- package/dist/planLogicalSteps.test.d.ts.map +1 -0
- package/dist/planLogicalSteps.test.js +88 -0
- package/dist/planLogicalSteps.test.js.map +1 -0
- package/dist/planTransition.d.ts +88 -0
- package/dist/planTransition.d.ts.map +1 -0
- package/dist/planTransition.js +490 -0
- package/dist/planTransition.js.map +1 -0
- package/dist/planTransition.test.d.ts +2 -0
- package/dist/planTransition.test.d.ts.map +1 -0
- package/dist/planTransition.test.js +956 -0
- package/dist/planTransition.test.js.map +1 -0
- package/dist/planTransitionConstants.d.ts +3 -0
- package/dist/planTransitionConstants.d.ts.map +1 -0
- package/dist/planTransitionConstants.js +3 -0
- package/dist/planTransitionConstants.js.map +1 -0
- package/dist/planTransitionPathHarvest.d.ts +24 -0
- package/dist/planTransitionPathHarvest.d.ts.map +1 -0
- package/dist/planTransitionPathHarvest.js +273 -0
- package/dist/planTransitionPathHarvest.js.map +1 -0
- package/dist/planTransitionPathHarvest.test.d.ts +2 -0
- package/dist/planTransitionPathHarvest.test.d.ts.map +1 -0
- package/dist/planTransitionPathHarvest.test.js +232 -0
- package/dist/planTransitionPathHarvest.test.js.map +1 -0
- package/dist/prepareWorkflowEvents.d.ts +6 -0
- package/dist/prepareWorkflowEvents.d.ts.map +1 -0
- package/dist/prepareWorkflowEvents.js +8 -0
- package/dist/prepareWorkflowEvents.js.map +1 -0
- package/dist/publicDistribution.generated.d.ts +3 -0
- package/dist/publicDistribution.generated.d.ts.map +1 -0
- package/dist/publicDistribution.generated.js +9 -0
- package/dist/publicDistribution.generated.js.map +1 -0
- package/dist/quickVerify/atomicWrite.d.ts +6 -0
- package/dist/quickVerify/atomicWrite.d.ts.map +1 -0
- package/dist/quickVerify/atomicWrite.js +33 -0
- package/dist/quickVerify/atomicWrite.js.map +1 -0
- package/dist/quickVerify/buildQuickContractEventsNdjson.d.ts +14 -0
- package/dist/quickVerify/buildQuickContractEventsNdjson.d.ts.map +1 -0
- package/dist/quickVerify/buildQuickContractEventsNdjson.js +28 -0
- package/dist/quickVerify/buildQuickContractEventsNdjson.js.map +1 -0
- package/dist/quickVerify/canonicalJson.d.ts +5 -0
- package/dist/quickVerify/canonicalJson.d.ts.map +1 -0
- package/dist/quickVerify/canonicalJson.js +23 -0
- package/dist/quickVerify/canonicalJson.js.map +1 -0
- package/dist/quickVerify/decomposeUnits.d.ts +15 -0
- package/dist/quickVerify/decomposeUnits.d.ts.map +1 -0
- package/dist/quickVerify/decomposeUnits.js +50 -0
- package/dist/quickVerify/decomposeUnits.js.map +1 -0
- package/dist/quickVerify/exportTool.d.ts +6 -0
- package/dist/quickVerify/exportTool.d.ts.map +1 -0
- package/dist/quickVerify/exportTool.js +20 -0
- package/dist/quickVerify/exportTool.js.map +1 -0
- package/dist/quickVerify/forbiddenMutatingSql.d.ts +4 -0
- package/dist/quickVerify/forbiddenMutatingSql.d.ts.map +1 -0
- package/dist/quickVerify/forbiddenMutatingSql.js +6 -0
- package/dist/quickVerify/forbiddenMutatingSql.js.map +1 -0
- package/dist/quickVerify/formatQuickVerifyHumanReport.d.ts +17 -0
- package/dist/quickVerify/formatQuickVerifyHumanReport.d.ts.map +1 -0
- package/dist/quickVerify/formatQuickVerifyHumanReport.js +65 -0
- package/dist/quickVerify/formatQuickVerifyHumanReport.js.map +1 -0
- package/dist/quickVerify/formatQuickVerifyHumanReport.test.d.ts +2 -0
- package/dist/quickVerify/formatQuickVerifyHumanReport.test.d.ts.map +1 -0
- package/dist/quickVerify/formatQuickVerifyHumanReport.test.js +41 -0
- package/dist/quickVerify/formatQuickVerifyHumanReport.test.js.map +1 -0
- package/dist/quickVerify/ingest.d.ts +34 -0
- package/dist/quickVerify/ingest.d.ts.map +1 -0
- package/dist/quickVerify/ingest.js +327 -0
- package/dist/quickVerify/ingest.js.map +1 -0
- package/dist/quickVerify/noMutatingSqlInSources.test.d.ts +2 -0
- package/dist/quickVerify/noMutatingSqlInSources.test.d.ts.map +1 -0
- package/dist/quickVerify/noMutatingSqlInSources.test.js +34 -0
- package/dist/quickVerify/noMutatingSqlInSources.test.js.map +1 -0
- package/dist/quickVerify/postgresCatalog.d.ts +19 -0
- package/dist/quickVerify/postgresCatalog.d.ts.map +1 -0
- package/dist/quickVerify/postgresCatalog.js +107 -0
- package/dist/quickVerify/postgresCatalog.js.map +1 -0
- package/dist/quickVerify/quickVerifyHumanCopy.d.ts +9 -0
- package/dist/quickVerify/quickVerifyHumanCopy.d.ts.map +1 -0
- package/dist/quickVerify/quickVerifyHumanCopy.js +24 -0
- package/dist/quickVerify/quickVerifyHumanCopy.js.map +1 -0
- package/dist/quickVerify/quickVerifyProductTruth.d.ts +16 -0
- package/dist/quickVerify/quickVerifyProductTruth.d.ts.map +1 -0
- package/dist/quickVerify/quickVerifyProductTruth.js +19 -0
- package/dist/quickVerify/quickVerifyProductTruth.js.map +1 -0
- package/dist/quickVerify/quickVerifyScope.d.ts +12 -0
- package/dist/quickVerify/quickVerifyScope.d.ts.map +1 -0
- package/dist/quickVerify/quickVerifyScope.js +16 -0
- package/dist/quickVerify/quickVerifyScope.js.map +1 -0
- package/dist/quickVerify/relationalPlan.d.ts +10 -0
- package/dist/quickVerify/relationalPlan.d.ts.map +1 -0
- package/dist/quickVerify/relationalPlan.js +37 -0
- package/dist/quickVerify/relationalPlan.js.map +1 -0
- package/dist/quickVerify/rowUnit.d.ts +15 -0
- package/dist/quickVerify/rowUnit.d.ts.map +1 -0
- package/dist/quickVerify/rowUnit.js +132 -0
- package/dist/quickVerify/rowUnit.js.map +1 -0
- package/dist/quickVerify/runQuickVerify.d.ts +65 -0
- package/dist/quickVerify/runQuickVerify.d.ts.map +1 -0
- package/dist/quickVerify/runQuickVerify.js +320 -0
- package/dist/quickVerify/runQuickVerify.js.map +1 -0
- package/dist/quickVerify/schemaCatalogTypes.d.ts +22 -0
- package/dist/quickVerify/schemaCatalogTypes.d.ts.map +1 -0
- package/dist/quickVerify/schemaCatalogTypes.js +2 -0
- package/dist/quickVerify/schemaCatalogTypes.js.map +1 -0
- package/dist/quickVerify/sqliteCatalog.d.ts +13 -0
- package/dist/quickVerify/sqliteCatalog.d.ts.map +1 -0
- package/dist/quickVerify/sqliteCatalog.js +48 -0
- package/dist/quickVerify/sqliteCatalog.js.map +1 -0
- package/dist/quickVerify/tableScoring.d.ts +24 -0
- package/dist/quickVerify/tableScoring.d.ts.map +1 -0
- package/dist/quickVerify/tableScoring.js +156 -0
- package/dist/quickVerify/tableScoring.js.map +1 -0
- package/dist/quickVerify/thresholds.d.ts +11 -0
- package/dist/quickVerify/thresholds.d.ts.map +1 -0
- package/dist/quickVerify/thresholds.js +11 -0
- package/dist/quickVerify/thresholds.js.map +1 -0
- package/dist/quickVerify/verifyExecution.d.ts +15 -0
- package/dist/quickVerify/verifyExecution.d.ts.map +1 -0
- package/dist/quickVerify/verifyExecution.js +153 -0
- package/dist/quickVerify/verifyExecution.js.map +1 -0
- package/dist/reconciler.d.ts +25 -0
- package/dist/reconciler.d.ts.map +1 -0
- package/dist/reconciler.js +266 -0
- package/dist/reconciler.js.map +1 -0
- package/dist/reconciliationPresentation.d.ts +83 -0
- package/dist/reconciliationPresentation.d.ts.map +1 -0
- package/dist/reconciliationPresentation.js +195 -0
- package/dist/reconciliationPresentation.js.map +1 -0
- package/dist/registryValidation.d.ts +48 -0
- package/dist/registryValidation.d.ts.map +1 -0
- package/dist/registryValidation.js +254 -0
- package/dist/registryValidation.js.map +1 -0
- package/dist/registryValidation.test.d.ts +2 -0
- package/dist/registryValidation.test.d.ts.map +1 -0
- package/dist/registryValidation.test.js +186 -0
- package/dist/registryValidation.test.js.map +1 -0
- package/dist/relationalInvariant.d.ts +28 -0
- package/dist/relationalInvariant.d.ts.map +1 -0
- package/dist/relationalInvariant.existsSql.test.d.ts +2 -0
- package/dist/relationalInvariant.existsSql.test.d.ts.map +1 -0
- package/dist/relationalInvariant.existsSql.test.js +12 -0
- package/dist/relationalInvariant.existsSql.test.js.map +1 -0
- package/dist/relationalInvariant.js +347 -0
- package/dist/relationalInvariant.js.map +1 -0
- package/dist/relationalInvariant.test.d.ts +2 -0
- package/dist/relationalInvariant.test.d.ts.map +1 -0
- package/dist/relationalInvariant.test.js +32 -0
- package/dist/relationalInvariant.test.js.map +1 -0
- package/dist/remediationConsumptionGuard.test.d.ts +2 -0
- package/dist/remediationConsumptionGuard.test.d.ts.map +1 -0
- package/dist/remediationConsumptionGuard.test.js +80 -0
- package/dist/remediationConsumptionGuard.test.js.map +1 -0
- package/dist/remediationWireSurfaceGuard.test.d.ts +2 -0
- package/dist/remediationWireSurfaceGuard.test.d.ts.map +1 -0
- package/dist/remediationWireSurfaceGuard.test.js +39 -0
- package/dist/remediationWireSurfaceGuard.test.js.map +1 -0
- package/dist/resolveExpectation.d.ts +28 -0
- package/dist/resolveExpectation.d.ts.map +1 -0
- package/dist/resolveExpectation.js +654 -0
- package/dist/resolveExpectation.js.map +1 -0
- package/dist/resolveExpectation.test.d.ts +2 -0
- package/dist/resolveExpectation.test.d.ts.map +1 -0
- package/dist/resolveExpectation.test.js +434 -0
- package/dist/resolveExpectation.test.js.map +1 -0
- package/dist/resolveFailureCodes.d.ts +2 -0
- package/dist/resolveFailureCodes.d.ts.map +1 -0
- package/dist/resolveFailureCodes.js +7 -0
- package/dist/resolveFailureCodes.js.map +1 -0
- package/dist/runComparison.d.ts +168 -0
- package/dist/runComparison.d.ts.map +1 -0
- package/dist/runComparison.js +675 -0
- package/dist/runComparison.js.map +1 -0
- package/dist/runComparison.test.d.ts +2 -0
- package/dist/runComparison.test.d.ts.map +1 -0
- package/dist/runComparison.test.js +507 -0
- package/dist/runComparison.test.js.map +1 -0
- package/dist/runLevelDriftMessages.d.ts +4 -0
- package/dist/runLevelDriftMessages.d.ts.map +1 -0
- package/dist/runLevelDriftMessages.js +4 -0
- package/dist/runLevelDriftMessages.js.map +1 -0
- package/dist/schema-validation.test.d.ts +2 -0
- package/dist/schema-validation.test.d.ts.map +1 -0
- package/dist/schema-validation.test.js +531 -0
- package/dist/schema-validation.test.js.map +1 -0
- package/dist/schemaLoad.d.ts +5 -0
- package/dist/schemaLoad.d.ts.map +1 -0
- package/dist/schemaLoad.js +152 -0
- package/dist/schemaLoad.js.map +1 -0
- package/dist/shareReport/postPublicVerificationReport.d.ts +26 -0
- package/dist/shareReport/postPublicVerificationReport.d.ts.map +1 -0
- package/dist/shareReport/postPublicVerificationReport.js +38 -0
- package/dist/shareReport/postPublicVerificationReport.js.map +1 -0
- package/dist/slice6.compare.ac.test.d.ts +2 -0
- package/dist/slice6.compare.ac.test.d.ts.map +1 -0
- package/dist/slice6.compare.ac.test.js +81 -0
- package/dist/slice6.compare.ac.test.js.map +1 -0
- package/dist/sqlConnector.d.ts +15 -0
- package/dist/sqlConnector.d.ts.map +1 -0
- package/dist/sqlConnector.js +36 -0
- package/dist/sqlConnector.js.map +1 -0
- package/dist/sqlReadBackend.d.ts +19 -0
- package/dist/sqlReadBackend.d.ts.map +1 -0
- package/dist/sqlReadBackend.js +67 -0
- package/dist/sqlReadBackend.js.map +1 -0
- package/dist/standardVerifyWorkflowCli.d.ts +24 -0
- package/dist/standardVerifyWorkflowCli.d.ts.map +1 -0
- package/dist/standardVerifyWorkflowCli.js +95 -0
- package/dist/standardVerifyWorkflowCli.js.map +1 -0
- package/dist/taxonomyAuthority.test.d.ts +2 -0
- package/dist/taxonomyAuthority.test.d.ts.map +1 -0
- package/dist/taxonomyAuthority.test.js +44 -0
- package/dist/taxonomyAuthority.test.js.map +1 -0
- package/dist/toolsRegistryLoad.d.ts +7 -0
- package/dist/toolsRegistryLoad.d.ts.map +1 -0
- package/dist/toolsRegistryLoad.js +32 -0
- package/dist/toolsRegistryLoad.js.map +1 -0
- package/dist/truthLayerError.d.ts +8 -0
- package/dist/truthLayerError.d.ts.map +1 -0
- package/dist/truthLayerError.js +9 -0
- package/dist/truthLayerError.js.map +1 -0
- package/dist/types.d.ts +706 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +24 -0
- package/dist/types.js.map +1 -0
- package/dist/valueVerification.d.ts +12 -0
- package/dist/valueVerification.d.ts.map +1 -0
- package/dist/valueVerification.js +112 -0
- package/dist/valueVerification.js.map +1 -0
- package/dist/valueVerification.test.d.ts +2 -0
- package/dist/valueVerification.test.d.ts.map +1 -0
- package/dist/valueVerification.test.js +112 -0
- package/dist/valueVerification.test.js.map +1 -0
- package/dist/verificationAgainstSystemState.requirements.test.d.ts +2 -0
- package/dist/verificationAgainstSystemState.requirements.test.d.ts.map +1 -0
- package/dist/verificationAgainstSystemState.requirements.test.js +326 -0
- package/dist/verificationAgainstSystemState.requirements.test.js.map +1 -0
- package/dist/verificationDiagnostics.d.ts +21 -0
- package/dist/verificationDiagnostics.d.ts.map +1 -0
- package/dist/verificationDiagnostics.js +141 -0
- package/dist/verificationDiagnostics.js.map +1 -0
- package/dist/verificationDiagnostics.test.d.ts +2 -0
- package/dist/verificationDiagnostics.test.d.ts.map +1 -0
- package/dist/verificationDiagnostics.test.js +228 -0
- package/dist/verificationDiagnostics.test.js.map +1 -0
- package/dist/verificationPolicy.d.ts +33 -0
- package/dist/verificationPolicy.d.ts.map +1 -0
- package/dist/verificationPolicy.js +495 -0
- package/dist/verificationPolicy.js.map +1 -0
- package/dist/verificationPolicy.test.d.ts +2 -0
- package/dist/verificationPolicy.test.d.ts.map +1 -0
- package/dist/verificationPolicy.test.js +252 -0
- package/dist/verificationPolicy.test.js.map +1 -0
- package/dist/verificationRunContext.d.ts +10 -0
- package/dist/verificationRunContext.d.ts.map +1 -0
- package/dist/verificationRunContext.js +111 -0
- package/dist/verificationRunContext.js.map +1 -0
- package/dist/verificationUserPhrases.d.ts +22 -0
- package/dist/verificationUserPhrases.d.ts.map +1 -0
- package/dist/verificationUserPhrases.js +99 -0
- package/dist/verificationUserPhrases.js.map +1 -0
- package/dist/verificationUserPhrases.test.d.ts +2 -0
- package/dist/verificationUserPhrases.test.d.ts.map +1 -0
- package/dist/verificationUserPhrases.test.js +47 -0
- package/dist/verificationUserPhrases.test.js.map +1 -0
- package/dist/verifyRunBundleSignature.d.ts +14 -0
- package/dist/verifyRunBundleSignature.d.ts.map +1 -0
- package/dist/verifyRunBundleSignature.js +139 -0
- package/dist/verifyRunBundleSignature.js.map +1 -0
- package/dist/verifyRunBundleSignature.test.d.ts +2 -0
- package/dist/verifyRunBundleSignature.test.d.ts.map +1 -0
- package/dist/verifyRunBundleSignature.test.js +169 -0
- package/dist/verifyRunBundleSignature.test.js.map +1 -0
- package/dist/wireReasonCodes.d.ts +57 -0
- package/dist/wireReasonCodes.d.ts.map +1 -0
- package/dist/wireReasonCodes.js +57 -0
- package/dist/wireReasonCodes.js.map +1 -0
- package/dist/wireReasonEmittersGuard.test.d.ts +2 -0
- package/dist/wireReasonEmittersGuard.test.d.ts.map +1 -0
- package/dist/wireReasonEmittersGuard.test.js +36 -0
- package/dist/wireReasonEmittersGuard.test.js.map +1 -0
- package/dist/withWorkflowVerification.persistBundle.test.d.ts +2 -0
- package/dist/withWorkflowVerification.persistBundle.test.d.ts.map +1 -0
- package/dist/withWorkflowVerification.persistBundle.test.js +104 -0
- package/dist/withWorkflowVerification.persistBundle.test.js.map +1 -0
- package/dist/workflowResultNormalize.d.ts +9 -0
- package/dist/workflowResultNormalize.d.ts.map +1 -0
- package/dist/workflowResultNormalize.js +40 -0
- package/dist/workflowResultNormalize.js.map +1 -0
- package/dist/workflowResultSignature.d.ts +8 -0
- package/dist/workflowResultSignature.d.ts.map +1 -0
- package/dist/workflowResultSignature.js +44 -0
- package/dist/workflowResultSignature.js.map +1 -0
- package/dist/workflowRunLevelConsistency.d.ts +5 -0
- package/dist/workflowRunLevelConsistency.d.ts.map +1 -0
- package/dist/workflowRunLevelConsistency.js +30 -0
- package/dist/workflowRunLevelConsistency.js.map +1 -0
- package/dist/workflowTruthReport.d.ts +24 -0
- package/dist/workflowTruthReport.d.ts.map +1 -0
- package/dist/workflowTruthReport.js +395 -0
- package/dist/workflowTruthReport.js.map +1 -0
- package/dist/workflowTruthReport.semantics.test.d.ts +2 -0
- package/dist/workflowTruthReport.semantics.test.d.ts.map +1 -0
- package/dist/workflowTruthReport.semantics.test.js +182 -0
- package/dist/workflowTruthReport.semantics.test.js.map +1 -0
- package/dist/workflowVerdictSurface.test.d.ts +2 -0
- package/dist/workflowVerdictSurface.test.d.ts.map +1 -0
- package/dist/workflowVerdictSurface.test.js +68 -0
- package/dist/workflowVerdictSurface.test.js.map +1 -0
- package/dist/writeRunBundleCli.d.ts +9 -0
- package/dist/writeRunBundleCli.d.ts.map +1 -0
- package/dist/writeRunBundleCli.js +28 -0
- package/dist/writeRunBundleCli.js.map +1 -0
- package/package.json +115 -0
- package/schemas/agent-run-record-v1.schema.json +51 -0
- package/schemas/agent-run-record-v2.schema.json +61 -0
- package/schemas/assurance-manifest-v1.schema.json +28 -0
- package/schemas/assurance-run-report-v1.schema.json +28 -0
- package/schemas/ci-lock-v1.schema.json +163 -0
- package/schemas/cli-error-envelope.schema.json +48 -0
- package/schemas/event.schema.json +111 -0
- package/schemas/execution-trace-view.schema.json +122 -0
- package/schemas/openapi-commercial-v1.in.yaml +215 -0
- package/schemas/openapi-commercial-v1.yaml +215 -0
- package/schemas/plan-validation-core.schema.json +95 -0
- package/schemas/public-verification-report-v1.schema.json +51 -0
- package/schemas/quick-verify-report.schema.json +251 -0
- package/schemas/registry-validation-result.schema.json +99 -0
- package/schemas/run-comparison-report.schema.json +513 -0
- package/schemas/tools-registry-export.schema.json +9 -0
- package/schemas/tools-registry.schema.json +284 -0
- package/schemas/workflow-engine-result.schema.json +591 -0
- package/schemas/workflow-result-compare-input.schema.json +15 -0
- package/schemas/workflow-result-signature.schema.json +20 -0
- package/schemas/workflow-result-v9.schema.json +85 -0
- package/schemas/workflow-result.schema.json +80 -0
- package/schemas/workflow-truth-report.schema.json +761 -0
- package/scripts/discovery-acquisition.lib.cjs +195 -0
- package/scripts/discovery-payload.lib.cjs +346 -0
- package/scripts/render-discovery-ci.mjs +103 -0
package/dist/cli.js
ADDED
|
@@ -0,0 +1,998 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync, statSync } from "fs";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import { CLI_OPERATIONAL_CODES, cliErrorEnvelope, formatOperationalMessage, } from "./failureCatalog.js";
|
|
5
|
+
import { buildRunComparisonReport, formatRunComparisonReport, } from "./runComparison.js";
|
|
6
|
+
import { buildExecutionTraceView, formatExecutionTraceText } from "./executionTrace.js";
|
|
7
|
+
import { loadEventsForWorkflow } from "./loadEvents.js";
|
|
8
|
+
import { verifyWorkflow } from "./pipeline.js";
|
|
9
|
+
import { argValue, argValues, parseBatchVerifyCliArgs, parseQuickCliArgs } from "./cliArgv.js";
|
|
10
|
+
import { ENFORCE_OSS_GATE_MESSAGE, runEnforce } from "./enforceCli.js";
|
|
11
|
+
import { runStandardVerifyWorkflowCliFlow } from "./standardVerifyWorkflowCli.js";
|
|
12
|
+
import { formatRegistryValidationHumanReport, validateToolsRegistry, } from "./registryValidation.js";
|
|
13
|
+
import { loadSchemaValidator } from "./schemaLoad.js";
|
|
14
|
+
import { TruthLayerError } from "./truthLayerError.js";
|
|
15
|
+
import { verifyRunBundleSignature } from "./verifyRunBundleSignature.js";
|
|
16
|
+
import { isBundlePrivateKeyTruthError, writeRunBundleCli } from "./writeRunBundleCli.js";
|
|
17
|
+
import { normalizeToEmittedWorkflowResult } from "./workflowResultNormalize.js";
|
|
18
|
+
import { debugServerEntryUrl, loadCorpusBundle, logCorpusLoadErrors, startDebugServerOnPort, } from "./debugServer.js";
|
|
19
|
+
import { assertPlanPathInsideRepo, buildPlanTransitionEventsNdjson, buildPlanTransitionWorkflowResult, resolveCommitSha, sha256HexOfFile, } from "./planTransition.js";
|
|
20
|
+
import { PLAN_TRANSITION_WORKFLOW_ID } from "./planTransitionConstants.js";
|
|
21
|
+
import { COMPARE_INPUT_RUN_LEVEL_INCONSISTENT_MESSAGE } from "./runLevelDriftMessages.js";
|
|
22
|
+
import { isV9RunLevelCodesInconsistent } from "./workflowRunLevelConsistency.js";
|
|
23
|
+
import { formatWorkflowTruthReport } from "./workflowTruthReport.js";
|
|
24
|
+
import { workflowEngineResultFromEmitted } from "./workflowResultNormalize.js";
|
|
25
|
+
import { atomicWriteUtf8File } from "./quickVerify/atomicWrite.js";
|
|
26
|
+
import { buildQuickContractEventsNdjson } from "./quickVerify/buildQuickContractEventsNdjson.js";
|
|
27
|
+
import { stableStringify } from "./quickVerify/canonicalJson.js";
|
|
28
|
+
import { formatQuickVerifyHumanReport } from "./quickVerify/formatQuickVerifyHumanReport.js";
|
|
29
|
+
import { runQuickVerifyToValidatedReport } from "./quickVerify/runQuickVerify.js";
|
|
30
|
+
import { checkAssuranceReportStale } from "./assurance/checkStale.js";
|
|
31
|
+
import { runAssuranceFromManifest } from "./assurance/runAssurance.js";
|
|
32
|
+
import { runLicensePreflightIfNeeded } from "./commercial/licensePreflight.js";
|
|
33
|
+
import { LICENSE_PREFLIGHT_ENABLED } from "./generated/commercialBuildFlags.js";
|
|
34
|
+
import { runBatchCiLockFromRestArgs, runQuickCiLockFromRestArgs } from "./ciLockWorkflow.js";
|
|
35
|
+
import { formatDistributionFooter } from "./distributionFooter.js";
|
|
36
|
+
import { postPublicVerificationReport } from "./shareReport/postPublicVerificationReport.js";
|
|
37
|
+
function usageQuick() {
|
|
38
|
+
return `Usage:
|
|
39
|
+
agentskeptic quick --input <path> (--postgres-url <url> | --db <sqlitePath>) --export-registry <path>
|
|
40
|
+
[--emit-events <path>] [--workflow-id <id>] [--share-report-origin <https://host>]
|
|
41
|
+
|
|
42
|
+
Input must contain structured tool activity (tool names and parameters extractable as JSON). Verification uses read-only SQL against the database you pass.
|
|
43
|
+
|
|
44
|
+
Use - for stdin. Writes registry JSON array atomically, then optional events file, then stdout (see docs/quick-verify-normative.md).
|
|
45
|
+
With --share-report-origin, human stderr is deferred until after a successful POST (same contract as batch verify; see docs/shareable-verification-reports.md).
|
|
46
|
+
|
|
47
|
+
Exit codes:
|
|
48
|
+
0 verdict pass
|
|
49
|
+
1 verdict fail
|
|
50
|
+
2 verdict uncertain
|
|
51
|
+
3 operational failure (stderr: JSON envelope)
|
|
52
|
+
|
|
53
|
+
--help, -h print this message and exit 0`;
|
|
54
|
+
}
|
|
55
|
+
function usageVerify() {
|
|
56
|
+
return `Usage:
|
|
57
|
+
agentskeptic quick --input <path> (--postgres-url <url> | --db <sqlitePath>) --export-registry <path> [--emit-events <path>] [--workflow-id <id>]
|
|
58
|
+
(zero-config path; structured tool activity + read-only SQL; see docs/quick-verify-normative.md)
|
|
59
|
+
|
|
60
|
+
agentskeptic --workflow-id <id> --events <path> --registry <path> --db <sqlitePath>
|
|
61
|
+
agentskeptic --workflow-id <id> --events <path> --registry <path> --postgres-url <url>
|
|
62
|
+
|
|
63
|
+
Optional CI lock (commercial build; same as enforce batch): append exactly one of
|
|
64
|
+
--output-lock <path> or --expect-lock <path> (requires active subscription; see docs/ci-enforcement.md).
|
|
65
|
+
|
|
66
|
+
Optional consistency (default strong):
|
|
67
|
+
--consistency strong|eventual
|
|
68
|
+
With eventual, required:
|
|
69
|
+
--verification-window-ms <int>
|
|
70
|
+
--poll-interval-ms <int> (must be >= 1 and <= window)
|
|
71
|
+
|
|
72
|
+
With strong, do not pass --verification-window-ms or --poll-interval-ms.
|
|
73
|
+
|
|
74
|
+
Provide exactly one of --db or --postgres-url.
|
|
75
|
+
|
|
76
|
+
Optional output:
|
|
77
|
+
--no-truth-report For verdict exits 0–2, do not print the human truth report to stderr (stderr empty). stdout WorkflowResult JSON is unchanged. Exit 3 stderr is unchanged (single-line JSON envelope).
|
|
78
|
+
--share-report-origin <https://host> After successful verification, POST a shareable report to that origin (https only, origin with no path), then print human report + footer to stderr and WorkflowResult JSON to stdout. On POST failure: exit 3, stdout empty, stderr single-line JSON envelope (code SHARE_REPORT_FAILED). See docs/shareable-verification-reports.md.
|
|
79
|
+
|
|
80
|
+
Exit codes:
|
|
81
|
+
0 workflow status complete
|
|
82
|
+
1 workflow status inconsistent
|
|
83
|
+
2 workflow status incomplete
|
|
84
|
+
3 operational failure (see stderr JSON)
|
|
85
|
+
4 CI lock mismatch with --expect-lock (stdout: WorkflowResult line; stderr: envelope after human report if any)
|
|
86
|
+
|
|
87
|
+
agentskeptic compare --prior <path> [--prior <path> ...] --current <path>
|
|
88
|
+
Compare saved WorkflowResult JSON files (local only; see docs).
|
|
89
|
+
|
|
90
|
+
agentskeptic validate-registry --registry <path>
|
|
91
|
+
agentskeptic validate-registry --registry <path> --events <path> --workflow-id <id>
|
|
92
|
+
Validate tools registry JSON (and optionally resolution vs events) without a database.
|
|
93
|
+
See docs/agentskeptic.md (Registry validation).
|
|
94
|
+
|
|
95
|
+
agentskeptic execution-trace --workflow-id <id> --events <path> [--workflow-result <path>] [--format json|text]
|
|
96
|
+
Emit ExecutionTraceView JSON or text (see docs/agentskeptic.md).
|
|
97
|
+
|
|
98
|
+
agentskeptic enforce batch (--expect-lock <path> | --output-lock <path>) <same flags as batch verify>
|
|
99
|
+
agentskeptic enforce quick (--expect-lock <path> | --output-lock <path>) <same flags as quick>
|
|
100
|
+
CI enforcement with pinned ci-lock-v1 (see docs/ci-enforcement.md).
|
|
101
|
+
|
|
102
|
+
agentskeptic assurance run --manifest <path> [--write-report <path>]
|
|
103
|
+
agentskeptic assurance stale --report <path> --max-age-hours <n>
|
|
104
|
+
Multi-scenario assurance sweep and staleness gate (see docs/agentskeptic.md).
|
|
105
|
+
|
|
106
|
+
Advanced / optional (persisted runs, signing, local UI, plan/git checks):
|
|
107
|
+
--write-run-bundle <dir> After a successful verify (schema-valid WorkflowResult), write a canonical run directory: events.ndjson (byte copy of --events), workflow-result.json (emitted result), agent-run.json (SHA-256 manifest). Directory is created if missing. Requires exit 0–2 (operational failure skips the write).
|
|
108
|
+
--sign-ed25519-private-key <path> With --write-run-bundle only: PKCS#8 PEM Ed25519 private key; also writes workflow-result.sig.json and manifest schemaVersion 2.
|
|
109
|
+
|
|
110
|
+
verify-bundle-signature --run-dir <dir> --public-key <path>
|
|
111
|
+
Verify signed bundle (Ed25519 + manifest v2). Exit 0 if valid; exit 3 with JSON envelope on failure.
|
|
112
|
+
|
|
113
|
+
agentskeptic debug --corpus <dir> [--port <n>]
|
|
114
|
+
Local Debug Console on 127.0.0.1 (see docs/agentskeptic.md — Debug Console).
|
|
115
|
+
|
|
116
|
+
agentskeptic plan-transition --repo <dir> --before <ref> --after <ref> --plan <path>
|
|
117
|
+
Validate git Before..After against machine plan rules (planValidation, body YAML section, or derived path citations as required diff surfaces; Git >= 2.30.0; see docs).
|
|
118
|
+
|
|
119
|
+
--help, -h print this message and exit 0`;
|
|
120
|
+
}
|
|
121
|
+
function usageExecutionTrace() {
|
|
122
|
+
return `Usage:
|
|
123
|
+
agentskeptic execution-trace --workflow-id <id> --events <path> [--workflow-result <path>] [--format json|text]
|
|
124
|
+
|
|
125
|
+
Exit codes:
|
|
126
|
+
0 success (stdout: ExecutionTraceView JSON or text; stderr empty)
|
|
127
|
+
3 operational failure (stderr: JSON envelope only; stdout empty)
|
|
128
|
+
|
|
129
|
+
--help, -h print this message and exit 0`;
|
|
130
|
+
}
|
|
131
|
+
function assertExecutionTraceArgsWellFormed(args) {
|
|
132
|
+
const allowed = new Set([
|
|
133
|
+
"--workflow-id",
|
|
134
|
+
"--events",
|
|
135
|
+
"--workflow-result",
|
|
136
|
+
"--format",
|
|
137
|
+
"--help",
|
|
138
|
+
"-h",
|
|
139
|
+
]);
|
|
140
|
+
for (let i = 0; i < args.length; i++) {
|
|
141
|
+
const a = args[i];
|
|
142
|
+
if (a === "-h" || a === "--help")
|
|
143
|
+
continue;
|
|
144
|
+
if (!a.startsWith("--")) {
|
|
145
|
+
throw new TruthLayerError(CLI_OPERATIONAL_CODES.EXECUTION_TRACE_USAGE, `Unexpected argument: ${a}`);
|
|
146
|
+
}
|
|
147
|
+
if (!allowed.has(a)) {
|
|
148
|
+
throw new TruthLayerError(CLI_OPERATIONAL_CODES.EXECUTION_TRACE_USAGE, `Unknown option: ${a}`);
|
|
149
|
+
}
|
|
150
|
+
if (a === "--workflow-id" || a === "--events" || a === "--workflow-result" || a === "--format") {
|
|
151
|
+
const v = args[i + 1];
|
|
152
|
+
if (v === undefined || v.startsWith("--")) {
|
|
153
|
+
throw new TruthLayerError(CLI_OPERATIONAL_CODES.EXECUTION_TRACE_USAGE, `Missing value after ${a}.`);
|
|
154
|
+
}
|
|
155
|
+
i++;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function runExecutionTraceSubcommand(args) {
|
|
160
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
161
|
+
console.log(usageExecutionTrace());
|
|
162
|
+
process.exit(0);
|
|
163
|
+
}
|
|
164
|
+
try {
|
|
165
|
+
assertExecutionTraceArgsWellFormed(args);
|
|
166
|
+
}
|
|
167
|
+
catch (e) {
|
|
168
|
+
if (e instanceof TruthLayerError) {
|
|
169
|
+
writeCliError(e.code, e.message);
|
|
170
|
+
process.exit(3);
|
|
171
|
+
}
|
|
172
|
+
throw e;
|
|
173
|
+
}
|
|
174
|
+
const workflowId = argValue(args, "--workflow-id");
|
|
175
|
+
const eventsPath = argValue(args, "--events");
|
|
176
|
+
const workflowResultPath = argValue(args, "--workflow-result");
|
|
177
|
+
const formatRaw = argValue(args, "--format") ?? "json";
|
|
178
|
+
if (formatRaw !== "json" && formatRaw !== "text") {
|
|
179
|
+
writeCliError(CLI_OPERATIONAL_CODES.EXECUTION_TRACE_USAGE, '--format must be "json" or "text".');
|
|
180
|
+
process.exit(3);
|
|
181
|
+
}
|
|
182
|
+
if (!workflowId || !eventsPath) {
|
|
183
|
+
writeCliError(CLI_OPERATIONAL_CODES.EXECUTION_TRACE_USAGE, "Missing required --workflow-id or --events path.");
|
|
184
|
+
process.exit(3);
|
|
185
|
+
}
|
|
186
|
+
let load;
|
|
187
|
+
try {
|
|
188
|
+
load = loadEventsForWorkflow(eventsPath, workflowId);
|
|
189
|
+
}
|
|
190
|
+
catch (e) {
|
|
191
|
+
if (e instanceof TruthLayerError) {
|
|
192
|
+
writeCliError(e.code, e.message);
|
|
193
|
+
process.exit(3);
|
|
194
|
+
}
|
|
195
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
196
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(msg));
|
|
197
|
+
process.exit(3);
|
|
198
|
+
}
|
|
199
|
+
let workflowResult;
|
|
200
|
+
if (workflowResultPath) {
|
|
201
|
+
let raw;
|
|
202
|
+
try {
|
|
203
|
+
raw = readFileSync(workflowResultPath, "utf8");
|
|
204
|
+
}
|
|
205
|
+
catch (e) {
|
|
206
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
207
|
+
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_INPUT_READ_FAILED, formatOperationalMessage(msg));
|
|
208
|
+
process.exit(3);
|
|
209
|
+
}
|
|
210
|
+
let parsed;
|
|
211
|
+
try {
|
|
212
|
+
parsed = JSON.parse(raw);
|
|
213
|
+
}
|
|
214
|
+
catch (e) {
|
|
215
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
216
|
+
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_INPUT_JSON_SYNTAX, formatOperationalMessage(msg));
|
|
217
|
+
process.exit(3);
|
|
218
|
+
}
|
|
219
|
+
try {
|
|
220
|
+
workflowResult = normalizeToEmittedWorkflowResult(parsed);
|
|
221
|
+
}
|
|
222
|
+
catch (e) {
|
|
223
|
+
if (e instanceof TruthLayerError) {
|
|
224
|
+
writeCliError(e.code, e.message);
|
|
225
|
+
process.exit(3);
|
|
226
|
+
}
|
|
227
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
228
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(msg));
|
|
229
|
+
process.exit(3);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
let view;
|
|
233
|
+
try {
|
|
234
|
+
view = buildExecutionTraceView({
|
|
235
|
+
workflowId,
|
|
236
|
+
runEvents: load.runEvents,
|
|
237
|
+
malformedEventLineCount: load.malformedEventLineCount,
|
|
238
|
+
workflowResult,
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
catch (e) {
|
|
242
|
+
if (e instanceof TruthLayerError) {
|
|
243
|
+
writeCliError(e.code, e.message);
|
|
244
|
+
process.exit(3);
|
|
245
|
+
}
|
|
246
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
247
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(msg));
|
|
248
|
+
process.exit(3);
|
|
249
|
+
}
|
|
250
|
+
const validateTrace = loadSchemaValidator("execution-trace-view");
|
|
251
|
+
if (!validateTrace(view)) {
|
|
252
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, JSON.stringify(validateTrace.errors ?? []));
|
|
253
|
+
process.exit(3);
|
|
254
|
+
}
|
|
255
|
+
if (formatRaw === "text") {
|
|
256
|
+
process.stdout.write(formatExecutionTraceText(view));
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
console.log(JSON.stringify(view));
|
|
260
|
+
}
|
|
261
|
+
process.exit(0);
|
|
262
|
+
}
|
|
263
|
+
function usageCompare() {
|
|
264
|
+
return `Usage:
|
|
265
|
+
agentskeptic compare --prior <workflowResult.json> [--prior <path> ...] --current <workflowResult.json>
|
|
266
|
+
|
|
267
|
+
Compares the current run (last file) against the immediate prior run (last --prior).
|
|
268
|
+
Recurrence uses all runs in order: each --prior in order, then --current.
|
|
269
|
+
|
|
270
|
+
Exit codes:
|
|
271
|
+
0 comparison succeeded (stdout: RunComparisonReport JSON; stderr: human summary)
|
|
272
|
+
3 operational failure (stderr: JSON envelope only; stdout empty)
|
|
273
|
+
|
|
274
|
+
--help, -h print this message and exit 0`;
|
|
275
|
+
}
|
|
276
|
+
function writeCliError(code, message) {
|
|
277
|
+
console.error(cliErrorEnvelope(code, message));
|
|
278
|
+
}
|
|
279
|
+
function usageAssurance() {
|
|
280
|
+
return `Usage:
|
|
281
|
+
agentskeptic assurance run --manifest <path> [--write-report <path>]
|
|
282
|
+
agentskeptic assurance stale --report <path> --max-age-hours <n>
|
|
283
|
+
|
|
284
|
+
assurance run executes each manifest scenario by spawning this CLI (schemas/assurance-manifest-v1.schema.json).
|
|
285
|
+
Path arguments in each scenario argv are resolved relative to the manifest file's directory unless absolute.
|
|
286
|
+
|
|
287
|
+
assurance stale exits 1 when the report issuedAt is older than max-age-hours (UTC wall clock).
|
|
288
|
+
|
|
289
|
+
Exit codes (run):
|
|
290
|
+
0 all scenarios exited 0
|
|
291
|
+
1 at least one scenario non-zero
|
|
292
|
+
3 operational failure (stderr: JSON envelope)
|
|
293
|
+
|
|
294
|
+
Exit codes (stale):
|
|
295
|
+
0 report fresh
|
|
296
|
+
1 report stale
|
|
297
|
+
3 missing/invalid report (stderr: JSON envelope)
|
|
298
|
+
|
|
299
|
+
--help, -h print this message and exit 0`;
|
|
300
|
+
}
|
|
301
|
+
function runAssuranceSubcommand(args) {
|
|
302
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
303
|
+
console.log(usageAssurance());
|
|
304
|
+
process.exit(0);
|
|
305
|
+
}
|
|
306
|
+
const sub = args[0];
|
|
307
|
+
const rest = args.slice(1);
|
|
308
|
+
if (sub === "run") {
|
|
309
|
+
const manifestPath = argValue(rest, "--manifest");
|
|
310
|
+
const writeReport = argValue(rest, "--write-report");
|
|
311
|
+
if (!manifestPath) {
|
|
312
|
+
writeCliError(CLI_OPERATIONAL_CODES.ASSURANCE_USAGE, "assurance run requires --manifest <path>.");
|
|
313
|
+
process.exit(3);
|
|
314
|
+
}
|
|
315
|
+
const res = runAssuranceFromManifest(path.resolve(manifestPath));
|
|
316
|
+
if (!res.ok) {
|
|
317
|
+
writeCliError(res.code, res.message);
|
|
318
|
+
process.exit(3);
|
|
319
|
+
}
|
|
320
|
+
const line = `${JSON.stringify(res.report)}\n`;
|
|
321
|
+
try {
|
|
322
|
+
process.stdout.write(line);
|
|
323
|
+
}
|
|
324
|
+
catch (e) {
|
|
325
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
326
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(`stdout: ${msg}`));
|
|
327
|
+
process.exit(3);
|
|
328
|
+
}
|
|
329
|
+
if (writeReport !== undefined) {
|
|
330
|
+
try {
|
|
331
|
+
atomicWriteUtf8File(path.resolve(writeReport), line);
|
|
332
|
+
}
|
|
333
|
+
catch (e) {
|
|
334
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
335
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(`write-report: ${msg}`));
|
|
336
|
+
process.exit(3);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
process.exit(res.exitCode);
|
|
340
|
+
}
|
|
341
|
+
if (sub === "stale") {
|
|
342
|
+
const reportPath = argValue(rest, "--report");
|
|
343
|
+
const maxH = argValue(rest, "--max-age-hours");
|
|
344
|
+
if (!reportPath || maxH === undefined) {
|
|
345
|
+
writeCliError(CLI_OPERATIONAL_CODES.ASSURANCE_STALE_USAGE, "assurance stale requires --report <path> and --max-age-hours <n>.");
|
|
346
|
+
process.exit(3);
|
|
347
|
+
}
|
|
348
|
+
const hours = Number(maxH);
|
|
349
|
+
if (!Number.isFinite(hours) || hours < 0) {
|
|
350
|
+
writeCliError(CLI_OPERATIONAL_CODES.ASSURANCE_STALE_USAGE, "--max-age-hours must be a non-negative number.");
|
|
351
|
+
process.exit(3);
|
|
352
|
+
}
|
|
353
|
+
const st = checkAssuranceReportStale(path.resolve(reportPath), hours);
|
|
354
|
+
if (st.kind === "operational") {
|
|
355
|
+
writeCliError(st.code, st.message);
|
|
356
|
+
process.exit(3);
|
|
357
|
+
}
|
|
358
|
+
if (st.kind === "stale") {
|
|
359
|
+
process.stderr.write("AssuranceRunReport issuedAt is older than --max-age-hours.\n");
|
|
360
|
+
process.exit(1);
|
|
361
|
+
}
|
|
362
|
+
process.exit(0);
|
|
363
|
+
}
|
|
364
|
+
writeCliError(CLI_OPERATIONAL_CODES.ASSURANCE_USAGE, "Use agentskeptic assurance run or agentskeptic assurance stale.");
|
|
365
|
+
process.exit(3);
|
|
366
|
+
}
|
|
367
|
+
async function runQuickSubcommand(args) {
|
|
368
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
369
|
+
console.log(usageQuick());
|
|
370
|
+
process.exit(0);
|
|
371
|
+
}
|
|
372
|
+
const expectLockQ = argValue(args, "--expect-lock");
|
|
373
|
+
const outputLockQ = argValue(args, "--output-lock");
|
|
374
|
+
const hasExpectQ = expectLockQ !== undefined;
|
|
375
|
+
const hasOutputQ = outputLockQ !== undefined;
|
|
376
|
+
if (hasExpectQ && hasOutputQ) {
|
|
377
|
+
writeCliError(CLI_OPERATIONAL_CODES.ENFORCE_USAGE, "quick requires exactly one of --expect-lock <path> or --output-lock <path>.");
|
|
378
|
+
process.exit(3);
|
|
379
|
+
}
|
|
380
|
+
if (hasExpectQ !== hasOutputQ) {
|
|
381
|
+
if (!LICENSE_PREFLIGHT_ENABLED) {
|
|
382
|
+
writeCliError(CLI_OPERATIONAL_CODES.ENFORCE_REQUIRES_COMMERCIAL_BUILD, `${ENFORCE_OSS_GATE_MESSAGE} --output-lock/--expect-lock on quick requires the commercial build.`);
|
|
383
|
+
process.exit(3);
|
|
384
|
+
}
|
|
385
|
+
try {
|
|
386
|
+
await runLicensePreflightIfNeeded("enforce");
|
|
387
|
+
}
|
|
388
|
+
catch (e) {
|
|
389
|
+
if (e instanceof TruthLayerError) {
|
|
390
|
+
writeCliError(e.code, e.message);
|
|
391
|
+
process.exit(3);
|
|
392
|
+
}
|
|
393
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
394
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(msg));
|
|
395
|
+
process.exit(3);
|
|
396
|
+
}
|
|
397
|
+
await runQuickCiLockFromRestArgs(args);
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
let pq;
|
|
401
|
+
try {
|
|
402
|
+
pq = parseQuickCliArgs(args);
|
|
403
|
+
}
|
|
404
|
+
catch (e) {
|
|
405
|
+
if (e instanceof TruthLayerError) {
|
|
406
|
+
writeCliError(e.code, e.message);
|
|
407
|
+
process.exit(3);
|
|
408
|
+
}
|
|
409
|
+
throw e;
|
|
410
|
+
}
|
|
411
|
+
const { inputPath, exportPath, emitEventsPath, workflowIdQuick, dbPath, postgresUrl, shareReportOrigin } = pq;
|
|
412
|
+
try {
|
|
413
|
+
await runLicensePreflightIfNeeded("verify");
|
|
414
|
+
}
|
|
415
|
+
catch (e) {
|
|
416
|
+
if (e instanceof TruthLayerError) {
|
|
417
|
+
writeCliError(e.code, e.message);
|
|
418
|
+
process.exit(3);
|
|
419
|
+
}
|
|
420
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
421
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(msg));
|
|
422
|
+
process.exit(3);
|
|
423
|
+
}
|
|
424
|
+
let inputUtf8;
|
|
425
|
+
try {
|
|
426
|
+
inputUtf8 = inputPath === "-" ? readFileSync(0, "utf8") : readFileSync(path.resolve(inputPath), "utf8");
|
|
427
|
+
}
|
|
428
|
+
catch (e) {
|
|
429
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
430
|
+
writeCliError(CLI_OPERATIONAL_CODES.CLI_USAGE, `Cannot read --input: ${msg}`);
|
|
431
|
+
process.exit(3);
|
|
432
|
+
}
|
|
433
|
+
let registryUtf8;
|
|
434
|
+
let report;
|
|
435
|
+
let contractExports = [];
|
|
436
|
+
try {
|
|
437
|
+
const out = await runQuickVerifyToValidatedReport({
|
|
438
|
+
inputUtf8,
|
|
439
|
+
postgresUrl: postgresUrl ?? undefined,
|
|
440
|
+
sqlitePath: dbPath ?? undefined,
|
|
441
|
+
});
|
|
442
|
+
report = out.report;
|
|
443
|
+
registryUtf8 = out.registryUtf8;
|
|
444
|
+
contractExports = out.contractExports;
|
|
445
|
+
}
|
|
446
|
+
catch (e) {
|
|
447
|
+
if (e instanceof TruthLayerError) {
|
|
448
|
+
writeCliError(e.code, e.message);
|
|
449
|
+
process.exit(3);
|
|
450
|
+
}
|
|
451
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
452
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(msg));
|
|
453
|
+
process.exit(3);
|
|
454
|
+
}
|
|
455
|
+
try {
|
|
456
|
+
atomicWriteUtf8File(path.resolve(exportPath), registryUtf8);
|
|
457
|
+
}
|
|
458
|
+
catch (e) {
|
|
459
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
460
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(`export-registry: ${msg}`));
|
|
461
|
+
process.exit(3);
|
|
462
|
+
}
|
|
463
|
+
if (emitEventsPath !== undefined) {
|
|
464
|
+
const eventsUtf8 = buildQuickContractEventsNdjson({
|
|
465
|
+
workflowId: workflowIdQuick,
|
|
466
|
+
exports: contractExports,
|
|
467
|
+
});
|
|
468
|
+
try {
|
|
469
|
+
atomicWriteUtf8File(path.resolve(emitEventsPath), eventsUtf8);
|
|
470
|
+
}
|
|
471
|
+
catch (e) {
|
|
472
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
473
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(`emit-events: ${msg}`));
|
|
474
|
+
process.exit(3);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
const human = formatQuickVerifyHumanReport(report, {
|
|
478
|
+
workflowId: workflowIdQuick,
|
|
479
|
+
eventsPath: emitEventsPath !== undefined ? emitEventsPath : undefined,
|
|
480
|
+
registryPath: exportPath,
|
|
481
|
+
dbFlag: dbPath ?? undefined,
|
|
482
|
+
postgresUrl: postgresUrl !== undefined,
|
|
483
|
+
});
|
|
484
|
+
if (shareReportOrigin !== undefined) {
|
|
485
|
+
const shareRes = await postPublicVerificationReport(shareReportOrigin, {
|
|
486
|
+
schemaVersion: 1,
|
|
487
|
+
kind: "quick",
|
|
488
|
+
workflowDisplayId: workflowIdQuick,
|
|
489
|
+
quickReport: report,
|
|
490
|
+
humanReportText: human,
|
|
491
|
+
});
|
|
492
|
+
if (!shareRes.ok) {
|
|
493
|
+
writeCliError(CLI_OPERATIONAL_CODES.SHARE_REPORT_FAILED, formatOperationalMessage(`share_report_origin=${shareReportOrigin} http_status=${String(shareRes.status)} detail=${shareRes.bodySnippet}`));
|
|
494
|
+
process.exit(3);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
try {
|
|
498
|
+
process.stdout.write(stableStringify(report) + "\n");
|
|
499
|
+
}
|
|
500
|
+
catch (e) {
|
|
501
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
502
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(`stdout: ${msg}`));
|
|
503
|
+
process.exit(3);
|
|
504
|
+
}
|
|
505
|
+
console.error(human);
|
|
506
|
+
process.stderr.write(formatDistributionFooter());
|
|
507
|
+
if (report.verdict === "pass")
|
|
508
|
+
process.exit(0);
|
|
509
|
+
if (report.verdict === "fail")
|
|
510
|
+
process.exit(1);
|
|
511
|
+
process.exit(2);
|
|
512
|
+
}
|
|
513
|
+
function runVerifyBundleSignatureSubcommand(args) {
|
|
514
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
515
|
+
console.log(`Usage:
|
|
516
|
+
agentskeptic verify-bundle-signature --run-dir <dir> --public-key <path>
|
|
517
|
+
|
|
518
|
+
Exit codes:
|
|
519
|
+
0 signature and manifest integrity OK
|
|
520
|
+
3 verification failed (stderr: JSON envelope; code is BUNDLE_SIGNATURE_*)
|
|
521
|
+
|
|
522
|
+
--help, -h print this message and exit 0`);
|
|
523
|
+
process.exit(0);
|
|
524
|
+
}
|
|
525
|
+
const runDir = argValue(args, "--run-dir");
|
|
526
|
+
const publicKeyPath = argValue(args, "--public-key");
|
|
527
|
+
if (!runDir || !publicKeyPath) {
|
|
528
|
+
writeCliError(CLI_OPERATIONAL_CODES.CLI_USAGE, "verify-bundle-signature requires --run-dir and --public-key.");
|
|
529
|
+
process.exit(3);
|
|
530
|
+
}
|
|
531
|
+
const r = verifyRunBundleSignature(runDir, publicKeyPath);
|
|
532
|
+
if (r.ok) {
|
|
533
|
+
process.exit(0);
|
|
534
|
+
}
|
|
535
|
+
writeCliError(r.code, r.message);
|
|
536
|
+
process.exit(3);
|
|
537
|
+
}
|
|
538
|
+
function usageValidateRegistry() {
|
|
539
|
+
return `Usage:
|
|
540
|
+
agentskeptic validate-registry --registry <path>
|
|
541
|
+
agentskeptic validate-registry --registry <path> --events <path> --workflow-id <id>
|
|
542
|
+
|
|
543
|
+
Exit codes:
|
|
544
|
+
0 registry valid (stdout: RegistryValidationResult JSON; stderr empty)
|
|
545
|
+
1 validation failed (stdout: RegistryValidationResult JSON; stderr human report)
|
|
546
|
+
3 operational failure (stderr JSON envelope only; stdout empty)
|
|
547
|
+
|
|
548
|
+
Options: --registry (required), --events and --workflow-id (both or neither).
|
|
549
|
+
|
|
550
|
+
--help, -h print this message and exit 0`;
|
|
551
|
+
}
|
|
552
|
+
function assertValidateRegistryArgsWellFormed(args) {
|
|
553
|
+
const allowed = new Set(["--registry", "--events", "--workflow-id", "--help", "-h"]);
|
|
554
|
+
for (let i = 0; i < args.length; i++) {
|
|
555
|
+
const a = args[i];
|
|
556
|
+
if (a === "-h" || a === "--help")
|
|
557
|
+
continue;
|
|
558
|
+
if (!a.startsWith("--")) {
|
|
559
|
+
throw new TruthLayerError(CLI_OPERATIONAL_CODES.VALIDATE_REGISTRY_USAGE, `Unexpected argument: ${a}`);
|
|
560
|
+
}
|
|
561
|
+
if (!allowed.has(a)) {
|
|
562
|
+
throw new TruthLayerError(CLI_OPERATIONAL_CODES.VALIDATE_REGISTRY_USAGE, `Unknown option: ${a}`);
|
|
563
|
+
}
|
|
564
|
+
if (a === "--registry" || a === "--events" || a === "--workflow-id") {
|
|
565
|
+
const v = args[i + 1];
|
|
566
|
+
if (v === undefined || v.startsWith("--")) {
|
|
567
|
+
throw new TruthLayerError(CLI_OPERATIONAL_CODES.VALIDATE_REGISTRY_USAGE, `Missing value after ${a}.`);
|
|
568
|
+
}
|
|
569
|
+
i++;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
function runValidateRegistrySubcommand(args) {
|
|
574
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
575
|
+
console.log(usageValidateRegistry());
|
|
576
|
+
process.exit(0);
|
|
577
|
+
}
|
|
578
|
+
try {
|
|
579
|
+
assertValidateRegistryArgsWellFormed(args);
|
|
580
|
+
}
|
|
581
|
+
catch (e) {
|
|
582
|
+
if (e instanceof TruthLayerError) {
|
|
583
|
+
writeCliError(e.code, e.message);
|
|
584
|
+
process.exit(3);
|
|
585
|
+
}
|
|
586
|
+
throw e;
|
|
587
|
+
}
|
|
588
|
+
const registryPath = argValue(args, "--registry");
|
|
589
|
+
const eventsPath = argValue(args, "--events");
|
|
590
|
+
const workflowId = argValue(args, "--workflow-id");
|
|
591
|
+
if (!registryPath) {
|
|
592
|
+
writeCliError(CLI_OPERATIONAL_CODES.VALIDATE_REGISTRY_USAGE, "Missing required --registry path.");
|
|
593
|
+
process.exit(3);
|
|
594
|
+
}
|
|
595
|
+
let result;
|
|
596
|
+
try {
|
|
597
|
+
result = validateToolsRegistry({
|
|
598
|
+
registryPath,
|
|
599
|
+
eventsPath,
|
|
600
|
+
workflowId,
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
catch (e) {
|
|
604
|
+
if (e instanceof TruthLayerError) {
|
|
605
|
+
writeCliError(e.code, e.message);
|
|
606
|
+
process.exit(3);
|
|
607
|
+
}
|
|
608
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
609
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(msg));
|
|
610
|
+
process.exit(3);
|
|
611
|
+
}
|
|
612
|
+
const validateOut = loadSchemaValidator("registry-validation-result");
|
|
613
|
+
if (!validateOut(result)) {
|
|
614
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, JSON.stringify(validateOut.errors ?? []));
|
|
615
|
+
process.exit(3);
|
|
616
|
+
}
|
|
617
|
+
console.log(JSON.stringify(result));
|
|
618
|
+
if (!result.valid) {
|
|
619
|
+
process.stderr.write(`${formatRegistryValidationHumanReport(result)}\n`);
|
|
620
|
+
process.exit(1);
|
|
621
|
+
}
|
|
622
|
+
process.exit(0);
|
|
623
|
+
}
|
|
624
|
+
function runCompareSubcommand(args) {
|
|
625
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
626
|
+
console.log(usageCompare());
|
|
627
|
+
process.exit(0);
|
|
628
|
+
}
|
|
629
|
+
const priors = argValues(args, "--prior");
|
|
630
|
+
const currentPath = argValue(args, "--current");
|
|
631
|
+
if (priors.length < 1 || !currentPath) {
|
|
632
|
+
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_USAGE, "compare requires at least one --prior and --current.");
|
|
633
|
+
process.exit(3);
|
|
634
|
+
}
|
|
635
|
+
const paths = [...priors, currentPath];
|
|
636
|
+
const validateCompareInput = loadSchemaValidator("workflow-result-compare-input");
|
|
637
|
+
const results = [];
|
|
638
|
+
const displayLabels = [];
|
|
639
|
+
for (const filePath of paths) {
|
|
640
|
+
displayLabels.push(path.basename(filePath));
|
|
641
|
+
let raw;
|
|
642
|
+
try {
|
|
643
|
+
raw = readFileSync(filePath, "utf8");
|
|
644
|
+
}
|
|
645
|
+
catch (e) {
|
|
646
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
647
|
+
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_INPUT_READ_FAILED, formatOperationalMessage(msg));
|
|
648
|
+
process.exit(3);
|
|
649
|
+
}
|
|
650
|
+
let parsed;
|
|
651
|
+
try {
|
|
652
|
+
parsed = JSON.parse(raw);
|
|
653
|
+
}
|
|
654
|
+
catch (e) {
|
|
655
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
656
|
+
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_INPUT_JSON_SYNTAX, formatOperationalMessage(msg));
|
|
657
|
+
process.exit(3);
|
|
658
|
+
}
|
|
659
|
+
if (isV9RunLevelCodesInconsistent(parsed)) {
|
|
660
|
+
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_INPUT_RUN_LEVEL_INCONSISTENT, COMPARE_INPUT_RUN_LEVEL_INCONSISTENT_MESSAGE);
|
|
661
|
+
process.exit(3);
|
|
662
|
+
}
|
|
663
|
+
if (!validateCompareInput(parsed)) {
|
|
664
|
+
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_INPUT_SCHEMA_INVALID, JSON.stringify(validateCompareInput.errors ?? []));
|
|
665
|
+
process.exit(3);
|
|
666
|
+
}
|
|
667
|
+
try {
|
|
668
|
+
results.push(normalizeToEmittedWorkflowResult(parsed));
|
|
669
|
+
}
|
|
670
|
+
catch (e) {
|
|
671
|
+
if (e instanceof TruthLayerError) {
|
|
672
|
+
writeCliError(e.code, e.message);
|
|
673
|
+
process.exit(3);
|
|
674
|
+
}
|
|
675
|
+
throw e;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
const wf0 = results[0].workflowId;
|
|
679
|
+
for (const r of results) {
|
|
680
|
+
if (r.workflowId !== wf0) {
|
|
681
|
+
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_WORKFLOW_ID_MISMATCH, "All WorkflowResult inputs must share the same workflowId.");
|
|
682
|
+
process.exit(3);
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
let report;
|
|
686
|
+
try {
|
|
687
|
+
report = buildRunComparisonReport(results, displayLabels);
|
|
688
|
+
}
|
|
689
|
+
catch (e) {
|
|
690
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
691
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(msg));
|
|
692
|
+
process.exit(3);
|
|
693
|
+
}
|
|
694
|
+
const validateReport = loadSchemaValidator("run-comparison-report");
|
|
695
|
+
if (!validateReport(report)) {
|
|
696
|
+
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_RUN_COMPARISON_REPORT_INVALID, JSON.stringify(validateReport.errors ?? []));
|
|
697
|
+
process.exit(3);
|
|
698
|
+
}
|
|
699
|
+
process.stderr.write(`${formatRunComparisonReport(report)}\n`);
|
|
700
|
+
console.log(JSON.stringify(report));
|
|
701
|
+
process.exit(0);
|
|
702
|
+
}
|
|
703
|
+
function usageDebug() {
|
|
704
|
+
return `Usage:
|
|
705
|
+
agentskeptic debug --corpus <dir> [--port <n>]
|
|
706
|
+
|
|
707
|
+
Serves the Debug Console on 127.0.0.1 only. Each run is a subfolder of the corpus
|
|
708
|
+
with workflow-result.json and events.ndjson (see docs/agentskeptic.md).
|
|
709
|
+
|
|
710
|
+
Exit: Ctrl+C ends the server (exit 0). Port in use or bad corpus → exit 3.
|
|
711
|
+
|
|
712
|
+
--help, -h print this message and exit 0`;
|
|
713
|
+
}
|
|
714
|
+
async function runDebugSubcommand(args) {
|
|
715
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
716
|
+
console.log(usageDebug());
|
|
717
|
+
process.exit(0);
|
|
718
|
+
}
|
|
719
|
+
const corpus = argValue(args, "--corpus");
|
|
720
|
+
const portRaw = argValue(args, "--port");
|
|
721
|
+
const port = portRaw === undefined ? 8787 : Number(portRaw);
|
|
722
|
+
if (!corpus) {
|
|
723
|
+
writeCliError(CLI_OPERATIONAL_CODES.CLI_USAGE, "debug requires --corpus <dir>.");
|
|
724
|
+
process.exit(3);
|
|
725
|
+
}
|
|
726
|
+
if (!Number.isFinite(port) || port < 0 || port > 65535 || !Number.isInteger(port)) {
|
|
727
|
+
writeCliError(CLI_OPERATIONAL_CODES.CLI_USAGE, "Invalid --port; use an integer 0–65535 (0 = ephemeral).");
|
|
728
|
+
process.exit(3);
|
|
729
|
+
}
|
|
730
|
+
let st;
|
|
731
|
+
try {
|
|
732
|
+
st = statSync(corpus);
|
|
733
|
+
}
|
|
734
|
+
catch (e) {
|
|
735
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
736
|
+
writeCliError(CLI_OPERATIONAL_CODES.CLI_USAGE, formatOperationalMessage(msg));
|
|
737
|
+
process.exit(3);
|
|
738
|
+
}
|
|
739
|
+
if (!st.isDirectory()) {
|
|
740
|
+
writeCliError(CLI_OPERATIONAL_CODES.CLI_USAGE, "--corpus must be a directory.");
|
|
741
|
+
process.exit(3);
|
|
742
|
+
}
|
|
743
|
+
const resolved = path.resolve(corpus);
|
|
744
|
+
const bundle = loadCorpusBundle(resolved);
|
|
745
|
+
logCorpusLoadErrors(bundle.outcomes);
|
|
746
|
+
let srv;
|
|
747
|
+
try {
|
|
748
|
+
srv = await startDebugServerOnPort(resolved, port);
|
|
749
|
+
}
|
|
750
|
+
catch (e) {
|
|
751
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
752
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(msg));
|
|
753
|
+
process.exit(3);
|
|
754
|
+
}
|
|
755
|
+
const url = debugServerEntryUrl(srv.port);
|
|
756
|
+
process.stdout.write(`Debug Console ${url}\n`);
|
|
757
|
+
process.stdout.write(`Corpus ${resolved} (${bundle.outcomes.length} run folders)\n`);
|
|
758
|
+
const onSig = () => {
|
|
759
|
+
void srv.close().then(() => process.exit(0));
|
|
760
|
+
};
|
|
761
|
+
process.on("SIGINT", onSig);
|
|
762
|
+
process.on("SIGTERM", onSig);
|
|
763
|
+
}
|
|
764
|
+
function usagePlanTransition() {
|
|
765
|
+
return `Usage:
|
|
766
|
+
agentskeptic plan-transition --repo <dir> --before <ref> --after <ref> --plan <path>
|
|
767
|
+
|
|
768
|
+
Optional:
|
|
769
|
+
--workflow-id <id> (default ${PLAN_TRANSITION_WORKFLOW_ID})
|
|
770
|
+
--no-truth-report
|
|
771
|
+
--write-run-bundle <dir>
|
|
772
|
+
--sign-ed25519-private-key <path> (requires --write-run-bundle)
|
|
773
|
+
|
|
774
|
+
Requires Git >= 2.30.0. Plan file must start with YAML front matter; rules from front matter planValidation, or from a body section "Repository transition validation", or derived from path citations as required diff surfaces when neither is present (see docs).
|
|
775
|
+
|
|
776
|
+
Exit codes:
|
|
777
|
+
0 workflow status complete
|
|
778
|
+
1 workflow status inconsistent
|
|
779
|
+
2 workflow status incomplete
|
|
780
|
+
3 operational failure (see stderr JSON)
|
|
781
|
+
|
|
782
|
+
--help, -h print this message and exit 0`;
|
|
783
|
+
}
|
|
784
|
+
function runPlanTransitionSubcommand(args) {
|
|
785
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
786
|
+
console.log(usagePlanTransition());
|
|
787
|
+
process.exit(0);
|
|
788
|
+
}
|
|
789
|
+
const repo = argValue(args, "--repo");
|
|
790
|
+
const beforeRef = argValue(args, "--before");
|
|
791
|
+
const afterRef = argValue(args, "--after");
|
|
792
|
+
const planPath = argValue(args, "--plan");
|
|
793
|
+
if (!repo || !beforeRef || !afterRef || !planPath) {
|
|
794
|
+
writeCliError(CLI_OPERATIONAL_CODES.PLAN_TRANSITION_USAGE, "plan-transition requires --repo, --before, --after, and --plan.");
|
|
795
|
+
process.exit(3);
|
|
796
|
+
}
|
|
797
|
+
const workflowId = argValue(args, "--workflow-id") ?? PLAN_TRANSITION_WORKFLOW_ID;
|
|
798
|
+
const noTruthReport = args.includes("--no-truth-report");
|
|
799
|
+
const writeRunBundleDir = argValue(args, "--write-run-bundle");
|
|
800
|
+
const signPrivateKeyPath = argValue(args, "--sign-ed25519-private-key");
|
|
801
|
+
if (signPrivateKeyPath !== undefined && writeRunBundleDir === undefined) {
|
|
802
|
+
writeCliError(CLI_OPERATIONAL_CODES.CLI_USAGE, "--sign-ed25519-private-key requires --write-run-bundle.");
|
|
803
|
+
process.exit(3);
|
|
804
|
+
}
|
|
805
|
+
let result;
|
|
806
|
+
let transitionRulesProvenance;
|
|
807
|
+
try {
|
|
808
|
+
const built = buildPlanTransitionWorkflowResult({
|
|
809
|
+
repoRoot: repo,
|
|
810
|
+
beforeRef,
|
|
811
|
+
afterRef,
|
|
812
|
+
planPath,
|
|
813
|
+
workflowId,
|
|
814
|
+
});
|
|
815
|
+
result = built.workflowResult;
|
|
816
|
+
transitionRulesProvenance = built.transitionRulesProvenance;
|
|
817
|
+
}
|
|
818
|
+
catch (e) {
|
|
819
|
+
if (e instanceof TruthLayerError) {
|
|
820
|
+
writeCliError(e.code, e.message);
|
|
821
|
+
process.exit(3);
|
|
822
|
+
}
|
|
823
|
+
throw e;
|
|
824
|
+
}
|
|
825
|
+
const validateResult = loadSchemaValidator("workflow-result");
|
|
826
|
+
if (!validateResult(result)) {
|
|
827
|
+
writeCliError(CLI_OPERATIONAL_CODES.WORKFLOW_RESULT_SCHEMA_INVALID, JSON.stringify(validateResult.errors ?? []));
|
|
828
|
+
process.exit(3);
|
|
829
|
+
}
|
|
830
|
+
if (!noTruthReport) {
|
|
831
|
+
const engine = workflowEngineResultFromEmitted(result);
|
|
832
|
+
process.stderr.write(`${formatWorkflowTruthReport(engine)}\n`);
|
|
833
|
+
}
|
|
834
|
+
if (writeRunBundleDir !== undefined) {
|
|
835
|
+
try {
|
|
836
|
+
const repoResolved = path.resolve(repo);
|
|
837
|
+
const planReal = assertPlanPathInsideRepo(repoResolved, planPath);
|
|
838
|
+
const beforeSha = resolveCommitSha(repoResolved, beforeRef);
|
|
839
|
+
const afterSha = resolveCommitSha(repoResolved, afterRef);
|
|
840
|
+
const planSha = sha256HexOfFile(planReal);
|
|
841
|
+
const eventsNdjson = buildPlanTransitionEventsNdjson({
|
|
842
|
+
workflowId,
|
|
843
|
+
beforeRef,
|
|
844
|
+
afterRef,
|
|
845
|
+
beforeCommitSha: beforeSha,
|
|
846
|
+
afterCommitSha: afterSha,
|
|
847
|
+
planResolvedPath: planReal,
|
|
848
|
+
planSha256: planSha,
|
|
849
|
+
transitionRulesSource: transitionRulesProvenance,
|
|
850
|
+
});
|
|
851
|
+
writeRunBundleCli(writeRunBundleDir, eventsNdjson, result, signPrivateKeyPath);
|
|
852
|
+
}
|
|
853
|
+
catch (e) {
|
|
854
|
+
if (isBundlePrivateKeyTruthError(e)) {
|
|
855
|
+
writeCliError(e.code, e.message);
|
|
856
|
+
process.exit(3);
|
|
857
|
+
}
|
|
858
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
859
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(msg));
|
|
860
|
+
process.exit(3);
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
console.log(JSON.stringify(result));
|
|
864
|
+
if (result.status === "complete")
|
|
865
|
+
process.exit(0);
|
|
866
|
+
if (result.status === "inconsistent")
|
|
867
|
+
process.exit(1);
|
|
868
|
+
process.exit(2);
|
|
869
|
+
}
|
|
870
|
+
async function main() {
|
|
871
|
+
const args = process.argv.slice(2);
|
|
872
|
+
if (args[0] === "assurance") {
|
|
873
|
+
runAssuranceSubcommand(args.slice(1));
|
|
874
|
+
return;
|
|
875
|
+
}
|
|
876
|
+
if (args[0] === "quick") {
|
|
877
|
+
await runQuickSubcommand(args.slice(1));
|
|
878
|
+
return;
|
|
879
|
+
}
|
|
880
|
+
if (args[0] === "verify-bundle-signature") {
|
|
881
|
+
runVerifyBundleSignatureSubcommand(args.slice(1));
|
|
882
|
+
return;
|
|
883
|
+
}
|
|
884
|
+
if (args[0] === "plan-transition") {
|
|
885
|
+
runPlanTransitionSubcommand(args.slice(1));
|
|
886
|
+
return;
|
|
887
|
+
}
|
|
888
|
+
if (args[0] === "debug") {
|
|
889
|
+
await runDebugSubcommand(args.slice(1));
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
892
|
+
if (args[0] === "compare") {
|
|
893
|
+
runCompareSubcommand(args.slice(1));
|
|
894
|
+
return;
|
|
895
|
+
}
|
|
896
|
+
if (args[0] === "execution-trace") {
|
|
897
|
+
runExecutionTraceSubcommand(args.slice(1));
|
|
898
|
+
return;
|
|
899
|
+
}
|
|
900
|
+
if (args[0] === "validate-registry") {
|
|
901
|
+
runValidateRegistrySubcommand(args.slice(1));
|
|
902
|
+
return;
|
|
903
|
+
}
|
|
904
|
+
if (args[0] === "enforce") {
|
|
905
|
+
await runEnforce(args.slice(1));
|
|
906
|
+
return;
|
|
907
|
+
}
|
|
908
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
909
|
+
console.log(usageVerify());
|
|
910
|
+
process.exit(0);
|
|
911
|
+
}
|
|
912
|
+
const expectLockB = argValue(args, "--expect-lock");
|
|
913
|
+
const outputLockB = argValue(args, "--output-lock");
|
|
914
|
+
const hasExpectB = expectLockB !== undefined;
|
|
915
|
+
const hasOutputB = outputLockB !== undefined;
|
|
916
|
+
if (hasExpectB && hasOutputB) {
|
|
917
|
+
writeCliError(CLI_OPERATIONAL_CODES.ENFORCE_USAGE, "batch verify requires exactly one of --expect-lock <path> or --output-lock <path>.");
|
|
918
|
+
process.exit(3);
|
|
919
|
+
}
|
|
920
|
+
if (hasExpectB !== hasOutputB) {
|
|
921
|
+
if (!LICENSE_PREFLIGHT_ENABLED) {
|
|
922
|
+
writeCliError(CLI_OPERATIONAL_CODES.ENFORCE_REQUIRES_COMMERCIAL_BUILD, `${ENFORCE_OSS_GATE_MESSAGE} --output-lock/--expect-lock on batch verify requires the commercial build.`);
|
|
923
|
+
process.exit(3);
|
|
924
|
+
}
|
|
925
|
+
try {
|
|
926
|
+
await runLicensePreflightIfNeeded("enforce");
|
|
927
|
+
}
|
|
928
|
+
catch (e) {
|
|
929
|
+
if (e instanceof TruthLayerError) {
|
|
930
|
+
writeCliError(e.code, e.message);
|
|
931
|
+
process.exit(3);
|
|
932
|
+
}
|
|
933
|
+
throw e;
|
|
934
|
+
}
|
|
935
|
+
await runBatchCiLockFromRestArgs(args);
|
|
936
|
+
return;
|
|
937
|
+
}
|
|
938
|
+
let parsedBatch;
|
|
939
|
+
try {
|
|
940
|
+
parsedBatch = parseBatchVerifyCliArgs(args);
|
|
941
|
+
}
|
|
942
|
+
catch (e) {
|
|
943
|
+
if (e instanceof TruthLayerError) {
|
|
944
|
+
writeCliError(e.code, e.message);
|
|
945
|
+
process.exit(3);
|
|
946
|
+
}
|
|
947
|
+
throw e;
|
|
948
|
+
}
|
|
949
|
+
try {
|
|
950
|
+
await runLicensePreflightIfNeeded("verify");
|
|
951
|
+
}
|
|
952
|
+
catch (e) {
|
|
953
|
+
if (e instanceof TruthLayerError) {
|
|
954
|
+
writeCliError(e.code, e.message);
|
|
955
|
+
process.exit(3);
|
|
956
|
+
}
|
|
957
|
+
throw e;
|
|
958
|
+
}
|
|
959
|
+
const suppressTruthToStderr = parsedBatch.noTruthReport || parsedBatch.shareReportOrigin !== undefined;
|
|
960
|
+
await runStandardVerifyWorkflowCliFlow({
|
|
961
|
+
shareReportOrigin: parsedBatch.shareReportOrigin,
|
|
962
|
+
runVerify: () => verifyWorkflow({
|
|
963
|
+
workflowId: parsedBatch.workflowId,
|
|
964
|
+
eventsPath: parsedBatch.eventsPath,
|
|
965
|
+
registryPath: parsedBatch.registryPath,
|
|
966
|
+
database: parsedBatch.database,
|
|
967
|
+
verificationPolicy: parsedBatch.verificationPolicy,
|
|
968
|
+
...(suppressTruthToStderr ?
|
|
969
|
+
{ truthReport: () => { } }
|
|
970
|
+
: {
|
|
971
|
+
truthReport: (report) => {
|
|
972
|
+
process.stderr.write(`${report}\n`);
|
|
973
|
+
process.stderr.write(formatDistributionFooter());
|
|
974
|
+
},
|
|
975
|
+
}),
|
|
976
|
+
}),
|
|
977
|
+
maybeWriteBundle: parsedBatch.writeRunBundleDir === undefined
|
|
978
|
+
? undefined
|
|
979
|
+
: (result) => writeRunBundleCli(parsedBatch.writeRunBundleDir, readFileSync(path.resolve(parsedBatch.eventsPath)), result, parsedBatch.signPrivateKeyPath),
|
|
980
|
+
io: {
|
|
981
|
+
consoleLog: (line) => {
|
|
982
|
+
console.log(line);
|
|
983
|
+
},
|
|
984
|
+
stderrLine: (line) => {
|
|
985
|
+
console.error(line);
|
|
986
|
+
},
|
|
987
|
+
exit: (code) => {
|
|
988
|
+
process.exit(code);
|
|
989
|
+
},
|
|
990
|
+
},
|
|
991
|
+
});
|
|
992
|
+
}
|
|
993
|
+
void main().catch((e) => {
|
|
994
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
995
|
+
console.error(cliErrorEnvelope(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(msg)));
|
|
996
|
+
process.exit(3);
|
|
997
|
+
});
|
|
998
|
+
//# sourceMappingURL=cli.js.map
|