@wirecat/cli-base 0.61.0 → 0.61.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,27 @@ 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.61.1 — 26.10.2026
12
+
13
+ ### Fixed
14
+
15
+ - **The `--record` flag's meaning says what a run keeps now.** It read "keep this run under runs: ids and timings,
16
+ never content", which stopped being true when a run started keeping the command line as typed. It now reads cli-core
17
+ 0.440.0's help line: "keep this run, with the command as typed and secrets hidden; record_input false leaves the
18
+ typed words out". cli-core's option catalogue picks it up at its next cli-base bump.
19
+ [Lifecycle](docs/standards/lifecycle.md#runs) also says how a CLI with a program of its own hands cli-core the
20
+ words it parsed, without which its runs keep no command line.
21
+
22
+ ### Security
23
+
24
+ - **The secret-handling rule lists what a run record hides by content.** Besides secret-named flags, a URL password
25
+ and a long opaque string, cli-core finds a token of a known format, a `Bearer` or `Basic` credential, the value of a
26
+ secret-named `name=value` pair and a random-looking string of 20 or more characters inside any typed word, and the
27
+ same in a kept error message (`WC-SECR-1`).
28
+ - **`release-checks.yml` runs CodeQL action v4.39.1, pinned by its commit.** It was pinned to the `v4` tag object,
29
+ which still pointed at v4.38.3. A caller gets the newer analysis when it moves its `release-checks.yml` pin to the
30
+ release that carries this.
31
+
11
32
  ## 0.61.0 — 26.10.2026
12
33
 
13
34
  ### Changed — may break callers
@@ -330,7 +330,7 @@ export const HOW_FLAGS = [
330
330
  name: "--record",
331
331
  role: "mode",
332
332
  type: "switch",
333
- meaning: "keep this run under runs: ids and timings, never content",
333
+ meaning: "keep this run, with the command as typed and secrets hidden; record_input false leaves the typed words out",
334
334
  },
335
335
  { name: "--regex", role: "mode", type: "switch", meaning: "the words are one regular expression" },
336
336
  { name: "--silent", role: "mode", type: "switch", meaning: "deliver without a notification" },
@@ -210,6 +210,8 @@ every value that may be content
210
210
  returns the owner's `record` and `keep_runs_for_days` as `keepFailedRuns` and `keepRunsForDays`, never fixed values.
211
211
  - A CLI with a program of its own opens each command's run with `startRecording` from `@wirecat/cli-core/cli`,
212
212
  ends it with `succeed` or `fail`, adds `--record` and `--no-record` at the root and registers `runsCommand(app)`.
213
+ Its run keeps the command line only when cli-core is given the words it parsed: `context: runContextOf({ program,
214
+ argv, … })` to `startRecording`, or `argv` in the program's environment (`provide`) under `recordRuns`.
213
215
 
214
216
  - **Why:** when a command fails, a person or an agent needs to see what it did, in the same place and shape in every
215
217
  CLI. Without the rule, three CLIs shipped with no run log, and one switched cli-core's off.
@@ -26,8 +26,12 @@ a run record keeps the command line the person typed.
26
26
 
27
27
  A run record's `argv` keeps the words as typed by default, so the history of what was run can be read back. A secret
28
28
  in them is always `[redacted]`: the value of an option or argument the CLI marks with cli-core's `secretInput(...)`,
29
- one whose name says token, password, secret, credential, cookie, authorization or API key, a password inside a URL,
30
- and a long opaque string. `record_input: false` in the CLI's config masks every value that may be content, and a
29
+ one whose name says token, password, passphrase, secret, credential, cookie, authorization or API key, a password
30
+ inside a URL, and a long opaque string. Inside any typed word cli-core also finds a secret by its content and replaces
31
+ only the secret: a token of a known format (GitHub `ghp_…`/`github_pat_…`, `sk-…`, Slack `xox…-`, AWS `AKIA…`, Google
32
+ `AIza…`, Stripe `sk_`/`rk_`, npm `npm_…`, a Telegram bot token, a JWT, a PEM private key), a `Bearer` or `Basic`
33
+ credential, the value of a secret-named pair (`password=…`, `API_TOKEN=…`, `client_secret:…`), a random-looking string
34
+ of 20 or more characters, and a phone number. The same search runs on a kept error message. `record_input: false` in the CLI's config masks every value that may be content, and a
31
35
  config that will not load masks the same way. A problem report sent to other people (`doctor reports create`) masks
32
36
  the typed words always.
33
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-base",
3
- "version": "0.61.0",
3
+ "version": "0.61.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",