@codacy/verity-cli 0.32.2 → 0.32.3

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/bin/verity.js +217 -135
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -64,6 +64,57 @@ installs are untouched.
64
64
  which is the ordinary case for someone whose first Verity install *is* the
65
65
  plugin.
66
66
 
67
+ ## [0.32.3] — 2026-09-10
68
+
69
+ **Three things the first five minutes got wrong.** All reported from the field
70
+ within hours of the plugin going out.
71
+
72
+ ### 🔌 Installing no longer asks for a backend URL
73
+
74
+ The plugin declared an optional `service_url` setting, and Claude Code shows a
75
+ **Configure Verity** screen for any plugin that declares one — so the first
76
+ thing a new user was asked for was a URL they do not have and must not need.
77
+ The setting is gone. If you really are on a self-hosted or pre-release stack,
78
+ say so afterwards, out of everyone else's way: `verity config service-url <url>`,
79
+ or `VERITY_SERVICE_URL` in your environment.
80
+
81
+ ### 🔌 One set of skills, not two
82
+
83
+ A project set up with `verity init` before the plugin arrived kept its own
84
+ `.claude/skills/verity-*/`, so Claude Code offered all eight skills **twice** —
85
+ `/verity-setup` beside `/verity:setup` — with nothing to say which was live, and
86
+ the project-local copy still rewrote wiring the plugin owns.
87
+
88
+ `verity init --plugin-mode` now removes the superseded copies along with the
89
+ duplicate hooks, and names what it removed.
90
+
91
+ ### 🔌 The skills work on a plugin-only machine
92
+
93
+ If the plugin was the only thing you installed, **every Verity skill failed** —
94
+ including `/verity:setup`, the command we tell you to run first. The skills say
95
+ `verity …`, the plugin keeps the CLI inside its own `node_modules`, and nothing
96
+ puts that on `PATH`, so each instruction ended in `command not found`. The gate
97
+ itself was fine: the hooks address the CLI directly, which is why this survived
98
+ testing — and why the acceptance container, which installs the CLI globally,
99
+ could never have caught it.
100
+
101
+ Verity now tells the agent how to run the CLI in that situation, at the start of
102
+ the session, with the absolute path. Nothing changes if you also have a global
103
+ install: then `verity` works and nothing is said.
104
+
105
+ ### 🔌 Verity says when it is *not* doing something
106
+
107
+ Under the plugin, a project that was **already** set up got no word at all: no
108
+ prompt, no explanation, just a doubled command list. It now says so plainly —
109
+ that `/verity:setup` is not being run because the project is already
110
+ configured, that you can run it yourself to change the Standard, the tools or
111
+ the moments, and that the duplicate skills can be cleared with
112
+ `verity init --plugin-mode --yes`.
113
+
114
+ The notice appears only while the duplicates are actually on disk, so it stops
115
+ on its own once they are gone.
116
+
117
+
67
118
  ## [0.32.2] — 2026-09-10
68
119
 
69
120
  **A patch for one bug, which stopped people before Verity was installed at all.**
package/bin/verity.js CHANGED
@@ -12917,6 +12917,25 @@ function marketplaceLocations() {
12917
12917
  }
12918
12918
  return out;
12919
12919
  }
12920
+ function verityOnPath() {
12921
+ const path = process.env.PATH;
12922
+ if (!path) return false;
12923
+ for (const dir of path.split(import_node_path7.delimiter)) {
12924
+ if (!dir) continue;
12925
+ try {
12926
+ (0, import_node_fs6.accessSync)((0, import_node_path7.join)(dir, "verity"), import_node_fs6.constants.X_OK);
12927
+ return true;
12928
+ } catch {
12929
+ }
12930
+ }
12931
+ return false;
12932
+ }
12933
+ function pluginCliInvocation() {
12934
+ const root = process.env.VERITY_PLUGIN_ROOT;
12935
+ if (!root) return null;
12936
+ if (verityOnPath()) return null;
12937
+ return `node ${JSON.stringify((0, import_node_path7.join)(root, "scripts", "verity.mjs"))}`;
12938
+ }
12920
12939
  var VERITY_MARKETPLACE = "verity";
12921
12940
  var VERITY_MARKETPLACE_REPO = "codacy/verity";
12922
12941
  function marketplaceConflict() {
@@ -20918,7 +20937,7 @@ function channelSilence(input) {
20918
20937
  // src/lib/cli-version.ts
20919
20938
  function cliVersion() {
20920
20939
  try {
20921
- return true ? "0.32.2" : "dev";
20940
+ return true ? "0.32.3" : "dev";
20922
20941
  } catch {
20923
20942
  return "dev";
20924
20943
  }
@@ -24137,6 +24156,45 @@ async function runAnalyze(opts, globals) {
24137
24156
  }
24138
24157
  }
24139
24158
 
24159
+ // src/lib/project-skills.ts
24160
+ var import_node_fs44 = require("node:fs");
24161
+ var import_node_path32 = require("node:path");
24162
+ var PROJECT_SKILL_NAMES = [
24163
+ "verity-setup",
24164
+ "verity-analyze",
24165
+ "verity-status",
24166
+ "verity-feedback",
24167
+ "verity-learn",
24168
+ "verity-memory",
24169
+ "verity-insights",
24170
+ "verity-reflect"
24171
+ ];
24172
+ var LEGACY_SKILL_NAMES = [
24173
+ "gate-setup",
24174
+ "gate-analyze",
24175
+ "gate-status",
24176
+ "gate-feedback",
24177
+ "gate-learn",
24178
+ "gate-memory",
24179
+ "gate-insights",
24180
+ "gate-reflect"
24181
+ ];
24182
+ var ALL = [...PROJECT_SKILL_NAMES, ...LEGACY_SKILL_NAMES];
24183
+ function staleProjectSkills() {
24184
+ const root = projectPath(".claude/skills");
24185
+ if (!(0, import_node_fs44.existsSync)(root)) return [];
24186
+ return ALL.filter((name) => (0, import_node_fs44.existsSync)((0, import_node_path32.join)(root, name)));
24187
+ }
24188
+ function removeProjectSkills() {
24189
+ const root = projectPath(".claude/skills");
24190
+ const removed = [];
24191
+ for (const name of staleProjectSkills()) {
24192
+ (0, import_node_fs44.rmSync)((0, import_node_path32.join)(root, name), { recursive: true, force: true });
24193
+ removed.push(name);
24194
+ }
24195
+ return removed;
24196
+ }
24197
+
24140
24198
  // src/commands/baseline.ts
24141
24199
  function registerBaselineCommands(program2) {
24142
24200
  const baseline = program2.command("baseline").description("Manage the task-start working-tree baseline");
@@ -24146,18 +24204,47 @@ function registerBaselineCommands(program2) {
24146
24204
  process.chdir(repoRoot());
24147
24205
  } catch {
24148
24206
  }
24207
+ const cli = pluginCliInvocation();
24208
+ const cliLine = cli ? `Verity CLI: this machine has no \`verity\` on PATH \u2014 the plugin carries its own copy. When a Verity skill tells you to run \`verity <args>\`, run \`${cli} <args>\` instead. Everything else about the command is identical.` : null;
24149
24209
  if (!verityConfigured()) {
24150
24210
  const how = isPluginInvocation() ? "Offer to run /verity:setup for the user." : "Offer to run `verity init` (or /verity-setup) for the user.";
24211
+ const lines = [
24212
+ `Verity is installed but this project is not set up yet, so the quality gate will not review anything here. ${how}`
24213
+ ];
24214
+ if (cliLine) lines.push(cliLine);
24151
24215
  process.stdout.write(
24152
24216
  JSON.stringify({
24153
24217
  hookSpecificOutput: {
24154
24218
  hookEventName: "SessionStart",
24155
- additionalContext: `Verity is installed but this project is not set up yet, so the quality gate will not review anything here. ${how}`
24219
+ additionalContext: lines.join("\n")
24156
24220
  }
24157
24221
  }) + "\n"
24158
24222
  );
24159
24223
  process.exit(0);
24160
24224
  }
24225
+ if (isPluginInvocation()) {
24226
+ const notices = [];
24227
+ if (cliLine) notices.push(cliLine);
24228
+ const stale = staleProjectSkills();
24229
+ if (stale.length > 0) {
24230
+ notices.push(
24231
+ "Verity is already set up in this project, so /verity:setup is NOT being run \u2014 tell the user that, and that they can run it themselves if they want to change the Standard, the analysis tools or the review moments."
24232
+ );
24233
+ notices.push(
24234
+ `This project also still carries ${stale.length} of its own Verity skills (${stale.slice(0, 3).join(", ")}${stale.length > 3 ? ", \u2026" : ""}), left from an npm install. The plugin supersedes them, which is why the slash-command list shows each one twice. Offer to run \`verity init --plugin-mode --yes\` to remove the duplicates; the plugin keeps providing the /verity:* set.`
24235
+ );
24236
+ }
24237
+ if (notices.length > 0) {
24238
+ process.stdout.write(
24239
+ JSON.stringify({
24240
+ hookSpecificOutput: {
24241
+ hookEventName: "SessionStart",
24242
+ additionalContext: notices.join("\n")
24243
+ }
24244
+ }) + "\n"
24245
+ );
24246
+ }
24247
+ }
24161
24248
  let sessionId = opts.sessionId;
24162
24249
  let source = opts.source;
24163
24250
  if (!process.stdin.isTTY) {
@@ -24198,7 +24285,7 @@ async function readStdin() {
24198
24285
  }
24199
24286
 
24200
24287
  // src/commands/review.ts
24201
- var import_node_fs44 = require("node:fs");
24288
+ var import_node_fs45 = require("node:fs");
24202
24289
  function registerReviewCommand(program2) {
24203
24290
  program2.command("review").description("Run on-demand Verity analysis (advisory, never blocks)").requiredOption("--files <paths>", "Comma-separated file list").option("--changed <paths>", "Subset of --files that were modified").option("--intent <text>", "User intent description (max 2000 chars)").option("--specs <paths>", "Comma-separated spec file paths").option("--json", "Output raw JSON response").action(async (opts) => {
24204
24291
  const globals = program2.opts();
@@ -24217,7 +24304,7 @@ async function runReview(opts, globals) {
24217
24304
  const securityFiles = filterSecurity(allFiles);
24218
24305
  let staticResults;
24219
24306
  if (isCodacyAvailable()) {
24220
- const scannable = Array.from(/* @__PURE__ */ new Set([...analyzable, ...securityFiles])).filter((f) => (0, import_node_fs44.existsSync)(f) || resolveFile(f) !== null);
24307
+ const scannable = Array.from(/* @__PURE__ */ new Set([...analyzable, ...securityFiles])).filter((f) => (0, import_node_fs45.existsSync)(f) || resolveFile(f) !== null);
24221
24308
  staticResults = runCodacyAnalysis(scannable);
24222
24309
  } else {
24223
24310
  staticResults = {
@@ -24243,7 +24330,7 @@ async function runReview(opts, globals) {
24243
24330
  const specPaths = opts.specs.split(",").map((f) => f.trim()).filter(Boolean);
24244
24331
  specs = [];
24245
24332
  for (const p of specPaths) {
24246
- if (!(0, import_node_fs44.existsSync)(p)) continue;
24333
+ if (!(0, import_node_fs45.existsSync)(p)) continue;
24247
24334
  try {
24248
24335
  const { readFileSync: readFileSync27 } = await import("node:fs");
24249
24336
  const content = readFileSync27(p, "utf-8");
@@ -24303,10 +24390,10 @@ async function runReview(opts, globals) {
24303
24390
  }
24304
24391
 
24305
24392
  // src/commands/guard.ts
24306
- var import_node_fs45 = require("node:fs");
24307
- var import_node_path32 = require("node:path");
24393
+ var import_node_fs46 = require("node:fs");
24394
+ var import_node_path33 = require("node:path");
24308
24395
  var GUARD_BLOCK_CAP = 2;
24309
- var GUARD_ITER_FILE = (0, import_node_path32.join)(VERITY_DIR, ".guard-iteration");
24396
+ var GUARD_ITER_FILE = (0, import_node_path33.join)(VERITY_DIR, ".guard-iteration");
24310
24397
  function readPreToolUseStdin() {
24311
24398
  const empty = { command: "", cwd: null, sessionId: null };
24312
24399
  return new Promise((resolve5) => {
@@ -24351,7 +24438,7 @@ function readPreToolUseStdin() {
24351
24438
  }
24352
24439
  function readIterMap() {
24353
24440
  try {
24354
- const raw = JSON.parse((0, import_node_fs45.readFileSync)(GUARD_ITER_FILE, "utf-8"));
24441
+ const raw = JSON.parse((0, import_node_fs46.readFileSync)(GUARD_ITER_FILE, "utf-8"));
24355
24442
  if (raw && typeof raw === "object") {
24356
24443
  if (typeof raw.moment === "string" && typeof raw.count === "number") {
24357
24444
  return { [raw.moment]: raw.count };
@@ -24371,10 +24458,10 @@ function readIter(moment) {
24371
24458
  }
24372
24459
  function writeIter(moment, count) {
24373
24460
  try {
24374
- (0, import_node_fs45.mkdirSync)(VERITY_DIR, { recursive: true });
24461
+ (0, import_node_fs46.mkdirSync)(VERITY_DIR, { recursive: true });
24375
24462
  const map = readIterMap();
24376
24463
  map[moment] = count;
24377
- (0, import_node_fs45.writeFileSync)(GUARD_ITER_FILE, JSON.stringify(map));
24464
+ (0, import_node_fs46.writeFileSync)(GUARD_ITER_FILE, JSON.stringify(map));
24378
24465
  } catch {
24379
24466
  }
24380
24467
  }
@@ -24384,10 +24471,10 @@ function resetIter(moment) {
24384
24471
  if (!(moment in map)) return;
24385
24472
  delete map[moment];
24386
24473
  if (Object.keys(map).length === 0) {
24387
- if ((0, import_node_fs45.existsSync)(GUARD_ITER_FILE)) (0, import_node_fs45.unlinkSync)(GUARD_ITER_FILE);
24474
+ if ((0, import_node_fs46.existsSync)(GUARD_ITER_FILE)) (0, import_node_fs46.unlinkSync)(GUARD_ITER_FILE);
24388
24475
  } else {
24389
- (0, import_node_fs45.mkdirSync)(VERITY_DIR, { recursive: true });
24390
- (0, import_node_fs45.writeFileSync)(GUARD_ITER_FILE, JSON.stringify(map));
24476
+ (0, import_node_fs46.mkdirSync)(VERITY_DIR, { recursive: true });
24477
+ (0, import_node_fs46.writeFileSync)(GUARD_ITER_FILE, JSON.stringify(map));
24391
24478
  }
24392
24479
  } catch {
24393
24480
  }
@@ -24459,7 +24546,7 @@ function buildGuardRequest(moment, files, codeDelta, iter, sessionId, statedInte
24459
24546
  const securityFiles = filterSecurity(files);
24460
24547
  let staticResults;
24461
24548
  if (isCodacyAvailable()) {
24462
- const scannable = Array.from(/* @__PURE__ */ new Set([...analyzable, ...securityFiles])).map((f) => (0, import_node_fs45.existsSync)(f) ? f : resolveFile(f)).filter((f) => f !== null);
24549
+ const scannable = Array.from(/* @__PURE__ */ new Set([...analyzable, ...securityFiles])).map((f) => (0, import_node_fs46.existsSync)(f) ? f : resolveFile(f)).filter((f) => f !== null);
24463
24550
  staticResults = runCodacyAnalysis(scannable);
24464
24551
  } else {
24465
24552
  staticResults = { tool: "@codacy/analysis-cli", findings: [], summary: { total_findings: 0, by_severity: {}, tools_run: [] } };
@@ -24605,7 +24692,7 @@ async function runGuard(opts, globals) {
24605
24692
  upgradeToExcerpts(repoContext2, {
24606
24693
  readFile: (rel) => {
24607
24694
  try {
24608
- return (0, import_node_fs45.readFileSync)((0, import_node_path32.join)(frame.worktreeRoot ?? process.cwd(), rel), "utf8");
24695
+ return (0, import_node_fs46.readFileSync)((0, import_node_path33.join)(frame.worktreeRoot ?? process.cwd(), rel), "utf8");
24609
24696
  } catch {
24610
24697
  return null;
24611
24698
  }
@@ -24847,7 +24934,7 @@ function registerIgnoreCommand(program2) {
24847
24934
 
24848
24935
  // src/commands/waive.ts
24849
24936
  var import_node_crypto12 = require("node:crypto");
24850
- var import_node_fs46 = require("node:fs");
24937
+ var import_node_fs47 = require("node:fs");
24851
24938
  function registerWaiveCommand(program2) {
24852
24939
  program2.command("waive <pattern-id>").description("Record an accepted-risk disposition for an open finding (voids when the file changes)").option("--file <path>", "File the finding is anchored to, REPO-RELATIVE (recommended \u2014 narrows the waive)").requiredOption("--reason <text>", "The human disposition this records (reviewer finding, ADR, \u2026)").action(async (patternId, opts) => {
24853
24940
  const globals = program2.opts();
@@ -24876,7 +24963,7 @@ function registerWaiveCommand(program2) {
24876
24963
  if (opts.file) {
24877
24964
  body.file = opts.file;
24878
24965
  try {
24879
- body.file_sha256 = (0, import_node_crypto12.createHash)("sha256").update((0, import_node_fs46.readFileSync)(opts.file)).digest("hex");
24966
+ body.file_sha256 = (0, import_node_crypto12.createHash)("sha256").update((0, import_node_fs47.readFileSync)(opts.file)).digest("hex");
24880
24967
  } catch {
24881
24968
  printError(`Cannot read ${opts.file} \u2014 run from the repo root, or omit --file to waive by pattern.`);
24882
24969
  process.exit(1);
@@ -24901,10 +24988,10 @@ function registerWaiveCommand(program2) {
24901
24988
  }
24902
24989
 
24903
24990
  // src/commands/init.ts
24904
- var import_node_fs51 = require("node:fs");
24991
+ var import_node_fs52 = require("node:fs");
24905
24992
  var import_promises17 = require("node:fs/promises");
24906
24993
  var import_yaml6 = __toESM(require_dist());
24907
- var import_node_path35 = require("node:path");
24994
+ var import_node_path36 = require("node:path");
24908
24995
  var import_node_child_process16 = require("node:child_process");
24909
24996
 
24910
24997
  // src/lib/banner.ts
@@ -24983,7 +25070,7 @@ function printPhase(n, of, title, subtitle) {
24983
25070
  }
24984
25071
 
24985
25072
  // src/commands/doctor.ts
24986
- var import_node_fs48 = require("node:fs");
25073
+ var import_node_fs49 = require("node:fs");
24987
25074
 
24988
25075
  // src/lib/prereqs.ts
24989
25076
  var import_node_child_process13 = require("node:child_process");
@@ -25103,7 +25190,7 @@ var import_promises15 = require("node:fs/promises");
25103
25190
 
25104
25191
  // src/lib/gitignore.ts
25105
25192
  var import_node_child_process14 = require("node:child_process");
25106
- var import_node_fs47 = require("node:fs");
25193
+ var import_node_fs48 = require("node:fs");
25107
25194
  var VERITY_GITIGNORE_MARKER = "# Verity \u2014 machine-local state.";
25108
25195
  var SETTINGS_LOCAL_IGNORE_ENTRY = ".claude/settings.local.json";
25109
25196
  var VERITY_GITIGNORE_BLOCK = [
@@ -25136,7 +25223,7 @@ function semanticsHold() {
25136
25223
  function ensureVerityGitignore() {
25137
25224
  let content = "";
25138
25225
  try {
25139
- content = (0, import_node_fs47.readFileSync)(".gitignore", "utf-8");
25226
+ content = (0, import_node_fs48.readFileSync)(".gitignore", "utf-8");
25140
25227
  } catch {
25141
25228
  }
25142
25229
  const hasMarker = content.includes(VERITY_GITIGNORE_MARKER);
@@ -25157,7 +25244,7 @@ function ensureVerityGitignore() {
25157
25244
  const sep3 = next === "" ? "" : next.endsWith("\n") ? "\n" : "\n\n";
25158
25245
  next = next + sep3 + VERITY_GITIGNORE_BLOCK;
25159
25246
  }
25160
- (0, import_node_fs47.writeFileSync)(".gitignore", next);
25247
+ (0, import_node_fs48.writeFileSync)(".gitignore", next);
25161
25248
  return verified(needsRepair ? "repaired" : "added");
25162
25249
  } catch {
25163
25250
  return "failed";
@@ -25285,11 +25372,11 @@ async function buildReport() {
25285
25372
  const wiring = await resolveHookWiring();
25286
25373
  const hooks = wiring.status;
25287
25374
  const telemetry = await checkTelemetry();
25288
- const hasConfig = (0, import_node_fs48.existsSync)(projectPath(CODACY_CONFIG_FILE));
25375
+ const hasConfig = (0, import_node_fs49.existsSync)(projectPath(CODACY_CONFIG_FILE));
25289
25376
  const artifacts = {
25290
- standard: (0, import_node_fs48.existsSync)(projectPath(STANDARD_FILE)),
25377
+ standard: (0, import_node_fs49.existsSync)(projectPath(STANDARD_FILE)),
25291
25378
  analysisConfig: hasConfig,
25292
- verityMd: (0, import_node_fs48.existsSync)(projectPath(VERITY_MD_FILE)),
25379
+ verityMd: (0, import_node_fs49.existsSync)(projectPath(VERITY_MD_FILE)),
25293
25380
  analysisConfigIds: hasConfig ? validatePatternIds().status : "absent"
25294
25381
  };
25295
25382
  const next = [];
@@ -25406,8 +25493,8 @@ function registerDoctorCommand(program2) {
25406
25493
  }
25407
25494
 
25408
25495
  // src/commands/migrate.ts
25409
- var import_node_fs49 = require("node:fs");
25410
- var import_node_path33 = require("node:path");
25496
+ var import_node_fs50 = require("node:fs");
25497
+ var import_node_path34 = require("node:path");
25411
25498
  var import_node_child_process15 = require("node:child_process");
25412
25499
  var LEGACY_NPM_PACKAGE = "@codacy/gate-cli";
25413
25500
  function defaultNpmRemover(pkg) {
@@ -25444,12 +25531,12 @@ async function runMigration(opts = {}) {
25444
25531
  return { actions, migrated: actions.length > 0 };
25445
25532
  }
25446
25533
  function migrateProjectDir(root, actions) {
25447
- const gateDir = (0, import_node_path33.join)(root, ".gate");
25448
- const verityDir = (0, import_node_path33.join)(root, ".verity");
25449
- if ((0, import_node_fs49.existsSync)(gateDir) && !(0, import_node_fs49.existsSync)(verityDir)) {
25534
+ const gateDir = (0, import_node_path34.join)(root, ".gate");
25535
+ const verityDir = (0, import_node_path34.join)(root, ".verity");
25536
+ if ((0, import_node_fs50.existsSync)(gateDir) && !(0, import_node_fs50.existsSync)(verityDir)) {
25450
25537
  return migrateProjectDirRename(root, gateDir, verityDir, actions);
25451
25538
  }
25452
- if ((0, import_node_fs49.existsSync)(gateDir) && (0, import_node_fs49.existsSync)(verityDir)) {
25539
+ if ((0, import_node_fs50.existsSync)(gateDir) && (0, import_node_fs50.existsSync)(verityDir)) {
25453
25540
  return migrateProjectDirCarry(gateDir, verityDir, actions);
25454
25541
  }
25455
25542
  return false;
@@ -25470,13 +25557,13 @@ function migrateProjectDirRename(root, gateDir, verityDir, actions) {
25470
25557
  }
25471
25558
  }
25472
25559
  if (moved) {
25473
- if ((0, import_node_fs49.existsSync)(gateDir)) {
25560
+ if ((0, import_node_fs50.existsSync)(gateDir)) {
25474
25561
  const carried = carryLegacyContents(gateDir, verityDir);
25475
25562
  if (carried > 0) {
25476
25563
  actions.push(`Carried ${carried} untracked legacy file(s) from .gate/ into .verity/`);
25477
25564
  }
25478
25565
  try {
25479
- (0, import_node_fs49.rmSync)(gateDir, { recursive: true, force: true });
25566
+ (0, import_node_fs50.rmSync)(gateDir, { recursive: true, force: true });
25480
25567
  } catch {
25481
25568
  }
25482
25569
  }
@@ -25492,18 +25579,18 @@ function migrateProjectDirCarry(gateDir, verityDir, actions) {
25492
25579
  actions.push(`Carried ${carried} legacy file(s) from .gate/ into .verity/`);
25493
25580
  }
25494
25581
  try {
25495
- (0, import_node_fs49.rmSync)(gateDir, { recursive: true, force: true });
25582
+ (0, import_node_fs50.rmSync)(gateDir, { recursive: true, force: true });
25496
25583
  } catch {
25497
25584
  }
25498
25585
  return carried > 0;
25499
25586
  }
25500
25587
  function migrateGlobalCredentials(home, actions) {
25501
25588
  if (!home) return;
25502
- const gateCreds = (0, import_node_path33.join)(home, ".gate", "credentials");
25503
- const verityCreds = (0, import_node_path33.join)(home, ".verity", "credentials");
25504
- if (!(0, import_node_fs49.existsSync)(gateCreds)) return;
25505
- if (!(0, import_node_fs49.existsSync)(verityCreds)) {
25506
- (0, import_node_fs49.mkdirSync)((0, import_node_path33.join)(home, ".verity"), { recursive: true });
25589
+ const gateCreds = (0, import_node_path34.join)(home, ".gate", "credentials");
25590
+ const verityCreds = (0, import_node_path34.join)(home, ".verity", "credentials");
25591
+ if (!(0, import_node_fs50.existsSync)(gateCreds)) return;
25592
+ if (!(0, import_node_fs50.existsSync)(verityCreds)) {
25593
+ (0, import_node_fs50.mkdirSync)((0, import_node_path34.join)(home, ".verity"), { recursive: true });
25507
25594
  moveFile(gateCreds, verityCreds);
25508
25595
  actions.push("Moved ~/.gate/credentials \u2192 ~/.verity/credentials");
25509
25596
  return;
@@ -25525,8 +25612,8 @@ async function migrateLegacyHooks(root, actions) {
25525
25612
  }
25526
25613
  }
25527
25614
  async function migrateClaudeMd(root, actions) {
25528
- const claudeMd = (0, import_node_path33.join)(root, "CLAUDE.md");
25529
- const hadLegacyBlock = (0, import_node_fs49.existsSync)(claudeMd) && hasLegacyMemoryBlock(readFileSyncSafe(claudeMd));
25615
+ const claudeMd = (0, import_node_path34.join)(root, "CLAUDE.md");
25616
+ const hadLegacyBlock = (0, import_node_fs50.existsSync)(claudeMd) && hasLegacyMemoryBlock(readFileSyncSafe(claudeMd));
25530
25617
  if (!hadLegacyBlock) return;
25531
25618
  try {
25532
25619
  await ensureClaudeMdPointer(root);
@@ -25536,9 +25623,9 @@ async function migrateClaudeMd(root, actions) {
25536
25623
  }
25537
25624
  }
25538
25625
  function migrateStandardFile(root, actions) {
25539
- const gateMd = (0, import_node_path33.join)(root, "GATE.md");
25540
- const verityMd = (0, import_node_path33.join)(root, "VERITY.md");
25541
- if (!(0, import_node_fs49.existsSync)(gateMd) || (0, import_node_fs49.existsSync)(verityMd)) return;
25626
+ const gateMd = (0, import_node_path34.join)(root, "GATE.md");
25627
+ const verityMd = (0, import_node_path34.join)(root, "VERITY.md");
25628
+ if (!(0, import_node_fs50.existsSync)(gateMd) || (0, import_node_fs50.existsSync)(verityMd)) return;
25542
25629
  let moved = false;
25543
25630
  if (isGitRepo(root) && isGitTracked(root, "GATE.md")) {
25544
25631
  try {
@@ -25550,12 +25637,12 @@ function migrateStandardFile(root, actions) {
25550
25637
  if (!moved) moveFile(gateMd, verityMd);
25551
25638
  const content = readFileSyncSafe(verityMd);
25552
25639
  const refreshed = content.split("GATE.md").join("VERITY.md");
25553
- if (refreshed !== content) (0, import_node_fs49.writeFileSync)(verityMd, refreshed);
25640
+ if (refreshed !== content) (0, import_node_fs50.writeFileSync)(verityMd, refreshed);
25554
25641
  actions.push("Renamed GATE.md \u2192 VERITY.md");
25555
25642
  }
25556
25643
  async function migrateTelemetryHeaders(root, actions) {
25557
- const file = (0, import_node_path33.join)(root, ".claude", "settings.local.json");
25558
- if (!(0, import_node_fs49.existsSync)(file)) return;
25644
+ const file = (0, import_node_path34.join)(root, ".claude", "settings.local.json");
25645
+ if (!(0, import_node_fs50.existsSync)(file)) return;
25559
25646
  let settings;
25560
25647
  try {
25561
25648
  settings = JSON.parse(readFileSyncSafe(file) || "{}");
@@ -25603,14 +25690,14 @@ function mergeGlobalCredentials(gateCreds, verityCreds) {
25603
25690
  }
25604
25691
  if (toAppend.length > 0) {
25605
25692
  const sep3 = verityContent.endsWith("\n") || verityContent === "" ? "" : "\n";
25606
- (0, import_node_fs49.writeFileSync)(verityCreds, verityContent + sep3 + toAppend.join("\n") + "\n");
25693
+ (0, import_node_fs50.writeFileSync)(verityCreds, verityContent + sep3 + toAppend.join("\n") + "\n");
25607
25694
  }
25608
- (0, import_node_fs49.rmSync)(gateCreds, { force: true });
25695
+ (0, import_node_fs50.rmSync)(gateCreds, { force: true });
25609
25696
  return toAppend.length;
25610
25697
  }
25611
25698
  function readFileSyncSafe(path) {
25612
25699
  try {
25613
- return (0, import_node_fs49.readFileSync)(path, "utf-8");
25700
+ return (0, import_node_fs50.readFileSync)(path, "utf-8");
25614
25701
  } catch {
25615
25702
  return "";
25616
25703
  }
@@ -25625,35 +25712,35 @@ function hasStagedChanges(root) {
25625
25712
  }
25626
25713
  function moveDir(from, to) {
25627
25714
  try {
25628
- (0, import_node_fs49.renameSync)(from, to);
25715
+ (0, import_node_fs50.renameSync)(from, to);
25629
25716
  } catch (err) {
25630
25717
  if (err.code !== "EXDEV") throw err;
25631
- (0, import_node_fs49.cpSync)(from, to, { recursive: true });
25632
- (0, import_node_fs49.rmSync)(from, { recursive: true, force: true });
25718
+ (0, import_node_fs50.cpSync)(from, to, { recursive: true });
25719
+ (0, import_node_fs50.rmSync)(from, { recursive: true, force: true });
25633
25720
  }
25634
25721
  }
25635
25722
  function moveFile(from, to) {
25636
25723
  try {
25637
- (0, import_node_fs49.renameSync)(from, to);
25724
+ (0, import_node_fs50.renameSync)(from, to);
25638
25725
  } catch (err) {
25639
25726
  if (err.code !== "EXDEV") throw err;
25640
- (0, import_node_fs49.cpSync)(from, to);
25641
- (0, import_node_fs49.rmSync)(from, { force: true });
25727
+ (0, import_node_fs50.cpSync)(from, to);
25728
+ (0, import_node_fs50.rmSync)(from, { force: true });
25642
25729
  }
25643
25730
  }
25644
25731
  function carryLegacyContents(gateDir, verityDir) {
25645
25732
  let copied = 0;
25646
25733
  const walk2 = (relDir) => {
25647
- const srcDir = (0, import_node_path33.join)(gateDir, relDir);
25648
- for (const entry of (0, import_node_fs49.readdirSync)(srcDir)) {
25649
- const rel = relDir ? (0, import_node_path33.join)(relDir, entry) : entry;
25650
- const src = (0, import_node_path33.join)(gateDir, rel);
25651
- const dest = (0, import_node_path33.join)(verityDir, rel);
25652
- if ((0, import_node_fs49.statSync)(src).isDirectory()) {
25734
+ const srcDir = (0, import_node_path34.join)(gateDir, relDir);
25735
+ for (const entry of (0, import_node_fs50.readdirSync)(srcDir)) {
25736
+ const rel = relDir ? (0, import_node_path34.join)(relDir, entry) : entry;
25737
+ const src = (0, import_node_path34.join)(gateDir, rel);
25738
+ const dest = (0, import_node_path34.join)(verityDir, rel);
25739
+ if ((0, import_node_fs50.statSync)(src).isDirectory()) {
25653
25740
  walk2(rel);
25654
- } else if (!(0, import_node_fs49.existsSync)(dest)) {
25655
- (0, import_node_fs49.mkdirSync)((0, import_node_path33.dirname)(dest), { recursive: true });
25656
- (0, import_node_fs49.cpSync)(src, dest);
25741
+ } else if (!(0, import_node_fs50.existsSync)(dest)) {
25742
+ (0, import_node_fs50.mkdirSync)((0, import_node_path34.dirname)(dest), { recursive: true });
25743
+ (0, import_node_fs50.cpSync)(src, dest);
25657
25744
  copied++;
25658
25745
  }
25659
25746
  }
@@ -25662,22 +25749,22 @@ function carryLegacyContents(gateDir, verityDir) {
25662
25749
  return copied;
25663
25750
  }
25664
25751
  async function needsMigration(root = repoRoot()) {
25665
- const gateDir = (0, import_node_path33.join)(root, ".gate");
25666
- const verityDir = (0, import_node_path33.join)(root, ".verity");
25667
- if ((0, import_node_fs49.existsSync)(gateDir) && !(0, import_node_fs49.existsSync)(verityDir)) return true;
25668
- if ((0, import_node_fs49.existsSync)(gateDir) && (0, import_node_fs49.existsSync)(verityDir)) {
25669
- if ((0, import_node_fs49.existsSync)((0, import_node_path33.join)(gateDir, "credentials")) && !(0, import_node_fs49.existsSync)((0, import_node_path33.join)(verityDir, "credentials"))) {
25752
+ const gateDir = (0, import_node_path34.join)(root, ".gate");
25753
+ const verityDir = (0, import_node_path34.join)(root, ".verity");
25754
+ if ((0, import_node_fs50.existsSync)(gateDir) && !(0, import_node_fs50.existsSync)(verityDir)) return true;
25755
+ if ((0, import_node_fs50.existsSync)(gateDir) && (0, import_node_fs50.existsSync)(verityDir)) {
25756
+ if ((0, import_node_fs50.existsSync)((0, import_node_path34.join)(gateDir, "credentials")) && !(0, import_node_fs50.existsSync)((0, import_node_path34.join)(verityDir, "credentials"))) {
25670
25757
  return true;
25671
25758
  }
25672
- if ((0, import_node_fs49.existsSync)((0, import_node_path33.join)(gateDir, "memory")) && !(0, import_node_fs49.existsSync)((0, import_node_path33.join)(verityDir, "memory"))) {
25759
+ if ((0, import_node_fs50.existsSync)((0, import_node_path34.join)(gateDir, "memory")) && !(0, import_node_fs50.existsSync)((0, import_node_path34.join)(verityDir, "memory"))) {
25673
25760
  return true;
25674
25761
  }
25675
25762
  }
25676
- const claudeMd = (0, import_node_path33.join)(root, "CLAUDE.md");
25677
- if ((0, import_node_fs49.existsSync)(claudeMd) && hasLegacyMemoryBlock(readFileSyncSafe(claudeMd))) {
25763
+ const claudeMd = (0, import_node_path34.join)(root, "CLAUDE.md");
25764
+ if ((0, import_node_fs50.existsSync)(claudeMd) && hasLegacyMemoryBlock(readFileSyncSafe(claudeMd))) {
25678
25765
  return true;
25679
25766
  }
25680
- if ((0, import_node_fs49.existsSync)((0, import_node_path33.join)(root, "GATE.md")) && !(0, import_node_fs49.existsSync)((0, import_node_path33.join)(root, "VERITY.md"))) {
25767
+ if ((0, import_node_fs50.existsSync)((0, import_node_path34.join)(root, "GATE.md")) && !(0, import_node_fs50.existsSync)((0, import_node_path34.join)(root, "VERITY.md"))) {
25681
25768
  return true;
25682
25769
  }
25683
25770
  if (await hasLegacyHooksAt(root)) return true;
@@ -25958,9 +26045,9 @@ async function promptMultiSelect(question, choices, fallback) {
25958
26045
  }
25959
26046
 
25960
26047
  // src/lib/remote-config.ts
25961
- var import_node_fs50 = require("node:fs");
26048
+ var import_node_fs51 = require("node:fs");
25962
26049
  var import_promises16 = require("node:fs/promises");
25963
- var import_node_path34 = require("node:path");
26050
+ var import_node_path35 = require("node:path");
25964
26051
  var import_yaml5 = __toESM(require_dist());
25965
26052
  var IGNORE_RIDER = "verityignore";
25966
26053
  async function fetchRemoteSetup(opts) {
@@ -26005,7 +26092,7 @@ async function adoptRemoteSetup(found, opts) {
26005
26092
  written.push(STANDARD_FILE);
26006
26093
  if (rider !== null) {
26007
26094
  const localIgnore = projectPath(VERITYIGNORE_FILE);
26008
- if (!(0, import_node_fs50.existsSync)(localIgnore)) {
26095
+ if (!(0, import_node_fs51.existsSync)(localIgnore)) {
26009
26096
  await writeOut(VERITYIGNORE_FILE, rider);
26010
26097
  written.push(VERITYIGNORE_FILE);
26011
26098
  } else {
@@ -26038,7 +26125,7 @@ async function adoptRemoteSetup(found, opts) {
26038
26125
  }
26039
26126
  async function writeOut(relative2, body) {
26040
26127
  const target = projectPath(relative2);
26041
- await (0, import_promises16.mkdir)((0, import_node_path34.dirname)(target), { recursive: true });
26128
+ await (0, import_promises16.mkdir)((0, import_node_path35.dirname)(target), { recursive: true });
26042
26129
  await (0, import_promises16.writeFile)(target, body);
26043
26130
  }
26044
26131
  function describeRemote(found) {
@@ -26155,15 +26242,15 @@ async function runOptionalAuth(resolution, opts = {}) {
26155
26242
  }
26156
26243
  function resolveDataDir2() {
26157
26244
  const candidates2 = [
26158
- (0, import_node_path35.join)(__dirname, "..", "data"),
26245
+ (0, import_node_path36.join)(__dirname, "..", "data"),
26159
26246
  // installed: node_modules/@codacy/verity-cli/data
26160
- (0, import_node_path35.join)(__dirname, "..", "..", "data"),
26247
+ (0, import_node_path36.join)(__dirname, "..", "..", "data"),
26161
26248
  // edge case: nested resolution
26162
- (0, import_node_path35.join)(process.cwd(), "cli", "data")
26249
+ (0, import_node_path36.join)(process.cwd(), "cli", "data")
26163
26250
  // local dev: running from repo root
26164
26251
  ];
26165
26252
  for (const candidate of candidates2) {
26166
- if ((0, import_node_fs51.existsSync)((0, import_node_path35.join)(candidate, "skills"))) {
26253
+ if ((0, import_node_fs52.existsSync)((0, import_node_path36.join)(candidate, "skills"))) {
26167
26254
  return candidate;
26168
26255
  }
26169
26256
  }
@@ -26179,9 +26266,9 @@ async function skillIsCurrent(src, dest) {
26179
26266
  const list2 = (dir) => {
26180
26267
  const out = [];
26181
26268
  const walk2 = (d, prefix) => {
26182
- for (const e of (0, import_node_fs51.readdirSync)(d, { withFileTypes: true })) {
26269
+ for (const e of (0, import_node_fs52.readdirSync)(d, { withFileTypes: true })) {
26183
26270
  const rel = prefix ? `${prefix}/${e.name}` : e.name;
26184
- if (e.isDirectory()) walk2((0, import_node_path35.join)(d, e.name), rel);
26271
+ if (e.isDirectory()) walk2((0, import_node_path36.join)(d, e.name), rel);
26185
26272
  else if (e.isFile()) out.push(rel);
26186
26273
  }
26187
26274
  };
@@ -26192,8 +26279,8 @@ async function skillIsCurrent(src, dest) {
26192
26279
  const shipped = list2(src);
26193
26280
  if (JSON.stringify(shipped) !== JSON.stringify(list2(dest))) return false;
26194
26281
  for (const rel of shipped) {
26195
- const a = await (0, import_promises17.readFile)((0, import_node_path35.join)(src, rel), "utf-8");
26196
- const b = await (0, import_promises17.readFile)((0, import_node_path35.join)(dest, rel), "utf-8");
26282
+ const a = await (0, import_promises17.readFile)((0, import_node_path36.join)(src, rel), "utf-8");
26283
+ const b = await (0, import_promises17.readFile)((0, import_node_path36.join)(dest, rel), "utf-8");
26197
26284
  if (a !== b) return false;
26198
26285
  }
26199
26286
  return true;
@@ -26371,7 +26458,7 @@ async function synthesizeLocally(opts) {
26371
26458
  async function healStaleAnalysisConfig(globals) {
26372
26459
  const configPath = projectPath(CODACY_CONFIG_FILE);
26373
26460
  const standardPath = projectPath(STANDARD_FILE);
26374
- if (!(0, import_node_fs51.existsSync)(configPath) || !(0, import_node_fs51.existsSync)(standardPath)) return;
26461
+ if (!(0, import_node_fs52.existsSync)(configPath) || !(0, import_node_fs52.existsSync)(standardPath)) return;
26375
26462
  const validation = validatePatternIds();
26376
26463
  if (validation.status !== "invalid") return;
26377
26464
  printWarn(" Your analysis config names pattern ids that no longer resolve \u2014 those tools were");
@@ -26468,17 +26555,17 @@ async function handoffToSetup(enabled, claudeInstalled) {
26468
26555
  async function installSkills(force, step) {
26469
26556
  step("Installing skills");
26470
26557
  const dataDir = resolveDataDir2();
26471
- const skillsSource = (0, import_node_path35.join)(dataDir, "skills");
26558
+ const skillsSource = (0, import_node_path36.join)(dataDir, "skills");
26472
26559
  const skillsDest = ".claude/skills";
26473
26560
  let skillsInstalled = 0;
26474
26561
  for (const skill of SKILLS) {
26475
- const src = (0, import_node_path35.join)(skillsSource, skill);
26476
- const dest = (0, import_node_path35.join)(skillsDest, skill);
26477
- if (!(0, import_node_fs51.existsSync)(src)) {
26562
+ const src = (0, import_node_path36.join)(skillsSource, skill);
26563
+ const dest = (0, import_node_path36.join)(skillsDest, skill);
26564
+ if (!(0, import_node_fs52.existsSync)(src)) {
26478
26565
  printWarn(` Skill data not found: ${skill}`);
26479
26566
  continue;
26480
26567
  }
26481
- if ((0, import_node_fs51.existsSync)(dest) && !force && await skillIsCurrent(src, dest)) {
26568
+ if ((0, import_node_fs52.existsSync)(dest) && !force && await skillIsCurrent(src, dest)) {
26482
26569
  skillsInstalled++;
26483
26570
  continue;
26484
26571
  }
@@ -26498,6 +26585,11 @@ async function adoptPluginWiring(gitMoments, moments) {
26498
26585
  } else {
26499
26586
  printInfo(" Wired by the Verity plugin \u2014 nothing to reconcile here \u2713");
26500
26587
  }
26588
+ const removedSkills = removeProjectSkills();
26589
+ if (removedSkills.length > 0) {
26590
+ printInfo(` Removed ${removedSkills.length} project-local skill${removedSkills.length === 1 ? "" : "s"} the plugin supersedes \u2713`);
26591
+ printInfo(" They appeared beside the plugin's as a second /verity-* set.");
26592
+ }
26501
26593
  printInfo(` Pre-commit gate: ${gitMoments.includes("commit") ? "on" : "off"}`);
26502
26594
  printInfo(` Pre-push/PR gate: ${gitMoments.includes("push") ? "on" : "off"}`);
26503
26595
  printInfo(" Stop + intent + baseline + compact + session-end: always on \u2713");
@@ -26587,7 +26679,7 @@ function registerInitCommand(program2) {
26587
26679
  const staleMarker = clearStalePluginMarker();
26588
26680
  const pluginMode = opts.plugin === false ? false : opts.pluginMode ?? pluginActiveHere();
26589
26681
  const projectMarkers = [".git", "package.json", "pyproject.toml", "go.mod", "Cargo.toml", "Gemfile", "pom.xml", "build.gradle"];
26590
- const isProject = projectMarkers.some((m) => (0, import_node_fs51.existsSync)(m));
26682
+ const isProject = projectMarkers.some((m) => (0, import_node_fs52.existsSync)(m));
26591
26683
  if (!isProject) {
26592
26684
  printError("No project detected in the current directory.");
26593
26685
  printInfo('Run "verity init" from your project root.');
@@ -26653,7 +26745,7 @@ function registerInitCommand(program2) {
26653
26745
  printInfo(` intensity: ${intensity} \xB7 moments: ${moments.join(", ") || "none"} (no questions asked)`);
26654
26746
  }
26655
26747
  await scaffoldProject(step, defaultsOnly);
26656
- const globalVerityDir = (0, import_node_path35.join)(process.env.HOME ?? "", ".verity");
26748
+ const globalVerityDir = (0, import_node_path36.join)(process.env.HOME ?? "", ".verity");
26657
26749
  await (0, import_promises17.mkdir)(globalVerityDir, { recursive: true });
26658
26750
  console.log("");
26659
26751
  step("Wiring Claude Code hooks");
@@ -26717,7 +26809,7 @@ function registerInitCommand(program2) {
26717
26809
  }
26718
26810
  step("Your project's Standard");
26719
26811
  let haveStandard = false;
26720
- if ((0, import_node_fs51.existsSync)(projectPath(STANDARD_FILE))) {
26812
+ if ((0, import_node_fs52.existsSync)(projectPath(STANDARD_FILE))) {
26721
26813
  printInfo(" This project already has .verity/standard.yaml \u2014 keeping it.");
26722
26814
  haveStandard = true;
26723
26815
  } else {
@@ -26744,7 +26836,7 @@ function registerInitCommand(program2) {
26744
26836
  ...telemetryChoice ? { telemetry: telemetryChoice } : {},
26745
26837
  init: {
26746
26838
  completed_at: (/* @__PURE__ */ new Date()).toISOString(),
26747
- cli_version: true ? "0.32.2" : "dev"
26839
+ cli_version: true ? "0.32.3" : "dev"
26748
26840
  }
26749
26841
  });
26750
26842
  } catch (err) {
@@ -26783,18 +26875,8 @@ function registerInitCommand(program2) {
26783
26875
  }
26784
26876
 
26785
26877
  // src/commands/uninstall.ts
26786
- var import_node_fs52 = require("node:fs");
26787
- var import_node_path36 = require("node:path");
26788
- var SKILL_NAMES = [
26789
- "verity-setup",
26790
- "verity-analyze",
26791
- "verity-status",
26792
- "verity-feedback",
26793
- "verity-learn",
26794
- "verity-memory",
26795
- "verity-insights",
26796
- "verity-reflect"
26797
- ];
26878
+ var import_node_fs53 = require("node:fs");
26879
+ var import_node_path37 = require("node:path");
26798
26880
  function registerUninstallCommand(program2) {
26799
26881
  program2.command("uninstall").description("Remove Verity from this project (skills, hooks, .verity/, VERITY.md)").option("--dry-run", "Show what would be removed without doing it").option("--purge-global", "Also remove ~/.verity/ (deletes saved tokens \u2014 reconnect requires re-registration)").option("--keep-verity-md", "Keep the project root VERITY.md file").action(async (opts) => {
26800
26882
  const dryRun = opts.dryRun ?? false;
@@ -26802,12 +26884,12 @@ function registerUninstallCommand(program2) {
26802
26884
  const keepVerityMd = opts.keepVerityMd ?? false;
26803
26885
  const actions = [];
26804
26886
  const skillsRoot = projectPath(".claude/skills");
26805
- for (const name of SKILL_NAMES) {
26806
- const dir = (0, import_node_path36.join)(skillsRoot, name);
26807
- if ((0, import_node_fs52.existsSync)(dir)) {
26887
+ for (const name of PROJECT_SKILL_NAMES) {
26888
+ const dir = (0, import_node_path37.join)(skillsRoot, name);
26889
+ if ((0, import_node_fs53.existsSync)(dir)) {
26808
26890
  actions.push({
26809
26891
  label: `Remove .claude/skills/${name}/`,
26810
- apply: () => (0, import_node_fs52.rmSync)(dir, { recursive: true, force: true })
26892
+ apply: () => (0, import_node_fs53.rmSync)(dir, { recursive: true, force: true })
26811
26893
  });
26812
26894
  }
26813
26895
  }
@@ -26821,24 +26903,24 @@ function registerUninstallCommand(program2) {
26821
26903
  });
26822
26904
  }
26823
26905
  const verityDir = projectPath(VERITY_DIR);
26824
- if ((0, import_node_fs52.existsSync)(verityDir)) {
26906
+ if ((0, import_node_fs53.existsSync)(verityDir)) {
26825
26907
  actions.push({
26826
26908
  label: `Remove ${VERITY_DIR}/`,
26827
- apply: () => (0, import_node_fs52.rmSync)(verityDir, { recursive: true, force: true })
26909
+ apply: () => (0, import_node_fs53.rmSync)(verityDir, { recursive: true, force: true })
26828
26910
  });
26829
26911
  }
26830
26912
  if (!keepVerityMd) {
26831
26913
  const verityMd = projectPath(VERITY_MD_FILE);
26832
- if ((0, import_node_fs52.existsSync)(verityMd)) {
26914
+ if ((0, import_node_fs53.existsSync)(verityMd)) {
26833
26915
  actions.push({
26834
26916
  label: `Remove ${VERITY_MD_FILE}`,
26835
- apply: () => (0, import_node_fs52.rmSync)(verityMd, { force: true })
26917
+ apply: () => (0, import_node_fs53.rmSync)(verityMd, { force: true })
26836
26918
  });
26837
26919
  }
26838
26920
  }
26839
26921
  const cleanupEmptyDir = (path) => {
26840
- if ((0, import_node_fs52.existsSync)(path) && (0, import_node_fs52.statSync)(path).isDirectory() && (0, import_node_fs52.readdirSync)(path).length === 0) {
26841
- (0, import_node_fs52.rmdirSync)(path);
26922
+ if ((0, import_node_fs53.existsSync)(path) && (0, import_node_fs53.statSync)(path).isDirectory() && (0, import_node_fs53.readdirSync)(path).length === 0) {
26923
+ (0, import_node_fs53.rmdirSync)(path);
26842
26924
  }
26843
26925
  };
26844
26926
  actions.push({
@@ -26849,11 +26931,11 @@ function registerUninstallCommand(program2) {
26849
26931
  }
26850
26932
  });
26851
26933
  const home = process.env.HOME ?? "";
26852
- const globalVerityDir = (0, import_node_path36.join)(home, ".verity");
26853
- if (purgeGlobal && (0, import_node_fs52.existsSync)(globalVerityDir)) {
26934
+ const globalVerityDir = (0, import_node_path37.join)(home, ".verity");
26935
+ if (purgeGlobal && (0, import_node_fs53.existsSync)(globalVerityDir)) {
26854
26936
  actions.push({
26855
26937
  label: `Remove ~/.verity/ (global credentials \u2014 reconnect requires re-registration)`,
26856
- apply: () => (0, import_node_fs52.rmSync)(globalVerityDir, { recursive: true, force: true })
26938
+ apply: () => (0, import_node_fs53.rmSync)(globalVerityDir, { recursive: true, force: true })
26857
26939
  });
26858
26940
  }
26859
26941
  if (actions.length === 0) {
@@ -27047,8 +27129,8 @@ function registerTaskCommands(program2) {
27047
27129
  }
27048
27130
 
27049
27131
  // src/commands/reset.ts
27050
- var import_node_fs53 = require("node:fs");
27051
- var import_node_path37 = require("node:path");
27132
+ var import_node_fs54 = require("node:fs");
27133
+ var import_node_path38 = require("node:path");
27052
27134
  function registerResetCommand(program2) {
27053
27135
  program2.command("reset").description("Close the current task and clear transient state").option("--keep-task", "Only purge caches; leave the current task open").option("--all", "Also purge diagnostic logs (.verity/.logs/)").action(async (opts) => {
27054
27136
  const globals = program2.opts();
@@ -27085,11 +27167,11 @@ function registerResetCommand(program2) {
27085
27167
  }
27086
27168
  const cacheDir = projectPath(CACHE_DIR);
27087
27169
  let purged = 0;
27088
- if ((0, import_node_fs53.existsSync)(cacheDir)) {
27089
- for (const entry of (0, import_node_fs53.readdirSync)(cacheDir)) {
27170
+ if ((0, import_node_fs54.existsSync)(cacheDir)) {
27171
+ for (const entry of (0, import_node_fs54.readdirSync)(cacheDir)) {
27090
27172
  if (entry.startsWith("pending-")) {
27091
27173
  try {
27092
- (0, import_node_fs53.unlinkSync)((0, import_node_path37.join)(cacheDir, entry));
27174
+ (0, import_node_fs54.unlinkSync)((0, import_node_path38.join)(cacheDir, entry));
27093
27175
  purged++;
27094
27176
  } catch {
27095
27177
  }
@@ -27104,19 +27186,19 @@ function registerResetCommand(program2) {
27104
27186
  projectPath(`${VERITY_DIR}/.last-analysis`)
27105
27187
  ];
27106
27188
  for (const file of filesToClear) {
27107
- if ((0, import_node_fs53.existsSync)(file)) {
27189
+ if ((0, import_node_fs54.existsSync)(file)) {
27108
27190
  try {
27109
- (0, import_node_fs53.writeFileSync)(file, "");
27191
+ (0, import_node_fs54.writeFileSync)(file, "");
27110
27192
  } catch {
27111
27193
  }
27112
27194
  }
27113
27195
  }
27114
27196
  if (opts.all) {
27115
27197
  const logsDir = projectPath(`${VERITY_DIR}/.logs`);
27116
- if ((0, import_node_fs53.existsSync)(logsDir)) {
27117
- for (const entry of (0, import_node_fs53.readdirSync)(logsDir)) {
27198
+ if ((0, import_node_fs54.existsSync)(logsDir)) {
27199
+ for (const entry of (0, import_node_fs54.readdirSync)(logsDir)) {
27118
27200
  try {
27119
- (0, import_node_fs53.unlinkSync)((0, import_node_path37.join)(logsDir, entry));
27201
+ (0, import_node_fs54.unlinkSync)((0, import_node_path38.join)(logsDir, entry));
27120
27202
  } catch {
27121
27203
  }
27122
27204
  }
@@ -27424,8 +27506,8 @@ function registerTelemetryCommands(program2) {
27424
27506
  }
27425
27507
 
27426
27508
  // src/cli.ts
27427
- program.name("verity").description("CLI for Verity quality gate service").version("0.32.2").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr").hook("preAction", async (_thisCommand, actionCommand) => {
27428
- installStderrLog(actionCommand.name(), process.argv.slice(2), "0.32.2");
27509
+ program.name("verity").description("CLI for Verity quality gate service").version("0.32.3").option("--token <token>", "Override authentication token").option("--service-url <url>", "Override service URL").option("--verbose", "Log HTTP requests/responses to stderr").hook("preAction", async (_thisCommand, actionCommand) => {
27510
+ installStderrLog(actionCommand.name(), process.argv.slice(2), "0.32.3");
27429
27511
  setUserNamedServiceUrl(program.opts().serviceUrl);
27430
27512
  try {
27431
27513
  await foldLegacyLocalCredential();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/verity-cli",
3
- "version": "0.32.2",
3
+ "version": "0.32.3",
4
4
  "description": "CLI for Verity quality gate service",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://verity.md",