ccqa 1.3.0 → 1.4.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.
- package/README.md +4 -3
- package/dist/bin/ccqa.mjs +840 -357
- package/dist/hub-client/index.d.mts +41 -0
- package/dist/hub-client/index.mjs +10 -0
- package/dist/package.json +11 -1
- package/package.json +11 -1
|
@@ -126,6 +126,20 @@ declare const PutActualCauseRequestSchema: z.ZodObject<{
|
|
|
126
126
|
note: z.ZodOptional<z.ZodString>;
|
|
127
127
|
}, z.core.$strip>;
|
|
128
128
|
type PutActualCauseRequest = z.infer<typeof PutActualCauseRequestSchema>;
|
|
129
|
+
/**
|
|
130
|
+
* One spec's "last time it passed" record in the last-green ledger. The hub
|
|
131
|
+
* updates the ledger whenever a `kind: "run"` run reaches a terminal state:
|
|
132
|
+
* every spec that passed gets its entry advanced to that run's `gitHead`
|
|
133
|
+
* (newest `at` wins, so out-of-order finalizes can't move a baseline
|
|
134
|
+
* backwards). `ccqa run --failure-analysis=last-green` reads it to diff each
|
|
135
|
+
* failing spec against the commit where that spec was last green.
|
|
136
|
+
*/
|
|
137
|
+
declare const LastGreenEntrySchema: z.ZodObject<{
|
|
138
|
+
gitHead: z.ZodString;
|
|
139
|
+
runId: z.ZodString;
|
|
140
|
+
at: z.ZodString;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
type LastGreenEntry = z.infer<typeof LastGreenEntrySchema>;
|
|
129
143
|
//#endregion
|
|
130
144
|
//#region src/prompts/prompt-names.d.ts
|
|
131
145
|
/**
|
|
@@ -201,6 +215,10 @@ declare const ReportSpecResultSchema: z.ZodObject<{
|
|
|
201
215
|
reasoning: z.ZodString;
|
|
202
216
|
}, z.core.$strip>>;
|
|
203
217
|
analysisSkipped: z.ZodNullable<z.ZodString>;
|
|
218
|
+
analysisBase: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
219
|
+
ref: z.ZodString;
|
|
220
|
+
sha: z.ZodString;
|
|
221
|
+
}, z.core.$strip>>>;
|
|
204
222
|
driftIssues: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
205
223
|
severity: z.ZodEnum<{
|
|
206
224
|
OK: "OK";
|
|
@@ -300,6 +318,12 @@ declare const RunReportDataSchema: z.ZodObject<{
|
|
|
300
318
|
git: z.ZodObject<{
|
|
301
319
|
head: z.ZodNullable<z.ZodString>;
|
|
302
320
|
base: z.ZodNullable<z.ZodString>;
|
|
321
|
+
baseSha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
322
|
+
baseSource: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
323
|
+
explicit: "explicit";
|
|
324
|
+
"github-base-ref": "github-base-ref";
|
|
325
|
+
"last-green": "last-green";
|
|
326
|
+
}>>>;
|
|
303
327
|
}, z.core.$strip>;
|
|
304
328
|
model: z.ZodNullable<z.ZodString>;
|
|
305
329
|
language: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -356,6 +380,10 @@ declare const RunReportDataSchema: z.ZodObject<{
|
|
|
356
380
|
reasoning: z.ZodString;
|
|
357
381
|
}, z.core.$strip>>;
|
|
358
382
|
analysisSkipped: z.ZodNullable<z.ZodString>;
|
|
383
|
+
analysisBase: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
384
|
+
ref: z.ZodString;
|
|
385
|
+
sha: z.ZodString;
|
|
386
|
+
}, z.core.$strip>>>;
|
|
359
387
|
driftIssues: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
360
388
|
severity: z.ZodEnum<{
|
|
361
389
|
OK: "OK";
|
|
@@ -541,12 +569,15 @@ interface HubClient {
|
|
|
541
569
|
* Open a `running` run to push results into incrementally. Returns the new
|
|
542
570
|
* run's id. Non-retryable (a dropped response after the server committed
|
|
543
571
|
* would leave a second open run); callers degrade to local-only on failure.
|
|
572
|
+
* `gitHead` stamps the run's commit at open time, so even a run that dies
|
|
573
|
+
* before its final reconcile patch is attributable to a commit.
|
|
544
574
|
*/
|
|
545
575
|
openRun(meta: {
|
|
546
576
|
project: string;
|
|
547
577
|
branch?: string;
|
|
548
578
|
profile?: string;
|
|
549
579
|
kind?: "run" | "drift";
|
|
580
|
+
gitHead?: string;
|
|
550
581
|
}): Promise<Run>;
|
|
551
582
|
/** Add finished spec rows (+ evidence) to a running run; `done` closes it. */
|
|
552
583
|
patchRun(id: string, body: PatchRunRequest): Promise<Run>;
|
|
@@ -573,6 +604,16 @@ interface HubClient {
|
|
|
573
604
|
}>;
|
|
574
605
|
/** Every project the hub knows (from runs and stored secrets). */
|
|
575
606
|
listProjects(): Promise<string[]>;
|
|
607
|
+
/**
|
|
608
|
+
* The last-green ledger for one project/profile: "feature/spec" → the run
|
|
609
|
+
* head where that spec last passed. `branch` entries overlay
|
|
610
|
+
* `fallbackBranch` (typically the default branch) entries server-side.
|
|
611
|
+
*/
|
|
612
|
+
getLastGreen(project: string, q: {
|
|
613
|
+
profile?: string;
|
|
614
|
+
branch: string;
|
|
615
|
+
fallbackBranch?: string;
|
|
616
|
+
}): Promise<Record<string, LastGreenEntry>>;
|
|
576
617
|
putSession(project: string, profile: string, name: string, storageState: unknown): Promise<void>;
|
|
577
618
|
getSession(project: string, profile: string, name: string): Promise<unknown>;
|
|
578
619
|
listSessions(project: string, profile: string): Promise<{
|
|
@@ -109,6 +109,7 @@ function createHubClient(opts) {
|
|
|
109
109
|
if (meta.branch) params.set("branch", meta.branch);
|
|
110
110
|
if (meta.profile) params.set("profile", meta.profile);
|
|
111
111
|
if (meta.kind) params.set("kind", meta.kind);
|
|
112
|
+
if (meta.gitHead) params.set("gitHead", meta.gitHead);
|
|
112
113
|
return json(`/api/v1/runs/open?${params}`, { method: "POST" });
|
|
113
114
|
},
|
|
114
115
|
patchRun(id, body) {
|
|
@@ -151,6 +152,15 @@ function createHubClient(opts) {
|
|
|
151
152
|
body: JSON.stringify(labels)
|
|
152
153
|
});
|
|
153
154
|
},
|
|
155
|
+
async getLastGreen(project, q) {
|
|
156
|
+
const params = queryString({
|
|
157
|
+
branch: q.branch,
|
|
158
|
+
...q.profile ? { profile: q.profile } : {},
|
|
159
|
+
...q.fallbackBranch ? { fallbackBranch: q.fallbackBranch } : {}
|
|
160
|
+
});
|
|
161
|
+
const { entries } = await json(`/api/v1/projects/${encodeURIComponent(project)}/last-green?${params}`);
|
|
162
|
+
return entries;
|
|
163
|
+
},
|
|
154
164
|
async listProjects() {
|
|
155
165
|
const { projects } = await json("/api/v1/projects");
|
|
156
166
|
return projects;
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccqa",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Browser test recorder powered by Claude Code and agent-browser",
|
|
6
6
|
"repository": {
|
|
@@ -34,6 +34,16 @@
|
|
|
34
34
|
"yaml": "^2.9.0",
|
|
35
35
|
"zod": "^4.3.6"
|
|
36
36
|
},
|
|
37
|
+
"optionalDependencies": {
|
|
38
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "^0.3.215",
|
|
39
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "^0.3.215",
|
|
40
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "^0.3.215",
|
|
41
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "^0.3.215",
|
|
42
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64": "^0.3.215",
|
|
43
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "^0.3.215",
|
|
44
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "^0.3.215",
|
|
45
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "^0.3.215"
|
|
46
|
+
},
|
|
37
47
|
"peerDependencies": {
|
|
38
48
|
"agent-browser": "*",
|
|
39
49
|
"vitest": ">=2.0.0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccqa",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Browser test recorder powered by Claude Code and agent-browser",
|
|
6
6
|
"repository": {
|
|
@@ -34,6 +34,16 @@
|
|
|
34
34
|
"yaml": "^2.9.0",
|
|
35
35
|
"zod": "^4.3.6"
|
|
36
36
|
},
|
|
37
|
+
"optionalDependencies": {
|
|
38
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "^0.3.215",
|
|
39
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "^0.3.215",
|
|
40
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "^0.3.215",
|
|
41
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "^0.3.215",
|
|
42
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64": "^0.3.215",
|
|
43
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "^0.3.215",
|
|
44
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "^0.3.215",
|
|
45
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "^0.3.215"
|
|
46
|
+
},
|
|
37
47
|
"peerDependencies": {
|
|
38
48
|
"agent-browser": "*",
|
|
39
49
|
"vitest": ">=2.0.0"
|