@solidnumber/cli 2.24.12 → 2.26.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +1678 -0
  2. package/README.md +1 -1
  3. package/dist/commands/app.d.ts +46 -12
  4. package/dist/commands/app.d.ts.map +1 -1
  5. package/dist/commands/app.js +347 -52
  6. package/dist/commands/app.js.map +1 -1
  7. package/dist/commands/bring.d.ts +26 -0
  8. package/dist/commands/bring.d.ts.map +1 -0
  9. package/dist/commands/bring.js +289 -0
  10. package/dist/commands/bring.js.map +1 -0
  11. package/dist/commands/how-to.d.ts.map +1 -1
  12. package/dist/commands/how-to.js +44 -0
  13. package/dist/commands/how-to.js.map +1 -1
  14. package/dist/commands/init.d.ts.map +1 -1
  15. package/dist/commands/init.js +10 -2
  16. package/dist/commands/init.js.map +1 -1
  17. package/dist/commands/pages.js +3 -2
  18. package/dist/commands/pages.js.map +1 -1
  19. package/dist/commands/pull.d.ts.map +1 -1
  20. package/dist/commands/pull.js +23 -1
  21. package/dist/commands/pull.js.map +1 -1
  22. package/dist/commands/push.js +1 -1
  23. package/dist/commands/push.js.map +1 -1
  24. package/dist/commands/render.d.ts.map +1 -1
  25. package/dist/commands/render.js +16 -11
  26. package/dist/commands/render.js.map +1 -1
  27. package/dist/commands/schema.d.ts.map +1 -1
  28. package/dist/commands/schema.js +27 -5
  29. package/dist/commands/schema.js.map +1 -1
  30. package/dist/commands/serve.js +2 -2
  31. package/dist/commands/setup.d.ts.map +1 -1
  32. package/dist/commands/setup.js +9 -2
  33. package/dist/commands/setup.js.map +1 -1
  34. package/dist/commands/site.js +1 -1
  35. package/dist/commands/site.js.map +1 -1
  36. package/dist/commands/update.d.ts.map +1 -1
  37. package/dist/commands/update.js +6 -2
  38. package/dist/commands/update.js.map +1 -1
  39. package/dist/commands/verbs.d.ts.map +1 -1
  40. package/dist/commands/verbs.js +37 -9
  41. package/dist/commands/verbs.js.map +1 -1
  42. package/dist/index.js +4 -0
  43. package/dist/index.js.map +1 -1
  44. package/dist/lib/block-schema-source.d.ts +13 -0
  45. package/dist/lib/block-schema-source.d.ts.map +1 -1
  46. package/dist/lib/block-schema-source.js +24 -1
  47. package/dist/lib/block-schema-source.js.map +1 -1
  48. package/dist/lib/block-types.d.ts +8 -0
  49. package/dist/lib/block-types.d.ts.map +1 -1
  50. package/dist/lib/project-kits.d.ts +9 -2
  51. package/dist/lib/project-kits.d.ts.map +1 -1
  52. package/dist/lib/project-kits.js +42 -4
  53. package/dist/lib/project-kits.js.map +1 -1
  54. package/dist/lib/pull-readme.d.ts +11 -0
  55. package/dist/lib/pull-readme.d.ts.map +1 -0
  56. package/dist/lib/pull-readme.js +150 -0
  57. package/dist/lib/pull-readme.js.map +1 -0
  58. package/dist/lib/schema-validate.d.ts +17 -1
  59. package/dist/lib/schema-validate.d.ts.map +1 -1
  60. package/dist/lib/schema-validate.js +91 -38
  61. package/dist/lib/schema-validate.js.map +1 -1
  62. package/dist/lib/skills/index.d.ts.map +1 -1
  63. package/dist/lib/skills/index.js +91 -0
  64. package/dist/lib/skills/index.js.map +1 -1
  65. package/package.json +6 -4
  66. package/platform-docs/llms.txt +6 -5
package/CHANGELOG.md ADDED
@@ -0,0 +1,1678 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@solidnumber/cli` will be documented in this file.
4
+
5
+ ## [2.26.0] — 2026-10-04
6
+
7
+ **Your AI gets the Solid# skills without being told to, and `solid render` no
8
+ longer refuses an AI agent.**
9
+
10
+ - A client project (a folder with `.solid/manifest.json`) gets the Solid# skills
11
+ and plugin automatically: `solid init` and `solid pull` install them when they
12
+ bind the folder, and `solid update` installs them in the project it runs in if
13
+ they are missing. An AI working there reads the verb catalog instead of
14
+ guessing commands. Other folders, your home folder and the Solid# platform repo
15
+ are never written.
16
+ - `solid render` downloads its browser on first use for an AI agent too (it used
17
+ to refuse with "run `solid render --install`" unless `SOLID_AUTO_INSTALL=1`),
18
+ and says so. `solid audit` already did. Google Chrome is used when it is
19
+ installed, so most machines download nothing. `SOLID_AUTO_INSTALL=0` forbids
20
+ the download.
21
+ - `solid setup` skips the browser question when a browser is already there, and
22
+ otherwise offers it with Yes as the default.
23
+
24
+ **A front door for anyone building or bringing a website or an app, and the block
25
+ structure told truthfully.**
26
+
27
+ - `solid bring [folder]` — start here. With a folder it reads the files and says
28
+ what they are (a page, an app, or something with server code) and the exact
29
+ next command; with nothing it asks what you are bringing and gives the steps in
30
+ order. Nothing is decided in the CLI: it asks the backend's `design.intake`.
31
+ - `solid pull` leaves a `SOLID-README.md` in the folder: what each folder is, what
32
+ a page is made of, what a kept design is and how its slots are changed, where
33
+ an app goes, and what `solid push` does and does not send.
34
+ - `solid schema pages --block <type>` shows what a block needs before it shows
35
+ anything ("shows when") and the fields of each list item, live from the
36
+ backend. `solid schema blocks` returns examples read out of the renderer
37
+ instead of ones made up from prop types, and `--starter` returns a whole page
38
+ that renders.
39
+ - What a verb is, said plainly in `solid verbs --help`, `solid how-to` and the
40
+ installed skills: an action you call — not a word, not deletable — and nothing
41
+ is held back (`solid map`, `solid find`).
42
+ - A new installed skill, `solid-building`: page or app, the one import, slots.
43
+ - Seven help examples that named flags or arguments the commands do not take.
44
+
45
+ ## [2.25.0] — 2026-10-03
46
+
47
+ **`solid app` reads your repository itself, says which commit is live, and can hold
48
+ a build until you choose to make it live.**
49
+
50
+ - `solid app github` reads the repository before it writes anything: it finds the
51
+ app's folder (the root or one level down), the package manager from the lockfile,
52
+ the built folder (Vite's `outDir` included) and whether one of your own workflows
53
+ already rebuilds it, then writes the matching workflow — build then publish,
54
+ publish a committed folder when it changes, or publish when your rebuilding
55
+ workflow finishes. `--folder` is optional; `--plan` shows what it found and the
56
+ workflow without creating a key or writing a file. The real run prints the exact
57
+ steps, in order.
58
+ - `solid app publish` sends the commit and repository the build came from, so
59
+ `solid app get` says which commit is live. `--hold` keeps a build without making
60
+ it live, and `solid app github --review` does that on every push. `publish` and
61
+ `get` print what the server says to do next, and the outside addresses the build
62
+ depends on. Publishing opens company by company; until it is on for yours, the
63
+ command says so and nothing is published.
64
+ - The Playground checks inside array items (`terms[0].excerpt`, `lines[2].amount`)
65
+ with the same rules as the top level, and enforces "one of these is required"
66
+ (`missing_one_of`). A payload it called valid is no longer refused live.
67
+ - `solid verbs invoke` on a write without `--confirm` now sends the call without
68
+ consent instead of stopping before it: the server refuses it
69
+ (`confirmation_required`), nothing changes, and the attempt is recorded in
70
+ `audit.receipts`. It used to leave no trace. `--confirm` is still how you consent.
71
+ - Release notes are a release gate: every version ships with its CHANGELOG entry,
72
+ shows on solidnumber.com/docs/cli/changelog, and gets a GitHub release.
73
+ - Dependency update: axios 1.20.
74
+
75
+ ## [2.24.12] — 2026-09-30
76
+
77
+ **`solid app` puts a designer's interactive app live for your company, and
78
+ `solid update` brings everything Solid# on your machine current.**
79
+
80
+ - New: `solid app publish <folder>` puts an app built in Figma Make, Lovable, v0,
81
+ Bolt or plain React live for this company. Point it at the BUILT folder (the one
82
+ with `index.html`: `dist/`, `build/` or `docs/`). It is zipped on your machine and
83
+ uploaded to a private link, so the app's files never travel inside the API call.
84
+ `solid app list`, `get`, `rollback` and `unpublish` manage it; every version is
85
+ kept, and `rollback` also brings an unpublished app back.
86
+ - New: `solid app github`, run once inside the app's repository, adds a workflow
87
+ that builds the app in your own GitHub Actions and publishes it on every push. It
88
+ saves a key that can only publish apps as a repository secret, so private
89
+ repositories are never shared with us.
90
+ - `solid update` tries every way this machine can install the CLI (the one it
91
+ detects first, then npm, then Homebrew or scoop) and counts the update done only
92
+ when the `solid` your terminal runs reports the new version. It then refreshes
93
+ what the CLI set up: the MCP server your AI tools launch, the Claude Code session
94
+ hook, shell completion, the agent skills and plugin in every project where you ran
95
+ `solid agent setup`, and the render browser. Nothing new is installed.
96
+ `solid update --check` lists every part; `--json` reports each part for an agent.
97
+ - Fixed: sending and replying to email from `solid inbox` was rejected on every call
98
+ (the CLI posted field names the server does not take). It now sends the recipient,
99
+ subject and text the server expects, and a reply goes to the other party of the
100
+ original message with `Re:` on the subject.
101
+ - Dependencies: `undici` 6.28.0 → 6.29.0 (high-severity advisories).
102
+ - Coming from 2.24.11 or earlier: that version runs its own update code for this one
103
+ step. If it stops, run `npm install -g @solidnumber/cli@latest` once.
104
+
105
+ ## [2.24.11] — 2026-09-28
106
+
107
+ **`solid inventory import` reports every row, and `solid update` works in the
108
+ first minutes after a release.**
109
+
110
+ - `solid inventory import <file>` prints how many rows were created, updated and
111
+ unchanged, names every row that failed with its row number, SKU and reason, and
112
+ lists the columns it did not import. It exits 1 if any row failed.
113
+ `--dry-run` says nothing was written and previews what each row would do.
114
+ - Server-side, shipped 2026-09-28 (no CLI update needed): the import now writes
115
+ your real products and per-location stock. It used to fail for every company.
116
+ Rows match by SKU in your company; a blank cell never overwrites; a new SKU needs
117
+ a name; a `location` column sets that location's count. `--dry-run` is now truly
118
+ a dry run: the server used to ignore the flag the CLI sends. New verb:
119
+ `inventory.import_csv`.
120
+ - `solid update` installs with `--prefer-online`. Right after a release, npm's
121
+ cached package list lacked the new version, so updating to `@latest` failed
122
+ (`ETARGET`) for the first few minutes. The MCP self-update uses the same flag.
123
+
124
+ ## [2.24.10] — 2026-09-27
125
+
126
+ **`solid docs` points at the public booking routes that exist, and the
127
+ published counts are regenerated.**
128
+
129
+ - `solid docs` listed `GET /api/v1/cms/public/availability` for open appointment
130
+ slots. That route never existed (404). It now lists the host-resolved routes:
131
+ `GET /api/v1/cms/pages/public/booking?host=<site>` (bookable services),
132
+ `GET /api/v1/cms/pages/public/booking/times?host=<site>&service_id=<id>&date=YYYY-MM-DD`
133
+ (open slots) and `POST /api/v1/cms/pages/public/book?host=<site>` (book a slot).
134
+ - Counts re-measured by `npm run sync:counts`: 172 top-level commands, 914 verbs.
135
+
136
+ ## [2.24.9] — 2026-09-24
137
+
138
+ **`solid update` keeps the MCP server current, not just the CLI.**
139
+
140
+ - Client configs written before 2.24.8 launch a bare `@solidnumber/mcp`, which
141
+ npx serves from its cache forever — updating the CLI never touched it. After
142
+ the CLI step, every Solid# launch in Claude Desktop, Cursor, Windsurf and
143
+ Claude Code (including per-project servers in `~/.claude.json`) that uses the
144
+ bare spec is switched to `@solidnumber/mcp@latest`; only that one argument
145
+ changes. A deliberate version pin is left alone and reported. Unparseable
146
+ files are never written.
147
+ - A global npm install of `@solidnumber/mcp` is upgraded when behind.
148
+ - Runs even when the CLI is already current.
149
+ - `--json` now performs the update and reports it, so an agent can call it;
150
+ `--check` changes nothing, with or without `--json`. Exit 1 if any step fails.
151
+
152
+ ## [2.24.8] — 2026-09-24
153
+
154
+ **Flags reach the commands they belong to, a missing-scope error tells you the
155
+ real fix, and `solid mcp install` writes a key that doesn't expire.**
156
+
157
+ - `solid inbox --limit 5` — was read as a subcommand named `5`. Fixed, and
158
+ `inbox list --limit` / `inbox email list --limit` now reach the route instead
159
+ of running with the default 20.
160
+ - Missing scope — the backend's structured 403 is now `SCOPE_MISSING` with the
161
+ scope it needs, not "check your tier". `solid keys rotate --add-scope <scope>`
162
+ exists now, and rotate creates the new key BEFORE revoking the old one.
163
+ - `solid subscriptions list` — sends no filters the route ignores; shows the one
164
+ plan it returns.
165
+ - `solid verbs invoke` — uses each verb's HTTP method from the manifest (9 verbs
166
+ drew 405 before).
167
+ - `solid ucp consent grant|revoke` and `solid ucp capabilities` — call routes that
168
+ exist; a tenant without UCP gets a plain "not enabled".
169
+ - `solid mcp install` — writes an `sk_` key for this company (reused when still
170
+ valid) and `@solidnumber/mcp@latest`, never an expiring login token.
171
+ `solid mcp doctor` names each connection's company and the exact repair command.
172
+ - Releases now start the Homebrew and scoop bumps the moment npm serves the
173
+ version, so `install.sh` on a brew or scoop machine gets the new release
174
+ within minutes instead of the next 4-hour cron.
175
+
176
+ ## [2.24.7] — 2026-09-24
177
+
178
+ **`solid nest <folder>` imports the whole site a designer handed over; `solid mcp
179
+ doctor --fix` leaves exactly one Solid# connection; `auth login --token` no longer
180
+ drifts back to the previous account.**
181
+
182
+ - `solid nest <folder>` — a folder used to be sent to the server as if its PATH
183
+ were the site's HTML. It now reads the folder (relative paths kept, text as text,
184
+ images and fonts as binary; hidden, VCS and `node_modules` items skipped and
185
+ listed), imports every page as the site with the links between them kept, and
186
+ builds each one. `--entry <file>` names the home page; `--single` imports only it.
187
+ A folder named like a domain (`showerpros.com`) is still a folder.
188
+ - `solid mcp doctor --fix` — removes the local duplicate Solid# connections that
189
+ made "which company is the AI on?" unanswerable, backing each config file up
190
+ first. The claude.ai connector is never touched — it is named as a step for you,
191
+ and the report says plainly when a conflict remains. `--dry-run` shows the plan.
192
+ - `solid auth login --token` — the previous account's refresh token and cached
193
+ companies are set aside before the key is verified and restored only if it is
194
+ bad, so a typo never logs you out and a good key never refreshes back into the
195
+ old account.
196
+
197
+ ## [2.24.6] — 2026-09-24
198
+
199
+ **`solid verbs list` takes the Atlas addresses the backend now uses, and a retired
200
+ address tells you where it went.**
201
+
202
+ Class 5 is curated with three-digit addresses (`530` taking payment, `531`
203
+ refunds), and `verbs list` accepted only one or two digits, so a real address was
204
+ refused as malformed. It now accepts a class, a noun or a curated address (1–3
205
+ digits). An address the backend has retired used to return an empty list, which
206
+ reads exactly like "nothing lives here". It now returns the standard error envelope
207
+ (`410 address_retired`) with the replacement addresses in `did_you_mean` and a
208
+ `fix` you can run; when there are several candidates, `fix` is `solid map`, because
209
+ the CLI will not pick one for you. The examples in `verbs`, `map` and `context`
210
+ use the three-digit addresses.
211
+
212
+ ## [Unreleased]
213
+
214
+ **`solid apply` grows a memory: a lockfile, three-way drift, recorded pre-images
215
+ with rollback, and export — plus five more kinds.**
216
+
217
+ Every apply that writes now records `<manifest>.lock.json` beside the manifest:
218
+ server ids, the managed fields as applied, and a pre-image for every write.
219
+ Commit it with the manifest. `solid apply drift <file>` compares manifest, lock
220
+ and production and names what moved where — `live_changed` is the one that
221
+ matters (someone edited production outside git) and exits 1 for CI.
222
+ `solid apply <file> --strict` refuses to write over it. `solid apply rollback
223
+ <file>` inverts a recorded run most-recent-first and verifies the result
224
+ (ordered, not atomic — it says so). `solid apply export` writes the live tenant
225
+ as a manifest. `solid apply history` lists the runs.
226
+
227
+ New kinds: `kb` (by title), `service` (by title), `brand` (a singleton: one per
228
+ company, never pruned), and the two configure-only kinds below.
229
+
230
+ **`solid apply` reconciles agents and voice lines — configure, never create or
231
+ delete.**
232
+
233
+ Two new kinds. `agent` (keyed by `agent_type`) manages `autonomy_level`,
234
+ `is_enabled`, `llm_model_override`, `llm_provider_id` and `voice_enabled`;
235
+ `voice_line` (keyed by `phone_number`) manages routing mode, assigned agent,
236
+ greeting, voice config, business hours, voicemail, translation and active
237
+ state. Neither kind can be created by a manifest and `--prune` skips both: an
238
+ agent comes from the registry and a phone number is bought and released only
239
+ by the explicit commands that cost money.
240
+
241
+ The engine learned three things for this: an update can be split across the
242
+ endpoints that own each field (only a route with a changed field is called),
243
+ a kind can declare the only fields it manages (a write-only field that could
244
+ never compare equal is rejected instead of planning as drift forever), and a
245
+ read-side field can be renamed on write (`is_active` → `status`). The plan
246
+ summary now says `unsupported` rather than `immutable`, since "cannot be
247
+ created" is now one of the reasons.
248
+
249
+ ## [2.17.0] — 2026-09-02
250
+
251
+ **Deals report their own progress, quizzes actually branch, and the advertised
252
+ numbers are generated rather than typed.**
253
+
254
+ `solid deals` reads the deal and reports where it stands — offer and order
255
+ milestones, so an agent can answer "what is left on this?" without stitching
256
+ three calls together.
257
+
258
+ Quiz scoring walks the real branching path instead of a flattened list, so a
259
+ quiz that forks on an answer is scored the way a respondent actually experienced
260
+ it.
261
+
262
+ The legacy REST seam now closes wherever a verb exists: one vocabulary, one code
263
+ path, and no second way to do the same thing that drifts from the first.
264
+
265
+ `sync-counts` generates every advertised count instead of trusting a human to
266
+ walk twelve surfaces. It stamps the CLI's own paired phrasing and **refuses**
267
+ what it should not touch — a minimum version like `@2.10+`, a dated changelog
268
+ line, and WebMCP's separate measurement — printing each refusal so a clean run
269
+ can never hide one. `prepublishOnly` runs it in check mode, so a stale surface
270
+ stops a publish instead of shipping a wrong number.
271
+
272
+ Verb and command discovery is unchanged and still LIVE: the CLI reads
273
+ `/api/v1/agent/verbs` at call time, so a platform-side change reaches you without
274
+ a release.
275
+
276
+ ## [2.13.1] — 2026-06-15
277
+
278
+ **`solid whoami` now shows which company + permission level you're bound to.**
279
+
280
+ `solid whoami` / `solid auth status` add the bound **company name**, **role**,
281
+ and **tier** to the human-readable output (was company id only). The same
282
+ fields land in `--json` for agents. Best-effort lookups that never block the
283
+ status check.
284
+
285
+ ## [2.7.0] — 2026-05-15
286
+
287
+ **`solid webmcp ...` + `solid ucp ...` — agent transports go cross-runtime.**
288
+
289
+ Two verb families that surface Solid#'s in-browser MCP (WebMCP, W3C draft by
290
+ Microsoft + Google) and Universal Commerce Protocol (UCP, Google + retail
291
+ partners) directly from the CLI. Same JSON-LD verb registry on the backend
292
+ serves all three transports (stdio MCP via `@solidnumber/mcp`, WebMCP via
293
+ `navigator.modelContext` on every Solid# page, UCP via signed RFC 9421
294
+ buyer-agent requests). One registry, three transports — the CLI now drives
295
+ all three with symmetric command shapes.
296
+
297
+ ### Added — `solid webmcp ...`
298
+
299
+ - `solid webmcp manifest [--surface public|tenant-site|dashboard|portal|developer]` —
300
+ dump the WebMCP tool catalog for the current tenant (or a specific surface).
301
+ Defaults to dashboard surface; supports `--json` for agent consumption.
302
+ - `solid webmcp verb <name>` — inspect one verb: input schema, annotations,
303
+ platform-canonical IRI (`https://api.solidnumber.com/webmcp/tools/{name}`)
304
+ or tenant-scoped IRI for write verbs.
305
+ - `solid webmcp test <tool_name> [--input @payload.json] [--confirm]` —
306
+ dry-run a tool against the backend. Write tools require `--confirm`.
307
+ - `solid webmcp execute <tool_name> --input '<json>'` — server-side execute
308
+ with auto-generated idempotency key.
309
+ - `solid webmcp invocations [--limit N] [--tool <name>] [--status success|error|denied]` —
310
+ recent WebMCP tool invocations for the current tenant.
311
+ - `solid webmcp consent {list|grant|revoke}` — manage the 4-rung consent
312
+ ladder (once / session / permanent / deny) for write verbs.
313
+
314
+ ### Added — `solid ucp ...`
315
+
316
+ - `solid ucp manifest` — dump the tenant's signed UCP profile from
317
+ `/co/{id}/.well-known/ucp`.
318
+ - `solid ucp capabilities` — list capabilities exposed by the current tenant
319
+ (signed envelope, RFC 9421 ES256).
320
+ - `solid ucp consent {list|grant|revoke}` — manage UCP consent grants for
321
+ buyer-agent access (owner-only; tied to the same 4-rung ladder).
322
+
323
+ ### Why
324
+
325
+ Three transports for AI agents to drive Solid# — stdio MCP (`@solidnumber/mcp`
326
+ for AI editors), WebMCP (`navigator.modelContext` for in-browser agents), UCP
327
+ (signed buyer-agent commerce). Before v2.7 you could see the WebMCP/UCP
328
+ verbs by reading the registry source; now the CLI introspects them with the
329
+ same shape as `solid schema verbs --json`. Symmetric with how `solid mcp ...`
330
+ already worked.
331
+
332
+ ### Platform context
333
+
334
+ - 31 WebMCP verbs across 5 surfaces (public / tenant-site / dashboard /
335
+ portal / developer). Every solidnumber.com page registers the right
336
+ catalog at mount time; tenant subdomains register their own per-company
337
+ catalog.
338
+ - Public discovery file: `https://solidnumber.com/.well-known/webmcp.json`.
339
+ - Anonymous manifest endpoint:
340
+ `GET /api/v1/webmcp/public/manifest?company_id={id}&surface={public|tenant-site}`.
341
+ - Spec: https://webmachinelearning.github.io/webmcp/ (W3C Web ML Community
342
+ Group, authored by Microsoft + Google).
343
+ - Docs: https://solidnumber.com/docs/webmcp + https://solidnumber.com/docs/ucp.
344
+
345
+ ---
346
+
347
+ ## [2.6.0] — 2026-05-12
348
+
349
+ **`solid qchain ...` — Q-Chain substrate verification for external auditors.**
350
+
351
+ Four verbs that close the "insurance auditor walks in and verifies our
352
+ hash chain without trusting us" loop. JSON-first; the export shape is
353
+ the contract `/.well-known/qchain.json` publishes so an auditor can
354
+ recompute SHA-256 + verify Ed25519 signatures offline.
355
+
356
+ ### Added
357
+
358
+ - `solid qchain pubkey` — fetch the platform's verification metadata
359
+ (anonymous, no auth). Returns signer_id, Ed25519 public key, hash +
360
+ signature algorithm spec, canonical-row-fields contract.
361
+ - `solid qchain export [--since X --until Y]` — pull this tenant's
362
+ full substrate chain in canonical form. JSON always; the auditor
363
+ recomputes the hash + signature locally.
364
+ - `solid qchain verify` — server-side chain walk + sig verify. Sanity
365
+ check before the auditor runs their own offline verification.
366
+ - `solid qchain audit-key --label "Acme Insurance — 2026 SOC 2"` —
367
+ mint an API key scoped to `audit:substrate:read` only. Hand to the
368
+ auditor; they can hit export/verify/recent/summary and nothing else.
369
+
370
+ ### Why
371
+
372
+ Phase 4 substrate attestation (Q-Chain hash chain + Ed25519) is the
373
+ audit source of truth for every agent action and observed outcome.
374
+ Without these CLI verbs, an auditor (or AI agent diagnosing one) had
375
+ to either trust the platform's UI or SSH in and run SQL. Now they
376
+ call the CLI, get JSON, walk the chain locally.
377
+
378
+ Spec: `Owners-Manual/75-Qchain/08-EXTERNAL-AUDITOR-FLOW.md`.
379
+
380
+ ## [2.5.0] — 2026-05-12
381
+
382
+ **`solid tenant ...` — Tenant Activity Gate introspection from the CLI.**
383
+
384
+ Four new verbs let agents and operators query the platform-level
385
+ compute-budget gate that decides whether per-tenant Celery sweeps fire.
386
+ JSON-first; reason codes are stable for pattern-matching.
387
+
388
+ ### Added
389
+
390
+ - `solid tenant level` — your own company's current activity level
391
+ (HOT/WARM/COLD/DORMANT/BLOCKED), reason code, and all signals.
392
+ - `solid tenant gate-debug <company_id>` — admin-only full breakdown for
393
+ any tenant.
394
+ - `solid tenant active --min warm` — admin-only list of company IDs
395
+ passing a threshold (same set a Celery fan-out would enqueue).
396
+ - `solid tenant allowlist` — admin-only snapshot of the owner allowlist
397
+ (hardcoded IDs + `billing_exempt=true` SOLON partners).
398
+
399
+ ### Why
400
+
401
+ AI agents diagnosing "why didn't last night's sweep run for tenant X?"
402
+ needed a deterministic, JSON-first introspection path. Previously they
403
+ had to SSH into production and run a Python REPL. Now they can ask the
404
+ CLI and pattern-match on `reason`.
405
+
406
+ Spec: `Owners-Manual/06-Operations/TENANT-ACTIVITY-GATE/`.
407
+
408
+ ## [2.3.2] — 2026-04-29
409
+
410
+ **`solid ai` no longer prints "Refusing to write tenant data" when
411
+ launched outside a tenant directory.**
412
+
413
+ ### Changed
414
+
415
+ - `commands/ai.ts::refreshContext` now spawns
416
+ `solid context <flag> --if-tenant` instead of `solid context <flag>`.
417
+ When the AI is launched from `$HOME`, the platform monorepo, or any
418
+ directory without `.solid/manifest.json`, the child context refresh
419
+ silently exits 0 and the AI launches with whatever cached files
420
+ exist — instead of printing the loud guard banner followed by
421
+ "Context refresh failed — launching anyway."
422
+
423
+ ### Why
424
+
425
+ Same root cause as 2.3.1, second code path. `solid auth login` →
426
+ `solid ai` from `$HOME` hit the protected_root guard via the child
427
+ context refresh and surfaced the wrong-shape error to the user.
428
+ Two regression tests in `__tests__/commands/ai-options.test.ts`
429
+ lock in the spawnSync args for all three AI kinds (claude, cursor,
430
+ codex).
431
+
432
+ ### Migration
433
+
434
+ None — purely additive. Re-install: `npm i -g @solidnumber/cli` (or
435
+ `npm install -g .` from a local checkout).
436
+
437
+ ## [2.3.1] — 2026-04-29
438
+
439
+ **`--if-tenant` flag — fixes "Refusing to write tenant data" banner
440
+ on every `claude` launch outside a tenant directory.**
441
+
442
+ ### Added
443
+
444
+ - **`solid context --if-tenant`** — hook-mode flag. Silently exits 0
445
+ when the cwd is not a tenant directory (no `.solid/manifest.json`)
446
+ or sits inside a protected root (platform monorepo, `$HOME`,
447
+ `$HOME/.claude`). Mismatched-company manifests still fail loudly
448
+ because silent skip there would let stale/wrong context flow into
449
+ the next session.
450
+
451
+ - **`tenantManifestForHook(baseDir, companyId)`** in
452
+ `lib/tenant-guard.ts` — lenient guard for hook contexts. Returns
453
+ `null` (silent no-op) for `protected_root` + `missing`, exits 1
454
+ loud for `mismatch`. Six new unit tests lock in the contract.
455
+
456
+ ### Changed
457
+
458
+ - **SessionStart hook command** registered by `solid install`:
459
+ `solid context --claude --raw` → `solid context --claude --raw --if-tenant`.
460
+ - `solid install` migrates older hooks (`--quiet` pre-2.2, plain
461
+ `--raw` from 2.2–2.3.0) to the current command in place.
462
+ - `solid doctor env` recognizes the new command as the pass case;
463
+ older variants drift to `warn` with `solid install` as the hint.
464
+
465
+ ### Why
466
+
467
+ The 2.2–2.3.0 SessionStart hook printed `Refusing to write tenant
468
+ data inside the Solid# platform monorepo` (or `…to your home
469
+ directory`) every time a user launched Claude Code outside their
470
+ tenant repo. The tenant-guard was doing exactly its job — but the
471
+ guard's loud banner is for direct invocation (`solid context --claude`),
472
+ not background hooks fired in arbitrary cwds. `--if-tenant` is the
473
+ right shape for the hook: refresh when there's a tenant to refresh,
474
+ silent otherwise.
475
+
476
+ Real-world trigger: 2026-04-29, Adam launched `claude` from
477
+ `~/Desktop/Solid` (the platform monorepo, Role 1 — never gets
478
+ tenant writes) and saw the refusal banner stuck to the splash
479
+ screen. Confusing UX that would scare any first-time user.
480
+
481
+ ### Migration
482
+
483
+ Re-run `solid install`. Existing hooks migrate in place. No tenant
484
+ data changes.
485
+
486
+ **Propagation note (per CLAUDE-CONTEXT-CANONICAL-TRUTH § 650):**
487
+ Live — purely additive at the CLI layer. Old hook still works (just
488
+ noisy in non-tenant cwds); new hook is silent there. Existing
489
+ tenants need no re-seed.
490
+
491
+ ## [2.3.0] — 2026-04-29
492
+
493
+ **New flag: `solid graph --watch-actions` — live tail of tenant graph
494
+ mutations as agents fire.** SSE-driven, tenant-scoped via JWT. Pairs
495
+ with the new backend endpoint `/api/v1/cli/graph/watch-actions`.
496
+
497
+ ### Added
498
+
499
+ - **`solid graph --watch-actions`** — opens a Server-Sent Events
500
+ stream and renders each event as a one-line graph diff:
501
+
502
+ ```
503
+ [12:34:56] + Contact #42 (Ada Lovelace) by Sarah (agent)
504
+ [12:34:58] ~ Service #3 (Drain cleaning) price: 99 → 119
505
+ [12:35:01] + Order #99 (ORD-2026-099) fired by chain "New lead followup"
506
+ ```
507
+
508
+ Symbols: `+` create (green), `~` update (yellow), `-` delete (red),
509
+ `⚡` fire (cyan). Press Ctrl+C to stop.
510
+
511
+ - **`--watch-pattern <p>`** — narrows the subscription. Examples:
512
+ `order.*`, `contact.*`, `inventory.*`. Default `*` (all events).
513
+
514
+ - **`graph-watch-render.ts`** — pure renderer (`formatTime`,
515
+ `payloadLabel`, `payloadId`, `classifyEvent`, `renderWatchEvent`)
516
+ with 31 unit tests covering happy + edge paths.
517
+
518
+ ### Why
519
+
520
+ The second holy-shit moment after auto-flush. An agent fires an MCP
521
+ tool; the operator watches the resulting graph diff stream into the
522
+ terminal in real time. Every action is an edge; every response
523
+ updates a known node by IRI. Sprint:
524
+ `Owners-Manual/99-Active-Sprints/SPRINT-JSONLD-GRAPH-MOAT.md` § A+.3b.
525
+
526
+ ## [2.2.3] — 2026-04-27
527
+
528
+ **Bug fix — `solid completion install` produced an unparseable zsh script.**
529
+
530
+ ### Fixed
531
+
532
+ - **Apostrophes in command descriptions broke the generated zsh/bash
533
+ completion script.** The generator escaped `'` with `\'`, which is
534
+ valid in fish but invalid inside zsh/bash single-quoted strings (where
535
+ `\` is literal). The `solid ai` description (`...this company's
536
+ context...`) terminated its string early, surfacing as
537
+ `parse error near '>'` on every shell start after `solid completion
538
+ install`. Each shell now uses its own correct quoting:
539
+ - zsh/bash: `'\''` (close, escaped literal, reopen) — POSIX-portable
540
+ - fish: `\'` (fish's actual single-quote escape) — unchanged
541
+
542
+ ### Added
543
+
544
+ - **`completion.test.ts`** — runs `zsh -n` / `bash -n` against the
545
+ generated scripts to lock the regression. Catches future quoting bugs
546
+ before they ship.
547
+
548
+ **Action for existing users:** re-run `solid completion install` (or
549
+ `solid setup`) after upgrading. Reload the shell.
550
+
551
+ ## [2.2.2] — 2026-04-27
552
+
553
+ **Hardening release for the magic-link install path.**
554
+ No public CLI surface change — every command behaves the same — but
555
+ several quiet correctness + security wins for the `--install-token` flow
556
+ shipped in 2.2.0/2.2.1.
557
+
558
+ ### Added
559
+
560
+ - **`SOLID_INSTALL_TOKEN` env var as the preferred input** for
561
+ `solid setup`. argv (`--install-token <token>`) still works, but
562
+ the CLI now warns when used because tokens on argv are visible in
563
+ process listings (`ps -ef`) for the lifetime of the process.
564
+ install.sh already sets the env var; users + automation should
565
+ prefer it directly.
566
+ - **`SOLID_INSTALL_TOKEN_TIMEOUT_MS` env override** for the exchange
567
+ call. Production stays at 30s; tests can drop to 200ms. Clamped to
568
+ `[50ms, 120s]` so a misconfigured shell can't disable the safety.
569
+ - **3 regression tests** locking the post-2.2.1 fixes (timeout path,
570
+ token-byte leak prevention, anti-leak prefix phrasing).
571
+ - **Cross-repo contract test** — fetches the live `install.sh` and
572
+ asserts (a) it references `SOLID_INSTALL_TOKEN`, (b) it uses the
573
+ same prefix the CLI validates. Network-gated via
574
+ `SOLID_RUN_NETWORK_TESTS=1`. Run on a daily cron — when it fails,
575
+ the cross-repo contract has drifted.
576
+
577
+ ### Changed
578
+
579
+ - The timeout error message now reflects the actual configured timeout
580
+ instead of a hardcoded "30s" string.
581
+
582
+ ## [2.2.1] — 2026-04-27
583
+
584
+ **Quiet fixes on top of 2.2.0 — no public CLI behavior change.**
585
+ Backfilled CHANGELOG entry; the version was published without one.
586
+
587
+ ### Fixed
588
+
589
+ - **Hash corruption on partial download** — install scripts now use
590
+ `rm -f` + a `downloaded=false` flag + `[ ! -s "$file" ]` guard so
591
+ a half-downloaded tarball can't pass verification.
592
+ - **Indefinite hang on unreachable backend** — `solid setup
593
+ --install-token` now uses `AbortSignal.timeout(30_000)` and
594
+ discriminates `TimeoutError` / `AbortError` from generic network
595
+ errors in the failure detail.
596
+ - **User-supplied token bytes leaking into stderr** — bad-prefix
597
+ validation no longer echoes the supplied value; the message reads
598
+ `--install-token must start with "ist_" (got something else)`.
599
+ - **Workflow re-run safety** — auto-bump CI uses `git checkout -B` +
600
+ `--force-with-lease` so a re-run on the same tag doesn't choke on
601
+ a stale local branch.
602
+
603
+ ### CI
604
+
605
+ - Added Node 20 + 22 matrix (dropped 18); `npm audit --omit=dev` +
606
+ `audit-ci`; secret-scan; company-isolation grep;
607
+ version-consistency check (`pkg.version === solid --version`);
608
+ tarball install smoke; and a static dep verifier
609
+ (`scripts/verify-runtime-deps.mjs`) catching the v2.1.0 regression
610
+ class.
611
+
612
+ ## [2.2.0] — 2026-04-26
613
+
614
+ **Phase 3 of `SPRINT-CLI-ONE-COMMAND-ONBOARDING` — magic-link auth.**
615
+ A logged-in dashboard user mints a single-use `ist_*` token at
616
+ `/dashboard/install-command`, embeds it in their install command,
617
+ and the CLI redeems it for real auth in one paste — no browser
618
+ dance, no second login.
619
+
620
+ ### Added
621
+
622
+ - **`solid setup --install-token <ist_*>`** — redeem an install
623
+ token from the dashboard for a real CLI session. Single-use,
624
+ 5-minute TTL, scope-bound to the minting user's company. Skips
625
+ the browser auth step entirely.
626
+ - **install.sh + install.ps1** forward the `SOLID_INSTALL_TOKEN`
627
+ env var to `solid setup`, enabling one-paste install + auth:
628
+ ```
629
+ curl -fsSL https://solidnumber.com/install.sh | SOLID_INSTALL_TOKEN=ist_xxx sh
630
+ ```
631
+ - **Homebrew tap** at `Solidnumber/homebrew-tap` —
632
+ `brew install solidnumber/tap/cli` is live.
633
+ - **Scoop bucket** at `Solidnumber/scoop-bucket` —
634
+ `scoop install solidnumber/solid` is live.
635
+ - Auto-bump CI workflows in `.github/workflows/` open PRs to
636
+ both registries on every `v*` tag.
637
+
638
+ ### Notes
639
+
640
+ - Backend ships two new endpoints (`POST /api/v1/auth/install-token`
641
+ and `/install-token/exchange`). Token exchange is CSRF-exempt
642
+ because the token IS the auth — replays return 401 + audit event.
643
+ - winget is in the backlog pending a self-contained Windows binary.
644
+ Tracked at `Owners-Manual/98-Backlog/CLI-WINGET-NATIVE-WINDOWS.md`.
645
+
646
+ ## [2.1.1] — 2026-04-26
647
+
648
+ **Critical fix.** v2.1.0 was published without `lighthouse` declared
649
+ as a runtime dependency — `solid audit a11y|perf|mobile <slug>`
650
+ would fail with `Cannot find module 'lighthouse'` for every fresh
651
+ install. Caught by deploy gate; v2.1.1 ships the dep correctly.
652
+
653
+ ### Fixed
654
+
655
+ - **`lighthouse@^13.1.0` now declared in `dependencies`** of
656
+ `@solidnumber/cli/package.json` (was only in the parent monorepo's
657
+ `package.json` due to `npm install` running from the wrong cwd).
658
+ Fresh installs of v2.1.1 now have lighthouse available; v2.1.0
659
+ installs need to upgrade.
660
+
661
+ ### Security
662
+
663
+ - **Added `overrides.minimatch: ^9.0.7`** to force a non-vulnerable
664
+ `minimatch` in the dep tree. lighthouse → @sentry/node → minimatch
665
+ pulled in `9.0.3` which has 3 ReDoS advisories
666
+ (GHSA-3ppc-4f35-3m26, GHSA-7r86-cg39-jmmj, GHSA-23c5-xmqv-rm74).
667
+ `npm audit --omit=dev`: 0 vulnerabilities.
668
+
669
+ ## [2.1.0] — 2026-04-25
670
+
671
+ **Agents can now see what they ship.** Closes Phase 1 of
672
+ SPRINT-CLI-AGENT-CAN-SHIP — the four highest-leverage visible-gap
673
+ fixes. The agent's read graph + write graph + visual outcome are now
674
+ inspectable from the CLI without reaching for a browser.
675
+
676
+ ### Added
677
+
678
+ - **`solid render <slug> --png`** — headless screenshot of any page
679
+ or breakpoint. Returns a path the agent can attach to its reasoning.
680
+ Supports named breakpoints (`mobile`, `tablet`, `desktop`, `full`),
681
+ custom `--viewport WxH`, `--full-page`, `--wait <ms>`, multiple
682
+ breakpoints in one call, `--json` output, `--out <dir>` override.
683
+ - **`solid render --install`** — one-time Chromium download (~150MB)
684
+ into `~/.solid/chromium/`. Auto-prompted on first `render`/`audit`
685
+ invocation in interactive contexts; non-interactive contexts (CI,
686
+ agents) get a clear "run `solid render --install`" hint or
687
+ auto-install via `SOLID_AUTO_INSTALL=1`.
688
+ - **`solid schema blocks --examples`** — canonical example JSON per
689
+ block type. Agents copy/paste; no inferring from the source. Uses
690
+ domain-aware placeholders (headline → marketing copy, image →
691
+ placehold.co, cta_url → /signup, enums → first sane value). Hand-
692
+ written examples in the schema win over synthesized ones.
693
+ `--type <name>` for one block; `--json` for the full
694
+ `{examples, count}` envelope.
695
+ - **`solid audit a11y|perf|mobile <slug>`** — Lighthouse-driven page
696
+ quality scoring on top of `solid seo audit`. Supports
697
+ `--threshold <0..100>` (exit 1 if score below — CI-gateable),
698
+ `--keep-raw`, `--json`. Mobile is a form-factor toggle (throttled
699
+ network + viewport). Reuses the same Chromium that powers
700
+ `solid render`.
701
+ - **`Owners-Manual/45-Developer-CLI/CUSTOM-MODULES.md`** — canonical
702
+ agent-friendly answer to "what IS a custom module?" File layout,
703
+ lifecycle, where each piece runs, multi-tenancy guarantee, and a
704
+ side-by-side comparison with industry templates so agents stop
705
+ confusing the two.
706
+
707
+ ### Dependencies
708
+
709
+ - **`puppeteer-core@^24`** — runtime browser automation (~9 MB).
710
+ - **`@puppeteer/browsers@^2`** — programmatic Chromium installer.
711
+ - **`lighthouse@^13`** — quality auditing.
712
+
713
+ Total install footprint added: ~30 MB. Chromium itself is downloaded
714
+ on first use (~150 MB), not bundled — most CLI users never run
715
+ `render`/`audit` and pay zero browser cost.
716
+
717
+ `npm audit --omit=dev`: 0 vulnerabilities.
718
+
719
+ ### Sprint context
720
+
721
+ This is **Phase 1** of SPRINT-CLI-AGENT-CAN-SHIP — the subset
722
+ shippable in ~3 days as one cohesive release. Phase 2 covers the
723
+ heavier items: `solid serve --proxy`, `solid pages diff --visual`,
724
+ `solid pages translate`, `solid pages preview --shareable-url`,
725
+ integration manifests + OAuth-test + typed clients, app templates +
726
+ data model + marketplace publish. Tracked in
727
+ `Owners-Manual/98-Backlog/`.
728
+
729
+ ### Verification
730
+
731
+ - 921/921 tests green (888 → 921, +33 unit + integration tests).
732
+ - Lighthouse extract logic, browser install resolution, viewport
733
+ parsing, breakpoint resolution, URL construction, output filename
734
+ generation, block-example synthesis (placeholders, types, enums,
735
+ hand-written precedence) all covered.
736
+ - `solid schema blocks --examples --json` smoke-tested in CI.
737
+
738
+ ## [2.0.1] — 2026-04-25
739
+
740
+ **A+.7 — top-15 command surface smoke coverage.** Catches the most-
741
+ common regression class: "user installs the CLI, types
742
+ `solid <cmd> --help`, gets a stack trace instead of help text."
743
+
744
+ ### Added
745
+
746
+ - **23 new smoke tests** in `__tests__/integration/smoke.test.ts`,
747
+ bringing the suite from 12 → 35 tests:
748
+ - `--help` render checks for kb, services, clone, audit, doctor,
749
+ status, schema, mcp, chains, domains, insights, nest, dev, health,
750
+ context, graph, push (each with hand-picked load-bearing tokens)
751
+ - Real-shape tests: `schema verbs --json` parses + has 50+ verbs;
752
+ `graph --offline` exits 1 with no local file; `graph --query`
753
+ without arg is usage error; `--dry-run` + `--queue` global flags
754
+ are parseable; `completion` works for zsh + bash + fish.
755
+ - 858/858 tests green (was 835).
756
+
757
+ ### Why this matters for the S-grade goal
758
+
759
+ Top-20 CLIs are top-20 partly because they don't crash on
760
+ first-touch. Every regression class our existing suite caught
761
+ (silent failures, exit codes, secret-scanner false positives,
762
+ package-lock drift) was a per-incident fix. Smoke coverage is the
763
+ preventive layer: every command's help renders without crashing,
764
+ verified on every CI run.
765
+
766
+ ### What's still uncovered
767
+
768
+ - Mocked-backend E2E tests (assert exit code + stdout shape against
769
+ recorded backend responses) — still ~3-5 days of work for full
770
+ top-20 backend coverage.
771
+ - The other ~50 commands without test files (most are low-traffic
772
+ or already covered by lib-level unit tests).
773
+
774
+ ## [2.0.0] — 2026-04-25
775
+
776
+ **v2.0.0 — agent-ready by default.** The structured JSON error
777
+ envelopes shipped behind `SOLID_JSON_V2=1` since 1.10.0 are now ON
778
+ by default. Every `--json` invocation gets the structured envelope
779
+ without ceremony. Closes the v2.0.0 default-flip on the SPRINT-CLI-V2-
780
+ AGENT-READY sprint.
781
+
782
+ ### Breaking change
783
+
784
+ - **Default `--json` shape now ships the structured error envelope.**
785
+ When a `--json` invocation hits an error, stdout receives:
786
+
787
+ {
788
+ "error": {
789
+ "code": "NOT_FOUND",
790
+ "status": 404,
791
+ "message": "...",
792
+ "hint": "...",
793
+ "docs_url": "...",
794
+ "scope": "...",
795
+ "feature": "...",
796
+ "upgrade_to": "...",
797
+ "request_id": "..."
798
+ }
799
+ }
800
+
801
+ In 1.x this was opt-in via `SOLID_JSON_V2=1`. AI agents and
802
+ scripts that wanted the structured shape had to set the env var.
803
+ In 2.0.0 it's the default — agents work out of the box.
804
+
805
+ ### Backward compatibility
806
+
807
+ - **Opt-out: `SOLID_LEGACY_ERRORS=1`** restores the 1.x prose-style
808
+ errors for any script that depends on the old shape.
809
+ - **`SOLID_JSON_V2=1` is still honored** (it just no longer matters,
810
+ since the default is already on). Scripts that explicitly opt in
811
+ need no changes.
812
+ - **List envelope normalization** (the `{items, total, page}` shape
813
+ added in 1.10) is unchanged — already on by default; opt-out via
814
+ `SOLID_LEGACY_LIST_SHAPES=1` still works.
815
+
816
+ ### Why now
817
+
818
+ The agent-ready features (T1.1 structured errors, T1.2 dry-run
819
+ validation, T1.3 schema verbs, T1.4 list envelopes, T1.5 MCP serve,
820
+ T1.6 doctor scopes) shipped in 1.10.0 (2026-04-15) but stayed
821
+ gated behind `SOLID_JSON_V2=1`. AI agents that didn't know to set
822
+ the env var got the legacy shape. Flipping to default-on closes the
823
+ "why does the same CLI behave differently for different agents"
824
+ gap and is the single biggest functionality grade unlock — it's
825
+ what makes the agent-ready sprint actually visible.
826
+
827
+ ### Verification
828
+
829
+ - 835/835 tests green. The legacy-prose path now requires explicit
830
+ `SOLID_LEGACY_ERRORS=1`; the new default test covers the flipped
831
+ behavior; backward-compat path with `SOLID_JSON_V2=1` still
832
+ yields the structured envelope.
833
+
834
+ ## [1.26.0] — 2026-04-25
835
+
836
+ **Full SPARQL 1.1 (online).** Closes A+.5b of SPRINT-JSONLD-GRAPH-MOAT.md.
837
+ The CLI's offline BGP matcher handles SELECT + multi-pattern joins;
838
+ this release adds `--server` to route to the backend's full SPARQL
839
+ endpoint for OPTIONAL, FILTER, property paths, UNION, GROUP BY,
840
+ ORDER BY, LIMIT.
841
+
842
+ ### Added
843
+
844
+ - **`solid graph --query <sparql> --server`** — POSTs the query to
845
+ `/api/v1/cli/context/query`. The backend uses rdflib's full SPARQL
846
+ 1.1 implementation. Same output shape as the offline matcher
847
+ (`{vars, bindings}`) so the table render works identically.
848
+
849
+ ### Backend
850
+
851
+ - New endpoint `POST /api/v1/cli/context/query` shipped in
852
+ `solid-backend` 1dc7306. Tenant scope is JWT-derived (cross-tenant
853
+ query is impossible by construction). Response carries both the
854
+ SPARQL 1.1 spec shape (`head.vars` + `results.bindings` with
855
+ type-tagged terms) AND the CLI-friendly flat shape.
856
+
857
+ ### Verification
858
+
859
+ - 835/835 CLI tests green (1 new flag-parse test).
860
+ - 18/18 backend RDF-suite tests green (7 new SPARQL tests covering
861
+ SELECT, OPTIONAL, FILTER, URI classification, empty/invalid query
862
+ rejection, zero-match).
863
+
864
+ ## [1.25.0] — 2026-04-25
865
+
866
+ **Auto-detect connectivity.** Closes A+.6b of SPRINT-JSONLD-GRAPH-MOAT.md.
867
+ The "holy shit" moment: lose wifi mid-mutation, the CLI auto-queues
868
+ without erroring; regain wifi, the next successful mutation auto-replays
869
+ the entire queue. No flag, no ceremony — it just works.
870
+
871
+ ### Added
872
+
873
+ - **Auto-queue on network failure.** When a mutation hits
874
+ `ECONNREFUSED` / `ENOTFOUND` / `ECONNABORTED` / `ECONNRESET` /
875
+ `EAI_AGAIN` / "Network Error", the api-client interceptor
876
+ intercepts the failure and writes the mutation to `.solid/queue/`
877
+ (same JSON-LD format as explicit `--queue` mode). User sees:
878
+
879
+ [QUEUED — offline] connection failed; mutation saved.
880
+ Replay automatically on the next online command, or run: solid push --flush
881
+
882
+ The mutation's success path runs as if the server returned 202.
883
+ Caller code doesn't need to know.
884
+
885
+ - **Auto-flush on next online mutation.** A successful mutation
886
+ response proves connectivity. The api-client response interceptor
887
+ drains the queue silently in the background. User sees:
888
+
889
+ [auto-flush] replayed 4 queued mutations.
890
+
891
+ Re-entry is guarded so the replay's own success doesn't trigger
892
+ another flush attempt. Best-effort: a failure on one queued
893
+ mutation leaves it in queue; the rest still get a chance.
894
+
895
+ ### Excluded
896
+
897
+ - `/auth/login` and `/auth/refresh` are NOT auto-queued — replaying
898
+ them on reconnect would loop or create duplicate sessions.
899
+ - Queue mode (`--queue`) supersedes auto-flush: explicitly armed
900
+ offline mode never triggers auto-replay.
901
+
902
+ ### Verification
903
+
904
+ - `npm test`: 834/834 green (24 unit tests on the queue alone — 18
905
+ for the file format + 6 for auto-flush behavior).
906
+ - Re-entry guard: a recursive auto-flush attempt during an in-flight
907
+ flush returns zero-stats instead of double-dispatching. Verified
908
+ by test.
909
+ - Tested edge cases: empty queue is a no-op; failed dispatches stay
910
+ in queue for retry; chronological order preserved.
911
+
912
+ ## [1.24.0] — 2026-04-25
913
+
914
+ **Offline mutation queue.** Closes A+.6 (happy path) of
915
+ SPRINT-JSONLD-GRAPH-MOAT.md. Read side was already offline via
916
+ `.claude/solid-context.jsonld`; write side now is too. Field agents,
917
+ travel, air-gapped demos.
918
+
919
+ ### Added
920
+
921
+ - **`--queue` global flag** (also `SOLID_OFFLINE_QUEUE=1` env var) —
922
+ arms offline mode. With it on, every mutation (POST/PUT/PATCH/DELETE)
923
+ is written to `.solid/queue/<utc>-<uuid>.jsonld` instead of being
924
+ dispatched. The mutation file is itself a JSON-LD document
925
+ (`@type: solid:QueuedMutation`) so `solid graph` over the queue
926
+ directory can introspect what's pending.
927
+ - **`solid push --flush`** — replay every queued mutation in
928
+ chronological order. Idempotency keys travel with each mutation so
929
+ retries are safe. Successful files are deleted; failed files stay
930
+ in queue for the next attempt.
931
+ - **`lib/offline-queue.ts`** — pure module: `enqueue`, `readQueue`,
932
+ `deleteQueued`, `queueSize`, plus the mode-toggle plumbing that
933
+ mirrors the dry-run pattern.
934
+
935
+ ### Behavior
936
+
937
+ - Reads pass through unchanged (the read side already supports offline).
938
+ - Queue mode supersedes dry-run: if both armed, queue wins (dry-run
939
+ is fire-and-forget, queue preserves state for replay).
940
+ - The api-client interceptor (same layer as `--dry-run`) intercepts
941
+ before any network I/O, so `--queue` works with zero connectivity.
942
+ - File names are `<UTC-timestamp>-<UUID>.jsonld` so a directory
943
+ listing IS chronological order.
944
+ - `readQueue` skips malformed files with a stderr warning rather
945
+ than failing — one bad file shouldn't block the rest from
946
+ replaying.
947
+
948
+ ### What's NOT shipped (deferred to A+.6b)
949
+
950
+ - **Conflict resolution.** If the queued mutation conflicts with
951
+ current server state on replay (e.g., the resource was deleted
952
+ while you were offline), v1 surfaces the backend's error and
953
+ preserves the queue file. v1.1 will add a `solid:conflictsWith`
954
+ IRI in the response and an interactive resolver.
955
+ - **Idempotency-Key header send.** Each queue file has an
956
+ idempotencyKey field; v1 doesn't yet thread it as an HTTP header
957
+ through `apiClient.{post,put,patch,delete}` because per-call
958
+ headers aren't in the v1 wrapper signature. The key still serves
959
+ as the de-dup token in the file format for client-side
960
+ deduplication.
961
+ - **Auto-detect connectivity.** v1 requires explicit `--queue`. v1.1
962
+ could fall back to the queue when an axios `ECONNREFUSED` /
963
+ network error fires.
964
+
965
+ ### Verification
966
+
967
+ - `npm test`: 828/828 green (18 unit + 3 integration tests).
968
+ - File format is a valid JSON-LD document (verified via the
969
+ `solid graph --offline` walker on a hand-placed queue dir).
970
+
971
+ ## [1.23.0] — 2026-04-25
972
+
973
+ **SPARQL BGP query.** Closes A+.5 of SPRINT-JSONLD-GRAPH-MOAT.md (offline
974
+ half) — answer "show me every Service provided by companies on builder
975
+ tier" as a graph query, not an array join.
976
+
977
+ ### Added
978
+
979
+ - **`solid graph --query <sparql>`** — minimal SPARQL Basic Graph Pattern
980
+ engine, runs in-process against the loaded graph. Works offline (the
981
+ bundled `.claude/solid-context.jsonld`) and remote (auto-fetches via
982
+ the existing `loadDocument` path). Output: a table by default,
983
+ `--json` emits the structured `{vars, bindings}` shape (SPARQL 1.1
984
+ results spec).
985
+ - **`lib/sparql-bgp.ts`** — pure functions:
986
+ - `parseQuery(text)` → typed AST with PREFIX expansion
987
+ - `materializeTriples(doc)` → flat (s, p, o) triples
988
+ - `runQuery(query, doc)` → de-duplicated bindings
989
+ - `query(text, doc)` → convenience parse-and-run
990
+
991
+ ### Supported
992
+
993
+ - `SELECT ?var ?var WHERE { ?s ?p ?o . ?s2 ?p2 ?o2 . }`
994
+ - `SELECT *` (binds every variable in WHERE)
995
+ - `PREFIX foo: <http://...>` plus always-on `schema:`, `solid:`, `rdf:`
996
+ - `a` shorthand for `rdf:type`
997
+ - IRI terms, prefixed names, string literals (`"..."`), numeric literals
998
+ - Multi-pattern joins (variable bindings carry forward)
999
+ - List-valued JSON-LD predicates expand to multiple matches
1000
+ - Triple terminator `.` properly handled inside `<...>` IRIs and quoted
1001
+ literals
1002
+ - Result rows de-duplicated (DISTINCT-by-default for projection)
1003
+
1004
+ ### Not supported (use the RDF export + a real SPARQL engine)
1005
+
1006
+ - `OPTIONAL { ... }`
1007
+ - `FILTER (...)`
1008
+ - Property paths (`?s schema:knows+ ?o`)
1009
+ - `UNION` / `MINUS`
1010
+ - `GROUP BY` / `ORDER BY` / `LIMIT` (pipe through `head` / `sort`)
1011
+ - Named graphs / `GRAPH ?g { ... }`
1012
+
1013
+ For those: `solid graph --dump nquads | apache-jena-fuseki tdbloader2`
1014
+ and run full SPARQL there.
1015
+
1016
+ ### Verification
1017
+
1018
+ - `npm test`: 807/807 green (18 unit + 4 integration tests).
1019
+ - 10 canned queries from the spec all green: tier holders, services
1020
+ by category, agents handling a category, webhooks firing chains,
1021
+ type counts, services by provider, KB by category, chained joins,
1022
+ predicate-counts, zero-match.
1023
+ - Plus join-semantics (var bound twice must agree), DISTINCT
1024
+ projection, list-valued predicates, and parser sanity.
1025
+
1026
+ ## [1.22.0] — 2026-04-25
1027
+
1028
+ **Graph diff.** Closes A+.4 of SPRINT-JSONLD-GRAPH-MOAT.md — answer
1029
+ "what changed in my tenant since X" structurally, not by log-grepping.
1030
+
1031
+ ### Added
1032
+
1033
+ - **`solid graph --diff <baseline>`** — load a baseline `.jsonld` file,
1034
+ compare against the currently loaded graph (offline file or remote
1035
+ fetch), report added / removed / modified nodes with per-predicate
1036
+ operations in JSON-Patch style. Pretty-prints by default; `--json`
1037
+ emits the structured report.
1038
+ - **Exit code is the diff signal.** 0 if graphs are identical, 1 if
1039
+ any change. Lets you gate CI on graph stability:
1040
+ `solid graph --diff baseline.jsonld --offline || echo "tenant drifted"`.
1041
+ - **`lib/graph-diff.ts`** — pure function `diff(before, after)` so
1042
+ consumers (eventually `solid graph --since 2d`) can reuse the
1043
+ primitive.
1044
+
1045
+ ### Behavior
1046
+
1047
+ - Identity is `@id`. Anonymous nodes (no `@id`) are skipped — diffing
1048
+ them produces phantom add+remove churn that's never useful.
1049
+ - `@type` array order is normalized — reordering a node's types is
1050
+ not a modification.
1051
+ - Edge changes appear as predicate changes on the source node (every
1052
+ JSON-LD edge is a predicate value), not as separate edge entries.
1053
+ - Stable output ordering: nodes sorted by `@id`, predicates sorted
1054
+ alphabetically. Deterministic for snapshots and CI gates.
1055
+
1056
+ ### Verification
1057
+
1058
+ - `npm test`: 785/785 green (11 lib + 3 integration tests).
1059
+ - 8 acceptance scenarios from the spec all green: zero-diff,
1060
+ add/remove × node + edge, modify (rename, predicate add, predicate
1061
+ remove), plus tenant-isolation and @type-reorder invariants.
1062
+
1063
+ ## [1.21.0] — 2026-04-25
1064
+
1065
+ **RDF export.** Closes A+.2 of SPRINT-JSONLD-GRAPH-MOAT.md — the
1066
+ tenant graph is now ingestable into any RDF store (Neo4j, Fuseki,
1067
+ Blazegraph, GraphDB, Neptune) without going through JSON-LD.
1068
+
1069
+ ### Added
1070
+
1071
+ - **`solid graph --dump nquads`** — converts the loaded JSON-LD context
1072
+ to N-Quads and prints to stdout. Pipe to a file, a graph store
1073
+ ingester, or `rdfox load` / `tdbloader`. Works **offline** (uses
1074
+ the local `.claude/solid-context.jsonld` and the bundled `jsonld`
1075
+ npm lib) so AI agents bound to a tenant dir can dump without
1076
+ network.
1077
+ - **`solid graph --dump turtle`** — same idea, Turtle format.
1078
+ Currently requires the backend (it fetches `?format=turtle` from
1079
+ `/api/v1/cli/context`); offline turtle errors with a hint pointing
1080
+ to nquads. Adding offline turtle is a future patch — N-Quads is
1081
+ the canonical lossless format every RDF store accepts, so this
1082
+ doesn't block any real workflow.
1083
+
1084
+ ### Dependencies
1085
+
1086
+ - **Added `jsonld@^9.0.0`** as a runtime dep (~2 MB unpacked). This
1087
+ is the canonical JSON-LD reference implementation; we use its
1088
+ `toRDF()` for offline conversion. `npm audit --omit=dev`: 0 vulns.
1089
+
1090
+ ### Verification
1091
+
1092
+ - `npm test`: 771/771 green (5 new in `graph-dump.test.ts`).
1093
+ - `tsc --noEmit`: clean.
1094
+ - Round-trip verified: every IRI from a fixture JSON-LD doc survives
1095
+ `--dump nquads` as either subject or object position.
1096
+
1097
+ ## [1.20.1] — 2026-04-25
1098
+
1099
+ **License reconciliation.** Closes Phase 0.3 of the AI Stack
1100
+ Sovereignty sprint — three drifted spellings of the same license,
1101
+ one of them ("MIT" in the README footer) actively wrong.
1102
+
1103
+ ### Fixed
1104
+
1105
+ - **`package.json` license: `BSL-1.1` → `BUSL-1.1`** — the SPDX
1106
+ license list standardized "Business Source License 1.1" to
1107
+ identifier `BUSL-1.1` in 2023. The non-standard `BSL-1.1` rendered
1108
+ as "Custom" on npm and broke GitHub's license detection. Now
1109
+ recognized correctly by tooling (npm, FOSSA, Snyk, GitHub).
1110
+ - **README footer: `## License\n\nMIT` → BSL-1.1 with plain-English
1111
+ summary.** The footer was outright wrong (claimed MIT) while
1112
+ `package.json` and `LICENSE` both correctly said BSL-1.1. The new
1113
+ section names what's permitted (read source, build on the SDK,
1114
+ run for your own business, ship internal tools), what's not
1115
+ (competing commercial CLI for AI-powered business infrastructure),
1116
+ and the 2030-04-14 conversion to Apache 2.0.
1117
+
1118
+ The `LICENSE` file (full BSL-1.1 text + additional use grant) was
1119
+ already correct; this patch only fixes the references.
1120
+
1121
+ ### Verification
1122
+
1123
+ - `npm test`: 766/766 green.
1124
+ - `npm view @solidnumber/cli@1.20.1 license` will return `BUSL-1.1`
1125
+ after publish.
1126
+
1127
+ ## [1.20.0] — 2026-04-25
1128
+
1129
+ **CI green patch.** Closes Phase 0.2 of the AI Stack Sovereignty
1130
+ sprint — five red CI runs in a row, two distinct root causes.
1131
+
1132
+ ### Breaking
1133
+
1134
+ - **Drop Node.js 18 support.** Node 18 reached EOL on 2025-04-30 and
1135
+ several runtime deps (notably `inquirer@9`, ESM-only) no longer
1136
+ load via CommonJS `require()` on Node 18, producing
1137
+ `ERR_REQUIRE_ESM` on every command. Minimum is now Node 20.
1138
+ `engines.node` updated to `>=20.0.0`. Users on Node 18 should
1139
+ upgrade to Node 20 LTS or 22 LTS.
1140
+
1141
+ ### Fixed
1142
+
1143
+ - **CI matrix: Node 18 dropped, kept 20 + 22.** Was failing
1144
+ `test (18)` because of the ESM/CJS interop break described above.
1145
+ - **CI security job: `npm audit --omit=dev`.** Was failing on the
1146
+ `@typescript-eslint/*` dev-only advisory chain — vulns shielded
1147
+ from user installs since dev deps don't ship to npm. Now matches
1148
+ the `audit:prod` script in `prepublishOnly`. Same flag passed to
1149
+ `audit-ci` (`--skip-dev`).
1150
+
1151
+ ### Verification
1152
+
1153
+ - 766/766 tests green locally.
1154
+ - `npm audit --omit=dev`: 0 vulns.
1155
+ - CI matrix builds + tests on Node 20 and 22.
1156
+
1157
+ ## [1.19.5] — 2026-04-24
1158
+
1159
+ **Truth-in-advertising patch.** Closes Phase 0.9 of the AI Stack
1160
+ Sovereignty sprint — the README banner numbers were stale and
1161
+ undercounting the actual CLI surface by ~3×.
1162
+
1163
+ ### Fixed
1164
+
1165
+ - **README banner now matches the program registry.** Was: "86
1166
+ top-level commands, 200+ subcommands". Reality: 96 top-level,
1167
+ 595 subcommands. Updated to "96 top-level commands, 500+
1168
+ subcommands".
1169
+
1170
+ ### Added
1171
+
1172
+ - **`marketing-numbers-drift.test.ts`** — runs `dist/index.js schema
1173
+ verbs --json` against the built CLI and asserts the README banner
1174
+ is in sync with the registry. Top-level number must match exactly;
1175
+ subcommand count must be `≤ actual && ≥ floor(actual/100)*100`.
1176
+ Drift now fails CI before publish.
1177
+
1178
+ ### Verification
1179
+
1180
+ - `npm test`: 766/766 green (two new tests).
1181
+ - README banner now matches `solid schema verbs --json` output.
1182
+
1183
+ ## [1.19.4] — 2026-04-24
1184
+
1185
+ **Honesty patch.** Closes Phases 0.6 and 0.10 of the AI Stack
1186
+ Sovereignty sprint — eliminates the last placeholder assertion in the
1187
+ critical-security test file and brings dev dep versions current.
1188
+
1189
+ ### Fixed
1190
+
1191
+ - **`company-isolation.test.ts` no longer contains `expect(true).toBe(true)`**
1192
+ (Phase 0.6) — the placeholder for "company switch requires a new
1193
+ JWT" is replaced with two real source-level contract assertions:
1194
+ one verifying that `commands/switch.ts` writes BOTH new tokens
1195
+ AND `companyId` back to config, and one verifying that the
1196
+ `companySwitch` API method's return type still includes
1197
+ `access_token` and `refresh_token`. A future refactor that breaks
1198
+ the new-JWT contract (e.g., dropping refresh_token, or only
1199
+ changing `X-Company-ID` while keeping the old JWT) will fail this
1200
+ test instead of silently regressing.
1201
+
1202
+ ### Changed
1203
+
1204
+ - **`@types/node` 20.19.33 → 20.19.39, `ts-jest` 29.4.6 → 29.4.9**
1205
+ (Phase 0.10) — within-semver dev dep updates. Major-version
1206
+ bumps for `chalk` / `ora` / `inquirer` / `commander` / `eslint` /
1207
+ `jest` / `typescript` are deferred to a dedicated migration sprint
1208
+ (ESM-only conversions and breaking API changes; not safe in a
1209
+ hygiene patch).
1210
+
1211
+ ### Verification
1212
+
1213
+ - `npm test`: 764/764 green (one new test added in 0.6).
1214
+ - `npm audit --omit=dev`: 0 vulns.
1215
+ - `tsc --noEmit`: clean.
1216
+
1217
+ ## [1.19.3] — 2026-04-24
1218
+
1219
+ **Hygiene batch.** Closes Phases 0.5, 0.7, 0.8, and 0.12 of the AI Stack
1220
+ Sovereignty sprint — four small but load-bearing gaps that an AI
1221
+ agent calling the CLI from a script would have hit silently.
1222
+
1223
+ ### Added
1224
+
1225
+ - **`solid kb search <query>`** (Phase 0.5) — first-class subcommand
1226
+ for the company-scoped full-text + semantic KB search. Was reachable
1227
+ before only via `solid kb list -q`, which is a different code path
1228
+ (title `ILIKE` filter, not the embedding-aware `/api/v1/kb/search`).
1229
+ Supports `--limit`, `--offset`, and `--json`. Exits non-zero on
1230
+ failure.
1231
+ - **Recursive unknown-command handler** (Phase 0.7) — `solid kb xyzzy`
1232
+ and every other typo at any subcommand level now exits 1 with a
1233
+ Levenshtein-suggested correction. Previously, only top-level typos
1234
+ exited 1; any subcommand typo silently exited 0, which broke
1235
+ pipelines that rely on exit codes to detect mistakes.
1236
+
1237
+ ### Changed
1238
+
1239
+ - **`__solid_dry_run` config flags now have a typed home** (Phase 0.12) —
1240
+ introduced `ExtendedAxiosRequestConfig`, `ExtendedAxiosError`, and
1241
+ `ExtendedRequestConfig` interfaces in `lib/api-client.ts`. Removed
1242
+ the 7 `as any` casts that were threading these flags through axios's
1243
+ typed config. The flags' lifecycle is now self-documenting in the
1244
+ type system instead of a parade of escape hatches.
1245
+
1246
+ ### Removed
1247
+
1248
+ - **Source maps no longer ship to npm** (Phase 0.8) — added `*.js.map`
1249
+ and `*.d.ts.map` to `.npmignore`. They exposed original source paths
1250
+ to anyone who unpacked the tarball and added ~200 KB of dead weight
1251
+ to every install. Stack traces in production CLI usage are
1252
+ unaffected (they reference compiled paths).
1253
+
1254
+ ### Verification
1255
+
1256
+ - `npm test`: 763/763 green.
1257
+ - `tsc --noEmit`: clean.
1258
+ - Tarball size shrinks; install size for 1M+ AI-agent installs drops
1259
+ proportionally.
1260
+
1261
+ ## [1.19.2] — 2026-04-24
1262
+
1263
+ **Correctness patch.** Closes Phase 0.4 of the AI Stack Sovereignty
1264
+ sprint — the silent-failure bug that broke the scripting contract.
1265
+
1266
+ ### Fixed
1267
+
1268
+ - **109 silent-failure sites across 26 command files** — every catch
1269
+ block whose only error handling was `console.error(handleApiError(e).message)`
1270
+ (no `process.exit(1)`) now exits non-zero. Pipelines that depended
1271
+ on the documented `solid <verb> && next-step` contract no longer
1272
+ paper over backend failures.
1273
+ Files touched: `accounting`, `analytics`, `audit`, `billing`, `crm`,
1274
+ `dashboard`, `demo`, `dev`, `domains`, `export`, `inventory`,
1275
+ `llms`, `logs`, `notifications`, `pages`, `payment`, `sandbox`,
1276
+ `schedule`, `seo`, `services`, `status`, `storage`, `support`,
1277
+ `test`, `webhooks`, plus a JSDoc comment fix in `command-kit.ts`.
1278
+ - **Cleanup-before-exit preserved** in three catch blocks where
1279
+ follow-up code matters — `demo.ts` (state restoration after a
1280
+ failed company switch), `demo.ts` delete (helpful CLI hint about
1281
+ demo-company-only deletion), `test.ts` (loop continues counting
1282
+ failures and exits at end based on aggregate, not on first failure).
1283
+ - **Redundant `return` after `process.exit`** removed in `webhooks.ts`
1284
+ (exit is `never`-typed; return is unreachable).
1285
+
1286
+ ### Verification
1287
+
1288
+ - `npm test`: 763/763 green.
1289
+ - `npm audit --omit=dev`: 0 vulns (carried from v1.19.1).
1290
+ - `tsc --noEmit`: clean.
1291
+ - Audit script (verifies no exit-before-cleanup-code patterns left):
1292
+ pass.
1293
+
1294
+ ## [1.19.1] — 2026-04-24
1295
+
1296
+ **Security patch.** Closes the production CVEs that shipped in v1.19.0.
1297
+ A third-party audit on 2026-04-24 caught that the published tarball
1298
+ contained a vulnerable `axios@1.13.5` (NO_PROXY → SSRF; header
1299
+ injection → cloud-metadata exfil) plus a transitively vulnerable
1300
+ `handlebars@4.7.8` (critical) and minor regressions in
1301
+ `flatted` / `minimatch` / `picomatch`.
1302
+
1303
+ ### Security
1304
+
1305
+ - **`axios` 1.13.5 → 1.15.2** —
1306
+ closes [GHSA-3p68-rc4w-qgx5](https://github.com/advisories/GHSA-3p68-rc4w-qgx5)
1307
+ (NO_PROXY bypass → SSRF) and
1308
+ [GHSA-fvcv-3m26-pcqx](https://github.com/advisories/GHSA-fvcv-3m26-pcqx)
1309
+ (header injection → cloud-metadata exfiltration). `follow-redirects`
1310
+ also bumped to a non-vulnerable version
1311
+ ([GHSA-r4q5-vmmm-2653](https://github.com/advisories/GHSA-r4q5-vmmm-2653) —
1312
+ auth-header leak on cross-domain redirects).
1313
+ - **`handlebars` 4.7.8 → 4.7.9** — closes the
1314
+ critical-severity advisory chain (transitive via `ts-jest`; not
1315
+ reachable from runtime, but still patched).
1316
+ - **`flatted`, `minimatch`, `picomatch`** bumped to non-vulnerable
1317
+ versions in lockfile.
1318
+
1319
+ ### Changed
1320
+
1321
+ - **`prepublishOnly` adds `npm run audit:prod`** —
1322
+ `npm publish` now refuses if the production dependency tree
1323
+ (`npm audit --omit=dev --audit-level=high`) has any high or critical
1324
+ vulnerabilities. The local publish flow now catches what CI catches.
1325
+ Closes the gap that let v1.16.2 / v1.17.0 / v1.18.0 / v1.19.0 ship
1326
+ through a failing security job.
1327
+ - New script `audit:prod` for production-only audit (devDeps excluded
1328
+ from the gate so eslint / typescript / jest churn doesn't block
1329
+ releases that are clean for end users).
1330
+
1331
+ ### Verification
1332
+
1333
+ - `npm audit --omit=dev`: **0 vulnerabilities** in the production tree.
1334
+ - `npm test`: 763/763 green.
1335
+ - `npm pack --dry-run`: tarball builds cleanly.
1336
+
1337
+ ### Outstanding (deferred — won't block users)
1338
+
1339
+ - 6 high-severity advisories remain in the `@typescript-eslint`
1340
+ devDependency family (require a major version bump from v6/v7 to
1341
+ v8+, which needs a separate PR to verify the eslint config still
1342
+ builds). These are devDeps only — they don't ship in the published
1343
+ tarball, so end users are unaffected.
1344
+
1345
+ ## [1.16.1] — 2026-04-23
1346
+
1347
+ Gap-closure patch following the 1.16.0 tenant-guard ship. Tightens the
1348
+ same invariant in the one write-path command that was missed.
1349
+
1350
+ ### Added
1351
+
1352
+ - **`refuseProtectedRoot(baseDir)`** in `lib/tenant-guard.ts` — home-dir-
1353
+ only refusal helper for commands that CREATE the manifest and therefore
1354
+ can't call `requireTenantManifest` yet. Exits 1 if `baseDir` resolves
1355
+ to `$HOME` or `$HOME/.claude/`. Shares `isProtectedRoot` with the full
1356
+ guard so there's one source of truth.
1357
+ - **`isProtectedRoot`** now exported (was previously private).
1358
+
1359
+ ### Changed
1360
+
1361
+ - **`solid pull`** now calls `refuseProtectedRoot(baseDir)` before writing.
1362
+ Prevents scaffolding a tenant project (pages/, kb/, .solid/manifest.json)
1363
+ into the home directory, closing the symmetric gap to 1.16.0's `context`
1364
+ and `push` coverage.
1365
+ - **`pull.ts`** now imports `PullManifest` from `lib/tenant-guard.ts`
1366
+ instead of keeping its own inline duplicate. `push.ts` + `pull.ts` +
1367
+ `context.ts` all share one canonical type.
1368
+
1369
+ ### Tests
1370
+
1371
+ - 4 new cases in `__tests__/lib/tenant-guard.test.ts` covering
1372
+ `refuseProtectedRoot` and `isProtectedRoot`.
1373
+ - Suite: 709 / 709 passing.
1374
+
1375
+ ## [1.16.0] — 2026-04-23
1376
+
1377
+ Tenant context boundary guard. Closes a multi-tenant hygiene bug where
1378
+ `solid context --claude` would write tenant-scoped data to any directory
1379
+ the user happened to be in, including the platform monorepo and
1380
+ `$HOME/.claude/` (which is loaded by every Claude Code session on the
1381
+ machine).
1382
+
1383
+ ### Added
1384
+
1385
+ - **`lib/tenant-guard.ts`** — new shared guard module exporting
1386
+ `requireTenantManifest(baseDir, companyId)` and the pure testable variant
1387
+ `checkTenantManifest(...)`. Enforces three rules:
1388
+ 1. `$HOME` and `$HOME/.claude/` are never writeable (hard refusal, even
1389
+ if a manifest somehow existed there).
1390
+ 2. `<cwd>/.solid/manifest.json` must exist.
1391
+ 3. `manifest.company_id` must equal the active session's `company_id`.
1392
+ - **`PullManifest` interface** — exported from `lib/tenant-guard.ts` as the
1393
+ canonical type. `push.ts` now imports it from there instead of keeping
1394
+ its own copy.
1395
+ - Tests: `__tests__/lib/tenant-guard.test.ts`, `__tests__/commands/context.test.ts`.
1396
+
1397
+ ### Changed
1398
+
1399
+ - **`solid context --claude / --cursor / --codex / --save / --watch`** now
1400
+ calls `requireTenantManifest` before writing. Unbound directories exit 1
1401
+ with a friendly error instead of silently contaminating the filesystem.
1402
+ Read-only paths (`--summary`, `--tools-only`, `--section`, `--json` to
1403
+ stdout) are unchanged and remain usable in any directory.
1404
+ - **`solid push`** refactored to use the shared guard (previously had an
1405
+ inline duplicate check). Behavior equivalent; the extraction is proven
1406
+ by reuse.
1407
+
1408
+ ### Docs
1409
+
1410
+ - New canonical-truth doc:
1411
+ `Owners-Manual/03-AI-Systems/CLAUDE-CONTEXT-CANONICAL-TRUTH.md`
1412
+ consolidating the previously-dispersed Claude context architecture
1413
+ (three roles of CLAUDE.md, four flows-down channels, write model,
1414
+ refresh model, multi-tenant invariants).
1415
+ - Platform `CLAUDE.md` now references the canonical-truth doc as Rule 4b.
1416
+
1417
+ ### Fixed
1418
+
1419
+ - `solid context --claude` no longer writes into `$HOME`, the platform
1420
+ monorepo, or any directory whose bound `company_id` differs from the
1421
+ active session.
1422
+
1423
+ ## [1.10.0] — 2026-04-19
1424
+
1425
+ Sprint 1 — CLI v2 Agent-Ready. Six agent-quality-of-life upgrades ship
1426
+ in this release, all behind opt-in env flags so existing callers are
1427
+ unaffected until v2.0 flips defaults.
1428
+
1429
+ ### Added
1430
+ - **Structured JSON errors (T1.1)** — Enable with `SOLID_JSON_V2=1`.
1431
+ Under `--json + V2`, errors emit `{error:{code,status,message,scope?,
1432
+ feature?,upgrade_to?,hint?,request_id?}}` to stdout instead of prose
1433
+ to stderr. Closed `ErrorCode` vocabulary (12 codes): AUTH_REQUIRED,
1434
+ FORBIDDEN, FEATURE_GATED, SCOPE_MISSING, NOT_FOUND, VALIDATION_FAILED,
1435
+ CONFLICT, RATE_LIMITED, SERVER_ERROR, NETWORK_ERROR, TIMEOUT,
1436
+ DRY_RUN_BLOCKED. Honors backend-supplied envelope shapes.
1437
+ - **Dry-run existence verification (T1.2)** — Mutations with `--dry-run`
1438
+ now GET the resource URL first. If it 404s, the CLI surfaces
1439
+ NOT_FOUND instead of synthetic success. Closes the `solid pages
1440
+ update 99999 --dry-run` false-success lie. Skips for POST/collection
1441
+ and action endpoints where existence can't be probed.
1442
+ - **`solid schema verbs` (T1.3)** — Full CLI verb manifest for agent
1443
+ discovery. Walks the Commander tree, emits `{verb, path, description,
1444
+ options, args, subcommands, is_leaf}` per node. `--json` for machine
1445
+ consumption; `--include-hidden` surfaces normally-hidden verbs.
1446
+ - **Unified list envelopes (T1.4)** — Every list response now carries
1447
+ `.items` + `.total / .page / .has_more` regardless of whether the
1448
+ backend returned `pages`, `results`, `leads`, `logs`, `api_keys`, etc.
1449
+ Original keys preserved — no breakage. Opt out with
1450
+ `SOLID_LEGACY_LIST_SHAPES=1` (removes in next minor).
1451
+ - **`solid mcp install|serve|tools` (T1.5)** — Install Solid# into
1452
+ Claude Desktop / Cursor / Windsurf with one command; spawn the MCP
1453
+ server; list tools from the backend manifest. Auto-detects per-OS
1454
+ config paths, non-destructive merge preserves other MCP servers.
1455
+ - **`solid doctor scopes` (T1.6)** — Catches the silent-failure case
1456
+ where a tenant enables a feature after an API key was issued and the
1457
+ key lacks the implied scopes. Reports missing scopes + one-line
1458
+ rotation hint. Uses the same feature→scope map as the backend
1459
+ (services/scope_expansion.py).
1460
+
1461
+ ### Changed
1462
+ - `ApiError` now carries optional `code / hint / docs_url / scope /
1463
+ feature / upgrade_to / request_id`. Legacy string `message` still
1464
+ printed unchanged for humans.
1465
+ - Request interceptor issues a verify GET before short-circuiting
1466
+ resource-targeted PATCH/PUT/DELETE under `--dry-run`.
1467
+ - Response interceptor non-destructively aliases list arrays to
1468
+ `.items` — consumers that used to branch on `d.pages || d.items ||
1469
+ d.results` can simplify to `d.items`.
1470
+
1471
+ ### Internal
1472
+ - `CLI_VERSION` now exported from `src/lib/api-client.ts` so other
1473
+ modules don't re-read `package.json`.
1474
+ - New pure libraries: `error-codes`, `verb-manifest`, `list-envelope`,
1475
+ `mcp-client-config`, `scope-diagnostic`, `program-registry`. Each
1476
+ ships with a dedicated unit-test suite.
1477
+ - Full suite grew from **486 → 642 tests** (+156 new Sprint 1 cases).
1478
+ TypeScript + build clean.
1479
+
1480
+ ### Rollout (T1.7 two-step)
1481
+ - `1.10.0`: every new behavior is opt-in via env var. Old `--json`
1482
+ callers see exactly what they see today.
1483
+ - `2.0.0` (after soak, TBD): `SOLID_JSON_V2` defaults to on.
1484
+ `SOLID_LEGACY_LIST_SHAPES=1` preserves old envelope keys for one
1485
+ more minor before final removal.
1486
+
1487
+ ---
1488
+
1489
+ ## [1.7.3] — 2026-04-15
1490
+
1491
+ ### Added
1492
+ - `solid demo create plumber "Joe's" --expires 72h` — live demo with AI for sales meetings
1493
+ - `solid demo convert <id> --tier starter` — convert demo to paid via checkout link
1494
+ - `solid sandbox fork` — server-side sandbox (isolated copy via backend API)
1495
+ - `solid sandbox preview` — shareable preview URL for client approval
1496
+ - `solid sandbox promote` — push sandbox to production
1497
+ - `solid sandbox exit` — discard sandbox
1498
+ - `solid brand set --logo --domain --colors --email-from` — full white-label from CLI
1499
+ - `solid init my-app --type marketplace` — scaffold apps on Solid# (4 templates: basic, marketplace, saas, agency-dashboard)
1500
+ - `solid payment analytics` — payment volume, interchange savings, chargebacks
1501
+ - `solid payment connect stripe --account acct_123` — connect payment processor
1502
+ - `solid payment terminal --amount 49.99` — POS from the CLI
1503
+ - Tab completion for all new commands
1504
+
1505
+ ### Fixed
1506
+ - Inventory endpoints: corrected to /api/v1/Inventory/list, /get, /create, /adjust
1507
+ - Audit endpoint: /api/v1/audit/log → /api/v1/security/audit/logs
1508
+ - Token auto-refresh: isLoggedIn() no longer rejects expired tokens (interceptor handles refresh)
1509
+ - .npmignore: dist/__tests__/ excluded from npm package
1510
+
1511
+ ## [1.7.2] — 2026-04-14
1512
+
1513
+ ### Added
1514
+ - `solid dashboard` — cross-company overview for agencies (revenue, agents, health)
1515
+ - `solid api list/docs/call` — API explorer from the CLI (13 sections, 70+ endpoints)
1516
+ - `solid proposal "Business" --template plumber` — branded client proposals with tier pricing
1517
+ - `solid webhooks listen` — forward production webhooks to localhost for development
1518
+ - `solid webhooks test <event>` — send test webhook events to local server
1519
+ - `solid status --all` — quick view of all companies for agencies
1520
+ - `solid open --portal / --api-docs / --sdk / --webhooks` — open developer docs in browser
1521
+ - Developer portal, API docs, and SDK links in help output
1522
+
1523
+ ### Fixed
1524
+ - Refresh interceptor no longer nukes session on 401 (was wiping tokens on network blips)
1525
+ - Banner only shows on top-level `--help`, not subcommand help
1526
+ - Health `--full` hits correct endpoint `/api/v1/health`
1527
+ - 9 CLI bugs from QA audit (inbox, auth, services, SEO, flows, completion, analytics)
1528
+ - Chalk v5 → v4 for Node 18 compatibility
1529
+ - Version banner reads from package.json instead of hardcoded v1.0.0
1530
+
1531
+ ### Changed
1532
+ - License changed from MIT to BSL-1.1
1533
+ - `@anthropic-ai/sdk` moved to optionalDependencies
1534
+ - Dead `keytar` dependency removed
1535
+ - Platform docs `llms.txt` updated (v1.4.6 → v1.7.2, 47 → 62 commands)
1536
+
1537
+ ## [1.7.1] — 2026-04-14
1538
+
1539
+ ### Fixed
1540
+ - Banner version was hardcoded as v1.0.0 — now reads from package.json
1541
+ - Login used `expires_at` (undefined) instead of `expires_in` (seconds) from backend
1542
+ - Chalk v5 ESM-only — pinned to v4 for Node 18 compatibility
1543
+ - CI secrets scanner false positive on example `sk_live_...` text
1544
+ - 9 CLI bugs from QA audit:
1545
+ - Inbox crash on non-array API responses
1546
+ - `auth status` double-nested user object from `/me` endpoint
1547
+ - Services list hitting wrong endpoint (`/cms/public/services` → `/services/catalog`)
1548
+ - SEO audit sending empty body without `--url`
1549
+ - `health --full` hitting admin-gated endpoint — now uses `/api/v1/health`
1550
+ - Flows showing cryptic error instead of explaining CLI API key requirement
1551
+ - 14 commands missing from tab completion
1552
+ - Analytics dashboard showing blank instead of "no data" message
1553
+ - Health subcommand recursion removed — flags-only interface
1554
+
1555
+ ## [1.7.0] — 2026-04-12
1556
+
1557
+ ### Added
1558
+ - Sandbox Engine CLI — 10 new `solid dev` commands for isolated development
1559
+ - `solid logs` and `solid test` commands
1560
+ - `solid serve --preview` and `solid migrate --replace` flags
1561
+ - Services create/delete commands
1562
+ - 154 tests passing (up from 98)
1563
+
1564
+ ## [1.6.5] — 2026-04-10
1565
+
1566
+ ### Fixed
1567
+ - Replace `solid dev` stubs with redirects to real commands
1568
+
1569
+ ## [1.6.4] — 2026-04-09
1570
+
1571
+ ### Fixed
1572
+ - Build and packaging improvements
1573
+
1574
+ ## [1.6.3] — 2026-04-08
1575
+
1576
+ ### Fixed
1577
+ - Build and packaging improvements
1578
+
1579
+ ## [1.6.1] — 2026-04-06
1580
+
1581
+ ### Added
1582
+ - Full type safety — zero `any` casts across all 47 commands
1583
+ - 98 tests passing with CI/CD pipeline
1584
+
1585
+ ### Fixed
1586
+ - Live reload, npmignore, zero remaining gaps
1587
+
1588
+ ## [1.6.0] — 2026-04-04
1589
+
1590
+ ### Added
1591
+ - AI-powered import command (`solid import mockup.html`)
1592
+ - 7 new commands: import, sandbox, watch, dedicated droplets
1593
+ - Agency CMS workflow — full content management for client companies
1594
+ - CI/CD pipeline with company isolation security tests
1595
+ - 98 tests across 9 suites
1596
+
1597
+ ### Fixed
1598
+ - Removed all `as any` casts from api-client.ts
1599
+
1600
+ ## [1.5.0] — 2026-03-28
1601
+
1602
+ ### Added
1603
+ - `solid open`, `solid diff`, `solid serve` commands
1604
+ - CLI testing + deploy safety system
1605
+ - Push auto-snapshot with comprehensive unit tests
1606
+ - History, deploy, migrate, rollback commands with tests and docs
1607
+
1608
+ ## [1.4.6] — 2026-03-20
1609
+
1610
+ ### Fixed
1611
+ - Close CLI gaps — billing endpoints, domains, page generate, site regenerate
1612
+ - Synced llms.txt with platform
1613
+
1614
+ ## [1.4.5] — 2026-03-18
1615
+
1616
+ ### Added
1617
+ - `solid billing checkout-link` and `solid billing invoice` commands
1618
+
1619
+ ## [1.4.4] — 2026-03-16
1620
+
1621
+ ### Added
1622
+ - `solid site` commands + expanded `solid pages`
1623
+ - Site management and page delete API methods
1624
+
1625
+ ## [1.4.3] — 2026-03-14
1626
+
1627
+ ### Added
1628
+ - Billing, audit, notifications, domains commands
1629
+
1630
+ ## [1.4.2] — 2026-03-12
1631
+
1632
+ ### Added
1633
+ - Accounting, webhooks, support, export commands
1634
+
1635
+ ## [1.4.1] — 2026-03-10
1636
+
1637
+ ### Added
1638
+ - Analytics, SEO, insights, llms commands
1639
+
1640
+ ## [1.4.0] — 2026-03-08
1641
+
1642
+ ### Added
1643
+ - `solid context` — AI context package generation (CLAUDE.md, Cursor rules)
1644
+ - Watch mode for context regeneration
1645
+ - `solid payment` — Level 3 interchange CLI commands
1646
+
1647
+ ## [1.3.1] — 2026-03-05
1648
+
1649
+ ### Added
1650
+ - `solid design` command for AI-generated UI
1651
+
1652
+ ## [1.3.0] — 2026-03-02
1653
+
1654
+ ### Added
1655
+ - `solid explore` — Platform Intelligence Console with zero-setup API proxy
1656
+ - CRM, voice, inbox, schedule, reports, inventory, blog commands
1657
+ - Commerce flows, brand, widgets, ant farm commands
1658
+ - Agent consciousness commands — soul, reflect, emotions, spiral, missions
1659
+ - `solid connect` — import from Figma, Slack, Notion, CSV, WordPress, GitHub
1660
+
1661
+ ### Fixed
1662
+ - ASCII `#` character redesigned (looked like `4`)
1663
+ - Removed `--password` and `--token` CLI flags to prevent credential exposure
1664
+
1665
+ ### Security
1666
+ - Config file permissions set to 0600
1667
+
1668
+ ## [1.2.0] — 2026-02-20
1669
+
1670
+ ### Added
1671
+ - Multi-company commands + API key auth
1672
+ - Complete CLI with 16 commands, branded UI, AI training, clone templates
1673
+
1674
+ ## [1.0.0] — 2026-02-15
1675
+
1676
+ ### Added
1677
+ - Initial release — tenant-scoped business management CLI
1678
+ - Auth, status, KB, pages, pull/push, clone with 52 industry templates