agentskeptic 1.1.0 → 1.1.2

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 (239) hide show
  1. package/README.md +22 -36
  2. package/config/marketing.json +6 -5
  3. package/dist/actionableFailure.d.ts.map +1 -1
  4. package/dist/actionableFailure.js +15 -0
  5. package/dist/actionableFailure.js.map +1 -1
  6. package/dist/assurance/assurancePathArgs.d.ts.map +1 -1
  7. package/dist/assurance/assurancePathArgs.js +1 -0
  8. package/dist/assurance/assurancePathArgs.js.map +1 -1
  9. package/dist/certificateDigest.d.ts +4 -0
  10. package/dist/certificateDigest.d.ts.map +1 -0
  11. package/dist/certificateDigest.js +7 -0
  12. package/dist/certificateDigest.js.map +1 -0
  13. package/dist/certificateDigest.test.d.ts +2 -0
  14. package/dist/certificateDigest.test.d.ts.map +1 -0
  15. package/dist/certificateDigest.test.js +14 -0
  16. package/dist/certificateDigest.test.js.map +1 -0
  17. package/dist/cli/initCommand.d.ts +2 -0
  18. package/dist/cli/initCommand.d.ts.map +1 -0
  19. package/dist/cli/initCommand.js +135 -0
  20. package/dist/cli/initCommand.js.map +1 -0
  21. package/dist/cli/lockOrchestration.d.ts.map +1 -1
  22. package/dist/cli/lockOrchestration.js +29 -4
  23. package/dist/cli/lockOrchestration.js.map +1 -1
  24. package/dist/cli/migrateCommand.d.ts +6 -0
  25. package/dist/cli/migrateCommand.d.ts.map +1 -0
  26. package/dist/cli/migrateCommand.js +97 -0
  27. package/dist/cli/migrateCommand.js.map +1 -0
  28. package/dist/cli.js +94 -109
  29. package/dist/cli.js.map +1 -1
  30. package/dist/cliArgv.test.d.ts +2 -0
  31. package/dist/cliArgv.test.d.ts.map +1 -0
  32. package/dist/cliArgv.test.js +34 -0
  33. package/dist/cliArgv.test.js.map +1 -0
  34. package/dist/cliOperationalCodes.d.ts +6 -0
  35. package/dist/cliOperationalCodes.d.ts.map +1 -1
  36. package/dist/cliOperationalCodes.js +6 -0
  37. package/dist/cliOperationalCodes.js.map +1 -1
  38. package/dist/commercial/activationCorrelation.d.ts +3 -0
  39. package/dist/commercial/activationCorrelation.d.ts.map +1 -0
  40. package/dist/commercial/activationCorrelation.js +6 -0
  41. package/dist/commercial/activationCorrelation.js.map +1 -0
  42. package/dist/commercial/getCurrentUsage.d.ts +16 -0
  43. package/dist/commercial/getCurrentUsage.d.ts.map +1 -0
  44. package/dist/commercial/getCurrentUsage.js +12 -0
  45. package/dist/commercial/getCurrentUsage.js.map +1 -0
  46. package/dist/commercial/licensePreflight.d.ts +1 -0
  47. package/dist/commercial/licensePreflight.d.ts.map +1 -1
  48. package/dist/commercial/licensePreflight.js +12 -77
  49. package/dist/commercial/licensePreflight.js.map +1 -1
  50. package/dist/commercial/postVerifyOutcomeBeacon.d.ts +2 -0
  51. package/dist/commercial/postVerifyOutcomeBeacon.d.ts.map +1 -1
  52. package/dist/commercial/postVerifyOutcomeBeacon.js +8 -13
  53. package/dist/commercial/postVerifyOutcomeBeacon.js.map +1 -1
  54. package/dist/compare.acceptance.test.js +25 -0
  55. package/dist/compare.acceptance.test.js.map +1 -1
  56. package/dist/compareRunManifest.d.ts +32 -0
  57. package/dist/compareRunManifest.d.ts.map +1 -0
  58. package/dist/compareRunManifest.js +60 -0
  59. package/dist/compareRunManifest.js.map +1 -0
  60. package/dist/debug-ui/app.css +42 -0
  61. package/dist/debug-ui/app.js +206 -15
  62. package/dist/debug-ui/index.html +11 -4
  63. package/dist/debug-ui/urlState.d.ts +15 -0
  64. package/dist/debug-ui/urlState.js +92 -0
  65. package/dist/debugCorpus.test.js +33 -7
  66. package/dist/debugCorpus.test.js.map +1 -1
  67. package/dist/debugPanels.d.ts +0 -3
  68. package/dist/debugPanels.d.ts.map +1 -1
  69. package/dist/debugPanels.js +0 -23
  70. package/dist/debugPanels.js.map +1 -1
  71. package/dist/debugPanels.test.js +16 -15
  72. package/dist/debugPanels.test.js.map +1 -1
  73. package/dist/debugServer.d.ts.map +1 -1
  74. package/dist/debugServer.js +19 -16
  75. package/dist/debugServer.js.map +1 -1
  76. package/dist/debugServer.test.js +18 -9
  77. package/dist/debugServer.test.js.map +1 -1
  78. package/dist/debugUiUrlState.test.d.ts +2 -0
  79. package/dist/debugUiUrlState.test.d.ts.map +1 -0
  80. package/dist/debugUiUrlState.test.js +49 -0
  81. package/dist/debugUiUrlState.test.js.map +1 -0
  82. package/dist/decisionGate.assertSafe.test.js +2 -2
  83. package/dist/decisionGate.assertSafe.test.js.map +1 -1
  84. package/dist/decisionGate.d.ts +2 -1
  85. package/dist/decisionGate.d.ts.map +1 -1
  86. package/dist/decisionGate.js +2 -1
  87. package/dist/decisionGate.js.map +1 -1
  88. package/dist/decisionGate.persistBundle.test.js +3 -3
  89. package/dist/decisionGate.persistBundle.test.js.map +1 -1
  90. package/dist/discovery-payload-v1.json +1 -1
  91. package/dist/enforceCli.d.ts.map +1 -1
  92. package/dist/enforceCli.js +15 -40
  93. package/dist/enforceCli.js.map +1 -1
  94. package/dist/enforceStateful.d.ts +2 -0
  95. package/dist/enforceStateful.d.ts.map +1 -0
  96. package/dist/enforceStateful.js +88 -0
  97. package/dist/enforceStateful.js.map +1 -0
  98. package/dist/enforcementProjection.d.ts +17 -0
  99. package/dist/enforcementProjection.d.ts.map +1 -0
  100. package/dist/enforcementProjection.js +20 -0
  101. package/dist/enforcementProjection.js.map +1 -0
  102. package/dist/executionTrace.test.js +35 -0
  103. package/dist/executionTrace.test.js.map +1 -1
  104. package/dist/executionTraceDiff.d.ts +36 -0
  105. package/dist/executionTraceDiff.d.ts.map +1 -0
  106. package/dist/executionTraceDiff.js +86 -0
  107. package/dist/executionTraceDiff.js.map +1 -0
  108. package/dist/executionTraceDiff.test.d.ts +2 -0
  109. package/dist/executionTraceDiff.test.d.ts.map +1 -0
  110. package/dist/executionTraceDiff.test.js +44 -0
  111. package/dist/executionTraceDiff.test.js.map +1 -0
  112. package/dist/failureOriginCatalog.d.ts.map +1 -1
  113. package/dist/failureOriginCatalog.js +3 -0
  114. package/dist/failureOriginCatalog.js.map +1 -1
  115. package/dist/firstFiveMinutesChecklist.d.ts +1 -1
  116. package/dist/firstFiveMinutesChecklist.d.ts.map +1 -1
  117. package/dist/firstFiveMinutesChecklist.js +2 -2
  118. package/dist/firstFiveMinutesChecklist.js.map +1 -1
  119. package/dist/index.d.ts +13 -7
  120. package/dist/index.d.ts.map +1 -1
  121. package/dist/index.js +10 -7
  122. package/dist/index.js.map +1 -1
  123. package/dist/operationalDisposition.d.ts +48 -0
  124. package/dist/operationalDisposition.d.ts.map +1 -1
  125. package/dist/operationalDisposition.js +48 -0
  126. package/dist/operationalDisposition.js.map +1 -1
  127. package/dist/publicDistribution.generated.d.ts +1 -1
  128. package/dist/publicDistribution.generated.js +1 -1
  129. package/dist/quickVerify/quickVerifyScope.d.ts +1 -1
  130. package/dist/quickVerify/quickVerifyScope.js +1 -1
  131. package/dist/regressionArtifact.d.ts +63 -0
  132. package/dist/regressionArtifact.d.ts.map +1 -0
  133. package/dist/regressionArtifact.js +290 -0
  134. package/dist/regressionArtifact.js.map +1 -0
  135. package/dist/runComparison.d.ts +0 -1
  136. package/dist/runComparison.d.ts.map +1 -1
  137. package/dist/runComparison.js +0 -83
  138. package/dist/runComparison.js.map +1 -1
  139. package/dist/runComparison.test.js +101 -57
  140. package/dist/runComparison.test.js.map +1 -1
  141. package/dist/schemaLoad.d.ts +1 -1
  142. package/dist/schemaLoad.d.ts.map +1 -1
  143. package/dist/schemaLoad.js +8 -0
  144. package/dist/schemaLoad.js.map +1 -1
  145. package/dist/sdk/AgentSkeptic.d.ts +37 -0
  146. package/dist/sdk/AgentSkeptic.d.ts.map +1 -0
  147. package/dist/sdk/AgentSkeptic.js +45 -0
  148. package/dist/sdk/AgentSkeptic.js.map +1 -0
  149. package/dist/sdk/Gate.d.ts +3 -0
  150. package/dist/sdk/Gate.d.ts.map +1 -0
  151. package/dist/sdk/Gate.js +2 -0
  152. package/dist/sdk/Gate.js.map +1 -0
  153. package/dist/sdk/_generated/openapi-types.d.ts +1034 -0
  154. package/dist/sdk/_generated/openapi-types.d.ts.map +1 -0
  155. package/dist/sdk/_generated/openapi-types.js +6 -0
  156. package/dist/sdk/_generated/openapi-types.js.map +1 -0
  157. package/dist/sdk/deprecate.d.ts +6 -0
  158. package/dist/sdk/deprecate.d.ts.map +1 -0
  159. package/dist/sdk/deprecate.js +14 -0
  160. package/dist/sdk/deprecate.js.map +1 -0
  161. package/dist/sdk/deprecatedPublicApi.d.ts +18 -0
  162. package/dist/sdk/deprecatedPublicApi.d.ts.map +1 -0
  163. package/dist/sdk/deprecatedPublicApi.js +36 -0
  164. package/dist/sdk/deprecatedPublicApi.js.map +1 -0
  165. package/dist/sdk/errors.d.ts +23 -0
  166. package/dist/sdk/errors.d.ts.map +1 -0
  167. package/dist/sdk/errors.js +28 -0
  168. package/dist/sdk/errors.js.map +1 -0
  169. package/dist/sdk/frameworks/next.d.ts +12 -0
  170. package/dist/sdk/frameworks/next.d.ts.map +1 -0
  171. package/dist/sdk/frameworks/next.js +29 -0
  172. package/dist/sdk/frameworks/next.js.map +1 -0
  173. package/dist/sdk/transport.d.ts +35 -0
  174. package/dist/sdk/transport.d.ts.map +1 -0
  175. package/dist/sdk/transport.js +180 -0
  176. package/dist/sdk/transport.js.map +1 -0
  177. package/dist/sortedJsonStringify.d.ts +2 -0
  178. package/dist/sortedJsonStringify.d.ts.map +1 -0
  179. package/dist/sortedJsonStringify.js +23 -0
  180. package/dist/sortedJsonStringify.js.map +1 -0
  181. package/dist/standardVerifyWorkflowCli.d.ts.map +1 -1
  182. package/dist/standardVerifyWorkflowCli.js +3 -2
  183. package/dist/standardVerifyWorkflowCli.js.map +1 -1
  184. package/dist/telemetry/maybeEmitOssClaimTicketUrl.d.ts +2 -0
  185. package/dist/telemetry/maybeEmitOssClaimTicketUrl.d.ts.map +1 -1
  186. package/dist/telemetry/maybeEmitOssClaimTicketUrl.js +13 -2
  187. package/dist/telemetry/maybeEmitOssClaimTicketUrl.js.map +1 -1
  188. package/dist/telemetry/postOssClaimContinuation.d.ts +1 -1
  189. package/dist/telemetry/postOssClaimContinuation.d.ts.map +1 -1
  190. package/dist/telemetry/postOssClaimContinuation.js +10 -6
  191. package/dist/telemetry/postOssClaimContinuation.js.map +1 -1
  192. package/dist/telemetry/postOssClaimTicket.d.ts +8 -0
  193. package/dist/telemetry/postOssClaimTicket.d.ts.map +1 -1
  194. package/dist/telemetry/postOssClaimTicket.js +31 -5
  195. package/dist/telemetry/postOssClaimTicket.js.map +1 -1
  196. package/dist/truthLayerError.d.ts +5 -2
  197. package/dist/truthLayerError.d.ts.map +1 -1
  198. package/dist/truthLayerError.js +6 -4
  199. package/dist/truthLayerError.js.map +1 -1
  200. package/dist/types.d.ts +10 -1
  201. package/dist/types.d.ts.map +1 -1
  202. package/dist/types.js.map +1 -1
  203. package/dist/verificationDiagnostics.d.ts.map +1 -1
  204. package/dist/verificationDiagnostics.js +4 -1
  205. package/dist/verificationDiagnostics.js.map +1 -1
  206. package/dist/verificationPolicy.d.ts.map +1 -1
  207. package/dist/verificationPolicy.js +13 -0
  208. package/dist/verificationPolicy.js.map +1 -1
  209. package/dist/verificationUserPhrases.d.ts.map +1 -1
  210. package/dist/verificationUserPhrases.js +3 -0
  211. package/dist/verificationUserPhrases.js.map +1 -1
  212. package/dist/verify/batchVerifyTelemetrySubcommand.d.ts.map +1 -1
  213. package/dist/verify/batchVerifyTelemetrySubcommand.js +8 -1
  214. package/dist/verify/batchVerifyTelemetrySubcommand.js.map +1 -1
  215. package/dist/verifyAgentskeptic.d.ts +1 -1
  216. package/dist/verifyAgentskeptic.d.ts.map +1 -1
  217. package/dist/verifyAgentskeptic.js +3 -3
  218. package/dist/verifyAgentskeptic.js.map +1 -1
  219. package/dist/verifyAgentskeptic.test.js +5 -5
  220. package/dist/verifyAgentskeptic.test.js.map +1 -1
  221. package/dist/vitestMonorepoRoot.d.ts +10 -0
  222. package/dist/vitestMonorepoRoot.d.ts.map +1 -0
  223. package/dist/vitestMonorepoRoot.js +97 -0
  224. package/dist/vitestMonorepoRoot.js.map +1 -0
  225. package/dist/wireReasonCodes.d.ts +3 -0
  226. package/dist/wireReasonCodes.d.ts.map +1 -1
  227. package/dist/wireReasonCodes.js +3 -0
  228. package/dist/wireReasonCodes.js.map +1 -1
  229. package/package.json +46 -12
  230. package/schemas/agentskeptic-error-codes.json +608 -0
  231. package/schemas/compare-run-manifest-v1.schema.json +65 -0
  232. package/schemas/conformance-normalized-result.schema.json +73 -0
  233. package/schemas/connector-capabilities.schema.json +38 -0
  234. package/schemas/execution-trace-view.schema.json +1 -1
  235. package/schemas/openapi-commercial-v1.in.yaml +580 -14
  236. package/schemas/openapi-commercial-v1.yaml +580 -14
  237. package/schemas/quick-verify-report.schema.json +1 -1
  238. package/schemas/regression-artifact-v1.schema.json +212 -0
  239. package/scripts/discovery-payload.lib.cjs +3 -3
@@ -1,14 +1,14 @@
1
1
  openapi: "3.0.3"
2
2
  info:
3
3
  title: AgentSkeptic commercial license API
4
- version: "1.0.0"
4
+ version: "2.0.0"
5
5
  contact:
6
6
  url: __DISTRIBUTION_CONTACT_URL__
7
7
  x-agentskeptic-distribution:
8
8
  repository: __DISTRIBUTION_REPO_URL__
9
9
  npmPackage: __DISTRIBUTION_NPM_URL__
10
10
  openApi: __OPENAPI_SELF_URL__
11
- description: "__IDENTITY_ONE_LINER__\n\nMachine-readable contract for license preflight used by the published npm CLI.\nBase URL is your deployed app origin (same as NEXT_PUBLIC_APP_URL).\n"
11
+ description: "__IDENTITY_ONE_LINER__\n\nMachine-readable contract for license preflight used by the published npm CLI.\nBase URL is your deployed app origin (same as NEXT_PUBLIC_APP_URL).\n\nEvery path in this document returns an `x-request-id` response header on all status codes (echo a valid client `x-request-id` when supplied; otherwise server-generated). Non-2xx JSON bodies follow RFC 7807-style Problem Details (`type`, `title`, `status`, `detail`, optional `code`, `instance`) unless noted; `POST /api/v1/usage/reserve` denials additionally include legacy `allowed`, `code`, `message`, and optional `upgrade_url` for backward compatibility.\n"
12
12
  externalDocs:
13
13
  description: "First-run integration guide"
14
14
  url: __DISTRIBUTION_INTEGRATE_URL__
@@ -45,7 +45,7 @@ paths:
45
45
  schema:
46
46
  $ref: "#/components/schemas/ReserveError"
47
47
  "401":
48
- description: Invalid or revoked API key
48
+ description: Invalid API key or key lifecycle denial (revoked, disabled, expired)
49
49
  content:
50
50
  application/json:
51
51
  schema:
@@ -73,6 +73,142 @@ paths:
73
73
  application/json:
74
74
  schema:
75
75
  $ref: "#/components/schemas/CommercialPlansResponse"
76
+ "503":
77
+ description: Plans configuration unavailable
78
+ content:
79
+ application/json:
80
+ schema:
81
+ $ref: "#/components/schemas/ProblemDetails"
82
+ /api/v1/usage/current:
83
+ get:
84
+ operationId: getCurrentUsage
85
+ summary: Current usage and quota status for authenticated API key principal
86
+ security:
87
+ - bearerAuth: []
88
+ responses:
89
+ "200":
90
+ description: Current month usage and quota status
91
+ content:
92
+ application/json:
93
+ schema:
94
+ $ref: "#/components/schemas/UsageCurrentV1"
95
+ "401":
96
+ description: Invalid API key or key lifecycle denial
97
+ content:
98
+ application/json:
99
+ schema:
100
+ $ref: "#/components/schemas/ProblemDetails"
101
+ "403":
102
+ description: Missing required scope
103
+ content:
104
+ application/json:
105
+ schema:
106
+ $ref: "#/components/schemas/ProblemDetails"
107
+ "503":
108
+ description: Plans configuration unavailable or server error
109
+ content:
110
+ application/json:
111
+ schema:
112
+ $ref: "#/components/schemas/ProblemDetails"
113
+ /api/v1/enforcement/baselines:
114
+ post:
115
+ operationId: createEnforcementBaseline
116
+ summary: Create or replace accepted enforcement baseline for a workflow
117
+ security:
118
+ - bearerAuth: []
119
+ requestBody:
120
+ required: true
121
+ content:
122
+ application/json:
123
+ schema:
124
+ $ref: "#/components/schemas/EnforcementProjectionRequest"
125
+ responses:
126
+ "200":
127
+ description: Baseline created or replaced
128
+ content:
129
+ application/json:
130
+ schema:
131
+ $ref: "#/components/schemas/EnforcementStateResponse"
132
+ "400":
133
+ description: Invalid request
134
+ content:
135
+ application/json:
136
+ schema:
137
+ $ref: "#/components/schemas/ProblemDetails"
138
+ "401":
139
+ description: Invalid API key
140
+ content:
141
+ application/json:
142
+ schema:
143
+ $ref: "#/components/schemas/ProblemDetails"
144
+ /api/v1/enforcement/check:
145
+ post:
146
+ operationId: checkEnforcementDrift
147
+ summary: Compare current run projection against accepted baseline
148
+ security:
149
+ - bearerAuth: []
150
+ requestBody:
151
+ required: true
152
+ content:
153
+ application/json:
154
+ schema:
155
+ $ref: "#/components/schemas/EnforcementProjectionRequest"
156
+ responses:
157
+ "200":
158
+ description: Comparison result (ok or drift)
159
+ content:
160
+ application/json:
161
+ schema:
162
+ $ref: "#/components/schemas/EnforcementCheckResponse"
163
+ "409":
164
+ description: Baseline not initialized
165
+ content:
166
+ application/json:
167
+ schema:
168
+ $ref: "#/components/schemas/ProblemDetails"
169
+ /api/v1/enforcement/accept:
170
+ post:
171
+ operationId: acceptEnforcementDrift
172
+ summary: Accept current projection as new baseline
173
+ security:
174
+ - bearerAuth: []
175
+ requestBody:
176
+ required: true
177
+ content:
178
+ application/json:
179
+ schema:
180
+ $ref: "#/components/schemas/EnforcementProjectionRequest"
181
+ responses:
182
+ "200":
183
+ description: Drift accepted
184
+ content:
185
+ application/json:
186
+ schema:
187
+ $ref: "#/components/schemas/EnforcementStateResponse"
188
+ /api/v1/enforcement/history:
189
+ get:
190
+ operationId: getEnforcementHistory
191
+ summary: Retrieve enforcement timeline for one workflow
192
+ security:
193
+ - bearerAuth: []
194
+ parameters:
195
+ - name: workflow_id
196
+ in: query
197
+ required: true
198
+ schema:
199
+ type: string
200
+ - name: limit
201
+ in: query
202
+ required: false
203
+ schema:
204
+ type: integer
205
+ responses:
206
+ "200":
207
+ description: Timeline events
208
+ content:
209
+ application/json:
210
+ schema:
211
+ $ref: "#/components/schemas/EnforcementHistoryResponse"
76
212
  /api/public/verification-reports:
77
213
  post:
78
214
  operationId: createPublicVerificationReport
@@ -94,10 +230,226 @@ paths:
94
230
  $ref: "#/components/schemas/PublicVerificationReportCreated"
95
231
  "400":
96
232
  description: Invalid JSON or failed schema validation
233
+ content:
234
+ application/json:
235
+ schema:
236
+ $ref: "#/components/schemas/ProblemDetails"
97
237
  "413":
98
238
  description: Request body exceeds maximum allowed size
239
+ content:
240
+ application/json:
241
+ schema:
242
+ $ref: "#/components/schemas/ProblemDetails"
243
+ "500":
244
+ description: Server error storing report
245
+ content:
246
+ application/json:
247
+ schema:
248
+ $ref: "#/components/schemas/ProblemDetails"
99
249
  "503":
100
250
  description: Public report ingestion disabled or server unavailable
251
+ content:
252
+ application/json:
253
+ schema:
254
+ $ref: "#/components/schemas/ProblemDetails"
255
+ /api/v1/funnel/verify-outcome:
256
+ post:
257
+ operationId: postVerifyOutcomeBeacon
258
+ summary: Licensed verify-outcome beacon (idempotent per API key + run_id)
259
+ description: >
260
+ POST after a successful `POST /api/v1/usage/reserve` for the same `run_id`. Success is HTTP 204 with an empty body.
261
+ Requires Bearer API key. Body schemaVersion must be 2.
262
+ security:
263
+ - bearerAuth: []
264
+ requestBody:
265
+ required: true
266
+ content:
267
+ application/json:
268
+ schema:
269
+ $ref: "#/components/schemas/VerifyOutcomeRequestV2"
270
+ responses:
271
+ "204":
272
+ description: Beacon accepted (or duplicate ignored)
273
+ "400":
274
+ description: Invalid JSON or validation failure
275
+ content:
276
+ application/json:
277
+ schema:
278
+ $ref: "#/components/schemas/ProblemDetails"
279
+ "401":
280
+ description: Invalid API key
281
+ content:
282
+ application/json:
283
+ schema:
284
+ $ref: "#/components/schemas/ProblemDetails"
285
+ "404":
286
+ description: No reservation for this run_id
287
+ content:
288
+ application/json:
289
+ schema:
290
+ $ref: "#/components/schemas/ProblemDetails"
291
+ "410":
292
+ description: Reservation too old
293
+ content:
294
+ application/json:
295
+ schema:
296
+ $ref: "#/components/schemas/ProblemDetails"
297
+ "503":
298
+ description: Server error
299
+ content:
300
+ application/json:
301
+ schema:
302
+ $ref: "#/components/schemas/ProblemDetails"
303
+ /api/oss/claim-ticket:
304
+ post:
305
+ operationId: postOssClaimTicket
306
+ summary: Mint OSS claim ticket (CLI only; product activation headers required)
307
+ description: >
308
+ Creates or returns a handoff URL for linking a verification run to a web account.
309
+ Requires `X-AgentSkeptic-Cli-Product` and `X-AgentSkeptic-Cli-Version` headers (see website/src/lib/funnelProductActivationConstants.ts).
310
+ requestBody:
311
+ required: true
312
+ content:
313
+ application/json:
314
+ schema:
315
+ $ref: "#/components/schemas/OssClaimTicketRequest"
316
+ responses:
317
+ "200":
318
+ description: Handoff URL returned
319
+ content:
320
+ application/json:
321
+ schema:
322
+ $ref: "#/components/schemas/OssClaimTicketHandoffResponse"
323
+ "204":
324
+ description: Ticket already claimed (idempotent)
325
+ "400":
326
+ description: Bad request
327
+ content:
328
+ application/json:
329
+ schema:
330
+ $ref: "#/components/schemas/ProblemDetails"
331
+ "403":
332
+ description: Forbidden (unsupported CLI client)
333
+ content:
334
+ application/json:
335
+ schema:
336
+ $ref: "#/components/schemas/ProblemDetails"
337
+ "413":
338
+ description: Payload too large
339
+ content:
340
+ application/json:
341
+ schema:
342
+ $ref: "#/components/schemas/ProblemDetails"
343
+ "429":
344
+ description: Rate limited
345
+ content:
346
+ application/json:
347
+ schema:
348
+ $ref: "#/components/schemas/ProblemDetails"
349
+ "503":
350
+ description: Server error
351
+ content:
352
+ application/json:
353
+ schema:
354
+ $ref: "#/components/schemas/ProblemDetails"
355
+ /api/oss/claim-redeem:
356
+ post:
357
+ operationId: postOssClaimRedeem
358
+ summary: Redeem OSS claim ticket (browser session; optional claim_secret in body)
359
+ description: Requires an authenticated session; prefers pending cookie from GET /verify/link.
360
+ requestBody:
361
+ required: true
362
+ content:
363
+ application/json:
364
+ schema:
365
+ $ref: "#/components/schemas/OssClaimRedeemRequest"
366
+ responses:
367
+ "200":
368
+ description: Redeemed; returns run summary
369
+ content:
370
+ application/json:
371
+ schema:
372
+ $ref: "#/components/schemas/OssClaimRedeemOk"
373
+ "400":
374
+ description: Claim failed or expired
375
+ content:
376
+ application/json:
377
+ schema:
378
+ $ref: "#/components/schemas/ProblemDetails"
379
+ "401":
380
+ description: Not signed in
381
+ content:
382
+ application/json:
383
+ schema:
384
+ $ref: "#/components/schemas/ProblemDetails"
385
+ "409":
386
+ description: Already linked to another account
387
+ content:
388
+ application/json:
389
+ schema:
390
+ $ref: "#/components/schemas/ProblemDetails"
391
+ "429":
392
+ description: Rate limited
393
+ content:
394
+ application/json:
395
+ schema:
396
+ $ref: "#/components/schemas/ProblemDetails"
397
+ "503":
398
+ description: Server error
399
+ content:
400
+ application/json:
401
+ schema:
402
+ $ref: "#/components/schemas/ProblemDetails"
403
+ /api/oss/claim-continuation:
404
+ post:
405
+ operationId: postOssClaimContinuation
406
+ summary: Record browser-open acknowledgement for interactive-human tickets (CLI only)
407
+ requestBody:
408
+ required: true
409
+ content:
410
+ application/json:
411
+ schema:
412
+ $ref: "#/components/schemas/OssClaimContinuationRequest"
413
+ responses:
414
+ "204":
415
+ description: Recorded or already recorded
416
+ "400":
417
+ description: Bad request
418
+ content:
419
+ application/json:
420
+ schema:
421
+ $ref: "#/components/schemas/ProblemDetails"
422
+ "403":
423
+ description: Not applicable or forbidden
424
+ content:
425
+ application/json:
426
+ schema:
427
+ $ref: "#/components/schemas/ProblemDetails"
428
+ "413":
429
+ description: Payload too large
430
+ content:
431
+ application/json:
432
+ schema:
433
+ $ref: "#/components/schemas/ProblemDetails"
434
+ "503":
435
+ description: Server error
436
+ content:
437
+ application/json:
438
+ schema:
439
+ $ref: "#/components/schemas/ProblemDetails"
440
+ /api/oss/claim-handoff:
441
+ get:
442
+ operationId: getOssClaimHandoffLegacy
443
+ summary: Legacy handoff redirect (308 to /verify/link)
444
+ parameters:
445
+ - name: h
446
+ in: query
447
+ required: true
448
+ schema:
449
+ type: string
450
+ responses:
451
+ "308":
452
+ description: Redirect to /verify/link?h=…
101
453
  components:
102
454
  securitySchemes:
103
455
  bearerAuth:
@@ -105,6 +457,165 @@ components:
105
457
  scheme: bearer
106
458
  bearerFormat: API key
107
459
  schemas:
460
+ EnforcementProjectionRequest:
461
+ type: object
462
+ required: [run_id, workflow_id, projection_hash, projection]
463
+ properties:
464
+ run_id:
465
+ type: string
466
+ workflow_id:
467
+ type: string
468
+ projection_hash:
469
+ type: string
470
+ projection:
471
+ type: object
472
+ additionalProperties: true
473
+ EnforcementStateResponse:
474
+ type: object
475
+ required: [schema_version, status, workflow_id]
476
+ properties:
477
+ schema_version:
478
+ type: integer
479
+ const: 1
480
+ status:
481
+ type: string
482
+ workflow_id:
483
+ type: string
484
+ EnforcementCheckResponse:
485
+ allOf:
486
+ - $ref: "#/components/schemas/EnforcementStateResponse"
487
+ - type: object
488
+ required: [expected_projection_hash, actual_projection_hash]
489
+ properties:
490
+ expected_projection_hash:
491
+ type: string
492
+ actual_projection_hash:
493
+ type: string
494
+ EnforcementHistoryResponse:
495
+ type: object
496
+ required: [schema_version, workflow_id, events]
497
+ properties:
498
+ schema_version:
499
+ type: integer
500
+ const: 1
501
+ workflow_id:
502
+ type: string
503
+ events:
504
+ type: array
505
+ items:
506
+ type: object
507
+ additionalProperties: true
508
+ ProblemDetails:
509
+ type: object
510
+ required: [type, title, status, detail]
511
+ properties:
512
+ type:
513
+ type: string
514
+ format: uri
515
+ title:
516
+ type: string
517
+ status:
518
+ type: integer
519
+ detail:
520
+ type: string
521
+ instance:
522
+ type: string
523
+ code:
524
+ type: string
525
+ VerifyOutcomeRequestV2:
526
+ type: object
527
+ required:
528
+ - schema_version
529
+ - run_id
530
+ - workflow_id
531
+ - trust_decision
532
+ - reason_codes
533
+ - terminal_status
534
+ - workload_class
535
+ - subcommand
536
+ properties:
537
+ schema_version:
538
+ type: integer
539
+ const: 2
540
+ run_id:
541
+ type: string
542
+ maxLength: 256
543
+ workflow_id:
544
+ type: string
545
+ maxLength: 512
546
+ trust_decision:
547
+ type: string
548
+ enum: [safe, unsafe, unknown]
549
+ reason_codes:
550
+ type: array
551
+ maxItems: 8
552
+ items:
553
+ type: string
554
+ terminal_status:
555
+ type: string
556
+ enum: [complete, inconsistent, incomplete]
557
+ workload_class:
558
+ type: string
559
+ enum: [bundled_examples, non_bundled]
560
+ subcommand:
561
+ type: string
562
+ enum: [batch_verify, quick_verify, verify_integrator_owned]
563
+ OssClaimTicketRequest:
564
+ type: object
565
+ description: v1 or v2 OSS claim ticket wire shape (see website/src/lib/ossClaimTicketPayload.ts).
566
+ additionalProperties: true
567
+ OssClaimTicketHandoffResponse:
568
+ type: object
569
+ required: [schema_version, handoff_url]
570
+ properties:
571
+ schema_version:
572
+ type: integer
573
+ const: 2
574
+ handoff_url:
575
+ type: string
576
+ format: uri
577
+ OssClaimRedeemRequest:
578
+ type: object
579
+ properties:
580
+ claim_secret:
581
+ type: string
582
+ pattern: "^[0-9a-f]{64}$"
583
+ additionalProperties: true
584
+ OssClaimRedeemOk:
585
+ type: object
586
+ required:
587
+ - schema_version
588
+ - run_id
589
+ - terminal_status
590
+ - workload_class
591
+ - subcommand
592
+ - build_profile
593
+ - claimed_at
594
+ properties:
595
+ schema_version:
596
+ type: integer
597
+ const: 1
598
+ run_id:
599
+ type: string
600
+ terminal_status:
601
+ type: string
602
+ workload_class:
603
+ type: string
604
+ subcommand:
605
+ type: string
606
+ build_profile:
607
+ type: string
608
+ claimed_at:
609
+ type: string
610
+ format: date-time
611
+ OssClaimContinuationRequest:
612
+ type: object
613
+ required: [claim_secret]
614
+ properties:
615
+ claim_secret:
616
+ type: string
617
+ pattern: "^[0-9a-f]{64}$"
618
+ additionalProperties: false
108
619
  PublicVerificationReportCreate:
109
620
  description: >
110
621
  POST accepts schemaVersion 2 only: { "schemaVersion": 2, "certificate": <OutcomeCertificateV1> } per
@@ -181,22 +692,77 @@ components:
181
692
  type: integer
182
693
  description: max(0, used - included_monthly) when the plan has a finite cap
183
694
  ReserveError:
695
+ allOf:
696
+ - $ref: "#/components/schemas/ProblemDetails"
697
+ - type: object
698
+ required: [allowed, code, message]
699
+ properties:
700
+ allowed:
701
+ type: boolean
702
+ enum: [false]
703
+ code:
704
+ type: string
705
+ description: >
706
+ Examples BAD_REQUEST, INVALID_KEY, QUOTA_EXCEEDED, ENFORCEMENT_REQUIRES_PAID_PLAN,
707
+ VERIFICATION_REQUIRES_SUBSCRIPTION, SUBSCRIPTION_INACTIVE, BILLING_PRICE_UNMAPPED,
708
+ INSUFFICIENT_SCOPE, KEY_EXPIRED, KEY_REVOKED, KEY_DISABLED, SERVER_ERROR
709
+ message:
710
+ type: string
711
+ upgrade_url:
712
+ type: string
713
+ format: uri
714
+ description: Present for some 403 entitlement responses
715
+ UsageCurrentV1:
184
716
  type: object
717
+ required:
718
+ - schema_version
719
+ - plan
720
+ - year_month
721
+ - period_start_utc
722
+ - period_end_utc
723
+ - used_total
724
+ - included_monthly
725
+ - allow_overage
726
+ - overage_count
727
+ - quota_state
728
+ - allowed_next
729
+ - estimated_overage_usd
185
730
  properties:
186
- allowed:
187
- type: boolean
188
- enum: [false]
189
- code:
731
+ schema_version:
732
+ type: integer
733
+ const: 1
734
+ plan:
190
735
  type: string
191
- description: >
192
- Examples BAD_REQUEST, INVALID_KEY, QUOTA_EXCEEDED, ENFORCEMENT_REQUIRES_PAID_PLAN,
193
- SUBSCRIPTION_INACTIVE, BILLING_PRICE_UNMAPPED, SERVER_ERROR
194
- message:
736
+ enum: [starter, individual, team, business, enterprise]
737
+ year_month:
195
738
  type: string
196
- upgrade_url:
739
+ pattern: "^[0-9]{4}-[0-9]{2}$"
740
+ period_start_utc:
197
741
  type: string
198
- format: uri
199
- description: Present for some 403 entitlement responses
742
+ format: date-time
743
+ period_end_utc:
744
+ type: string
745
+ format: date-time
746
+ used_total:
747
+ type: integer
748
+ minimum: 0
749
+ included_monthly:
750
+ oneOf:
751
+ - type: integer
752
+ - type: "null"
753
+ allow_overage:
754
+ type: boolean
755
+ overage_count:
756
+ type: integer
757
+ minimum: 0
758
+ quota_state:
759
+ type: string
760
+ enum: [ok, notice, warning, in_overage, at_cap]
761
+ allowed_next:
762
+ type: boolean
763
+ estimated_overage_usd:
764
+ type: string
765
+ example: "24.00"
200
766
  CommercialPlansResponse:
201
767
  type: object
202
768
  required: