Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
v0.60.402.0 chore(release): restamp onto master v0.60.401.0
garrytan71ee1ad3a7ef
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex d50498ea1e..631f8149e4 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.401.0",+ "version": "0.60.402.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 be519cf95c..693c69d939 100644--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.401.0",+ "version": "0.60.402.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 c62ae5acf4..69306a3835 100644--- a/BOOTSTRAP_FOR_AGENTS.md+++ b/BOOTSTRAP_FOR_AGENTS.md@@ -1,4 +1,4 @@-<!-- gbrain-runbook-stamp: 0.60.401.0 -->+<!-- gbrain-runbook-stamp: 0.60.402.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 e73a8346da..029b467476 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.402.0] - 2026-10-23++**Facts and takes publish through the generation primitive: a page whose `## Facts` or takes section went missing keeps its rows and is held for the owner to decide, instead of having every fact closed (GBRA-161 PR 2).** A fact or take fence that was absent, unread or only partly read used to count as an empty result, so an edit that lost the section, or a segmented page read in pieces, retired every row on the page.++### What changed++| Situation | Before | Now |+|---|---|---|+| A fully read `## Facts` or takes fence has fewer rows (10→9, 10→1, 10→0) | published | still publishes, as a complete result at any count; an empty fence is the proof that retires every row |+| A page's fence is absent, unread, or segmented and not read whole | every fact or take on the page was closed | nothing retires; the generation is held `fence_absent` and listed by doctor `generation_held`, `gbrain sync status` (`fence_holds`) and `get_page` (`fence_held`), with a fix that asks the owner first |+| A page is deleted | its facts expired | they expire only with `originGone` proof |+| Consolidation closes a strict chain | no before-state was kept | before-state is recorded, so restore reopens it; a tie holds |+| A fence restore | n/a | transplants only the approved fence block into the current page and refuses overlapping edits; the body, timeline, tags and the other fence survive |+| A purge of a generation | left recorded fence text on the ledger | also scrubs the fence blocks the generation recorded |++### What to watch for after you upgrade++- No migration, and nothing runs on upgrade.+- A page held `fence_absent` keeps its rows until the owner chooses: restore the section to keep them, or write the empty fence block the fix prints to retire them (`get_page` with `include_content: true` and `put_page` with `expected_revision` for a page with no file). `edit_page` refuses to write fence markers.+- `deleteFactsForPage`, `expireFact` and `insertFacts({ deleteForPageFirst })` are deprecated and guarded.++### Itemized changes++- `src/core/generations/adapters/fact-rows.ts` and `take-rows.ts`: fence and consolidation adapters; canonical kinds have no shrink floor.+- `publishExtractedFacts` in `src/core/generations/adapters/extracted-facts.ts` for the conversation lane and the backstop: only a `whole_body` result can retire, an empty one is held `no_proof`, and a fact attributed to the assistant or a third party is stored with no entity and listed in `detached`.+- The managed-import statement budgets rise by 5 per engine (81 on PGLite, 79 on Postgres), with the reason next to each constant.+- Tests on PGLite and Postgres, red on the base where they cover a bug: the absent fence, a deleted page expiring only with `originGone`, #6023 tie and strict-chain restore, the canonical 10→9/1/0 edits, the `fence_absent` surfaces, fence restore preserving unrelated content and the non-user fact rule. The three new g2 Postgres arms run through `test/e2e/` `registerPostgresTests` wrappers, not `test/postgres-unit-arms.txt`.+## [0.60.401.0] - 2026-10-23**Sync no longer turns a folder of hub `index.md` files with their own `slug:` line into one hold per file (#7341), an agreed reconcile clears a stalled write's hold (#7364), and a new switch, off by default, lets sync apply a held deletion it can prove.** Since 0.60.337.0, sync imports a nested `index.md` or `README.md` that has `type:` or `title:`. If that file's frontmatter `slug:` named another page (its folder, or just its leaf name), the import could only hold it as `frontmatter_slug_conflict`, so a folder of generated hubs produced hundreds of holds. Those files are scaffolding again, and the next sync releases their holds.diff --git a/VERSION b/VERSIONindex ce4b654d2c..38625ecce3 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-0.60.401.0+0.60.402.0diff --git a/openclaw.plugin.json b/openclaw.plugin.jsonindex 1a25438d2d..65e3ef6a82 100644--- a/openclaw.plugin.json+++ b/openclaw.plugin.json@@ -1,7 +1,7 @@{"id": "gbrain-context-engine","name": "gbrain",- "version": "0.60.401.0",+ "version": "0.60.402.0","description": "Personal knowledge brain with Postgres + pgvector hybrid search","family": "bundle-plugin","kind": "context-engine",diff --git a/package.json b/package.jsonindex 62bd54a8fe..7112062746 100644--- a/package.json+++ b/package.json@@ -245,7 +245,7 @@"bun": ">=1.4.0"},"license": "MIT",- "version": "0.60.401.0",+ "version": "0.60.402.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 defd181b49..4592ec692f 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.401.0",+ "version": "0.60.402.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 bc21b3a023..e327aac108 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.401.0",+ "version": "0.60.402.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 56fab35d91..bcf5dccdce 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.401.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.402.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 631b53381d..43e03458fb 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.401.0",+ "version": "0.60.402.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 e06d6e047f..209ca1fd7c 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.401.0",+ "version": "0.60.402.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 693036d0d3..cb92e67720 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.401.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.402.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 74fee61ada..298465af45 100644--- a/plugin/README.md+++ b/plugin/README.md@@ -1,4 +1,4 @@-<!-- gbrain-plugin-tree-stamp: 0.60.401.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.402.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 1a1fe643da..2a5325aca3 100644--- a/src/core/behavior-change-notice.ts+++ b/src/core/behavior-change-notice.ts@@ -1159,8 +1159,8 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText;{ since: '0.60.396.0', text: 'A facts-fence row with no `valid_from` cell now takes the page\'s stated date (frontmatter `event_date`, `date` or `published`, or a dated filename) on every write path: `put_page`, sync and import used to store the write time, and `extract_facts` used the page\'s creation or import time when the page stated no date (#7247). A page that states no date leaves such rows at the time they were recorded. Rows already stored keep their dates.' },// GBRA-133 (soak: an unread origin was reported as never committed). `since` is restamped at the merge slot.{ since: '0.60.397.0', text: 'A `file_drift` hold (side `deleted`, state `file_gone`) for a missing file whose Git history read did not finish now carries `meta.reason` `origin_unknown` and says Git could not show whether a commit held the file, instead of `never_committed` and "Git never committed it". The page is still kept, and the `--held` preview still reads the whole history and names the provenance.' },- { since: 'TBD', text: 'A page write whose body no longer has its `## Facts` or takes section no longer expires or deletes the rows that section held (GBRA-161 PR 2): the page projection, `extract_facts` and `gbrain extract takes` keep them live and record a held generation (`generation_held`, reason `fence_absent`). Doctor `generation_held`, `gbrain sync status` (new `fence_holds`) and `get_page` (new `fence_held`) list the page with an ask-the-user fix: restore the section to keep the rows, or write the exact empty fence it prints to retire them. An empty fence (begin and end markers, no rows) still retires every row, and an edit that removes some rows retires exactly those, with no shrink floor; each retired or replaced row\'s before-state is recorded and `gbrain repair generations --kind fact_fence|take_fence --mode restore` puts the earlier fence block back into the page as it is now.' },- { since: 'TBD', text: 'The facts of a soft-deleted page now expire only when the page is still deleted under its page key and its rows came from a fence (a recorded generation, or a fence in the deleted page\'s stored body), one transaction per page (GBRA-161 PR 2); rows no fence derived are kept and held `no_proof`. Dream consolidation now records each cluster\'s `valid_until`, `consolidated_at` and `consolidated_into` before it closes it, records a same-instant tie (#6023) as a held generation (`tie`), and `gbrain repair generations --kind consolidation --mode restore` reopens a chain, which later runs leave open.' },+ { since: '0.60.402.0', text: 'A page write whose body no longer has its `## Facts` or takes section no longer expires or deletes the rows that section held (GBRA-161 PR 2): the page projection, `extract_facts` and `gbrain extract takes` keep them live and record a held generation (`generation_held`, reason `fence_absent`). Doctor `generation_held`, `gbrain sync status` (new `fence_holds`) and `get_page` (new `fence_held`) list the page with an ask-the-user fix: restore the section to keep the rows, or write the exact empty fence it prints to retire them. An empty fence (begin and end markers, no rows) still retires every row, and an edit that removes some rows retires exactly those, with no shrink floor; each retired or replaced row\'s before-state is recorded and `gbrain repair generations --kind fact_fence|take_fence --mode restore` puts the earlier fence block back into the page as it is now.' },+ { since: '0.60.402.0', text: 'The facts of a soft-deleted page now expire only when the page is still deleted under its page key and its rows came from a fence (a recorded generation, or a fence in the deleted page\'s stored body), one transaction per page (GBRA-161 PR 2); rows no fence derived are kept and held `no_proof`. Dream consolidation now records each cluster\'s `valid_until`, `consolidated_at` and `consolidated_into` before it closes it, records a same-instant tie (#6023) as a held generation (`tie`), and `gbrain repair generations --kind consolidation --mode restore` reopens a chain, which later runs leave open.' },// GBRA-60 small-items wave (#7026 part 2, #7234). `since` is stamped at the merge slot.{ since: '0.60.398.0', text: 'New opt-in `context.hot_memory.session_only`, off by default (#7026): with `gbrain config set context.hot_memory.session_only true`, the hot facts the turn hook and the session-start pack inject come from the current session only, so a session with no facts of its own gets none instead of the source\'s newest facts from the last 24 hours, which can belong to other sessions. MCP `_meta.brain_hot_memory` is unchanged.' },{ since: '0.60.398.0', text: 'When the chronicle phase refuses a judge answer as `malformed_proposal`, it now prints one warning line naming the check that failed (a fixed code such as `when_unparseable`, the field, the JSON type found there and counts, never a value), and the direct extractor result carries the same fields under `malformed` (#7234). The refusal, its retry with backoff and the ledger row are unchanged.' },diff --git a/templates/bootstrap/template-repo/README.md b/templates/bootstrap/template-repo/README.mdindex 5f141b05e8..c7390d4f84 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.401.0 -->+<!-- gbrain-template-stamp: 0.60.402.0 -->This repository is the **"Use this template"** distribution artifact for a[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same