Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Merge origin/master (v0.60.71.0) into capy/ubicloud-runner-safety; stamp v0.60.72.0
garrytan7f4eb25523a1
diff --cc .claude-plugin/plugin.jsonindex 954b022210,734b0403d1..132c947a93--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@@ -1,6 -1,6 +1,6 @@@{"name": "gbrain",- "version": "0.60.70.0",- "version": "0.60.71.0",++ "version": "0.60.72.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 --cc .codex-plugin/plugin.jsonindex cdd97f999f,3d347bb958..57aacff013--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@@ -1,6 -1,6 +1,6 @@@{"name": "gbrain",- "version": "0.60.70.0",- "version": "0.60.71.0",++ "version": "0.60.72.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 --cc BOOTSTRAP_FOR_AGENTS.mdindex 40f779ecf7,839a7821d9..5537ec1ebf--- a/BOOTSTRAP_FOR_AGENTS.md+++ b/BOOTSTRAP_FOR_AGENTS.md@@@ -1,4 -1,4 +1,4 @@@- <!-- gbrain-runbook-stamp: 0.60.70.0 -->-<!-- gbrain-runbook-stamp: 0.60.71.0 -->++<!-- gbrain-runbook-stamp: 0.60.72.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 --cc CHANGELOG.mdindex 0545346eac,c08dca02d2..55c79e7535--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -10,21 -10,34 +10,49 @@@ credits are retained; no result has beeidentifiers and attribution are available in the pre-removal Git revision`6040075c6cb95be5881cc2e1b76ef7d71f4e5d29` (retained on 2026-09-23).- ## [0.60.70.0] - 2026-10-05++## [0.60.72.0] - 2026-10-05++**`ci:ubicloud` VMs carry their owner's name, an interrupted run destroys every VM it asked for, and no run destroys another owner's VMs.**++VMs are named `ubirun-<owner>-<epoch>-<suffix>`, where the owner is `UBI_OWNER` or a per-machine id. Before, nothing showed which thread a VM belonged to, and every `up` destroyed any `ubirun-*` VM older than 12 hours, whoever started it. That sweep is now off unless `UBI_GC_HOURS` is set, and even then it only destroys the caller's own VMs. `ubi-runner.sh gc HOURS` runs the same sweep by hand.++A run stopped with SIGTERM while VMs were still provisioning used to tear down before their create requests finished. Those VMs appeared afterwards and leaked (three `standard-16` VMs sat idle for 84 minutes). SIGHUP, which a dropped terminal or a cancelled background operation sends, was not handled at all, so the run died with every VM still up (14 leaked VMs on 2026-10-04). Now SIGINT, SIGTERM, SIGHUP and SIGQUIT all take the same teardown path, and a second signal can't cut it short. Each name is recorded before its create is sent. An interrupted `up` finishes its create request and destroys its own VM. Teardown then polls every recorded name until it is confirmed gone. Mock-API tests reproduce both old leaks (SIGTERM left two of three VMs behind, SIGHUP all three) and pass with the fix.++`ubi-runner.sh list --mine` lists your VMs, and `ubi-runner.sh usage` shows VMs and vCPUs per owner across the project. A create refused for vCPU quota now says how many vCPUs it needed, how many the project uses and the maximum, followed by that per-owner table.+- ## To take advantage of v0.60.70.0++## To take advantage of v0.60.72.0++- Run `UBI_OWNER=<your-thread-code> bun run ci:ubicloud`. You no longer need `UBI_GC_HOURS=0`.+- In a multi-lane wave, lanes run `ci:ubicloud:diff` or targeted suites, and only the integrator runs the full gate. One full gate takes 64 of the project's 256 vCPUs.++ ## [0.60.71.0] - 2026-10-05++ **Turning off contextual retrieval no longer serves vectors built from an old title.**++ If a page switches from title or synopsis context to plain text, its previous+ text vectors are cleared in the same database operation as the mode change.+ This prevents an old title-aware result from being treated as a plain-text+ match. Pages marked to skip embedding keep their retained vectors; switching+ mode does not start a paid re-embed.++ ### How to use it++ Run `gbrain upgrade` to get the fix. If you deliberately switch a source to+ plain-text embeddings, run `gbrain embed --stale` after reviewing its expected+ cost to replace any cleared vectors.++ | Page state | After the change |+ | --- | --- |+ | Title or synopsis mode switches to `none` | Previous active text vectors are cleared immediately, before search can use them as plain text. |+ | Legacy `none` page with an unverified vector | A later projection rebuild clears the vector; re-embedding is opt-in. |+ | Pre-contextual page with no stored mode | Its legacy raw vectors remain grandfathered when the text and model still match. |++ ### Itemized changes++ - The shared page-state writer clears active vectors and their completion stamps atomically on a contextual-to-`none` transition, in both PGLite and PostgreSQL.+ - Projection rebuilds no longer accept an unstamped vector on an explicit `none` page as proof that it came from raw text; they still preserve verified current inputs and grandfather pre-contextual NULL-mode pages.+ - Markdown re-import cannot reinstate an unstamped title vector after the mode switch or race a concurrent contextual update. Repair and contextual reindex record raw provenance when they move a pre-contextual NULL-mode page to `none`, so a later rebuild does not discard retained raw vectors.+## [0.60.69.0] - 2026-10-05**Korean entity names stop linking from inside longer words: mention precision on Hangul goes from 7% to 86%, and 65 of 74 real name mentions still link.**diff --cc VERSIONindex 34c2ddde40,5bd34053bf..8c2cf35bfa--- a/VERSION+++ b/VERSION@@@ -1,1 -1,1 +1,1 @@@- 0.60.70.0-0.60.71.0++0.60.72.0diff --cc docs/TESTING.mdindex 2290b7edad,e27e604136..420525a58b--- a/docs/TESTING.md+++ b/docs/TESTING.md@@@ -450,15 -450,6 +450,18 @@@ too; build the admin app on the host whfrom one heaviest-first work queue; every VM is destroyed on exit. VM setup, scheduling, weights, quotaand flags are in [scripts/ubicloud/README.md](../scripts/ubicloud/README.md).+VMs are named `ubirun-<owner>-<epoch>-<suffix>`; set `UBI_OWNER` to your thread+code. Teardown destroys every VM the run asked for, including creates still in+flight, and stale-VM sweeps run only with `UBI_GC_HOURS` set and only on your+own VMs. `scripts/ubicloud/ubi-runner.sh usage` shows vCPUs by owner.++A sleeping machine kills the run with no signal, so teardown never runs: on Capy, run++`ci:ubicloud` as a watched background operation. After any interrupted run, check++`ubi-runner.sh list --mine` and reap leftovers with `down NAME` (or `gc HOURS`, own VMs only).++The project quota is 256 vCPUs, shared with PR CI, and one full gate takes 64.+In a multi-lane wave, lanes run `ci:ubicloud:diff` or targeted suites (`bun+test <files>`, `--lanes`); only the integrator runs the full gate.+### E2E backend matrix`scripts/e2e-backend-matrix.txt` lists the E2E files that must pass on directdiff --cc openclaw.plugin.jsonindex 3c618b5d81,a474456ae1..8d17ea7d2f--- a/openclaw.plugin.json+++ b/openclaw.plugin.json@@@ -1,7 -1,7 +1,7 @@@{"id": "gbrain-context-engine","name": "gbrain",- "version": "0.60.70.0",- "version": "0.60.71.0",++ "version": "0.60.72.0","description": "Personal knowledge brain with Postgres + pgvector hybrid search","family": "bundle-plugin","kind": "context-engine",diff --cc package.jsonindex 452d079953,0428711923..bdd1924042--- a/package.json+++ b/package.json@@@ -219,7 -219,7 +219,7 @@@"bun": ">=1.4.0"},"license": "MIT",- "version": "0.60.70.0",- "version": "0.60.71.0",++ "version": "0.60.72.0","overrides": {"@ai-sdk/provider-utils": "4.0.56","@hono/node-server": "^2.0.5",diff --cc plugin-variants/gbrain-coding/.claude-plugin/plugin.jsonindex f195704633,6227e7b43d..db1a054886--- a/plugin-variants/gbrain-coding/.claude-plugin/plugin.json+++ b/plugin-variants/gbrain-coding/.claude-plugin/plugin.json@@@ -1,6 -1,6 +1,6 @@@{"name": "gbrain-coding",- "version": "0.60.70.0",- "version": "0.60.71.0",++ "version": "0.60.72.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 --cc plugin-variants/gbrain-coding/.codex-plugin/plugin.jsonindex 82034c0970,5caa367168..87175e19c4--- a/plugin-variants/gbrain-coding/.codex-plugin/plugin.json+++ b/plugin-variants/gbrain-coding/.codex-plugin/plugin.json@@@ -1,6 -1,6 +1,6 @@@{"name": "gbrain-coding",- "version": "0.60.70.0",- "version": "0.60.71.0",++ "version": "0.60.72.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 --cc plugin-variants/gbrain-coding/README.mdindex af8ad25b1f,4ef683b5de..a917cc3707--- a/plugin-variants/gbrain-coding/README.md+++ b/plugin-variants/gbrain-coding/README.md@@@ -1,4 -1,4 +1,4 @@@- <!-- gbrain-plugin-tree-stamp: 0.60.70.0 -->-<!-- gbrain-plugin-tree-stamp: 0.60.71.0 -->++<!-- gbrain-plugin-tree-stamp: 0.60.72.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 --cc plugin-variants/gbrain-daily/.claude-plugin/plugin.jsonindex 677d01ae6f,0112a465dd..4eff2623fb--- a/plugin-variants/gbrain-daily/.claude-plugin/plugin.json+++ b/plugin-variants/gbrain-daily/.claude-plugin/plugin.json@@@ -1,6 -1,6 +1,6 @@@{"name": "gbrain-daily",- "version": "0.60.70.0",- "version": "0.60.71.0",++ "version": "0.60.72.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 --cc plugin-variants/gbrain-daily/.codex-plugin/plugin.jsonindex 50e27aad1d,ef34934627..659ba3724c--- a/plugin-variants/gbrain-daily/.codex-plugin/plugin.json+++ b/plugin-variants/gbrain-daily/.codex-plugin/plugin.json@@@ -1,6 -1,6 +1,6 @@@{"name": "gbrain-daily",- "version": "0.60.70.0",- "version": "0.60.71.0",++ "version": "0.60.72.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 --cc plugin-variants/gbrain-daily/README.mdindex 85f3ca6890,6649e14bc0..b317d99bc1--- a/plugin-variants/gbrain-daily/README.md+++ b/plugin-variants/gbrain-daily/README.md@@@ -1,4 -1,4 +1,4 @@@- <!-- gbrain-plugin-tree-stamp: 0.60.70.0 -->-<!-- gbrain-plugin-tree-stamp: 0.60.71.0 -->++<!-- gbrain-plugin-tree-stamp: 0.60.72.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 --cc plugin/README.mdindex ef4dcc135c,4697c2ee2f..650484eec9--- a/plugin/README.md+++ b/plugin/README.md@@@ -1,4 -1,4 +1,4 @@@- <!-- gbrain-plugin-tree-stamp: 0.60.70.0 -->-<!-- gbrain-plugin-tree-stamp: 0.60.71.0 -->++<!-- gbrain-plugin-tree-stamp: 0.60.72.0 --># gbrain plugin skill tree (generated — do not hand-edit)This tree is the curated skill set for the gbrain Codex and Claude Codediff --cc scripts/ubicloud/README.mdindex fd4e858670,02bedea055..1c992d1e14--- a/scripts/ubicloud/README.md+++ b/scripts/ubicloud/README.md@@@ -4,37 -4,8 +4,43 @@@instead of one Docker host. It packs the working tree once (tracked files,untracked files that are not ignored, and `.git`) and streams it to every VM, souncommitted edits are tested. `scripts/ubicloud/ubi-runner.sh` creates and-destroys the VMs; every VM is destroyed on exit, including Ctrl-C, and any-`ubirun-*` VM older than 12 hours is garbage-collected by the next run.+destroys the VMs.++## Ownership and teardown++Every VM is named `ubirun-<owner>-<epoch>-<suffix>`. The owner is `UBI_OWNER`+(lowercased, letters and digits only, at most 12 characters, starting with a+letter) or a random per-machine id kept in the runner's state directory. Set+`UBI_OWNER` to your thread code (`UBI_OWNER=gbra41 bun run ci:ubicloud`) so+everyone can see whose VMs hold the quota. Ubicloud names allow 63 characters+of `[a-z0-9-]`, so a full name stays under 40.++Each name is recorded before its create request is sent: the runner writes+the VM's state directory first, and `ci-ubicloud.ts` appends the name to+`.context/ci-ubicloud/<run>/vms.txt`. On every exit, including Ctrl-C,+SIGTERM, SIGQUIT and SIGHUP (a dropped terminal or a cancelled background+operation), an `up` still talking to the API finishes the request and destroys+its own VM; further signals are ignored until teardown ends. Then every recorded name gets `down`, which destroys the VM and polls+until it is confirmed gone. A create whose answer never arrived is waited out+for `UBI_CREATE_GRACE` seconds (default 180) before the VM counts as never+created. `down` gives up after `UBI_DOWN_TIMEOUT` seconds (default 900) and+prints the command to rerun.++Nothing sweeps stale VMs unless you ask. With `UBI_GC_HOURS` set to a positive+number, each `up` first destroys the caller's own VMs older than that many+hours. An operator runs the same sweep with `ubi-runner.sh gc HOURS`. Neither+ever destroys another owner's VM, an untagged legacy `ubirun-<epoch>-*` VM, or a+VM the runner did not name. Use `down NAME` for those after checking who owns+them.+++A machine that goes to sleep kills the run outright, with no signal, so++teardown can't run: on Capy, run `ci:ubicloud` as a watched background++operation so the machine stays awake. After any interrupted run, check++`list --mine` and reap leftovers with `down NAME` (or `gc HOURS`, which only++destroys your own VMs older than HOURS).+++`ubi-runner.sh list --mine` lists your VMs. `ubi-runner.sh usage` prints VMs+and vCPUs per owner across the project, which shows who holds the shared quota.Each VM runs `scripts/ubicloud/setup-ci-vm.sh`: the pinned Bun from`docker-compose.ci.yml`, the runner container's test prerequisites plus Node,diff --cc templates/bootstrap/template-repo/README.mdindex fc55d828ad,3edb752da1..1c9867208d--- a/templates/bootstrap/template-repo/README.md+++ b/templates/bootstrap/template-repo/README.md@@@ -1,6 -1,6 +1,6 @@@# gbrain agent workspace — template- <!-- gbrain-template-stamp: 0.60.70.0 -->-<!-- gbrain-template-stamp: 0.60.71.0 -->++<!-- gbrain-template-stamp: 0.60.72.0 -->This repository is the **"Use this template"** distribution artifact for a[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same