@wirecat/cli-base 1.0.0-rc.0 → 1.0.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,55 @@ 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
+ ## 1.0.0 — 25.11.2026
12
+
13
+ ### Fixed
14
+
15
+ - **The family audit lets the CLIs move to cli-core 1.0 one at a time.** cli-core 1.0.0 names an unreadable config
16
+ file `config.unreadable`; a CLI still on 0.x names it `account-rename.config`, and mail-cli before 1.0
17
+ `mail.config-unreadable`. Until every CLI has published on 1.0, the audit saw one failure under two or three names
18
+ and stopped each release. The three combinations are declared differences until 2026-12-09.
19
+
20
+ ## 1.0.0-rc.1 — 25.11.2026
21
+
22
+ ### Added
23
+
24
+ - **`sprints` is a noun of the vocabulary:** a tracker team's time-boxed runs of work, such as Linear's cycles and
25
+ Jira's sprints. cli-core's tracker copies them and mounts `sprints list`, which the command lint refused as an
26
+ unknown resource.
27
+ - **`/codegen/runtime` exports `Binding`, `HttpBinding`, `RpcBinding` and `Confidence`.** A CLI that reads an
28
+ operation's binding or how far it is trusted no longer imports the experimental `/codegen` for the type.
29
+
30
+ ### Changed — experimental
31
+
32
+ - **The generated manifest and definitions import their types from `@wirecat/cli-base/codegen/runtime`** when
33
+ `coreImport` is not given, not from `/codegen`. Every type they name is there, and `/codegen/runtime` is part of
34
+ the stable API, so a CLI no longer passes `coreImport` by hand. Regenerating changes that one import line.
35
+
36
+ ### Fixed
37
+
38
+ - **WC-ACCT-12 no longer lists zm as a known gap:** zm 0.81.0 has `session list`, so it has all four session
39
+ commands, as most CLIs that sign in now do. The tg, max and wa gap now names cli-core's `messengerSessionCommands`,
40
+ which gives them the two commands they lack, and the drive gap says that its next release adds `session status`.
41
+ - **`bin/release` collects the `changes/` fragments and never renames a published section.** When npm already had
42
+ the version in `package.json` and only fragments had merged, it renamed that version's heading (`## 0.131.0` to
43
+ `## 0.132.0`), moved the published entries under the new number and left the fragments out (#706). Now a published
44
+ section keeps its heading: the new version takes the Unreleased section, or a new section the fragments fill, and
45
+ the release stops when there is neither. The fragments are collected into the version's section, which may raise
46
+ it to the level they need (an Added is a minor), as the CLIs' `bin/release` does. See
47
+ [RELEASING.md](docs/dev/RELEASING.md).
48
+ - **The shared Start release workflow agrees with `bin/release` on the `changes/` fragments.** When npm already had
49
+ the version in `package.json` and every entry was in `changes/` fragments, `release-start.yml` failed with
50
+ `CHANGELOG.md has no "## Unreleased" to raise …`. Now the new version gets a new section the fragments fill, and
51
+ the run stops only when there are no fragments and the Unreleased section is missing or empty. A
52
+ published `x.0.0` is followed by its next patch, raised only when the entries need more, so `1.0.0` with a fix
53
+ gives `1.0.1` instead of stopping at a major. Every file is checked before any is written, and `after-raise` runs
54
+ once, with the version that ships. The workflow needs cli-dev from cli-base 0.98.0 or later (#714).
55
+ - **On Linux the test sandbox starts in the runtime folder (`$XDG_RUNTIME_DIR`), which is in memory.** Every commit of
56
+ a store waits for `fsync`, and on a disk other jobs keep busy a CRM sync in a test took 14 s instead of 1.5 s, past
57
+ the 15 s test timeout, so a CLI's local release check failed three times in a row. With no runtime folder to write
58
+ to, the sandbox starts in the temporary folder as before.
59
+
11
60
  ## 1.0.0-rc.0 — 23.11.2026
12
61
 
13
62
  ### Added
@@ -73,6 +122,8 @@ Every entry says what changed as a caller sees it, why, and what to watch for
73
122
 
74
123
  ### Fixed
75
124
 
125
+ - **WC-SECR-26 no longer lists ydisk's docs as a known gap:** they say where the owner revokes the Yandex token
126
+ (Yandex ID's Data access), and the rule's example now shows `session end`'s help saying it.
76
127
  - **`next-version` keeps a taken major a major**: with 2.0.0 on npm, `2.0.0` gives `3.0.0`, not `2.1.0`.
77
128
  - **A pre-release is published under npm's `next` tag**, from `bin/release` and from the release workflow. npm refuses
78
129
  a pre-release without a tag, and `latest` must stay a release.
@@ -44,7 +44,7 @@ export const manifestGenerator = (options) => (model) => {
44
44
  ].filter(([, , , value]) => value !== undefined);
45
45
  const types = ["ManifestOperation", ...extras.map(([, type]) => type)].sort();
46
46
  const content = [
47
- `import type { ${types.join(", ")} } from "${options.coreImport ?? "@wirecat/cli-base/codegen"}"`,
47
+ `import type { ${types.join(", ")} } from "${options.coreImport ?? "@wirecat/cli-base/codegen/runtime"}"`,
48
48
  "",
49
49
  `export const operations: readonly ManifestOperation[] = ${JSON.stringify(operations, null, 2)}`,
50
50
  ...extras.flatMap(([name, , type, value]) => [
@@ -61,7 +61,7 @@ export const definitionsGenerator = (options) => (model) => {
61
61
  return [
62
62
  {
63
63
  path: options.path,
64
- content: `import type { SchemaNode } from "${options.coreImport ?? "@wirecat/cli-base/codegen"}"\n\nexport const definitions: Readonly<Record<string, SchemaNode>> = ${JSON.stringify(definitions, null, 2)}\n`,
64
+ content: `import type { SchemaNode } from "${options.coreImport ?? "@wirecat/cli-base/codegen/runtime"}"\n\nexport const definitions: Readonly<Record<string, SchemaNode>> = ${JSON.stringify(definitions, null, 2)}\n`,
65
65
  },
66
66
  ];
67
67
  };
@@ -25,7 +25,7 @@ export declare const integer: (range?: Range) => v.SchemaWithPipe<readonly [v.Cu
25
25
  export declare const number: (range?: Range) => v.SchemaWithPipe<readonly [v.CustomSchema<number | LosslessLike, v.ErrorMessage<v.CustomIssue> | undefined>, v.TransformAction<number | LosslessLike, number>, v.CheckAction<number, "number out of range">]>;
26
26
  export declare const unique: (items: readonly unknown[]) => boolean;
27
27
  export type { ManifestOperation } from "./manifest.js";
28
- export type { ApiServer, Effect, GraphqlBinding, OAuthFlow, OperationPermission, PageParameter, Pagination, SchemaNode, SecurityRequirement, SecurityScheme, } from "./model.js";
28
+ export type { ApiServer, Binding, Confidence, Effect, GraphqlBinding, HttpBinding, OAuthFlow, OperationPermission, PageParameter, Pagination, RpcBinding, SchemaNode, SecurityRequirement, SecurityScheme, } from "./model.js";
29
29
  export { identifier } from "./names.js";
30
30
  export { graphqlDocument, parseSelection, type Selection } from "./selection.js";
31
31
  export { type SignInPlace, signInPlace, signInRequirements } from "./sign-in.js";
@@ -145,9 +145,27 @@ const FAMILY_SINCE_0_98 = [
145
145
  review_after: "2026-12-10",
146
146
  },
147
147
  ];
148
+ // cli-core 1.0.0 renames the unreadable config failure config.unreadable; a CLI still on 0.x gives account-rename.config,
149
+ // and mail-cli up to 1.0 its own mail.config-unreadable. Which of the three names meet depends on who has published.
150
+ // These sit in the messengers group only for its budget: a reason difference holds in every group.
151
+ const CONFIG_UNREADABLE_RENAME = [
152
+ "account-rename.config=config.unreadable=mail.config-unreadable",
153
+ "account-rename.config=config.unreadable",
154
+ "config.unreadable=mail.config-unreadable",
155
+ ].map((ids) => ({
156
+ rule: REASON,
157
+ target: `reason ${ids}`,
158
+ reason: "one failure under several names while the CLIs move to cli-core 1.0, which names it config.unreadable",
159
+ review_after: "2026-12-09",
160
+ }));
148
161
  /** @experimental */
149
162
  export const PARITY_GROUPS = defineParityGroups([
150
- { name: "messengers", members: ["tg", "max"], covers: "tree", differences: MESSENGERS_SINCE_0_98 },
163
+ {
164
+ name: "messengers",
165
+ members: ["tg", "max"],
166
+ covers: "tree",
167
+ differences: [...MESSENGERS_SINCE_0_98, ...CONFIG_UNREADABLE_RENAME],
168
+ },
151
169
  {
152
170
  name: "all",
153
171
  members: ["tg", "max", "memo", "drive", "zm", "wa"],
@@ -304,6 +304,7 @@ const collections = [
304
304
  ["teams", "groups in a tracker that own issues, states and labels"],
305
305
  ["states", "the workflow steps a tracker team moves its issues through, each of a type such as started"],
306
306
  ["labels", "a tracker's shared labels on issues, kept by the tracker and not by the owner"],
307
+ ["sprints", "a tracker team's time-boxed runs of work, such as Linear's cycles, each with a start and an end"],
307
308
  ["fields", "a record type's field definitions: code, label, type and options, such as a CRM's custom fields"],
308
309
  ["activities", "a CRM's calls, e-mails, meetings, to-dos and comments on its records"],
309
310
  ["changes", "what changed in a copied source over a time: records added, moved, closed or reassigned"],
@@ -1,10 +1,29 @@
1
- import { mkdirSync, mkdtempSync, rmSync } from "node:fs";
1
+ import { accessSync, constants, mkdirSync, mkdtempSync, rmSync } from "node:fs";
2
2
  import { createRequire } from "node:module";
3
3
  import { tmpdir } from "node:os";
4
4
  import { join } from "node:path";
5
5
  const OVERRIDE = /_(CONFIG|STATE|CACHE)_DIR$/;
6
- // macOS keeps a Unix socket path under 104 bytes, and its per-user temporary folder alone takes about 50.
7
- const baseFor = (platform) => (platform === "darwin" ? "/tmp" : tmpdir());
6
+ const writable = (dir) => {
7
+ if (!dir)
8
+ return false;
9
+ try {
10
+ accessSync(dir, constants.W_OK);
11
+ return true;
12
+ }
13
+ catch {
14
+ return false;
15
+ }
16
+ };
17
+ // macOS keeps a Unix socket path under 104 bytes, and its per-user temporary folder alone takes about 50. On Linux the
18
+ // runtime folder is in memory: a store's every commit waits for fsync, and on a disk other jobs keep busy that made a
19
+ // CRM sync in a test take 14 s instead of 1.5 s, past the test timeout (attio 0.5.1's release, 2026-11-24).
20
+ const baseFor = (platform, env) => {
21
+ if (platform === "darwin")
22
+ return "/tmp";
23
+ if (platform === "linux" && writable(env.XDG_RUNTIME_DIR))
24
+ return env.XDG_RUNTIME_DIR;
25
+ return tmpdir();
26
+ };
8
27
  const LEFT = Symbol.for("@wirecat/cli-base/testing/sandboxes");
9
28
  /**
10
29
  * vitest skips a file's afterAll when the file throws while loading or an earlier afterAll throws,
@@ -46,7 +65,7 @@ const removeOnExit = (dir) => {
46
65
  * process, past the network guard, and print its notice into output the test parses.
47
66
  */
48
67
  export const enterSandbox = (env = process.env, platform = process.platform) => {
49
- const dir = mkdtempSync(join(baseFor(platform), "wirecat-test-"));
68
+ const dir = mkdtempSync(join(baseFor(platform, env), "wirecat-test-"));
50
69
  const forget = removeOnExit(dir);
51
70
  const home = join(dir, "home");
52
71
  mkdirSync(home);
@@ -185,11 +185,12 @@ Every CLI that signs in has four commands under `session`:
185
185
  - **Enforced by:** review only.
186
186
  - **Example:** `gcal personal session status` answers whether the `personal` profile holds a Google login;
187
187
  `gcal session list` lists `personal` and `work` with no profile named.
188
- - **Exceptions:** known gaps, as of 2026-11-12 (gcal and mail have all four):
188
+ - **Exceptions:** known gaps, as of 2026-11-24 (every other CLI that signs in has all four):
189
189
  - tg, max and wa have `session start` and `session end`, no `session status`, and list their profiles with
190
- `account list` instead of `session list`.
191
- - drive has `session start`, `session list` and `session end`, and no `session status`.
192
- - zm has `session start`, `session status` and `session end`, and no `session list`.
190
+ `account list` instead of `session list`. cli-core 0.746.0 gives them both missing commands
191
+ (`messengerSessionCommands`), to add under `session`.
192
+ - drive has `session start`, `session list` and `session end`, and no `session status` until its next release
193
+ (drive-cli #398 adds it).
193
194
  - memo has no `session` group: it has no profiles and reads the stores of the other CLIs, mail's among them.
194
195
 
195
196
  A CLI that adds a missing command adds it under `session`; a renamed path keeps no alias
@@ -452,10 +452,11 @@ the same. `session start` takes such a token, and the CLI keeps it the way it ke
452
452
  - **Example:** `ydisk personal session start` asks `Yandex Disk OAuth token:` without echo, or reads
453
453
  `ydisk personal session start < token.txt`, asks the Disk whose token it is, and answers
454
454
  `{ "profile": "personal", "state": "saved", "stored_in": "keyring", "verified": true, "user": { … } }`.
455
+ `ydisk personal session end` forgets the token; its help, like ydisk's docs, says the token stays valid until the
456
+ owner removes the app in Yandex ID's Data access (<https://id.yandex.ru/personal/data-access>).
455
457
  - **Exceptions:** a sign-in the CLI runs itself follows
456
458
  [WC-SECR-22](#wc-secr-22--sign-in-with-oauth-through-cli-cores-sign-in-module). A bot token keeps its own entry,
457
- `bot:<profile>` (WC-SECR-4). Known gap, as of 2026-11-17: ydisk's `session end` forgets the token and says it stays
458
- valid at Yandex, but its docs do not yet say where to revoke it.
459
+ `bot:<profile>` (WC-SECR-4).
459
460
  - **Applies to:** every CLI whose sign-in takes a token the owner pastes (ydisk today). **Since:** cli-base 0.117.0.
460
461
  **Rulings:** none.
461
462
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-base",
3
- "version": "1.0.0-rc.0",
3
+ "version": "1.0.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",