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.
Files changed (386) hide show
  1. package/README.md +39 -39
  2. package/config/marketing.json +187 -0
  3. package/dist/actionableFailure.d.ts.map +1 -1
  4. package/dist/actionableFailure.js +95 -0
  5. package/dist/actionableFailure.js.map +1 -1
  6. package/dist/actionableFailure.remediationExhaustive.test.js +4 -4
  7. package/dist/actionableFailure.remediationExhaustive.test.js.map +1 -1
  8. package/dist/agentRunBundle.d.ts +2 -0
  9. package/dist/agentRunBundle.d.ts.map +1 -1
  10. package/dist/agentRunBundle.js +4 -0
  11. package/dist/agentRunBundle.js.map +1 -1
  12. package/dist/assurance/assurancePathArgs.d.ts.map +1 -1
  13. package/dist/assurance/assurancePathArgs.js +1 -0
  14. package/dist/assurance/assurancePathArgs.js.map +1 -1
  15. package/dist/assurance/buildAssuranceOutput.d.ts +29 -0
  16. package/dist/assurance/buildAssuranceOutput.d.ts.map +1 -0
  17. package/dist/assurance/buildAssuranceOutput.js +53 -0
  18. package/dist/assurance/buildAssuranceOutput.js.map +1 -0
  19. package/dist/assurance/checkStale.d.ts +7 -0
  20. package/dist/assurance/checkStale.d.ts.map +1 -1
  21. package/dist/assurance/checkStale.js +14 -3
  22. package/dist/assurance/checkStale.js.map +1 -1
  23. package/dist/assurance/runAssurance.d.ts.map +1 -1
  24. package/dist/assurance/runAssurance.js +26 -3
  25. package/dist/assurance/runAssurance.js.map +1 -1
  26. package/dist/bootstrap/executeBootstrapPack.d.ts.map +1 -1
  27. package/dist/bootstrap/executeBootstrapPack.js +3 -2
  28. package/dist/bootstrap/executeBootstrapPack.js.map +1 -1
  29. package/dist/certificateDigest.d.ts +4 -0
  30. package/dist/certificateDigest.d.ts.map +1 -0
  31. package/dist/certificateDigest.js +7 -0
  32. package/dist/certificateDigest.js.map +1 -0
  33. package/dist/certificateDigest.test.d.ts +2 -0
  34. package/dist/certificateDigest.test.d.ts.map +1 -0
  35. package/dist/certificateDigest.test.js +14 -0
  36. package/dist/certificateDigest.test.js.map +1 -0
  37. package/dist/ciLockWorkflow.js +1 -1
  38. package/dist/cli/lockOrchestration.d.ts.map +1 -1
  39. package/dist/cli/lockOrchestration.js +81 -50
  40. package/dist/cli/lockOrchestration.js.map +1 -1
  41. package/dist/cli/lockOrchestration.test.js +7 -1
  42. package/dist/cli/lockOrchestration.test.js.map +1 -1
  43. package/dist/cli/runFunnelAnonSet.js +1 -1
  44. package/dist/cli.js +147 -136
  45. package/dist/cli.js.map +1 -1
  46. package/dist/cliArgv.d.ts +4 -1
  47. package/dist/cliArgv.d.ts.map +1 -1
  48. package/dist/cliArgv.js +9 -4
  49. package/dist/cliArgv.js.map +1 -1
  50. package/dist/cliArgv.test.d.ts +2 -0
  51. package/dist/cliArgv.test.d.ts.map +1 -0
  52. package/dist/cliArgv.test.js +34 -0
  53. package/dist/cliArgv.test.js.map +1 -0
  54. package/dist/cliOperationalCodes.d.ts +8 -0
  55. package/dist/cliOperationalCodes.d.ts.map +1 -1
  56. package/dist/cliOperationalCodes.js +8 -0
  57. package/dist/cliOperationalCodes.js.map +1 -1
  58. package/dist/commercial/activationCorrelation.d.ts +3 -0
  59. package/dist/commercial/activationCorrelation.d.ts.map +1 -0
  60. package/dist/commercial/activationCorrelation.js +6 -0
  61. package/dist/commercial/activationCorrelation.js.map +1 -0
  62. package/dist/commercial/getCurrentUsage.d.ts +16 -0
  63. package/dist/commercial/getCurrentUsage.d.ts.map +1 -0
  64. package/dist/commercial/getCurrentUsage.js +33 -0
  65. package/dist/commercial/getCurrentUsage.js.map +1 -0
  66. package/dist/commercial/licensePreflight.d.ts +1 -0
  67. package/dist/commercial/licensePreflight.d.ts.map +1 -1
  68. package/dist/commercial/licensePreflight.js +27 -8
  69. package/dist/commercial/licensePreflight.js.map +1 -1
  70. package/dist/commercial/postVerifyOutcomeBeacon.d.ts +5 -3
  71. package/dist/commercial/postVerifyOutcomeBeacon.d.ts.map +1 -1
  72. package/dist/commercial/postVerifyOutcomeBeacon.js +17 -10
  73. package/dist/commercial/postVerifyOutcomeBeacon.js.map +1 -1
  74. package/dist/commercial/verifyOutcomeBeaconBody.d.ts +12 -0
  75. package/dist/commercial/verifyOutcomeBeaconBody.d.ts.map +1 -0
  76. package/dist/commercial/verifyOutcomeBeaconBody.js +26 -0
  77. package/dist/commercial/verifyOutcomeBeaconBody.js.map +1 -0
  78. package/dist/commercial/verifyWorkloadClassify.d.ts +2 -7
  79. package/dist/commercial/verifyWorkloadClassify.d.ts.map +1 -1
  80. package/dist/commercial/verifyWorkloadClassify.js +1 -1
  81. package/dist/commercial/verifyWorkloadClassify.js.map +1 -1
  82. package/dist/commercial/verifyWorkloadClassify.test.js +7 -0
  83. package/dist/commercial/verifyWorkloadClassify.test.js.map +1 -1
  84. package/dist/compare.acceptance.test.js +25 -0
  85. package/dist/compare.acceptance.test.js.map +1 -1
  86. package/dist/compareRunManifest.d.ts +32 -0
  87. package/dist/compareRunManifest.d.ts.map +1 -0
  88. package/dist/compareRunManifest.js +60 -0
  89. package/dist/compareRunManifest.js.map +1 -0
  90. package/dist/crossing/crossingDecisionReadyFooter.d.ts +1 -1
  91. package/dist/crossing/crossingDecisionReadyFooter.js +1 -1
  92. package/dist/crossing/runCrossingSubcommand.js +8 -8
  93. package/dist/debug-ui/app.css +42 -0
  94. package/dist/debug-ui/app.js +206 -15
  95. package/dist/debug-ui/index.html +11 -4
  96. package/dist/debug-ui/urlState.d.ts +15 -0
  97. package/dist/debug-ui/urlState.js +92 -0
  98. package/dist/debugCorpus.test.js +33 -7
  99. package/dist/debugCorpus.test.js.map +1 -1
  100. package/dist/debugPanels.d.ts +0 -3
  101. package/dist/debugPanels.d.ts.map +1 -1
  102. package/dist/debugPanels.js +0 -23
  103. package/dist/debugPanels.js.map +1 -1
  104. package/dist/debugPanels.test.js +16 -15
  105. package/dist/debugPanels.test.js.map +1 -1
  106. package/dist/debugServer.d.ts.map +1 -1
  107. package/dist/debugServer.js +19 -16
  108. package/dist/debugServer.js.map +1 -1
  109. package/dist/debugServer.test.js +18 -9
  110. package/dist/debugServer.test.js.map +1 -1
  111. package/dist/debugUiUrlState.test.d.ts +2 -0
  112. package/dist/debugUiUrlState.test.d.ts.map +1 -0
  113. package/dist/debugUiUrlState.test.js +49 -0
  114. package/dist/debugUiUrlState.test.js.map +1 -0
  115. package/dist/decisionBlocker.contract.test.d.ts +2 -0
  116. package/dist/decisionBlocker.contract.test.d.ts.map +1 -0
  117. package/dist/decisionBlocker.contract.test.js +51 -0
  118. package/dist/decisionBlocker.contract.test.js.map +1 -0
  119. package/dist/decisionBlocker.d.ts +10 -0
  120. package/dist/decisionBlocker.d.ts.map +1 -0
  121. package/dist/decisionBlocker.js +66 -0
  122. package/dist/decisionBlocker.js.map +1 -0
  123. package/dist/decisionGate.assertSafe.test.d.ts +2 -0
  124. package/dist/decisionGate.assertSafe.test.d.ts.map +1 -0
  125. package/dist/decisionGate.assertSafe.test.js +52 -0
  126. package/dist/decisionGate.assertSafe.test.js.map +1 -0
  127. package/dist/decisionGate.d.ts +23 -0
  128. package/dist/decisionGate.d.ts.map +1 -0
  129. package/dist/decisionGate.js +85 -0
  130. package/dist/decisionGate.js.map +1 -0
  131. package/dist/decisionGate.persistBundle.test.d.ts +2 -0
  132. package/dist/decisionGate.persistBundle.test.d.ts.map +1 -0
  133. package/dist/{withWorkflowVerification.persistBundle.test.js → decisionGate.persistBundle.test.js} +31 -19
  134. package/dist/decisionGate.persistBundle.test.js.map +1 -0
  135. package/dist/decisionUnsafeError.d.ts +8 -0
  136. package/dist/decisionUnsafeError.d.ts.map +1 -0
  137. package/dist/decisionUnsafeError.js +12 -0
  138. package/dist/decisionUnsafeError.js.map +1 -0
  139. package/dist/discovery-payload-v1.json +167 -59
  140. package/dist/enforceCli.d.ts.map +1 -1
  141. package/dist/enforceCli.js +15 -40
  142. package/dist/enforceCli.js.map +1 -1
  143. package/dist/enforceStateful.d.ts +2 -0
  144. package/dist/enforceStateful.d.ts.map +1 -0
  145. package/dist/enforceStateful.js +106 -0
  146. package/dist/enforceStateful.js.map +1 -0
  147. package/dist/enforcementProjection.d.ts +17 -0
  148. package/dist/enforcementProjection.d.ts.map +1 -0
  149. package/dist/enforcementProjection.js +20 -0
  150. package/dist/enforcementProjection.js.map +1 -0
  151. package/dist/executionPathFindings.d.ts +1 -1
  152. package/dist/executionPathFindings.d.ts.map +1 -1
  153. package/dist/executionPathFindings.js +2 -2
  154. package/dist/executionPathFindings.js.map +1 -1
  155. package/dist/executionTrace.js +2 -2
  156. package/dist/executionTrace.js.map +1 -1
  157. package/dist/executionTrace.test.js +35 -0
  158. package/dist/executionTrace.test.js.map +1 -1
  159. package/dist/executionTraceDiff.d.ts +36 -0
  160. package/dist/executionTraceDiff.d.ts.map +1 -0
  161. package/dist/executionTraceDiff.js +86 -0
  162. package/dist/executionTraceDiff.js.map +1 -0
  163. package/dist/executionTraceDiff.test.d.ts +2 -0
  164. package/dist/executionTraceDiff.test.d.ts.map +1 -0
  165. package/dist/executionTraceDiff.test.js +44 -0
  166. package/dist/executionTraceDiff.test.js.map +1 -0
  167. package/dist/failureCatalog.d.ts +1 -0
  168. package/dist/failureCatalog.d.ts.map +1 -1
  169. package/dist/failureCatalog.js +1 -0
  170. package/dist/failureCatalog.js.map +1 -1
  171. package/dist/failureOriginCatalog.d.ts.map +1 -1
  172. package/dist/failureOriginCatalog.js +20 -0
  173. package/dist/failureOriginCatalog.js.map +1 -1
  174. package/dist/firstFiveMinutesChecklist.d.ts +11 -0
  175. package/dist/firstFiveMinutesChecklist.d.ts.map +1 -0
  176. package/dist/firstFiveMinutesChecklist.js +18 -0
  177. package/dist/firstFiveMinutesChecklist.js.map +1 -0
  178. package/dist/funnel/workflowLineageClassify.d.ts +1 -1
  179. package/dist/funnel/workflowLineageClassify.js +1 -1
  180. package/dist/index.d.ts +22 -7
  181. package/dist/index.d.ts.map +1 -1
  182. package/dist/index.js +15 -6
  183. package/dist/index.js.map +1 -1
  184. package/dist/langGraphCheckpointTrustGate.d.ts +38 -0
  185. package/dist/langGraphCheckpointTrustGate.d.ts.map +1 -0
  186. package/dist/langGraphCheckpointTrustGate.js +124 -0
  187. package/dist/langGraphCheckpointTrustGate.js.map +1 -0
  188. package/dist/langGraphCheckpointTrustIneligibleCertificate.d.ts +8 -0
  189. package/dist/langGraphCheckpointTrustIneligibleCertificate.d.ts.map +1 -0
  190. package/dist/langGraphCheckpointTrustIneligibleCertificate.js +17 -0
  191. package/dist/langGraphCheckpointTrustIneligibleCertificate.js.map +1 -0
  192. package/dist/langGraphCheckpointTrustUnsafeError.d.ts +8 -0
  193. package/dist/langGraphCheckpointTrustUnsafeError.d.ts.map +1 -0
  194. package/dist/langGraphCheckpointTrustUnsafeError.js +12 -0
  195. package/dist/langGraphCheckpointTrustUnsafeError.js.map +1 -0
  196. package/dist/loadEvents.d.ts +5 -0
  197. package/dist/loadEvents.d.ts.map +1 -1
  198. package/dist/loadEvents.js +32 -0
  199. package/dist/loadEvents.js.map +1 -1
  200. package/dist/operationalDisposition.d.ts +64 -0
  201. package/dist/operationalDisposition.d.ts.map +1 -1
  202. package/dist/operationalDisposition.js +64 -0
  203. package/dist/operationalDisposition.js.map +1 -1
  204. package/dist/outcomeCertificate.d.ts +60 -0
  205. package/dist/outcomeCertificate.d.ts.map +1 -0
  206. package/dist/outcomeCertificate.js +254 -0
  207. package/dist/outcomeCertificate.js.map +1 -0
  208. package/dist/outcomeCertificate.test.d.ts +2 -0
  209. package/dist/outcomeCertificate.test.d.ts.map +1 -0
  210. package/dist/outcomeCertificate.test.js +74 -0
  211. package/dist/outcomeCertificate.test.js.map +1 -0
  212. package/dist/pipeline.d.ts +19 -17
  213. package/dist/pipeline.d.ts.map +1 -1
  214. package/dist/pipeline.js +61 -167
  215. package/dist/pipeline.js.map +1 -1
  216. package/dist/planTransition.test.js +4 -4
  217. package/dist/publicDistribution.generated.d.ts +2 -2
  218. package/dist/publicDistribution.generated.d.ts.map +1 -1
  219. package/dist/publicDistribution.generated.js +7 -8
  220. package/dist/publicDistribution.generated.js.map +1 -1
  221. package/dist/quickVerify/quickVerifyScope.d.ts +1 -1
  222. package/dist/quickVerify/quickVerifyScope.js +1 -1
  223. package/dist/quickVerify/runQuickVerify.js +1 -1
  224. package/dist/quickVerify/runQuickVerify.js.map +1 -1
  225. package/dist/quickVerify/verifyExecution.d.ts +1 -1
  226. package/dist/quickVerify/verifyExecution.d.ts.map +1 -1
  227. package/dist/quickVerify/verifyExecution.js +3 -2
  228. package/dist/quickVerify/verifyExecution.js.map +1 -1
  229. package/dist/reconciler.d.ts +6 -2
  230. package/dist/reconciler.d.ts.map +1 -1
  231. package/dist/reconciler.js +17 -11
  232. package/dist/reconciler.js.map +1 -1
  233. package/dist/registryDraft/createRegistryDraftAjv.d.ts +1 -1
  234. package/dist/registryDraft/createRegistryDraftAjv.js +1 -1
  235. package/dist/regressionArtifact.d.ts +63 -0
  236. package/dist/regressionArtifact.d.ts.map +1 -0
  237. package/dist/regressionArtifact.js +290 -0
  238. package/dist/regressionArtifact.js.map +1 -0
  239. package/dist/relationalInvariant.d.ts +13 -3
  240. package/dist/relationalInvariant.d.ts.map +1 -1
  241. package/dist/relationalInvariant.existsSql.test.js +1 -1
  242. package/dist/relationalInvariant.existsSql.test.js.map +1 -1
  243. package/dist/relationalInvariant.js +59 -39
  244. package/dist/relationalInvariant.js.map +1 -1
  245. package/dist/relationalInvariant.test.js +2 -2
  246. package/dist/relationalInvariant.test.js.map +1 -1
  247. package/dist/resolveExpectation.d.ts +18 -2
  248. package/dist/resolveExpectation.d.ts.map +1 -1
  249. package/dist/resolveExpectation.js +332 -1
  250. package/dist/resolveExpectation.js.map +1 -1
  251. package/dist/resolveExpectation.test.js +25 -0
  252. package/dist/resolveExpectation.test.js.map +1 -1
  253. package/dist/runComparison.d.ts +0 -1
  254. package/dist/runComparison.d.ts.map +1 -1
  255. package/dist/runComparison.js +18 -86
  256. package/dist/runComparison.js.map +1 -1
  257. package/dist/runComparison.test.js +101 -57
  258. package/dist/runComparison.test.js.map +1 -1
  259. package/dist/schema-validation.test.js +29 -0
  260. package/dist/schema-validation.test.js.map +1 -1
  261. package/dist/schemaLoad.d.ts +1 -1
  262. package/dist/schemaLoad.d.ts.map +1 -1
  263. package/dist/schemaLoad.js +15 -0
  264. package/dist/schemaLoad.js.map +1 -1
  265. package/dist/shareReport/postPublicVerificationReport.d.ts +6 -0
  266. package/dist/shareReport/postPublicVerificationReport.d.ts.map +1 -1
  267. package/dist/shareReport/postPublicVerificationReport.js +3 -1
  268. package/dist/shareReport/postPublicVerificationReport.js.map +1 -1
  269. package/dist/sortedJsonStringify.d.ts +2 -0
  270. package/dist/sortedJsonStringify.d.ts.map +1 -0
  271. package/dist/sortedJsonStringify.js +23 -0
  272. package/dist/sortedJsonStringify.js.map +1 -0
  273. package/dist/sqlDialect.d.ts +8 -0
  274. package/dist/sqlDialect.d.ts.map +1 -0
  275. package/dist/sqlDialect.js +37 -0
  276. package/dist/sqlDialect.js.map +1 -0
  277. package/dist/standardVerifyWorkflowCli.d.ts +20 -5
  278. package/dist/standardVerifyWorkflowCli.d.ts.map +1 -1
  279. package/dist/standardVerifyWorkflowCli.js +56 -24
  280. package/dist/standardVerifyWorkflowCli.js.map +1 -1
  281. package/dist/stateWitness.d.ts +4 -0
  282. package/dist/stateWitness.d.ts.map +1 -0
  283. package/dist/stateWitness.js +383 -0
  284. package/dist/stateWitness.js.map +1 -0
  285. package/dist/stateWitness.test.d.ts +2 -0
  286. package/dist/stateWitness.test.d.ts.map +1 -0
  287. package/dist/stateWitness.test.js +120 -0
  288. package/dist/stateWitness.test.js.map +1 -0
  289. package/dist/telemetry/maybeEmitOssClaimTicketUrl.d.ts +2 -0
  290. package/dist/telemetry/maybeEmitOssClaimTicketUrl.d.ts.map +1 -1
  291. package/dist/telemetry/maybeEmitOssClaimTicketUrl.js +13 -2
  292. package/dist/telemetry/maybeEmitOssClaimTicketUrl.js.map +1 -1
  293. package/dist/telemetry/ossClaimOrigin.d.ts +1 -1
  294. package/dist/telemetry/ossClaimOrigin.js +1 -1
  295. package/dist/telemetry/postOssClaimContinuation.d.ts +1 -1
  296. package/dist/telemetry/postOssClaimContinuation.d.ts.map +1 -1
  297. package/dist/telemetry/postOssClaimContinuation.js +10 -6
  298. package/dist/telemetry/postOssClaimContinuation.js.map +1 -1
  299. package/dist/telemetry/postOssClaimTicket.d.ts +8 -0
  300. package/dist/telemetry/postOssClaimTicket.d.ts.map +1 -1
  301. package/dist/telemetry/postOssClaimTicket.js +31 -5
  302. package/dist/telemetry/postOssClaimTicket.js.map +1 -1
  303. package/dist/telemetry/verificationHypothesisContract.d.ts +1 -1
  304. package/dist/telemetry/verificationHypothesisContract.js +1 -1
  305. package/dist/trustDecision.d.ts +8 -0
  306. package/dist/trustDecision.d.ts.map +1 -0
  307. package/dist/trustDecision.js +13 -0
  308. package/dist/trustDecision.js.map +1 -0
  309. package/dist/types.d.ts +139 -7
  310. package/dist/types.d.ts.map +1 -1
  311. package/dist/types.js.map +1 -1
  312. package/dist/verificationConnections.d.ts +10 -0
  313. package/dist/verificationConnections.d.ts.map +1 -0
  314. package/dist/verificationConnections.js +190 -0
  315. package/dist/verificationConnections.js.map +1 -0
  316. package/dist/verificationDatabaseUrl.d.ts +11 -0
  317. package/dist/verificationDatabaseUrl.d.ts.map +1 -0
  318. package/dist/verificationDatabaseUrl.js +41 -0
  319. package/dist/verificationDatabaseUrl.js.map +1 -0
  320. package/dist/verificationDatabaseUrl.test.d.ts +2 -0
  321. package/dist/verificationDatabaseUrl.test.d.ts.map +1 -0
  322. package/dist/verificationDatabaseUrl.test.js +66 -0
  323. package/dist/verificationDatabaseUrl.test.js.map +1 -0
  324. package/dist/verificationDiagnostics.d.ts.map +1 -1
  325. package/dist/verificationDiagnostics.js +33 -9
  326. package/dist/verificationDiagnostics.js.map +1 -1
  327. package/dist/verificationDiagnostics.test.js +15 -0
  328. package/dist/verificationDiagnostics.test.js.map +1 -1
  329. package/dist/verificationPolicy.d.ts +2 -1
  330. package/dist/verificationPolicy.d.ts.map +1 -1
  331. package/dist/verificationPolicy.js +97 -0
  332. package/dist/verificationPolicy.js.map +1 -1
  333. package/dist/verificationPolicy.test.js +7 -0
  334. package/dist/verificationPolicy.test.js.map +1 -1
  335. package/dist/verificationRunContext.d.ts.map +1 -1
  336. package/dist/verificationRunContext.js +3 -0
  337. package/dist/verificationRunContext.js.map +1 -1
  338. package/dist/verificationUserPhrases.d.ts.map +1 -1
  339. package/dist/verificationUserPhrases.js +21 -0
  340. package/dist/verificationUserPhrases.js.map +1 -1
  341. package/dist/verify/batchVerifyTelemetrySubcommand.d.ts.map +1 -1
  342. package/dist/verify/batchVerifyTelemetrySubcommand.js +131 -33
  343. package/dist/verify/batchVerifyTelemetrySubcommand.js.map +1 -1
  344. package/dist/verifyAgentskeptic.d.ts +4 -8
  345. package/dist/verifyAgentskeptic.d.ts.map +1 -1
  346. package/dist/verifyAgentskeptic.js +16 -21
  347. package/dist/verifyAgentskeptic.js.map +1 -1
  348. package/dist/verifyAgentskeptic.test.js +10 -12
  349. package/dist/verifyAgentskeptic.test.js.map +1 -1
  350. package/dist/verifyRunStateFromBufferedRunEvents.d.ts +18 -0
  351. package/dist/verifyRunStateFromBufferedRunEvents.d.ts.map +1 -0
  352. package/dist/verifyRunStateFromBufferedRunEvents.js +65 -0
  353. package/dist/verifyRunStateFromBufferedRunEvents.js.map +1 -0
  354. package/dist/vitestMonorepoRoot.d.ts +10 -0
  355. package/dist/vitestMonorepoRoot.d.ts.map +1 -0
  356. package/dist/vitestMonorepoRoot.js +97 -0
  357. package/dist/vitestMonorepoRoot.js.map +1 -0
  358. package/dist/wireReasonCodes.d.ts +21 -0
  359. package/dist/wireReasonCodes.d.ts.map +1 -1
  360. package/dist/wireReasonCodes.js +21 -0
  361. package/dist/wireReasonCodes.js.map +1 -1
  362. package/package.json +63 -40
  363. package/schemas/assurance-output-v1.schema.json +81 -0
  364. package/schemas/compare-run-manifest-v1.schema.json +65 -0
  365. package/schemas/conformance-normalized-result.schema.json +73 -0
  366. package/schemas/connector-capabilities.schema.json +38 -0
  367. package/schemas/event.schema.json +35 -0
  368. package/schemas/execution-trace-view.schema.json +1 -1
  369. package/schemas/openapi-commercial-v1.in.yaml +616 -17
  370. package/schemas/openapi-commercial-v1.yaml +616 -17
  371. package/schemas/outcome-certificate-v1.schema.json +89 -0
  372. package/schemas/public-verification-report-v2.schema.json +15 -0
  373. package/schemas/quick-verify-report.schema.json +1 -1
  374. package/schemas/regression-artifact-v1.schema.json +212 -0
  375. package/schemas/tools-registry.schema.json +103 -0
  376. package/schemas/workflow-engine-result.schema.json +71 -2
  377. package/schemas/workflow-truth-report.schema.json +12 -0
  378. package/scripts/discovery-acquisition.lib.cjs +60 -97
  379. package/scripts/discovery-payload.lib.cjs +41 -7
  380. package/scripts/emit-primary-marketing.cjs +326 -0
  381. package/scripts/origin.cjs +52 -0
  382. package/scripts/public-product-anchors.cjs +3 -0
  383. package/scripts/validate-marketing.cjs +156 -0
  384. package/dist/withWorkflowVerification.persistBundle.test.d.ts +0 -2
  385. package/dist/withWorkflowVerification.persistBundle.test.d.ts.map +0 -1
  386. 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 { buildRunComparisonReport, formatRunComparisonReport, } from "./runComparison.js";
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, argValues, parseQuickCliArgs } from "./cliArgv.js";
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 { COMPARE_INPUT_RUN_LEVEL_INCONSISTENT_MESSAGE } from "./runLevelDriftMessages.js";
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 { formatQuickVerifyHumanReport } from "./quickVerify/formatQuickVerifyHumanReport.js";
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
- Optional CI lock: exactly one of --output-lock <path> or --expect-lock <path> (same OSS/commercial split as batch; see docs/ci-enforcement.md).
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-truth-report]
75
- agentskeptic crossing --workflow-id <id> --events <path> --registry <path> (--db <sqlitePath> | --postgres-url <url>) [--no-truth-report]
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
- Optional CI lock: append exactly one of --output-lock <path> or --expect-lock <path>
85
- (OSS: --output-lock only; commercial: both; see docs/ci-enforcement.md and docs/commercial-enforce-gate-normative.md).
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-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).
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 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.
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 CI lock mismatch with --expect-lock (stdout: WorkflowResult line; stderr: envelope after human report if any)
106
+ 4 reserved for stateful enforce drift mismatch
107
107
 
108
- agentskeptic compare --prior <path> [--prior <path> ...] --current <path>
109
- Compare saved WorkflowResult JSON files (local only; see docs).
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 batch (--expect-lock <path> | --output-lock <path>) <same flags as batch verify>
120
- agentskeptic enforce quick (--expect-lock <path> | --output-lock <path>) <same flags as quick>
121
- CI enforcement with pinned ci-lock-v1 (see docs/ci-enforcement.md).
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). CI lock flags (--output-lock / --expect-lock) are not supported here—use standard batch verify for lock flows.
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 --prior <workflowResult.json> [--prior <path> ...] --current <workflowResult.json>
309
+ agentskeptic compare --manifest <compare-run-manifest.json>
298
310
 
299
- Compares the current run (last file) against the immediate prior run (last --prior).
300
- Recurrence uses all runs in order: each --prior in order, then --current.
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 (stdout: RunComparisonReport JSON; stderr: human summary)
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
- const line = `${JSON.stringify(res.report)}\n`;
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
- if (st.kind === "stale") {
391
- process.stderr.write("AssuranceRunReport issuedAt is older than --max-age-hours.\n");
392
- process.exit(1);
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
- process.exit(0);
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
- const expectLockQ = argValue(args, "--expect-lock");
405
- const outputLockQ = argValue(args, "--output-lock");
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", { runId: activationRunId });
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 human = formatQuickVerifyHumanReport(report, {
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: 1,
536
- kind: "quick",
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
- process.stdout.write(stableStringify(report) + "\n");
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
- console.error(human);
555
- process.stderr.write(formatDistributionFooter());
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 priors = argValues(args, "--prior");
692
- const currentPath = argValue(args, "--current");
693
- if (priors.length < 1 || !currentPath) {
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
- const paths = [...priors, currentPath];
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
- report = buildRunComparisonReport(results, displayLabels);
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
- const validateReport = loadSchemaValidator("run-comparison-report");
757
- if (!validateReport(report)) {
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-truth-report
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 noTruthReport = args.includes("--no-truth-report");
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 (!noTruthReport) {
893
- const engine = workflowEngineResultFromEmitted(result);
894
- process.stderr.write(`${formatWorkflowTruthReport(engine)}\n`);
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
- const expectLockB = argValue(verifyCliArgs, "--expect-lock");
994
- const outputLockB = argValue(verifyCliArgs, "--output-lock");
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,