Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

v0.60.725.0 release (#9429)

Garry Tan319e8db251af
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index b4ae293779..57620a53b4 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain",
- "version": "0.60.724.0",
+ "version": "0.60.725.0",
"description": "Personal knowledge brain for your coding agent — hybrid search, synthesis, graph traversal, and durable cross-session memory over Postgres/PGLite with pgvector, plus a curated brain-first skill set.",
"author": {
"name": "Garry Tan",
diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json
index 3f28c157ba..cd715ded86 100644
--- a/.codex-plugin/plugin.json
+++ b/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain",
- "version": "0.60.724.0",
+ "version": "0.60.725.0",
"description": "Personal knowledge brain for your coding agent — hybrid search, synthesis, graph traversal, and durable cross-session memory over Postgres/PGLite with pgvector, plus a curated brain-first skill set.",
"author": {
"name": "Garry Tan",
diff --git a/BOOTSTRAP_FOR_AGENTS.md b/BOOTSTRAP_FOR_AGENTS.md
index 226b34980c..86468bac5e 100644
--- a/BOOTSTRAP_FOR_AGENTS.md
+++ b/BOOTSTRAP_FOR_AGENTS.md
@@ -1,4 +1,4 @@
-<!-- gbrain-runbook-stamp: 0.60.724.0 -->
+<!-- gbrain-runbook-stamp: 0.60.725.0 -->
<!-- This stamp must equal the VERSION file at every release; CI enforces it
(scripts/check-bootstrap-tag.sh). `gbrain bootstrap status` compares it to
the installed binary and warns on skew. -->
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 05eee52451..bc8d51e9fc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,109 @@ credits are retained; no result has been reassigned to another provider. Origina
identifiers and attribution are available in the pre-removal Git revision
`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).
+## [0.60.725.0] - 2026-11-15
+
+**Doctor's Git checks now finish on large brains, and a check that could not see everything says health unknown instead of ok.**
+
+### Changed
+- `db_ahead_of_git` and `strict_facts_outside_git` read the 800 most recently changed pages of each source instead of every page, and their messages say how far back they looked. `gbrain sources git-gap <source-id>` still reads every page.
+- When that census runs out of its time budget or cannot run, `db_ahead_of_git`, `strict_facts_outside_git` and `git_index_lag` now report a warning with health unknown instead of ok.
+- Doctor runs the checks that catch lost writes before its full scans.
+
+### Fixed
+- `strict_facts_outside_git` no longer says every fact has a Git home when a fenced fact sits on a page older than that window. It reports health unknown, and `gbrain sources git-gap <source-id>` counts the whole source.
+
+<!-- behavior-change: doctor_git_gap_unknown_gbra541 -->
+
+**A batch of small fixes: folder attach retries, dropped webhook events, cut-off stdio replies, and clearer help and doctor text.**
+
+### Fixed
+- Retrying a managed folder attach with the same `--request-id` replays the first attempt's default-search choice instead of failing with `idempotency_conflict`.
+- Two different GitHub events on one item within 30 seconds are both processed; a redelivery of the same event is still deduplicated.
+- Local `serve` and the thin-client bridge deliver a large stdio reply in full when stdin closes right after it.
+- Atoms stamped by `repair visibility` can be adopted by a later generation again, without widening their visibility (#9386).
+- A migration that keeps failing gets the `migrations_pending` notice with the `apply-migrations --force-retry <version>` step.
+- Doctor's `derived_visibility` check counts only active sources, so it no longer suggests a repair that finds nothing.
+- `repair purged-page-facts`: a preview that approves nothing prints an apply command that reports nothing to do.
+- A DNS failure on a Supabase pooler URL points at this machine's DNS and network instead of a paused project (#8531).
+- `sources status --json` prints each held file's fix with the `--brain` pin, so it runs as written (#9319).
+- A hosted install asking setup for the skill resolver is told the command that works without a local brain (#9245).
+
+### Changed
+- `gbrain setup codex` and `--remove` keep a `.bak.<timestamp>` copy of each `config.toml` or `hooks.json` they change and print its path.
+- `gbrain setup codex` prices the search-mode cost matrix with OpenAI models.
+- `embed --help` names the `--stale --facts --source <id>` form for facts saved with `remember`; `upgrade --help` no longer mentions a postinstall step; doctor's consent wording says gbrain makes no provider request on its own.
+- The enrich skill says to leave out empty sections instead of writing `[No data yet]` (#7061).
+
+<!-- behavior-change: setup_codex_backups_gst2779 -->
+
+**Keyless search finds pages that hold most of the question's words.** On a brain with no embedding provider, a question used to miss any page that lacked even one of its words whenever another page held all of them: "SSO Starter plan" found the pricing and decisions pages and never the call notes that mention SSO and Starter. Now, when the first page of results comes back shorter than the limit, search asks the keyword index once more for pages that hold only some of the words and adds them after the rows it already had. Every row search returned before comes back exactly as it did: same pages, chunks, order and scores. The added rows go through the same stages as any other row (the caller's read policy, redirects, superseded-page warnings, the evidence and injection checks when they are on, the alias and facts steps of `search` and `query`, evidence delivery), inside the same request with the same decision time budget. They never repeat a page, never take the page past its limit, score below the rows above them and carry `keyword_fill: true` (also in lean remote rows); `--explain-target` says the page matched only some of the words. If adding them would change any other row, or a check that is on was skipped for them, they are left out and the result is the one search returns today; a row from a source on `decide.egress.deny_sources` is treated like any other row from that source, which today means it is returned and counted as judged (GST-2786); a failed or timed-out lookup is reported like any other incomplete keyword arm. Only the `search` and `query` operations (the CLI commands and MCP tools of those names) add these rows, because they are where the result is checked against the one without them; features that call search internally (think, recall, enrichment, whoknows and the rest) get the rows they got before. Later pages (an offset above zero), questions in Chinese, Japanese or Korean (their keyword match already works term by term) and brains with embeddings are unchanged. There is no new setting.
+
+On LongMemEval S run keyless through the `query` operation (470 scored questions, top 10), recall_all@10 rose from 80.64% to 91.06% (+10.43 points, 95% interval +7.87 to +13.19; 49 questions better, none worse), recall_all@5 from 72.13% to 81.06% and MRR from 0.8726 to 0.8770; none of the 451 questions with a hit ranked it lower, and the rows returned without the added pages were the same in all 500 questions. The search function gives the same numbers when asked for the added rows; with the clock frozen its rows without them were identical in every field in all 500 questions, and when not asked it added nothing. The extra lookup ran on 103 of 500 questions and added a median 37.8 ms (p95 55.3 ms) to the search on PGLite; through the `query` operation those questions took a median 125 ms longer (p95 210 ms), because the operation's later steps run twice to prove the other rows did not change. On Postgres a cold search whose first page is short costs 65 database round trips, the same as a search whose all-words match is empty (master: 55). With the evidence or injection check on, the added rows cost one more provider request.
+
+<!-- behavior-change: keyless_any_word_fill_gst2762 -->
+
+### Itemized changes
+
+- `src/core/search/hybrid.ts`, `src/core/search/hybrid/keyword-only.ts`: the search function adds the rows only for a caller that passes `anyWordFill`, which the `search` and `query` operations do; a Chinese, Japanese or Korean question skips the extra lookup. The keyless path's row stages are one function, called once for the rows search returns today and, when that page is short, once more for the any-word candidates with the first page held as context, so duplicates, collapsed copies and redirect targets of a returned page are dropped. The added rows are scored below the page's lowest row, checked, and appended up to the limit.
+- `src/core/search/decide-stage.ts`: `gateFillRows` runs the evidence and injection checks on the added rows with what is left of the request's one time budget and adds their counts to the request's one record; if the first page's check failed open, or the added rows cannot be judged, none are added and the result says so.
+- `src/core/ops/search.ts`: `search` and `query` run their own steps on the rows without the added pages, then again with them, and return the second result only when every other row, the alias record, the confidence grade and the delivered text are the same. A page the alias step already returns is not added a second time.
+- `src/core/search/keyword-identifier-probe.ts`, `src/core/pglite-engine.ts`, `src/core/postgres-engine.ts`, `src/core/types.ts`: the keyword arm takes `orFill`, which runs only the any-word statement (the all-words rows are already in hand) and tags its rows `keyword_relaxed` and `keyword_fill`; without it the arm behaves as before. On Postgres the extra lookup remembers its own statement timeouts apart from an ordinary search's, so a timed-out extra lookup never makes the next search skip its keyword statement.
+- `src/core/search/lean-rows.ts`, `src/core/search/explain-target.ts`: lean rows keep `keyword_fill`; the explain trace names the added arm and says the page matched only some words.
+- Tests: `test/search/keyless-any-word-fill.test.ts` (PGLite and Postgres) with property tests at the search function and at the `search` and `query` operations that the rows without the added pages come back unchanged; `test/search/keyless-any-word-fill-gates.serial.test.ts` for the checks, the shared time budget and the reported failures; `test/keyword-timeout-negative-cache-6495.test.ts` for the separate timeout memory. The C5 and evidence off-path goldens gain the appended rows and their counts only (the think prompt golden is unchanged), and the export-surface golden gains the new fields.
+
+**Two sync tests are easier to trust: one no longer fails on a busy runner, and the other says why a page failed when it fails.** Neither changes what it checks.
+
+### Tests
+
+- `test/sync-pass-reader-gaps-6712.test.ts`: the delegated-deadline test slept on the real clock and then checked the deadline 50 ms before it expired, so a runner that woke a timer 50 ms late failed it (seen once on CI, 5 of 5 passes locally). It now drives `setTimeout` and `performance.now` with Bun's fake timers, with the same 600 ms deadline, 400 ms window and 450, 350 and 500 ms steps. A probe that stalls the event loop for 60 ms after the first slice fails the old test and passes the new one. A probe that stops a committing slice from extending the deadline still fails the new one.
+- `test/e2e/persistence-preparation-lock-wait-postgres.test.ts`: when the drain doesn't end `synced`, the test prints every page that didn't commit. For a page that failed with `storage_error`, that printout carried only the generic public message, so a CI failure (one page, `storage_error`, while the test held its lock) couldn't be traced: it passed 44 of 44 times locally, 24 of them with four copies running at once. The printout now includes each page's recorded failure detail (the error class, the database error text, the statement and the source frame), so the next failure names its cause.
+
+**Codex starts the gbrain MCP server and hooks even when bun is not on its PATH.**
+
+<!-- behavior-change: launcher_records_bun_gst2784 -->
+
+### Fixed
+- After `gbrain setup codex`, a Codex session started without bun on its PATH (the desktop app, a launcher, a terminal opened before the shell profile changed) failed with `/usr/bin/env: 'bun': No such file or directory` and showed no gbrain tools, with nothing telling you why. gbrain's hook launcher, which every MCP server entry and hook setup writes runs through, now records the Bun that installed gbrain, so those entries start from any PATH. The same gap closes for Claude Code, Hermes and OpenClaw entries that run through the launcher. The compiled binary needs no Bun and is unchanged. (GST-2784)
+- `gbrain doctor` reports a launcher that records no Bun, or one whose Bun is gone, instead of calling the wiring healthy.
+
+### To take this fix
+- `gbrain upgrade` (its post-upgrade step rewrites the default install's launcher), or rerun `gbrain setup codex`. Neither changes config.toml, hooks.json or Codex's trust entries. A launcher under another gbrain home is rewritten by rerunning the setup that wrote it; `gbrain doctor` names it.
+
+**A large source whose sync keeps stopping at its run limit now finishes catching up instead of being reported as abandoned.**
+
+### Fixed
+- A sync pass that saved at least one page or hold before its run limit stopped it now counts as progress, so `gbrain sync status` and `gbrain doctor` no longer report `pass_abandoned` for a source that is still moving. A pass that saved nothing still counts toward the abandoned streak, and the open pass row shows how many entries it has settled so far.
+- On a read-only mirror, a page you edited in gbrain whose file is gone upstream is kept as a database-only page. Sync results and status report these as `carried` instead of listing them as holds to fix, and no command advises `--prefer database` on a mirror, since gbrain never writes a mirror's files.
+- A symlink whose target does not exist is skipped and counted (`skipped.symlink_dangling`) instead of held as an unreadable file, and an older hold for one is released. A dangling link at a path that still has a live page stays held, and so does a committed file whose working copy alone was replaced by a dangling link.
+- The commit notifier no longer starts a sync for a source with sync turned off (`config.syncEnabled=false`). Turning sync back on makes the notifier watch it again.
+
+<!-- behavior-change: notifier_sync_disabled_gst2515 -->
+
+**`gbrain setup claude-code --shape company` (or `both`, and the same for `codex`) gives a brain a company part: a `company` source in a folder gbrain owns, six empty company pages, your docs folder imported read only, and lines in the agent's instructions that say which pages to read.** The pages are `company/facts`, `company/decisions`, `company/pricing`, `company/customers`, `company/calls` and `company/playbooks`. Each is an empty form marked `status: stub`, so nothing about the company is invented, and a re-run never overwrites a page you have edited. `--docs DIR` imports that folder's markdown once without writing into it; above 500 files setup prints the import command instead of running it. On a brain that serves one person the company pages join default search. On a brain more than one person reads they stay out of it, and setup asks you before adding them. `--shape both` sets up the personal and company parts together. `--team` creates nothing for the company part and explains where a shared company brain lives, either in a hosted workspace or on a self-hosted brain that serves several people. If the company folder already holds files, setup leaves it alone, keeps the company lines out of the agent's instructions and asks you to move the files before you run it again.
+
+### Itemized changes
+
+- `src/commands/setup-brain-layout.ts`: the company and both shapes, the company starter pages, the `company` source and its read-only docs import, company lines in the managed `gbrain:brain-layout` block (now version 2), the team route, and new options in the `brain_shape` question. Personal pages are written before the company source is added, so they stay in your default source. A company folder that already exists and is not an empty folder (a file included) is refused instead of adopted. The re-run command setup hands back keeps `--team`, and after a refused company folder it asks you first instead of re-running by itself. Both reply formats of `sources add --json` are read when checking whether the company source joined default search.
+- `src/commands/setup.ts`: `--shape company|both`, `--docs DIR` and `--team` for `claude-code` and `codex`.
+- Docs: `docs/guides/brain-layout.md` covers the company part and a team company brain.
+- Tests: `test/setup-brain-layout.test.ts`.
+
+**Imported conversations no longer keep three kinds of secret that the last cookie and `.netrc` fix still let through.** `gbrain transcripts ingest` now also redacts a `.netrc` password when the entry is written over several lines (`machine`, `login` and `password` each on its own line), a curl cookie passed with `-b` on its own line of a command split with trailing backslashes (what Chrome's "Copy as cURL" produces), and a quoted cookie value inside escaped JSON (`sid=\"…\"`). Before this change all three were copied into the searchable page as plain text. Cookie names, curl's other arguments and ordinary prose near these shapes stay as they were.
+
+What to do: conversations imported earlier keep what they stored. `gbrain doctor` asks for a fresh audit; run `gbrain transcripts audit-secrets --json` to list affected pages (slugs and hit counts, never values). The `sources push` gate and the compiled-context scan are unchanged.
+
+Still not caught: a curl cookie written with bash's `$'…'` quoting (`-b $'sid=…'`, which Chrome's "Copy as cURL (bash)" uses for a cookie holding a quote or non-ASCII text); a `.netrc` entry or curl command split across two messages; and a cookie header whose opening and closing escaped quotes differ in depth (`sid=\\\"…\"`), where that value and the pairs after it stay. In the other direction, a line that is only `default` or `machine <word>` followed by a line that is only `password <word>` has that word redacted even in prose.
+
+### Itemized changes
+
+- `src/core/secret-scan-labeled.ts`: a `password` line inside a multi-line `.netrc` stanza (opened by a `machine` or `default` line, kept open by `login`, `account` and `password` lines, blank lines and `#` comments) is redacted. The line must be only `password <value>`, so prose such as "machine learning" followed by "password managers are useful" stays.
+- `src/core/secret-scan-cookie.ts`: a `-b` on a line that continues a curl command (each earlier line ends in `\`) counts as curl's cookie argument; a cookie value quoted with escaped quotes (`\"`, or `\\\"` one level deeper) is read. A `-b` after a continued line that is not curl (`git checkout -b`) stays.
+- `src/core/secret-scan.ts`: the transcript-lane scan carries the `.netrc` stanza and the curl continuation from line to line.
+- `src/core/transcripts/secret-audit.ts`: `TRANSCRIPT_SECRET_AUDIT_VERSION` 6 → 7, because the audit now finds these shapes on stored pages.
+- Tests: `test/transcripts-secret-cookie-header.test.ts`, `test/transcripts-secret-corpus.test.ts`.
+- Docs: `docs/guides/data-ingestion.md#credential-redaction` and the key-files entries.
+
## [0.60.724.0] - 2026-11-15
- `sources_resolve_path` no longer shows that a committed file exists, or its frontmatter slug, to a member who could not read the page that file would become. Before, such a file was hidden only once it had a page. The brain owner's own connections are unchanged.
diff --git a/VERSION b/VERSION
index 3c1aaf91c1..77cbdffc0d 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.60.724.0
+0.60.725.0
diff --git a/changelog.d/capy-gbra-541-doctor-scale.md b/changelog.d/capy-gbra-541-doctor-scale.md
deleted file mode 100644
index c3bbdfe197..0000000000
--- a/changelog.d/capy-gbra-541-doctor-scale.md
+++ /dev/null
@@ -1,11 +0,0 @@
-**Doctor's Git checks now finish on large brains, and a check that could not see everything says health unknown instead of ok.**
-
-### Changed
-- `db_ahead_of_git` and `strict_facts_outside_git` read the 800 most recently changed pages of each source instead of every page, and their messages say how far back they looked. `gbrain sources git-gap <source-id>` still reads every page.
-- When that census runs out of its time budget or cannot run, `db_ahead_of_git`, `strict_facts_outside_git` and `git_index_lag` now report a warning with health unknown instead of ok.
-- Doctor runs the checks that catch lost writes before its full scans.
-
-### Fixed
-- `strict_facts_outside_git` no longer says every fact has a Git home when a fenced fact sits on a page older than that window. It reports health unknown, and `gbrain sources git-gap <source-id>` counts the whole source.
-
-<!-- behavior-change: doctor_git_gap_unknown_gbra541 -->
diff --git a/changelog.d/capy-gbra-541-wave-a.md b/changelog.d/capy-gbra-541-wave-a.md
deleted file mode 100644
index f8f35387f2..0000000000
--- a/changelog.d/capy-gbra-541-wave-a.md
+++ /dev/null
@@ -1,21 +0,0 @@
-**A batch of small fixes: folder attach retries, dropped webhook events, cut-off stdio replies, and clearer help and doctor text.**
-
-### Fixed
-- Retrying a managed folder attach with the same `--request-id` replays the first attempt's default-search choice instead of failing with `idempotency_conflict`.
-- Two different GitHub events on one item within 30 seconds are both processed; a redelivery of the same event is still deduplicated.
-- Local `serve` and the thin-client bridge deliver a large stdio reply in full when stdin closes right after it.
-- Atoms stamped by `repair visibility` can be adopted by a later generation again, without widening their visibility (#9386).
-- A migration that keeps failing gets the `migrations_pending` notice with the `apply-migrations --force-retry <version>` step.
-- Doctor's `derived_visibility` check counts only active sources, so it no longer suggests a repair that finds nothing.
-- `repair purged-page-facts`: a preview that approves nothing prints an apply command that reports nothing to do.
-- A DNS failure on a Supabase pooler URL points at this machine's DNS and network instead of a paused project (#8531).
-- `sources status --json` prints each held file's fix with the `--brain` pin, so it runs as written (#9319).
-- A hosted install asking setup for the skill resolver is told the command that works without a local brain (#9245).
-
-### Changed
-- `gbrain setup codex` and `--remove` keep a `.bak.<timestamp>` copy of each `config.toml` or `hooks.json` they change and print its path.
-- `gbrain setup codex` prices the search-mode cost matrix with OpenAI models.
-- `embed --help` names the `--stale --facts --source <id>` form for facts saved with `remember`; `upgrade --help` no longer mentions a postinstall step; doctor's consent wording says gbrain makes no provider request on its own.
-- The enrich skill says to leave out empty sections instead of writing `[No data yet]` (#7061).
-
-<!-- behavior-change: setup_codex_backups_gst2779 -->
diff --git a/changelog.d/capy-keyless-fill-one-pipeline.md b/changelog.d/capy-keyless-fill-one-pipeline.md
deleted file mode 100644
index 481ef8659e..0000000000
--- a/changelog.d/capy-keyless-fill-one-pipeline.md
+++ /dev/null
@@ -1,14 +0,0 @@
-**Keyless search finds pages that hold most of the question's words.** On a brain with no embedding provider, a question used to miss any page that lacked even one of its words whenever another page held all of them: "SSO Starter plan" found the pricing and decisions pages and never the call notes that mention SSO and Starter. Now, when the first page of results comes back shorter than the limit, search asks the keyword index once more for pages that hold only some of the words and adds them after the rows it already had. Every row search returned before comes back exactly as it did: same pages, chunks, order and scores. The added rows go through the same stages as any other row (the caller's read policy, redirects, superseded-page warnings, the evidence and injection checks when they are on, the alias and facts steps of `search` and `query`, evidence delivery), inside the same request with the same decision time budget. They never repeat a page, never take the page past its limit, score below the rows above them and carry `keyword_fill: true` (also in lean remote rows); `--explain-target` says the page matched only some of the words. If adding them would change any other row, or a check that is on was skipped for them, they are left out and the result is the one search returns today; a row from a source on `decide.egress.deny_sources` is treated like any other row from that source, which today means it is returned and counted as judged (GST-2786); a failed or timed-out lookup is reported like any other incomplete keyword arm. Only the `search` and `query` operations (the CLI commands and MCP tools of those names) add these rows, because they are where the result is checked against the one without them; features that call search internally (think, recall, enrichment, whoknows and the rest) get the rows they got before. Later pages (an offset above zero), questions in Chinese, Japanese or Korean (their keyword match already works term by term) and brains with embeddings are unchanged. There is no new setting.
-
-On LongMemEval S run keyless through the `query` operation (470 scored questions, top 10), recall_all@10 rose from 80.64% to 91.06% (+10.43 points, 95% interval +7.87 to +13.19; 49 questions better, none worse), recall_all@5 from 72.13% to 81.06% and MRR from 0.8726 to 0.8770; none of the 451 questions with a hit ranked it lower, and the rows returned without the added pages were the same in all 500 questions. The search function gives the same numbers when asked for the added rows; with the clock frozen its rows without them were identical in every field in all 500 questions, and when not asked it added nothing. The extra lookup ran on 103 of 500 questions and added a median 37.8 ms (p95 55.3 ms) to the search on PGLite; through the `query` operation those questions took a median 125 ms longer (p95 210 ms), because the operation's later steps run twice to prove the other rows did not change. On Postgres a cold search whose first page is short costs 65 database round trips, the same as a search whose all-words match is empty (master: 55). With the evidence or injection check on, the added rows cost one more provider request.
-
-<!-- behavior-change: keyless_any_word_fill_gst2762 -->
-
-### Itemized changes
-
-- `src/core/search/hybrid.ts`, `src/core/search/hybrid/keyword-only.ts`: the search function adds the rows only for a caller that passes `anyWordFill`, which the `search` and `query` operations do; a Chinese, Japanese or Korean question skips the extra lookup. The keyless path's row stages are one function, called once for the rows search returns today and, when that page is short, once more for the any-word candidates with the first page held as context, so duplicates, collapsed copies and redirect targets of a returned page are dropped. The added rows are scored below the page's lowest row, checked, and appended up to the limit.
-- `src/core/search/decide-stage.ts`: `gateFillRows` runs the evidence and injection checks on the added rows with what is left of the request's one time budget and adds their counts to the request's one record; if the first page's check failed open, or the added rows cannot be judged, none are added and the result says so.
-- `src/core/ops/search.ts`: `search` and `query` run their own steps on the rows without the added pages, then again with them, and return the second result only when every other row, the alias record, the confidence grade and the delivered text are the same. A page the alias step already returns is not added a second time.
-- `src/core/search/keyword-identifier-probe.ts`, `src/core/pglite-engine.ts`, `src/core/postgres-engine.ts`, `src/core/types.ts`: the keyword arm takes `orFill`, which runs only the any-word statement (the all-words rows are already in hand) and tags its rows `keyword_relaxed` and `keyword_fill`; without it the arm behaves as before. On Postgres the extra lookup remembers its own statement timeouts apart from an ordinary search's, so a timed-out extra lookup never makes the next search skip its keyword statement.
-- `src/core/search/lean-rows.ts`, `src/core/search/explain-target.ts`: lean rows keep `keyword_fill`; the explain trace names the added arm and says the page matched only some words.
-- Tests: `test/search/keyless-any-word-fill.test.ts` (PGLite and Postgres) with property tests at the search function and at the `search` and `query` operations that the rows without the added pages come back unchanged; `test/search/keyless-any-word-fill-gates.serial.test.ts` for the checks, the shared time budget and the reported failures; `test/keyword-timeout-negative-cache-6495.test.ts` for the separate timeout memory. The C5 and evidence off-path goldens gain the appended rows and their counts only (the think prompt golden is unchanged), and the export-surface golden gains the new fields.
diff --git a/changelog.d/capy-lock-wait-e2e-failure-detail.md b/changelog.d/capy-lock-wait-e2e-failure-detail.md
deleted file mode 100644
index 07d9a34dcf..0000000000
--- a/changelog.d/capy-lock-wait-e2e-failure-detail.md
+++ /dev/null
@@ -1,6 +0,0 @@
-**Two sync tests are easier to trust: one no longer fails on a busy runner, and the other says why a page failed when it fails.** Neither changes what it checks.
-
-### Tests
-
-- `test/sync-pass-reader-gaps-6712.test.ts`: the delegated-deadline test slept on the real clock and then checked the deadline 50 ms before it expired, so a runner that woke a timer 50 ms late failed it (seen once on CI, 5 of 5 passes locally). It now drives `setTimeout` and `performance.now` with Bun's fake timers, with the same 600 ms deadline, 400 ms window and 450, 350 and 500 ms steps. A probe that stalls the event loop for 60 ms after the first slice fails the old test and passes the new one. A probe that stops a committing slice from extending the deadline still fails the new one.
-- `test/e2e/persistence-preparation-lock-wait-postgres.test.ts`: when the drain doesn't end `synced`, the test prints every page that didn't commit. For a page that failed with `storage_error`, that printout carried only the generic public message, so a CI failure (one page, `storage_error`, while the test held its lock) couldn't be traced: it passed 44 of 44 times locally, 24 of them with four copies running at once. The printout now includes each page's recorded failure detail (the error class, the database error text, the statement and the source frame), so the next failure names its cause.
diff --git a/changelog.d/fix-codex-bare-path-bun-runtime.md b/changelog.d/fix-codex-bare-path-bun-runtime.md
deleted file mode 100644
index 11de4f549b..0000000000
--- a/changelog.d/fix-codex-bare-path-bun-runtime.md
+++ /dev/null
@@ -1,13 +0,0 @@
----
-important: blocker
----
-**Codex starts the gbrain MCP server and hooks even when bun is not on its PATH.**
-
-<!-- behavior-change: launcher_records_bun_gst2784 -->
-
-### Fixed
-- After `gbrain setup codex`, a Codex session started without bun on its PATH (the desktop app, a launcher, a terminal opened before the shell profile changed) failed with `/usr/bin/env: 'bun': No such file or directory` and showed no gbrain tools, with nothing telling you why. gbrain's hook launcher, which every MCP server entry and hook setup writes runs through, now records the Bun that installed gbrain, so those entries start from any PATH. The same gap closes for Claude Code, Hermes and OpenClaw entries that run through the launcher. The compiled binary needs no Bun and is unchanged. (GST-2784)
-- `gbrain doctor` reports a launcher that records no Bun, or one whose Bun is gone, instead of calling the wiring healthy.
-
-### To take this fix
-- `gbrain upgrade` (its post-upgrade step rewrites the default install's launcher), or rerun `gbrain setup codex`. Neither changes config.toml, hooks.json or Codex's trust entries. A launcher under another gbrain home is rewritten by rerunning the setup that wrote it; `gbrain doctor` names it.
diff --git a/changelog.d/gbra-542-mirror-catchup.md b/changelog.d/gbra-542-mirror-catchup.md
deleted file mode 100644
index a393f8a91e..0000000000
--- a/changelog.d/gbra-542-mirror-catchup.md
+++ /dev/null
@@ -1,9 +0,0 @@
-**A large source whose sync keeps stopping at its run limit now finishes catching up instead of being reported as abandoned.**
-
-### Fixed
-- A sync pass that saved at least one page or hold before its run limit stopped it now counts as progress, so `gbrain sync status` and `gbrain doctor` no longer report `pass_abandoned` for a source that is still moving. A pass that saved nothing still counts toward the abandoned streak, and the open pass row shows how many entries it has settled so far.
-- On a read-only mirror, a page you edited in gbrain whose file is gone upstream is kept as a database-only page. Sync results and status report these as `carried` instead of listing them as holds to fix, and no command advises `--prefer database` on a mirror, since gbrain never writes a mirror's files.
-- A symlink whose target does not exist is skipped and counted (`skipped.symlink_dangling`) instead of held as an unreadable file, and an older hold for one is released. A dangling link at a path that still has a live page stays held, and so does a committed file whose working copy alone was replaced by a dangling link.
-- The commit notifier no longer starts a sync for a source with sync turned off (`config.syncEnabled=false`). Turning sync back on makes the notifier watch it again.
-
-<!-- behavior-change: notifier_sync_disabled_gst2515 -->
diff --git a/changelog.d/setup-company-brain.md b/changelog.d/setup-company-brain.md
deleted file mode 100644
index a6a2f76cca..0000000000
--- a/changelog.d/setup-company-brain.md
+++ /dev/null
@@ -1,8 +0,0 @@
-**`gbrain setup claude-code --shape company` (or `both`, and the same for `codex`) gives a brain a company part: a `company` source in a folder gbrain owns, six empty company pages, your docs folder imported read only, and lines in the agent's instructions that say which pages to read.** The pages are `company/facts`, `company/decisions`, `company/pricing`, `company/customers`, `company/calls` and `company/playbooks`. Each is an empty form marked `status: stub`, so nothing about the company is invented, and a re-run never overwrites a page you have edited. `--docs DIR` imports that folder's markdown once without writing into it; above 500 files setup prints the import command instead of running it. On a brain that serves one person the company pages join default search. On a brain more than one person reads they stay out of it, and setup asks you before adding them. `--shape both` sets up the personal and company parts together. `--team` creates nothing for the company part and explains where a shared company brain lives, either in a hosted workspace or on a self-hosted brain that serves several people. If the company folder already holds files, setup leaves it alone, keeps the company lines out of the agent's instructions and asks you to move the files before you run it again.
-
-### Itemized changes
-
-- `src/commands/setup-brain-layout.ts`: the company and both shapes, the company starter pages, the `company` source and its read-only docs import, company lines in the managed `gbrain:brain-layout` block (now version 2), the team route, and new options in the `brain_shape` question. Personal pages are written before the company source is added, so they stay in your default source. A company folder that already exists and is not an empty folder (a file included) is refused instead of adopted. The re-run command setup hands back keeps `--team`, and after a refused company folder it asks you first instead of re-running by itself. Both reply formats of `sources add --json` are read when checking whether the company source joined default search.
-- `src/commands/setup.ts`: `--shape company|both`, `--docs DIR` and `--team` for `claude-code` and `codex`.
-- Docs: `docs/guides/brain-layout.md` covers the company part and a team company brain.
-- Tests: `test/setup-brain-layout.test.ts`.
diff --git a/changelog.d/transcript-redaction-gaps.md b/changelog.d/transcript-redaction-gaps.md
deleted file mode 100644
index 15715ffd5e..0000000000
--- a/changelog.d/transcript-redaction-gaps.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-important: security
----
-**Imported conversations no longer keep three kinds of secret that the last cookie and `.netrc` fix still let through.** `gbrain transcripts ingest` now also redacts a `.netrc` password when the entry is written over several lines (`machine`, `login` and `password` each on its own line), a curl cookie passed with `-b` on its own line of a command split with trailing backslashes (what Chrome's "Copy as cURL" produces), and a quoted cookie value inside escaped JSON (`sid=\"…\"`). Before this change all three were copied into the searchable page as plain text. Cookie names, curl's other arguments and ordinary prose near these shapes stay as they were.
-
-What to do: conversations imported earlier keep what they stored. `gbrain doctor` asks for a fresh audit; run `gbrain transcripts audit-secrets --json` to list affected pages (slugs and hit counts, never values). The `sources push` gate and the compiled-context scan are unchanged.
-
-Still not caught: a curl cookie written with bash's `$'…'` quoting (`-b $'sid=…'`, which Chrome's "Copy as cURL (bash)" uses for a cookie holding a quote or non-ASCII text); a `.netrc` entry or curl command split across two messages; and a cookie header whose opening and closing escaped quotes differ in depth (`sid=\\\"…\"`), where that value and the pairs after it stay. In the other direction, a line that is only `default` or `machine <word>` followed by a line that is only `password <word>` has that word redacted even in prose.
-
-### Itemized changes
-
-- `src/core/secret-scan-labeled.ts`: a `password` line inside a multi-line `.netrc` stanza (opened by a `machine` or `default` line, kept open by `login`, `account` and `password` lines, blank lines and `#` comments) is redacted. The line must be only `password <value>`, so prose such as "machine learning" followed by "password managers are useful" stays.
-- `src/core/secret-scan-cookie.ts`: a `-b` on a line that continues a curl command (each earlier line ends in `\`) counts as curl's cookie argument; a cookie value quoted with escaped quotes (`\"`, or `\\\"` one level deeper) is read. A `-b` after a continued line that is not curl (`git checkout -b`) stays.
-- `src/core/secret-scan.ts`: the transcript-lane scan carries the `.netrc` stanza and the curl continuation from line to line.
-- `src/core/transcripts/secret-audit.ts`: `TRANSCRIPT_SECRET_AUDIT_VERSION` 6 → 7, because the audit now finds these shapes on stored pages.
-- Tests: `test/transcripts-secret-cookie-header.test.ts`, `test/transcripts-secret-corpus.test.ts`.
-- Docs: `docs/guides/data-ingestion.md#credential-redaction` and the key-files entries.
diff --git a/openclaw.plugin.json b/openclaw.plugin.json
index 89f43f8bc2..dde9be9be9 100644
--- a/openclaw.plugin.json
+++ b/openclaw.plugin.json
@@ -1,7 +1,7 @@
{
"id": "gbrain-context-engine",
"name": "gbrain",
- "version": "0.60.724.0",
+ "version": "0.60.725.0",
"description": "Personal knowledge brain with Postgres + pgvector hybrid search",
"family": "bundle-plugin",
"kind": "context-engine",
diff --git a/package.json b/package.json
index 721a968d70..bcec9884fd 100644
--- a/package.json
+++ b/package.json
@@ -259,7 +259,7 @@
"bun": ">=1.4.4"
},
"license": "MIT",
- "version": "0.60.724.0",
+ "version": "0.60.725.0",
"overrides": {
"@aws-sdk/util-format-url": "3.972.9",
"@ai-sdk/provider-utils": "4.0.56",
diff --git a/plugin-variants/gbrain-coding/.claude-plugin/plugin.json b/plugin-variants/gbrain-coding/.claude-plugin/plugin.json
index 54d2a1c0ce..dd6a0a19c3 100644
--- a/plugin-variants/gbrain-coding/.claude-plugin/plugin.json
+++ b/plugin-variants/gbrain-coding/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain-coding",
- "version": "0.60.724.0",
+ "version": "0.60.725.0",
"description": "Brain-first coding agent working inside a repo: retrieval, routing, ingest discipline, correction hygiene. Default persona for the claude-code harness bridge; also published as the gbrain-coding marketplace variant. (persona variant of the gbrain plugin — 21 skills)",
"author": {
"name": "Garry Tan",
diff --git a/plugin-variants/gbrain-coding/.codex-plugin/plugin.json b/plugin-variants/gbrain-coding/.codex-plugin/plugin.json
index bc2c8ece77..12ef8e2851 100644
--- a/plugin-variants/gbrain-coding/.codex-plugin/plugin.json
+++ b/plugin-variants/gbrain-coding/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain-coding",
- "version": "0.60.724.0",
+ "version": "0.60.725.0",
"description": "Brain-first coding agent working inside a repo: retrieval, routing, ingest discipline, correction hygiene. Default persona for the claude-code harness bridge; also published as the gbrain-coding marketplace variant. (persona variant of the gbrain plugin — 21 skills)",
"author": {
"name": "Garry Tan",
diff --git a/plugin-variants/gbrain-coding/README.md b/plugin-variants/gbrain-coding/README.md
index f0519a9ef8..a58ffe2630 100644
--- a/plugin-variants/gbrain-coding/README.md
+++ b/plugin-variants/gbrain-coding/README.md
@@ -1,4 +1,4 @@
-<!-- gbrain-plugin-tree-stamp: 0.60.724.0 -->
+<!-- gbrain-plugin-tree-stamp: 0.60.725.0 -->
# gbrain-coding (generated persona variant — do not hand-edit)
Brain-first coding agent working inside a repo: retrieval, routing, ingest discipline, correction hygiene. Default persona for the claude-code harness bridge; also published as the gbrain-coding marketplace variant.
diff --git a/plugin-variants/gbrain-daily/.claude-plugin/plugin.json b/plugin-variants/gbrain-daily/.claude-plugin/plugin.json
index 4c52ed1599..a277c06b47 100644
--- a/plugin-variants/gbrain-daily/.claude-plugin/plugin.json
+++ b/plugin-variants/gbrain-daily/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain-daily",
- "version": "0.60.724.0",
+ "version": "0.60.725.0",
"description": "Personal knowledge-brain daily use: meetings, tasks, briefings, reading, research. Published as the gbrain-daily marketplace variant. (persona variant of the gbrain plugin — 20 skills)",
"author": {
"name": "Garry Tan",
diff --git a/plugin-variants/gbrain-daily/.codex-plugin/plugin.json b/plugin-variants/gbrain-daily/.codex-plugin/plugin.json
index e94edc0d0f..28551212be 100644
--- a/plugin-variants/gbrain-daily/.codex-plugin/plugin.json
+++ b/plugin-variants/gbrain-daily/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain-daily",
- "version": "0.60.724.0",
+ "version": "0.60.725.0",
"description": "Personal knowledge-brain daily use: meetings, tasks, briefings, reading, research. Published as the gbrain-daily marketplace variant. (persona variant of the gbrain plugin — 20 skills)",
"author": {
"name": "Garry Tan",
diff --git a/plugin-variants/gbrain-daily/README.md b/plugin-variants/gbrain-daily/README.md
index 02da80852a..2e46261e0e 100644
--- a/plugin-variants/gbrain-daily/README.md
+++ b/plugin-variants/gbrain-daily/README.md
@@ -1,4 +1,4 @@
-<!-- gbrain-plugin-tree-stamp: 0.60.724.0 -->
+<!-- gbrain-plugin-tree-stamp: 0.60.725.0 -->
# gbrain-daily (generated persona variant — do not hand-edit)
Personal knowledge-brain daily use: meetings, tasks, briefings, reading, research. Published as the gbrain-daily marketplace variant.
diff --git a/plugin/README.md b/plugin/README.md
index 0716ab54e6..ce5b85da5f 100644
--- a/plugin/README.md
+++ b/plugin/README.md
@@ -1,4 +1,4 @@
-<!-- gbrain-plugin-tree-stamp: 0.60.724.0 -->
+<!-- gbrain-plugin-tree-stamp: 0.60.725.0 -->
# gbrain plugin skill tree (generated — do not hand-edit)
This tree is the curated skill set for the gbrain Codex and Claude Code
diff --git a/src/core/behavior-changes.generated.ts b/src/core/behavior-changes.generated.ts
index 961a574df9..8f63767a2f 100644
--- a/src/core/behavior-changes.generated.ts
+++ b/src/core/behavior-changes.generated.ts
@@ -83,6 +83,11 @@ export const RELEASED_BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; id: strin
{ since: '0.60.723.0', id: 'guest_sources_scoped_role_fail_closed_9354', text: "Brains whose gbrain process connects to Postgres as a scoped row-level-security role now need that role to read the guest_sources table. Before, such a role read it as empty, so guest-source checks passed every write as if no source were a guest source. Now a role that row-level security keeps from reading guest_sources is refused with writer_coordinator_required (unreadable_state, state guest_sources) on page, fact, take and timeline writes, because it cannot tell a guest source from an ordinary one. The table owner, a role that bypasses row-level security, and PGLite brains are unaffected. To keep writing, give the scoped writer the SELECT policy on guest_sources from the maintainer recipe in docs/ENGINES.md (derived-state maintainers)." },
{ since: '0.60.724.0', id: 'commit_push_symlinked_source_gst2767', text: "gbrain git commit-push now resolves a named path through any symlinked folder to its real place in the checkout, so a path spelled through a source path that links into the repository is committed instead of refused as outside the checkout, and a leftover .git folder or file that git itself ignores no longer makes a folder count as skipped. Each skipped path carries why next to reason in the JSON detail, and the push log gets a [push] SKIPPED, NEEDS ATTENTION line for it. gbrain embed <slug> refuses a flag it does not take with unknown_flag (exit 2) before asking for spend approval, instead of reading the next argument as a page. gbrain sources writer git-durability --enable returns agents.commit_argv, the exact gbrain git commit-push command, whenever the durability file it owns is not committed, including an untracked copy an earlier run left. A named folder whose tracked files are staged for removal while still on disk is refused as staged_for_removal, naming --untrack and git restore --staged, instead of as commit_prestaged_paths, and --dry-run reports the same skipped paths and reasons the real run would. A source folder whose .git links to the repository's own .git now commits at its real place in the repository instead of in a copy at the top. gbrain sync no longer creates a repository in a brain folder that sits inside another repository it cannot read." },
{ since: '0.60.724.0', id: 'transcript_secret_rules_gst2768', text: "Imported conversation pages now also redact cookie values (`Cookie:` and `Set-Cookie:` headers, curl `-b`/`--cookie`; names kept), a one-line `.netrc` password, and a value that arrives alone on the line after a key or token label or in the message after any credential label (`password:`, then the password). These rules run only for transcripts; the `sources push` gate and the compiled-context scan are unchanged. Pages imported earlier are not rewritten: doctor's `transcript_secret_exposure` asks for a fresh `gbrain transcripts audit-secrets`, which now lists pages carrying cookie values, `.netrc` passwords and a key label with its value on the next line. It cannot see a value that was sent as its own message, because a stored page no longer marks where one message ends. Three cases still reach the page verbatim, as they do today: a `.netrc` entry written over several lines (`machine`, `login` and `password` each on its own line), a `-b` cookie on its own continued line of a multi-line curl command (what Chrome's \"Copy as cURL\" produces), and a quoted cookie value inside escaped JSON (`sid=\\\"…\\\"`)." },
+ { since: '0.60.725.0', id: 'doctor_git_gap_unknown_gbra541', text: "`gbrain doctor` now reads the 800 most recently changed pages of each source in db_ahead_of_git and strict_facts_outside_git, and says how far back it looked; `gbrain sources git-gap <source-id>` still reads every page. A census that runs out of its time budget or cannot run, and in strict_facts_outside_git a fenced fact on a page older than that window, now report warn with health unknown instead of ok, and git_index_lag does the same when it cannot read the lag. An agent that pages on `doctor --fail-on warn` may see these checks warn where they used to pass; run `gbrain sources git-gap <source-id>` for the full count." },
+ { since: '0.60.725.0', id: 'setup_codex_backups_gst2779', text: "gbrain setup codex and gbrain setup codex --remove now copy each config.toml or hooks.json they change to a .bak.<timestamp> file beside it before writing, and print the backup path. Nothing else about the setup changes; delete the backups once you no longer need them." },
+ { since: '0.60.725.0', id: 'keyless_any_word_fill_gst2762', text: "On a brain with no embedding provider (the default keyless install), search and query now add pages that hold only some of the question's words when the first page of results comes back shorter than the limit. Every row returned before keeps its place, text and score, and the added pages follow them. The added rows pass the same read policy, redirect, superseded-page, evidence and injection checks as any other row, carry keyword_fill: true, and --explain-target says they matched only some of the words. When adding them would change another row, or a check that is on was skipped for them, they are left out; a row from a source on decide.egress.deny_sources is treated like any other row from that source, which today means it is returned and counted as judged. Brains with embeddings search exactly as before, and there is no setting to change." },
+ { since: '0.60.725.0', id: 'launcher_records_bun_gst2784', text: "gbrain's hook launcher (<config dir>/hook-launcher/gbrain-hook), which every MCP server entry and hook gbrain setup writes starts gbrain through, now records the Bun that installed gbrain and puts it first on PATH. Before, a Codex session started without bun on its PATH (the desktop app, a launcher, a terminal opened before the shell profile changed) could not start gbrain serve or its hooks, and showed no tools. gbrain post-upgrade rewrites the launcher in place, and gbrain setup codex does the same; no config.toml, hooks.json or trust entry changes. gbrain doctor reports a launcher that records no Bun, or a Bun that is gone. The compiled gbrain binary needs no Bun and its launcher does not change." },
+ { since: '0.60.725.0', id: 'notifier_sync_disabled_gst2515', text: "The commit notifier now honours a source's sync setting: a source with sync turned off (config.syncEnabled=false) is no longer synced when HEAD moves, and a retry it owed is dropped. An explicit sync request (a sync trigger or webhook) still runs once; if that run fails, the notifier waits for a new request instead of retrying it. To have commits sync that source again, turn sync back on with gbrain sources set-sync <id> on." },
];
/** The release of every marked id, so a function row dated releasedIn(id) takes the release that disclosed it. */
@@ -167,4 +172,9 @@ export const BEHAVIOR_CHANGE_RELEASES: Readonly<Record<string, string>> = {
guest_sources_scoped_role_fail_closed_9354: '0.60.723.0',
commit_push_symlinked_source_gst2767: '0.60.724.0',
transcript_secret_rules_gst2768: '0.60.724.0',
+ doctor_git_gap_unknown_gbra541: '0.60.725.0',
+ setup_codex_backups_gst2779: '0.60.725.0',
+ keyless_any_word_fill_gst2762: '0.60.725.0',
+ launcher_records_bun_gst2784: '0.60.725.0',
+ notifier_sync_disabled_gst2515: '0.60.725.0',
};
diff --git a/templates/bootstrap/template-repo/README.md b/templates/bootstrap/template-repo/README.md
index 2a72286225..e8f16e3111 100644
--- a/templates/bootstrap/template-repo/README.md
+++ b/templates/bootstrap/template-repo/README.md
@@ -1,6 +1,6 @@
# gbrain agent workspace — template
-<!-- gbrain-template-stamp: 0.60.724.0 -->
+<!-- gbrain-template-stamp: 0.60.725.0 -->
This repository is the **"Use this template"** distribution artifact for a
[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same