@mindrian_os/cli 2.0.0-beta.15 → 2.0.0-beta.19

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 (2) hide show
  1. package/CHANGELOG.md +219 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,222 @@
1
+ ## [2.0.0-beta.19] - 2026-09-04
2
+
3
+ ### Changed
4
+ - **The flip.** `lib/core/brain-client.cjs` line 24's default origin moves from the incumbent
5
+ Brain to `https://theo-mcp.onrender.com`, a BARE origin (no path, no trailing slash). For a
6
+ user: Larry's methodology now comes from Theo, and nothing about how you use MindrianOS
7
+ changes. Rollback stays one line: revert line 24 in a patch release, or set
8
+ `MINDRIAN_BRAIN_URL` on one install. Both paths are valid only while the previous service is
9
+ still running. The previous service is SUSPENDED after a soak window, never deleted, compute
10
+ suspended before data.
11
+ - Doctor's class M layer 6 store-identity check is now complete across both cuts. The
12
+ dual-shape `brain_stats` read shipped in the PREP cut (safe against both Brains). This cut
13
+ moves the two values that had to move WITH the origin: the canon endpoint (`CANON_BRAIN_URL`)
14
+ and the per-origin node floor (`CANON_NODE_FLOOR = 29000` for the incumbent,
15
+ `THEO_NODE_FLOOR = 1000` for Theo). The floor keys on the resolved origin, so a
16
+ `MINDRIAN_BRAIN_URL` rollback restores the incumbent's floor in the same motion.
17
+ - The `test-245` tripwire (`tests/test-245-skill-frontmatter-inert-keys.cjs`) and `CLAUDE.md`
18
+ moved together with line 24, in the same commit, per the pairing that tripwire exists to
19
+ enforce.
20
+
21
+ ### Known, expected behavior after the flip
22
+ - `/mos:leadership` and due-diligence consults answer thinner through Theo until the 30
23
+ uncovered names are ingested (Theo holds the `/mos:leadership` command node with zero
24
+ framework links); this is an honest-empty coverage block, not an error. Covered: 228 of 258,
25
+ 88.4%. Uncovered: 30 of 258. The 30 names bind Theo's decommission task, not this flip.
26
+ - `brain_write` always refuses with `WRITE_PATH_DISABLED`: canon writes go through Theo's own
27
+ governed payload path, and this is not a tier a better key opens.
28
+ - A count-store query plan may draw `PLAN_REJECTED`; answer it by adding a property filter, not
29
+ by concluding the tool is broken.
30
+ - `scripts/probe-brain-contract.cjs` legs invert as expected, documented not broken: legs a and
31
+ d port cleanly; leg b inverts because Theo SERVES `text2cypher` (the expected 403 does not
32
+ arrive) and `brain_ask_anything` still draws an unknown-tool error, but for a different reason
33
+ (Theo has no allowlist gate at all); leg c partially inverts because `BoundedReadRefusal` is
34
+ incumbent-authored text while Theo's refusals are typed codes; leg e inverts entirely because
35
+ it asserts Memgraph index names Theo's Aura instance does not have.
36
+ - The enrichment queue will capture on nearly every `orchestration_readiness` call during soak.
37
+ That is canon thinness correctly measured, bounded and deduped by framework name, not a leak.
38
+
39
+ ## [2.0.0-beta.17] - 2026-09-04
40
+
41
+ ### Added
42
+ - `scripts/check-tool-honesty.cjs`: a standing, advisory MCP tool-honesty gate that
43
+ statically scans every `server.tool()` registration and command branch across
44
+ `lib/mcp/tool-router.cjs`, `lib/mcp/tools/*.cjs` and `lib/mcp/contract-version.cjs`
45
+ for a description-vs-behavior mismatch (a tool description claiming it writes/files/
46
+ persists something its handler never actually reaches a write primitive for) - the
47
+ broader sweep `.planning/debug/meeting-file-meeting-false-success.md`'s Non-Code
48
+ Follow-ups section named as unscoped work once the `meeting` tool itself was fixed
49
+ (quick 260903-kwl). Wired advisory (`--check` WARNs and exits 0, `--strict` restores
50
+ hard-fail, `--report` prints the full per-branch table) at pre-commit (path-scoped to
51
+ the MCP tool surface), `doctor --acceptance` (new `tool-honesty` coverage-gate entry),
52
+ and `release.sh` (outside the SHAPE-GATE sentinel pair) - the same advisory-on-
53
+ introduction posture `check-shape-declaration.cjs` established at Phase 210. First live
54
+ run against the current tree (36 tools, 130 command branches scanned): 1 HIGH RISK
55
+ finding, 8 MEDIUM, 1 UNKNOWN, 0 fixed by this change. Every finding is untriaged;
56
+ human review is the named next step before any finding is fixed or the gate is
57
+ hardened to `--strict`.
58
+
59
+ ### Fixed
60
+ - The `meeting` MCP tool's `file-meeting` command returned a completion-shaped response
61
+ ("## File Meeting", room state, a filing-protocol section, the echoed transcript, a
62
+ "Meeting filed" footer) while writing nothing - no `writeClaimNode`, no `artifact_file`
63
+ call, no room.db mutation anywhere in the handler. Worse, the one thing the branch did
64
+ try to do (hand back `references/meeting/filing-protocol.md`) also returned nothing
65
+ usable, because that reference file did not exist on disk and the branch silently
66
+ dropped the section on a missed read. Fixed: an honest tool description naming
67
+ `artifact_file` as the real write path and `/mos:file-meeting` as the fuller CLI path;
68
+ a leading, machine-checkable `**filed: false**` marker on all three meeting branches
69
+ (`file-meeting`, `pipeline`, `speakers`); an explicit missing-reference signal instead
70
+ of silent omission; and a real `references/meeting/filing-protocol.md` carrying the
71
+ Phase 150.8 Claimify four-pass protocol in surface-neutral form, pinned by
72
+ `tests/test-kwl-meeting-mcp-honesty.cjs` (registered in `tests/run-all-266.sh`).
73
+ What did NOT change: the MCP surface still does not call `writeClaimNode` itself, and
74
+ the Tri-Polar parity gap this defect surfaced - the CLI (`/mos:file-meeting`) has had
75
+ real DIKW-typed meeting filing since 2026-06-12, Desktop and Cowork never have - remains
76
+ open, tracked in `.planning/debug/meeting-file-meeting-false-success.md`.
77
+ - Bare `scripts/<name>` invocations (`bash scripts/foo`, `node scripts/foo.cjs`) are now
78
+ anchored with `CLAUDE_PLUGIN_ROOT` (or the fail-closed `MINDRIAN_OS_ROOT` form for
79
+ hand-authored skills), so a Bash tool invocation resolves against the plugin install
80
+ directory instead of the user's own session cwd. The real security finding, not just a
81
+ reliability improvement: a bare invocation previously executed whatever file happened to
82
+ exist at that relative path inside the user's own Data Room -- a local code-execution
83
+ shadowing vector, not only a portability bug, since a same-named file at `scripts/<name>`
84
+ in a user's room would silently substitute for the plugin's own script. Phase 274 (the
85
+ sibling of Phase 271's `references/` citation fix, and the fourth pass at this disease
86
+ class in this repo): 30 command-surface sites, 3 hand-authored skill sites, and 1 agent
87
+ site anchored; a fresh full-tree scan confirms zero unanchored sites remain (`sites=156
88
+ anchored=154 allowlisted=2 violations=0`, script tier). `scripts/verify-release` gains
89
+ gate 10f, cloning gate 10c's exact fail-closed shape, so this class cannot silently
90
+ return in a future command.
91
+ - **MCP tool honesty, close of the triage phase (Phase 276).** The `check-tool-honesty.cjs`
92
+ gate's own `switch (command)` branch splitter was dead code (a masked-text regex
93
+ swallowed every case label), so `room_state`/`room_content`/`room_graph` were graded
94
+ against their whole handler body instead of per command; fixing the one-line bug took the
95
+ live sweep from 10 findings to a corrected 24 (5 HIGH RISK, 18 MEDIUM, 1 UNKNOWN) with
96
+ discovery totals unchanged (36 tools / 130 branches both before and after). Every one of
97
+ those 24 now carries a written disposition in a checked-in ledger a test diffs against the
98
+ live scan in both directions; global HIGH RISK is 0. Corrected the `orchestration`,
99
+ `export`, `room_content`, `gate_render` and `graph_write` descriptions so none claims a
100
+ write, a render, or a persisted mint its handler cannot perform, and removed every false
101
+ completion assertion ("Snapshot generated", "Dashboard generated", "Export complete",
102
+ "Scout intelligence gathered"). Propagated the Node >=22.16.0 busy-timeout option to every
103
+ room.db (and sibling-db) opener that can genuinely contend (proven under a held write lock:
104
+ elapsed time moved from ~0.3ms instant failure to a genuine ~5s bounded wait), and
105
+ `spine-events.cjs` now reports typed `room_db_busy`/`room_db_broken` reasons instead of
106
+ claiming there is no database about one it just proved exists. Shipped a new `claim_write`
107
+ MCP tool (the first Desktop/Cowork-reachable real DIKW claim write) and wired the `meeting`
108
+ tool's `file-meeting` command through the governed `gate_render`/`gate_answer` confirmation
109
+ gate, with promotion to `confirmed` proven against `room.db` independently of the tool's own
110
+ response text. Full record: `.planning/phases/276-mcp-tool-honesty-triage-and-close-the-
111
+ check-tool-honesty-cjs/`.
112
+ - **The phase's one true silent failure: a Theo readiness miss vanishing with nothing written
113
+ anywhere (Phase 339, plan 339-05, D-03 consumer 3).** `lib/core/enrichment-queue.cjs`'s
114
+ `captureReadinessMiss` gains two additive capture arms recognizing Theo's own
115
+ `orchestration_readiness` payload shapes, a scored RESOLVED miss and a REFUSAL miss, each
116
+ guarded so an incumbent-shaped payload cannot reach either new branch;
117
+ `tests/test-339-enrichment-theo-shapes.cjs` went from 3 of 7 fixtures green to 7 of 7.
118
+ Operational expectation for the soak window, named so nobody reads it as a leak: post-flip
119
+ nearly every `orchestration_readiness` call will capture, because Theo's own header reports
120
+ 148 of 149 Frameworks with zero technique linkage, the queue is bounded (`SOFT_CAP`/
121
+ `HARD_CAP`) and deduped by framework name, and that is canon thinness correctly measured,
122
+ not a defect. What did NOT change: the incumbent's own two capture shapes (`grounded`,
123
+ `readiness_score`) are untouched, proven by `tests/test-249-enrichment-queue.cjs` staying
124
+ 13 of 13 green.
125
+
126
+ ### Changed
127
+ - **RS pipeline spine-wiring + expert-graph reconciliation (Phase 296, SEED-030).** `lib/core/rs_cache.py`'s remote `rs-external` Pinecone index/namespace path (one namespace per topic, 1024-dim `multilingual-e5-large` integrated embeddings) is retired and replaced by a per-room local sidecar cache at `<room>/research/<topic-slug>/.rs-signal-cache/{vectors.jsonl,manifest.json}`, embedded through the one shipped local encoder (`embedding-spine.cjs::embedTexts`) via the new `scripts/rs-vector-bridge.cjs` JSON-stdio bridge (the D-02 answer). `scripts/rs-engine.py` Mode B/C, `lib/core/rs_hybrid.py`, `lib/core/rs-pinecone-bridge.cjs` and `lib/core/rs-differential-scorer.cjs` all thread an explicit room scope end to end.
128
+ - **SEED-029 F8 consequence:** the signal corpus is now per room, so a topic cached in one room is never served into another. This is a real Cowork behavior change, named rather than buried: two rooms working the same topic now each fetch and embed once, independently, rather than sharing one cache entry -- a real duplicated-work cost paid to close a cross-room data-bleed bug.
129
+ - **Dimensional consequence:** the external/hybrid corpus now lives in the same 384-dimensional local encoder space as every other vector in the room, so the 384-vs-1024-dim mixed-space cosine hazard documented in `scripts/rs-engine.py` and `lib/core/rs-engine.cjs` is removed by construction rather than guarded at runtime (`tests/296-dim-invariant.sh` now asserts, no longer SKIPs).
130
+ - **`rs-experts` degrade split:** the old Tier-0 message conflated three distinct causes (no transport ships / transport unreachable / topic genuinely has zero experts) into one hand-rolled string, with the third case -- a correct answer -- mis-dressed as a fault. Now routes through the already-shipped `lib/core/refusal-messaging.cjs` (`REFUSAL_KINDS.unreachable`), producing three pairwise-distinguishable outcomes; a genuinely empty expert list renders as a success, not a refusal.
131
+ - **Deliberately NOT done, and why:** `PINECONE_API_KEY` and the `pinecone` package stay (D-06) -- still load-bearing for `scripts/compute-hsi.py` Tier 2 and `lib/core/pinecone-inference.cjs` (Phase 272, out of scope here); `scripts/auto-explore-fire.cjs`'s direct `rs-engine.py --mode hybrid` spawn was not moved onto the `rs-backend-dispatch.cjs` chokepoint, only named in source and fenced by an argv-contract test (Phase 272-10 remains its own open item); `scripts/rs-engine.py` and `lib/core/rs_corpus.py` stay Python (D-04, Phase 283 is the eventual home for eliminating that runtime).
132
+ - **Three corrected premises**, recorded so the record is not lost: `embedding-spine.cjs` never wrote to `room.db` (F-1, `vector-store.cjs` owns persistence); RS internal and cross-room modes were already Pinecone-free before this phase (F-3); `rs-experts` has had no remote Brain-Cypher coupling since 2026-05-22 (F-6) -- the seed's original Option A/B Aura framing did not apply.
133
+ - **Phase 228** is this same seed's orphaned earlier registration in the closed v1.15.0 milestone (directory holds only a `.gitkeep`, no CONTEXT/RESEARCH/PLAN/SUMMARY ever landed); Phase 296 is its live successor in v2.1.0.
134
+ - `tests/296-pinecone-residue.sh` is the two-sided boundary gate for this change: it asserts PRESENCE of the surfaces D-06 kept (`requirements-hsi.txt`'s `pinecone` declaration, `compute-hsi.py`'s `PINECONE_API_KEY` read, `pinecone-inference.cjs`'s `api.pinecone.io` egress) and ABSENCE of the retired surface, since an over-eager cleanup silently breaking `compute-hsi.py` Tier 2 was judged the likelier failure mode here, not a missed removal.
135
+ - **Usher-division doctrine corrected (navigator-directed, 2026-08-28).** `skills/larry-personality/SKILL.md`'s Hierarchical Navigator section previously divided authority by step ownership: the tool owned Usher steps 1-2, the human owned steps 3-4, and Larry "NEVER crosses into step 3." Product evidence falsified that rule -- in December 2025 Mindrian produced a non-obvious cross-framework synthesis (how McKinsey's Seven Steps, Usher's own cumulative-synthesis model, and Abbie's three pathways relate) that the navigator had not already seen, which the old text would have forbidden it from ever producing. The division is now per-step and shared at generation: step 1 either party may surface an incomplete pattern; step 2 is Mindrian's strongest lane; step 3 either the human or Mindrian may generate a candidate synthesis; **step 4 the navigator retains final authority**, with Mindrian helping challenge, test and refine. Human-in-Command is preserved and made more explicit, not weakened -- only the flat step-3 prohibition changed. The navigator's framing: "Insight generation is not insight authority." New pull-quote replaces the old Aronhime line: "Mindrian may propose the leap. The navigator decides whether the leap is real." `tests/test-posture-ids-drift.cjs` re-pinned to the new quote in the same commit; its exactly-three posture-id assertion (`push_forward` / `hold` / `pull_back`) and the "restraint is the product working correctly" pin are byte-untouched, since this correction concerns the step-3 authority split and not the posture-dial mechanism. The Phase 141 CHANGELOG entry that records the original doctrine is deliberately left as-is; history is not retconned.
136
+ - **The Brain problem-type alias table is now origin-selected (Phase 339, plan 339-04,
137
+ FLIP-02, D-03 consumer 1).** `lib/core/brain-client.cjs`'s single
138
+ `BRAIN_PROBLEM_TYPE_ALIASES` table is replaced by two frozen tables,
139
+ `BRAIN_PROBLEM_TYPE_ALIASES_INCUMBENT` and `BRAIN_PROBLEM_TYPE_ALIASES_THEO`, selected by
140
+ a new `_brainProblemTypeAliases()` function reading the resolved origin against a new
141
+ exported `THEO_ORIGINS` set, so a future `MINDRIAN_BRAIN_URL` change moves vocabulary and
142
+ URL together instead of the two drifting apart. What did NOT change: today's wire traffic
143
+ is byte-identical, because the incumbent origin still selects the incumbent table
144
+ (`tests/test-254-normalize-roundtrip-probe.cjs` Arms 4-5 green).
145
+ - **The `brain_schema` memo is now keyed by origin, as defense in depth (Phase 339, plan
146
+ 339-04, FLIP-05, D-13 as corrected).** The original D-13 ask was a flush mechanism;
147
+ research corrected the premise, recorded here plainly: no flush exists to perform, because
148
+ `BRAIN_URL` is a module-scope const resolved once at require time and the memo is
149
+ process-local, so no running process can ever observe an origin change during its own
150
+ lifetime. The origin-keyed guard ships anyway, becoming load-bearing the day anything
151
+ makes the origin mutable per process. What did NOT change: the 30-minute cache TTL and
152
+ the existing sentinel guard are untouched; `tests/test-339-schema-memo-origin-keyed.cjs`
153
+ (all 7 arms) is green.
154
+ - **A fourth silent-degrade consumer, now disclosed rather than shipped unnamed (Phase 339,
155
+ plan 339-05, D-03b).** `lib/mcp/brain-router.cjs`'s Tier-3 `brainRoute()` previously fell
156
+ back to the Tier-2 local heuristic with no trace whenever a Brain response arrived without
157
+ a usable `next_gate`. `recommend()` now attaches an additive `brain_router_note:
158
+ 'answered_no_next_gate'` field when that happens, carried through a module-scope variable
159
+ that never changes `brainRoute()`'s own return contract. What did NOT change: an
160
+ incumbent-shaped payload with `next_gate` present produces a byte-identical return object,
161
+ with no new field.
162
+ - **The update path is now named in the `unreachable` and `no_key` refusal copy, from a
163
+ single frozen source (Phase 339, plan 339-06, FLIP-04, D-08).** `lib/core/update-path.cjs`
164
+ is the one place the two-command update path (`/plugin marketplace update`, then
165
+ `claude plugin update mos@mindrian-marketplace`) is spelled out; both refusal shapes in
166
+ `lib/core/refusal-messaging.cjs` now name it, and `unreachable`'s old bare-retry promise is
167
+ replaced with copy that does not promise what a suspended origin cannot deliver. The
168
+ honest limit, carried verbatim from this plan's own code comment: "This copy ships in
169
+ bytes. An install that has not updated prints the OLD string, because a main commit is not
170
+ live until released AND picked up. This change is the durable fix for the next origin move
171
+ and for honesty; the levers that reach today's stale population are the soak window and
172
+ the tester note."
173
+ - **The origin literal sweep (Phase 339, plan 339-07, FLIP-01, D-12).**
174
+ `scripts/probe-brain-contract.cjs` and `scripts/build-brain-census.cjs`, the two remaining
175
+ runtime sites that declared their own Brain origin literal, now resolve it through
176
+ `getBrainUrl()` like every other call site; `tests/test-339-origin-single-source.cjs` is
177
+ fully green (0 violations, was 6). The generated census artifacts
178
+ (`data/brain-census.generated.json`, `docs/BRAIN-GRAPH-CENSUS.generated.md`) are left
179
+ unchanged, for three recorded reasons: the generator carries no `--check` release gate by
180
+ design, because a release gate must never depend on live network; Lane B requires an
181
+ operator-supplied admin key and Theo has none, so `brain_write` refuses unconditionally;
182
+ and re-running Lane A against Theo today would silently discard the census record the
183
+ 2026-08 phases were measured against, replacing a census of the incumbent's 29,200-node
184
+ graph with one of Theo's own (measured live at 1,253 nodes). Re-census against Theo is
185
+ registered as a deferred item, not addressed by any plan in this phase.
186
+ - **Desktop and Cowork connector docs now point at Theo (Phase 339, plan 339-08, FLIP-06,
187
+ D-09).** Six hand-authored sources and their generated mirrors now name
188
+ `https://theo-mcp.onrender.com/mcp`, WITH the `/mcp` path, as the connector URL, under the
189
+ unchanged connector key `mindrian-brain`, with the `Authorization` header dropped, because
190
+ Theo returns byte-identical payloads for a real key, a garbage key, and no header at all.
191
+ What did NOT change: `BRAIN_TOOL_MATCHER` and `hooks/hooks.json` were not touched.
192
+ - **The reciprocal cross-repo record and the 269-05 readiness-gate rewrite (Phase 339, plan
193
+ 339-09, FLIP-07, FLIP-08, D-10, D-14).** `docs/339-NOTE-theo-desktop-connector-key.md` now
194
+ exists at the path Theo's own shipped README already cites, naming `mindrian-brain` as the
195
+ sole prescribed connector key; a third alternation token for `BRAIN_TOOL_MATCHER` was
196
+ deliberately not added. Phase 269-05's Task 1 checklist, which read PASS from facts that
197
+ were never in question, is rewritten to three legs sourced from live, dated Theo records;
198
+ the three retired items are kept in place with a dated reason rather than deleted.
199
+
200
+ **The flip-day content fact, verbatim from Session T (D-06a):** `/mos:leadership` and
201
+ due-diligence consults answer thinner through Theo until the 30 names are ingested (Theo
202
+ holds the `/mos:leadership` command node with zero framework links); this is an
203
+ honest-empty coverage block, not an error. The 30 uncovered names bind Theo's own
204
+ decommission task, NOT this flip, per the coverage ruling. The named-Frameworks ratio is
205
+ RETIRED as a coverage measure: coverage is a set question, `Covered: 228 of 258, 88.4%`,
206
+ `Uncovered: 30 of 258`.
207
+
208
+ **What this release does NOT reach.** Two populations are unreachable by any release code
209
+ can touch. Every install that has not run the two-command update prints the OLD refusal
210
+ copy, because a main commit is not live until released AND picked up. Every hand-registered
211
+ Claude Desktop or Cowork connector lives in a config file that is not in any git repo.
212
+ Neither is reachable by code; the soak window and the tester note (`docs/testers/outbox/
213
+ 2026-09-03-theo-cutover.md`) are the only levers that reach them.
214
+
215
+ Also worth naming so nobody compresses it: decommission of the incumbent Brain waits for the
216
+ soak window; the incumbent is SUSPENDED and never deleted; the two Render services are
217
+ stopped compute-before-data (`pws-brain-mcp` then `pws-brain-db`); and the per-install
218
+ `MINDRIAN_BRAIN_URL` rollback lever is valid ONLY while the incumbent still runs.
219
+
1
220
  ## [2.0.0-beta.15] - 2026-08-28
2
221
 
3
222
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindrian_os/cli",
3
- "version": "2.0.0-beta.15",
3
+ "version": "2.0.0-beta.19",
4
4
  "description": "Install MindrianOS into Claude Code with one command -- `npx @mindrian_os/cli`. Ships the MindrianOS plugin (Larry + PWS methodology + Data Room) plus a setup/diagnostics CLI (install/doctor/update).",
5
5
  "scripts": {
6
6
  "mcp": "node bin/mindrian-mcp-server.cjs",