Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
v0.60.443.0 chore(release): restamp onto master v0.60.442.0
garrytan8648c7223499
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex e588589587..55d75593b2 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.442.0",+ "version": "0.60.443.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 9bec8525f1..338e26c66d 100644--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.442.0",+ "version": "0.60.443.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 5a84d4077f..5b192a0b2f 100644--- a/BOOTSTRAP_FOR_AGENTS.md+++ b/BOOTSTRAP_FOR_AGENTS.md@@ -1,4 +1,4 @@-<!-- gbrain-runbook-stamp: 0.60.442.0 -->+<!-- gbrain-runbook-stamp: 0.60.443.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 4ce73bedb8..ef79ebec67 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,34 @@ 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.443.0] - 2026-10-25++**Three fixes for runs that kept failing or spending without end. An atom drain no longer reports a page whose write didn't commit as a provider failure to retry forever; the page is held after three drains with its receipt and a retry command. `extract-conversation-facts` no longer pays for a model call on every run only to fail with `idempotency_conflict`. The ChatGPT and Claude connectors stop on a 403 instead of refreshing and retrying, keep the session cookie on its origin during a token refresh, honour `auto_sync=false` for queued jobs and `--all`, and bound every `--full` run.**++### What changed++| Situation | Before | Now |+|---|---|---|+| `gbrain dream --drain` meets an atom batch whose write didn't commit | `atom_drain_provider_failure` / `transient` / exit 11 every window, the record reads "The write did not commit." and has no request id | a write failure: each record carries the write's `request_id` and its refusal `code`; after three drains the page is held, leaves the backlog, and doctor `extract_atoms_held_failed` lists it with `receipt_command` and `retry_command` |+| An item's model output has two atoms with the same title | the atom write failed (`generation_live_conflict` on a managed brain) and the page stuck | the atom publishes once, the first kept |+| A conversation-facts batch whose receipt lost its stored intent (a redacted `purged_content` refusal, a purge, receipt compaction) | every run paid a model call, failed `idempotency_conflict` (or got the old failure back) and inserted 0 facts | the batch publishes under its pages' next attempt after one more model call; the next run makes none |+| A connector request returns 403 or a redirect | some 403s refreshed the token and retried; a redirect was retried as a server error | the run ends (`auth_required`), nothing is followed |+| ChatGPT token refresh | a raw request with redirects followed and failures swallowed; `connectors auth` probed anyway | goes through the shared client (same origin, no redirects, paced, counted) and stops with `forbidden`, `rate_limited` or `auth_required`; `connectors auth` saves nothing after a failed refresh unless `--force` |+| `auto_sync=false` | only autopilot's enqueue honoured it; a queued job and `connectors sync --all` still synced | the `connector-sync` job rechecks it and skips (`auto_sync_off`), `--all` skips the provider and names it; an explicit `connectors sync <provider>` still runs |+| `connectors sync --full` | no overall bound | at most 10,000 requests per run (Claude: 5,000 per organization, 10 organizations), over-long pages truncated, plus `--max-requests N` and `--deadline 90s|30m|2h`; a run that hits a bound ends `partial` and keeps its watermark |++### What to watch for after you upgrade++- Atom pages already stuck on a write that didn't commit are struck on each drain and held after the third. Their atoms come back only through the doctor's `retry_command`, which runs one paid extraction.+- A host cron that runs `gbrain connectors sync --all` stops syncing any provider whose `connectors.<p>.auto_sync` isn't on. Turn it on, or name the provider.+- A very large `--full` connector sync now stops at its request ceiling or deadline as `partial`; run it again to continue.++### Itemized changes++- `src/core/persistence/atom-maintenance.ts`, `src/core/cycle/extract-atoms-drain.ts`, `src/core/cycle/extract-atoms.ts`: write-failure classification, strikes and hold for atom batches that didn't commit; repeated atom titles publish once (#7514). Test: `test/extract-atoms-commit-failure-hold.test.ts`.+- `src/core/facts/conversation-publication.ts`: a conversation-facts batch moves to its members' next attempt when its request id is held by another write or by a receipt that lost its intent (#7516). Tests: `test/conversation-facts-redacted-batch-7516.test.ts` and its Postgres arm.+- `src/core/connectors/{client,sync,types}.ts`, `providers/{chatgpt,claude}.ts`, `src/commands/connectors/{auth,sync,index}.ts`, `src/core/minions/handlers/connector-sync.ts`: terminal 403 and redirect, guarded refresh, `auto_sync` enforcement, request ceiling and deadline (#7515). Test: `test/connectors-hardening-7515.test.ts`. Guide: "Request bounds" in `docs/guides/chat-connectors.md`.+## [0.60.442.0] - 2026-10-25**Deleting facts on a large brain no longer scans the whole facts table once per deleted row. A new partial index on `facts(superseded_by)` lets the `ON DELETE SET NULL` foreign key find the rows that point at a deleted fact directly.**diff --git a/VERSION b/VERSIONindex 98fe09f060..6d99f6db42 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-0.60.442.0+0.60.443.0diff --git a/openclaw.plugin.json b/openclaw.plugin.jsonindex aa881eb294..57a620e037 100644--- a/openclaw.plugin.json+++ b/openclaw.plugin.json@@ -1,7 +1,7 @@{"id": "gbrain-context-engine","name": "gbrain",- "version": "0.60.442.0",+ "version": "0.60.443.0","description": "Personal knowledge brain with Postgres + pgvector hybrid search","family": "bundle-plugin","kind": "context-engine",diff --git a/package.json b/package.jsonindex 5de41adfbd..0ef0679ec9 100644--- a/package.json+++ b/package.json@@ -246,7 +246,7 @@"bun": ">=1.4.0"},"license": "MIT",- "version": "0.60.442.0",+ "version": "0.60.443.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 fcc07d2bdc..41b721e3c0 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.442.0",+ "version": "0.60.443.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 a441dc1b83..a660e4dcf5 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.442.0",+ "version": "0.60.443.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 ac6973ed77..ed63971199 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.442.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.443.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 9eebdf3475..4c1ee02262 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.442.0",+ "version": "0.60.443.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 6fec5e160e..3c0e1a11f3 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.442.0",+ "version": "0.60.443.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 80fcca7bc5..7d1355cb87 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.442.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.443.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 d9c4c8b33e..c3c9e9a581 100644--- a/plugin/README.md+++ b/plugin/README.md@@ -1,4 +1,4 @@-<!-- gbrain-plugin-tree-stamp: 0.60.442.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.443.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 c3742f348e..fc07aff2af 100644--- a/src/core/behavior-change-notice.ts+++ b/src/core/behavior-change-notice.ts@@ -1251,13 +1251,13 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText;{ since: '0.60.441.0', text: 'On a managed brain, `remove_link` no longer deletes an edge that the page\'s own text creates (a link, wikilink or frontmatter field): it keeps it and returns `derived_from_text` with a message saying to edit the page text (`edit_page`) instead.' },{ since: '0.60.441.0', text: 'On a managed brain, `extract_entities` writes the entity\'s timeline bullet into the entity page\'s Markdown through the page door, and the backlink to the source page is the link inside that bullet rather than a database-only edge.' },// GBRA-197 lane A (#7514). `since` is stamped at the merge slot.- { since: 'TBD', text: 'On a managed brain, an atom batch whose write did not commit is now reported as a write failure: each item in `gbrain dream --drain --json` carries the request id (`gbrain write-request -- <id>` explains it) and the refusal code, and a batch of such items no longer stops the drain as `provider_failure` (code `atom_drain_provider_failure`, `transient`, retryable). After 3 such failures on the same content the page or transcript is held (`held_failed`, doctor `extract_atoms_held_failed` with its receipt and retry command) instead of failing every window; no model call is made for it, and an explicit retry runs it again. An extraction whose model reply repeats an atom title now publishes one atom for that title instead of failing the whole batch.' },+ { since: '0.60.443.0', text: 'On a managed brain, an atom batch whose write did not commit is now reported as a write failure: each item in `gbrain dream --drain --json` carries the request id (`gbrain write-request -- <id>` explains it) and the refusal code, and a batch of such items no longer stops the drain as `provider_failure` (code `atom_drain_provider_failure`, `transient`, retryable). After 3 such failures on the same content the page or transcript is held (`held_failed`, doctor `extract_atoms_held_failed` with its receipt and retry command) instead of failing every window; no model call is made for it, and an explicit retry runs it again. An extraction whose model reply repeats an atom title now publishes one atom for that title instead of failing the whole batch.' },// #7516 (GBRA-197 lane B). `since` is stamped at the merge slot.- { since: 'TBD', text: 'A managed conversation-facts batch whose receipt lost its stored intent (a `purged_content` refusal the journal redacts, a purge, or receipt compaction) no longer sticks its pages. `gbrain extract-conversation-facts` derived the same batch request id again, so every run paid a model call, failed with `idempotency_conflict` (or got the old failure back) and inserted nothing. The batch now publishes under its pages\' next attempt after one more model call, and the next run makes none. A crashed run that resubmits the same batch still replays its receipt.' },+ { since: '0.60.443.0', text: 'A managed conversation-facts batch whose receipt lost its stored intent (a `purged_content` refusal the journal redacts, a purge, or receipt compaction) no longer sticks its pages. `gbrain extract-conversation-facts` derived the same batch request id again, so every run paid a model call, failed with `idempotency_conflict` (or got the old failure back) and inserted nothing. The batch now publishes under its pages\' next attempt after one more model call, and the next run makes none. A crashed run that resubmits the same batch still replays its receipt.' },// GBRA-197 (#7515 chat-connector hardening). `since` is stamped at the merge slot.- { since: 'TBD', text: 'Chat-connector syncs no longer refresh and retry after a 403: a 403 with a JSON error body or a `www-authenticate` header ends the run as `auth_required` at once, and a redirect is never followed (the session cookie only goes to the provider\'s own origin) and ends it as `auth_required` too. ChatGPT\'s token refresh now goes through the same client, so it is paced, counted and refused the same way: a refused refresh reports `forbidden`, `rate_limited` or `auth_required` instead of being ignored, and `gbrain connectors auth` stops there instead of probing. Re-copy the cookie when a sync reports `auth_required`.' },- { since: 'TBD', text: '`gbrain connectors sync --all` now syncs only providers whose `connectors.<p>.auto_sync` is on and names each one it skips; a queued `connector-sync` job rechecks `auto_sync` when it starts and returns `skipped` if it was turned off. A host cron running `connectors sync --all` for a provider without `auto_sync` stops syncing it: turn `auto_sync` on, or run `gbrain connectors sync <provider>`, which still syncs either way.' },- { since: 'TBD', text: 'Every chat-connector sync is bounded: at most 10,000 requests per run (5,000 per Claude organization, and at most 10 Claude organizations listed), list pages cut to the page size asked for, and new `--max-requests N` and `--deadline <90s|30m|2h>` flags on `gbrain connectors sync`. A run that reaches a bound ends `partial` with `stopReason` `max_requests` or `deadline`, keeps what it imported and holds the watermark; run `gbrain connectors sync <provider>` again (without `--full`) to continue.' },+ { since: '0.60.443.0', text: 'Chat-connector syncs no longer refresh and retry after a 403: a 403 with a JSON error body or a `www-authenticate` header ends the run as `auth_required` at once, and a redirect is never followed (the session cookie only goes to the provider\'s own origin) and ends it as `auth_required` too. ChatGPT\'s token refresh now goes through the same client, so it is paced, counted and refused the same way: a refused refresh reports `forbidden`, `rate_limited` or `auth_required` instead of being ignored, and `gbrain connectors auth` stops there instead of probing. Re-copy the cookie when a sync reports `auth_required`.' },+ { since: '0.60.443.0', text: '`gbrain connectors sync --all` now syncs only providers whose `connectors.<p>.auto_sync` is on and names each one it skips; a queued `connector-sync` job rechecks `auto_sync` when it starts and returns `skipped` if it was turned off. A host cron running `connectors sync --all` for a provider without `auto_sync` stops syncing it: turn `auto_sync` on, or run `gbrain connectors sync <provider>`, which still syncs either way.' },+ { since: '0.60.443.0', text: 'Every chat-connector sync is bounded: at most 10,000 requests per run (5,000 per Claude organization, and at most 10 Claude organizations listed), list pages cut to the page size asked for, and new `--max-requests N` and `--deadline <90s|30m|2h>` flags on `gbrain connectors sync`. A run that reaches a bound ends `partial` with `stopReason` `max_requests` or `deadline`, keeps what it imported and holds the watermark; run `gbrain connectors sync <provider>` again (without `--full`) to continue.' },];/** 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 1c50a58904..68ad65cac6 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.442.0 -->+<!-- gbrain-template-stamp: 0.60.443.0 -->This repository is the **"Use this template"** distribution artifact for a[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same