Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Release v0.60.709.0
garrytane5202fad8b5a
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex 25bd5a297d..383fd037c8 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.708.0",+ "version": "0.60.709.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.jsonindex d1e6c9ac3e..d8d3c8ee51 100644--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.708.0",+ "version": "0.60.709.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.mdindex 3e12c76bb3..e3a3d4c006 100644--- a/BOOTSTRAP_FOR_AGENTS.md+++ b/BOOTSTRAP_FOR_AGENTS.md@@ -1,4 +1,4 @@-<!-- gbrain-runbook-stamp: 0.60.708.0 -->+<!-- gbrain-runbook-stamp: 0.60.709.0 --><!-- This stamp must equal the VERSION file at every release; CI enforces it(scripts/check-bootstrap-tag.sh). `gbrain bootstrap status` compares it tothe installed binary and warns on skew. -->diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 19780ee16c..3904821f56 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,32 @@ credits are retained; no result has been reassigned to another provider. Originaidentifiers and attribution are available in the pre-removal Git revision`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).+## [0.60.709.0] - 2026-11-13++**A `gbrain serve` that recovers from status-only mode can sync again, and the brain owner's `remember` works on an entity page stored in segments.**++### Fixed+- **Syncs after a recovered `gbrain serve` (#9224).** When `gbrain serve` starts while another gbrain process holds a PGLite brain (a second agent session or a cron job), it answers only `gbrain_status` until the brain opens, then becomes the brain's owner. After that, every `gbrain sync` handed to it that had pages to write failed with `storage_error`, and its own `sync_brain` failed with "Unknown engine kind for db-lock: pglite", until the agent session restarted. Those syncs now commit. The stand-in engine that status-only serve runs on now passes through every property of the live engine, not only its methods, and a synchronous method returns its own value instead of a promise. A Postgres `gbrain serve` that started while its database was unreachable gets the same fix. A serve that opens the brain when it starts was never affected.+- **A clear error when the owner itself faults (#9224).** An unexpected fault inside the process that owns the brain now reaches the caller as `internal_error` (detail `owner_internal`) with an incident ID, instead of a `storage_error` whose `gbrain doctor` fix could not see the fault. The error says the request was not at fault and that restarting the owner and rerunning the command recovers; a write also names its request ID to check first with `gbrain write-request`. Its fix, `gbrain sources writer status --json`, is read-only and names the owner process. The owner's stderr records the error class, the gbrain code location and the database error text under the same incident ID, with connection strings redacted, and none of it crosses the local socket.+- **The owner's `remember` on a large entity page (#9213).** With a token bound to the brain owner, `remember` onto an entity page stored in segments was refused with `page_body_segmented`, while the same call from an unbound token committed. It now commits. The owner's visibility checks no longer read the page body, which on such a page cannot be read as one string. The member scope-page check and the shared-origin retention purge of a page over 24 MiB had the same mistake and are fixed too. The guard that refuses whole-body reads of a segmented page is as strict as before.+- **Better advice when a write is refused on a page stored in segments.** The refusal no longer suggests `get_page body: "auto"`, which only reads the page. `remember` is told to save the claim without an entity (it is filed under `memory/unattributed`), and any other write over MCP names the edits that work on such a page: `edit_page`, `append_page`, `add_tag` and `remove_tag`.++Reported by @thiagodalvarenga (#9224) and @andreineacsu (#9213). First fixed by @Masashi-Ono0611 (#9231, #9215).++### Sync no longer holds pages over gbrain's own frontmatter stamps, and file-drift repairs can compare before you pick a side++**A page that differs from its file only by what gbrain itself wrote is no longer held as file drift.** A schema-pack retype changes a page's type in the database and keeps the old type as `legacy_type` (plus an optional `subtype`) without touching the file. A file that still named the old type then read as a different page, and a later mass rewrite of the files, or a page imported before import records existed, turned that into a `file_drift` hold that needed a person. Sync now reads such a file with the stored retype stamp kept, so nothing differs. A real database edit (a label, a body change) is still held.++- **Existing holds of that kind release by themselves.** The next sync after upgrading re-screens each held `file_drift` page that is not a deletion once, releases the ones that now agree with no commit and no change to any page's body, type or stamps (a retype stamp releases with no page write at all; a stale stored copy of the `type` key is normalised away), and says how many (`Released N held file(s) that no longer need a decision.`, JSON `holds_released`). On a seeded source of 3,000 holds, 99% of them normalisation-only, one sync released 2,970 and left the 30 real differences held, in about 27 s on PGLite and 61 s on Postgres; the next sync took about 0.1 s.+- **A later commit over a page that only gained derived keys imports.** When the page side changed only by keys gbrain derives (a stored copy of the reserved `type` key, stated or inferred from the path, or the retired grandfather's database-only `validate: false`) and someone commits a body edit to the file, sync imports the file instead of holding it, and the stamp stays.+- **A write that names the type a retype replaced still takes it.** Only a file reading keeps a retype's stamp; a `put_page` with an explicit `type:` is stored as written.+- **A page whose file is gone under a `gbrain.yml` `db_only` folder is no drift.** An existing deleted-side hold there now releases.+- **`gbrain repair file-drift` compares without a winner.** Any selection without `--prefer` lists, per page, what differs, which side is newer (the file's last commit against the page's `updated_at`) and what a repair would do, and writes nothing. A `--prefer` preview with no side names that comparison as its fix.+- **`--prefer file` never drops a newer page in bulk.** A `--held`, `--all-drifted` or `--request` preview lists a page edited after its file's last commit as `kept_newer_page` and leaves it held; naming the page with `--slug` still resolves it, with a warning naming the edit it drops. A page whose file is gone is never deleted by a comparison (GST-2568).+- **A `--prefer` preview says how much it drops.** Each page's listing line counts the lines of the side the apply overwrites that the result doesn't carry ("drops 3 line(s) the file holds"), a warning gives the total for the run, and `--json` carries `details.pages[].lost_lines` and `details.lost_lines_total`, so whoever agrees to the apply sees what the losing side held. The consent the apply asks for repeats the total.+- **An unbound collision can keep its database side, with consent.** A page an unbound write left database-only, with a different file at its slug path, is drift to `gbrain repair file-drift --slug <slug>`. `sources reconcile` refuses to take its database side over that file and names this step: `--prefer database` names the file's commit, its apply needs the user's consent, and it records the file as the page's origin.+- **The kept-newer-page text prints previews, not runs.** It tells you to preview either side, and says a database-wins apply needs the user's consent.+## [0.60.708.0] - 2026-11-13**CI checkouts on Ubicloud runners retry a stalled fetch instead of hanging until the job times out.**diff --git a/VERSION b/VERSIONindex ff6fd4dc78..49a592fe3e 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-0.60.708.0+0.60.709.0diff --git a/changelog.d/capy-recovered-serve-sync-and-owner-remember.md b/changelog.d/capy-recovered-serve-sync-and-owner-remember.mddeleted file mode 100644index 96b6fff76f..0000000000--- a/changelog.d/capy-recovered-serve-sync-and-owner-remember.md+++ /dev/null@@ -1,13 +0,0 @@-----important: regression------**A `gbrain serve` that recovers from status-only mode can sync again, and the brain owner's `remember` works on an entity page stored in segments.**--### Fixed-- **Syncs after a recovered `gbrain serve` (#9224).** When `gbrain serve` starts while another gbrain process holds a PGLite brain (a second agent session or a cron job), it answers only `gbrain_status` until the brain opens, then becomes the brain's owner. After that, every `gbrain sync` handed to it that had pages to write failed with `storage_error`, and its own `sync_brain` failed with "Unknown engine kind for db-lock: pglite", until the agent session restarted. Those syncs now commit. The stand-in engine that status-only serve runs on now passes through every property of the live engine, not only its methods, and a synchronous method returns its own value instead of a promise. A Postgres `gbrain serve` that started while its database was unreachable gets the same fix. A serve that opens the brain when it starts was never affected.-- **A clear error when the owner itself faults (#9224).** An unexpected fault inside the process that owns the brain now reaches the caller as `internal_error` (detail `owner_internal`) with an incident ID, instead of a `storage_error` whose `gbrain doctor` fix could not see the fault. The error says the request was not at fault and that restarting the owner and rerunning the command recovers; a write also names its request ID to check first with `gbrain write-request`. Its fix, `gbrain sources writer status --json`, is read-only and names the owner process. The owner's stderr records the error class, the gbrain code location and the database error text under the same incident ID, with connection strings redacted, and none of it crosses the local socket.-- **The owner's `remember` on a large entity page (#9213).** With a token bound to the brain owner, `remember` onto an entity page stored in segments was refused with `page_body_segmented`, while the same call from an unbound token committed. It now commits. The owner's visibility checks no longer read the page body, which on such a page cannot be read as one string. The member scope-page check and the shared-origin retention purge of a page over 24 MiB had the same mistake and are fixed too. The guard that refuses whole-body reads of a segmented page is as strict as before.-- **Better advice when a write is refused on a page stored in segments.** The refusal no longer suggests `get_page body: "auto"`, which only reads the page. `remember` is told to save the claim without an entity (it is filed under `memory/unattributed`), and any other write over MCP names the edits that work on such a page: `edit_page`, `append_page`, `add_tag` and `remove_tag`.--Reported by @thiagodalvarenga (#9224) and @andreineacsu (#9213). First fixed by @Masashi-Ono0611 (#9231, #9215).diff --git a/changelog.d/capy-sync-stops-holding-pages.md b/changelog.d/capy-sync-stops-holding-pages.mddeleted file mode 100644index 5f1ec04dcf..0000000000--- a/changelog.d/capy-sync-stops-holding-pages.md+++ /dev/null@@ -1,13 +0,0 @@-### Sync no longer holds pages over gbrain's own frontmatter stamps, and file-drift repairs can compare before you pick a side--**A page that differs from its file only by what gbrain itself wrote is no longer held as file drift.** A schema-pack retype changes a page's type in the database and keeps the old type as `legacy_type` (plus an optional `subtype`) without touching the file. A file that still named the old type then read as a different page, and a later mass rewrite of the files, or a page imported before import records existed, turned that into a `file_drift` hold that needed a person. Sync now reads such a file with the stored retype stamp kept, so nothing differs. A real database edit (a label, a body change) is still held.--- **Existing holds of that kind release by themselves.** The next sync after upgrading re-screens each held `file_drift` page that is not a deletion once, releases the ones that now agree with no commit and no change to any page's body, type or stamps (a retype stamp releases with no page write at all; a stale stored copy of the `type` key is normalised away), and says how many (`Released N held file(s) that no longer need a decision.`, JSON `holds_released`). On a seeded source of 3,000 holds, 99% of them normalisation-only, one sync released 2,970 and left the 30 real differences held, in about 27 s on PGLite and 61 s on Postgres; the next sync took about 0.1 s.-- **A later commit over a page that only gained derived keys imports.** When the page side changed only by keys gbrain derives (a stored copy of the reserved `type` key, stated or inferred from the path, or the retired grandfather's database-only `validate: false`) and someone commits a body edit to the file, sync imports the file instead of holding it, and the stamp stays.-- **A write that names the type a retype replaced still takes it.** Only a file reading keeps a retype's stamp; a `put_page` with an explicit `type:` is stored as written.-- **A page whose file is gone under a `gbrain.yml` `db_only` folder is no drift.** An existing deleted-side hold there now releases.-- **`gbrain repair file-drift` compares without a winner.** Any selection without `--prefer` lists, per page, what differs, which side is newer (the file's last commit against the page's `updated_at`) and what a repair would do, and writes nothing. A `--prefer` preview with no side names that comparison as its fix.-- **`--prefer file` never drops a newer page in bulk.** A `--held`, `--all-drifted` or `--request` preview lists a page edited after its file's last commit as `kept_newer_page` and leaves it held; naming the page with `--slug` still resolves it, with a warning naming the edit it drops. A page whose file is gone is never deleted by a comparison (GST-2568).-- **A `--prefer` preview says how much it drops.** Each page's listing line counts the lines of the side the apply overwrites that the result doesn't carry ("drops 3 line(s) the file holds"), a warning gives the total for the run, and `--json` carries `details.pages[].lost_lines` and `details.lost_lines_total`, so whoever agrees to the apply sees what the losing side held. The consent the apply asks for repeats the total.-- **An unbound collision can keep its database side, with consent.** A page an unbound write left database-only, with a different file at its slug path, is drift to `gbrain repair file-drift --slug <slug>`. `sources reconcile` refuses to take its database side over that file and names this step: `--prefer database` names the file's commit, its apply needs the user's consent, and it records the file as the page's origin.-- **The kept-newer-page text prints previews, not runs.** It tells you to preview either side, and says a database-wins apply needs the user's consent.diff --git a/openclaw.plugin.json b/openclaw.plugin.jsonindex 6a46f11b06..fb09efcfbd 100644--- a/openclaw.plugin.json+++ b/openclaw.plugin.json@@ -1,7 +1,7 @@{"id": "gbrain-context-engine","name": "gbrain",- "version": "0.60.708.0",+ "version": "0.60.709.0","description": "Personal knowledge brain with Postgres + pgvector hybrid search","family": "bundle-plugin","kind": "context-engine",diff --git a/package.json b/package.jsonindex 4107129f0e..b17d2afb14 100644--- a/package.json+++ b/package.json@@ -258,7 +258,7 @@"bun": ">=1.4.4"},"license": "MIT",- "version": "0.60.708.0",+ "version": "0.60.709.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.jsonindex ade8a01acd..835755adbd 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.708.0",+ "version": "0.60.709.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.jsonindex 2f57ec17ff..291a18a69e 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.708.0",+ "version": "0.60.709.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.mdindex 07e384a557..4a1eaf4546 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.708.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.709.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.jsonindex 42f4afbe76..c3ff5ad6ff 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.708.0",+ "version": "0.60.709.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.jsonindex aa33b7e15d..b3448566d1 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.708.0",+ "version": "0.60.709.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.mdindex a2476f94ba..a98ba95e2e 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.708.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.709.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.mdindex d6163f2205..4ea089271b 100644--- a/plugin/README.md+++ b/plugin/README.md@@ -1,4 +1,4 @@-<!-- gbrain-plugin-tree-stamp: 0.60.708.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.709.0 --># gbrain plugin skill tree (generated — do not hand-edit)This tree is the curated skill set for the gbrain Codex and Claude Codediff --git a/templates/bootstrap/template-repo/README.md b/templates/bootstrap/template-repo/README.mdindex a795c8b023..105fa3591f 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.708.0 -->+<!-- gbrain-template-stamp: 0.60.709.0 -->This repository is the **"Use this template"** distribution artifact for a[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same