@wirecat/cli-base 0.113.0 → 0.114.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
@@ -8,6 +8,32 @@ Versions before 0.8.0 are in the [git tags](https://github.com/WireCatLabs/cli-b
8
8
  Every entry says what changed as a caller sees it, why, and what to watch for — the rules are
9
9
  [`docs/dev/CONVENTIONS.md`](docs/dev/CONVENTIONS.md#the-changelog).
10
10
 
11
+ ## 0.114.0 — 17.11.2026
12
+
13
+ ### Added
14
+
15
+ - **hubspot-cli takes the monthly minute 03:11 UTC** in the [CI](docs/standards/ci.md) list, and joins the
16
+ `shared-roots` and `crm` parity groups next to b24 and amo. Like notion and pbx, it is not one of the CLIs
17
+ `audit --family` installs. Its `schedule` summary is a declared difference until cli-core stops cutting summaries
18
+ after the CLI's name, which ends hubspot's a word earlier than b24's.
19
+
20
+ ### Fixed
21
+
22
+ - **An audit by a CLI's own parity groups keeps cli-base's declared entity schema and error reason differences.**
23
+ `cli-dev audit --groups`, and `--family` reading `config/parity-groups.json`, replaced cli-base's groups along with
24
+ differences such as `entity hit`, so every CLI made from cli-template blocked on a divergence cli-base had already
25
+ accepted. These differences name no CLI list, so they now hold in any audit, outside every group's budget. Past
26
+ their `review_after` they only warn there: only cli-base can renew them, and its own weekly audit fails on them. A
27
+ group that declares the same rule and target keeps its own entry.
28
+ - **`cli-dev audit --family` no longer blocks a CLI on an entity schema a published CLI shares with it.** The published
29
+ CLIs then already disagree among themselves, as when some are on an older cli-core, and the release cannot fix it.
30
+ A schema no other CLI prints still blocks, and so does any shared one outside `--family`, where two local builds
31
+ could vouch for each other. The rule cannot tell ahead from behind, and the first CLI to take a new schema still
32
+ needs a declared difference. A CRM CLI made from cli-template on cli-core 0.695.0 was blocked on `entity hit`:
33
+ cli-core 0.688.0 added the `crm_file` kind, and zm 0.80.0 prints it while tg 0.133.0, max 0.118.0, wa 0.45.0,
34
+ cli-memo 0.143.0 and drive 0.71.0 do not yet. cli-base already declared that difference, and the entry above now
35
+ keeps it in a CLI's own audit.
36
+
11
37
  ## 0.113.0 — 17.11.2026
12
38
 
13
39
  ### Added
@@ -28,6 +28,8 @@ export interface Finding {
28
28
  message: string;
29
29
  /** What each CLI showed, for a finding about one flag or output; `absent` when it lacks the flag. */
30
30
  values?: Record<string, string>;
31
+ /** The CLIs that show the same thing, one list per variant, for a rule that compares whole values. */
32
+ variants?: string[][];
31
33
  }
32
34
  export interface ScoreRow {
33
35
  cli: string;
@@ -51,6 +53,16 @@ export interface AuditOptions {
51
53
  blocks: "new" | "never";
52
54
  /** Only new findings that name this CLI block: the one being released. */
53
55
  only?: string;
56
+ /**
57
+ * `--family`: `only` is the one local build, every other CLI its latest published version. A schema `only` shares with
58
+ * one of them is then not `only`'s to fix.
59
+ */
60
+ family?: boolean;
61
+ /**
62
+ * cli-base's entity and reason differences, for groups that are not cli-base's own: they name no CLI list, so they
63
+ * hold in any group, and count against none.
64
+ */
65
+ shared?: ParityGroup["differences"];
54
66
  }
55
67
  export interface AuditResult {
56
68
  findings: Finding[];
@@ -68,3 +80,10 @@ export declare const clisOf: (target: string) => string[];
68
80
  export declare const auditClis: (inputs: readonly AuditInput[], options: AuditOptions, rules?: readonly AuditRule[]) => AuditResult;
69
81
  /** One line per CLI and rule that found something, then one total per CLI. */
70
82
  export declare const scorecardTable: (rows: readonly ScoreRow[]) => string;
83
+ /**
84
+ * The shared differences a groups file does not declare itself. Past their review_after they only warn there
85
+ * (`sharedReviews`): only cli-base can renew them, and its own weekly audit fails on them.
86
+ */
87
+ export declare const sharedDifferences: (declared: ParityGroup["differences"]) => ParityGroup["differences"];
88
+ /** The review warnings of the shared differences, due or overdue: never a failure outside cli-base's own audit. */
89
+ export declare const sharedReviews: (shared: ParityGroup["differences"], today: string) => string[];
package/dist/dev/audit.js CHANGED
@@ -1,6 +1,6 @@
1
- import { AUDIT_RULES } from "../standards/audit.js";
1
+ import { AUDIT_RULES, SHARED_DIFFERENCES, } from "../standards/audit.js";
2
2
  import { BASE_REASONS } from "../standards/errors.js";
3
- import { LINT_RULES, OVERRIDE_BUDGET } from "../standards/lint.js";
3
+ import { LINT_RULES, OVERRIDE_BUDGET, overdue, overridesDueSoon } from "../standards/lint.js";
4
4
  import { capabilityDifference } from "./capabilities.js";
5
5
  import { judge, kindOf, lintCommands, longName, registeredKinds, summaryOf, walk } from "./lint.js";
6
6
  import { sharedContractProblems } from "./shared-contracts.js";
@@ -174,6 +174,7 @@ const sameEntitySchema = (inputs) => {
174
174
  clis,
175
175
  target: `${named(clis)} entity ${entity}`,
176
176
  message: `${groups.length} different schemas: ${groups.map((one) => one.join(", ")).join(" / ")}`,
177
+ variants: groups,
177
178
  },
178
179
  ];
179
180
  });
@@ -278,7 +279,8 @@ export const auditClis = (inputs, options, rules = AUDIT_RULES) => {
278
279
  .map((finding) => `${finding.rule} ${finding.target}`));
279
280
  // An `absent` or `only` difference names no CLI list: it stands for every finding where only that CLI lacks the
280
281
  // flag, or only that CLI has it.
281
- const differences = options.groups.flatMap((group) => group.differences.flatMap((entry) => {
282
+ const sharedGroup = { name: "cli-base", differences: options.shared ?? [] };
283
+ const differences = [...options.groups, sharedGroup].flatMap((group) => group.differences.flatMap((entry) => {
282
284
  // Which CLIs share an entity or a reason changes with each release, so the entry names only what differs, and
283
285
  // its review_after, not a stale check, retires it.
284
286
  if (UNLISTED_RULES.has(entry.rule))
@@ -399,11 +401,18 @@ export const auditClis = (inputs, options, rules = AUDIT_RULES) => {
399
401
  return {
400
402
  findings,
401
403
  rows,
402
- blocking: [...unique.values()].filter((finding) => options.only === undefined || finding.clis.includes(options.only)),
404
+ blocking: [...unique.values()].filter((finding) => options.only === undefined ||
405
+ (finding.clis.includes(options.only) && !(options.family && sharedWithAnother(finding, options.only)))),
403
406
  nextBaseline,
404
407
  problems,
405
408
  };
406
409
  };
410
+ /**
411
+ * The CLI being released shows what a published CLI shows: the published ones already disagree among themselves, as
412
+ * when some are on an older cli-core, so the divergence is not this CLI's to fix and does not block its release. It
413
+ * cannot tell ahead from behind: a CLI that keeps an older schema a lagging CLI still prints passes too.
414
+ */
415
+ const sharedWithAnother = (finding, cli) => (finding.variants?.find((variant) => variant.includes(cli))?.length ?? 0) > 1;
407
416
  const pad = (cells, widths) => cells
408
417
  .map((cell, index) => (index < 2 ? cell.padEnd(widths[index] ?? 0) : cell.padStart(widths[index] ?? 0)))
409
418
  .join(" ");
@@ -423,3 +432,13 @@ export const scorecardTable = (rows) => {
423
432
  const widths = header.map((_, index) => Math.max(...lines.map((line) => line[index]?.length ?? 0)));
424
433
  return lines.map((line) => pad(line, widths).trimEnd()).join("\n");
425
434
  };
435
+ /**
436
+ * The shared differences a groups file does not declare itself. Past their review_after they only warn there
437
+ * (`sharedReviews`): only cli-base can renew them, and its own weekly audit fails on them.
438
+ */
439
+ export const sharedDifferences = (declared) => SHARED_DIFFERENCES.filter((entry) => !declared.some((own) => own.rule === entry.rule && own.target === entry.target));
440
+ /** The review warnings of the shared differences, due or overdue: never a failure outside cli-base's own audit. */
441
+ export const sharedReviews = (shared, today) => [
442
+ ...overridesDueSoon(shared, today, "cli-base's audit"),
443
+ ...overdue(shared, today),
444
+ ];
package/dist/dev/main.js CHANGED
@@ -21,7 +21,7 @@ import { issuesOf, RegistryError } from "../standards/registry.js";
21
21
  import { VOCABULARY } from "../standards/vocabulary.js";
22
22
  import { buildManifest, MANIFEST_FILE, ManifestError, manifestText } from "../wcat/manifest.js";
23
23
  import { adopt } from "./adopt.js";
24
- import { auditClis, scorecardTable, snakeKeys } from "./audit.js";
24
+ import { auditClis, scorecardTable, sharedDifferences, sharedReviews, snakeKeys } from "./audit.js";
25
25
  import { readCapabilities } from "./capabilities.js";
26
26
  import { CONFORMANCE_USAGE, conformanceCommand } from "./conformance.js";
27
27
  import { familyPackages, installFamily } from "./family.js";
@@ -91,14 +91,15 @@ const USAGE = `usage: cli-dev <command> [options]
91
91
  Prints the scorecard; fails on a new finding (one naming
92
92
  --for's CLI, when given). --lint judges that CLI's lint
93
93
  rules by its own lint/ folder; the rest by --baseline
94
- (audit/baseline). --groups replaces PARITY_GROUPS with the
95
- JSON list of parity groups in that file; --differences adds
96
- to the groups in use. --family takes this CLI's one --cli and
97
- installs the latest published CLIs of the parity groups beside
98
- it (npm, without install scripts), runs each in an empty home,
99
- reads every CLI's commands info (so same-error-reason and
100
- same-entity-schema are measured), and defaults --for to this
101
- CLI, --lint to its lint/ and --groups to config/parity-groups.json
94
+ (audit/baseline). --groups replaces PARITY_GROUPS (not its
95
+ entity and reason differences) with the groups in that file;
96
+ --differences adds to the groups in use. --family takes this
97
+ CLI's one --cli and installs the latest published CLIs of the
98
+ parity groups beside it (npm, without install scripts), runs
99
+ each in an empty home, reads every CLI's commands info (so
100
+ same-error-reason and same-entity-schema are measured), and
101
+ defaults --for to this CLI, --lint to its lint/ and --groups to
102
+ config/parity-groups.json
102
103
  bundle --bin <dist/bin/name.js> [--external <package>]... [--anchor <package>]... [--harmless <path>]...
103
104
  bundles the compiled bin with esbuild (a devDependency) into
104
105
  dist/bundle/ and turns the bin into its loader. --external keeps
@@ -826,18 +827,22 @@ const auditRun = (args, io, family = false) => {
826
827
  })));
827
828
  }
828
829
  const differences = groups.flatMap((group) => group.differences);
830
+ const shared = values.groups ? sharedDifferences(differences) : [];
829
831
  for (const line of overdue(differences, today(io)))
830
832
  problems.push(`parity difference: ${line}`);
831
- for (const line of overridesDueSoon(differences, today(io), "the audit"))
833
+ const due = [...overridesDueSoon(differences, today(io), "the audit"), ...sharedReviews(shared, today(io))];
834
+ for (const line of due)
832
835
  io.err(`warning parity difference: ${line}`);
833
836
  const result = auditClis(inputs, {
834
837
  ...(values.capabilities ? { capabilities: readCapabilities(readJson(at(values.capabilities))) } : {}),
835
838
  groups,
839
+ shared,
836
840
  roots: REQUIRED_ROOTS,
837
841
  vocabulary: VOCABULARY,
838
842
  baseline,
839
843
  blocks: AUDIT_BLOCKS,
840
844
  only: values.for,
845
+ family,
841
846
  });
842
847
  problems.push(...result.problems);
843
848
  if (values["write-baseline"]) {
@@ -42,6 +42,20 @@ declare const parityGroupSchema: v.StrictObjectSchema<{
42
42
  export type ParityGroup = v.InferOutput<typeof parityGroupSchema>;
43
43
  export declare const defineParityGroups: (input: unknown) => ParityGroup[];
44
44
  export declare const PARITY_GROUPS: ParityGroup[];
45
+ /**
46
+ * The declared entity and reason differences: they name no CLI list, so they hold in any group, and an audit by a CLI's
47
+ * own groups file keeps them.
48
+ */
49
+ export declare const SHARED_DIFFERENCES: {
50
+ rule: string;
51
+ target: string;
52
+ expected?: string | undefined;
53
+ absent?: string | undefined;
54
+ only?: string | undefined;
55
+ differs?: string | undefined;
56
+ reason: string;
57
+ review_after?: string | undefined;
58
+ }[];
45
59
  declare const requiredRootSchema: v.StrictObjectSchema<{
46
60
  readonly path: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a command word">]>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
47
61
  readonly meaning: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "must not be empty">]>;
@@ -158,28 +158,46 @@ export const PARITY_GROUPS = defineParityGroups([
158
158
  },
159
159
  // bitrix24-cli's search is cli-core's CRM `search all`, and beeline-cli's and asterisk-cli's meetings take call
160
160
  // recordings, not zoom-cli's: they are compared on the root commands every CLI shares, the way gcal and mail are.
161
- // amo-cli shares them too, and its CRM commands are compared with b24 in `crm` below.
161
+ // amo-cli and hubspot-cli share them too, and their CRM commands are compared with b24 in `crm` below.
162
162
  // notion-cli joins here until its documents commands ship; then it moves next to drive.
163
163
  {
164
164
  name: "shared-roots",
165
- members: ["tg", "max", "memo", "drive", "zm", "wa", "b24", "beeline", "pbx", "notion", "amo"],
165
+ members: ["tg", "max", "memo", "drive", "zm", "wa", "b24", "beeline", "pbx", "notion", "amo", "hubspot"],
166
166
  covers: ["commands", "doctor", "skill", "mcp", "upgrade"],
167
167
  differences: [...MEMO_HAS_NO_PROFILES, ...MEMO_MCP_SUMMARIES, MEMO_DOCTOR_DEEP],
168
168
  },
169
- // The CRM CLIs on cli-core's shared CRM commands. amo-cli (amoCRM and Kommo) is not on npm yet, so `audit --family`
170
- // skips it, as beeline. Only b24 has `leads` (amoCRM has no lead apart from a deal), `products` (amo leaves them for
171
- // later) and `deals delete` (amoCRM's API v4 cannot delete a lead,
172
- // https://www.amocrm.ru/developers/content/crm_platform/leads-api); a list of roots does not compare presence, so
173
- // these need no difference. `people`, `organizations`, `users`, `api` and `session` join once b24's released tree
174
- // is on cli-core's shared people and organizations commands: measured against b24 0.23.0 on 2026-11-16 they differ
175
- // in options, outputs and summaries.
169
+ // The CRM CLIs on cli-core's shared CRM commands. amo-cli (amoCRM and Kommo) is not on npm yet and hubspot-cli is
170
+ // not in the family packages, so `audit --family` skips them, as beeline. Only b24 and hubspot have `leads` (amoCRM
171
+ // has no lead apart from a deal), only b24 has `products` (amo leaves them for later) and `deals delete` (amoCRM's
172
+ // API v4 cannot delete a lead, https://www.amocrm.ru/developers/content/crm_platform/leads-api), and hubspot writes
173
+ // no deals yet; a list of roots does not compare presence, so these need no difference. `people`, `organizations`,
174
+ // `users`, `api` and `session` join once b24's released tree is on cli-core's shared people and organizations
175
+ // commands: measured against b24 0.23.0 on 2026-11-16 they differ in options, outputs and summaries.
176
176
  {
177
177
  name: "crm",
178
- members: ["b24", "amo"],
178
+ members: ["b24", "amo", "hubspot"],
179
179
  covers: ["deals", "sync", "search", "store", "schedule", "account"],
180
- differences: [],
180
+ differences: [
181
+ {
182
+ rule: "same-path-contract",
183
+ target: "schedule: summary",
184
+ differs: "hubspot",
185
+ reason: "cli-core cuts the summary to a fixed width after it puts in the CLI's name " +
186
+ "(src/cli/help/commands-text.ts), so hubspot's longer name ends it a word earlier than b24's and amo's",
187
+ review_after: "2026-12-01",
188
+ },
189
+ ],
181
190
  },
182
191
  ]);
192
+ /**
193
+ * The declared entity and reason differences: they name no CLI list, so they hold in any group, and an audit by a CLI's
194
+ * own groups file keeps them.
195
+ */
196
+ export const SHARED_DIFFERENCES = [
197
+ ...new Map(PARITY_GROUPS.flatMap((group) => group.differences)
198
+ .filter((entry) => entry.rule === "same-entity-schema" || entry.rule === "same-error-reason")
199
+ .map((entry) => [`${entry.rule} ${entry.target}`, entry])).values(),
200
+ ];
183
201
  const requiredRootSchema = v.strictObject({ path: v.pipe(v.array(segment), v.minLength(1)), meaning: text });
184
202
  export const defineRequiredRoots = (input) => parseRegistry("required roots", v.array(requiredRootSchema), input, (roots) => duplicates(roots.map((root) => root.path.join(" "))).map((path) => `"${path}" is listed twice`));
185
203
  export const REQUIRED_ROOTS = defineRequiredRoots([
@@ -186,6 +186,7 @@ its prompt in cli-template says so from cli-template 0.8.0. A CLI on an older te
186
186
  | 03:02 | cli-template |
187
187
  | 03:06 | tg-cli |
188
188
  | 03:09 | beeline-cli |
189
+ | 03:11 | hubspot-cli |
189
190
  | 03:13 | zoom-cli |
190
191
  | 03:20 | cli-docs |
191
192
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-base",
3
- "version": "0.113.0",
3
+ "version": "0.114.0",
4
4
  "description": "The parts every command line tool needs: output modes, terminal rendering, error model, exit codes, credentials, clocks",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Viacheslav Ptsarev",