ccqa 1.31.4 → 1.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -213,14 +213,71 @@ declare const AcquireLocksResponseSchema: z.ZodObject<{
213
213
  denied: z.ZodArray<z.ZodString>;
214
214
  }, z.core.$strip>;
215
215
  type AcquireLocksResponse = z.infer<typeof AcquireLocksResponseSchema>;
216
+ /** Answer of PUT (the attestation as stamped) and GET (the whole document). */
217
+ declare const AttestationResponseSchema: z.ZodObject<{
218
+ project: z.ZodString;
219
+ profile: z.ZodString;
220
+ spec: z.ZodString;
221
+ attestation: z.ZodObject<{
222
+ by: z.ZodString;
223
+ at: z.ZodString;
224
+ note: z.ZodOptional<z.ZodString>;
225
+ deployedSha: z.ZodNullable<z.ZodString>;
226
+ }, z.core.$strip>;
227
+ }, z.core.$strip>;
228
+ type AttestationResponse = z.infer<typeof AttestationResponseSchema>;
229
+ declare const AttestationsResponseSchema: z.ZodObject<{
230
+ project: z.ZodString;
231
+ profile: z.ZodString;
232
+ specs: z.ZodRecord<z.ZodString, z.ZodObject<{
233
+ by: z.ZodString;
234
+ at: z.ZodString;
235
+ note: z.ZodOptional<z.ZodString>;
236
+ deployedSha: z.ZodNullable<z.ZodString>;
237
+ }, z.core.$strip>>;
238
+ }, z.core.$strip>;
239
+ type AttestationsResponse = z.infer<typeof AttestationsResponseSchema>;
240
+ declare const AuditDismissalResponseSchema: z.ZodObject<{
241
+ project: z.ZodString;
242
+ spec: z.ZodString;
243
+ dismissal: z.ZodObject<{
244
+ by: z.ZodString;
245
+ at: z.ZodString;
246
+ note: z.ZodString;
247
+ auditRunId: z.ZodString;
248
+ label: z.ZodEnum<{
249
+ TEST_DRIFT: "TEST_DRIFT";
250
+ SPEC_CHANGE: "SPEC_CHANGE";
251
+ UNKNOWN: "UNKNOWN";
252
+ }>;
253
+ headline: z.ZodString;
254
+ }, z.core.$strip>;
255
+ }, z.core.$strip>;
256
+ type AuditDismissalResponse = z.infer<typeof AuditDismissalResponseSchema>;
257
+ declare const AuditDismissalsResponseSchema: z.ZodObject<{
258
+ project: z.ZodString;
259
+ specs: z.ZodRecord<z.ZodString, z.ZodObject<{
260
+ by: z.ZodString;
261
+ at: z.ZodString;
262
+ note: z.ZodString;
263
+ auditRunId: z.ZodString;
264
+ label: z.ZodEnum<{
265
+ TEST_DRIFT: "TEST_DRIFT";
266
+ SPEC_CHANGE: "SPEC_CHANGE";
267
+ UNKNOWN: "UNKNOWN";
268
+ }>;
269
+ headline: z.ZodString;
270
+ }, z.core.$strip>>;
271
+ }, z.core.$strip>;
272
+ type AuditDismissalsResponse = z.infer<typeof AuditDismissalsResponseSchema>;
216
273
  /** Body of `GET /projects/:project/audit-needed?profile=`: one answer per spec. */
217
274
  declare const AuditNeedReportSchema: z.ZodObject<{
218
275
  project: z.ZodString;
219
276
  profile: z.ZodString;
220
277
  specs: z.ZodRecord<z.ZodString, z.ZodObject<{
221
278
  because: z.ZodEnum<{
222
- neverAudited: "neverAudited";
223
279
  deployReached: "deployReached";
280
+ neverAudited: "neverAudited";
224
281
  cannotTell: "cannotTell";
225
282
  held: "held";
226
283
  current: "current";
@@ -252,6 +309,7 @@ declare const RerunReportSchema: z.ZodObject<{
252
309
  needsRepair: "needsRepair";
253
310
  rerunNeeded: "rerunNeeded";
254
311
  verified: "verified";
312
+ manuallyVerified: "manuallyVerified";
255
313
  }>;
256
314
  audit: z.ZodEnum<{
257
315
  due: "due";
@@ -278,6 +336,19 @@ declare const RerunReportSchema: z.ZodObject<{
278
336
  deployedShaNotInLog: "deployedShaNotInLog";
279
337
  gapInRange: "gapInRange";
280
338
  }>>;
339
+ auditDismissed: z.ZodOptional<z.ZodObject<{
340
+ by: z.ZodString;
341
+ at: z.ZodString;
342
+ note: z.ZodString;
343
+ auditRunId: z.ZodString;
344
+ label: z.ZodEnum<{
345
+ TEST_DRIFT: "TEST_DRIFT";
346
+ SPEC_CHANGE: "SPEC_CHANGE";
347
+ UNKNOWN: "UNKNOWN";
348
+ }>;
349
+ headline: z.ZodString;
350
+ }, z.core.$strip>>;
351
+ auditDismissalApplied: z.ZodOptional<z.ZodBoolean>;
281
352
  executionAssumedReached: z.ZodOptional<z.ZodEnum<{
282
353
  noSelectionInRange: "noSelectionInRange";
283
354
  selectionUnknown: "selectionUnknown";
@@ -288,6 +359,38 @@ declare const RerunReportSchema: z.ZodObject<{
288
359
  gapInRange: "gapInRange";
289
360
  }>>;
290
361
  specChangedSince: z.ZodOptional<z.ZodString>;
362
+ manual: z.ZodOptional<z.ZodObject<{
363
+ by: z.ZodString;
364
+ at: z.ZodString;
365
+ note: z.ZodOptional<z.ZodString>;
366
+ deployedSha: z.ZodNullable<z.ZodString>;
367
+ }, z.core.$strip>>;
368
+ manualLapsed: z.ZodOptional<z.ZodObject<{
369
+ by: z.ZodString;
370
+ at: z.ZodString;
371
+ note: z.ZodOptional<z.ZodString>;
372
+ deployedSha: z.ZodNullable<z.ZodString>;
373
+ because: z.ZodEnum<{
374
+ deployReached: "deployReached";
375
+ cannotPlace: "cannotPlace";
376
+ specEdited: "specEdited";
377
+ newerRed: "newerRed";
378
+ }>;
379
+ }, z.core.$strip>>;
380
+ manualLapsedByDeploy: z.ZodOptional<z.ZodNullable<z.ZodObject<{
381
+ index: z.ZodNumber;
382
+ sha: z.ZodString;
383
+ at: z.ZodString;
384
+ }, z.core.$strip>>>;
385
+ manualLapsedReason: z.ZodOptional<z.ZodEnum<{
386
+ noSelectionInRange: "noSelectionInRange";
387
+ selectionUnknown: "selectionUnknown";
388
+ noDeployLog: "noDeployLog";
389
+ unknownDeployedSha: "unknownDeployedSha";
390
+ ambiguousDeployedSha: "ambiguousDeployedSha";
391
+ deployedShaNotInLog: "deployedShaNotInLog";
392
+ gapInRange: "gapInRange";
393
+ }>>;
291
394
  heldBy: z.ZodNullable<z.ZodObject<{
292
395
  kind: z.ZodEnum<{
293
396
  run: "run";
@@ -997,6 +1100,36 @@ interface HubClient {
997
1100
  releaseLocks(project: string, q: {
998
1101
  profile: string;
999
1102
  }, holder: string): Promise<void>;
1103
+ /** Every attestation for the profile, standing and lapsed alike. */
1104
+ getAttestations(project: string, q: {
1105
+ profile: string;
1106
+ }): Promise<AttestationsResponse>;
1107
+ /** Record that a person checked `spec` by hand. The hub stamps the time and deploy head. */
1108
+ putAttestation(project: string, q: {
1109
+ profile: string;
1110
+ }, body: {
1111
+ spec: string;
1112
+ by: string;
1113
+ note?: string;
1114
+ }): Promise<AttestationResponse>;
1115
+ /** Revoke a spec's attestation. Revoking one that does not exist succeeds. */
1116
+ deleteAttestation(project: string, q: {
1117
+ profile: string;
1118
+ }, spec: string): Promise<void>;
1119
+ /** Every dismissed audit finding for the project, current and superseded alike. No profile — findings are about the repository. */
1120
+ getAuditDismissals(project: string): Promise<AuditDismissalsResponse>;
1121
+ /**
1122
+ * Record that a person judged `spec`'s current audit finding wrong. The hub
1123
+ * reads which finding that is from the ledger and pins the dismissal to it;
1124
+ * a spec with no open finding is rejected.
1125
+ */
1126
+ putAuditDismissal(project: string, body: {
1127
+ spec: string;
1128
+ by: string;
1129
+ note: string;
1130
+ }): Promise<AuditDismissalResponse>;
1131
+ /** Withdraw a dismissal, putting the audit's finding back in force. */
1132
+ deleteAuditDismissal(project: string, spec: string): Promise<void>;
1000
1133
  /**
1001
1134
  * Every spec's last `ccqa audit --report-to-hub` result, keyed by "feature/spec". No
1002
1135
  * profile — drift asks whether a spec still describes the code, not
@@ -182,6 +182,40 @@ function createHubClient(opts) {
182
182
  body: JSON.stringify({ holder })
183
183
  });
184
184
  },
185
+ getAttestations(project, q) {
186
+ return json(`${attestationsPath(project)}?${queryString({ profile: q.profile })}`);
187
+ },
188
+ putAttestation(project, q, body) {
189
+ return json(`${attestationsPath(project)}?${queryString({ profile: q.profile })}`, {
190
+ method: "PUT",
191
+ headers: { "Content-Type": "application/json" },
192
+ body: JSON.stringify(body)
193
+ });
194
+ },
195
+ async deleteAttestation(project, q, spec) {
196
+ await request(`${attestationsPath(project)}?${queryString({ profile: q.profile })}`, {
197
+ method: "DELETE",
198
+ headers: { "Content-Type": "application/json" },
199
+ body: JSON.stringify({ spec })
200
+ });
201
+ },
202
+ getAuditDismissals(project) {
203
+ return json(auditDismissalsPath(project));
204
+ },
205
+ putAuditDismissal(project, body) {
206
+ return json(auditDismissalsPath(project), {
207
+ method: "PUT",
208
+ headers: { "Content-Type": "application/json" },
209
+ body: JSON.stringify(body)
210
+ });
211
+ },
212
+ async deleteAuditDismissal(project, spec) {
213
+ await request(auditDismissalsPath(project), {
214
+ method: "DELETE",
215
+ headers: { "Content-Type": "application/json" },
216
+ body: JSON.stringify({ spec })
217
+ });
218
+ },
185
219
  getAuditNeed(project, q) {
186
220
  return json(`/api/v1/projects/${encodeURIComponent(project)}/audit-needed?${queryString({ profile: q.profile })}`);
187
221
  },
@@ -305,6 +339,12 @@ function spendPath(project) {
305
339
  function locksPath(project) {
306
340
  return `/api/v1/projects/${encodeURIComponent(project)}/locks`;
307
341
  }
342
+ function attestationsPath(project) {
343
+ return `/api/v1/projects/${encodeURIComponent(project)}/attestations`;
344
+ }
345
+ function auditDismissalsPath(project) {
346
+ return `/api/v1/projects/${encodeURIComponent(project)}/audit-dismissals`;
347
+ }
308
348
  /** Perspectives are one document per project: `/api/v1/projects/<project>/perspectives`. */
309
349
  function perspectivesPath(project) {
310
350
  return `/api/v1/projects/${encodeURIComponent(project)}/perspectives`;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccqa",
3
- "version": "1.31.4",
3
+ "version": "1.33.0",
4
4
  "type": "module",
5
5
  "description": "Browser test recorder powered by Claude Code and agent-browser",
6
6
  "repository": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccqa",
3
- "version": "1.31.4",
3
+ "version": "1.33.0",
4
4
  "type": "module",
5
5
  "description": "Browser test recorder powered by Claude Code and agent-browser",
6
6
  "repository": {