ccqa 0.10.0 → 0.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/dist/bin/ccqa.mjs CHANGED
@@ -760,6 +760,34 @@ function waitExit(child) {
760
760
  });
761
761
  }
762
762
  //#endregion
763
+ //#region src/runtime/live-artifacts.ts
764
+ /**
765
+ * Build a sortable run id from the current wall-clock time. ISO8601 with
766
+ * `:` / `.` replaced so it's filename-safe. Caller is expected to mkdir the
767
+ * directory once and pass `runDir = <baseDir>/<runId>` to the path helpers
768
+ * below.
769
+ */
770
+ function buildRunId() {
771
+ return (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
772
+ }
773
+ /**
774
+ * Per-step artifact paths under a run directory. `<runDir>/steps/<stepId>.*`.
775
+ * Three files per step:
776
+ * - <stepId>.before.png : screenshot taken BEFORE Claude executes the step.
777
+ * - <stepId>.after.png : screenshot taken AFTER Claude executes the step.
778
+ * - <stepId>.log.txt : full assistant transcript for the step (judgement
779
+ * reasoning, any STEP_RESULT lines, raw tool output
780
+ * summaries the model chose to keep).
781
+ */
782
+ function stepArtifactPaths(runDir, stepId) {
783
+ const dir = join(runDir, "steps");
784
+ return {
785
+ beforePng: join(dir, `${stepId}.before.png`),
786
+ afterPng: join(dir, `${stepId}.after.png`),
787
+ logTxt: join(dir, `${stepId}.log.txt`)
788
+ };
789
+ }
790
+ //#endregion
763
791
  //#region src/runtime/pool.ts
764
792
  /**
765
793
  * Run each item through `fn` with at most `concurrency` running at once.
@@ -4556,34 +4584,6 @@ function oneLine$1(s) {
4556
4584
  return s.replace(/\s+/g, " ").trim();
4557
4585
  }
4558
4586
  //#endregion
4559
- //#region src/runtime/live-artifacts.ts
4560
- /**
4561
- * Build a sortable run id from the current wall-clock time. ISO8601 with
4562
- * `:` / `.` replaced so it's filename-safe. Caller is expected to mkdir the
4563
- * directory once and pass `runDir = <baseDir>/<runId>` to the path helpers
4564
- * below.
4565
- */
4566
- function buildRunId() {
4567
- return (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
4568
- }
4569
- /**
4570
- * Per-step artifact paths under a run directory. `<runDir>/steps/<stepId>.*`.
4571
- * Three files per step:
4572
- * - <stepId>.before.png : screenshot taken BEFORE Claude executes the step.
4573
- * - <stepId>.after.png : screenshot taken AFTER Claude executes the step.
4574
- * - <stepId>.log.txt : full assistant transcript for the step (judgement
4575
- * reasoning, any STEP_RESULT lines, raw tool output
4576
- * summaries the model chose to keep).
4577
- */
4578
- function stepArtifactPaths(runDir, stepId) {
4579
- const dir = join(runDir, "steps");
4580
- return {
4581
- beforePng: join(dir, `${stepId}.before.png`),
4582
- afterPng: join(dir, `${stepId}.after.png`),
4583
- logTxt: join(dir, `${stepId}.log.txt`)
4584
- };
4585
- }
4586
- //#endregion
4587
4587
  //#region src/claude/agent-browser-invoke.ts
4588
4588
  function agentBrowserInvokeBase(input) {
4589
4589
  const env = {
@@ -5674,6 +5674,8 @@ async function runOneDeterministicSpec(spec, index, ctx) {
5674
5674
  }
5675
5675
  run(`${featureName}/${specName}`);
5676
5676
  meta("test", scriptFile);
5677
+ const runId = buildRunId();
5678
+ meta("runId", runId);
5677
5679
  blank();
5678
5680
  const reportFile = join(ctx.tmpDir, `report-${index}.json`);
5679
5681
  const evidenceDir = ctx.evidenceRoot ? join(ctx.evidenceRoot, featureName, specName) : null;
@@ -5684,6 +5686,11 @@ async function runOneDeterministicSpec(spec, index, ctx) {
5684
5686
  });
5685
5687
  await mkdir(evidenceDir, { recursive: true });
5686
5688
  }
5689
+ const specEnv = {
5690
+ ...process.env,
5691
+ CCQA_RUN_ID: runId
5692
+ };
5693
+ if (evidenceDir) specEnv.CCQA_EVIDENCE_DIR = evidenceDir;
5687
5694
  const proc = spawnVitestStreaming([
5688
5695
  "run",
5689
5696
  "--config",
@@ -5693,10 +5700,7 @@ async function runOneDeterministicSpec(spec, index, ctx) {
5693
5700
  `--outputFile.json=${reportFile}`
5694
5701
  ], {
5695
5702
  cwd: ctx.cwd,
5696
- env: evidenceDir ? {
5697
- ...process.env,
5698
- CCQA_EVIDENCE_DIR: evidenceDir
5699
- } : process.env
5703
+ env: specEnv
5700
5704
  });
5701
5705
  const sink = { write: emitRaw };
5702
5706
  const tail = ctx.captureOutput ? new TailBuffer(OUTPUT_TAIL_CAP) : null;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccqa",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
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": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "type": "module",
5
5
  "description": "Browser test recorder powered by Claude Code and agent-browser",
6
6
  "repository": {