Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Merge master (v0.60.540.0, #8405) into capy/gbra269-entity-facts-eligibility
garrytan560540000d80
diff --cc CHANGELOG.mdindex f1fae20b9c,725f4fd1cd..33b08423ca--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -10,38 -10,16 +10,48 @@@ credits are retained; no result has beeidentifiers and attribution are available in the pre-removal Git revision`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).+## [Unreleased]++**A saved fact from a quarantined page, or one waiting to be re-derived after a purge, no longer reaches agents through search, query, trajectories, entity cards, standing questions, local `gbrain recall` or consolidation.**++Before, the facts `search` and `query` put first when a query names an entity skipped the read-eligibility check that recall and `saved_facts` apply, so remote MCP callers too got facts saved from a page the content gate quarantined, and facts a purge had hidden until a deriver regenerates them. The same check was missing from a few other fact reads. Now each one hides those facts the way recall does.++Agents connected over MCP also get a quoted page's title on search rows, its tags, and a chronicle event's kind quoted too, and a remote `put_page` of a whole-markdown read saved with CRLF line endings stores the page instead of its fence.++Before, a remote reader got a page's title raw on `search` and `query` rows, its tags raw on `get_page`, `fetch` and `get_tags`, a context card's title outside the card's trust label, and a chronicle row's `kind` (from an event page an agent may have rewritten) raw, while the rest of each row was quoted. A whole-markdown read whose line endings an editor converted to CRLF was stored with the read's marker and fence in the body and its frontmatter lost. A fenced title pasted into frontmatter next to a naive datetime (`date: 2026-10-03 23:30:00`) moved that date to UTC, so `effective_date` could land on another day. Local reads and owner-tier text are unchanged.++### Itemized changes++- `search` and `query` entity facts (`search/entity-facts.ts`) hide quarantined-page and `needs_rederive` facts, local and remote, and apply the caller's trust floor as `saved_facts` does.+- `find_trajectory`, `gbrain think`'s trajectory read, `gbrain eval trajectory` and `gbrain founder scorecard` hide them too.+- The entity card's `active_fact_count` counts only the facts the card may show.+- A standing question's refresh gathers no fact, take or timeline row awaiting re-derivation as evidence.+- Local `gbrain recall` (every arm, `--supersessions` and `--since-last-run` included) hides them like the `recall` op.+- The consolidate phase never promotes such a fact into a take.+- Tests: `test/search-entity-facts-eligibility.test.ts` (PGLite and Postgres), red with each read's filter removed.+- Remote `put_page` unfences a whole-markdown read whose lines end in CRLF, closing fence kept or replaced, and stores what a plain CRLF write of the unfenced markdown stores.+- `search`, `query`, `assemble_evidence` and remote `recall` rows quote a quoted row's `title` with its text (`fenceTranscriptRows`).+- `context_pack` and the pushed pack render a card below the owner's tier with its title under the card's trust label.+- Remote `get_page` (every shape), `fetch` and `get_tags` quote a quoted page's tags; remote `add_tag` and `remove_tag` take a tag copied out of those reads without the fence.+- The chronicle reads and `volunteer_chronicle` quote an event row's `kind` by its event page's type and tier; `--narrative` keeps that fence on its own lines.+- Remote `put_page` rewrites only the frontmatter keys that held a fence, so every other line (a naive datetime included) keeps the bytes sent; a rewrite that would not parse back to the same values (a flow mapping continued on the next line, an anchor another key aliases) rewrites the whole block instead.+- A keyword row returned without its text (evidence omitted under a token budget) gets its title quoted for a remote reader like the text would be, and counted in the budget.+- A remote reader's `other_names` on `search` and `query` leaves out names a quoted row declares.+- `chronicle_since` (`kind`) and `list_pages` (`tag`) take a value copied out of a quoted read without its fence.+- Tests: `test/search-transcript-quote-8384b.test.ts` (PGLite and Postgres), red on master for each change.++Contributed by @tarush1989 (#7115, rebuilt on current master).++ ## [0.60.540.0] - 2026-11-01++ **A write to a page with a facts or takes fence no longer re-embeds the whole page: `remember`, timeline and fence writes now embed only the chunks whose text changed (#6961).**++ Vector reuse was turned off for every page with a protected fence, so each write to an entity page deleted and re-embedded all of its chunks. One reporter measured 13 to 15 million embedding tokens a day from that alone. Entity pages carry the fences and take the most writes.++ ### Itemized changes++ - **Fenced page reuse (#6961).** A fenced page now reuses a stored vector when its recorded embedding input equals the one the import would embed, the same check every other page gets. The stored index must still be sealed by the fence-safe chunker, so a reused vector's text holds no private fence row. A chunk whose text changed, such as the fence chunk a new fact lands in, is embedded again. On a fenced page the importer reuses only vectors with a recorded embedding input, so a legacy vector with none is embedded again. A one-row fact append on a five-chunk entity page now makes one embedding call instead of five. Contributed by @javieraldape (#7055, rewritten on master).+## [0.60.539.0] - 2026-11-01**A remote `put_page` of a page an agent read whole now keeps its frontmatter and the code blocks it added, and timeline sources and ontology values are quoted below "your notes" like the rest of their rows.**@@@ -9112,6 -9090,6 +9122,7 @@@ Eleven reports from large brains, manag- `postgres-engine/schema-lock-timeout.ts`: session-level `lock_timeout` on the reserved DDL backend restored on release, `SET LOCAL` inside transaction-wrapped migrations, `pg_blocking_pids()` sampling on a one-backend diagnostic connection, `schema_lock_blocked` registry row; conditional `ENABLE ROW LEVEL SECURITY` in `schema.sql` and eight fragment schemas; `init-schema-retry` retries SQLSTATE 55P03; the v24 RLS E2E test calls `runMigrationSQL` directly and the remaining `init` spawns dump `pg_stat_activity` at half their budget (#5227).Contributed by @andreineacsu (#5517 diagnosis of #5491).++## [0.60.167.0] - 2026-10-11**Wave 14 PR4: the Google connector, open loops, contacts, calendar, Windows and polish.** Gmail loops now find the person page wherever it lives in the brain, extraction runs under a daily spend cap and your own label exclusions, contacts land next to your people pages, and three Windows reports (parked tests, console windows, backups) get native coverage on CI.@@@ -9412,6 -9390,6 +9423,7 @@@ The v0.13.1 grandfather stamped `valida### For contributors- `test/ingestion/put-page-write-through.test.ts` (#6429 case) proves the stamp carry on PGLite (fails before the fix with `source_changed`); `test/repair-failed-writes-conflict-6429.test.ts` covers the conflict replay and the doctor check on PGLite and Postgres; `test/doctor-lost-caller-writes.test.ts` pins the registry wiring. Doctor goldens were regenerated for the new check.++## [0.60.156.0] - 2026-10-10**`gbrain setup claude-code` gives Claude Code memory in one command.** It finds or creates your brain, wires the MCP server and the read-context hooks, and checks that they answer. A second run changes nothing, and `--remove` takes out only what setup wrote.@@@ -9519,6 -9497,6 +9531,7 @@@ This release ships a visibility filter### For contributors- `test/remote-fact-list-private-provenance.test.ts` covers the fix on PGLite, and on Postgres through `test/e2e/remote-fact-list-private-provenance-postgres.test.ts`.++## [0.60.150.0] - 2026-10-10**On Postgres, one statement with an `undefined` parameter could wedge a pooled connection for good: the statement in flight ahead of it got its error, it stayed queued with nothing on the wire, every later reply arrived one statement late, and the backend sat `active / ClientRead` while `/health` answered 200 (#6383, the driver desync behind #6352). The vendored driver now answers a statement that fails to build in its place in the pipeline (the approach of porsager/postgres#1236), so only the culprit fails and a transaction it was part of is aborted rather than committed without it; a connection whose statement waits past `statement_timeout` plus 30 s with nothing coming back is retired and replaced; the pool numbers are live; and `/health?deep=1` probes through the same pool the handlers use.**@@@ -13711,6 -13689,6 +13724,7 @@@ Things to watch: a script or third-part- Search runs one indexed check for an active saved fact before scanning saved facts, and skips the scan when there is none. The declared-name scan skips rows without a declaration keyword and runs once per search when the response reads the same rows the other-name search did. Results are byte-identical (`test/search-c5-identical.test.ts`).- Per-search stage profile on the 10,000-page scale harness (PGLite, keyless): primary hybrid search 19.5 ms, projection-readiness check 6.0 ms, unsealed-pages check 0.5 ms, declared-name scans 0.01 ms each; the saved-facts scan does not run in the harness (it runs on the MCP dispatch path, where it took 3.1 ms on this fixture, which has saved facts).- `bun scripts/scale/run.ts --pages 10000 --seed 1`, agent (MCP) search p50: 41.1 ms before and 39.0 ms after this change, same machine and session. On the harness version that also runs v0.60.32.0, v0.60.32.0 measured 95.9 and 90.6 ms and this release 27.4 ms (27.3 ms before the search change); most of that gain is v0.60.37.0's planner statistics.++## [0.60.41.0] - 2026-10-04**A keyword-only `query` whose answer is in the top five now grades `moderate` again when the question merely uses a word the brain never writes, while questions about a missing attribute or an unknown company still grade `weak` (#5919). Conversation pages can set their own segmentation gap (#5918).**@@@ -15215,6 -15193,6 +15229,7 @@@ Nothing to configure and nothing to ru- `execFileBounded` (`src/core/brain-repo-durability.ts`) now sends SIGTERM at its deadline or on abort, and escalates to SIGKILL after a 2 second grace period. It still settles from its own timer if the exit event never arrives.- `test/bounded-child-exec.test.ts` adds a case where a child holding a lock file removes it on SIGTERM, plus one where a child ignoring SIGTERM is still stopped within the bound.++## [0.60.20.0] - 2026-09-30**Fix wave 4: managed syncs stop wedging on big write histories, one bad email or issue no longer stops a connector forever, stuck upgrade migrations finish, and you can finally leave managed mode.**@@@ -16781,7 -16759,7 +16796,6 @@@ in [Testing](docs/TESTING.md)- Refresh full-profile scheduling weights from complete recorded runs anddocument the separate unit, integration, durability and native coverage owners.--## [0.58.0.0] - 2026-09-24**Separate confirmed attendance from mentions, and give question evidence room in recall.**@@@ -17240,6 -17218,6 +17254,7 @@@ Contributed by @olivershe (#5171), @jav@VXNCXNX (#5322), @Mr-B-1 (#4867), @turian (#5305),@rokas-tarasevicius (#5287), and @lubosxyz (#5348). Their focused contributionswere adapted to the current persistence and source-identity contracts.++## [0.53.0.0] - 2026-09-23**Keep what your agents know and how they work in the same brain.** New local brains now create a content directory containing both knowledge and useful memory skills. Connected agents can discover the same published instructions instead of maintaining unrelated copies. An explicitly authorized editor can update a skill once, and other connections can fetch the same committed version, including its approved supporting files.@@@ -17353,7 -17331,7 +17368,6 @@@ change, activation, or paid enrichment- Add real-engine reconciliation, scoped-authority, concurrent-replay, privacy,retained-backup, bounded-audit, real-owner CLI, and process-kill regression tests.--## [0.52.1.0] - 2026-09-22**A search result opens the page it found, and routine repair stays routine.**@@@ -17443,6 -17421,6 +17457,7 @@@ fingerprint just to make a refused requ- A bounded 3,600-page reindex fixture verifies transaction completion and crashrecovery. It did not reproduce the reported macOS aged-store hang and is notpresented as a fix or a performance improvement.++## [0.51.8.0] - 2026-09-22**Connect a company knowledge repository without rewriting its files.**@@@ -17774,6 -17752,6 +17789,7 @@@ Activate only after verifying the previ`gbrain upgrade`, then restart `gbrain serve --http` and run `gbrain doctor`. If it lists self-registered OAuth clients with a privileged scope you did not intend, run `gbrain auth rescope-client <client_id> --scopes read,write` or `gbrain auth revoke-client <client_id>`. Connectors that request `admin` at self-registration will now fail to register — pre-register them with `gbrain auth register-client <name> --scopes …` or let them self-register with `read write` and rescope later. If you kept `GBRAIN_GUARDRAILS_MODULE`, `GBRAIN_HOME`, a `GBRAIN_ALLOW_*` flag or another protected variable in a project's `.env`, move it to `~/.gbrain/.env` (or your service's EnvironmentFile / shell profile) — gbrain names the variable it ignored and where to put it. A hand-started worker that runs shell jobs should use `gbrain jobs work --allow-shell-jobs`. If `GBRAIN_GUARDRAILS_MODULE` is a package name or a relative path, change it to the module's absolute path (or a `~/` path) — gbrain exits 1 until you do. If you set `GBRAIN_DATABASE_URL` in a project's `.env` on purpose, export it from your shell or put it in `~/.gbrain/.env` instead. If you build the binary yourself, rebuild it with `bun run build` (**Say to your agent:** *"rebuild the gbrain binary"*) so it carries the new compile flag.**Say to your agent:** *"archive my session transcripts"* / *"import my conversations"* — *"a secret leaked into a brain page — rotate it and purge the page"* (your agent rotates the credential, then runs `gbrain delete <slug> --purge` on the host) — *"run a brain health check"* (your agent runs `gbrain doctor` and follows any `oauth_client_scope_health` advice) — *"start my brain's MCP server with self-service client registration"* (your agent runs `gbrain serve --http --enable-dcr`; you approve each new connection in the admin UI).++## [0.50.4.0] - 2026-09-16### For contributors@@@ -19590,6 -19568,6 +19606,7 @@@ lmstudio:<model-id> --embedding-dimensiwhich brain this is"* (your agent runs `gbrain config set mcp.instructions"<identity>"`) — *"list the calendars my google account can read"* (youragent runs `gbrain google calendars`).++## [0.48.0.0] - 2026-09-01The eval retrieval fix wave. Honest re-baselining against the public@@@ -19670,6 -19648,6 +19687,7 @@@ To take advantage of v0.48.0.0: upgradmigration needed; the search-cache reset is automatic and self-heals onfirst use. OpenClaw users get the volunteer arm immediately (default on,kill-switchable as above).++## [0.47.10.0] - 2026-09-01Ambient memory writeback, opt-in and OFF by default: tell your agent@@@ -19852,6 -19830,6 +19870,7 @@@ Nothing activates without the disclosurbyte-for-byte unaffected. Read `docs/memorable-agents.md` first: it statesplainly what leaves the machine, that the CLI is closed source, and how topurge every local artifact after disabling.++## [0.47.8.0] - 2026-08-31**Your nightly dream cycle stops losing the good stuff. Sessions where the real@@@ -20353,6 -20331,6 +20372,7 @@@ manual steps in this releasebinds into known-JSONB columns; guard self-tests cover both new guards.- The unmapped-e2e baseline and the operation-coverage allowlist are seededshrink-only; stale entries fail the build with removal instructions.++## [0.47.3.0] - 2026-08-27**Wave L: the wave-k close-out.** Three held-back items from the wave-k triage,@@@ -20750,6 -20728,6 +20770,7 @@@ warns about a partial migrationholder; dry runs stay pure).- `src/core/workspace-push.ts` exports `aheadCount`; `InstallReceipt` gains the typedoptional `repo_url` field (`src/core/bootstrap/format.ts`).++## [0.46.32.0] - 2026-08-26**The community train: 54 contributor PRs absorbed.** Wave K triaged all 141@@@ -21396,6 -21374,6 +21417,7 @@@ To take advantage of v0.46.23.0`docs/guides/github-source.md`.- DB-only brains can now skip disk dual-writes with`gbrain config set sync.write_through false`.++## [0.46.22.0] - 2026-08-18**A wedged database shutdown can now die fast and loud instead of hangingforever.** Issue #4284 (analysis and measurements by @cheRoma — thank you)@@@ -21615,6 -21593,6 +21637,7 @@@ instructions. Schedule the heavier enri`gbrain dream --source <id> --phase extract_atoms` per source, plus onebrain-wide `gbrain dream --phase consolidate` — or wait for the scheduledbackground lane (tracked in TODOS).++## [0.46.19.0] - 2026-08-17Dream-cycle synthesis is now fast by default: transcript synthesis runs as a@@@ -21681,6 -21659,6 +21704,7 @@@ jobs honest about truncation, failed wr### Changed- `gbrain agent logs` audit lines now show the synthesis mode and fallbackreason when present.++## [0.46.18.0] - 2026-08-17**Your harness now gets gbrain's skills as capability, not just knowledge —@@@ -21860,6 -21838,6 +21884,7 @@@ section appear on re-entry). Then trprinted one-line `@import` to your CLAUDE.md; re-run it (or `--check` in CI)whenever the brain changes. Codex/opencode users: the AGENTS.md target workstoday; native codex hooks are a filed follow-up.++## [0.46.16.0] - 2026-08-16**Seven verified breakages from the live issue queue, fixed at the root.**@@@ -21971,6 -21949,6 +21996,7 @@@ Everything else is automatic. Capped ruexpansion/OCR spend may now hit their ceiling — that is the fix working;raise the cap if the new accounting says you were spending more than youbudgeted.++## [0.46.15.0] - 2026-08-16**The brain now recognizes people the way you actually mention them.**@@@ -22125,6 -22103,6 +22151,7 @@@ against HEAD with an adversarial secon- If you intentionally route claude-cli through a cloud backend, switch thatworkload to the `anthropic` recipe with cloud credentials — claude-cli childrennow always use subscription auth.++## [0.46.13.0] - 2026-08-16**One brain can now safely serve many agents.** `gbrain agent register` mints@@@ -22206,6 -22184,6 +22233,7 @@@ To take advantage of v0.46.13.0: on thprinted block into your agent. Existing setups keep working unchanged; if`gbrain doctor` flags dangling read grants or orphaned workspace sources, themessage names the exact fix.++## [0.46.12.3] - 2026-08-16**Supply-chain hardening for how gbrain updates and how community code lands.**@@@ -22300,6 -22278,6 +22328,7 @@@ To take advantage of v0.46.12.2: reconnsurface every new tool is available immediately; on `starter`, `capture` joinsthe daily-driver set. Nothing to configure — the tools are read-only orscope-and-fence-protected exactly like the operations they mirror.++## [0.46.12.0] - 2026-08-16**Every surface that could still steer you toward the retiring embedding@@@ -22650,6 -22628,6 +22679,7 @@@ automatically via `bun run verify`; covsummary. If `check:module-size` fails on your branch, the message names theexact ceiling to raise (a conscious, reviewer-visible TSV edit) or — better —the sibling module dir to put the new code in.++## [0.46.8.0] - 2026-08-15**The full local test suite is trustworthy again.** `bun run test` and@@@ -22709,6 -22687,6 +22739,7 @@@ To take advantage of v0.46.8.0: `gbrai— no schema migration, no config changes. If you run tests locally,`bun run test` and `DATABASE_URL=<test-db> bun run test:e2e` should bothexit 0 on a clean checkout; if they don't, the failure is real.++## [0.46.7.0] - 2026-08-15**gbrain is now a proper Codex plugin — and a Claude Code plugin — from one repo.**@@@ -22745,6 -22723,6 +22776,7 @@@ environment that launches your harnessbinds the source from the env, not a flag;ambiguous writes are guarded until a source is bound — a sole-source brainneeds nothing).++## [0.46.6.0] - 2026-08-15**A busy machine can no longer make the job queue evict its own healthy@@@ -22823,6 -22801,6 +22855,7 @@@ every existing row to its handler's leaaround the old eviction behavior (e.g. very high `--max-stalled`), you canlikely lower it now. Mixed fleets are safe: an old worker simply keeps theold 30s behavior until restarted.++## [0.46.5.0] - 2026-08-15**CI in half, evals actually gating.** The Test workflow ran 8–9.5 minutes on@@@ -22857,6 -22835,6 +22890,7 @@@ worker pool, `GBRAIN_NO_SNAPSHOT=1` optfast-path. Run the retrieval canary yourself with`bun run scripts/run-eval-canary.ts` (add `--record` to append the committedledger).++## [0.46.4.0] - 2026-08-15**opencode joins the supported-client roster — at full parity from day one.**@@@ -22925,6 -22903,6 +22959,7 @@@ session). The keyless free tier is enou`opencode mcp list` should show `✓ gbrain connected`. Existing installs:nothing changes; this release adds a client, it doesn't modify brainbehavior.++## [0.46.3.0] - 2026-08-15**retired hosted provider is shutting down on 2026-09-04 — gbrain now gets you off it@@@ -23179,6 -23157,6 +23214,7 @@@ to import them. Unzip consumer exports`conversations.json`. On PGLite, stop `gbrain serve` for the import (thesingle-writer lock error names the PID if you forget). Run`gbrain transcripts status` any time to see what's still waiting.++## [0.45.20.0] - 2026-08-14**Grok Build joins the supported-client roster.** xAI's `grok` CLI can now wire a gbrain brain in one command, and — like Hermes before it — the install path is proven against the real binary, not written from docs: every asserted flag, config shape, and exit-code quirk was observed against a pinned Grok Build install, recorded in a machine-checked pin document, and exercised by a real-binary e2e door that CI can run.@@@ -23198,6 -23176,6 +23234,7 @@@- **The hermes-door CI job got the same hardening sweep:** checkout token persistence off, and the door's full test output is preserved as evidence even for the failure class that previously left no trace.To take advantage of v0.45.20.0: nothing changes for existing installs — this release adds a client, it doesn't modify brain behavior. Grok Build users: follow [docs/mcp/GROK.md](docs/mcp/GROK.md) (two commands: register, then `grok mcp doctor gbrain` to verify the seven-verb handshake). Maintainers enabling the paid CI lane: create the `XAI_API_KEY` repo secret, then land the follow-up that adds the schedule and canary legs.++## [0.45.19.0] - 2026-08-15**The interactive `gbrain init` pickers are now tested on a real terminal — and the repo carries one PTY layer instead of two.** The first thing every new user touches (the embedding provider picker and the search-mode picker) previously had no true-TTY coverage; the comments that claimed otherwise pointed at a harness nothing ever called.@@@ -23307,6 -23285,6 +23344,7 @@@ it protects- **CI guards now prove they can fail.** A guard registry classifies all 45 check scripts; self-tested scanner guards run against known-bad fixtures on every verify (the registry tracks fixture coverage for the rest), so a guard whose pattern rots into a permanently-green no-op fails the build instead of masquerading as coverage. Two such rotted patterns were found and fixed in the process, along with three guards that were wired into a registry nobody ran.To take advantage of v0.45.16.0: upgrade and restart any long-running `gbrain serve`, autopilot, or jobs supervisor/worker daemon so the fenced lock refresh and job-reaper fixes take effect. If you run image search, run `gbrain backfill modality` once after upgrading to restore any image chunks a prior re-embed flipped to text (`gbrain doctor` surfaces the affected count and the exact command). No schema migration and no config changes are required.++## [0.45.15.0] - 2026-08-14**The queue that drains itself: three background-jobs fixes reported from a downstream agent deployment (upstream issues #2, #3, #4).** A brain whose autopilot cycle stalled mid-run could accumulate byte-identical queued cycles forever while every long job queued before an upgrade died minutes in — and the operator diagnosing it couldn't even find the worker entry point, because `gbrain jobs --help` printed a one-line stub. All three failure modes are closed, and the queue now tells you when it's holding work back.@@@ -23347,6 -23325,6 +23385,7 @@@ To take advantage of v0.45.15.0: upgrad- Ship-review hardening (three adversarial passes at ship): the post-wiring verification now sends a deliberately invalid credential first — an endpoint that accepts it is not a real serve, wiring rolls back, and the fresh token is retired immediately on ANY failed verification; a failed verification also rolls a fresh Claude Code registration (and its headless pre-approval) back to the pre-run state; the pre-approval never lands when the registration itself failed; prior wiring is only cleaned up after the replacement verifies; `--status` and `gbrain doctor` report honestly on partially-applied or partially-removed installs instead of reading vacuously green, and `--status` only recovers a bearer from a registration it can verify as its own; token-scope reads fail closed on damaged rows across the verify and CLI display paths (`auth list` shows exactly what the serve enforces); a value-less `--project` or `--scopes` flag errors loudly instead of silently widening scope or minting a full-access token; settings writers refuse to rewrite permission policy shapes they don't understand; config writes serialize under cross-install locks on every path (apply, remove, cleanup, rollback); and per-turn hooks defer per-event to workspaces that carry their hook wiring in committed settings.To take advantage of v0.45.14.0: upgrade, then on any agent-framework box run `gbrain bootstrap harness --yes` against your running `gbrain serve --http`. On PGLite brains, pre-mint with `gbrain auth create bootstrap-harness --scopes read,write` while the serve is stopped and pass `--token`. Restart your serve after upgrading so token scoping is enforced by the new verify path — the install says this too, exactly when it applies. See the "Local harness mode" section of docs/guides/bootstrap.md.++## [0.45.13.0] - 2026-08-13**The Truthful Surface wave: your agent's MCP catalog now tells the truth. What's listed is callable, empty answers explain themselves, and new clients start with a focused ~26-tool surface they can widen on demand.**@@@ -23510,6 -23488,6 +23549,7 @@@ contract problem; pain common to both i- `claw-test --list-agents` no longer races CLI teardown; output is complete and ordered.- Live runs keep the agent's gbrain children pointed at the run's own hermetic brain even when the surrounding shell exports a database-pointing environment variable — the harness's verification and the agent's work can no longer land in two different places.- The test real-name guard now correctly distinguishes the public Hermes platform (documented and tested) from private deployment names (still banned).++## [0.45.11.0] - 2026-08-12**The install now ends by telling you the two things that matter: you own the brain, and here's the first skill to run.** A working install used to finish on a health report and three tour prompts — technically complete, but a new user walked away without the two facts that make gbrain worth trusting and worth using. Now `gbrain bootstrap verify` ends with a hand-off: **what you own** (every memory is a markdown file in YOUR private GitHub repo — read it, take it to a second machine, delete it and the brain is gone; or the local-only variant with the one command that gives it a durable home) and **what to do next** (run the `cold-start` skill — say "fill my brain" and your agent imports your Gmail, calendar, and contacts through ClawVisor, an OAuth vault so the agent never holds raw tokens, or offline archives like Google Takeout, one consented phase at a time).@@@ -23742,6 -23720,6 +23782,7 @@@ cuts you may have already hit- The boundary behavior is now pinned end to end, not just in units: a real spawned serve answers the compact→session-start warm-pack round trip over its real socket; a real stdio MCP session on `--surface verbs` advertises and serves exactly the seven verbs fail-closed; the new verbs are exercised over real HTTP with per-token session-cursor isolation; keyset pagination and the session-cursor table are parity-pinned on real Postgres; migration shape, sub-second latency gates, CLI invocations, and a live-Codex boundary-call check round it out (~55 new tests).To take advantage of v0.45.7.0: upgrade with `bun install -g github:garrytan/gbrain#latest-stable`. A schema migration runs automatically on first use — a new per-session cursor table, additive, no existing data touched. Codex and other MCP hosts see the two new verbs immediately; Claude Code installs pick up the boundary hooks on the next `gbrain bootstrap`. Read `docs/guides/ambient-recall.md` for where each verb belongs and how to wire your heartbeat to `delta`.++## [0.45.6.0] - 2026-08-12**Seventeen new production skills, distilled from a 324-skill audit of a mature personal-agent deployment.** The built-in pack grows from ~52 to 69 skills and picks up the trust disciplines a memory product lives or dies by: corrections that fix the source instead of papering over it, a confirmation gate before anything irreversible, claim verification before anything ships, an ingest gate that stops duplicate and misfiled pages at the door, and a sanitization procedure for turning a personal brain into a team brain. Every import was adversarially reviewed, privacy-scrubbed onto generic placeholders, pinned to its upstream source, and shipped with routing fixtures.@@@ -23772,6 -23750,6 +23813,7 @@@- Skill frontmatter now states its true effects: a skill that commits and pushes is marked mutating, and inert precedence markers were removed.To take advantage of v0.45.6.0: upgrade with `bun install -g github:garrytan/gbrain#latest-stable`, then run `gbrain skillpack reference --all` to sweep the new and upgraded skills into your agent repo (or `gbrain skillpack scaffold --all --workspace <your-agent-repo>` on a fresh install). Nothing to migrate — new skills route via their trigger phrases immediately, and `gbrain check-resolvable --strict --skills-dir skills/` verifies the pack end to end.++## [0.45.5.0] - 2026-08-12Brain currency, part one: a brain is only useful if it's CURRENT, and until now@@@ -23878,6 -23856,6 +23920,7 @@@ say "fresh" forever--repo <path>`) so the generated wrapper picks up the self-disable guard.- Keyless installs: your sync-and-embed cron chain now exits 0; no actionneeded beyond upgrading.++## [0.45.3.0] - 2026-08-12**Codex installs stop asking a question Codex can't honor.** The bootstrap used to offer every install a choice of MCP scope — this folder only, or the whole machine — but Codex has no per-folder registrations, so picking "this folder" led to a confusing round-trip where the agent asked permission to keep what it had already done. Now each harness gets the honest version: Claude Code records your scope choice during the interview (where it actually sticks), and Codex simply tells you the truth — its registration reaches the whole machine, read and write — along with the exact commands to remove it (just the registration, or the whole install).@@@ -23914,6 -23892,6 +23957,7 @@@ To take advantage of v0.45.3.0: upgrad- Automatic per-turn and session-end pushes wait until the repo phase has verified the repo is private, so nothing is published to an unverified remote.To take advantage of v0.45.2.0: upgrade with `bun install -g github:garrytan/gbrain#latest-stable`. Nothing to migrate. To use the new path, create an empty private repo under your own account, clone it, open it in your agent, and run the bootstrap block — it adopts your repo. If anything about the repo or push looks off, `gbrain doctor` names it with the exact fix.++## [0.45.1.0] - 2026-08-11**Your per-prompt brain hooks are now measurable and non-repetitive.** v0.45.0.0's paste-in agent install gave every prompt a context injection; this release makes that channel behave like a product instead of a firehose. The hook remembers what it already told you — a page it injected earlier in the session isn't re-injected every time the name comes up — and every delivery now lands in the same precision feedback loop the other push channels use, so `gbrain volunteer-context --stats` and a new doctor check show exactly which harnesses are firing and how useful their pushes are.@@@ -24001,6 -23979,6 +24045,7 @@@ warns about a partial migration4. **If any step fails or the numbers look wrong,** please file an issue:https://github.com/garrytan/gbrain/issues with the output of `gbrain doctor`and `~/.gbrain/upgrade-errors.jsonl` if it exists.++## [0.44.1.0] - 2026-08-11**Any current model works now. gbrain stops rejecting model ids it hasn't heard of.**@@@ -24226,6 -24204,6 +24271,7 @@@ saves are readable by every agent connefiles copy the old "search first, query if thin" rule, refresh them from`skills/conventions/brain-first.md` — the shipped skillpack carries the correctedrouting.++## [0.42.76.0] - 2026-08-08**Mistyped or unsupported flags now fail loudly instead of being silently ignored — including the ones that were supposed to make a command safe.**@@@ -24243,6 -24221,6 +24289,7 @@@**`gbrain doctor` and `repair-jsonb` see further and misfire less.** The double-encoded-JSON scan now covers the subagent execution columns, and the damage test requires the stored text to actually parse as JSON before flagging it — a legitimate string value that merely starts with `[` or `{` (a log line, a code snippet) is no longer misclassified, and a repair pass can no longer corrupt it. One damaged table no longer aborts the scan of the rest.### To take advantage of v0.42.76.0++## [0.42.75.0] - 2026-08-08**The "PGLite crashes on macOS 26" era is over: gbrain now repairs a torn brain in place, automatically, with your data preserved.**@@@ -24830,6 -24808,6 +24877,7 @@@ More AI providers work out of the box,- Confidential OAuth clients can now revoke access tokens through the standard revocation endpoint when client secrets are stored as hashes. Invalid credentials fail closed, malformed or mixed authentication is rejected, backend failures remain retryable, and discovery metadata accurately advertises supported authentication methods.No schema migrations.++## [0.42.63.0] - 2026-07-20**Schema commands now open the local brain you actually configured.**@@@ -25122,6 -25100,6 +25170,7 @@@ The root cause was the page-generation### To take advantage of v0.42.51.0`gbrain upgrade`, then `gbrain doctor`. Existing brains pick up the contention-free clock and the checkpoint integrity constraint automatically on the next migration; the search cache rebuilds itself on first query. Nothing to configure.++## [0.42.50.0] - 2026-06-17**CI reliability hardening — a wedged job can no longer run for six hours, a superseded run no longer reports a stale flaky failure, and broken workflow YAML is caught before it ships.** gbrain's CI already had the deep machinery (content-hash run-skip cache, weight-aware shard balancing, test-isolation guards, hermetic E2E). What it lacked was the cheap GitHub-Actions hygiene that was already wired into `heavy-tests.yml` but never into the two hot-path workflows. This pass closes that gap, porting the patterns from the sibling GStack project's CI-reliability work.@@@ -25154,6 -25132,6 +25203,7 @@@ Pacing is **opt-in** (default `off`) an### To take advantage of v0.42.49.0`gbrain upgrade`. Pacing is off by default — nothing changes until you opt in. To clear a big embed backlog safely on a busy pooler: `gbrain embed --stale --pace` (or `--pace=gentle` to be extra conservative). To pace the background embed-backfill job and every embed path automatically: `gbrain config set pace.mode balanced`. During an incident you can override without a redeploy: `GBRAIN_PACE_MODE=gentle` or `GBRAIN_PACE_MAX_CONCURRENCY=4`.++## [0.42.48.0] - 2026-06-16**Brain repos harden themselves for durability the moment gbrain is given a PAT and a GitHub URL.** Fresh agents kept drifting out of sync with their knowledge-wiki git repos: writes sat local-only and never pushed, long-lived sessions edited a stale tree, and scratch output landed outside the repo and vanished. Now `gbrain sources add --url <repo> --pat-file <p>` auto-hardens the managed clone, and `gbrain sources harden <id>` runs the same audit idempotently against any source. Hardening is six always-on guarantees: it pulls current state (divergence-safe rebase that skips a dirty tree and never leaves a half-rebase), installs a local auto-push safety net, ships a committed `scripts/brain-commit-push.sh` that refuses to report success without a confirmed push, writes always-on durability rules into the agent's context file (deterministic filing from the canonical taxonomy, commit-and-push-never-deferred, pull-before-each-write-batch), registers a 30-minute background pull so an idle session can't go stale, and verifies push access up front.@@@ -25190,6 -25168,6 +25240,7 @@@ Nothing here forks the manifest, the in### To take advantage of v0.42.47.0`gbrain upgrade`, then run `gbrain advisor` to see the top things worth doing on your brain right now. To publish a brain's skills to anyone who connects, run `gbrain skillpack init-brain-pack <name>` in the brain repo, fill in the README's five sections, and commit it. To let connecting agents discover packs over MCP, `gbrain config set mcp.publish_skills true`; to let a thin client run the advisor, `gbrain config set mcp.publish_advisor true` (both default off). Install the `gbrain-advisor` skill and its weekly cron recipe for a standing brain checkup.++## [0.42.46.0] - 2026-06-16**Federated read scope now reaches every by-slug read, not just search and query (gbrain#2200).** A client that mounts several sources (a `federated_read` grant) could find a page through search and query, but the by-slug reads — `get_page`'s tags, plus `get_tags`, `get_links`, `get_backlinks`, and `get_timeline` — didn't honor the same grant. For a page living outside the default source that meant two wrong outcomes: the read came back empty for content the client was authorized to see, or it resolved against the wrong source. This release routes all of those reads through the same source-scope ladder that already governs search/query, so a federated client reads exactly the sources it's granted — no more, no less. Thanks to @mlobo2012 for the report and the proposed fix.@@@ -25257,6 -25235,6 +25308,7 @@@ This release also lands on top of v0.42### To take advantage of v0.42.43.0`gbrain upgrade` (applies the new feedback-log migration automatically). The wider reflex window is on by default for context-engine hosts — set `retrieval_reflex_window_turns: 1` in `~/.gbrain/config.json` to restore single-turn behavior. Agents without the context engine: call `volunteer_context` per turn (window in, pointers out), or pipe a transcript through `gbrain watch --json`. After a few days, `gbrain volunteer-context --stats` shows which resolution arms are earning their keep; raise or lower `min_confidence` accordingly.++## [0.42.42.0] - 2026-06-12**`gbrain query` no longer pays a flat 10-second exit tax on managed Postgres behind a transaction-mode pooler — and CLI exit codes finally tell the truth on PGLite.** On deployments where the pooler holds sockets open past the bounded pool drain (gbrain#2084, a residual of gbrain#1972), every query printed its results and then sat for 10 seconds until the force-exit banner fired. The cause was two-layered: the hard-deadline timer was armed *before* the operation handler, so a multi-second search on a large brain burned the teardown budget (and any operation slower than 10 seconds was silently killed mid-run with exit 0 and truncated output); and the CLI never exited explicitly on success — it waited for Bun's event loop to drain, which a stuck pooler socket can hold open forever.@@@ -25279,6 -25257,6 +25331,7 @@@ Along the way the wave fixed a deeper,### To take advantage of v0.42.42.0`gbrain upgrade`. No configuration needed. If your `gbrain query` has been printing results and then hanging ~10 seconds before a `force-exiting` banner, this release removes both the wait and the banner. If your scripts check gbrain exit codes on a PGLite brain, they will start seeing real failures — previously masked as exit 0 — so a wrapper that suddenly reports errors is the fix working, not a regression.++## [0.42.41.0] - 2026-06-11**A correctness-and-reliability wave: your conversation facts survive a cycle, write-through stops polluting other repos, autopilot rides out a DB blip instead of crash-looping, and concurrent PGLite processes stop corrupting each other.** A triage of open reports surfaced six bugs with no fix yet plus a batch of community PRs; this ships them together, each with a regression test.@@@ -25327,6 -25305,6 +25380,7 @@@ The fix well-forms free text before it### To take advantage of v0.42.40.0`gbrain upgrade`. No configuration needed. If a `gbrain extract` run had been stalling at the same page count every time, this is the release that unsticks it — the next run resumes and completes.++## [0.42.39.0] - 2026-06-09**Your agent now learns a brain page exists the moment you name someone — instead of talking about a close contact for four messages without ever opening their page.** gbrain was great at *storing* knowledge and at injecting deterministic per-turn context, but it never taught the agent the *policy* of retrieval: when to look something up, and what to pull. That lived in each user's hand-rolled instructions and failed silently. The Retrieval Reflex makes it a property of having a brain.@@@ -25420,6 -25398,6 +25474,7 @@@ The fix is a smaller, exact diff. `git### To take advantage of v0.42.35.0- Nothing to do. The next `gbrain sync` after upgrading self-heals a stuck bookmark automatically; watch for the one-line `[sync] last_commit … history rewritten` recovery message. If a source has been stale since a force-push or branch consolidation, this is the release that unsticks it.++## [0.42.34.0] - 2026-06-07**Relationship questions now get relationship answers.** Ask "who invested in widget-co", "who introduced me to alice-example", or "what connects fund-a and fund-b" and gbrain resolves the named entity and walks its typed-edge graph (`invested_in`, `works_at`, `founded`, `attended`, `advises`, …) to surface the answer — even when no single page mentions both sides. Until now the graph only re-ranked results that keyword/vector search had already found; a relationship that lived purely in the edges (an investor whose page never names the company) was invisible. It now enters retrieval as a first-class candidate.@@@ -25437,6 -25415,6 +25492,7 @@@ This is on by default in the `balanced### To take advantage of v0.42.34.0- Just ask relationship questions in natural language — the arm is on by default in balanced/tokenmax. To turn it off: `gbrain config set search.relational_retrieval false`.- One-time cache note: this release advances the search-cache key version (a relational-on result must not be served to a relational-off lookup), so the first query after upgrade re-runs instead of hitting a stale cache row. No action needed; it self-heals on first use.++## [0.42.33.0] - 2026-06-07**`gbrain sync` will never delete a repo it didn't create.** If a source was registered with a `remote_url` but its `local_path` pointed at a working tree you manage yourself (not a gbrain-managed clone), a failed or degraded code sync could remove that directory and re-clone over it. Sync now re-clones **only** clones gbrain actually created — identified by an ownership marker, or by gbrain's own clone location for clones made before this release. Anything else, including your live working tree, is treated as read-only: indexed, never deleted. On an unowned path, sync aborts loudly **before touching the filesystem** and tells you how to fix the source registration. Thanks to @zaqwery for the report.@@@ -25450,6 -25428,6 +25506,7 @@@ The re-clone path is also crash-safer n### To take advantage of v0.42.33.0Upgrade. Nothing to configure. New `--url` sources are marked gbrain-owned automatically, and existing managed clones at the default location keep auto-recovering. If you registered a source whose `local_path` is a working tree you maintain yourself, `gbrain sync` now syncs it read-only and prints how to re-register it if you want gbrain to manage the clone.++## [0.42.32.0] - 2026-06-07**A single un-parseable note can no longer silently stop your brain from indexing anything new.** A page whose YAML frontmatter `title:` was a bare date (`title: 2024-06-01`) or number (`title: 1458`) parsed as a Date/number, not text — and the importer threw when it tried to lowercase it. That throw blocked the sync bookmark from advancing, so every later `gbrain sync` re-walked the whole repo, never reached HEAD, and quietly stopped indexing new commits. The page was committed and on GitHub, but `gbrain get` returned `page_not_found` with no surfaced error.@@@ -25511,6 -25489,6 +25568,7 @@@ For the voice agent recipe, you can no### To take advantage of v0.42.29.0Upgrade and restart your worker/supervisor. Nothing to configure. If `gbrain doctor` flags a supervisor singleton mismatch, stop the extra supervisor (`gbrain jobs supervisor stop`) and keep one per queue.++## [0.42.28.0] - 2026-06-06**`gbrain extract links --stale` no longer dies partway through on calendar and meeting pages.** A full re-extraction sweep (the kind a `LINK_EXTRACTOR_VERSION_TS` bump triggers) used to crash with a Postgres "malformed array literal" error the moment a calendar event's raw text (Zoom links, commas, quotes, braces, em-dashes) landed in a batch. One bad batch aborted the entire run, so the graph never finished reconciling and stale edges couldn't be dropped. The three bulk writers (links, timeline, takes) now pass each batch as a single JSONB document instead of a hand-built `text[]` literal, which encodes arbitrary free text safely. The sweep runs to completion on the messiest brains.@@@ -25586,6 -25564,6 +25644,7 @@@ Nothing to configure. `gbrain upgrade`gbrain skillopt <skill> --bootstrap-from-skill --dry-run --max-cost-usd 1```2. The dream-cycle budget meter no longer prints `BUDGET_METER_NO_PRICING` for Opus 4.8.++## [0.42.24.0] - 2026-06-03**Minion workers no longer silently wedge mid-job on a Supabase brain.** The background worker that runs your cron jobs, enrich fan-out, and autopilot cycle holds a lock on each job and heartbeats it every couple of seconds to say "still working." On a Supabase brain that heartbeat was running on the transaction-mode pooler (the high-traffic 6543 port), which recycles its connections per transaction. A lock is held open for minutes, so the pooler would periodically drop the socket mid-heartbeat. The worker read that dropped socket as "the lock expired," force-evicted its own in-flight job, and then sat in a claim loop holding nothing — process alive, no errors in the log, just quietly doing no work. It showed up most under heavy `enrich` load.@@@ -25598,6 -25576,6 +25657,7 @@@ The fix routes only the lock hot-path (### For contributorsNew `BrainEngine.executeRawDirect()` — same contract as `executeRaw`, but routes to the direct pool when dual-pool is active (no-op delegation on PGLite / non-Supabase / kill-switch). `claim`/`renewLock` in `minions/queue.ts` point at it. The Postgres impl shares its cancellation plumbing with `executeRaw` via a private `runUnsafe` helper; the in-transaction guard keys on `peekReadPool() !== _sql` so a tx clone is detected and never rerouted. New `test/postgres-execute-raw-direct.test.ts` covers the routing decision (dual-pool on/off × in-tx/not, plus abort short-circuit) without a live Postgres; `test/queue-lock-retry.test.ts` gains a guard that `claim` can never fall back to `executeRaw`. Eng review cleared the plan; the four lock/pool guards stay green.++## [0.42.23.0] - 2026-06-03**`gbrain jobs work` and `gbrain jobs supervisor` take a `--nice <n>` flag that lowers the background job tree's CPU scheduling priority without cutting concurrency.** When the Minions worker pool runs at full width (sync, embed, extract, subagent fans), it can drive a machine's load average high enough to starve your interactive shell. Dropping concurrency throws away throughput. Niceness is the right lever: keep full concurrency, run at low priority, and the work finishes just as fast when the box is idle while yielding politely when it's busy. In the real incident that drove this, reniceing the tree took load from ~7 to ~3 with no measurable throughput loss.@@@ -25615,6 -25593,6 +25675,7 @@@### For contributorsNew `src/core/minions/niceness.ts` (`applyNiceness` re-reads the effective value in both the success and failure paths, so a denied renice records the real inherited value, not null), `worker-registry.ts` (live workers self-register under `gbrainPath('workers')`, brain-isolated, with `ESRCH`/`EPERM`-aware pruning and a pid-reuse start-time guard), and `supervisor-pid.ts` (shared PID-file reader, dedupes the status/doctor/stats copies). `buildWorkerArgs` was extracted from the supervisor for unit testing. Eng review + Codex outside-voice both cleared the plan; Codex caught the detached-supervisor renice-ordering bug and the `parseInt("3.5")` gap. Closes #1815.++## [0.42.22.0] - 2026-06-03**A background worker whose database connection quietly dies no longer sits there alive-but-doing-nothing for hours. Your brain keeps processing jobs instead of silently stalling overnight.**@@@ -25725,6 -25703,6 +25786,7 @@@ Earlier partial fixes addressed symptom### For contributorsThis is the canonical landing for a long-standing class with ~15 competing community PRs and zero merged. Thanks to **@nullhex-io** (#1651) and **@joelwp** (#1667) — the ownership-flag approach that shipped, and to **@BrendanGahan**, **@xaviroblessarries**, and the other #1471 reporters for the precise root-cause walkthroughs. Three follow-ups are filed in `TODOS.md` (connection-lifecycle hardening under concurrent module connects, facts-queue drain on the dream/fall-through paths, stale ConnectionManager refresh after reconnect) — all pre-existing and not reachable in current gbrain.++## [0.42.20.0] - 2026-06-03**Three ways GBrain could freeze or go silent are fixed.** This release closes a@@@ -25841,6 -25819,6 +25903,7 @@@ schema change. After upgradingfor graceful drain on sync error exits (today they avoid the hang by skippingdisconnect; worst case is a transient PGLite stale-lock that self-heals).- A gateway-level idle-timeout (vs absolute) for streaming chat.++## [0.42.19.0] - 2026-06-02**`gbrain skillopt --write-capture` rollouts now get full tool schemas, closing the last gap in the AI SDK v6 tool-loop fix.** The v6 fix that got agent loops working again on non-Anthropic providers (DeepSeek, Qwen, Groq, local models) shipped in v0.42.11.0 — but it fixed only one of the two places skillopt builds tool definitions. The `--write-capture` path (the virtual put_page/submit_job/file_upload registry the optimizer uses to test write-flavored skills) still handed the model a stripped-down schema with `enum`, `default`, and `items` dropped, so the optimizer couldn't see a tool's allowed values and proposed invalid calls. Both builders now use the same shared mapper.@@@ -25852,6 -25830,6 +25915,7 @@@- **SkillOpt schema-metadata test** (`test/skillopt/rollout-schema.test.ts`): asserts `enum` survives in BOTH the rollout and write-capture tool builders.Closes the remaining surface of #1782 / #1764. The core fix was a convergent effort — credit michaeladair44, justemu, and JE4NVRG for the original diagnoses and patches.++## [0.42.18.0] - 2026-06-03**A scheduled `gbrain sync` can no longer spin forever and pile up dead processes, and `gbrain doctor` stops showing "100% of pages need link extraction" right after you ran the thing that's supposed to fix it.**@@@ -25877,6 -25855,6 +25941,7 @@@ The second fix: on Postgres, `gbrain do### For contributors- New reusable primitive `src/core/process-watchdog.ts` (Bun worker-thread self-kill, `eval:true` so it survives `bun --compile`); `resolveSyncHardDeadline` + `composeAbortSignals` in `sync.ts`; watchdog armed in `cli.ts` before `connectEngine` (bounds connect-phase hangs). #1768 fix threads a full-µs `updated_at_iso` (projected via `to_char(... AT TIME ZONE 'UTC', '…US"Z"')`) into `StalePageRow`; the `markPagesExtractedBatch` SQL is unchanged so the version-arm / CDX-1 tests stay green. New tests: `test/process-watchdog.test.ts` (+ `.serial`), `test/sync-hard-deadline.test.ts`, and a deterministic µs regression in `test/extract-stale.test.ts`. Eng review + Codex outside-voice both cleared the plan (Codex empirically validated the worker-self-kill on Bun 1.3.13).++## [0.42.17.0] - 2026-06-03**A huge `gbrain sync` can no longer get stuck forever losing all its progress when it's killed partway through.** If your brain suddenly grows by tens of thousands of pages (say a background process is enriching one page per commit, all night long), the next sync has a giant backlog to import. If that sync gets killed before it finishes — a session timeout, a laptop sleep, anything — it used to throw away **everything** it had done and start over from zero. The next hour the backlog was even bigger, so it got killed again, and again. It could never catch up. This release makes sync **resumable**: a killed sync banks what it imported, and the next run picks up where it left off. It converges.@@@ -26014,6 -25992,6 +26079,7 @@@ Evidence + the mechanical foundation th`test/doctor-pool-reap-health.test.ts`, `test/audit/pool-recovery-audit.test.ts`,`test/extract-atoms-drain-handler.test.ts`, `test/autopilot-auto-drain-wiring.test.ts`,plus extensions to `test/extract-atoms-drain.test.ts`.++## [0.42.15.0] - 2026-06-02**Commands print real data when you run them from a subagent, a pipe, or cron, not just when you have a terminal.** A handful of gbrain commands quietly changed what they printed based on whether a terminal was attached. Run them from a coding agent, a `| cat` pipe, or a cron job and you'd get JSON when you wanted human text, or nothing useful at all. The read commands (`get`, `list`, `search`, `query`) were already fine; this fixes the ones that weren't.@@@ -26050,6 -26028,6 +26116,7 @@@ Nothing here changes a TTY/interactive```3. **If you scripted `gbrain jobs watch` for a JSON stream non-interactively,** add `--json --follow` to keep the old streaming behavior. (For scripting, `gbrain jobs stats --json` / `gbrain jobs list --json` remain the cleaner surfaces.)4. **If anything looks wrong,** file an issue at https://github.com/garrytan/gbrain/issues with the command you ran and what you saw.++## [0.42.14.0] - 2026-06-02**Two zero-config gaps closed: code-* queries now tell you whether the graph is built, and `gbrain init` tells you up front when your embedding key is missing.**@@@ -26097,6 -26075,6 +26164,7 @@@ If anything looks off, file an issue wi- **`src/core/db-lock.ts`** — `tryAcquireDbLock` adds same-host dead-pid auto-takeover (guarded `DELETE WHERE id=$1 AND holder_pid=$2` + one normal-upsert retry returning the standard handle). New exported `classifyHolderLiveness` / `isHolderDeadLocally` (injectable `process.kill` seam; `HOLDER_TAKEOVER_GRACE_MS = 60_000`; EPERM classified as `alive`, never reclaimed). TTL-expired locks stay the upsert's job; cross-host stays TTL-only.- **`src/commands/sync.ts`** — `runBreakLock`'s safe path consumes the shared `classifyHolderLiveness` predicate, fixing the prior bug where any `process.kill` throw (including EPERM) counted the holder as dead.- **Tests** — `test/code-graph-readiness.test.ts` (11), `test/db-lock-auto-takeover.test.ts` (11), `test/init-embed-check.test.ts` (9, hermetic via the gateway embed-transport seam + `withEnv`), plus readiness-envelope cases added to `test/e2e/code-intel-mcp-ops-pglite.test.ts`. Closes #1780.++## [0.42.13.0] - 2026-06-02**Pages under `archive/` are findable again.** If you committed a note to your brain under `archive/` (old conversation exports, prior-system logs, notes you filed away), GBrain was embedding it and graphing it but then hiding it from every search. You would search for an exact phrase you knew was in the page, get nothing back, and conclude the page did not exist. It did. A hardcoded list was quietly dropping the whole `archive/` subtree from results unless you knew to pass a special flag.@@@ -26155,6 -26133,6 +26223,7 @@@ gbrain doctor --json # look for the- Verified on both PGLite (in-memory e2e) and real Postgres (seeded container smoke): archive findable + demoted below curated, `test/`/`.raw/`/`attachments/` still hidden, the new doctor SQL runs clean on both engines.- Side-effect documented above: adding `archive/: 0.5` to `DEFAULT_SOURCE_BOOSTS` reclassifies archive pages in the contradictions probe's source-tier breakdown (`src/core/eval-contradictions/cross-source.ts`) from `other` to `bulk` (boost < 0.95). Benign; no code change.++## [0.42.12.0] - 2026-06-02**GBrain now keeps itself current the way your coding agent already keeps gstack current: it rides every invocation.** Until now, a gbrain install would quietly drift. You'd run an old binary against a newer brain schema, `gbrain doctor` would mutter about it, and nobody would act. There was no nudge at the moment you'd actually see it.@@@ -26211,6 -26189,6 +26280,7 @@@ Things worth knowing: this is the same#### For contributors- `src/core/semver.ts` extracted from `check-update.ts` (re-exported for back-compat) to break an import cycle with the self-upgrade module.++## [0.42.11.0] - 2026-06-03**Self-improving skills can no longer cheat. When you run `gbrain skillopt` to let@@@ -26573,6 -26551,6 +26643,7 @@@ about a partial migrationTyped edges (`SELECT link_type, count(*) FROM links GROUP BY 1`) should jump.4. **If anything looks wrong,** file an issue athttps://github.com/garrytan/gbrain/issues with `gbrain doctor` output.++## [0.42.6.0] - 2026-06-01**Most of your people and company pages are one-line stubs. `gbrain enrich --thin`@@@ -26903,6 -26881,6 +26974,7 @@@ command you ran and `gbrain doctor` out`test/ai/anthropic-key.test.ts`, `test/think-gateway-adapter.test.ts`,`test/think-pipeline.serial.test.ts`, `test/cycle/synthesize-gateway-adapter.test.ts`,`test/auto-think-phase.test.ts`.++## [0.42.3.0] - 2026-05-30**Search now returns the *confident handful* instead of a fixed wall of results@@@ -27019,6 -26997,6 +27091,7 @@@ scores come back flat (no cliff) — au(autocut declines on flat curves by construction). Floors are env-overridable.A live-corpus PrecisionMemBench run remains an optional empirical confirmation,not a blocker.++## [0.42.2.0] - 2026-05-30**One command now wires Claude Code, Codex, or Perplexity Computer to a remote@@@ -27544,6 -27522,6 +27617,7 @@@ nor a `sync.repo_path`; run `gbrain doc(9), `test/dream-postgres.test.ts` (8), `test/jobs-autopilot-cycle-braindir.test.ts`(1) — covering the pin chain, env/brain_default/sole_non_default tiers, thesource-scope regression, the null-brainDir path, edges→ok, and the both-null exit.++## [0.41.37.0] - 2026-05-30**A four-bug critical fix wave: your tags stop disappearing on reindex, a@@@ -27648,6 -27626,6 +27722,7 @@@ root-caused yet — their repro sample`gbrain upgrade` should do this automatically. If it didn't, or if `gbraindoctor` warns about a partial migration:++## [0.41.36.0] - 2026-05-30**Your MCP clients can now see and use your agent's skills. Point Codex desktop,@@@ -27725,6 -27703,6 +27800,7 @@@ your skills to MCP clients — say yes```4. **If anything looks off,** file an issue athttps://github.com/garrytan/gbrain/issues with the output of `gbrain skills`.++## [0.41.35.0] - 2026-05-30**GBrain now has five built-in spots where an outside content checker can watch@@@ -28054,6 -28032,6 +28130,7 @@@ The feature is dormant until usedMeasured against PrecisionMemBench in the sibling gbrain-evals repo (faithfulvendored scorer); the default-off path is byte-identical to prior behavior (theexisting search suite passes unchanged).++## [0.41.32.0] - 2026-05-30**A quiet repo that's fully caught up no longer screams `SEVERELY STALE` in@@@ -28281,6 -28259,6 +28358,7 @@@ partial migration#### Configuration- `sync.cost_gate_min_usd` (default 0.50) sets the inline-sync confirmationfloor.++## [0.41.30.0] - 2026-05-30**`gbrain lsd --save` (and `brainstorm --save`) now actually writes the@@@ -28627,6 -28605,6 +28705,7 @@@ the right ownership boundary**Plan + 12 decisions + 15 codex findings absorbed at`~/.claude/plans/system-instruction-you-are-working-cuddly-panda.md`.Closes #1570.**++## [0.41.27.0] - 2026-05-27**`gbrain doctor` stops crying wolf about sources that have no new commits.**@@@ -28706,6 -28684,6 +28785,7 @@@ shell. Co-Authored-By preserved for th### SupersedesPR #1564 (`@garrytan-agents`). Co-Authored-By preserved. Closed with a supersession comment explaining the production-quality additions. The surrogate-pair fix from commit `78b93f3f` in that PR is NOT brought over — already on master via `safeSplitIndex` at `synthesize.ts:192` (v0.42.0.0 wave).++## [0.41.26.1] - 2026-05-27**Your worker daemon stops crashing 39 times a day.**@@@ -29248,6 -29226,6 +29328,7 @@@ it doesn'tpattern's regex requires `\)` immediately after the time group, so`(2024-03-15 9:00 AM)` shapes correctly fall through to the morespecific pattern.++## [0.41.23.0] - 2026-05-26**You can now see how every extractor in your brain is doing — how@@@ -29745,6 -29723,6 +29826,7 @@@ If something goes wrong- File an issue: https://github.com/garrytan/gbrain/issues with`gbrain doctor --json` output + contents of`~/.gbrain/audit/schema-unify-YYYY-Www.jsonl` if it exists.++## [0.41.21.0] - 2026-05-27**Five daily-driver ops pains, fixed in one wave. Your big brains stop@@@ -31079,7 -31057,7 +31161,6 @@@ review passes) on cascade-resilience anTypeScript exhaustiveness check fail until they add a `'partial'`arm.--## [0.41.14.0] - 2026-05-25**Your gbrain skills can declare their own routing triggers in their@@@ -31301,6 -31279,6 +31382,7 @@@ New tests: `test/operations-fuzzy-sourc`gbrain upgrade` runs migration v95 automatically. The migration is `CREATE INDEX CONCURRENTLY` on Postgres so it doesn't block other writers; the index is small (`~MB` even on 100K-page brains) and the dedup query becomes O(log n).### To take advantage of v0.41.13.0++## [0.41.12.0] - 2026-05-25**`gbrain retired-provider-switch` no longer silently breaks multimodal search on brains that mix text and image embeddings.**@@@ -31332,6 -31310,6 +31414,7 @@@ No manual action needed. If you alread### For contributorsPR #1443 was incorporated through the standard fix-wave workflow: the original fork PR from `@garrytan-agents` was cherry-picked into a base-repo branch (fork PRs from non-collaborator accounts do not inherit base-repo CI secrets), eng-reviewed via `/plan-eng-review`, and the partial-WHERE-clause + schema-qualified-probe corrections were bundled into the same ship to keep the change atomic and bisect-friendly. The original PR is closed; attribution is preserved in the commit trailer.++## [0.41.11.1] - 2026-05-25**CI got twice as fast. Every PR now finishes in about four and a half@@@ -31679,6 -31657,6 +31762,7 @@@ warns about a partial migration- output of `gbrain doctor`- contents of `~/.gbrain/upgrade-errors.jsonl` if it exists- which step broke++## [0.41.10.0] - 2026-05-25**Your brain stops being mostly orphan pages.** A new `gbrain extract links --by-mention` pass scans every page's body text for mentions of people and companies you already have pages for, then creates links automatically. The same release also fixes a silent corruption bug in the dream-cycle chunker that could split UTF-16 surrogate pairs (emoji, non-BMP CJK, mathematical alphanumerics) at chunk boundaries, breaking the per-chunk idempotency key on retries.@@@ -31859,6 -31837,6 +31943,7 @@@ What you can now doTo take advantage of v0.41.6.0: just `gbrain upgrade` and re-run yourflow. No manual migration needed. New `--break-lock` / `--force-break-lock`flags are documented in `gbrain sync --help`.++## [0.41.8.0] - 2026-05-24**`gbrain search`, `gbrain query`, and `gbrain get` now actually exit when they finish on PGLite.**@@@ -31947,6 -31925,6 +32032,7 @@@ We took the drain from #1259, took the### CreditPR [#1259](https://github.com/garrytan/gbrain/pull/1259) by jehoon supplied the structural drain pattern. PR [#1337](https://github.com/garrytan/gbrain/pull/1337) by matt-dean-git supplied the snapshot+early-null disconnect pattern and the force-exit idea we narrowed to fire only on the drain-timeout path. @eloe, @bcallender, and @61tH0b independently validated PR #1259's fix against real reproducers. Closing PRs land with `Co-Authored-By:` trailers on the merge commit.++## [0.41.7.0] - 2026-05-24**Your compact OpenClaw resolver actually works now.** If you've grown your agent past 200 skills and switched to the compact list-format resolver (`- **gift-advisor**: gift idea | birthday gift`) because the markdown-table version got unreadable, `gbrain doctor` used to silently report every single skill as unreachable. On a 306-skill agent, that was 238 FAIL errors on every doctor run, and the list-format resolver was effectively invisible to gbrain. v0.41.7.0 fixes that — the parser now reads both shapes natively, mixes them in one file, and `gbrain doctor` reports 0 errors on the same resolver that previously broke it.@@@ -31986,6 -31964,6 +32072,7 @@@ On a real 306-skill agent with a list-f### For contributors- Codex outside-voice review surfaced four findings the eng review missed: the upstream PR's literal "add list branch below" instruction would have produced dead code (the existing `continue` short-circuits non-table rows before any list branch would fire); the explicit-path-suffix capture would have broken `routing-eval.ts:skillSlugFromPath` + the manifest check at `check-resolvable.ts:367`; the `docs/guides/scaling-skills.md` doc needed registration in `scripts/llms-config.ts` for `test/build-llms.test.ts` to pass; and the original em-dash cleanup instruction would have corrupted command flags like `--pglite`. All four caught and integrated pre-merge.++## [0.41.6.0] - 2026-05-25**Your PR CI stops taking 23 minutes.** The Test workflow on every pull request was wallclock-bound by one unlucky shard (shard 3, 22-26 min) while other shards finished in 5-13 min. After this release, every shard finishes in roughly the same time, the whole matrix runs in about 9-10 min on a fresh PR, and PRs that don't actually change test-affecting code (rebases, doc-only commits, retries) skip the test run entirely and finish in under 2 minutes via a content-hash cache.@@@ -32398,6 -32376,6 +32485,7 @@@ After migrating, retire your OpenClaw'- op_checkpoint resumability for cross-cycle continuation in both new phases.- Parity-baseline eval gates against your OpenClaw outputs on 500-page sample.- OpenClaw-side cleanup (`atom-pipeline-coordinator` retire + SKILL.md shrinks) lives in `~/git/your-openclaw`, not this repo.++## [0.41.1.0] - 2026-05-24**Your CI can now fail a PR when search retrieval gets worse.** Before this release, gbrain shipped the pieces you'd need to measure retrieval quality (capture, replay, nightly probe, cross-modal runner) but nothing connected them into a loop. You could see a quality drop on your screen but nothing automatically caught it. v0.41 closes the loop end-to-end. You publish a baseline once — a snapshot of how your brain performs on a set of real queries — and then `gbrain eval gate` runs against that baseline on every PR. If results get materially worse OR if the brain stops finding pages it used to find, the command exits non-zero and CI turns red. The wave also wires the nightly quality probe into the autopilot daemon (opt-in via config) so a brain you've left running notices its own degradation.@@@ -32487,6 -32465,6 +32575,7 @@@ If any step fails or numbers look wrong- `gbrain bench diff` + `gbrain bench list` companion verbs.Plan + 13 CEO-review decisions + 10 eng-review decisions + 2 codex outside-voice rounds (15 + 9 findings, all absorbed) at `~/.claude/plans/system-instruction-you-are-working-rustling-peacock.md`. Strategic frame: the v0.41 wave closes the eval LOOP end-to-end so retrieval regressions on master burn a publicly-visible score in BrainBench-Real (sibling `gbrain-evals` repo).++## [0.41.0.0] - 2026-05-24**Your 100-job subagent batch now actually completes.** A real user ran `gbrain jobs work --concurrency 10` against an Azure-hosted Anthropic endpoint, submitted 100 background jobs, and watched every single one dead-letter with `rate lease "anthropic:messages" full (8/8)`. The default cap of 8 starved 2 workers; every starved job got marked as a failure, hit `max_attempts = 3` after 3 lease-full bounces, and dead-lettered. This release turns minions from "a CLI you drive" into "a fleet you supervise" — submit a batch, walk away, come back to completed work.@@@ -32669,6 -32647,6 +32758,7 @@@ Two failure modes treated differently### For contributorsThe plan file lives at `~/.claude/plans/system-instruction-you-are-working-temporal-brook.md` with the full decision provenance: CEO review (D1-D16) + Eng review (D1-D9) + Codex round 1 (17 findings) + Codex round 2 (13 findings). The deferred-to-v0.41+ TODOs are in `TODOS.md` under "v0.41 content-sanity follow-ups" — chunk-level quarantine, source-repo remediation CLI, threshold validation post-deploy, brain-score `no_junk_pages_score` component, plus the operator-regex + HTML-density features that need real ReDoS / code-fence-handling stories before they're worth shipping.++## [0.40.9.0] - 2026-05-24**`gbrain sync` now indexes your `.sql` files, and `gbrain code-def` works on SQL tables, functions, views, and indexes the same way it works on TypeScript.**@@@ -32823,6 -32801,6 +32913,7 @@@ Four follow-up TODOs filed (in the pla- NEW-2: cycle-phase wrappers for the other 7 phases (sync, extract, embed, orphans, extract_facts, resolve_symbol_edges, recompute_emotional_weight)- NEW-3: HTTP-level trust-boundary E2E that proves serve-http.ts honors the localOnly filter at runtime (codex CMT-3 strongest defense)- NEW-4: render function extraction from runDoctor (would let doctor-cli-smoke move back into the parallel fast loop)++## [0.40.7.2] - 2026-05-23**TODOS.md gets a wave-commitments register at the top.** A `/plan-ceo-review` + `/plan-eng-review` pass clustered the 110 open TODOs into 12 feature themes, articulated the platonic ideal for each, and surfaced three strategic decisions. All three landed on the most ambitious option, and the seven verified-absent items the analysis caught got filed. Nothing in `src/` changed.@@@ -32843,6 -32821,6 +32934,7 @@@ No action required — this is a docs-o- **Verified-missing items (8):** `gbrain sources promote`, `--explain` auto-on during `gbrain eval replay`, extend `gbrain remote doctor` to stream audit JSONL, new `gbrain costs` command, `gbrain jobs explain <id>`, `docs/security/threat-model.md` catalog, `gbrain doctor --thin-client` parity probe, `gbrain models migrate`. Each grep-verified absent before filing.Five items duplicate older entries lower in TODOS.md (`.sql` indexing, Magika, doc_comment, CJK items) — duplication noted inline. The new top section is the canonical wave-commitment register; historical entries stay as detail.++## [0.40.7.0] - 2026-05-23**Your agents can now author your brain's schema pack themselves — no more shell-out, no more hand-editing YAML.** If you've ever opened `gbrain` and noticed thousands of pages stuck as untyped "notes" under `meetings/` or `research/`, this release closes that loop. Tell your OpenClaw (or any agent connected via MCP) "my brain has 4000 untyped meetings pages — add a `meeting` type and backfill them," and it does the whole thing safely: locks the pack file so two agents can't race, validates the change won't create dangling references, writes atomically so a crash never leaves the pack half-written, audits the mutation with the agent's identity, then updates every matching page in 1000-row batches that never wedge concurrent writers. The cathedral that was bundled but unreachable in v0.39 is now reachable from the outside.@@@ -33030,6 -33008,6 +33122,7 @@@ This release is built on top of communi4. **If anything looks off,** file an issue at https://github.com/garrytan/gbrain/issues with:- output of `gbrain doctor`- the exact command you ran + the stderr output (the connection-budget warning + any per-source error messages are particularly useful)++## [0.40.5.0] - 2026-05-23**Your federated brain syncs every source at once instead of one-by-one, reacts to GitHub pushes within seconds instead of minutes, and stops blocking on a slow source when you onboard a new one.**@@@ -33480,7 -33458,7 +33573,6 @@@ The same plumbing lands in the LongMemEPlan file at `~/.claude/plans/system-instruction-you-are-working-crystalline-owl.md` carries the full design rationale, the CEO/Eng/Codex review history (3 review passes, all CLEARED), the measurement plan (3 seeds per condition + paired-bootstrap CI), and the hand-verification gate list. Codex flagged 18 findings during outside-voice review; 6 load-bearing ones folded as design decisions (alias-map wording, `resolveEntitySlugWithSource` resolution_source signal, prompt-placement preserving both calibration AND default ordering, INJECTION_PATTERNS extension for `</trajectory>`, 5s findTrajectory timeout + 10s extractor timeout, doctor check deferred to v0.40.1+, real-LLM spot-check added, success metric broadened). The benchmark methodology contamination was the load-bearing decision — accepted with explicit CHANGELOG + JSON-envelope disclosure.--## [0.40.1.0] - 2026-05-22**Eval infrastructure that catches retrieval regressions before merge and proves answer-quality wins after ship.**@@@ -33605,6 -33583,6 +33697,7 @@@ warns about a partial migration- which step brokeThis feedback loop is how the gbrain maintainers find fragile upgrade paths. Thank you.++## [0.40.0.0] - 2026-05-17**Voice agent reference lands — Mars + Venus personas, WebRTC-first, copy-into-your-repo not stuck-in-gbrain.**@@@ -33709,6 -33687,6 +33802,7 @@@ The voice agent runs in YOUR repo, on Y#### For contributors- New paradigm `install_kind: copy-into-host-repo` is documented in `recipes/agent-voice/README.md`. Future recipes that want this shape follow the sibling-directory convention pinned there.- The deterministic import script + scrub table are the canonical refresh-from-upstream mechanism. Update the table; re-run the script; the PII guard fail-closes if anything slipped through.++## [0.39.3.0] - 2026-05-22**`gbrain capture` now actually does what you expect: handles files with their own frontmatter cleanly, dedups identical text, rejects binary files, finds itself in `--help`, and tells you when something goes wrong instead of doing nothing.**@@@ -33871,7 -33849,7 +33965,6 @@@ Content-Type: application/jso- The plan-eng-review flow on the v0 plan produced 15 decisions, 9 of them via codex outside-voice. Plan + decision trace at `~/.claude/plans/system-instruction-you-are-working-async-popcorn.md`.- Filed v0.39+ TODOs: SQL-shape rewrite of `listPrefixSampledPages` for PgBouncer; magic-byte allowlist for binary content detection; `--source-kind` override flag; facts:absorb root-cause trace; ingest_capture Minion handler architecture migration.--## [0.39.2.0] - 2026-05-22**Your federated brain refreshes all its sources in parallel now, not one at a time.**@@@ -34173,6 -34151,6 +34266,7 @@@ warns about a partial migration- which step brokeThis feedback loop is how the gbrain maintainers find fragile upgrade paths. Thank you.++## [0.38.2.0] - 2026-05-22**`gbrain doctor` no longer hangs on big brains, and gives you real signal when it has to give up.**@@@ -34239,7 -34217,7 +34333,6 @@@ Community PR #1287 (by @garrytan-agents- `scanBrainSources` now returns `partial` + `aborted_at_source` on `AuditReport` and `status` + `files_scanned` (+ optional `db_page_count`) per `PerSourceReport`. Any test that constructs `AuditReport` literals needs to include the new required fields. (One pre-existing test was updated as part of this PR.)- `runDoctor` still calls `process.exit` at the end — behavioral tests against it can't run via the unit-test runner. That refactor stays a TODO; the unit-test layer covers `scanBrainSources` + doctor's render shape via source-grep, and the heavy script covers end-to-end against a subprocess.--## [0.38.1.0] - 2026-05-21**Your `gbrain agent run` loop can now run on any provider with native tool calling — not just Anthropic.** OpenAI, Google Gemini, OpenRouter, openai-compatible servers (Ollama, LiteLLM, vLLM, llama-server) all work. Pick the cheapest model that does the job for your agent, or stay on Anthropic if you want the prompt-cache cost savings on long loops.@@@ -34340,6 -34318,6 +34433,7 @@@ Four atomic slices behind feature flags- which step brokeThis feedback loop is how the gbrain maintainers find fragile upgrade paths. Thank you.++## [0.38.0.0] - 2026-05-20**Your brain is now yours.**@@@ -34454,7 -34432,7 +34548,6 @@@ The full plan estimated 12-14 weeks acr**Plan:** `~/.claude/plans/system-instruction-you-are-working-shimmying-breeze.md`. Wave went through `/plan-ceo-review` (Option B locked), `/plan-eng-review` (7 decisions D3-D9), and two codex outside-voice rounds (D11-D13 absorbed; round 2 caught blocker on missing Slice 1 stable-ID migration + 4 non-blockers).--## [0.38.0.0] - 2026-05-21**One command to capture anything into your brain. Local OR hosted, doesn't matter.**@@@ -34593,6 -34571,6 +34686,7 @@@ These do not block the v0.38 release: t`gbrain upgrade` should do this automatically. If it didn't, or if `gbrain doctor`warns about a partial migration:++## [0.37.11.0] - 2026-05-21**Fresh `gbrain init --pglite` works out of the box now.**@@@ -34784,6 -34762,6 +34878,7 @@@ The hard problem was the validator (shi- The auto-fix engine's key-scope decision matters. If a future need shows up to normalize arrays for keys beyond `tags`/`aliases` (e.g. an `authors:` field), extend the regex allow-list explicitly. Don't broaden to `[A-Za-z_][\w-]*` — that would rewrite typed-numeric arrays (`scores: ["1", "2"]`) into string arrays and break downstream typed-claim extraction.- Codex outside-voice review on this wave produced 11 findings; 1 dropped a planned layer (put_page auto-normalization, because storage hashes parsed fields not raw bytes), 1 narrowed the allow-list, 5 fixed plan housekeeping. Original PRs #1217 (closed, serializer fix) and #1238 (closed, four-layer defense-in-depth) absorbed into this wave.++## [0.37.8.0] - 2026-05-20**For agents indexing source code with gbrain, the right embedding model is now obvious — and the brain tells you so out loud.**@@@ -35103,6 -35081,6 +35198,7 @@@ PR #1217 was closed; thanks to @garryta#### For contributors- `js-yaml` is now an explicit direct dep. New code that needs YAML emission/parsing should import from it directly rather than relying on gray-matter's transitive resolution.++## [0.37.4.0] - 2026-05-20**A nightly safety net for the bug class that bit gbrain 10 times in 2 years.**@@@ -35197,6 -35175,6 +35293,7 @@@ Three review passes ran on the plan bef- `test/regressions/v0_36_frontier_cap.test.ts` — 4 pinned contracts: cap-unset back-compat, cap-hit bounds result to `<= cap+1` (the actually-useful protection invariant), MCP wire-shape preservation (still Array), concurrency independence (two concurrent calls on same engine with different caps — larger cap sees >= as many nodes).- `CLAUDE.md` — file taxonomy gains `tests/heavy/*.sh` + `test/fuzz/*.test.ts` entries; `traverseGraph` entry notes the new opt + the stripped truncation callback.- `llms-full.txt` regenerated.++## [0.37.3.0] - 2026-05-19**Your agent now catches skills that would call the web before checking the brain. The same class of miss that flagged Garry's own Palantir tweet as a risk because none of the three eval models knew he built it.**@@@ -35430,6 -35408,6 +35527,7 @@@ By default `brainstorm` saves to `wiki/## To take advantage of v0.37.1.0`gbrain upgrade` should do this automatically. If it did not:++## [0.37.0.0] - 2026-05-19**Skillpacks become a real ecosystem. You can ship one, someone else can install it, and gbrain has an opinion about quality.**@@@ -35520,6 -35498,6 +35618,7 @@@ If `gbrain skillpack doctor` or `gbrai- `garrytan/gbrain-skillpack-registry` GitHub repo setup with the CI workflow split (codex G3).- Cross-listing in `mvanhorn/printing-press-library` (external repo PR).- Generated `gbrain-cli` via Printing Press for non-gbrain agents to hit a remote gbrain.++## [0.36.6.0] - 2026-05-19**Your photos finally show up when you ask. The brain just got eyes.**@@@ -36049,6 -36027,6 +36148,7 @@@ What this means: you can run a side-by-```If any step fails, file an issue at https://github.com/garrytan/gbrain/issues with `gbrain doctor` output and `~/.gbrain/upgrade-errors.jsonl` if it exists.++## [0.36.2.0] - 2026-05-17**retired hosted provider is the new default. Faster, cheaper, better quality on real queries. Existing users get a one-shot switch prompt with cost estimate; new installs land on it out of the box. README rewritten to match what gbrain actually is in 2026.**@@@ -36151,6 -36129,6 +36251,7 @@@ If the prompt didn't fire (non-TTY upgrIf any step misbehaves, please file an issue at https://github.com/garrytan/gbrain/issues with the output of `gbrain doctor --json` and the relevant `~/.gbrain/upgrade-errors.jsonl` if it exists.Credit: the retired hosted provider for the embedding + reranker stack (original attribution is preserved in the pre-removal Git revision cited above). Codex outside-voice review caught the double-re-embed bug class pre-implementation.++## [0.36.1.1] - 2026-05-18**Twenty-eight community-reported bugs fix themselves on your next `gbrain upgrade`.** The most painful ones first: fresh installs work again, `/admin` actually serves the dashboard, `gbrain config set openai_api_key` stops echoing your secret to stderr, and `extract_facts` no longer dead-letters autopilot when a sync no-op passes an empty slug list.@@@ -36265,6 -36243,6 +36366,7 @@@ Real appreciation for the community on- **Cluster D singletons**: orphans soft-delete (v0.35.5.0), doctor `node_modules` walker (v0.35.5.0 `pruneDir`), Voyage 2048d `output_dimension` (v0.33.1.1 PR #962), doctor stale verb names (v0.31.7). (#922, #1033, #799, #865, #835, #1021.)- **Cluster E troll**: #1114 closed and locked.- **PRs absorbed by structural fixes**: #1050 (doctor crash count — v0.35.5.0 `summarizeCrashes()`), #1054 (schema v44→v45 wedge — v0.35.5.0 bootstrap extension), #1065 (embed PGLite hang — v66 partial index).++## [0.36.1.0] - 2026-05-17**The brain learns how you tend to be wrong, then argues against your blind spots on every advice call.**@@@ -36864,6 -36842,6 +36966,7 @@@ A fix-wave shipping privacy work, bug fThe supervisor check should show `clean_restarts=N` in the message when applicable, and `stub_guard_24h` should appear only if the guard has fired.3. **If `gbrain doctor` warns about something unexpected,** please file an issue athttps://github.com/garrytan/gbrain/issues with the doctor output.++## [0.35.3.1] - 2026-05-15**The contradiction probe stops crying wolf on time. Six-member verdict enum + page-level date in the prompt + a new privacy lint for proposals.**@@@ -37229,6 -37207,6 +37332,7 @@@ Underneath that, the supervisor and `gb- Zero `max_crashes_exceeded` eventsIf `health_warn` with `reason: 'clean_restart_budget_exceeded'` starts firing on your deployment, that's the new D2 budget telling you the watchdog is firing too often. On Linux that means the worker really is leaking; investigate. On macOS that's the VmRSS-fallback fire pattern — set a higher `--max-rss` threshold to suppress.++## [0.34.2.0] - 2026-05-14**Path-based import checkpoint. The newest files in a partial import no longer disappear.**@@@ -37605,6 -37583,6 +37709,7 @@@ To exercise the new W1/W2 edge shapes oPre-v0.33.3 the four code-intelligence commands from v0.20+ Cathedral II lived in `CLI_ONLY` at `cli.ts:30`. An agent running through MCP saw `query`/`search` but no structural retrieval, so it grepped, missed callers in string literals, shipped plans with broken call chains, and got caught in review. v0.33.3 closes that gap and lays the foundation work that v0.34 Cathedral III (recursive blast/flow + Leiden clusters + wiki) will build on top of.This release was scoped after Codex's outside-voice review caught two load-bearing premise gaps in the original v0.34 plan: the call graph stored bare callee tokens (not qualified names), and source routing was already broken in `query` and `two-pass.ts`. Both are fixed here before any user-facing recursive op ships.++## [0.33.2.1] - 2026-05-14**Doc-only: name the fork-PR escape hatch so AI-authored PRs don't drop their CI secrets.**@@@ -37798,6 -37776,6 +37903,7 @@@ The release is eval-gated by design (pe### Process notesThe plan went through `/office-hours` → `/plan-ceo-review` → Codex outside-voice → `/plan-eng-review`. Each pass changed the shape. Office-hours locked the headline + eval-first principle. CEO review proposed 8 deliverables in SCOPE EXPANSION mode. Codex pushed back on 5 fronts (sequencing, eval methodology, library choice, layer separation, schema design) and was accepted on all 5 + 3 substrate defects. Eng review locked the ranking formula, the two-layer eval gate, the 10-case test list, and the SQL-level typeFilter. Net result: scope reduced ~75% from the cathedral version while shipping the actual wedge users ask for.++## [0.33.0] - 2026-05-11**`gbrain recall` now answers "what changed since last time?" in one command, and thin-client installs stop silently lying about empty results.**@@@ -37981,6 -37959,6 +38087,7 @@@ after Codex round 1 (10 findings; 3 stroption) → Codex round 2 found 9 more findings (4 load-bearing, 5 mechanicalhardening); all absorbed. Final scope: 13 files, ~800 LOC implementation+ ~400 LOC tests. CEO + ENG + CODEX×2 CLEARED at plan approval.++## [0.32.8] - 2026-05-11**Multi-source brains finish what they start. Embed, extract, takes, patterns, integrity, migrate-engine all now respect which source a page belongs to. The disk-side collision is fixed via a per-source subdir layout, and a CI gate prevents the bug class from coming back.**@@@ -38374,6 -38352,6 +38481,7 @@@ The bigger swing (chunk-level `revises- `__setChatTransportForTests` already existed at `src/core/ai/gateway.ts:421` — judge tests use direct `chatFn` injection instead (cleaner for one-shot wrappers).- Codex outside-voice review caught 5 fixes that are now standard: command rename (`contradictions` → `suspected-contradictions`), judge_errors as first-class output, prompt_version + truncation_policy in cache key, Wilson CI on headline, query-conditioned judge prompt. All folded in.- Decision-point not in TODOS.md per user preference: after a month of nightly runs, check Wilson CI lower-bound. If <5%, source-boost + recency-decay + curated pages are doing the job and the bigger swing (chunk-level `revises`) stops here. If >15%, plan for v0.34+.++## [0.32.5] - 2026-05-11**Time, place, and what you're doing — reinjected on every turn, no matter how hard the session got compacted.**@@@ -40476,7 -40454,7 +40584,6 @@@ stops being a search engine and startsvs computing the boundary in JS), v0.29 always picks the parity-safepath. See engine-parity-salience.test.ts for the smoke.--## [0.28.12] - 2026-05-07**gbrain hits 97.60% retrieval recall on the public LongMemEval benchmark.@@@ -40583,7 -40561,7 +40690,6 @@@ gbrain eval longmemeval ~/datasets/longIf anything looks off, file at https://github.com/garrytan/gbrain/issueswith `gbrain doctor` output.--## [0.28.11] - 2026-05-07**Mix providers: OpenAI for text, Voyage for images. One brain, two embedding pipelines.**@@@ -41147,7 -41125,7 +41253,6 @@@ issue with the doctor output and we wil- output of `gbrain --version`- which step broke--## [0.28.4] - 2026-05-06## **`gbrain eval cross-modal` — three frontier models score your skill output BEFORE tests cement it.**@@@ -41472,7 -41450,7 +41577,6 @@@ core feature- `bun run check:admin-scope-drift` — new gate; fails the build if`admin/src/lib/scope-constants.ts` falls behind `src/core/scope.ts`.--## [0.28.1] - 2026-05-06## **Long-running deployments stop drowning in zombie processes. /health stops racing the orchestrator. Pool slots free immediately on shutdown.**@@@ -42546,7 -42524,7 +42650,6 @@@ React admin dashboard baked into the bi**Tests:**- `test/oauth.test.ts` ... 34 test cases covering provider: register, getClient, client_credentials exchange, auth_code flow with PKCE, refresh rotation, verifyAccessToken (OAuth + legacy fallback), revokeToken, sweepExpiredTokens, scope annotations on all 30 operations. Plus the post-/cso security-fix regressions: 10-concurrent auth code exchange (only 1 wins), 10-concurrent refresh rotation (only 1 wins), redirect_uri HTTPS-or-loopback gate, and pgArray comma-element round-trip (1 element in → 1 element out).--## [0.25.1] - 2026-05-01## **Your brain can now read books with you. Nine new skills land at once.**@@@ -42883,6 -42861,6 +42986,7 @@@ No schema migration. Existing brains wo### Cross-model review creditThis release's quality is directly attributable to running `/plan-ceo-review` + `/plan-eng-review` + `/codex review` in sequence on the v0.19.0 production-readiness audit. Codex caught one critical and three high findings the in-skill review missed: cumulative-install regression (load-bearing), `--llm` public-contract drift (4-surface scrub), Tier 2 framing as unowned dependency, and 6.5 hours of guesswork named files in the flake-diagnosis plan. The cross-model agreement on every fix is the signal that turns "ship the demo path" into "ship the production path."++## [0.23.2] - 2026-04-30**The dream cycle now stamps every page it writes. The guard checks for the stamp. No content guessing, no false positives.**@@@ -42909,6 -42887,6 +43013,7 @@@ The configurable verdict model from v0.- 12 new test cases in `test/cycle-synthesize.test.ts`:- `self-consumption guard (v0.23.2 marker-based)`: REGRESSION fixture built from a real `Page → renderPageToMarkdown → isDreamOutput` round-trip; legitimate user note citing a slug is NOT skipped; CRLF + BOM tolerated; whitespace and case variants tolerated; `false`/absent values do NOT match; `dream_generatedfoo` (no word boundary on key) does NOT match; marker buried past 2000 chars does NOT trigger (perf bound); `bypassGuard=true` overrides; `discoverTranscripts` respects the bypass; `DREAM_OUTPUT_MARKER_RE` is anchored at byte 0.- `judgeSignificance`: passes verdict_model override to `client.create`; defaults to `claude-haiku-4-5-20251001` when omitted; returns `worth_processing=false` on unparseable judge output.++## [0.23.1] - 2026-04-30**`bun run ci:local` runs the full CI gate on your laptop, 4-way sharded, in ~100 seconds warm. Doc-only diffs go in 5 seconds.**@@@ -43128,7 -43106,7 +43233,6 @@@ Eight findings from the cross-model rev- Daily token budget cap. Cooldown is the v1 spend bound.- Cross-modal pattern review (currently reflections-only).--## [0.22.16] - 2026-04-29**End-to-end claw-test friction harness — every release now gets a fresh-install dry-run.**@@@ -43795,7 -43773,7 +43899,6 @@@ Then point Claude Desktop, claude.ai/coIf anything breaks: `gbrain doctor`, `~/.gbrain/upgrade-errors.jsonl` (if present), and please file an issue at https://github.com/garrytan/gbrain/issues with both.--## [0.22.6.1] - 2026-04-26**Old brains can upgrade again.**@@@ -44182,6 -44160,6 +44285,7 @@@ If you run `gbrain jobs supervisor` (th- The watchdog cleanup path (`gracefulShutdown`) is intentionally co-located with `MinionWorker.stop()`. When a third caller appears (e.g., a future `pause()` method), extracting `unifiedShutdown(reason)` becomes worth the refactor. Until then, three lines is not a DRY emergency.- `isRetryableDbConnectError()` lives in `src/core/db.ts` and owns its own 5-pattern matcher. PR #406 (when it merges) introduces a 13-pattern matcher in `src/core/minions/supervisor.ts`; the right move at that merge is to delete the supervisor's local copy and import from `db.ts` (correct dependency direction, low → high). A follow-up TODO captures this.++## [0.22.1] - 2026-04-26**Autopilot stops being a noisy neighbor.**@@@ -45566,6 -45544,6 +45670,7 @@@ Docs-only release. No code changed. Zer**Added**- **Minions worker deployment guide** — new `docs/guides/minions-deployment.md` covering watchdog cron patterns, inline `--follow` for cron-only workloads, and the sharp edges of running `gbrain jobs work` against Supabase in production. Addresses a real gap: existing Minions docs (`minions-fix.md`, `minions-shell-jobs.md`) cover schema repair and shell-job security, not deploy patterns. Contributed by your OpenClaw via #287. Pre-landing accuracy pass corrected five factual bugs against current source: the `max_stalled` column default (5, not 1 or 3), the stalled-jobs smoke-test query (`active`, not `waiting`), the SIGTERM-to-SIGKILL grace window (10s minimum, not 2s), the cron env pattern (crontab env lines, not `source ~/.bashrc`), and the `--follow` exit semantics (blocks until submitted job is terminal, not until queue is empty).++## [0.16.0] - 2026-04-20## **Durable agents land. Your LLM loops survive crashes, timeouts, and worker restarts now.**@@@ -45837,6 -45815,6 +45942,7 @@@ Progress for `embed`, `files`, `export`#### Tests- New: `test/progress.test.ts` (17 cases — mode resolution, rate gating, EPIPE paths, SIGINT singleton, child phase composition), `test/cli-options.test.ts` (18 cases — flag parsing, `--quiet` skillpack-check collision regression, global-flag strip-and-dispatch), `test/e2e/doctor-progress.test.ts` (3 cases, Tier 1 — spawns the real CLI against a real Postgres, asserts stderr JSONL matches the schema and stdout stays clean).++## [0.15.1] - 2026-04-21## **Fix wave: 4 hot issues that blocked real brains, landed together.**@@@ -46188,6 -46166,6 +46294,7 @@@ The abort-path fix is the quietly-impor#### Pre-ship reviewFive independent rounds surfaced 29 issues across the plan. 26 resolved before a single line of code was written: spec-review adversarial subagent (x2 iterations) caught implementer-ergonomic gaps (caller derivation, mkdirSync, ISO-week formatter). CEO review + SELECTIVE EXPANSION cherry-picked argv form, audit log, SIGTERM grace, env allowlist, MCP-guard defense-in-depth, honest FS-read trust model, orphan-child `setTimeout.unref()` fix. DX review added the starvation warning block. Eng review added `ctx.shutdownSignal` separation, revised trusted-arg from opts-fold to separate 4th arg (stops accidental pass-through via `{...userOpts}` spreads), 18 additional test cases, 4 iron-rule regression tests. Codex outside voice caught 4 architectural dealbreakers: the worker abort silent-return bug (the "contract is a lie" finding), `--timeout-ms` CLI flag and `submit_job` param both missing, `PROTECTED_JOB_NAMES.has(name)` whitespace bypass before normalization. Effort estimate revised 8-10h → 16-20h once the full review was done.++## [0.13.1] - 2026-04-20## **The brain stops being a write-once graph and starts being a runtime.**@@@ -46859,6 -46837,6 +46966,7 @@@ Wave 3 fixes were contributed by **@gar- `test/resolver.test.ts` validates RESOLVER.md coverage and routing consistency- `skills/manifest.json` now has `conformance_version` field and lists all 24 skills- Identity templates in `templates/` (SOUL.md, USER.md, ACCESS_POLICY.md, HEARTBEAT.md)++## [0.9.3] - 2026-04-12### Added