@wirecat/cli-base 0.116.0 → 0.118.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.
@@ -153,6 +153,24 @@ profile by default. The server opens one messenger connection for each profile i
153
153
  profile shares it. When it serves more than one profile, each call names its profile; a call without one is refused
154
154
  and lists the profiles served. Each call follows its own profile's permissions.
155
155
 
156
+ **The MCP Registry entry.** A `server.json` starts the server the same way: it passes `mcp serve` and a
157
+ `--profiles` that the person installing it fills in. That argument is `"type": "named"`, `"isRequired": true`, with
158
+ a `"placeholder"` such as `personal` and no `"value"`, so the client asks which profiles to serve. A fixed
159
+ `"value": "all"` is the default this rule forbids: every client installed from the registry would reach every
160
+ account on the computer. The person may still type `all`. memo, which has no profiles, passes `mcp serve` alone.
161
+ The two `version` fields in `server.json`, the server's and its package's, are not kept by hand: `release.yml` sets
162
+ both to the version it publishes, then runs `mcp-publisher validate`, so a new CLI leaves them at `0.0.0`.
163
+
164
+ ```json
165
+ {
166
+ "type": "named",
167
+ "name": "--profiles",
168
+ "description": "The profiles this server serves: one name, a comma-separated list such as work,personal, or all for every profile on this computer",
169
+ "isRequired": true,
170
+ "placeholder": "personal"
171
+ }
172
+ ```
173
+
156
174
  - **Why:** which accounts an agent can reach is the owner's choice, written in the agent's config. A connection per
157
175
  call would break the messenger's pace limits and look unlike the official client.
158
176
  - **Enforced by:** review only.
@@ -164,7 +182,8 @@ and lists the profiles served. Each call follows its own profile's permissions.
164
182
  it reads other CLIs' stores and selects their accounts with `--source email:<name>` or `--account telegram:1`
165
183
  ([cli-base#390](https://github.com/WireCatLabs/cli-base/issues/390), owner decision 2026-10-31). The audit declares
166
184
  this once, as a difference of memo, not of the other CLIs.
167
- - **Applies to:** messenger CLIs. **Since:** cli-base 0.41.0. **Rulings:** NEED-1881.
185
+ - **Applies to:** messenger CLIs; the MCP Registry entry above, every CLI that ships a `server.json`. **Since:**
186
+ cli-base 0.41.0; the registry entry since cli-base 0.117.0. **Rulings:** NEED-1881.
168
187
 
169
188
  ### WC-MCP-10 · A tool and its command give the same answer and the same error
170
189
 
@@ -161,11 +161,22 @@ installing that command; nothing else is registered anywhere.
161
161
  [WC-CI-9](ci.md#wc-ci-9--run-full-validation-and-release-security-on-the-first-day-of-each-month-without-publishing)
162
162
  and off the hour; a CLI outside WireCatLabs gets one between 04:01 and 05:59 UTC, after that window. Nothing to
163
163
  change by hand.
164
- 4. **WireCat CLIs only: join the shared lists.** `new` prints the entries ready to paste. A pull request to cli-base
165
- with the new minute in WC-CI-9's table and the CLI in `PARITY_GROUPS` (at least the `all` group, which compares the
166
- shared root commands), a line in cli-core's `WIRECAT_TOOLS` and, after the first release, a line in cli-docs'
167
- `tools.json`. A messenger also joins cli-core's `parity.json`. A CLI outside WireCatLabs keeps its parity groups
168
- in its own repository and runs `cli-dev audit --groups <file>`. See [Testing](testing.md).
164
+ 4. **WireCat CLIs only: join the shared lists.** Each list below names every WireCat CLI by hand, and nothing adds a
165
+ new one by itself. `new` prints the entries for the first three, ready to paste; add the others the same way.
166
+
167
+ | Where | The entry | When |
168
+ |---|---|---|
169
+ | cli-base `docs/standards/ci.md`, the table under [WC-CI-9](ci.md#wc-ci-9--run-full-validation-and-release-security-on-the-first-day-of-each-month-without-publishing) | the monthly cron minute `new` picked, and the repository | before the first release |
170
+ | cli-core `src/ports/wirecat-tools.ts`, `WIRECAT_TOOLS` | the command, `appName`, `envPrefix`, package and what it does | before the first release |
171
+ | cli-docs `tools.json` | the command, repository, package, language, summaries and `docsRef` | after the first release, since `docsRef` is its tag |
172
+ | cli-base `src/standards/audit.ts`, `PARITY_GROUPS` | the command in `all` when its tree matches the messengers' and memo's, else in `shared-roots`, which compares only the root commands every CLI shares (ydisk, notion, the CRM CLIs); and in its category's group where one exists (`crm`) | before the first release |
173
+ | cli-base `src/dev/family.ts`, `PACKAGES` | the command and its npm package, so `cli-dev audit --family` installs it for its neighbours | after the first release, since the audit installs it from npm |
174
+
175
+ The cli-base entries due before the first release go in one pull request. A command in `FIRST_PARTY_TOOLS`
176
+ (`src/wcat/names.ts`) reaches `PACKAGES` from there, and that list also reserves the name (`RESERVED_NAMES`) and
177
+ makes `wcat --help` offer to install it; add a CLI there only when `wcat` should offer it. A messenger also joins
178
+ cli-core's `parity.json`. A CLI outside WireCatLabs joins none of these: it keeps its parity groups in its own
179
+ repository and runs `cli-dev audit --groups <file>`. See [Testing](testing.md).
169
180
 
170
181
  `cli-dev repo-check --cli <name>` checks steps 1, 3 and 4 on every pull request of a CLI made from cli-template
171
182
  (`ci.yml:repo-setup`): the ruleset's four rules on `main` and the required checks of step 1 (`conformance` only where
@@ -321,7 +321,8 @@ store and runs no search. A CLI declares its provider and may replace any step.
321
321
  - **Example:** new keyring entries are named `oauth:<provider>:<profile>`. drive's and zm's entries from before the
322
322
  module are read and refreshed in the shape they were stored in, so nobody signs in again.
323
323
  - **Exceptions:** a CLI that replaces a step still keeps the explicit profile, the lock, and tokens that are never
324
- printed. A CLI that signs in another way (a bot token, a session) does not use the module.
324
+ printed. A CLI that signs in another way (a bot token, a session) does not use the module; a provider token the
325
+ owner pastes follows [WC-SECR-26](#wc-secr-26--a-provider-token-the-owner-pastes-is-read-hidden-checked-with-the-service-then-kept-in-the-keyring).
325
326
  - **Applies to:** every CLI that signs in with OAuth. **Since:** cli-base 0.57.1. **Rulings:** NEED-1734.
326
327
 
327
328
  ### WC-SECR-23 · Meeting passcodes and the query of a join link never reach the store, the output or an agent
@@ -418,6 +419,46 @@ cli-core's layer for Google and Microsoft, a tool's own layer for a provider onl
418
419
  - **Applies to:** every CLI that signs in with OAuth, and wirecat-desktop. **Since:** cli-base 0.76.1.
419
420
  **Rulings:** owner, 2026-11-04.
420
421
 
422
+ ### WC-SECR-26 · A provider token the owner pastes is read hidden, checked with the service, then kept in the keyring
423
+
424
+ Some providers hand the owner a token to copy instead of a sign-in the CLI can run itself: Yandex shows an OAuth token
425
+ in the browser ([Yandex ID's guide](https://yandex.ru/dev/id/doc/en/tokens/debug-token)), and an API key page does
426
+ the same. `session start` takes such a token, and the CLI keeps it the way it keeps any other secret.
427
+
428
+ - **Read:** with cli-core's `readSecret`, typed at a terminal without echo or read as one line from stdin. Never as an
429
+ argument ([WC-SECR-5](#wc-secr-5--a-secret-is-never-taken-on-the-command-line)). `<TOOL>_TOKEN` in the environment
430
+ is read for CI ([WC-SECR-4](#wc-secr-4--secrets-come-from-the-environment-then-the-os-keyring-then-a-private-file)),
431
+ never written there and never printed, not in an answer, an error or a `--dry-run`.
432
+ - **Checked before it is kept:** `session start` asks the service whose token it is, and keeps the token only when the
433
+ service accepts it. The answer says `verified: true`, the user and where the token went (`stored_in`), never the
434
+ token.
435
+ - **Stored:** with cli-core's `ProfileTokenStore`, as `token:<profile>` under the CLI's app name: the keyring, a
436
+ `0600` file when no keyring works, and a temporary entry in a run with moved folders
437
+ ([WC-SECR-24](#wc-secr-24--a-run-with-moved-folders-shares-the-owners-keyring-entry-and-never-deletes-it)).
438
+ - **Checked later:** `session status` says where the token comes from (the environment, the keyring or a file);
439
+ `session status --check` and `doctor --online` ask the service whose token it is.
440
+ - **Revoked:** `session end` forgets the token on this computer. When the provider has a call that revokes such a
441
+ token, `session end` makes it first; when it has none, `session end` and the CLI's docs say that the token stays
442
+ valid at the provider and where the owner revokes it there.
443
+ - **The app.** The CLI runs no OAuth flow, so [WC-SECR-25](#wc-secr-25--sign-in-with-wirecats-app-by-default-and-let-the-owner-choose-their-own)'s
444
+ order does not apply to it. The docs name the app the token is issued for: WireCat's when there is one, or the
445
+ steps to register the owner's own, with the narrowest access the commands need.
446
+
447
+ - **Why:** a pasted token opens the account like a password. Shell history, a process list or a log line would keep
448
+ it where other programs and people can read it, and a token kept before the service accepted it breaks the next
449
+ command with a confusing error.
450
+ - **Enforced by:** review only, check planned: a cli-core test that session start refuses a token given as an
451
+ argument and keeps none the service refused.
452
+ - **Example:** `ydisk personal session start` asks `Yandex Disk OAuth token:` without echo, or reads
453
+ `ydisk personal session start < token.txt`, asks the Disk whose token it is, and answers
454
+ `{ "profile": "personal", "state": "saved", "stored_in": "keyring", "verified": true, "user": { … } }`.
455
+ - **Exceptions:** a sign-in the CLI runs itself follows
456
+ [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
+ - **Applies to:** every CLI whose sign-in takes a token the owner pastes (ydisk today). **Since:** cli-base 0.117.0.
460
+ **Rulings:** none.
461
+
421
462
  ## Sources
422
463
 
423
464
  These documents explain the rules on this page in more detail. Where one of them disagrees with this page, this page
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-base",
3
- "version": "0.116.0",
3
+ "version": "0.118.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",