@indigoai-us/hq-cli 5.267.0 → 5.268.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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [5.268.0] — 2026-09-28
6
+
7
+ ### Fixed
8
+
9
+ - `hq core ontology duplicates` now proposes the original entity file as the
10
+ survivor when it ties with its numbered copies (`hq-core 2.md`). Before, the
11
+ path tiebreak picked the copy, which it did for 129 of 530 Indigo groups.
12
+
5
13
  ## [5.267.0] — 2026-09-28
6
14
 
7
15
  - Company billing links opened by CLI plan-limit flows now carry cli_limit attribution into checkout telemetry.
@@ -77,7 +77,7 @@ export interface DuplicateGroup {
77
77
  /** `same_name`: equal canonical names, or one's canonical name is the other's unshared alias. `similar_name`: canonical names match once spaces are removed. */
78
78
  reason: "same_name" | "similar_name";
79
79
  paths: string[];
80
- /** Highest `signal_count`, then earliest `first_seen`, then path. */
80
+ /** Highest `signal_count`, then earliest `first_seen`, then a file that is not a numbered copy (`<slug> 2.md`), then path. */
81
81
  survivor: string;
82
82
  }
83
83
  export interface DuplicateReport {
@@ -285,6 +285,8 @@ export function mergeBackConflicts(hqRoot, company, now) {
285
285
  }
286
286
  return run;
287
287
  }
288
+ /** A copy saved next to the original file, e.g. `hq-core 2.md`. */
289
+ const NUMBERED_COPY = / \d+\.md$/;
288
290
  /** Groups of writable entities of one type whose names collide. Read-only. */
289
291
  export function findDuplicateGroups(index) {
290
292
  const parent = new Map();
@@ -349,6 +351,7 @@ export function findDuplicateGroups(index) {
349
351
  const fb = Date.parse(eb.first_seen ?? "");
350
352
  return (eb.signal_count - ea.signal_count ||
351
353
  (Number.isFinite(fa) ? fa : Infinity) - (Number.isFinite(fb) ? fb : Infinity) ||
354
+ Number(NUMBERED_COPY.test(a)) - Number(NUMBERED_COPY.test(b)) ||
352
355
  a.localeCompare(b));
353
356
  });
354
357
  out.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigoai-us/hq-cli",
3
- "version": "5.267.0",
3
+ "version": "5.268.0",
4
4
  "description": "HQ by Indigo management CLI — modules and cloud sync",
5
5
  "main": "dist/index.js",
6
6
  "bin": {