Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
chore(release): restamp Foundations 1 to v0.60.37.0 (wave 8 takes v0.60.36.0 after #5932); relabel the measurement columns
garrytanbd395c5eaf35
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex 5072f38ad3..b5d014ca8a 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.36.0",+ "version": "0.60.37.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 0188e83059..a789917002 100644--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.36.0",+ "version": "0.60.37.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 4e5bde29d8..ffbcad7368 100644--- a/BOOTSTRAP_FOR_AGENTS.md+++ b/BOOTSTRAP_FOR_AGENTS.md@@ -1,4 +1,4 @@-<!-- gbrain-runbook-stamp: 0.60.36.0 -->+<!-- gbrain-runbook-stamp: 0.60.37.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 5edb9c6415..58ac74bfac 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,15 +10,15 @@ 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.36.0] - 2026-10-03+## [0.60.37.0] - 2026-10-03-**Foundations 1: a 10,000-page PGLite brain answers health and orphan checks in well under a second instead of 12 to 15 seconds, imports about 40% faster, records who wrote each page version, fact, take and timeline entry, lets several agents share one brain without losing track of whose session produced what, and gives every legacy token the same grant shape as an OAuth client.**+**Foundations 1: a 10,000-page PGLite brain answers health and orphan checks in well under a second instead of 12 to 15 seconds, imports in about a third less time, records who wrote each page version, fact, take and timeline entry, lets several agents share one brain without losing track of whose session produced what, and gives every legacy token the same grant shape as an OAuth client.**-On a big local (PGLite) brain, several everyday reads were painfully slow because the database had no statistics about its own tables and planned every query as if the tables were empty. On 10,000 pages `get_health` took 12 seconds, `find_orphans` 15 seconds and a keyword search scoped to one source 39 seconds. Most of that jump comes from GBRA-39's fix that analyzes the tables after bulk writes (#5932, also carried in this release). This release adds what keeps those statistics fresh: each statement on the busy tables now counts the rows it changed, and the brain re-analyzes a table once enough of it changed, during import, sync, the cycle and the first read after a big write. That halves import time compared with analyzing only at the end, and the vector arm of `query` uses its index again once the statistics see the new embeddings.+On a big local (PGLite) brain, several everyday reads were painfully slow because the database had no statistics about its own tables and planned every query as if the tables were empty. On 10,000 pages `get_health` took 12 seconds, `find_orphans` 15 seconds and a keyword search scoped to one source 39 seconds. Most of that jump came in v0.60.35.0 with GBRA-39's fix that analyzes the tables after bulk writes (#5932). This release adds what keeps those statistics fresh: each statement on the busy tables now counts the rows it changed, and the brain re-analyzes a table once enough of it changed, during import, sync, the cycle and the first read after a big write. That cuts a 10,000-page import from 99 to 62 seconds compared with analyzing only at the end, and the vector arm of `query` uses its index again once the statistics see the new embeddings.The rest is groundwork for brains that several agents and people share. Journaled and coordinated writes now stamp who created each row. This is creation attribution: some legacy writers still record nobody, and the list is in the docs. `gbrain attribution <slug>` shows it. A captured session remembers which agent seat it came from. Legacy tokens move to the same grant shape as OAuth clients, lazily, with one `gbrain auth rescope` command for both. `gbrain sources refresh <id>` fast-forwards a managed checkout safely while other writers wait.-| 10,000-page PGLite brain, as shipped (no manual ANALYZE) | v0.60.34.0 | + #5932's ANALYZE fix | This release |+| 10,000-page PGLite brain, as shipped (no manual ANALYZE) | Fix wave 8 without #5932 | Fix wave 8 + #5932's ANALYZE fix | This release || --- | --- | --- | --- || `get_health` (computation, memo off) | 12,073 ms | 208 ms | 158 ms || `find_orphans` | 14,989 ms | 43.5 ms | 34.3 ms |@@ -29,11 +29,11 @@ The rest is groundwork for brains that several agents and people share. Journale| Per-page import cost, last 10% vs first 10% | 1.74x | 0.85x | 0.84x || Hot tables with planner statistics when measured | 1 of 6 | 2 of 6 | 6 of 6 |-Each cell is the median of per-run p50s from `bun run test:scale -- --pages 10000 --seed 1` on one Ubicloud standard-8 VM: five runs each for the last two columns, interleaved, and two runs for v0.60.34.0. Keyword search scoped to one source moved from 18 to 22 ms in this release; the run-to-run spread overlaps (17-19 ms vs 19-25 ms). The first two columns check statistics right after import; this release checks after the first timed read, because it analyzes on that read by design. A repeat `get_health` within 30 seconds with no page or config change is served from memory (about 0.3 ms).+Each cell is the median of per-run p50s from `bun run test:scale -- --pages 10000 --seed 1` on one Ubicloud standard-8 VM: five runs each for the last two columns, interleaved, and two runs for the first. The middle column is fix wave 8 with #5932's ANALYZE change applied, which is what v0.60.36.0 ships for these reads. Keyword search scoped to one source moved from 18 to 22 ms in this release; the run-to-run spread overlaps (17-19 ms vs 19-25 ms). The first two columns check statistics right after import; this release checks after the first timed read, because it analyzes on that read by design. A repeat `get_health` within 30 seconds with no page or config change is served from memory (about 0.3 ms).The CI scale tier now runs this harness at 10k pages on every change that touches search, import, sync, doctor or the engines, and nightly at 10k and 20k pages (50k once `scripts/scale/trend.ts` adds it), on PGLite and Postgres. It fails on a slow import, a wrong answer, a quadratic plan or missing statistics.-## To take advantage of v0.60.36.0+## To take advantage of v0.60.37.0`gbrain upgrade` installs the binary and runs four schema migrations: v193 creation attribution columns and triggers, v194 the worktree refresh checkpoint table, v195 the unified grant columns on `access_tokens`, and v196 planner-statistics accounting (PGLite only; a no-op on Postgres). Restart every `gbrain serve`, autopilot and worker afterwards.@@ -41,7 +41,7 @@ The CI scale tier now runs this harness at 10k pages on every change that touche```bashgbrain apply-migrations --yes --no-autopilot-install```-2. **Your agent reads `skills/migrations/v0.60.36.0.md` the next time you talk to it.** It lists the new commands and the opt-outs. Nothing in it spends money.+2. **Your agent reads `skills/migrations/v0.60.37.0.md` the next time you talk to it.** It lists the new commands and the opt-outs. Nothing in it spends money.3. **Optional, free: fill attribution for history the write journal proves.**```bashgbrain repair attribution-backfill # previewdiff --git a/TODOS.md b/TODOS.mdindex d698ee2c94..70f906e7fe 100644--- a/TODOS.md+++ b/TODOS.md@@ -1,6 +1,6 @@# TODOS-## Foundations 1 follow-ups (filed 2026-10-03, follow-up from v0.60.36.0)+## Foundations 1 follow-ups (filed 2026-10-03, follow-up from v0.60.37.0)- [ ] **P1 — Mutation attribution for the writers still unattributed.****What:** creation attribution covers journaled and coordinated writes and four unmanaged legacy transactions; the writers listed under "unattributed" in `docs/architecture/system-of-record.md` (extract timeline, sync renames, enrichment, schema-pack conversions, legacy facts and takes helpers, and others) still write `NULL`. **Fix:** route them through `maintenanceTransaction` or the coordinator, shrinking the pinned list. **Effort:** L. **Priority:** P1 (Foundations 2).@@ -41,7 +41,7 @@**What:** v0.60.34.0 writes the supersession pointer on the old take row; chains written before it keep `superseded_by` NULL on managed brains. **Fix:** a `gbrain repair` kind that rebuilds the pointers from the fence. **Effort:** S. **Priority:** P2.- [ ] **P2 — Doctor check for pages still waiting on their revision backfill (#5216).****What:** the backfill is resumable and reports progress on upgrade, but a brain whose backfill keeps stopping on a failing row has no standing doctor signal. **Effort:** S. **Priority:** P2.-- [x] **P2 — Scale harness gaps (`bun run test:scale`).** Shipped in v0.60.36.0 (F4c scale tier).+- [x] **P2 — Scale harness gaps (`bun run test:scale`).** Shipped in v0.60.37.0 (F4c scale tier).**What:** the report-only harness lacks injected query vectors, populated facts and takes, a source-scoped grant query, a cold-process first query, concurrent receipt-bearing writers, the Postgres engine and the 10k/20k/50k CI tiers. At 10k pages the per-page import cost of the last 10% is about 8x the first 10% (gate 1.5). **Effort:** L. **Priority:** P2 (Foundations 1, F4).- [ ] **P2 — Same-width embedding migrations into a live HNSW index.****What:** #5088 defers the ANN build only when the schema transition rebuilds the column; a same-width model swap still re-embeds into the live index. **Effort:** M. **Priority:** P2.diff --git a/VERSION b/VERSIONindex e649f84877..da2b97e132 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-0.60.36.0+0.60.37.0diff --git a/docs/fix-wave-notes/capy-foundations-1.md b/docs/fix-wave-notes/capy-foundations-1.mdindex 068de9d3ac..9b05c3c3b0 100644--- a/docs/fix-wave-notes/capy-foundations-1.md+++ b/docs/fix-wave-notes/capy-foundations-1.md@@ -1,4 +1,4 @@-# Foundations 1 notes (`capy/foundations-1`, v0.60.36.0)+# Foundations 1 notes (`capy/foundations-1`, v0.60.37.0)One integrated PR. Ten lanes (F0, F1a, F1b, F1c, F2, F3, F4a, F4b, F4c, F4d)were built in parallel on the fix wave 8 collector (`capy/fix-wave-8`), merged@@ -18,7 +18,7 @@ were on one Ubicloud standard-8 VM, with the same fixture for every build:five interleaved runs each for the last two columns and two runs for thefirst.-| Metric | v0.60.34.0 (fix wave 8) | + #5932's ANALYZE fix (ad7252a) | Foundations 1 |+| Metric | Fix wave 8 without #5932 | Fix wave 8 + #5932's ANALYZE fix (ad7252a) | Foundations 1 || --- | --- | --- | --- || `get_health` (memo off) | 12,073 ms | 208 ms | 158 ms || `find_orphans` | 14,989 ms | 43.5 ms | 34.3 ms |@@ -30,7 +30,7 @@ first.| Enforced gates | n/a (report-only build) | `planner_stats` fails | all pass |Most of the drop from fix wave 8 comes from GBRA-39's full ANALYZE after bulk-writes (#5932, cherry-picked into F4b as f1970519). Foundations adds what+writes (#5932, on master since v0.60.35.0; F4b carried it as the cherry-pick f1970519, which the master merge reconciles). Foundations adds whatkeeps statistics fresh between syncs: import time falls from 99 s to 62 s, andthe hybrid query from 375 ms to 26 ms, because the vector arm uses its HNSWindex once statistics see the injected embeddings. Keyword search scoped todiff --git a/openclaw.plugin.json b/openclaw.plugin.jsonindex 811258a1bc..d350f981d3 100644--- a/openclaw.plugin.json+++ b/openclaw.plugin.json@@ -1,7 +1,7 @@{"id": "gbrain-context-engine","name": "gbrain",- "version": "0.60.36.0",+ "version": "0.60.37.0","description": "Personal knowledge brain with Postgres + pgvector hybrid search","family": "bundle-plugin","kind": "context-engine",diff --git a/package.json b/package.jsonindex 640f7f003f..682c56ce12 100644--- a/package.json+++ b/package.json@@ -207,7 +207,7 @@"bun": ">=1.4.0"},"license": "MIT",- "version": "0.60.36.0",+ "version": "0.60.37.0","overrides": {"@ai-sdk/provider-utils": "4.0.56","@hono/node-server": "^2.0.5",diff --git a/plugin-variants/gbrain-coding/.claude-plugin/plugin.json b/plugin-variants/gbrain-coding/.claude-plugin/plugin.jsonindex 01c115dd7b..95970d5537 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.36.0",+ "version": "0.60.37.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 1ca4e534e0..8f0139692e 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.36.0",+ "version": "0.60.37.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 fbb467c663..fd6cce50f0 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.36.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.37.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 69b7349893..1dff32bab5 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.36.0",+ "version": "0.60.37.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 8f78d76716..96bd91d926 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.36.0",+ "version": "0.60.37.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 eed2ea79b1..64a28cb4da 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.36.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.37.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 77d1b49ce4..5b51f6a44e 100644--- a/plugin/README.md+++ b/plugin/README.md@@ -1,4 +1,4 @@-<!-- gbrain-plugin-tree-stamp: 0.60.36.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.37.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/skills/migrations/v0.60.36.0.md b/skills/migrations/v0.60.37.0.mdsimilarity index 99%rename from skills/migrations/v0.60.36.0.mdrename to skills/migrations/v0.60.37.0.mdindex 1611d298db..ce571f0375 100644--- a/skills/migrations/v0.60.36.0.md+++ b/skills/migrations/v0.60.37.0.md@@ -1,4 +1,4 @@-# Upgrade to v0.60.36.0: Foundations 1+# Upgrade to v0.60.37.0: Foundations 1This release makes large PGLite brains fast without manual tuning, records whocreated each row, tracks which agent seat a captured session came from, movesdiff --git a/skills/skills.lock.json b/skills/skills.lock.jsonindex 699f2192a9..5fd2dc5331 100644--- a/skills/skills.lock.json+++ b/skills/skills.lock.json@@ -159,7 +159,7 @@"migrations/v0.60.30.0.md": "2dd24bb319cad80ae15c52fb163c704fc3adfc1182d44ab563f636f07434a9e0","migrations/v0.60.31.0.md": "fb8c0a98451a6f7826413ee7463421612511986252f6b803d91a26da94d378bf","migrations/v0.60.34.0.md": "1d45e41dea447c6fdfd4a942ecb02df802548668f3d43d1de30352d39565f58d",- "migrations/v0.60.36.0.md": "76edc4b92c99ffab9308d5381e631865991bb0d326a0f6ca3aba8d27f25a7e41",+ "migrations/v0.60.37.0.md": "3a6080f13989f26f6371d80ae8e6952441d725a2232dfe3c0d92149ba24998b6","migrations/v0.60.5.0.md": "0d3ee19359a2740de08ac9ec388ddc15e7c72d663afe33832e1e54170528acab","migrations/v0.60.6.0.md": "1cbfca2c899e1348acbd61f0baa4c8e723b5283ff868c710c74e116c0cb6726e","migrations/v0.7.0.md": "97c2740445a10b1c5c7123c17dbd625fa27a94095b85d27c2b278da756c4c59a",diff --git a/templates/bootstrap/template-repo/README.md b/templates/bootstrap/template-repo/README.mdindex 5d4e9bf291..448935d487 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.36.0 -->+<!-- gbrain-template-stamp: 0.60.37.0 -->This repository is the **"Use this template"** distribution artifact for a[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same