@wirecat/cli-base 0.47.3 → 0.47.5

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.47.5 — 21.10.2026
12
+
13
+ ### Fixed
14
+
15
+ - **On Linux the OS keyring now means the Secret Service, never the kernel keyring.** `@napi-rs/keyring` silently
16
+ fell back to the in-memory kernel keyring when the Secret Service did not answer (gnome-keyring locked, D-Bus
17
+ timeout): reads of stored secrets came back empty with no hint why, and writes went to memory that a reboot
18
+ clears. `systemKeyring` now pins every entry to the Secret Service, so such a failure throws and `Credentials`
19
+ in `auto` mode warns once and uses its file. What to watch for: a machine with no Secret Service but a working
20
+ kernel keyring now gets the credentials file instead; a secret written to the kernel keyring by an earlier
21
+ version is no longer read and has to be stored again. The warning now reads "could not reach the OS keyring — it
22
+ may be locked, or no keyring service is running (…); using <file> instead, readable only by you".
23
+
24
+ ## 0.47.4 — 20.10.2026
25
+
26
+ ### Added
27
+
28
+ - **Selected annotation workflows share the `annotations` resource and explicit `--target-store` and
29
+ `--bindings` flags.** A CLI can export, check and restore derived records without implying a full
30
+ archive backup or choosing destination identities by name. Each command states its included and
31
+ omitted facets; `check` keeps its existing read-only meaning.
32
+
11
33
  ## 0.47.3 — 20.10.2026
12
34
 
13
35
  ### Fixed
@@ -110,8 +110,9 @@ export class Credentials {
110
110
  catch (error) {
111
111
  if (!this.#warned) {
112
112
  this.#warned = true;
113
- this.#warn(`the OS keyring is unavailable (${error instanceof Error ? error.message : String(error)}); ` +
114
- `storing in ${this.#path()} instead, readable only by you`);
113
+ this.#warn(`could not reach the OS keyring — it may be locked, or no keyring service is running ` +
114
+ `(${error instanceof Error ? error.message : String(error)}); ` +
115
+ `using ${this.#path()} instead, readable only by you`);
115
116
  }
116
117
  return undefined;
117
118
  }
package/dist/keyring.js CHANGED
@@ -1,4 +1,8 @@
1
1
  import { createRequire } from "node:module";
2
+ // Without a pinned store the binding silently falls back to the kernel keyring when the Secret
3
+ // Service fails (locked, not running): reads miss every stored secret and writes are lost on
4
+ // reboot, and nothing throws, so `Credentials` never falls back to its file. Ignored off Linux.
5
+ const ENTRY_OPTIONS = { linux: { store: "secret-service" } };
2
6
  const require = createRequire(import.meta.url);
3
7
  let cached;
4
8
  // Loaded on first use, not at import: `@napi-rs/keyring` is a native module, and a machine
@@ -7,15 +11,15 @@ const entryClass = () => {
7
11
  cached ??= require("@napi-rs/keyring").Entry;
8
12
  return cached;
9
13
  };
14
+ const entry = (service, account) => new (entryClass())(service, account, ENTRY_OPTIONS);
10
15
  export const systemKeyring = {
11
16
  // Returns null for an absent entry rather than throwing — measured against @napi-rs/keyring
12
17
  // on 2026-09-13, and the difference matters: a throw here means the keychain is unusable.
13
- get: (service, account) => new (entryClass())(service, account).getPassword(),
18
+ get: (service, account) => entry(service, account).getPassword(),
14
19
  set: (service, account, secret) => {
15
- ;
16
- new (entryClass())(service, account).setPassword(secret);
20
+ entry(service, account).setPassword(secret);
17
21
  },
18
- delete: (service, account) => new (entryClass())(service, account).deletePassword(),
22
+ delete: (service, account) => entry(service, account).deletePassword(),
19
23
  };
20
24
  /** An in-memory stand-in. Every test uses this; none can reach the real keychain. */
21
25
  export const memoryKeyring = (initial = {}) => {
@@ -1,4 +1,18 @@
1
1
  export const WHAT_FLAGS = [
2
+ {
3
+ name: "--target-store",
4
+ value: "<file>",
5
+ role: "target",
6
+ type: "path",
7
+ meaning: "explicit destination store file for checking or restoring selected annotations",
8
+ },
9
+ {
10
+ name: "--bindings",
11
+ value: "<file>",
12
+ role: "target",
13
+ type: "path",
14
+ meaning: "JSON file mapping source typed references to explicitly selected destination references",
15
+ },
2
16
  {
3
17
  name: "--context-source",
4
18
  value: "<id=cursor>",
@@ -214,6 +214,10 @@ const collections = [
214
214
  ["documents", "files imported from Google Drive or Docs, or linked in a chat"],
215
215
  ["notes", "text the owner writes, or files from a notes folder"],
216
216
  ["projects", "the owner's work units with a task key"],
217
+ [
218
+ "annotations",
219
+ "derived records attached to a selected entity, with explicit coverage of included and omitted facets",
220
+ ],
217
221
  ["organizations", "companies, teams, families or communities"],
218
222
  [
219
223
  "identities",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-base",
3
- "version": "0.47.3",
3
+ "version": "0.47.5",
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",