Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
v0.60.389.0 chore(release): restamp onto master v0.60.388.0
garrytan70e3e0694ee9
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex 5d8f45c960..a30526d497 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.388.0",+ "version": "0.60.389.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 a363c9a0c2..3cf12816b1 100644--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.388.0",+ "version": "0.60.389.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 d9f4ab273f..e72da0c8af 100644--- a/BOOTSTRAP_FOR_AGENTS.md+++ b/BOOTSTRAP_FOR_AGENTS.md@@ -1,4 +1,4 @@-<!-- gbrain-runbook-stamp: 0.60.388.0 -->+<!-- gbrain-runbook-stamp: 0.60.389.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 1b9a70561e..b443fac7ec 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.389.0] - 2026-10-23++**Unmanaged atom extraction now replaces an origin's atoms only on a complete, non-empty result, versions what it drops first, and can undo it (GBRA-161 PR 1a).** A derived writer used to delete or keep atoms one statement at a time, so an empty model answer, a truncated read or a failed write could drop or orphan an origin's atoms with no way back. Atoms are the first writer on one generation-publish primitive with a ledger and a restore path. Managed atoms, facts and takes, chronicle and synthesis move onto it in later releases.++### What changed++| Situation | Before | Now |+|---|---|---|+| Unmanaged extract_atoms writes an origin's atoms | atoms, provenance edges and the completion stamp written separately; a failed write could leave a provisional atom | one generation: they land together or not at all, and the atoms a complete re-extraction no longer produces retire in the same transaction (versioned, stamped, restorable) |+| A re-extraction returns nothing, keeps under half the atoms, changes more than 64, or a mass retirement runs | retired whatever the result dropped | held: nothing changes, doctor \`generation_held\` warns, and the held result records why (\`generations.shrink_floor\`, \`generations.max_items\`, the retirement valve); an empty result retires only with proof the input is gone |+| A producer whose input or generation moved while it worked | wrote over the newer state | fenced (\`generation_fenced\`), nothing written |+| An atom from before this release | retired when a re-extraction left it out | retired only when the extraction reproduces it or a retained page version the extractor wrote shows it unedited; a hand-written or hand-edited atom stays live |+| Undoing a retirement | not possible after the purge | \`gbrain repair generations --kind atom --since 30d\` previews restoring what a generation replaced; \`--mode release-held --held\` previews publishing a held result once |++### What to watch for after you upgrade++- Migration v265 adds the ledger tables (\`derived_generations\`, \`derived_generation_items\`, \`derived_generation_valve\`, \`derived_generation_attempts\`). It writes no existing data.+- \`gbrain repair generations\` is explicit-only and preview-bound: run it without \`--apply\`, show the preview, then \`--apply --expect <hash> --yes\`. A restore refuses a key whose items were edited since; a refused key exits non-zero and is listed.+- Doctor adds \`generation_retirements\` and \`generation_held\`. Five \`generations.*\` settings are bounded at set time, and the derived purge hold now follows \`generations.restore_days\` (default 30).++### Itemized changes++- \`src/core/generations/\`: \`plan.ts\` (the pure replace-or-hold decision and typed empty-result proofs), \`publish.ts\` (page then key locks, replay, fence, one attributed activation that versions, stamps and retires), \`repair.ts\` (\`gbrain repair generations\`), \`proofs.ts\`, \`config.ts\` and the atom adapter.+- Migration v265 (\`derived-generations\`); page and fact purges scrub ledger preimages in the same transaction.+- \`bun run check:derived-census [--prune]\` (in verify) fails on a new retire or delete of derived rows outside the primitive.+- Tests on PGLite and Postgres: \`test/pathological/g1-generations\`, \`g1-generation-probes\`, \`g1-atom-generations\` and \`g1-generation-crash\` (SIGKILL at each publish fault point).+## [0.60.388.0] - 2026-10-23**Four flaky CI tests now fail only for the defects they guard, with the same bounds as before.** Three yield-bound tests could read work earlier test files left in a shard process, one off-CPU probe could be charged a garbage-collection pause, and one doctor golden split its journal rows at midnight UTC. Nothing in gbrain itself changed.diff --git a/VERSION b/VERSIONindex 66f639f758..d2bec922f0 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-0.60.388.0+0.60.389.0diff --git a/openclaw.plugin.json b/openclaw.plugin.jsonindex 8159cd2b53..4c9317baf3 100644--- a/openclaw.plugin.json+++ b/openclaw.plugin.json@@ -1,7 +1,7 @@{"id": "gbrain-context-engine","name": "gbrain",- "version": "0.60.388.0",+ "version": "0.60.389.0","description": "Personal knowledge brain with Postgres + pgvector hybrid search","family": "bundle-plugin","kind": "context-engine",diff --git a/package.json b/package.jsonindex 89d2d1db67..e8067fc6ba 100644--- a/package.json+++ b/package.json@@ -245,7 +245,7 @@"bun": ">=1.4.0"},"license": "MIT",- "version": "0.60.388.0",+ "version": "0.60.389.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 0e81b4cf7f..3b06b374df 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.388.0",+ "version": "0.60.389.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 3fd1f378d3..0c1d446817 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.388.0",+ "version": "0.60.389.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 b8df6071da..1ef7efdf9c 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.388.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.389.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 6a700a2700..ef6da4089c 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.388.0",+ "version": "0.60.389.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 0882166dea..0ef7ff15d4 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.388.0",+ "version": "0.60.389.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 6f557641ac..330f37e8dd 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.388.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.389.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 88ea9b8845..f0624dafd0 100644--- a/plugin/README.md+++ b/plugin/README.md@@ -1,4 +1,4 @@-<!-- gbrain-plugin-tree-stamp: 0.60.388.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.389.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 49e25eaedc..7166ff16b1 100644--- a/src/core/behavior-change-notice.ts+++ b/src/core/behavior-change-notice.ts@@ -1145,7 +1145,7 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText;{ since: '0.60.383.0', text: 'New opt-in `gbrain git guard --install`: a local prepare-commit-msg hook that refuses commits not made through gbrain in that checkout, `--no-verify` included (bypass once with `GBRAIN_COMMIT_GUARD=off`). The committed `scripts/brain-commit-push.sh` fallback (no gbrain on the machine) now releases the commit lock before it pushes and pushes under `brain-publish.lock`; rerun `gbrain sources harden` to refresh it.' },{ since: '0.60.383.0', text: 'Four new doctor checks on source checkouts: `checkout_lagging` (behind the last fetched upstream for over an hour), `dirty_age` (pending write-through files or staged files waiting over 30 minutes), `commits_outside_source_root` (unpushed commits that change files outside the brain\'s folder) and `quarantined_changes` (local versions the opt-in quarantine parked). Each names its fix. Quarantine is off unless you set git config `gbrain.quarantine true` in a checkout: a content conflict then publishes the remote\'s version of the file and keeps this machine\'s version under `refs/gbrain/quarantine/`.' },{ since: '0.60.386.0', text: 'Pages a derived writer retires (an atom a completed re-extraction no longer produces, a chronicle event a re-judged meeting no longer yields, an atom `gbrain repair stale-atoms` retired) now stay restorable for 30 days instead of 72 hours: the purge, automatic and `gbrain pages purge-deleted` alike, skips a page stamped `retired_by` extract-atoms, managed-reextract, stale-atoms or life-chronicle until 30 days after its deletion, and `gbrain restore <slug>` brings it back with its body. The unmanaged extract_atoms and chronicle retirements now save a page version first and stamp the page. A remote page write that adds or changes `retired_by`, `retired_at` or `retired_generation` is refused with `reserved_frontmatter_key`; carrying the stored value unchanged, or dropping the key, still writes.' },- { since: 'TBD', text: 'Unmanaged atom extraction now publishes each page\'s or transcript\'s atoms as one generation: the atoms, their provenance edges and the completion stamp land together or not at all (a failed write leaves no provisional atom), and the atoms a complete re-extraction no longer produces are retired in the same transaction. A re-extraction that would keep fewer than half of an origin\'s atoms (`generations.shrink_floor`), retire them all without proof the input is empty, change more than 64 atoms (`generations.max_items`) or trip the retirement valve is held instead: nothing changes, doctor `generation_held` warns, and `gbrain repair generations --kind atom --mode release-held --held` previews it. An atom from before this release is retired only when the extraction reproduces it or a retained page version the extractor wrote shows it unedited; a hand-written or hand-edited atom naming the origin stays live. `gbrain repair generations --kind atom --since 30d` previews restoring what a generation replaced. The derived purge hold now follows `generations.restore_days` (default 30).' },+ { since: '0.60.389.0', text: 'Unmanaged atom extraction now publishes each page\'s or transcript\'s atoms as one generation: the atoms, their provenance edges and the completion stamp land together or not at all (a failed write leaves no provisional atom), and the atoms a complete re-extraction no longer produces are retired in the same transaction. A re-extraction that would keep fewer than half of an origin\'s atoms (`generations.shrink_floor`), retire them all without proof the input is empty, change more than 64 atoms (`generations.max_items`) or trip the retirement valve is held instead: nothing changes, doctor `generation_held` warns, and `gbrain repair generations --kind atom --mode release-held --held` previews it. An atom from before this release is retired only when the extraction reproduces it or a retained page version the extractor wrote shows it unedited; a hand-written or hand-edited atom naming the origin stays live. `gbrain repair generations --kind atom --since 30d` previews restoring what a generation replaced. The derived purge hold now follows `generations.restore_days` (default 30).' },];/** 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 ff69cb13cc..882a4a65fc 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.388.0 -->+<!-- gbrain-template-stamp: 0.60.389.0 -->This repository is the **"Use this template"** distribution artifact for a[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same