@wirecat/cli-base 0.89.0 → 0.90.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/CHANGELOG.md CHANGED
@@ -8,6 +8,28 @@ 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.90.1 — 08.11.2026
12
+
13
+ ### Fixed
14
+
15
+ - **`cli-dev audit` takes every kind of value the vocabulary gives a flag as the same meaning.** `same-flag-meaning`
16
+ reported `--every` once memo took both `<count-unit>` and `<duration>` while the other CLIs took `<duration>`, though
17
+ the vocabulary allows both; every CLI in memo's parity group then failed its audit. A kind the vocabulary does not
18
+ list for that flag is still reported.
19
+
20
+ ## 0.90.0 — 08.11.2026
21
+
22
+ ### Changed — may break callers
23
+
24
+ - **`list-without-query` no longer reports `session list`.** That command lists every profile on the computer, so it
25
+ takes no query by design. A CLI that carries a lint override for `session list` now fails with "stale override":
26
+ delete that override when it moves to this version.
27
+
28
+ ### Fixed
29
+
30
+ - **The handbook lets the identity in `src/identity.ts` keep its URLs inline.** The rule that a fixed value lives in
31
+ `constants.json` now says the CLI's own docs or homepage URL in its identity is not such a value.
32
+
11
33
  ## 0.89.0 — 08.11.2026
12
34
 
13
35
  ### Added
package/dist/dev/audit.js CHANGED
@@ -2,7 +2,7 @@ import { AUDIT_RULES } from "../standards/audit.js";
2
2
  import { BASE_REASONS } from "../standards/errors.js";
3
3
  import { LINT_RULES, OVERRIDE_BUDGET } from "../standards/lint.js";
4
4
  import { capabilityDifference } from "./capabilities.js";
5
- import { judge, kindOf, lintCommands, longName, summaryOf, walk } from "./lint.js";
5
+ import { judge, kindOf, lintCommands, longName, registeredKinds, summaryOf, walk } from "./lint.js";
6
6
  import { sharedContractProblems } from "./shared-contracts.js";
7
7
  const STRICT_CONTRACT_RULES = new Set([
8
8
  "shared-command-contract",
@@ -98,7 +98,8 @@ const samePathContract = (inputs, groups) => {
98
98
  }
99
99
  return found;
100
100
  };
101
- const sameFlagMeaning = (inputs) => {
101
+ const sameFlagMeaning = (inputs, vocabulary) => {
102
+ const registered = registeredKinds(vocabulary);
102
103
  const uses = new Map();
103
104
  for (const { document } of inputs) {
104
105
  const options = [
@@ -120,7 +121,12 @@ const sameFlagMeaning = (inputs) => {
120
121
  .sort(([a], [b]) => byText(a, b))
121
122
  .flatMap(([flag, byCli]) => {
122
123
  const signatures = new Map([...byCli].map(([cli, kinds]) => [cli, [...kinds].sort(byText).join(" | ")]));
123
- if (byCli.size < 2 || new Set(signatures.values()).size < 2)
124
+ const allowed = new Set((registered.get(flag) ?? []).map(shownKind));
125
+ const off = new Set([...byCli.values()].map((kinds) => [...kinds]
126
+ .filter((kind) => !allowed.has(kind))
127
+ .sort(byText)
128
+ .join(" | ")));
129
+ if (byCli.size < 2 || off.size < 2)
124
130
  return [];
125
131
  const clis = [...byCli.keys()].sort(byText);
126
132
  return [{ rule: "same-flag-meaning", clis, target: `${named(clis)} ${flag}`, message: describe(signatures) }];
@@ -195,7 +201,7 @@ const CROSS = {
195
201
  : []),
196
202
  "required-root": (inputs, options) => requiredRoots(inputs, options.roots),
197
203
  "same-path-contract": (inputs, options) => samePathContract(inputs, options.groups),
198
- "same-flag-meaning": (inputs) => sameFlagMeaning(inputs),
204
+ "same-flag-meaning": (inputs, options) => sameFlagMeaning(inputs, options.vocabulary),
199
205
  "same-entity-schema": (inputs) => sameEntitySchema(inputs),
200
206
  "same-error-reason": (inputs) => sameErrorReason(inputs),
201
207
  };
@@ -15,6 +15,8 @@ export declare const longName: (flags: string) => string;
15
15
  /** A flag's kind of value: its value name, or `switch`. Two kinds under one name are two meanings. */
16
16
  export declare const kindOf: (option: OptionInfo) => string;
17
17
  export { summaryOf };
18
+ /** The kinds of value the vocabulary lets each flag take: its own value, or `switch`, then its `otherValues`. */
19
+ export declare const registeredKinds: (vocabulary: Vocabulary) => Map<string, string[]>;
18
20
  export interface LintContext {
19
21
  /** The commands document as the CLI printed it; parsing drops keys it does not know, so casing is checked here. */
20
22
  raw?: unknown;
package/dist/dev/lint.js CHANGED
@@ -26,6 +26,11 @@ export const kindOf = (option) => {
26
26
  return option.flags.match(/[<[]([^>\]]+)[>\]]/)?.[1]?.toLowerCase() ?? "value";
27
27
  };
28
28
  export { summaryOf };
29
+ /** The kinds of value the vocabulary lets each flag take: its own value, or `switch`, then its `otherValues`. */
30
+ export const registeredKinds = (vocabulary) => new Map(vocabulary.flags.map((flag) => [
31
+ flag.name,
32
+ [flag.value?.slice(1, -1).toLowerCase() ?? "switch", ...(flag.otherValues ?? [])],
33
+ ]));
29
34
  const label = (command) => command.path.join(" ");
30
35
  /** The run log's reader and its switches; what `runsCommand` and cli-core's shared program add. */
31
36
  export const RUN_LOG_COMMANDS = ["runs list", "runs show"];
@@ -231,10 +236,7 @@ const CHECKS = {
231
236
  }));
232
237
  },
233
238
  "flag-two-meanings": (document, vocabulary) => {
234
- const registered = new Map(vocabulary.flags.map((flag) => [
235
- flag.name,
236
- [flag.value?.slice(1, -1).toLowerCase() ?? "switch", ...(flag.otherValues ?? [])],
237
- ]));
239
+ const registered = registeredKinds(vocabulary);
238
240
  const uses = new Map();
239
241
  const note = (option, where) => {
240
242
  const name = longName(option.flags);
@@ -350,7 +352,8 @@ const CHECKS = {
350
352
  .map(({ target, option }) => ({ target, message: `${longName(option.flags)} has no role in the vocabulary` }));
351
353
  },
352
354
  "list-without-query": (document) => handwrittenLeaves(document)
353
- .filter((command) => command.name === "list" && command.query === undefined)
355
+ // WC-CMD-20's one exception: WC-ACCT-12 has session list show every profile, so it takes no query.
356
+ .filter((command) => command.name === "list" && command.query === undefined && label(command) !== "session list")
354
357
  .map((command) => ({
355
358
  target: label(command),
356
359
  message: "list declares no query",
@@ -272,8 +272,9 @@ never a constant scattered through the source, and never a file CI writes from a
272
272
  - **Enforced by:** review only.
273
273
  - **Example:** cli-core's `constants.json` holds the WireCat Google desktop app's `google.app.client_id`; drive and
274
274
  gcal read it through cli-core instead of each keeping a copy. The owner's own choices stay in `config.json`.
275
- - **Exceptions:** none.
276
- - **Applies to:** cli-base, cli-core and every CLI. **Since:** cli-base 0.76.0. **Rulings:** none.
275
+ - **Exceptions:** the identity in `src/identity.ts`, such as the `docs` URL of the CLI's own page, stays inline
276
+ there: it is the CLI's name and address, not a setting another layer reads.
277
+ - **Applies to:** cli-base, cli-core and every CLI. **Since:** cli-base 0.76.0. **Rulings:** NEED-2448.
277
278
 
278
279
  ## Sources
279
280
 
@@ -259,8 +259,11 @@ store or files without reading the service first (`remote: "none"`, `local: "wri
259
259
  - **Example:** `tasks list state:open priority>1`. The list takes `[query...]` last. The fields come from the entity's
260
260
  Valibot schema through `queryFieldsOf`, and every field example and default term parses and validates. The list
261
261
  filters where its data lives, in the store or at the provider, never in memory.
262
- - **Exceptions:** none.
263
- - **Applies to:** all CLIs. **Since:** cli-base 0.41.0. **Rulings:** none.
262
+ - **Exceptions:** `<cli> session list` takes no query: it lists every profile on this computer
263
+ ([WC-ACCT-12](accounts.md#wc-acct-12--sign-in-is-session-start-status-and-end-and-session-list-names-the-profiles)),
264
+ and a filter would let a caller read one profile as the only one. `list-without-query` skips it, so a CLI needs no
265
+ override.
266
+ - **Applies to:** all CLIs. **Since:** cli-base 0.41.0. **Rulings:** NEED-2447.
264
267
 
265
268
  ### WC-CMD-21 · Set `mcp: false` on a command, group or option that MCP servers must not offer
266
269
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-base",
3
- "version": "0.89.0",
3
+ "version": "0.90.1",
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",