Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

v0.60.399.0 chore(release): restamp onto master v0.60.398.0

garrytana78472f5e8bf
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index 922ae1e01e..6314df1dce 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain",
- "version": "0.60.398.0",
+ "version": "0.60.399.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.json
index a6ed36f781..87b77f57d2 100644
--- a/.codex-plugin/plugin.json
+++ b/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "gbrain",
- "version": "0.60.398.0",
+ "version": "0.60.399.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.md
index f5eb435b2e..c562108810 100644
--- a/BOOTSTRAP_FOR_AGENTS.md
+++ b/BOOTSTRAP_FOR_AGENTS.md
@@ -1,4 +1,4 @@
-<!-- gbrain-runbook-stamp: 0.60.398.0 -->
+<!-- gbrain-runbook-stamp: 0.60.399.0 -->
<!-- This stamp must equal the VERSION file at every release; CI enforces it
(scripts/check-bootstrap-tag.sh). `gbrain bootstrap status` compares it to
the installed binary and warns on skew. -->
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5583406d97..1e66e446a3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,32 @@ credits are retained; no result has been reassigned to another provider. Origina
identifiers and attribution are available in the pre-removal Git revision
`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).
+## [0.60.399.0] - 2026-10-23
+
+**The dream summary, the `think --save` page and the drift report keep an edit made while they were being composed, and every overwrite is restorable; the timeline, mention and concept-provenance writers act only on the page revision they read (GBRA-161 PR 5).** These writers used to overwrite or delete against whatever the page held when they finished, so an edit made in between was lost and an overwritten page had no saved copy.
+
+### What changed
+
+| Situation | Before | Now |
+|---|---|---|
+| A page is edited while the dream summary, `think --save` or the drift report composes it | the writer overwrote the edit | the write is refused with `generation_fenced` and the edit stays; the summary and drift report note it on stderr and `think --save` exits non-zero |
+| One of those pages is overwritten | the earlier page was gone | it is saved to `page_versions` first, and `gbrain repair generations --kind dream_summary\|think_synthesis\|drift_report --mode restore` or `gbrain restore <slug>` brings it back |
+| Orphan pruning, `extract timeline --source db` or `extract --stale` retracts removed timeline entries | deleted against the current page | deletes only while the page row is locked at the revision its caller read |
+| `extract links --by-mention --rebuild` meets a page that moved since it read it | rebuilt and checkpointed it | skips it without a checkpoint, so a resume retries it |
+| A concept is republished | its provenance edges were replaced edge by edge | the new edges are written and the edges of atoms that left its group retire in one transaction, only while the concept is at the revision its publication produced |
+
+### What to watch for after you upgrade
+
+- No migration. Managed brains keep their maintenance page request for these pages, and their summary and drift report still read the revision at publish time.
+- A segmented summary, think or drift page is held `segmented_unsupported` instead of written.
+- File-source timeline extraction is unchanged (it belongs to sync).
+
+### Itemized changes
+
+- `src/core/generations/adapters/single-page.ts`: single-item generations for `dream_summary`, `think_synthesis` and `drift_report`, keyed `page:<slug>`, pinned to the revision read before composing.
+- Revision fences in `retractRemovedTimelineEntries`, the mention rebuild and `replaceConceptProvenanceLinks` (coordinated on managed brains).
+- Tests on PGLite and Postgres, red on the base: `g5-single-page-generations`, `g6-fence-only-writers` and `g7-concept-provenance-edges`; their Postgres arms run through `test/e2e/` `registerPostgresTests` wrappers, not `test/postgres-unit-arms.txt`. The summary-page rendering tests now write through a real PGLite brain with the same assertions.
+
## [0.60.398.0] - 2026-10-23
**Hot memory is injected once per session in Claude Code: assistant-attributed and external facts no longer come back on every prompt, and the first prompt no longer repeats the session-start block.** The per-prompt block wrote its own fact line, which dropped the `(assistant said)` prefix, so an assistant suggestion read as your own claim and never matched the dedupe key built from the shared line; an external fact's `<external-data>` wrapper broke the match the same way. Separately, Claude Code records `gbrain hook session-start` output as a SessionStart `hook_success` entry, which the user-prompt hook did not read, so every fact the session-start block showed came back on the first prompt. And `gbrain facts relink` attached the assistant's own report about a page, which the SessionEnd corpus sweep saves as an assistant-attributed fact, to that page as an entity fact on every run, core pages included.
diff --git a/VERSION b/VERSION
index 2b9ed35297..43ea2c2c93 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.60.398.0
+0.60.399.0
diff --git a/openclaw.plugin.json b/openclaw.plugin.json
index 8d4eae18fa..8ff2cbdd46 100644
--- a/openclaw.plugin.json
+++ b/openclaw.plugin.json
@@ -1,7 +1,7 @@
{
"id": "gbrain-context-engine",
"name": "gbrain",
- "version": "0.60.398.0",
+ "version": "0.60.399.0",
"description": "Personal knowledge brain with Postgres + pgvector hybrid search",
"family": "bundle-plugin",
"kind": "context-engine",
diff --git a/package.json b/package.json
index 751c3e8966..b768631702 100644
--- a/package.json
+++ b/package.json
@@ -245,7 +245,7 @@
"bun": ">=1.4.0"
},
"license": "MIT",
- "version": "0.60.398.0",
+ "version": "0.60.399.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.json
index 0b3ee476a6..8405ca4596 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.398.0",
+ "version": "0.60.399.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.json
index fe75e1f184..442b321090 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.398.0",
+ "version": "0.60.399.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.md
index cd29ae53db..eed51ca7b1 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.398.0 -->
+<!-- gbrain-plugin-tree-stamp: 0.60.399.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.json
index cb00981b76..f1e5dd94d9 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.398.0",
+ "version": "0.60.399.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.json
index 3aef3e7b90..706b2b3760 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.398.0",
+ "version": "0.60.399.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.md
index fc0bb2388f..d6e2aa09a2 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.398.0 -->
+<!-- gbrain-plugin-tree-stamp: 0.60.399.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.md
index 9983899ada..410593544e 100644
--- a/plugin/README.md
+++ b/plugin/README.md
@@ -1,4 +1,4 @@
-<!-- gbrain-plugin-tree-stamp: 0.60.398.0 -->
+<!-- gbrain-plugin-tree-stamp: 0.60.399.0 -->
# gbrain plugin skill tree (generated — do not hand-edit)
This tree is the curated skill set for the gbrain Codex and Claude Code
diff --git a/src/core/behavior-change-notice.ts b/src/core/behavior-change-notice.ts
index af2c09eece..5e85968c2f 100644
--- a/src/core/behavior-change-notice.ts
+++ b/src/core/behavior-change-notice.ts
@@ -1168,7 +1168,7 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText;
{ since: '0.60.398.0', text: 'In Claude Code, the first prompt of a session no longer repeats the hot-memory facts the session-start block already showed: the user-prompt hook now reads the `gbrain hook session-start` output Claude Code records as a SessionStart `hook_success` entry, from the gbrain context envelope on, so core memory printed before it does not hide page pointers. SessionStart output from other tools is still ignored (#7026, reported by @benswinney).' },
// #7270 (GBRA-60). `since` is restamped at the merge slot.
{ since: '0.60.398.0', text: '`gbrain facts relink` and `gbrain facts relink --conversation` no longer attach a fact the assistant or a named third party said (`attributed_to` assistant or other) to an entity page, core pages included: such a fact is left where it was saved, recall still finds it, and the run counts it as `not_user_attributed`. Before, the SessionEnd corpus sweep saved the assistant\'s own report about a page, and every relink pinned it onto that page. Doctor `unlinked_facts` no longer counts these facts. Rows linked before this release stay linked; `gbrain forget <fact-id>` removes one (#7270, reported by @andrew-agents-bot).' },
- { since: 'TBD', text: 'The dream summary, the `think --save` synthesis page and the drift report now keep an edit made while they were being composed (GBRA-161 PR 5): each writer binds its write to the page revision it read before composing, and a page that changed since is left as it is (`generation_fenced`; the summary and drift report note it on stderr and the next run writes them, `think --save` exits non-zero). Each overwrite keeps the earlier page in page history first, and `gbrain repair generations --kind dream_summary|think_synthesis|drift_report --mode restore` (or `gbrain restore <slug>`) puts it back. Timeline orphan retraction, `gbrain extract links --by-mention --rebuild` and concept provenance edges now delete only while the page is still at the revision they read; a page edited in between keeps its rows. A republished concept now drops the provenance edges of atoms that left its group (#4589).' },
+ { since: '0.60.399.0', text: 'The dream summary, the `think --save` synthesis page and the drift report now keep an edit made while they were being composed (GBRA-161 PR 5): each writer binds its write to the page revision it read before composing, and a page that changed since is left as it is (`generation_fenced`; the summary and drift report note it on stderr and the next run writes them, `think --save` exits non-zero). Each overwrite keeps the earlier page in page history first, and `gbrain repair generations --kind dream_summary|think_synthesis|drift_report --mode restore` (or `gbrain restore <slug>`) puts it back. Timeline orphan retraction, `gbrain extract links --by-mention --rebuild` and concept provenance edges now delete only while the page is still at the revision they read; a page edited in between keeps its rows. A republished concept now drops the provenance edges of atoms that left its group (#4589).' },
];
/** 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.md
index 5c5669cf29..1505d79625 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.398.0 -->
+<!-- gbrain-template-stamp: 0.60.399.0 -->
This repository is the **"Use this template"** distribution artifact for a
[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same