@wirecat/cli-base 1.0.0-rc.0 → 1.0.0-rc.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,46 @@ 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-rc.1 — 25.11.2026
12
+
13
+ ### Added
14
+
15
+ - **`sprints` is a noun of the vocabulary:** a tracker team's time-boxed runs of work, such as Linear's cycles and
16
+ Jira's sprints. cli-core's tracker copies them and mounts `sprints list`, which the command lint refused as an
17
+ unknown resource.
18
+ - **`/codegen/runtime` exports `Binding`, `HttpBinding`, `RpcBinding` and `Confidence`.** A CLI that reads an
19
+ operation's binding or how far it is trusted no longer imports the experimental `/codegen` for the type.
20
+
21
+ ### Changed — experimental
22
+
23
+ - **The generated manifest and definitions import their types from `@wirecat/cli-base/codegen/runtime`** when
24
+ `coreImport` is not given, not from `/codegen`. Every type they name is there, and `/codegen/runtime` is part of
25
+ the stable API, so a CLI no longer passes `coreImport` by hand. Regenerating changes that one import line.
26
+
27
+ ### Fixed
28
+
29
+ - **WC-ACCT-12 no longer lists zm as a known gap:** zm 0.81.0 has `session list`, so it has all four session
30
+ commands, as most CLIs that sign in now do. The tg, max and wa gap now names cli-core's `messengerSessionCommands`,
31
+ which gives them the two commands they lack, and the drive gap says that its next release adds `session status`.
32
+ - **`bin/release` collects the `changes/` fragments and never renames a published section.** When npm already had
33
+ the version in `package.json` and only fragments had merged, it renamed that version's heading (`## 0.131.0` to
34
+ `## 0.132.0`), moved the published entries under the new number and left the fragments out (#706). Now a published
35
+ section keeps its heading: the new version takes the Unreleased section, or a new section the fragments fill, and
36
+ the release stops when there is neither. The fragments are collected into the version's section, which may raise
37
+ it to the level they need (an Added is a minor), as the CLIs' `bin/release` does. See
38
+ [RELEASING.md](docs/dev/RELEASING.md).
39
+ - **The shared Start release workflow agrees with `bin/release` on the `changes/` fragments.** When npm already had
40
+ the version in `package.json` and every entry was in `changes/` fragments, `release-start.yml` failed with
41
+ `CHANGELOG.md has no "## Unreleased" to raise …`. Now the new version gets a new section the fragments fill, and
42
+ the run stops only when there are no fragments and the Unreleased section is missing or empty. A
43
+ published `x.0.0` is followed by its next patch, raised only when the entries need more, so `1.0.0` with a fix
44
+ gives `1.0.1` instead of stopping at a major. Every file is checked before any is written, and `after-raise` runs
45
+ once, with the version that ships. The workflow needs cli-dev from cli-base 0.98.0 or later (#714).
46
+ - **On Linux the test sandbox starts in the runtime folder (`$XDG_RUNTIME_DIR`), which is in memory.** Every commit of
47
+ 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
48
+ the 15 s test timeout, so a CLI's local release check failed three times in a row. With no runtime folder to write
49
+ to, the sandbox starts in the temporary folder as before.
50
+
11
51
  ## 1.0.0-rc.0 — 23.11.2026
12
52
 
13
53
  ### Added
@@ -73,6 +113,8 @@ Every entry says what changed as a caller sees it, why, and what to watch for
73
113
 
74
114
  ### Fixed
75
115
 
116
+ - **WC-SECR-26 no longer lists ydisk's docs as a known gap:** they say where the owner revokes the Yandex token
117
+ (Yandex ID's Data access), and the rule's example now shows `session end`'s help saying it.
76
118
  - **`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
119
  - **A pre-release is published under npm's `next` tag**, from `bin/release` and from the release workflow. npm refuses
78
120
  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";
@@ -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-rc.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",