ccqa 1.9.0 → 1.10.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 +226 -68
- package/dist/bin/ccqa.mjs +6231 -5023
- package/dist/hub-client/index.d.mts +123 -40
- package/dist/hub-client/index.mjs +3 -0
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -39,11 +39,19 @@ declare const RunSchema: z.ZodObject<{
|
|
|
39
39
|
drift: "drift";
|
|
40
40
|
}>>;
|
|
41
41
|
drift: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
specs: z.ZodNumber;
|
|
43
|
+
testDrift: z.ZodNumber;
|
|
44
|
+
specChange: z.ZodNumber;
|
|
45
|
+
unknown: z.ZodNumber;
|
|
46
46
|
}, z.core.$strip>>>;
|
|
47
|
+
gradedDrift: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
specs: z.ZodNumber;
|
|
49
|
+
testDrift: z.ZodNumber;
|
|
50
|
+
specChange: z.ZodNumber;
|
|
51
|
+
unknown: z.ZodNumber;
|
|
52
|
+
noDrift: z.ZodNumber;
|
|
53
|
+
graded: z.ZodNumber;
|
|
54
|
+
}, z.core.$strip>>;
|
|
47
55
|
specs: z.ZodObject<{
|
|
48
56
|
total: z.ZodNumber;
|
|
49
57
|
passed: z.ZodNumber;
|
|
@@ -88,6 +96,7 @@ declare const TriageCaseSchema: z.ZodObject<{
|
|
|
88
96
|
TEST_DRIFT: "TEST_DRIFT";
|
|
89
97
|
SPEC_CHANGE: "SPEC_CHANGE";
|
|
90
98
|
PRODUCT_BUG: "PRODUCT_BUG";
|
|
99
|
+
NO_DRIFT: "NO_DRIFT";
|
|
91
100
|
}>;
|
|
92
101
|
note: z.ZodOptional<z.ZodString>;
|
|
93
102
|
recordedAt: z.ZodString;
|
|
@@ -117,6 +126,7 @@ declare const RunTriageSchema: z.ZodObject<{
|
|
|
117
126
|
TEST_DRIFT: "TEST_DRIFT";
|
|
118
127
|
SPEC_CHANGE: "SPEC_CHANGE";
|
|
119
128
|
PRODUCT_BUG: "PRODUCT_BUG";
|
|
129
|
+
NO_DRIFT: "NO_DRIFT";
|
|
120
130
|
}>;
|
|
121
131
|
note: z.ZodOptional<z.ZodString>;
|
|
122
132
|
recordedAt: z.ZodString;
|
|
@@ -131,6 +141,7 @@ declare const PutActualCauseRequestSchema: z.ZodObject<{
|
|
|
131
141
|
TEST_DRIFT: "TEST_DRIFT";
|
|
132
142
|
SPEC_CHANGE: "SPEC_CHANGE";
|
|
133
143
|
PRODUCT_BUG: "PRODUCT_BUG";
|
|
144
|
+
NO_DRIFT: "NO_DRIFT";
|
|
134
145
|
}>;
|
|
135
146
|
note: z.ZodOptional<z.ZodString>;
|
|
136
147
|
}, z.core.$strip>;
|
|
@@ -158,7 +169,7 @@ declare const DeployEntrySchema: z.ZodObject<{
|
|
|
158
169
|
ref: z.ZodOptional<z.ZodString>;
|
|
159
170
|
runUrl: z.ZodOptional<z.ZodString>;
|
|
160
171
|
changedPaths: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
161
|
-
|
|
172
|
+
hasSelection: z.ZodDefault<z.ZodBoolean>;
|
|
162
173
|
gapBefore: z.ZodDefault<z.ZodBoolean>;
|
|
163
174
|
}, z.core.$strip>;
|
|
164
175
|
type DeployEntry = z.infer<typeof DeployEntrySchema>;
|
|
@@ -180,13 +191,13 @@ declare const RerunReportSchema: z.ZodObject<{
|
|
|
180
191
|
notEvaluated: "notEvaluated";
|
|
181
192
|
}>;
|
|
182
193
|
reason: z.ZodOptional<z.ZodEnum<{
|
|
183
|
-
|
|
194
|
+
noSelectionInRange: "noSelectionInRange";
|
|
195
|
+
selectionUnknown: "selectionUnknown";
|
|
184
196
|
noDeployLog: "noDeployLog";
|
|
185
197
|
unknownDeployedSha: "unknownDeployedSha";
|
|
186
198
|
ambiguousDeployedSha: "ambiguousDeployedSha";
|
|
187
199
|
deployedShaNotInLog: "deployedShaNotInLog";
|
|
188
200
|
gapInRange: "gapInRange";
|
|
189
|
-
truncatedInRange: "truncatedInRange";
|
|
190
201
|
}>>;
|
|
191
202
|
lastRun: z.ZodNullable<z.ZodObject<{
|
|
192
203
|
gitHead: z.ZodString;
|
|
@@ -223,6 +234,15 @@ declare const RecordDeployRequestSchema: z.ZodObject<{
|
|
|
223
234
|
sha: z.ZodString;
|
|
224
235
|
previousSha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
225
236
|
changedPaths: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
237
|
+
selection: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
238
|
+
verdict: z.ZodEnum<{
|
|
239
|
+
unknown: "unknown";
|
|
240
|
+
needed: "needed";
|
|
241
|
+
notNeeded: "notNeeded";
|
|
242
|
+
}>;
|
|
243
|
+
reason: z.ZodString;
|
|
244
|
+
touchedBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
245
|
+
}, z.core.$strip>>>;
|
|
226
246
|
ref: z.ZodOptional<z.ZodString>;
|
|
227
247
|
runUrl: z.ZodOptional<z.ZodString>;
|
|
228
248
|
}, z.core.$strip>;
|
|
@@ -237,12 +257,36 @@ declare const DeployLogResponseSchema: z.ZodObject<{
|
|
|
237
257
|
ref: z.ZodOptional<z.ZodString>;
|
|
238
258
|
runUrl: z.ZodOptional<z.ZodString>;
|
|
239
259
|
changedPaths: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
240
|
-
|
|
260
|
+
hasSelection: z.ZodDefault<z.ZodBoolean>;
|
|
241
261
|
gapBefore: z.ZodDefault<z.ZodBoolean>;
|
|
242
262
|
}, z.core.$strip>>;
|
|
243
263
|
nextIndex: z.ZodNumber;
|
|
244
264
|
}, z.core.$strip>;
|
|
245
265
|
type DeployLogResponse = z.infer<typeof DeployLogResponseSchema>;
|
|
266
|
+
/**
|
|
267
|
+
* Body of `GET /projects/:project/drift`. No `?profile=` — see `SpecDriftEntrySchema`.
|
|
268
|
+
*/
|
|
269
|
+
declare const DriftLedgerResponseSchema: z.ZodObject<{
|
|
270
|
+
project: z.ZodString;
|
|
271
|
+
specs: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
272
|
+
label: z.ZodNullable<z.ZodEnum<{
|
|
273
|
+
TEST_DRIFT: "TEST_DRIFT";
|
|
274
|
+
SPEC_CHANGE: "SPEC_CHANGE";
|
|
275
|
+
UNKNOWN: "UNKNOWN";
|
|
276
|
+
}>>;
|
|
277
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
278
|
+
spec: "spec";
|
|
279
|
+
generated: "generated";
|
|
280
|
+
}>>;
|
|
281
|
+
confidence: z.ZodOptional<z.ZodNumber>;
|
|
282
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
283
|
+
gitHead: z.ZodString;
|
|
284
|
+
runId: z.ZodString;
|
|
285
|
+
at: z.ZodString;
|
|
286
|
+
graded: z.ZodOptional<z.ZodBoolean>;
|
|
287
|
+
}, z.core.$strip>>;
|
|
288
|
+
}, z.core.$strip>;
|
|
289
|
+
type DriftLedgerResponse = z.infer<typeof DriftLedgerResponseSchema>;
|
|
246
290
|
//#endregion
|
|
247
291
|
//#region src/prompts/prompt-names.d.ts
|
|
248
292
|
/**
|
|
@@ -273,6 +317,10 @@ declare const ReportSpecResultSchema: z.ZodObject<{
|
|
|
273
317
|
spec: z.ZodString;
|
|
274
318
|
title: z.ZodNullable<z.ZodString>;
|
|
275
319
|
target: z.ZodOptional<z.ZodString>;
|
|
320
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
321
|
+
live: "live";
|
|
322
|
+
deterministic: "deterministic";
|
|
323
|
+
}>>;
|
|
276
324
|
status: z.ZodEnum<{
|
|
277
325
|
passed: "passed";
|
|
278
326
|
failed: "failed";
|
|
@@ -316,6 +364,10 @@ declare const ReportSpecResultSchema: z.ZodObject<{
|
|
|
316
364
|
detail: z.ZodString;
|
|
317
365
|
}, z.core.$strip>>;
|
|
318
366
|
reasoning: z.ZodString;
|
|
367
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
368
|
+
spec: "spec";
|
|
369
|
+
generated: "generated";
|
|
370
|
+
}>>;
|
|
319
371
|
}, z.core.$strip>>;
|
|
320
372
|
analysisSkipped: z.ZodNullable<z.ZodString>;
|
|
321
373
|
customPromptVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -323,22 +375,30 @@ declare const ReportSpecResultSchema: z.ZodObject<{
|
|
|
323
375
|
ref: z.ZodString;
|
|
324
376
|
sha: z.ZodString;
|
|
325
377
|
}, z.core.$strip>>>;
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}>;
|
|
332
|
-
category: z.ZodEnum<{
|
|
333
|
-
assertable: "assertable";
|
|
334
|
-
blocks: "blocks";
|
|
335
|
-
granularity: "granularity";
|
|
336
|
-
unimplemented: "unimplemented";
|
|
378
|
+
driftAudit: z.ZodNullable<z.ZodObject<{
|
|
379
|
+
label: z.ZodEnum<{
|
|
380
|
+
TEST_DRIFT: "TEST_DRIFT";
|
|
381
|
+
SPEC_CHANGE: "SPEC_CHANGE";
|
|
382
|
+
UNKNOWN: "UNKNOWN";
|
|
337
383
|
}>;
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
384
|
+
confidence: z.ZodNumber;
|
|
385
|
+
surface: z.ZodDefault<z.ZodEnum<{
|
|
386
|
+
spec: "spec";
|
|
387
|
+
generated: "generated";
|
|
388
|
+
}>>;
|
|
389
|
+
subDiagnosis: z.ZodDefault<z.ZodEnum<{
|
|
390
|
+
OVER_ASSERTION: "OVER_ASSERTION";
|
|
391
|
+
SELECTOR_DRIFT: "SELECTOR_DRIFT";
|
|
392
|
+
NONE: "NONE";
|
|
393
|
+
}>>;
|
|
394
|
+
headline: z.ZodString;
|
|
395
|
+
recommendation: z.ZodDefault<z.ZodString>;
|
|
396
|
+
evidence: z.ZodArray<z.ZodObject<{
|
|
397
|
+
file: z.ZodOptional<z.ZodString>;
|
|
398
|
+
detail: z.ZodString;
|
|
399
|
+
}, z.core.$strip>>;
|
|
400
|
+
reasoning: z.ZodDefault<z.ZodString>;
|
|
401
|
+
}, z.core.$strip>>;
|
|
342
402
|
failureLogExcerpt: z.ZodNullable<z.ZodString>;
|
|
343
403
|
diffExcerpt: z.ZodNullable<z.ZodString>;
|
|
344
404
|
specYaml: z.ZodNullable<z.ZodString>;
|
|
@@ -443,6 +503,10 @@ declare const RunReportDataSchema: z.ZodObject<{
|
|
|
443
503
|
spec: z.ZodString;
|
|
444
504
|
title: z.ZodNullable<z.ZodString>;
|
|
445
505
|
target: z.ZodOptional<z.ZodString>;
|
|
506
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
507
|
+
live: "live";
|
|
508
|
+
deterministic: "deterministic";
|
|
509
|
+
}>>;
|
|
446
510
|
status: z.ZodEnum<{
|
|
447
511
|
passed: "passed";
|
|
448
512
|
failed: "failed";
|
|
@@ -486,6 +550,10 @@ declare const RunReportDataSchema: z.ZodObject<{
|
|
|
486
550
|
detail: z.ZodString;
|
|
487
551
|
}, z.core.$strip>>;
|
|
488
552
|
reasoning: z.ZodString;
|
|
553
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
554
|
+
spec: "spec";
|
|
555
|
+
generated: "generated";
|
|
556
|
+
}>>;
|
|
489
557
|
}, z.core.$strip>>;
|
|
490
558
|
analysisSkipped: z.ZodNullable<z.ZodString>;
|
|
491
559
|
customPromptVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -493,22 +561,30 @@ declare const RunReportDataSchema: z.ZodObject<{
|
|
|
493
561
|
ref: z.ZodString;
|
|
494
562
|
sha: z.ZodString;
|
|
495
563
|
}, z.core.$strip>>>;
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
}>;
|
|
502
|
-
category: z.ZodEnum<{
|
|
503
|
-
assertable: "assertable";
|
|
504
|
-
blocks: "blocks";
|
|
505
|
-
granularity: "granularity";
|
|
506
|
-
unimplemented: "unimplemented";
|
|
564
|
+
driftAudit: z.ZodNullable<z.ZodObject<{
|
|
565
|
+
label: z.ZodEnum<{
|
|
566
|
+
TEST_DRIFT: "TEST_DRIFT";
|
|
567
|
+
SPEC_CHANGE: "SPEC_CHANGE";
|
|
568
|
+
UNKNOWN: "UNKNOWN";
|
|
507
569
|
}>;
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
570
|
+
confidence: z.ZodNumber;
|
|
571
|
+
surface: z.ZodDefault<z.ZodEnum<{
|
|
572
|
+
spec: "spec";
|
|
573
|
+
generated: "generated";
|
|
574
|
+
}>>;
|
|
575
|
+
subDiagnosis: z.ZodDefault<z.ZodEnum<{
|
|
576
|
+
OVER_ASSERTION: "OVER_ASSERTION";
|
|
577
|
+
SELECTOR_DRIFT: "SELECTOR_DRIFT";
|
|
578
|
+
NONE: "NONE";
|
|
579
|
+
}>>;
|
|
580
|
+
headline: z.ZodString;
|
|
581
|
+
recommendation: z.ZodDefault<z.ZodString>;
|
|
582
|
+
evidence: z.ZodArray<z.ZodObject<{
|
|
583
|
+
file: z.ZodOptional<z.ZodString>;
|
|
584
|
+
detail: z.ZodString;
|
|
585
|
+
}, z.core.$strip>>;
|
|
586
|
+
reasoning: z.ZodDefault<z.ZodString>;
|
|
587
|
+
}, z.core.$strip>>;
|
|
512
588
|
failureLogExcerpt: z.ZodNullable<z.ZodString>;
|
|
513
589
|
diffExcerpt: z.ZodNullable<z.ZodString>;
|
|
514
590
|
specYaml: z.ZodNullable<z.ZodString>;
|
|
@@ -745,12 +821,19 @@ interface HubClient {
|
|
|
745
821
|
/**
|
|
746
822
|
* Per spec of one project/profile: is its last result still trustworthy?
|
|
747
823
|
* Answers `ccqa run --changed=last-run`. 404 when the project has no
|
|
748
|
-
* perspectives document — there is then no
|
|
749
|
-
* against, which the caller must report rather than read as
|
|
824
|
+
* perspectives document — there is then no spec registered to compare
|
|
825
|
+
* against a deploy, which the caller must report rather than read as
|
|
826
|
+
* "nothing to run".
|
|
750
827
|
*/
|
|
751
828
|
getRerun(project: string, q: {
|
|
752
829
|
profile: string;
|
|
753
830
|
}): Promise<RerunReport>;
|
|
831
|
+
/**
|
|
832
|
+
* Every spec's last `ccqa drift --push` audit, keyed by "feature/spec". No
|
|
833
|
+
* profile — drift asks whether a spec still describes the code, not
|
|
834
|
+
* whether an environment is stale.
|
|
835
|
+
*/
|
|
836
|
+
getDriftLedger(project: string): Promise<DriftLedgerResponse>;
|
|
754
837
|
/** Tell the hub what a deploy shipped (`ccqa hub deploy record`). */
|
|
755
838
|
recordDeploy(project: string, profile: string, body: RecordDeployRequest): Promise<DeployEntry>;
|
|
756
839
|
/** The profile's retained deploy log, oldest first; `limit` keeps the newest N. */
|
|
@@ -168,6 +168,9 @@ function createHubClient(opts) {
|
|
|
168
168
|
getRerun(project, q) {
|
|
169
169
|
return json(`/api/v1/projects/${encodeURIComponent(project)}/rerun?${queryString({ profile: q.profile })}`);
|
|
170
170
|
},
|
|
171
|
+
getDriftLedger(project) {
|
|
172
|
+
return json(`/api/v1/projects/${encodeURIComponent(project)}/drift`);
|
|
173
|
+
},
|
|
171
174
|
recordDeploy(project, profile, body) {
|
|
172
175
|
return json(`${deploysPath(project)}?${queryString({ profile })}`, {
|
|
173
176
|
method: "POST",
|
package/dist/package.json
CHANGED