Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
v0.60.143.0 chore(release): restamp onto master v0.60.142.0
time-attackce94033e962d
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex b7b7219774..748ebc3636 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.142.0",+ "version": "0.60.143.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 362f96871f..8bc3162f47 100644--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.142.0",+ "version": "0.60.143.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 cc0be5c306..6a13fe9a54 100644--- a/BOOTSTRAP_FOR_AGENTS.md+++ b/BOOTSTRAP_FOR_AGENTS.md@@ -1,4 +1,4 @@-<!-- gbrain-runbook-stamp: 0.60.142.0 -->+<!-- gbrain-runbook-stamp: 0.60.143.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 e0f30d312d..9dc6c26872 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,28 @@ 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.143.0] - 2026-10-10++**A managed import writes about 12% less WAL on Postgres (200 → 176 KB per page at 50,000 pages) and spends 3-13% less time executing SQL, with the same rows: each imported, synced or put page is sealed by one closing write instead of two, the import's crash checkpoint no longer stores the page text, and the write claim looks up its root's earlier rows by index.**++Efficiency wave (GBRA-69). Base is master at wave 7 (f3155533e), measured on the same 4-vCPU AMD EPYC / 16 GiB machine, Bun 1.4.2, synthetic brains (5k = 5,003 pages, 50k = 50,030 pages / 265,861 chunks), cold `gbrain import` of every source with `--no-embed`, N=1.++| Path | Engine, brain | Before | After |+|---|---|---|---|+| `gbrain import`, wall | Postgres 50k | 1,458 s (29.1 ms/page) | 1,427 s (28.5 ms/page) |+| SQL execution time | Postgres 50k | 657 s | 635 s |+| WAL written | Postgres 50k | 9.99 GB | 8.81 GB |+| `gbrain import`, wall | Postgres 5k | 142.9 s | 133.5 s |+| SQL execution time | Postgres 5k | 64.2 s | 55.6 s |+| `gbrain import`, wall | PGLite 5k | 151.9 s | 141.9 s |++### Itemized changes++- **One closing page write** (`import-file.ts`, `page-state/projections.ts` `sealImportedPage`, `persistence/import-prepare.ts`, `sync-prepare.ts`, `page-prepare.ts`, `engine-sql/chunks.ts`). A coordinated import (managed import, managed sync and the lean `put_page` path) no longer stamps `chunker_version` with its chunk insert; its apply reports `chunkerSeal` and the caller stamps it in the same UPDATE as the text seal, after its one read-back. The chunker version is stamped whatever the page's revision, the text seal only at the revision read back, and the page id is checked against the page the transaction wrote, as before. Uncoordinated imports are unchanged.+- **Content-free import checkpoints** (`persistence/import-mutations.ts`). The managed-import `op_checkpoints` row keeps the admission's request id and expectations but not the page content: its key binds the input hash, so a retry restores the content from the bytes it just read and refuses a checkpoint whose stored input hash or slug does not match. Checkpoints written by older binaries, which carry the content, still resume and clear. (Design agreed with GBRA-64.)+- **Indexed claim root probe** (`persistence/journal.ts` `claimableWriteSql`). The "unfinished row ahead on the same root" anti-join matches a worktree root by `worktree_id` and a database-only root by `source_incarnation`, both covered by the pending indexes, instead of a COALESCE text key that walked every pending row once per candidate: 6.1 → 1.4 ms per claim with eight worktrees of queued rows; unchanged for a single source. The claimable rows and their order are identical. (Design agreed with GBRA-64.)+- Tests: `claim-earlier-equivalence.test.ts` + its Postgres e2e (120 randomized request tables of worktree and database-only roots, every state, passable sync rows and lane groups claim exactly the former predicate's rows in the same order; a forced break of either probe fails it; the Postgres arm checks the index range scan), a checkpoint-resume case in `persistence-file-import.test.ts` (content-free checkpoint, legacy checkpoint with content), and `e2e/managed-import-crash.test.ts` (an import SIGKILLed after admission or at the closing write is published from the stored request on retry, same request id, page sealed, both engines).+## [0.60.142.0] - 2026-10-10**A file write's publication takes its request-row lock and its `publication_started` stamp in one statement instead of two. No behavior changes; one UPDATE fewer per published file.**diff --git a/VERSION b/VERSIONindex 7533792eb1..f916ac8ff3 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-0.60.142.0+0.60.143.0diff --git a/openclaw.plugin.json b/openclaw.plugin.jsonindex 1fbb5799d3..513c817d0d 100644--- a/openclaw.plugin.json+++ b/openclaw.plugin.json@@ -1,7 +1,7 @@{"id": "gbrain-context-engine","name": "gbrain",- "version": "0.60.142.0",+ "version": "0.60.143.0","description": "Personal knowledge brain with Postgres + pgvector hybrid search","family": "bundle-plugin","kind": "context-engine",diff --git a/package.json b/package.jsonindex 79ee80e141..26448f8a97 100644--- a/package.json+++ b/package.json@@ -230,7 +230,7 @@"bun": ">=1.4.0"},"license": "MIT",- "version": "0.60.142.0",+ "version": "0.60.143.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 317b8fc7da..c039701764 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.142.0",+ "version": "0.60.143.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 2bc4070f83..b9743ea481 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.142.0",+ "version": "0.60.143.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 ad64a925f7..5cff898b17 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.142.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.143.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 88404ee9b0..2509f69b51 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.142.0",+ "version": "0.60.143.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 ca80727bee..501fc6c43a 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.142.0",+ "version": "0.60.143.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 78c5bf85a5..5f9eb22615 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.142.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.143.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 340812048c..0c9b8617cb 100644--- a/plugin/README.md+++ b/plugin/README.md@@ -1,4 +1,4 @@-<!-- gbrain-plugin-tree-stamp: 0.60.142.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.143.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 adb7e364c1..09970b7c9b 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.142.0 -->+<!-- gbrain-template-stamp: 0.60.143.0 -->This repository is the **"Use this template"** distribution artifact for a[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same