Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
v0.60.187.0 chore(release): restamp onto master v0.60.186.0
garrytanb07fb182cfdd
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex c6c4505cb3..6ba483e289 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.186.0",+ "version": "0.60.187.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 3f93362861..a8b1fed408 100644--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.186.0",+ "version": "0.60.187.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 c7ef7615fb..4efda402d9 100644--- a/BOOTSTRAP_FOR_AGENTS.md+++ b/BOOTSTRAP_FOR_AGENTS.md@@ -1,4 +1,4 @@-<!-- gbrain-runbook-stamp: 0.60.186.0 -->+<!-- gbrain-runbook-stamp: 0.60.187.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 2d5a1d2fd2..b9cbc03cb1 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,26 @@ 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.187.0] - 2026-10-12++**`gbrain serve` on a Supabase transaction pooler (:6543) no longer wedges. Answers stop landing on the wrong statement, and a persistence owner that needs a restart says so in `/health?deep=1` (#6543).** The vendored postgres driver sent several statements down one connection without waiting for each answer (pipelining). Supavisor's transaction mode can't carry pipelined statements across transaction boundaries. On a local Supavisor 2.5.1, 8 workers on a pool of 3 for 20 s gave 13 to 22 statements another statement's rows, plus connections that hung until the in-flight watchdog fired at 330 s. With pipelining off: 6078 ok, 0 errors. The two `pg_statement_build_failed UNDEFINED_VALUE` lines in the report were symptoms: each statement bound a column from a row that belonged to another statement. Three driver defects made it worse, and each is fixed here. Same-day mitigation for an older install: `PGMAX_PIPELINE=0` in serve's environment.++### Itemized changes++- **No pipelining on transaction-pooler URLs.** Read-side pools (module, engine instance, connection manager) default to `max_pipeline: 0` when the URL is on port 6543 or carries `?prepare=false`, or when `GBRAIN_PREPARE=0`. `resolveReadPoolPipeline` reads the URL itself, so `GBRAIN_PREPARE=1` can't hide a 6543 URL. Your explicit `?max_pipeline=` or a non-empty `PGMAX_PIPELINE` still wins. Direct connections and the Supabase session pooler on :5432 keep the driver default. PgBouncer transaction mode carries pipelining correctly. Turning it off measured no cost there. A new PgBouncer E2E pins `?max_pipeline=100` so pipelined-through-a-pooler coverage stays.+- **Driver: a dropped connection's error no longer poisons its replacement.** `closed()` now clears the saved error, result and row state on every close, not only during startup. Before, the next connection's first statement got the dead socket's `57P01` (direct) or `XX000 DbHandler exited` (Supavisor).+- **Driver: a statement that fails to build respects the pipeline limit.** Before, the connection always reported itself ready, so statements were sent behind the failed one even with `max_pipeline: 0`. `begin`'s `onexecute` runs once, after a successful build.+- **Driver: `UNDEFINED_VALUE` names the parameter.** The `pg_statement_build_failed` warn line now prints `param=$n`, and its text says that on a transaction pooler a build failure usually means a misrouted row. Every driver edit goes through `patches/[email protected]`. `test/postgres-driver-vendor.test.ts` checks all three vendored copies offline.+- **`/health?deep=1` stays report-only, with stable codes.** Each 503 carries `code`, `fix` and `docs`:+ - `persistence_restart_required` comes from the in-process consumer state and is checked before the pooled probe.+ - `pool_inflight_over_budget` covers a statement older than the pool budget.++ A `transport` block, read once at startup, shows `prepare`, `max_pipeline` and why, the server `statement_timeout` (`session_timeouts_not_applied` with the `ALTER ROLE` fix when the pooler drops it), and the backend `application_name` when it is Supavisor. Serve logs the same line at startup. The body never carries request ids, hostnames or credentials.+- **Opt-in self-exit: `GBRAIN_SERVE_RESTART_REQUIRED_EXIT_SECONDS=<n>` (n >= 120).** Serve exits with code 69 (`serve_unhealthy_exit`) after `restart_required` has held continuously for n seconds, so a `Restart=always` supervisor recovers it. The hold resets when the condition clears. Cleanup is bounded at 5 s. After 3 self-exits within an hour (recorded in `serve-self-exit.json` under the gbrain home), serve stops exiting, logs `serve_self_exit_suppressed`, and deep health asks for a manual restart. Off by default.+- **`--no-delegate` / `GBRAIN_SYNC_NO_DELEGATE=1` runs the sync's own consumer.** `forceOwnConsumer()` had no production caller, so with `persistence.single_consumer` on, an opted-out sync waited behind a wedged serve. Opt-out, a serve that doesn't answer its IPC socket, and a genuinely stale serve now force the sync's own consumer. A healthy current serve with delegation disabled (`unsupported_kind`, `unsupported_flag`, `kill_switch`) does not. Fallback lines stop claiming "uses its own consumer" on rungs that wait behind serve.+- **Read-only misroute audit: `scripts/audit-pooler-misroute.ts`.** Self-contained, so it runs from a v0.60.180.0 global install. It refuses a transaction-pooler URL and takes an explicit `--url` (direct or session pooler). Each bounded batch is one `REPEATABLE READ READ ONLY` transaction on a single connection. It reports `verified_ok`, `mismatch` and `unknown`, and rows changed during the audit or with missing history count as `unknown`, never as clean. Guide: `docs/guides/pooler-misroute-audit.md`. Any corrective write is a separate, approved step.+- **Corrected docs.** The claim that a server-side `statement_timeout` bounds every statement is corrected in `db.ts`, `consumer.ts`, `docs/ENGINES.md` and the error registry, since Supavisor drops the startup parameter. `docs/architecture/postgres-cancellation.md`, `docs/mcp/DEPLOY.md`, `docs/guides/exit-codes.md` and the error-code docs are updated. `GBRAIN_SUPAVISOR_URL` passes through `scripts/run-e2e.sh`.+## [0.60.186.0] - 2026-10-12**An agent is told when a result leaves out something it could get, and how to get it with what its connection can actually call (D2), and an authenticated connection whose grant blocks operations it could use is told why and what the host can run, without naming any operation (D4).** Before, `get_page`, `search` and `query` dropped takes on surfaces that hide `takes_list` and said nothing, so models either refused or guessed; a "call `takes_list`" hint on a `starter` registration would have led to `unknown_tool`. On a Cat 40 smoke, gpt-6.1-sol answered 10 of 10 hidden-takes tasks on this branch against 1 of 10 on master (Opus 5.5 and Sonnet 5.5 10 of 10, at the ceiling), with 0 leaks, 0 unsafe writes and 0 `unknown_tool` answers after a notice. Nothing a connection can call changes, and no tool schema changes.diff --git a/VERSION b/VERSIONindex 0438f242a0..780bff0c45 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-0.60.186.0+0.60.187.0diff --git a/llms-full.txt b/llms-full.txtindex 617c86d349..b64b502b2d 100644--- a/llms-full.txt+++ b/llms-full.txt@@ -5947,7 +5947,7 @@ transaction-mode pooler (port 6543, `?prepare=false`) a build failure usuallymeans a misrouted answer: the statement bound a value read from a row thatbelonged to another statement, so earlier reads on that pool are suspect too.Check `/health?deep=1` `transport.max_pipeline` (gbrain sends `0` there since-v0.60.186.0; `PGMAX_PIPELINE=0` forces it) and audit the window with+v0.60.187.0; `PGMAX_PIPELINE=0` forces it) and audit the window with[the pooler misroute audit](guides/pooler-misroute-audit.md). Elsewhere thecall site that bound `undefined` is a gbrain bug, so report the line.`getPoolDiagnostics().buildFailures` counts them.@@ -6002,7 +6002,7 @@ session_timeouts_not_applied, fix?, application_name? }`. `prepare` and(`transaction_pooler_port`, `url_prepare_false`, `gbrain_prepare_off`,`url_max_pipeline`, `env_pgmax_pipeline` or `default`): gbrain builds the readpools with `max_pipeline: 0` for a transaction-mode URL (port 6543 or-`?prepare=false`) or `GBRAIN_PREPARE=0` since v0.60.186.0, and a URL+`?prepare=false`) or `GBRAIN_PREPARE=0` since v0.60.187.0, and a URL`?max_pipeline=` or a non-empty `PGMAX_PIPELINE` always wins.PgBouncer in transaction mode carries pipelined statements correctly, so aPgBouncer deployment on port 6543 or with `?prepare=false` can opt back in withdiff --git a/openclaw.plugin.json b/openclaw.plugin.jsonindex 8546a50445..0c5cc60afe 100644--- a/openclaw.plugin.json+++ b/openclaw.plugin.json@@ -1,7 +1,7 @@{"id": "gbrain-context-engine","name": "gbrain",- "version": "0.60.186.0",+ "version": "0.60.187.0","description": "Personal knowledge brain with Postgres + pgvector hybrid search","family": "bundle-plugin","kind": "context-engine",diff --git a/package.json b/package.jsonindex fd37be2102..4298215efe 100644--- a/package.json+++ b/package.json@@ -233,7 +233,7 @@"bun": ">=1.4.0"},"license": "MIT",- "version": "0.60.186.0",+ "version": "0.60.187.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 80fc79f22e..1c728d2680 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.186.0",+ "version": "0.60.187.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 b11bd49f68..e2bc4f2596 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.186.0",+ "version": "0.60.187.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 8da8716bce..d35d1e936e 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.186.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.187.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 34f22f032f..9b1cc4c15c 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.186.0",+ "version": "0.60.187.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 4d052fd073..9d4de62089 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.186.0",+ "version": "0.60.187.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 f6fcd2ada3..3a162c56d5 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.186.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.187.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 27934f5313..16c53e8a4f 100644--- a/plugin/README.md+++ b/plugin/README.md@@ -1,4 +1,4 @@-<!-- gbrain-plugin-tree-stamp: 0.60.186.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.187.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 4d17e4b0cb..540f904fc6 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.186.0 -->+<!-- gbrain-template-stamp: 0.60.187.0 -->This repository is the **"Use this template"** distribution artifact for a[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same