ccqa 1.27.0 → 1.28.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/dist/bin/ccqa.mjs CHANGED
@@ -4460,6 +4460,44 @@ function withHubErrors(fn) {
4460
4460
  };
4461
4461
  }
4462
4462
  //#endregion
4463
+ //#region src/cli/repo-local-profiles.ts
4464
+ /** Where a named profile's variables lived before profiles moved to the hub. */
4465
+ const PROFILES_DIR = ".ccqa/profiles";
4466
+ /**
4467
+ * Flag `.ccqa/profiles/<name>.env` files the move to hub-stored profiles left
4468
+ * behind. Warns, never fails: the run resolved its variables from the right
4469
+ * place, so the file's existence is the only thing wrong. A tracked one is
4470
+ * called out separately — that is a committed credential, not just dead weight.
4471
+ */
4472
+ async function warnRepoLocalProfiles(cwd) {
4473
+ const paths = (await readdir(join(cwd, PROFILES_DIR)).catch(() => [])).filter((name) => name.endsWith(".env")).sort().map((name) => `${PROFILES_DIR}/${name}`);
4474
+ if (paths.length === 0) return;
4475
+ warn(`ccqa does not read repo-local profile files — the values in ${paths.join(", ")} are not in effect for this run. Profile variables come from the hub: register them with \`ccqa hub var set --profile <name>\`, then delete the ${noun(paths.length)}.`);
4476
+ const tracked = await trackedPaths(paths, cwd);
4477
+ if (tracked.length === 0) return;
4478
+ warn(`tracked by git: ${tracked.join(", ")} — a profile file holds credentials, so whatever is in there is committed. Rotate those values; deleting the ${noun(tracked.length)} now does not un-commit them.`);
4479
+ }
4480
+ function noun(n) {
4481
+ return n === 1 ? "file" : "files";
4482
+ }
4483
+ /**
4484
+ * The subset git reports as tracked. Outside a repository the question has no
4485
+ * answer, so stay silent rather than accuse or reassure on a guess.
4486
+ */
4487
+ async function trackedPaths(paths, cwd) {
4488
+ try {
4489
+ const { stdout } = await execFileP("git", [
4490
+ "ls-files",
4491
+ "-z",
4492
+ "--",
4493
+ ...paths
4494
+ ], { cwd });
4495
+ return stdout.split("\0").filter((p) => p !== "");
4496
+ } catch {
4497
+ return [];
4498
+ }
4499
+ }
4500
+ //#endregion
4463
4501
  //#region src/cli/options.ts
4464
4502
  /**
4465
4503
  * Shared `--language` flag. Every Claude-driven command writes some
@@ -4511,6 +4549,7 @@ async function applyProfileFromOption(opts) {
4511
4549
  * rather than skipping it.
4512
4550
  */
4513
4551
  async function resolveProfileEnv(opts) {
4552
+ await warnRepoLocalProfiles(opts.cwd);
4514
4553
  if (opts.profile !== void 0) await applyNamedProfile(opts.profile, opts.project, opts.cwd, opts);
4515
4554
  else await applyDefaultEnv(opts.cwd);
4516
4555
  }
@@ -24086,8 +24125,8 @@ const CLIENT_JS = `
24086
24125
  }
24087
24126
 
24088
24127
  // ── profile switching (per-tab dropdowns) ──────────────────────────────
24089
- // Profiles scope variables + sessions (a profile is a set of env vars, like
24090
- // .ccqa/profiles/<name>.env) and, since ADR-0010, the needs-re-run verdict:
24128
+ // Profiles scope variables + sessions (a profile is a set of env vars) and,
24129
+ // since ADR-0010, the needs-re-run verdict:
24091
24130
  // two environments sit at different commits, so that question has no
24092
24131
  // profile-free answer. Prompts are project-wide and runs are cross-profile,
24093
24132
  // so there is still no header-level selector — Secrets and Perspectives each
@@ -35,9 +35,9 @@ declare const RunSchema: z.ZodObject<{
35
35
  running: "running";
36
36
  }>;
37
37
  kind: z.ZodDefault<z.ZodEnum<{
38
- record: "record";
39
38
  run: "run";
40
39
  drift: "drift";
40
+ record: "record";
41
41
  }>>;
42
42
  drift: z.ZodDefault<z.ZodNullable<z.ZodObject<{
43
43
  specs: z.ZodNumber;
@@ -621,9 +621,9 @@ type ReportSpecResult = z.infer<typeof ReportSpecResultSchema>;
621
621
  declare const RunReportDataSchema: z.ZodObject<{
622
622
  schemaVersion: z.ZodLiteral<1>;
623
623
  kind: z.ZodDefault<z.ZodEnum<{
624
- record: "record";
625
624
  run: "run";
626
625
  drift: "drift";
626
+ record: "record";
627
627
  }>>;
628
628
  createdAt: z.ZodString;
629
629
  runId: z.ZodNullable<z.ZodString>;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccqa",
3
- "version": "1.27.0",
3
+ "version": "1.28.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.27.0",
3
+ "version": "1.28.0",
4
4
  "type": "module",
5
5
  "description": "Browser test recorder powered by Claude Code and agent-browser",
6
6
  "repository": {
@@ -73,6 +73,7 @@
73
73
  "test": "vitest run",
74
74
  "test:unit": "vitest run src/",
75
75
  "test:e2e": "vitest run tests/e2e",
76
+ "release:check": "node --experimental-strip-types src/release/check.ts",
76
77
  "prepublishOnly": "pnpm typecheck && pnpm test && pnpm build"
77
78
  },
78
79
  "engines": {