ccqa 1.38.0 → 1.40.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.
@@ -548,6 +548,42 @@ declare const SpendLogResponseSchema: z.ZodObject<{
548
548
  }, z.core.$strip>;
549
549
  type SpendLogResponse = z.infer<typeof SpendLogResponseSchema>;
550
550
  //#endregion
551
+ //#region src/coverage/resolve-stream.d.ts
552
+ /**
553
+ * What one run's slice of the stream resolves to. The shape is the read-out
554
+ * API of `CoverageResolver` written down: what the coverage page needs to
555
+ * draw, and nothing the stream cannot support.
556
+ */
557
+ declare const ResolvedCoverageSchema: z.ZodObject<{
558
+ runId: z.ZodString;
559
+ hubRunId: z.ZodOptional<z.ZodString>;
560
+ asOf: z.ZodNumber;
561
+ lastSeq: z.ZodNumber;
562
+ universe: z.ZodOptional<z.ZodObject<{
563
+ include: z.ZodArray<z.ZodString>;
564
+ files: z.ZodArray<z.ZodString>;
565
+ }, z.core.$strip>>;
566
+ specs: z.ZodArray<z.ZodObject<{
567
+ specId: z.ZodString;
568
+ files: z.ZodArray<z.ZodString>;
569
+ actorEvents: z.ZodRecord<z.ZodString, z.ZodNumber>;
570
+ }, z.core.$strip>>;
571
+ boot: z.ZodArray<z.ZodString>;
572
+ health: z.ZodObject<{
573
+ heardFromApplication: z.ZodBoolean;
574
+ pushesDuringRun: z.ZodNumber;
575
+ attributedSpecs: z.ZodNumber;
576
+ rejectedPushes: z.ZodNumber;
577
+ uninstrumentedFiles: z.ZodNumber;
578
+ uninstrumentedProcesses: z.ZodNumber;
579
+ droppedPushes: z.ZodNumber;
580
+ unmappedActorEvents: z.ZodNumber;
581
+ outsideWindowEvents: z.ZodRecord<z.ZodString, z.ZodNumber>;
582
+ specsMeasured: z.ZodNumber;
583
+ }, z.core.$strip>;
584
+ }, z.core.$strip>;
585
+ type ResolvedCoverage = z.infer<typeof ResolvedCoverageSchema>;
586
+ //#endregion
551
587
  //#region src/prompts/prompt-names.d.ts
552
588
  /**
553
589
  * The fixed set of prompt assets the hub stores per project/profile, and which
@@ -1054,6 +1090,16 @@ interface HubPromptMeta {
1054
1090
  updatedAt: string;
1055
1091
  meta: Record<string, unknown>;
1056
1092
  }
1093
+ /**
1094
+ * What `GET /api/v1/coverage` answers: one run's resolved view of the
1095
+ * project's coverage event stream, plus every run the stream retains (newest
1096
+ * first, bounded server-side). `resolved` is null when the stream holds no
1097
+ * measured run.
1098
+ */
1099
+ interface HubCoverageAnswer {
1100
+ resolved: ResolvedCoverage | null;
1101
+ runIds: string[];
1102
+ }
1057
1103
  interface HubClient {
1058
1104
  /**
1059
1105
  * Push a report directory (as a tar.gz) for an already-finished `ccqa run`.
@@ -1099,11 +1145,20 @@ interface HubClient {
1099
1145
  project?: string;
1100
1146
  branch?: string;
1101
1147
  status?: RunStatus;
1148
+ kind?: Run["kind"];
1102
1149
  limit?: number;
1103
1150
  }): Promise<Run[]>;
1104
1151
  getRun(id: string): Promise<Run>;
1105
1152
  getReport(id: string): Promise<unknown>;
1106
1153
  downloadArtifacts(id: string): Promise<Uint8Array>;
1154
+ /**
1155
+ * The project's coverage event stream, resolved for one run — `runId`
1156
+ * omitted means the most recently measured run. Spec selection reads its
1157
+ * reach edges through this (ADR-0024).
1158
+ */
1159
+ getCoverage(project: string, q?: {
1160
+ runId?: string;
1161
+ }): Promise<HubCoverageAnswer>;
1107
1162
  getTriage(id: string): Promise<RunTriage>;
1108
1163
  putActualCause(id: string, c: {
1109
1164
  feature: string;
@@ -1250,4 +1305,4 @@ interface HubClient {
1250
1305
  declare function hubRequest(opts: HubClientOptions, path: string, init?: RequestInit, retry?: "post-once"): Promise<Response>;
1251
1306
  declare function createHubClient(opts: HubClientOptions): HubClient;
1252
1307
  //#endregion
1253
- export { HubApiError, HubClient, HubClientOptions, HubPromptMeta, HubVariable, PatchRunRequest, createHubClient, hubRequest };
1308
+ export { HubApiError, HubClient, HubClientOptions, HubCoverageAnswer, HubPromptMeta, HubVariable, PatchRunRequest, createHubClient, hubRequest };
@@ -147,6 +147,12 @@ function createHubClient(opts) {
147
147
  downloadArtifacts(id) {
148
148
  return bytes(`/api/v1/runs/${encodeURIComponent(id)}/artifacts`);
149
149
  },
150
+ getCoverage(project, q = {}) {
151
+ return json(`/api/v1/coverage?${queryString({
152
+ project,
153
+ runId: q.runId
154
+ })}`);
155
+ },
150
156
  getTriage(id) {
151
157
  return json(`/api/v1/runs/${encodeURIComponent(id)}/triage`);
152
158
  },
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccqa",
3
- "version": "1.38.0",
3
+ "version": "1.40.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.38.0",
3
+ "version": "1.40.0",
4
4
  "type": "module",
5
5
  "description": "Browser test recorder powered by Claude Code and agent-browser",
6
6
  "repository": {