Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
v0.60.365.0 chore(release): restamp onto master v0.60.364.0
garrytane923ba47e923
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex 5e682e5eeb..ea22baa210 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.364.0",+ "version": "0.60.365.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 bd19469d6c..cad9de2804 100644--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.364.0",+ "version": "0.60.365.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 0760554a4a..719252a5c4 100644--- a/BOOTSTRAP_FOR_AGENTS.md+++ b/BOOTSTRAP_FOR_AGENTS.md@@ -1,4 +1,4 @@-<!-- gbrain-runbook-stamp: 0.60.364.0 -->+<!-- gbrain-runbook-stamp: 0.60.365.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 396bfe2ccb..545196ae8d 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,33 @@ 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.365.0] - 2026-10-22++**Behind a split pooler route, a one-shot CLI command no longer opens direct database connections, and a short-lived command opens one instead of three.** Every gbrain process that saw a split route (a Supabase pooler URL or `GBRAIN_DIRECT_DATABASE_URL`) opened a direct (session) pool of up to 3 connections, whatever it ran. A host running many short commands beside `gbrain serve` and the jobs worker spent its session-mode connection budget on processes that ran one statement and exited. The direct pool now follows the command.++### What changed++| Process | Before | Now |+|---|---|---|+| `serve`, `jobs`, `autopilot`, `sync --watch` | up to 3 direct connections | up to 3 (unchanged) |+| `sync`, `put`, `import`, `dream`, `cycle`, `sources`, `mcp`, `migrate-graduation`, `doctor`, `engine` | up to 3 | 1 |+| Any other command | up to 3 | none; statements run on the ordinary pool |+| A one-shot command applying pending schema migrations | up to 3 | 1, for the DDL only (advisory lock and 30-minute statement timeout kept) |+| A one-shot command that takes a `gbrain_cycle_locks` lease | up to 3 | 1, so the lease heartbeat keeps its own connection |++`gbrain engine status --probe` reports the profile as `mode.direct_profile`, and `single (one-shot command)` where the route is configured but unused.++**Spend effect:** none. No model calls. **Overrides:** `GBRAIN_DIRECT_POOL_SIZE` still sets the size wherever a direct pool opens, `GBRAIN_DISABLE_DIRECT_POOL=1` still wins, and `GBRAIN_DIRECT_POOL_BY_COMMAND=0` restores the earlier behavior for every command. Embedders and tests keep the resident profile, so library behavior is unchanged.++### Itemized changes++- `src/core/direct-pool-profile.ts`: the process profile (resident, short-lived, one-shot); `src/cli/main.ts` sets it once per dispatched command.+- `src/core/connection-manager.ts`: sizes the direct pool by profile, keeps `ddl()` on the direct route, adds `direct_profile` to `describeMode()`.+- `src/core/db-lock.ts`: a lease promotes a one-shot process to short-lived.+- `src/core/persistence/claim-phase.ts`: exports `OWNER_COMMANDS`.+- `docs/ENGINES.md#direct-pool-by-command`.+- Tests: `test/direct-pool-profile.test.ts` (pure resolution, PGLite and real Postgres), `test/cli-socket.test.ts`.+## [0.60.364.0] - 2026-10-22**A deletion-provenance preview over a long history no longer stalls or answers `unknown` for whole batches, and the database-only keep no longer re-reads the history for every page.** The read behind `gbrain repair file-drift --held --side deleted --state file_gone` walked the history once per 500 files with a pathspec. On a history of about 20,000 commits each walk ran past its 120 s limit and labelled its whole batch `unknown`, so a preview of about 2,000 held files sat silent for many minutes and returned round thousands of `unknown`. The `--provenance never_committed --prefer database` apply then spent about 11 s per page re-reading the history. Sync's check of whether a missing file was ever committed (#7130) had the same walk, so on a long history committed deletions were held instead of applied.diff --git a/VERSION b/VERSIONindex 3e7b58f2bb..799d2d48e0 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-0.60.364.0+0.60.365.0diff --git a/openclaw.plugin.json b/openclaw.plugin.jsonindex 381ef54f41..39bee5dd84 100644--- a/openclaw.plugin.json+++ b/openclaw.plugin.json@@ -1,7 +1,7 @@{"id": "gbrain-context-engine","name": "gbrain",- "version": "0.60.364.0",+ "version": "0.60.365.0","description": "Personal knowledge brain with Postgres + pgvector hybrid search","family": "bundle-plugin","kind": "context-engine",diff --git a/package.json b/package.jsonindex 3c74d9e49f..938ebc14ae 100644--- a/package.json+++ b/package.json@@ -244,7 +244,7 @@"bun": ">=1.4.0"},"license": "MIT",- "version": "0.60.364.0",+ "version": "0.60.365.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 071b32113f..1f3c708836 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.364.0",+ "version": "0.60.365.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 402b1a62ec..216d70777b 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.364.0",+ "version": "0.60.365.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 10ff9b8049..5b8cf77ab9 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.364.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.365.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 ae450f634e..a78c1b1d59 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.364.0",+ "version": "0.60.365.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 e9619a9e57..7642c75d61 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.364.0",+ "version": "0.60.365.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 be3e1ab5f4..184e33431d 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.364.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.365.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 895eced933..c7bbf11035 100644--- a/plugin/README.md+++ b/plugin/README.md@@ -1,4 +1,4 @@-<!-- gbrain-plugin-tree-stamp: 0.60.364.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.365.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/src/core/behavior-change-notice.ts b/src/core/behavior-change-notice.tsindex ce401bd6d9..271000fb0b 100644--- a/src/core/behavior-change-notice.ts+++ b/src/core/behavior-change-notice.ts@@ -1102,7 +1102,7 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText;// GBRA-133 (deletion provenance and origin evidence at scale). `since` is stamped at the merge slot.{ since: '0.60.364.0', text: 'A `gbrain repair file-drift --held --side deleted --state file_gone` preview over a long history no longer stalls or answers `unknown` for whole batches: the history is walked once and cached per commit instead of once per 500 files, `details.provenance` lists every kind (zeros included), the preview reports the commits it has read on stderr, and a file HEAD holds again reads `deletion_uncommitted`. The database-only keep (`--provenance never_committed --prefer database --apply`) reuses the walk instead of re-reading the history for every page. A managed sync deciding whether a missing file was ever committed reads the same walk, so on a long history a committed deletion is applied instead of being held when the per-batch read ran out of time.' },// GBRA-133 (direct pool by command). `since` is stamped at the merge slot.- { since: 'TBD', text: 'Behind a split pooler route (a Supabase pooler URL or `GBRAIN_DIRECT_DATABASE_URL`), the direct pool now follows the command (approved by the maintainer, 2026-10-21). `gbrain serve`, `jobs`, `autopilot` and `sync --watch` keep up to 3 direct connections. `sync`, `put`, `import`, `dream`, `cycle`, `sources`, `mcp`, `migrate-graduation`, `doctor` and `engine` open 1. Every other command opens none and runs its statements on the ordinary pool, except to apply pending schema migrations or once it takes a lease, when it opens 1. `gbrain engine status --probe` reports the profile as `mode.direct_profile` (and `single (one-shot command)` where the route is configured but unused). `GBRAIN_DIRECT_POOL_SIZE` still sets the size; `GBRAIN_DIRECT_POOL_BY_COMMAND=0` restores the earlier behavior.' },+ { since: '0.60.365.0', text: 'Behind a split pooler route (a Supabase pooler URL or `GBRAIN_DIRECT_DATABASE_URL`), the direct pool now follows the command (approved by the maintainer, 2026-10-21). `gbrain serve`, `jobs`, `autopilot` and `sync --watch` keep up to 3 direct connections. `sync`, `put`, `import`, `dream`, `cycle`, `sources`, `mcp`, `migrate-graduation`, `doctor` and `engine` open 1. Every other command opens none and runs its statements on the ordinary pool, except to apply pending schema migrations or once it takes a lease, when it opens 1. `gbrain engine status --probe` reports the profile as `mode.direct_profile` (and `single (one-shot command)` where the route is configured but unused). `GBRAIN_DIRECT_POOL_SIZE` still sets the size; `GBRAIN_DIRECT_POOL_BY_COMMAND=0` restores the earlier behavior.' },];/** The newest disclosed change's release: the notice id moves only when a release adds rows. */diff --git a/templates/bootstrap/template-repo/README.md b/templates/bootstrap/template-repo/README.mdindex ce0c128191..09a2fcb716 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.364.0 -->+<!-- gbrain-template-stamp: 0.60.365.0 -->This repository is the **"Use this template"** distribution artifact for a[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same