agentskeptic 0.2.1 → 1.0.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/README.md +39 -39
- package/config/marketing.json +187 -0
- package/dist/actionableFailure.d.ts.map +1 -1
- package/dist/actionableFailure.js +95 -0
- package/dist/actionableFailure.js.map +1 -1
- package/dist/actionableFailure.remediationExhaustive.test.js +4 -4
- package/dist/actionableFailure.remediationExhaustive.test.js.map +1 -1
- package/dist/agentRunBundle.d.ts +2 -0
- package/dist/agentRunBundle.d.ts.map +1 -1
- package/dist/agentRunBundle.js +4 -0
- package/dist/agentRunBundle.js.map +1 -1
- package/dist/assurance/assurancePathArgs.d.ts.map +1 -1
- package/dist/assurance/assurancePathArgs.js +1 -0
- package/dist/assurance/assurancePathArgs.js.map +1 -1
- package/dist/assurance/buildAssuranceOutput.d.ts +29 -0
- package/dist/assurance/buildAssuranceOutput.d.ts.map +1 -0
- package/dist/assurance/buildAssuranceOutput.js +53 -0
- package/dist/assurance/buildAssuranceOutput.js.map +1 -0
- package/dist/assurance/checkStale.d.ts +7 -0
- package/dist/assurance/checkStale.d.ts.map +1 -1
- package/dist/assurance/checkStale.js +14 -3
- package/dist/assurance/checkStale.js.map +1 -1
- package/dist/assurance/runAssurance.d.ts.map +1 -1
- package/dist/assurance/runAssurance.js +26 -3
- package/dist/assurance/runAssurance.js.map +1 -1
- package/dist/bootstrap/executeBootstrapPack.d.ts.map +1 -1
- package/dist/bootstrap/executeBootstrapPack.js +3 -2
- package/dist/bootstrap/executeBootstrapPack.js.map +1 -1
- package/dist/certificateDigest.d.ts +4 -0
- package/dist/certificateDigest.d.ts.map +1 -0
- package/dist/certificateDigest.js +7 -0
- package/dist/certificateDigest.js.map +1 -0
- package/dist/certificateDigest.test.d.ts +2 -0
- package/dist/certificateDigest.test.d.ts.map +1 -0
- package/dist/certificateDigest.test.js +14 -0
- package/dist/certificateDigest.test.js.map +1 -0
- package/dist/ciLockWorkflow.js +1 -1
- package/dist/cli/lockOrchestration.d.ts.map +1 -1
- package/dist/cli/lockOrchestration.js +81 -50
- package/dist/cli/lockOrchestration.js.map +1 -1
- package/dist/cli/lockOrchestration.test.js +7 -1
- package/dist/cli/lockOrchestration.test.js.map +1 -1
- package/dist/cli/runFunnelAnonSet.js +1 -1
- package/dist/cli.js +147 -136
- package/dist/cli.js.map +1 -1
- package/dist/cliArgv.d.ts +4 -1
- package/dist/cliArgv.d.ts.map +1 -1
- package/dist/cliArgv.js +9 -4
- package/dist/cliArgv.js.map +1 -1
- package/dist/cliArgv.test.d.ts +2 -0
- package/dist/cliArgv.test.d.ts.map +1 -0
- package/dist/cliArgv.test.js +34 -0
- package/dist/cliArgv.test.js.map +1 -0
- package/dist/cliOperationalCodes.d.ts +8 -0
- package/dist/cliOperationalCodes.d.ts.map +1 -1
- package/dist/cliOperationalCodes.js +8 -0
- package/dist/cliOperationalCodes.js.map +1 -1
- package/dist/commercial/activationCorrelation.d.ts +3 -0
- package/dist/commercial/activationCorrelation.d.ts.map +1 -0
- package/dist/commercial/activationCorrelation.js +6 -0
- package/dist/commercial/activationCorrelation.js.map +1 -0
- package/dist/commercial/getCurrentUsage.d.ts +16 -0
- package/dist/commercial/getCurrentUsage.d.ts.map +1 -0
- package/dist/commercial/getCurrentUsage.js +33 -0
- package/dist/commercial/getCurrentUsage.js.map +1 -0
- package/dist/commercial/licensePreflight.d.ts +1 -0
- package/dist/commercial/licensePreflight.d.ts.map +1 -1
- package/dist/commercial/licensePreflight.js +27 -8
- package/dist/commercial/licensePreflight.js.map +1 -1
- package/dist/commercial/postVerifyOutcomeBeacon.d.ts +5 -3
- package/dist/commercial/postVerifyOutcomeBeacon.d.ts.map +1 -1
- package/dist/commercial/postVerifyOutcomeBeacon.js +17 -10
- package/dist/commercial/postVerifyOutcomeBeacon.js.map +1 -1
- package/dist/commercial/verifyOutcomeBeaconBody.d.ts +12 -0
- package/dist/commercial/verifyOutcomeBeaconBody.d.ts.map +1 -0
- package/dist/commercial/verifyOutcomeBeaconBody.js +26 -0
- package/dist/commercial/verifyOutcomeBeaconBody.js.map +1 -0
- package/dist/commercial/verifyWorkloadClassify.d.ts +2 -7
- package/dist/commercial/verifyWorkloadClassify.d.ts.map +1 -1
- package/dist/commercial/verifyWorkloadClassify.js +1 -1
- package/dist/commercial/verifyWorkloadClassify.js.map +1 -1
- package/dist/commercial/verifyWorkloadClassify.test.js +7 -0
- package/dist/commercial/verifyWorkloadClassify.test.js.map +1 -1
- package/dist/compare.acceptance.test.js +25 -0
- package/dist/compare.acceptance.test.js.map +1 -1
- package/dist/compareRunManifest.d.ts +32 -0
- package/dist/compareRunManifest.d.ts.map +1 -0
- package/dist/compareRunManifest.js +60 -0
- package/dist/compareRunManifest.js.map +1 -0
- package/dist/crossing/crossingDecisionReadyFooter.d.ts +1 -1
- package/dist/crossing/crossingDecisionReadyFooter.js +1 -1
- package/dist/crossing/runCrossingSubcommand.js +8 -8
- package/dist/debug-ui/app.css +42 -0
- package/dist/debug-ui/app.js +206 -15
- package/dist/debug-ui/index.html +11 -4
- package/dist/debug-ui/urlState.d.ts +15 -0
- package/dist/debug-ui/urlState.js +92 -0
- package/dist/debugCorpus.test.js +33 -7
- package/dist/debugCorpus.test.js.map +1 -1
- package/dist/debugPanels.d.ts +0 -3
- package/dist/debugPanels.d.ts.map +1 -1
- package/dist/debugPanels.js +0 -23
- package/dist/debugPanels.js.map +1 -1
- package/dist/debugPanels.test.js +16 -15
- package/dist/debugPanels.test.js.map +1 -1
- package/dist/debugServer.d.ts.map +1 -1
- package/dist/debugServer.js +19 -16
- package/dist/debugServer.js.map +1 -1
- package/dist/debugServer.test.js +18 -9
- package/dist/debugServer.test.js.map +1 -1
- package/dist/debugUiUrlState.test.d.ts +2 -0
- package/dist/debugUiUrlState.test.d.ts.map +1 -0
- package/dist/debugUiUrlState.test.js +49 -0
- package/dist/debugUiUrlState.test.js.map +1 -0
- package/dist/decisionBlocker.contract.test.d.ts +2 -0
- package/dist/decisionBlocker.contract.test.d.ts.map +1 -0
- package/dist/decisionBlocker.contract.test.js +51 -0
- package/dist/decisionBlocker.contract.test.js.map +1 -0
- package/dist/decisionBlocker.d.ts +10 -0
- package/dist/decisionBlocker.d.ts.map +1 -0
- package/dist/decisionBlocker.js +66 -0
- package/dist/decisionBlocker.js.map +1 -0
- package/dist/decisionGate.assertSafe.test.d.ts +2 -0
- package/dist/decisionGate.assertSafe.test.d.ts.map +1 -0
- package/dist/decisionGate.assertSafe.test.js +52 -0
- package/dist/decisionGate.assertSafe.test.js.map +1 -0
- package/dist/decisionGate.d.ts +23 -0
- package/dist/decisionGate.d.ts.map +1 -0
- package/dist/decisionGate.js +85 -0
- package/dist/decisionGate.js.map +1 -0
- package/dist/decisionGate.persistBundle.test.d.ts +2 -0
- package/dist/decisionGate.persistBundle.test.d.ts.map +1 -0
- package/dist/{withWorkflowVerification.persistBundle.test.js → decisionGate.persistBundle.test.js} +31 -19
- package/dist/decisionGate.persistBundle.test.js.map +1 -0
- package/dist/decisionUnsafeError.d.ts +8 -0
- package/dist/decisionUnsafeError.d.ts.map +1 -0
- package/dist/decisionUnsafeError.js +12 -0
- package/dist/decisionUnsafeError.js.map +1 -0
- package/dist/discovery-payload-v1.json +167 -59
- package/dist/enforceCli.d.ts.map +1 -1
- package/dist/enforceCli.js +15 -40
- package/dist/enforceCli.js.map +1 -1
- package/dist/enforceStateful.d.ts +2 -0
- package/dist/enforceStateful.d.ts.map +1 -0
- package/dist/enforceStateful.js +106 -0
- package/dist/enforceStateful.js.map +1 -0
- package/dist/enforcementProjection.d.ts +17 -0
- package/dist/enforcementProjection.d.ts.map +1 -0
- package/dist/enforcementProjection.js +20 -0
- package/dist/enforcementProjection.js.map +1 -0
- package/dist/executionPathFindings.d.ts +1 -1
- package/dist/executionPathFindings.d.ts.map +1 -1
- package/dist/executionPathFindings.js +2 -2
- package/dist/executionPathFindings.js.map +1 -1
- package/dist/executionTrace.js +2 -2
- package/dist/executionTrace.js.map +1 -1
- package/dist/executionTrace.test.js +35 -0
- package/dist/executionTrace.test.js.map +1 -1
- package/dist/executionTraceDiff.d.ts +36 -0
- package/dist/executionTraceDiff.d.ts.map +1 -0
- package/dist/executionTraceDiff.js +86 -0
- package/dist/executionTraceDiff.js.map +1 -0
- package/dist/executionTraceDiff.test.d.ts +2 -0
- package/dist/executionTraceDiff.test.d.ts.map +1 -0
- package/dist/executionTraceDiff.test.js +44 -0
- package/dist/executionTraceDiff.test.js.map +1 -0
- package/dist/failureCatalog.d.ts +1 -0
- package/dist/failureCatalog.d.ts.map +1 -1
- package/dist/failureCatalog.js +1 -0
- package/dist/failureCatalog.js.map +1 -1
- package/dist/failureOriginCatalog.d.ts.map +1 -1
- package/dist/failureOriginCatalog.js +20 -0
- package/dist/failureOriginCatalog.js.map +1 -1
- package/dist/firstFiveMinutesChecklist.d.ts +11 -0
- package/dist/firstFiveMinutesChecklist.d.ts.map +1 -0
- package/dist/firstFiveMinutesChecklist.js +18 -0
- package/dist/firstFiveMinutesChecklist.js.map +1 -0
- package/dist/funnel/workflowLineageClassify.d.ts +1 -1
- package/dist/funnel/workflowLineageClassify.js +1 -1
- package/dist/index.d.ts +22 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -6
- package/dist/index.js.map +1 -1
- package/dist/langGraphCheckpointTrustGate.d.ts +38 -0
- package/dist/langGraphCheckpointTrustGate.d.ts.map +1 -0
- package/dist/langGraphCheckpointTrustGate.js +124 -0
- package/dist/langGraphCheckpointTrustGate.js.map +1 -0
- package/dist/langGraphCheckpointTrustIneligibleCertificate.d.ts +8 -0
- package/dist/langGraphCheckpointTrustIneligibleCertificate.d.ts.map +1 -0
- package/dist/langGraphCheckpointTrustIneligibleCertificate.js +17 -0
- package/dist/langGraphCheckpointTrustIneligibleCertificate.js.map +1 -0
- package/dist/langGraphCheckpointTrustUnsafeError.d.ts +8 -0
- package/dist/langGraphCheckpointTrustUnsafeError.d.ts.map +1 -0
- package/dist/langGraphCheckpointTrustUnsafeError.js +12 -0
- package/dist/langGraphCheckpointTrustUnsafeError.js.map +1 -0
- package/dist/loadEvents.d.ts +5 -0
- package/dist/loadEvents.d.ts.map +1 -1
- package/dist/loadEvents.js +32 -0
- package/dist/loadEvents.js.map +1 -1
- package/dist/operationalDisposition.d.ts +64 -0
- package/dist/operationalDisposition.d.ts.map +1 -1
- package/dist/operationalDisposition.js +64 -0
- package/dist/operationalDisposition.js.map +1 -1
- package/dist/outcomeCertificate.d.ts +60 -0
- package/dist/outcomeCertificate.d.ts.map +1 -0
- package/dist/outcomeCertificate.js +254 -0
- package/dist/outcomeCertificate.js.map +1 -0
- package/dist/outcomeCertificate.test.d.ts +2 -0
- package/dist/outcomeCertificate.test.d.ts.map +1 -0
- package/dist/outcomeCertificate.test.js +74 -0
- package/dist/outcomeCertificate.test.js.map +1 -0
- package/dist/pipeline.d.ts +19 -17
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/pipeline.js +61 -167
- package/dist/pipeline.js.map +1 -1
- package/dist/planTransition.test.js +4 -4
- package/dist/publicDistribution.generated.d.ts +2 -2
- package/dist/publicDistribution.generated.d.ts.map +1 -1
- package/dist/publicDistribution.generated.js +7 -8
- package/dist/publicDistribution.generated.js.map +1 -1
- package/dist/quickVerify/quickVerifyScope.d.ts +1 -1
- package/dist/quickVerify/quickVerifyScope.js +1 -1
- package/dist/quickVerify/runQuickVerify.js +1 -1
- package/dist/quickVerify/runQuickVerify.js.map +1 -1
- package/dist/quickVerify/verifyExecution.d.ts +1 -1
- package/dist/quickVerify/verifyExecution.d.ts.map +1 -1
- package/dist/quickVerify/verifyExecution.js +3 -2
- package/dist/quickVerify/verifyExecution.js.map +1 -1
- package/dist/reconciler.d.ts +6 -2
- package/dist/reconciler.d.ts.map +1 -1
- package/dist/reconciler.js +17 -11
- package/dist/reconciler.js.map +1 -1
- package/dist/registryDraft/createRegistryDraftAjv.d.ts +1 -1
- package/dist/registryDraft/createRegistryDraftAjv.js +1 -1
- package/dist/regressionArtifact.d.ts +63 -0
- package/dist/regressionArtifact.d.ts.map +1 -0
- package/dist/regressionArtifact.js +290 -0
- package/dist/regressionArtifact.js.map +1 -0
- package/dist/relationalInvariant.d.ts +13 -3
- package/dist/relationalInvariant.d.ts.map +1 -1
- package/dist/relationalInvariant.existsSql.test.js +1 -1
- package/dist/relationalInvariant.existsSql.test.js.map +1 -1
- package/dist/relationalInvariant.js +59 -39
- package/dist/relationalInvariant.js.map +1 -1
- package/dist/relationalInvariant.test.js +2 -2
- package/dist/relationalInvariant.test.js.map +1 -1
- package/dist/resolveExpectation.d.ts +18 -2
- package/dist/resolveExpectation.d.ts.map +1 -1
- package/dist/resolveExpectation.js +332 -1
- package/dist/resolveExpectation.js.map +1 -1
- package/dist/resolveExpectation.test.js +25 -0
- package/dist/resolveExpectation.test.js.map +1 -1
- package/dist/runComparison.d.ts +0 -1
- package/dist/runComparison.d.ts.map +1 -1
- package/dist/runComparison.js +18 -86
- package/dist/runComparison.js.map +1 -1
- package/dist/runComparison.test.js +101 -57
- package/dist/runComparison.test.js.map +1 -1
- package/dist/schema-validation.test.js +29 -0
- package/dist/schema-validation.test.js.map +1 -1
- package/dist/schemaLoad.d.ts +1 -1
- package/dist/schemaLoad.d.ts.map +1 -1
- package/dist/schemaLoad.js +15 -0
- package/dist/schemaLoad.js.map +1 -1
- package/dist/shareReport/postPublicVerificationReport.d.ts +6 -0
- package/dist/shareReport/postPublicVerificationReport.d.ts.map +1 -1
- package/dist/shareReport/postPublicVerificationReport.js +3 -1
- package/dist/shareReport/postPublicVerificationReport.js.map +1 -1
- package/dist/sortedJsonStringify.d.ts +2 -0
- package/dist/sortedJsonStringify.d.ts.map +1 -0
- package/dist/sortedJsonStringify.js +23 -0
- package/dist/sortedJsonStringify.js.map +1 -0
- package/dist/sqlDialect.d.ts +8 -0
- package/dist/sqlDialect.d.ts.map +1 -0
- package/dist/sqlDialect.js +37 -0
- package/dist/sqlDialect.js.map +1 -0
- package/dist/standardVerifyWorkflowCli.d.ts +20 -5
- package/dist/standardVerifyWorkflowCli.d.ts.map +1 -1
- package/dist/standardVerifyWorkflowCli.js +56 -24
- package/dist/standardVerifyWorkflowCli.js.map +1 -1
- package/dist/stateWitness.d.ts +4 -0
- package/dist/stateWitness.d.ts.map +1 -0
- package/dist/stateWitness.js +383 -0
- package/dist/stateWitness.js.map +1 -0
- package/dist/stateWitness.test.d.ts +2 -0
- package/dist/stateWitness.test.d.ts.map +1 -0
- package/dist/stateWitness.test.js +120 -0
- package/dist/stateWitness.test.js.map +1 -0
- package/dist/telemetry/maybeEmitOssClaimTicketUrl.d.ts +2 -0
- package/dist/telemetry/maybeEmitOssClaimTicketUrl.d.ts.map +1 -1
- package/dist/telemetry/maybeEmitOssClaimTicketUrl.js +13 -2
- package/dist/telemetry/maybeEmitOssClaimTicketUrl.js.map +1 -1
- package/dist/telemetry/ossClaimOrigin.d.ts +1 -1
- package/dist/telemetry/ossClaimOrigin.js +1 -1
- package/dist/telemetry/postOssClaimContinuation.d.ts +1 -1
- package/dist/telemetry/postOssClaimContinuation.d.ts.map +1 -1
- package/dist/telemetry/postOssClaimContinuation.js +10 -6
- package/dist/telemetry/postOssClaimContinuation.js.map +1 -1
- package/dist/telemetry/postOssClaimTicket.d.ts +8 -0
- package/dist/telemetry/postOssClaimTicket.d.ts.map +1 -1
- package/dist/telemetry/postOssClaimTicket.js +31 -5
- package/dist/telemetry/postOssClaimTicket.js.map +1 -1
- package/dist/telemetry/verificationHypothesisContract.d.ts +1 -1
- package/dist/telemetry/verificationHypothesisContract.js +1 -1
- package/dist/trustDecision.d.ts +8 -0
- package/dist/trustDecision.d.ts.map +1 -0
- package/dist/trustDecision.js +13 -0
- package/dist/trustDecision.js.map +1 -0
- package/dist/types.d.ts +139 -7
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/verificationConnections.d.ts +10 -0
- package/dist/verificationConnections.d.ts.map +1 -0
- package/dist/verificationConnections.js +190 -0
- package/dist/verificationConnections.js.map +1 -0
- package/dist/verificationDatabaseUrl.d.ts +11 -0
- package/dist/verificationDatabaseUrl.d.ts.map +1 -0
- package/dist/verificationDatabaseUrl.js +41 -0
- package/dist/verificationDatabaseUrl.js.map +1 -0
- package/dist/verificationDatabaseUrl.test.d.ts +2 -0
- package/dist/verificationDatabaseUrl.test.d.ts.map +1 -0
- package/dist/verificationDatabaseUrl.test.js +66 -0
- package/dist/verificationDatabaseUrl.test.js.map +1 -0
- package/dist/verificationDiagnostics.d.ts.map +1 -1
- package/dist/verificationDiagnostics.js +33 -9
- package/dist/verificationDiagnostics.js.map +1 -1
- package/dist/verificationDiagnostics.test.js +15 -0
- package/dist/verificationDiagnostics.test.js.map +1 -1
- package/dist/verificationPolicy.d.ts +2 -1
- package/dist/verificationPolicy.d.ts.map +1 -1
- package/dist/verificationPolicy.js +97 -0
- package/dist/verificationPolicy.js.map +1 -1
- package/dist/verificationPolicy.test.js +7 -0
- package/dist/verificationPolicy.test.js.map +1 -1
- package/dist/verificationRunContext.d.ts.map +1 -1
- package/dist/verificationRunContext.js +3 -0
- package/dist/verificationRunContext.js.map +1 -1
- package/dist/verificationUserPhrases.d.ts.map +1 -1
- package/dist/verificationUserPhrases.js +21 -0
- package/dist/verificationUserPhrases.js.map +1 -1
- package/dist/verify/batchVerifyTelemetrySubcommand.d.ts.map +1 -1
- package/dist/verify/batchVerifyTelemetrySubcommand.js +131 -33
- package/dist/verify/batchVerifyTelemetrySubcommand.js.map +1 -1
- package/dist/verifyAgentskeptic.d.ts +4 -8
- package/dist/verifyAgentskeptic.d.ts.map +1 -1
- package/dist/verifyAgentskeptic.js +16 -21
- package/dist/verifyAgentskeptic.js.map +1 -1
- package/dist/verifyAgentskeptic.test.js +10 -12
- package/dist/verifyAgentskeptic.test.js.map +1 -1
- package/dist/verifyRunStateFromBufferedRunEvents.d.ts +18 -0
- package/dist/verifyRunStateFromBufferedRunEvents.d.ts.map +1 -0
- package/dist/verifyRunStateFromBufferedRunEvents.js +65 -0
- package/dist/verifyRunStateFromBufferedRunEvents.js.map +1 -0
- package/dist/vitestMonorepoRoot.d.ts +10 -0
- package/dist/vitestMonorepoRoot.d.ts.map +1 -0
- package/dist/vitestMonorepoRoot.js +97 -0
- package/dist/vitestMonorepoRoot.js.map +1 -0
- package/dist/wireReasonCodes.d.ts +21 -0
- package/dist/wireReasonCodes.d.ts.map +1 -1
- package/dist/wireReasonCodes.js +21 -0
- package/dist/wireReasonCodes.js.map +1 -1
- package/package.json +63 -40
- package/schemas/assurance-output-v1.schema.json +81 -0
- package/schemas/compare-run-manifest-v1.schema.json +65 -0
- package/schemas/conformance-normalized-result.schema.json +73 -0
- package/schemas/connector-capabilities.schema.json +38 -0
- package/schemas/event.schema.json +35 -0
- package/schemas/execution-trace-view.schema.json +1 -1
- package/schemas/openapi-commercial-v1.in.yaml +616 -17
- package/schemas/openapi-commercial-v1.yaml +616 -17
- package/schemas/outcome-certificate-v1.schema.json +89 -0
- package/schemas/public-verification-report-v2.schema.json +15 -0
- package/schemas/quick-verify-report.schema.json +1 -1
- package/schemas/regression-artifact-v1.schema.json +212 -0
- package/schemas/tools-registry.schema.json +103 -0
- package/schemas/workflow-engine-result.schema.json +71 -2
- package/schemas/workflow-truth-report.schema.json +12 -0
- package/scripts/discovery-acquisition.lib.cjs +60 -97
- package/scripts/discovery-payload.lib.cjs +41 -7
- package/scripts/emit-primary-marketing.cjs +326 -0
- package/scripts/origin.cjs +52 -0
- package/scripts/public-product-anchors.cjs +3 -0
- package/scripts/validate-marketing.cjs +156 -0
- package/dist/withWorkflowVerification.persistBundle.test.d.ts +0 -2
- package/dist/withWorkflowVerification.persistBundle.test.d.ts.map +0 -1
- package/dist/withWorkflowVerification.persistBundle.test.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
|
-
import { readFileSync, statSync } from "fs";
|
|
3
|
+
import { readFileSync, statSync, writeSync } from "fs";
|
|
4
4
|
import path from "path";
|
|
5
5
|
import { CLI_OPERATIONAL_CODES, cliErrorEnvelope, formatOperationalMessage, } from "./failureCatalog.js";
|
|
6
|
-
import {
|
|
6
|
+
import { buildRegressionArtifactFromCompareManifest, stringifyRegressionArtifact } from "./regressionArtifact.js";
|
|
7
7
|
import { buildExecutionTraceView, formatExecutionTraceText } from "./executionTrace.js";
|
|
8
8
|
import { loadEventsForWorkflow } from "./loadEvents.js";
|
|
9
|
-
import { argValue,
|
|
9
|
+
import { argValue, parseQuickCliArgs } from "./cliArgv.js";
|
|
10
10
|
import { runEnforce } from "./enforceCli.js";
|
|
11
11
|
import { formatRegistryValidationHumanReport, validateToolsRegistry, } from "./registryValidation.js";
|
|
12
12
|
import { loadSchemaValidator } from "./schemaLoad.js";
|
|
@@ -17,23 +17,21 @@ import { normalizeToEmittedWorkflowResult } from "./workflowResultNormalize.js";
|
|
|
17
17
|
import { debugServerEntryUrl, loadCorpusBundle, logCorpusLoadErrors, startDebugServerOnPort, } from "./debugServer.js";
|
|
18
18
|
import { assertPlanPathInsideRepo, buildPlanTransitionEventsNdjson, buildPlanTransitionWorkflowResult, resolveCommitSha, sha256HexOfFile, } from "./planTransition.js";
|
|
19
19
|
import { PLAN_TRANSITION_WORKFLOW_ID } from "./planTransitionConstants.js";
|
|
20
|
-
import {
|
|
21
|
-
import { isV9RunLevelCodesInconsistent } from "./workflowRunLevelConsistency.js";
|
|
22
|
-
import { formatWorkflowTruthReport } from "./workflowTruthReport.js";
|
|
23
|
-
import { workflowEngineResultFromEmitted } from "./workflowResultNormalize.js";
|
|
20
|
+
import { buildOutcomeCertificateFromWorkflowResult } from "./outcomeCertificate.js";
|
|
24
21
|
import { atomicWriteUtf8File } from "./quickVerify/atomicWrite.js";
|
|
25
22
|
import { buildQuickContractEventsNdjson } from "./quickVerify/buildQuickContractEventsNdjson.js";
|
|
26
23
|
import { stableStringify } from "./quickVerify/canonicalJson.js";
|
|
27
|
-
import {
|
|
24
|
+
import { buildOutcomeCertificateFromQuickReport } from "./outcomeCertificate.js";
|
|
28
25
|
import { runQuickVerifyToValidatedReport } from "./quickVerify/runQuickVerify.js";
|
|
29
26
|
import { checkAssuranceReportStale } from "./assurance/checkStale.js";
|
|
27
|
+
import { buildAssuranceRunOutput, buildAssuranceStaleOutput, validateAndSerializeAssuranceOutput, } from "./assurance/buildAssuranceOutput.js";
|
|
30
28
|
import { runAssuranceFromManifest } from "./assurance/runAssurance.js";
|
|
29
|
+
import { newActivationHttpCorrelationId } from "./commercial/activationCorrelation.js";
|
|
31
30
|
import { runLicensePreflightIfNeeded } from "./commercial/licensePreflight.js";
|
|
32
31
|
import { postVerifyOutcomeBeacon } from "./commercial/postVerifyOutcomeBeacon.js";
|
|
33
32
|
import { quickVerifyVerdictToTerminalStatus } from "./commercial/quickVerifyFunnelTerminalStatus.js";
|
|
34
33
|
import { classifyQuickVerifyWorkload } from "./commercial/verifyWorkloadClassify.js";
|
|
35
34
|
import { LICENSE_PREFLIGHT_ENABLED } from "./generated/commercialBuildFlags.js";
|
|
36
|
-
import { orchestrateVerifyBatchLockRun, orchestrateVerifyQuickLockRun } from "./cli/lockOrchestration.js";
|
|
37
35
|
import { formatDistributionFooter } from "./distributionFooter.js";
|
|
38
36
|
import { postPublicVerificationReport } from "./shareReport/postPublicVerificationReport.js";
|
|
39
37
|
import { runBootstrapSubcommand } from "./bootstrap/runBootstrapSubcommand.js";
|
|
@@ -43,17 +41,18 @@ import { maybeEmitOssClaimTicketUrlToStderr } from "./telemetry/maybeEmitOssClai
|
|
|
43
41
|
import { classifyWorkflowLineage } from "./funnel/workflowLineageClassify.js";
|
|
44
42
|
import { postProductActivationEvent } from "./telemetry/postProductActivationEvent.js";
|
|
45
43
|
import { runFunnelAnonCliAndExit } from "./cli/runFunnelAnonSet.js";
|
|
44
|
+
import { fetchCurrentUsage } from "./commercial/getCurrentUsage.js";
|
|
46
45
|
function usageQuick() {
|
|
47
46
|
return `Usage:
|
|
48
47
|
agentskeptic quick --input <path> (--postgres-url <url> | --db <sqlitePath>) --export-registry <path>
|
|
49
|
-
[--emit-events <path>] [--workflow-id <id>] [--share-report-origin <https://host>]
|
|
48
|
+
[--emit-events <path>] [--workflow-id <id>] [--share-report-origin <https://host>] [--no-human-report]
|
|
50
49
|
|
|
51
50
|
Input must contain structured tool activity (tool names and parameters extractable as JSON). Verification uses read-only SQL against the database you pass.
|
|
52
51
|
|
|
53
52
|
Use - for stdin. Writes registry JSON array atomically, then optional events file, then stdout (see docs/quick-verify-normative.md).
|
|
54
53
|
With --share-report-origin, human stderr is deferred until after a successful POST (same contract as batch verify; see docs/shareable-verification-reports.md).
|
|
55
54
|
|
|
56
|
-
|
|
55
|
+
CI enforcement over time is provided by "agentskeptic enforce" (stateful, paid). Lock flags are no longer supported on quick.
|
|
57
56
|
|
|
58
57
|
Exit codes:
|
|
59
58
|
0 verdict pass
|
|
@@ -71,8 +70,8 @@ function usageVerify() {
|
|
|
71
70
|
agentskeptic bootstrap --input <path> (--db <sqlitePath> | --postgres-url <url>) --out <path>
|
|
72
71
|
(BootstrapPackInput v1 JSON → contract pack + in-process verify; see docs/bootstrap-pack-normative.md)
|
|
73
72
|
|
|
74
|
-
agentskeptic crossing --bootstrap-input <path> --pack-out <path> (--db <sqlitePath> | --postgres-url <url>) [--no-
|
|
75
|
-
agentskeptic crossing --workflow-id <id> --events <path> --registry <path> (--db <sqlitePath> | --postgres-url <url>) [--no-
|
|
73
|
+
agentskeptic crossing --bootstrap-input <path> --pack-out <path> (--db <sqlitePath> | --postgres-url <url>) [--no-human-report]
|
|
74
|
+
agentskeptic crossing --workflow-id <id> --events <path> --registry <path> (--db <sqlitePath> | --postgres-url <url>) [--no-human-report]
|
|
76
75
|
(canonical integrator crossing: bootstrap-led or pack-led; see docs/crossing-normative.md)
|
|
77
76
|
|
|
78
77
|
agentskeptic verify-integrator-owned --workflow-id <id> --events <path> --registry <path> (--db <sqlitePath> | --postgres-url <url>)
|
|
@@ -81,8 +80,9 @@ function usageVerify() {
|
|
|
81
80
|
agentskeptic --workflow-id <id> --events <path> --registry <path> --db <sqlitePath>
|
|
82
81
|
agentskeptic --workflow-id <id> --events <path> --registry <path> --postgres-url <url>
|
|
83
82
|
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
Stateful CI enforcement uses:
|
|
84
|
+
agentskeptic enforce --workflow-id <id> --events <path> --registry <path> (--db <sqlitePath> | --postgres-url <url>)
|
|
85
|
+
with optional --create-baseline or --accept-drift.
|
|
86
86
|
|
|
87
87
|
Optional consistency (default strong):
|
|
88
88
|
--consistency strong|eventual
|
|
@@ -95,18 +95,18 @@ With strong, do not pass --verification-window-ms or --poll-interval-ms.
|
|
|
95
95
|
Provide exactly one of --db or --postgres-url.
|
|
96
96
|
|
|
97
97
|
Optional output:
|
|
98
|
-
--no-
|
|
99
|
-
--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
|
|
98
|
+
--no-human-report For verdict exits 0–2, do not print certificate.humanReport or distribution footer to stderr (stderr empty). stdout Outcome Certificate JSON is unchanged. Exit 3 stderr is unchanged (single-line JSON envelope).
|
|
99
|
+
--share-report-origin <https://host> After successful verification, POST a shareable report (v2 envelope) to that origin (https only, origin with no path), then print human report + footer to stderr and Outcome Certificate 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.
|
|
100
100
|
|
|
101
101
|
Exit codes:
|
|
102
102
|
0 workflow status complete
|
|
103
103
|
1 workflow status inconsistent
|
|
104
104
|
2 workflow status incomplete
|
|
105
105
|
3 operational failure (see stderr JSON)
|
|
106
|
-
4
|
|
106
|
+
4 reserved for stateful enforce drift mismatch
|
|
107
107
|
|
|
108
|
-
agentskeptic compare --
|
|
109
|
-
Compare
|
|
108
|
+
agentskeptic compare --manifest <compare-run-manifest.json>
|
|
109
|
+
Compare runs from a manifest (workflow results + events paths; see docs/regression-artifact-normative.md).
|
|
110
110
|
|
|
111
111
|
agentskeptic validate-registry --registry <path>
|
|
112
112
|
agentskeptic validate-registry --registry <path> --events <path> --workflow-id <id>
|
|
@@ -116,9 +116,9 @@ Exit codes:
|
|
|
116
116
|
agentskeptic execution-trace --workflow-id <id> --events <path> [--workflow-result <path>] [--format json|text]
|
|
117
117
|
Emit ExecutionTraceView JSON or text (see docs/agentskeptic.md).
|
|
118
118
|
|
|
119
|
-
agentskeptic enforce
|
|
120
|
-
|
|
121
|
-
CI enforcement
|
|
119
|
+
agentskeptic enforce --workflow-id <id> --events <path> --registry <path> (--db <sqlitePath> | --postgres-url <url>)
|
|
120
|
+
[--create-baseline | --accept-drift]
|
|
121
|
+
CI enforcement over time (stateful baseline/drift workflow).
|
|
122
122
|
|
|
123
123
|
agentskeptic assurance run --manifest <path> [--write-report <path>]
|
|
124
124
|
agentskeptic assurance stale --report <path> --max-age-hours <n>
|
|
@@ -139,12 +139,24 @@ Advanced / optional (persisted runs, signing, local UI, plan/git checks):
|
|
|
139
139
|
|
|
140
140
|
--help, -h print this message and exit 0`;
|
|
141
141
|
}
|
|
142
|
+
function usageCurrentCommand() {
|
|
143
|
+
return `Usage:
|
|
144
|
+
agentskeptic usage [--json]
|
|
145
|
+
|
|
146
|
+
Shows current commercial quota usage from GET /api/v1/usage/current.
|
|
147
|
+
|
|
148
|
+
Exit codes:
|
|
149
|
+
0 success
|
|
150
|
+
3 operational failure (stderr: JSON envelope)
|
|
151
|
+
|
|
152
|
+
--help, -h print this message and exit 0`;
|
|
153
|
+
}
|
|
142
154
|
function usageVerifyIntegratorOwned() {
|
|
143
155
|
return `Usage:
|
|
144
156
|
agentskeptic verify-integrator-owned --workflow-id <id> --events <path> --registry <path> --db <sqlitePath>
|
|
145
157
|
agentskeptic verify-integrator-owned --workflow-id <id> --events <path> --registry <path> --postgres-url <url>
|
|
146
158
|
|
|
147
|
-
Same flags and verification semantics as contract batch verify, except paths classified as bundled_examples are rejected (exit 2; stderr: INTEGRATOR_OWNED_GATE).
|
|
159
|
+
Same flags and verification semantics as contract batch verify, except paths classified as bundled_examples are rejected (exit 2; stderr: INTEGRATOR_OWNED_GATE).
|
|
148
160
|
|
|
149
161
|
See docs/agentskeptic.md (Integrator-owned gate).
|
|
150
162
|
|
|
@@ -294,13 +306,13 @@ function runExecutionTraceSubcommand(args) {
|
|
|
294
306
|
}
|
|
295
307
|
function usageCompare() {
|
|
296
308
|
return `Usage:
|
|
297
|
-
agentskeptic compare --
|
|
309
|
+
agentskeptic compare --manifest <compare-run-manifest.json>
|
|
298
310
|
|
|
299
|
-
|
|
300
|
-
|
|
311
|
+
Manifest schema: schemas/compare-run-manifest-v1.schema.json.
|
|
312
|
+
Success: stdout is UTF-8 RegressionArtifactV1 JSON (sorted keys); stderr is artifact.humanText only.
|
|
301
313
|
|
|
302
314
|
Exit codes:
|
|
303
|
-
0 comparison succeeded
|
|
315
|
+
0 comparison succeeded
|
|
304
316
|
3 operational failure (stderr: JSON envelope only; stdout empty)
|
|
305
317
|
|
|
306
318
|
--help, -h print this message and exit 0`;
|
|
@@ -315,8 +327,13 @@ function usageAssurance() {
|
|
|
315
327
|
|
|
316
328
|
assurance run executes each manifest scenario by spawning this CLI (schemas/assurance-manifest-v1.schema.json).
|
|
317
329
|
Path arguments in each scenario argv are resolved relative to the manifest file's directory unless absolute.
|
|
330
|
+
Successful stdout is a single JSON line: schemas/assurance-output-v1.schema.json (kind assurance_run) with
|
|
331
|
+
embedded runReport (schemas/assurance-run-report-v1.schema.json). Scenario spawn wall time is capped by
|
|
332
|
+
AGENTSKEPTIC_ASSURANCE_SCENARIO_TIMEOUT_MS (default 900000 ms); timed-out scenarios record exitCode 124.
|
|
318
333
|
|
|
319
334
|
assurance stale exits 1 when the report issuedAt is older than max-age-hours (UTC wall clock).
|
|
335
|
+
Successful stdout is one JSON line (kind assurance_stale). issuedAt more than ~5 minutes in the future
|
|
336
|
+
is exit 3 (ASSURANCE_REPORT_ISSUED_AT_FUTURE_SKEW). Human stale stderr is not used.
|
|
320
337
|
|
|
321
338
|
Exit codes (run):
|
|
322
339
|
0 all scenarios exited 0
|
|
@@ -349,7 +366,15 @@ function runAssuranceSubcommand(args) {
|
|
|
349
366
|
writeCliError(res.code, res.message);
|
|
350
367
|
process.exit(3);
|
|
351
368
|
}
|
|
352
|
-
|
|
369
|
+
let line;
|
|
370
|
+
try {
|
|
371
|
+
line = validateAndSerializeAssuranceOutput(buildAssuranceRunOutput(res.report));
|
|
372
|
+
}
|
|
373
|
+
catch (e) {
|
|
374
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
375
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(`assurance output: ${msg}`));
|
|
376
|
+
process.exit(3);
|
|
377
|
+
}
|
|
353
378
|
try {
|
|
354
379
|
process.stdout.write(line);
|
|
355
380
|
}
|
|
@@ -387,11 +412,29 @@ function runAssuranceSubcommand(args) {
|
|
|
387
412
|
writeCliError(st.code, st.message);
|
|
388
413
|
process.exit(3);
|
|
389
414
|
}
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
415
|
+
let staleLine;
|
|
416
|
+
try {
|
|
417
|
+
staleLine = validateAndSerializeAssuranceOutput(buildAssuranceStaleOutput({
|
|
418
|
+
fresh: st.kind === "fresh",
|
|
419
|
+
issuedAt: st.issuedAt,
|
|
420
|
+
ageMs: st.ageMs,
|
|
421
|
+
maxAgeHours: st.maxAgeHours,
|
|
422
|
+
}));
|
|
393
423
|
}
|
|
394
|
-
|
|
424
|
+
catch (e) {
|
|
425
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
426
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(`assurance output: ${msg}`));
|
|
427
|
+
process.exit(3);
|
|
428
|
+
}
|
|
429
|
+
try {
|
|
430
|
+
process.stdout.write(staleLine);
|
|
431
|
+
}
|
|
432
|
+
catch (e) {
|
|
433
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
434
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(`stdout: ${msg}`));
|
|
435
|
+
process.exit(3);
|
|
436
|
+
}
|
|
437
|
+
process.exit(st.kind === "fresh" ? 0 : 1);
|
|
395
438
|
}
|
|
396
439
|
writeCliError(CLI_OPERATIONAL_CODES.ASSURANCE_USAGE, "Use agentskeptic assurance run or agentskeptic assurance stale.");
|
|
397
440
|
process.exit(3);
|
|
@@ -401,18 +444,10 @@ async function runQuickSubcommand(args) {
|
|
|
401
444
|
console.log(usageQuick());
|
|
402
445
|
process.exit(0);
|
|
403
446
|
}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
const hasExpectQ = expectLockQ !== undefined;
|
|
407
|
-
const hasOutputQ = outputLockQ !== undefined;
|
|
408
|
-
if (hasExpectQ && hasOutputQ) {
|
|
409
|
-
writeCliError(CLI_OPERATIONAL_CODES.ENFORCE_USAGE, "quick requires exactly one of --expect-lock <path> or --output-lock <path>.");
|
|
447
|
+
if (argValue(args, "--expect-lock") !== undefined || argValue(args, "--output-lock") !== undefined) {
|
|
448
|
+
writeCliError(CLI_OPERATIONAL_CODES.ENFORCE_USAGE, "Lock flags are removed. Use `agentskeptic verify` for stateless checks or `agentskeptic enforce` for stateful CI enforcement.");
|
|
410
449
|
process.exit(3);
|
|
411
450
|
}
|
|
412
|
-
if (hasExpectQ !== hasOutputQ) {
|
|
413
|
-
await orchestrateVerifyQuickLockRun(args);
|
|
414
|
-
return;
|
|
415
|
-
}
|
|
416
451
|
let pq;
|
|
417
452
|
try {
|
|
418
453
|
pq = parseQuickCliArgs(args);
|
|
@@ -424,13 +459,17 @@ async function runQuickSubcommand(args) {
|
|
|
424
459
|
}
|
|
425
460
|
throw e;
|
|
426
461
|
}
|
|
427
|
-
const { inputPath, exportPath, emitEventsPath, workflowIdQuick, dbPath, postgresUrl, shareReportOrigin } = pq;
|
|
462
|
+
const { inputPath, exportPath, emitEventsPath, workflowIdQuick, dbPath, postgresUrl, shareReportOrigin, noHumanReport, } = pq;
|
|
428
463
|
const activationRunId = process.env.AGENTSKEPTIC_RUN_ID?.trim() ||
|
|
429
464
|
process.env.WORKFLOW_VERIFIER_RUN_ID?.trim() ||
|
|
430
465
|
randomUUID();
|
|
466
|
+
const quickHttpCorrelationId = newActivationHttpCorrelationId();
|
|
431
467
|
let quickPreflight;
|
|
432
468
|
try {
|
|
433
|
-
quickPreflight = await runLicensePreflightIfNeeded("verify", {
|
|
469
|
+
quickPreflight = await runLicensePreflightIfNeeded("verify", {
|
|
470
|
+
runId: activationRunId,
|
|
471
|
+
xRequestId: quickHttpCorrelationId,
|
|
472
|
+
});
|
|
434
473
|
}
|
|
435
474
|
catch (e) {
|
|
436
475
|
if (e instanceof TruthLayerError) {
|
|
@@ -523,20 +562,22 @@ async function runQuickSubcommand(args) {
|
|
|
523
562
|
process.exit(3);
|
|
524
563
|
}
|
|
525
564
|
}
|
|
526
|
-
const
|
|
565
|
+
const quickHumanOpts = {
|
|
527
566
|
workflowId: workflowIdQuick,
|
|
528
567
|
eventsPath: emitEventsPath !== undefined ? emitEventsPath : undefined,
|
|
529
568
|
registryPath: exportPath,
|
|
530
569
|
dbFlag: dbPath ?? undefined,
|
|
531
570
|
postgresUrl: postgresUrl !== undefined,
|
|
571
|
+
};
|
|
572
|
+
const certificate = buildOutcomeCertificateFromQuickReport({
|
|
573
|
+
report,
|
|
574
|
+
workflowId: workflowIdQuick,
|
|
575
|
+
humanReportOptions: quickHumanOpts,
|
|
532
576
|
});
|
|
533
577
|
if (shareReportOrigin !== undefined) {
|
|
534
578
|
const shareRes = await postPublicVerificationReport(shareReportOrigin, {
|
|
535
|
-
schemaVersion:
|
|
536
|
-
|
|
537
|
-
workflowDisplayId: workflowIdQuick,
|
|
538
|
-
quickReport: report,
|
|
539
|
-
humanReportText: human,
|
|
579
|
+
schemaVersion: 2,
|
|
580
|
+
certificate,
|
|
540
581
|
});
|
|
541
582
|
if (!shareRes.ok) {
|
|
542
583
|
writeCliError(CLI_OPERATIONAL_CODES.SHARE_REPORT_FAILED, formatOperationalMessage(`share_report_origin=${shareReportOrigin} http_status=${String(shareRes.status)} detail=${shareRes.bodySnippet}`));
|
|
@@ -544,27 +585,32 @@ async function runQuickSubcommand(args) {
|
|
|
544
585
|
}
|
|
545
586
|
}
|
|
546
587
|
try {
|
|
547
|
-
|
|
588
|
+
writeSync(1, `${stableStringify(certificate)}\n`);
|
|
548
589
|
}
|
|
549
590
|
catch (e) {
|
|
550
591
|
const msg = e instanceof Error ? e.message : String(e);
|
|
551
592
|
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(`stdout: ${msg}`));
|
|
552
593
|
process.exit(3);
|
|
553
594
|
}
|
|
554
|
-
|
|
555
|
-
|
|
595
|
+
if (!noHumanReport) {
|
|
596
|
+
console.error(certificate.humanReport);
|
|
597
|
+
process.stderr.write(formatDistributionFooter());
|
|
598
|
+
}
|
|
556
599
|
await maybeEmitOssClaimTicketUrlToStderr({
|
|
557
600
|
run_id: activationRunId,
|
|
558
601
|
terminal_status: quickVerifyVerdictToTerminalStatus(report.verdict),
|
|
559
602
|
workload_class: quickWorkloadClass,
|
|
560
603
|
subcommand: "quick_verify",
|
|
561
604
|
build_profile: quickBuildProfile,
|
|
605
|
+
xRequestId: quickHttpCorrelationId,
|
|
562
606
|
});
|
|
563
607
|
await postVerifyOutcomeBeacon({
|
|
564
608
|
runId: quickPreflight.runId,
|
|
609
|
+
certificate,
|
|
565
610
|
terminal_status: quickVerifyVerdictToTerminalStatus(report.verdict),
|
|
566
611
|
workload_class: quickWorkloadClass,
|
|
567
612
|
subcommand: "quick_verify",
|
|
613
|
+
xRequestId: quickHttpCorrelationId,
|
|
568
614
|
});
|
|
569
615
|
if (report.verdict === "pass")
|
|
570
616
|
process.exit(0);
|
|
@@ -688,78 +734,27 @@ function runCompareSubcommand(args) {
|
|
|
688
734
|
console.log(usageCompare());
|
|
689
735
|
process.exit(0);
|
|
690
736
|
}
|
|
691
|
-
const
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_USAGE, "compare requires at least one --prior and --current.");
|
|
737
|
+
const manifestPath = argValue(args, "--manifest");
|
|
738
|
+
if (!manifestPath) {
|
|
739
|
+
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_USAGE, "compare requires --manifest <path>.");
|
|
695
740
|
process.exit(3);
|
|
696
741
|
}
|
|
697
|
-
|
|
698
|
-
const validateCompareInput = loadSchemaValidator("workflow-result-compare-input");
|
|
699
|
-
const results = [];
|
|
700
|
-
const displayLabels = [];
|
|
701
|
-
for (const filePath of paths) {
|
|
702
|
-
displayLabels.push(path.basename(filePath));
|
|
703
|
-
let raw;
|
|
704
|
-
try {
|
|
705
|
-
raw = readFileSync(filePath, "utf8");
|
|
706
|
-
}
|
|
707
|
-
catch (e) {
|
|
708
|
-
const msg = e instanceof Error ? e.message : String(e);
|
|
709
|
-
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_INPUT_READ_FAILED, formatOperationalMessage(msg));
|
|
710
|
-
process.exit(3);
|
|
711
|
-
}
|
|
712
|
-
let parsed;
|
|
713
|
-
try {
|
|
714
|
-
parsed = JSON.parse(raw);
|
|
715
|
-
}
|
|
716
|
-
catch (e) {
|
|
717
|
-
const msg = e instanceof Error ? e.message : String(e);
|
|
718
|
-
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_INPUT_JSON_SYNTAX, formatOperationalMessage(msg));
|
|
719
|
-
process.exit(3);
|
|
720
|
-
}
|
|
721
|
-
if (isV9RunLevelCodesInconsistent(parsed)) {
|
|
722
|
-
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_INPUT_RUN_LEVEL_INCONSISTENT, COMPARE_INPUT_RUN_LEVEL_INCONSISTENT_MESSAGE);
|
|
723
|
-
process.exit(3);
|
|
724
|
-
}
|
|
725
|
-
if (!validateCompareInput(parsed)) {
|
|
726
|
-
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_INPUT_SCHEMA_INVALID, JSON.stringify(validateCompareInput.errors ?? []));
|
|
727
|
-
process.exit(3);
|
|
728
|
-
}
|
|
729
|
-
try {
|
|
730
|
-
results.push(normalizeToEmittedWorkflowResult(parsed));
|
|
731
|
-
}
|
|
732
|
-
catch (e) {
|
|
733
|
-
if (e instanceof TruthLayerError) {
|
|
734
|
-
writeCliError(e.code, e.message);
|
|
735
|
-
process.exit(3);
|
|
736
|
-
}
|
|
737
|
-
throw e;
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
const wf0 = results[0].workflowId;
|
|
741
|
-
for (const r of results) {
|
|
742
|
-
if (r.workflowId !== wf0) {
|
|
743
|
-
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_WORKFLOW_ID_MISMATCH, "All WorkflowResult inputs must share the same workflowId.");
|
|
744
|
-
process.exit(3);
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
let report;
|
|
742
|
+
let artifact;
|
|
748
743
|
try {
|
|
749
|
-
|
|
744
|
+
const built = buildRegressionArtifactFromCompareManifest(manifestPath);
|
|
745
|
+
artifact = built.artifact;
|
|
750
746
|
}
|
|
751
747
|
catch (e) {
|
|
748
|
+
if (e instanceof TruthLayerError) {
|
|
749
|
+
writeCliError(e.code, e.message);
|
|
750
|
+
process.exit(3);
|
|
751
|
+
}
|
|
752
752
|
const msg = e instanceof Error ? e.message : String(e);
|
|
753
753
|
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(msg));
|
|
754
754
|
process.exit(3);
|
|
755
755
|
}
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
writeCliError(CLI_OPERATIONAL_CODES.COMPARE_RUN_COMPARISON_REPORT_INVALID, JSON.stringify(validateReport.errors ?? []));
|
|
759
|
-
process.exit(3);
|
|
760
|
-
}
|
|
761
|
-
process.stderr.write(`${formatRunComparisonReport(report)}\n`);
|
|
762
|
-
console.log(JSON.stringify(report));
|
|
756
|
+
process.stderr.write(artifact.humanText.endsWith("\n") ? artifact.humanText : `${artifact.humanText}\n`);
|
|
757
|
+
process.stdout.write(`${stringifyRegressionArtifact(artifact)}\n`);
|
|
763
758
|
process.exit(0);
|
|
764
759
|
}
|
|
765
760
|
function usageDebug() {
|
|
@@ -829,7 +824,7 @@ function usagePlanTransition() {
|
|
|
829
824
|
|
|
830
825
|
Optional:
|
|
831
826
|
--workflow-id <id> (default ${PLAN_TRANSITION_WORKFLOW_ID})
|
|
832
|
-
--no-
|
|
827
|
+
--no-human-report
|
|
833
828
|
--write-run-bundle <dir>
|
|
834
829
|
--sign-ed25519-private-key <path> (requires --write-run-bundle)
|
|
835
830
|
|
|
@@ -857,7 +852,7 @@ function runPlanTransitionSubcommand(args) {
|
|
|
857
852
|
process.exit(3);
|
|
858
853
|
}
|
|
859
854
|
const workflowId = argValue(args, "--workflow-id") ?? PLAN_TRANSITION_WORKFLOW_ID;
|
|
860
|
-
const
|
|
855
|
+
const noHumanReport = args.includes("--no-human-report");
|
|
861
856
|
const writeRunBundleDir = argValue(args, "--write-run-bundle");
|
|
862
857
|
const signPrivateKeyPath = argValue(args, "--sign-ed25519-private-key");
|
|
863
858
|
if (signPrivateKeyPath !== undefined && writeRunBundleDir === undefined) {
|
|
@@ -889,9 +884,9 @@ function runPlanTransitionSubcommand(args) {
|
|
|
889
884
|
writeCliError(CLI_OPERATIONAL_CODES.WORKFLOW_RESULT_SCHEMA_INVALID, JSON.stringify(validateResult.errors ?? []));
|
|
890
885
|
process.exit(3);
|
|
891
886
|
}
|
|
892
|
-
if (!
|
|
893
|
-
const
|
|
894
|
-
process.stderr.write(`${
|
|
887
|
+
if (!noHumanReport) {
|
|
888
|
+
const cert = buildOutcomeCertificateFromWorkflowResult(result, "contract_sql");
|
|
889
|
+
process.stderr.write(`${cert.humanReport}\n`);
|
|
895
890
|
}
|
|
896
891
|
if (writeRunBundleDir !== undefined) {
|
|
897
892
|
try {
|
|
@@ -931,6 +926,34 @@ function runPlanTransitionSubcommand(args) {
|
|
|
931
926
|
}
|
|
932
927
|
async function main() {
|
|
933
928
|
const args = process.argv.slice(2);
|
|
929
|
+
if (args[0] === "usage") {
|
|
930
|
+
const rest = args.slice(1);
|
|
931
|
+
if (rest.includes("--help") || rest.includes("-h")) {
|
|
932
|
+
console.log(usageCurrentCommand());
|
|
933
|
+
process.exit(0);
|
|
934
|
+
}
|
|
935
|
+
const asJson = rest.includes("--json");
|
|
936
|
+
try {
|
|
937
|
+
const payload = await fetchCurrentUsage();
|
|
938
|
+
if (asJson) {
|
|
939
|
+
console.log(JSON.stringify(payload));
|
|
940
|
+
}
|
|
941
|
+
else {
|
|
942
|
+
const included = payload.included_monthly === null ? "unlimited" : String(payload.included_monthly);
|
|
943
|
+
process.stdout.write(`Plan: ${payload.plan}\nMonth: ${payload.year_month}\nUsed: ${payload.used_total}\nIncluded: ${included}\nOverage: ${payload.overage_count}\nState: ${payload.quota_state}\nAllowed next: ${payload.allowed_next}\nEstimated overage USD: ${payload.estimated_overage_usd}\n`);
|
|
944
|
+
}
|
|
945
|
+
process.exit(0);
|
|
946
|
+
}
|
|
947
|
+
catch (e) {
|
|
948
|
+
if (e instanceof TruthLayerError) {
|
|
949
|
+
writeCliError(e.code, e.message);
|
|
950
|
+
process.exit(3);
|
|
951
|
+
}
|
|
952
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
953
|
+
writeCliError(CLI_OPERATIONAL_CODES.INTERNAL_ERROR, formatOperationalMessage(msg));
|
|
954
|
+
process.exit(3);
|
|
955
|
+
}
|
|
956
|
+
}
|
|
934
957
|
if (args[0] === "funnel-anon") {
|
|
935
958
|
await runFunnelAnonCliAndExit(args.slice(1));
|
|
936
959
|
return;
|
|
@@ -990,22 +1013,10 @@ async function main() {
|
|
|
990
1013
|
}
|
|
991
1014
|
process.exit(0);
|
|
992
1015
|
}
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
const hasExpectB = expectLockB !== undefined;
|
|
996
|
-
const hasOutputB = outputLockB !== undefined;
|
|
997
|
-
if (hasExpectB && hasOutputB) {
|
|
998
|
-
writeCliError(CLI_OPERATIONAL_CODES.ENFORCE_USAGE, "batch verify requires exactly one of --expect-lock <path> or --output-lock <path>.");
|
|
1016
|
+
if (argValue(verifyCliArgs, "--expect-lock") !== undefined || argValue(verifyCliArgs, "--output-lock") !== undefined) {
|
|
1017
|
+
writeCliError(CLI_OPERATIONAL_CODES.ENFORCE_USAGE, "Lock flags are removed. Use `agentskeptic enforce` for over-time CI enforcement.");
|
|
999
1018
|
process.exit(3);
|
|
1000
1019
|
}
|
|
1001
|
-
if (hasExpectB !== hasOutputB) {
|
|
1002
|
-
if (leadIsIntegratorOwned) {
|
|
1003
|
-
writeCliError(CLI_OPERATIONAL_CODES.CLI_USAGE, "verify-integrator-owned does not support --output-lock or --expect-lock; use standard contract verify for CI lock flows.");
|
|
1004
|
-
process.exit(3);
|
|
1005
|
-
}
|
|
1006
|
-
await orchestrateVerifyBatchLockRun(verifyCliArgs);
|
|
1007
|
-
return;
|
|
1008
|
-
}
|
|
1009
1020
|
await runBatchVerifyWithTelemetrySubcommand(verifyCliArgs, {
|
|
1010
1021
|
telemetrySubcommand: leadIsIntegratorOwned ? "verify_integrator_owned" : "batch_verify",
|
|
1011
1022
|
rejectBundled: leadIsIntegratorOwned,
|