@totalreclaw/totalreclaw 3.3.0-rc.6 → 3.3.1-rc.7

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
@@ -4,6 +4,173 @@ All notable changes to `@totalreclaw/totalreclaw` (the OpenClaw plugin) are docu
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [3.3.1-rc.1] — 2026-04-22
8
+
9
+ First release candidate for 3.3.1. Comprehensive patch release addressing
10
+ user-QA findings against 3.3.0-rc.6
11
+ (`docs/notes/QA-user-findings-3.3.0-rc.6-20260421.md` in
12
+ `totalreclaw-internal`). The 3.3.0 runtime works; what 3.3.1 fixes is the
13
+ user experience around LLM auto-detection, config schema, non-interactive
14
+ CLI, gateway-URL resolution, and SKILL.md. All rc.2–rc.6 fixes are
15
+ preserved (scanner comment, auth: 'plugin' literal, ensureSessionsFileDir
16
+ mkdir, sync HTTP-route registration, manifest kind drop).
17
+
18
+ See: `plans/2026-04-22-plugin-3.3.1-provider-agnostic-llm.md` (internal).
19
+
20
+ ### Added
21
+
22
+ - **`skill/plugin/llm-profile-reader.ts`** — new scanner-isolated module that
23
+ harvests provider API keys from
24
+ `~/.openclaw/agents/<agent>/agent/auth-profiles.json`. This is where real
25
+ OpenClaw installs store user API keys. rc.6 silently no-op'd auto-extraction
26
+ for nearly every real user because `initLLMClient` only looked at env vars
27
+ and the SDK-passed `api.config.providers` — neither of which reach
28
+ auth-profiles.json.
29
+
30
+ - **`skill/plugin/gateway-url.ts`** — new scanner-isolated module that detects
31
+ the gateway's externally-reachable URL for QR pairing. Two autodetect tiers:
32
+ 1. Tailscale MagicDNS via `tailscale status --json` (assumes `tailscale
33
+ serve` on 443).
34
+ 2. First non-loopback, non-virtual IPv4 interface (LAN mode; emits a
35
+ "only works on the same network" warning).
36
+
37
+ - **`initLLMClient` 4-tier resolution cascade** — plugin-config override
38
+ (highest) → SDK-passed openclawProviders → harvested auth-profiles.json
39
+ keys → env vars (lowest). Every tier logs ONCE at startup at INFO level;
40
+ per-turn noise from rc.6 is removed.
41
+
42
+ - **`openclaw totalreclaw onboard` non-interactive modes**:
43
+ - `--non-interactive` — exits 1 if any input would be prompted.
44
+ - `--json` — emits a structured payload (requires `--non-interactive`).
45
+ - `--mode <generate|restore>` — skip the menu prompt.
46
+ - `--phrase <12-or-24>` — required for `--mode restore`; `-` reads stdin.
47
+ - `--emit-phrase` — opt-in path that includes the plaintext phrase in the
48
+ JSON payload. Default omits the phrase; the agent should direct the
49
+ user to read `~/.totalreclaw/credentials.json` in their terminal.
50
+
51
+ - **`openclaw totalreclaw pair [mode]` non-interactive flags**:
52
+ - `--json` — emits `{v, sid, url, pin, mode, expires_at_ms, qr_ascii}` to
53
+ stdout before polling begins. Agents capture + present to the user.
54
+ - `--timeout <sec>` — override the 15-minute default session TTL.
55
+
56
+ - **`extraction.llm` plugin-config override** — new optional block in the
57
+ plugin config schema. Explicit provider/model/apiKey/baseUrl wins over
58
+ every auto-detection tier:
59
+ ```yaml
60
+ plugins:
61
+ entries:
62
+ totalreclaw:
63
+ config:
64
+ extraction:
65
+ llm:
66
+ provider: zai
67
+ apiKey: <your-key>
68
+ model: glm-4.5-flash # optional — derived from provider default otherwise
69
+ ```
70
+
71
+ - **Config schema accepts `publicUrl` + `extraction.interval` +
72
+ `extraction.maxFactsPerExtraction`** — 3.3.0 rejected these keys with
73
+ `invalid config: must NOT have additional properties`. Both the manifest
74
+ (`openclaw.plugin.json`) and the JS plugin definition now accept them.
75
+ `extraction.additionalProperties` and `extraction.llm.additionalProperties`
76
+ remain `false` to keep the surface strictly typed.
77
+
78
+ - **Three new test files**:
79
+ - `llm-profile-reader.test.ts` — 19 assertions covering the auth-profiles
80
+ harvester (provider mapping, malformed input, multi-agent aggregation).
81
+ - `llm-client.test.ts` — 28 assertions covering the 4-tier cascade,
82
+ plus the `deriveCheapModel` regex-boundary fix.
83
+ - `config-schema.test.ts` — 14 assertions (+ Ajv strict validation when
84
+ available) covering the 3.3.1 schema surface.
85
+ - `onboarding-noninteractive.test.ts` — 22 assertions covering
86
+ `runNonInteractiveOnboard` happy path, phrase-validation, mode 0600,
87
+ `already-active` short-circuit.
88
+ - `pair-cli-json.test.ts` — 17 assertions covering pair-cli JSON output,
89
+ `ttlSeconds` propagation, and human-mode regression.
90
+
91
+ ### Changed
92
+
93
+ - **`pair-cli.ts` — no TTY requirement**. Prior rc versions imported
94
+ `readline` but never used it; the intro block also had no interactive
95
+ prompts. 3.3.1 removes any path that touches `setRawMode` in pair-cli and
96
+ adds a 10-second timeout on the QR renderer so a misbehaving qrcode-terminal
97
+ never hangs the pairing flow. Confirmed by
98
+ `pair-cli-json.test.ts` asserting JSON mode emits a single payload without
99
+ any TTY interaction.
100
+
101
+ - **`deriveCheapModel` — fixes word-boundary regression**. rc.6 used
102
+ `primaryModel.toLowerCase().includes(cheapWord)` which matched the substring
103
+ `mini` inside `gemini`, so `gemini-2.5-pro` passed through unchanged and
104
+ the extractor called a model the user hadn't configured. 3.3.1 uses a
105
+ word-boundary regex (`/(?:^|[-_/.])(?:flash|mini|nano|haiku|small|lite|fast)(?:[-_/.]|$)/i`).
106
+
107
+ - **Cheap-model table** — exported as `CHEAP_MODEL_BY_PROVIDER` for use by
108
+ paths that resolve a provider without knowing the user's primary model
109
+ (auth-profiles.json tier). Includes zai→glm-4.5-flash, openai→gpt-4.1-mini,
110
+ anthropic→claude-haiku-4-5-20251001, gemini/google→gemini-flash-lite,
111
+ groq→llama-3.3-70b-versatile, deepseek→deepseek-chat,
112
+ openrouter→anthropic/claude-haiku-4-5-20251001, xai→grok-2,
113
+ mistral→mistral-small-latest, together→meta-llama/Llama-3.3-70B-Instruct-Turbo,
114
+ cerebras→llama3.3-70b.
115
+
116
+ - **Gateway pairing URL cascade** — `buildPairingUrl` now threads through the
117
+ six-layer cascade: `publicUrl` → `gateway.remote.url` → custom bind host →
118
+ Tailscale autodetect → LAN autodetect → localhost fallback. Each fallback
119
+ emits a warning with clear pointer to `publicUrl` for override.
120
+
121
+ - **SKILL.md — full rewrite**. Explicit prohibition of generating phrases in
122
+ chat; canonical onboarding commands (`openclaw totalreclaw onboard` or
123
+ `onboard --non-interactive --json --mode generate`); two-step install flow
124
+ documented clearly; full 3.3.1 config schema documented; all tool surfaces
125
+ aligned with current taxonomy (`claim|preference|directive|commitment|
126
+ episode|summary`); references to `npx @totalreclaw/mcp-server setup`
127
+ removed.
128
+
129
+ ### Fixed
130
+
131
+ - **LLM auto-resolve silent no-op** — the root user-facing bug from
132
+ `QA-user-findings-3.3.0-rc.6-20260421.md`. Users store their provider key
133
+ in `~/.openclaw/agents/<agent>/agent/auth-profiles.json`; rc.6 never looked
134
+ there, so every turn logged `No LLM available for auto-extraction` and
135
+ zero facts were extracted. 3.3.1 adds auth-profiles as tier 3 of the
136
+ cascade.
137
+
138
+ - **`plugins.entries.totalreclaw.config.publicUrl` rejected** — user-documented
139
+ config key errored out with `invalid config: must NOT have additional
140
+ properties`. Schema was missing the property. Fixed in both `openclaw.plugin.json`
141
+ and the in-JS `configSchema`.
142
+
143
+ - **`No LLM available` fires every turn** — downgraded to a single INFO log
144
+ at startup. Never per-turn unless the resolvable state changes. The
145
+ `extraction.enabled=false` path also moved from warn to info (it's a user
146
+ choice, not a diagnostic signal).
147
+
148
+ - **Recovery-phrase-in-chat in SKILL.md** — the prior SKILL.md told the
149
+ agent to "run `npx @totalreclaw/mcp-server setup` to generate a
150
+ cryptographically valid recovery phrase… display it prominently". Any
151
+ compliant agent following this leaked the phrase to the LLM provider's
152
+ logging path. Removed entirely and replaced with an explicit prohibition
153
+ + pointer to CLI flows.
154
+
155
+ ### Preserved from rc.2–rc.6
156
+
157
+ - rc.2 scanner-comment isolation (fetch-word in comments rewrapped)
158
+ - rc.4 `auth: 'plugin'` literal on HTTP routes
159
+ - rc.4 `ensureSessionsFileDir` mkdir before lock acquire
160
+ - rc.5 synchronous `registerHttpRoute` calls (no async IIFE)
161
+ - rc.6 `openclaw.plugin.json` drop of `"kind": "memory"` (startup registry
162
+ fix; JS plugin definition still returns `kind: 'memory' as const` for
163
+ memory-slot matching)
164
+
165
+ ### Unchanged
166
+
167
+ No protocol / on-chain changes vs 3.3.0. Memory Taxonomy v1 unchanged.
168
+ Protobuf v4 unchanged. Subgraph schema unchanged. Billing cache unchanged.
169
+ Relay API surface unchanged. No breaking changes to any public tool
170
+ contract.
171
+
172
+ ---
173
+
7
174
  ## [3.3.0-rc.6] — 2026-04-20
8
175
 
9
176
  Sixth release candidate for 3.3.0. Single manifest-only fix for the