Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
v0.60.233.0 chore(release): restamp onto master v0.60.232.0
garrytan3d9450fdf0c2
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex d9b2acf10e..384c5ad8a2 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.232.0",+ "version": "0.60.233.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 ad4765235b..027e4c02f9 100644--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.232.0",+ "version": "0.60.233.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 83daf01fbc..3cc7703e97 100644--- a/BOOTSTRAP_FOR_AGENTS.md+++ b/BOOTSTRAP_FOR_AGENTS.md@@ -1,4 +1,4 @@-<!-- gbrain-runbook-stamp: 0.60.232.0 -->+<!-- gbrain-runbook-stamp: 0.60.233.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 0b25740770..9d77fdb261 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,20 @@ 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.233.0] - 2026-10-14++**An autopilot `sync` job on a managed brain now drains its source until it is caught up or its deadline arrives, instead of landing about one page per job (#6706).** On a managed brain each `sync` Minions job ran a single pass: it admitted one page write, waited 5 s for it and returned `partial`. Where a write takes 10-20 s to commit, each freshness job landed about one page and still reported `completed`, so a 10-entry delta took 3 hours while `gbrain sync` drained the same backlog in under 2 minutes. Now the job drains on one lane until the source is synced or its deadline (less a reserve for cleanup) arrives, queues one follow-up job when work is left, and reports its result in the same shape as the CLI. To go back: `gbrain config set sync.job_drain false`. Inline `gbrain jobs work` and supervisor workers need a restart to pick it up.++### Itemized changes++- **The job drains to its deadline** (`src/core/minions/handlers/sync-job-drain.ts`, `src/core/minions/handlers/sync.ts`): the deadline is the job's `timeout_at`, or the queue's wall-clock kill instant for a job without `timeout_ms`, capped at an hour and less `min(60 s, remaining/4)` so git, cleanup and the embed submission finish in time. Embeds are queued once when the job ends, as before.+- **Bounded drain** (`src/core/persistence/sync-drain.ts`): `runDrain` takes a caller deadline, and the earlier of it and the CLI run deadline wins. A deadline already past makes no pass. A deadline that lands in a retry backoff, a capacity wait or a hung reconnect returns `resumable / deadline` instead of throwing; fatal errors still throw. A pass that ignores the abort is abandoned after 10 s and fenced at its next step.+- **One drainer per source** (`src/commands/autopilot-dispatch.ts`): freshness dispatch keeps at most one pending sync job per source and skips a source that already has a live sync job. A second managed sync job that starts while another drains its source completes as `skipped: sync_in_progress` with `running_job_id` and a `next` that watches it.+- **One follow-up job** (`src/core/minions/handlers/sync.ts`): when a drain stops with work left, made progress and is safe to loop, the job queues one continuation (priority 5 or lower, behind waiting embeds, with the parent's `timeout_ms`) and names it in `continuation_job_id`. Only worker-backed brains and trusted submitters get one.+- **Job results** (`src/core/minions/handlers/sync-job-drain.ts`): a drained job result carries `outcome`, `drain`, `next` and `incomplete`, with `pagesAffected` and `held` trimmed to 50 entries plus counts, and `gbrain jobs get` shows progress while it runs. Results from non-managed brains are unchanged.+- **Liveness** (`src/core/persistence/sync-movement.ts`, `src/core/persistence/sync-status.ts`): `gbrain sources status` and `writer movement` treat a live sync job as the source's drain (`live.drain_job_id`), and `gbrain sync status` names it in `live_job_id` and points `next` at it instead of starting a second drainer.+- **Tests:** `test/sync-handler-drain-6706.test.ts` (PGLite and Postgres) holds each write past the 5 s single pass: the previous handler lands no page, the new one lands all four in one job. `test/sync-drain-deadline-6706.test.ts` covers every deadline stop, the abandoned-pass fence and `jobDisposition` per stop reason.+## [0.60.232.0] - 2026-10-14**MCP `list_write_conflicts` refuses a source outside the caller's grant and bounds its window to that source's own requests (#6643 follow-up).** A remote caller that named a source outside its grant used to get an empty report back. The response's `window` sequences were also brain-wide, so polling one granted source showed write activity in sources the caller cannot see. Both were found by GBRA-60's D5 agent smoke.diff --git a/VERSION b/VERSIONindex 6b91de3dfa..e8e0c1d396 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-0.60.232.0+0.60.233.0diff --git a/openclaw.plugin.json b/openclaw.plugin.jsonindex f733d298a7..e17973bb36 100644--- a/openclaw.plugin.json+++ b/openclaw.plugin.json@@ -1,7 +1,7 @@{"id": "gbrain-context-engine","name": "gbrain",- "version": "0.60.232.0",+ "version": "0.60.233.0","description": "Personal knowledge brain with Postgres + pgvector hybrid search","family": "bundle-plugin","kind": "context-engine",diff --git a/package.json b/package.jsonindex 9a135b5f10..e2eb761b88 100644--- a/package.json+++ b/package.json@@ -234,7 +234,7 @@"bun": ">=1.4.0"},"license": "MIT",- "version": "0.60.232.0",+ "version": "0.60.233.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 28ad56974d..f592b85931 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.232.0",+ "version": "0.60.233.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 9e46d0ddfb..d12a9a7f1a 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.232.0",+ "version": "0.60.233.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 7f04b9117e..0e9f7d552f 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.232.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.233.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 db9e8fa379..3ac5ee0e3c 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.232.0",+ "version": "0.60.233.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 d6c568c733..f0f7efe58b 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.232.0",+ "version": "0.60.233.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 6e08d87d11..0ae78b14a9 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.232.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.233.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 230485e41f..1fff8dcca8 100644--- a/plugin/README.md+++ b/plugin/README.md@@ -1,4 +1,4 @@-<!-- gbrain-plugin-tree-stamp: 0.60.232.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.233.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 c20a3dbda8..e74b12aed3 100644--- a/src/core/behavior-change-notice.ts+++ b/src/core/behavior-change-notice.ts@@ -571,7 +571,7 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText }{ since: '0.60.231.0', text: '`get_chunks` now returns a page\'s chunks 50 at a time in chunk_index order instead of all of them. Pass `from_index` and `limit` (up to 500 over MCP) to read further. The result is still a list; `_meta.pagination` reports `total_chunks` and `next_from_index`, and MCP callers get a `listing_truncated` notice naming the next call when more chunks remain. The local CLI prints a stderr hint when the default cut the list.' },{ since: '0.60.231.0', text: '`get_versions` (`gbrain history`) now returns metadata only for the newest 20 versions by default: id, snapshot time, title, type, tags and frontmatter, without `compiled_truth` or `timeline`. Pass `include_body: true` for the bodies (still filtered for remote callers) and a larger `limit` for older versions (up to 100 over MCP; the local CLI honors any limit). When older versions exist, `_meta.pagination` says so and MCP callers get a `listing_truncated` notice. `gbrain history` shows each version\'s title when no body was requested; `revert_version` is unchanged.' },{ since: '0.60.231.0', text: 'Short page leads (exact-slug and alias search snippets, relational-recall synopses, reflex pointer synopses, entity card summaries, entity-name leads, and think\'s anchor and date-window page rows) now read only the first 64 KiB of a page, respect fact withdrawals, and mask private-key text as a token. Think\'s anchor and date-window rows carry at most 64 KiB of page text instead of the whole page. Output for ordinary small pages is unchanged.' },- { since: '0.60.231.0', text: 'A `sync` Minions job on a managed brain (autopilot freshness and hand-submitted jobs) now drains its catch-up like `gbrain sync` instead of landing about one page per job: it keeps publishing (bulk groups, one lane) until the source is synced or the job\'s own deadline less a 60 s reserve (its `timeout_ms`, or the queue\'s wall-clock limit for a job without one, at most an hour), so a job now holds a worker slot up to that deadline. When it stops with work left and the stop is safe to repeat, it queues one follow-up `sync` job (`continuation_job_id`, priority 5, behind waiting embeds) on a worker-backed brain. Freshness dispatch is single-flight per source (`maxPending: 1`), and a sync job that starts while another is draining the same source completes as `skipped: sync_in_progress` with `running_job_id` and a `next` that watches it. The job result now carries the CLI\'s `outcome`, `drain` and `next` plus `incomplete` (a queued follow-up\'s `next` observes it; a remotely submitted job\'s `next` asks for a new job or the host operator), keeps the first 50 `pagesAffected` and `held` entries with `pages_affected_count` / `held_count`, prints one stderr line when it stops short, and `jobs get` shows progress while it runs. `sources status`, `writer movement` and `sync status` count a live sync job as the source\'s drain (`live.drain_job_id`, `live_job_id`). Classic (non-managed) sync jobs are unchanged. To go back: `gbrain config set sync.job_drain false`.' },+ { since: '0.60.233.0', text: 'A `sync` Minions job on a managed brain (autopilot freshness and hand-submitted jobs) now drains its catch-up like `gbrain sync` instead of landing about one page per job: it keeps publishing (bulk groups, one lane) until the source is synced or the job\'s own deadline less a 60 s reserve (its `timeout_ms`, or the queue\'s wall-clock limit for a job without one, at most an hour), so a job now holds a worker slot up to that deadline. When it stops with work left and the stop is safe to repeat, it queues one follow-up `sync` job (`continuation_job_id`, priority 5, behind waiting embeds) on a worker-backed brain. Freshness dispatch is single-flight per source (`maxPending: 1`), and a sync job that starts while another is draining the same source completes as `skipped: sync_in_progress` with `running_job_id` and a `next` that watches it. The job result now carries the CLI\'s `outcome`, `drain` and `next` plus `incomplete` (a queued follow-up\'s `next` observes it; a remotely submitted job\'s `next` asks for a new job or the host operator), keeps the first 50 `pagesAffected` and `held` entries with `pages_affected_count` / `held_count`, prints one stderr line when it stops short, and `jobs get` shows progress while it runs. `sources status`, `writer movement` and `sync status` count a live sync job as the source\'s drain (`live.drain_job_id`, `live_job_id`). Classic (non-managed) sync jobs are unchanged. To go back: `gbrain config set sync.job_drain false`.' },// GBRA-96 (default reranker). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.{ since: '0.60.228.0', text: 'The default search reranker is now Voyage `rerank-3-lite` instead of `rerank-2.5`, for brains that never set `search.reranker.model` (a brain that set one keeps it). In gbrain-evals #148 (v0.10.93) it cut rerank cost 60% at the same 50 candidates × 1,400 tokens, with retrieval quality within noise. To go back: `gbrain config set search.reranker.model voyage:rerank-2.5`.' },// #6650 follow-up (group follower stamps). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.diff --git a/templates/bootstrap/template-repo/README.md b/templates/bootstrap/template-repo/README.mdindex f166a6c560..697a6911e4 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.232.0 -->+<!-- gbrain-template-stamp: 0.60.233.0 -->This repository is the **"Use this template"** distribution artifact for a[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same