Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
v0.60.53.0 Foundations 2: crash robot, automatic PGLite facts drain, scoped dashboard keys, write attribution, scale fixes
garrytanda96f01ed9ff
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.jsonindex bae12eb663..4979f176f1 100644--- a/.claude-plugin/plugin.json+++ b/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.48.0",+ "version": "0.60.53.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 126a098877..b27aa26c18 100644--- a/.codex-plugin/plugin.json+++ b/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "gbrain",- "version": "0.60.48.0",+ "version": "0.60.53.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 deb02fd956..b3635fc8af 100644--- a/BOOTSTRAP_FOR_AGENTS.md+++ b/BOOTSTRAP_FOR_AGENTS.md@@ -1,4 +1,4 @@-<!-- gbrain-runbook-stamp: 0.60.48.0 -->+<!-- gbrain-runbook-stamp: 0.60.53.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 32213b24fd..155d57793d 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,116 @@ 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.53.0] - 2026-10-04++**gbrain now crash-tests its own write path on every pull request, notes on a PGLite brain turn into facts without anyone running a command, and new dashboard API keys stop handing out admin access by default.**++Three things got measurably better in this release. First, the gate that guards your data now kills gbrain in the middle of real writes, over and over, and checks that nothing was lost, duplicated or leaked into another source afterwards. A full 10-minute run kills it 69 to 75 times on PGLite and 18 times on Postgres behind a connection pooler, at 11 different points in the write path, and finds zero problems. Second, on a PGLite brain served by `gbrain serve`, ten new meeting notes became 49 facts within about 20 minutes with no further command; before, they waited forever. Third, an API key created in the admin dashboard used to get full admin access unless you knew better. Now 0 of 20 do.++### The numbers that matter++| What we measured | Before | Now |+| --- | --- | --- |+| Crash runs in one full persistence gate run (600 s budget) | 0 | 69 to 75 on PGLite, 18 on Postgres through PgBouncer, 11 crash points, 0 violations |+| Past persistence fixes the gate catches when the fix is reverted (12 tried) | 0 | 1 on each engine |+| Facts from 10 meeting notes on a served PGLite brain, no command run | 0 after 22 min (10 jobs waiting) | 49 facts from all 10 pages at about 20 min, $0.084 |+| Dashboard-minted API keys with full admin access | 20 of 20 | 0 of 20 |+| Legacy tokens authorized from the old JSON grant after upgrade | 50 of 50 | 0 of 50 (all 50 still work) |+| Unattributed writer references in the code | 90 in 40 files | 7 in 3 files |+| Scale tier enforced gates at 10,000 pages | n/a | 25 of 25 PGLite, 24 of 24 Postgres |+| Scale tier at 20,000 pages | nightly timed out at 50 min | green on both engines, about 8 min per job |+| `gbrain extract timeline --source db` at 20,000 PGLite pages | 12.6 min | about 2 min |++Search latency did not regress with the facts drain running beside it (12 pages, real model): `get_page` p95 3.2 to 3.3 ms, `list_pages` 9.1 to 8.8 ms, search 439 to 389 ms.++### How to use it++```bash+gbrain doctor --only legacy_token_null_scope,facts_drain --json # full-access keys and the drain's state+gbrain auth rescope --id <token-id> --scopes read,write # narrow an old full-access key+gbrain auth rescope --client <id> --sources none # an OAuth client that reads no source+gbrain auth rescope --client <id> --takes-holders world,brain # per-client takes holders+gbrain repair take-supersession # preview; add --apply after review+gbrain config set facts.extraction_enabled false # turn automatic fact extraction off+```++### Things to watch++- The facts drain is on by default on PGLite and spends real money: one chat call per page, capped at $1 per run and $5 per rolling day (`facts.drain_budget_usd`, `facts.drain_daily_budget_usd`). A brain without a chat key queues the pages and `gbrain doctor` says so.+- Large-brain ceilings (MCP search latency at 10k and 20k pages, calibrated budgets) are still report-only. The scale tier measures them every night; enforcement stays off until five nightly runs are stable.+- MCP search on Postgres slows from 78.6 ms at 10k pages to 615 ms at 20k (1,169 ms source-scoped). This is filed, not fixed.+- Older binaries keep reading tokens through the `permissions` mirror, which is written until 2026-11-04.++## To take advantage of v0.60.53.0++`gbrain upgrade` should do this automatically. If it didn't, or if `gbrain doctor` warns about a partial migration:++1. **Run the orchestrator manually:**+ ```bash+ gbrain apply-migrations --yes+ ```+2. **Your agent reads `skills/migrations/v0.60.53.0.md` the next time you interact with it.** Migration v201 converts every legacy token grant to the grant columns without changing what any token can do, and v202 adds the per-client source and takes-holder columns. Restart every `gbrain serve`, autopilot and worker so the facts drain and the new token reads take effect.+3. **Verify the outcome:**+ ```bash+ gbrain doctor --only legacy_token_null_scope,legacy_token_grant_shape,facts_drain,revision_backfill --json+ gbrain stats+ ```+4. **If any step fails or the numbers look wrong,** please file an issue:+ https://github.com/garrytan/gbrain/issues with:+ - output of `gbrain doctor`+ - contents of `~/.gbrain/upgrade-errors.jsonl` if it exists+ - which step broke++ This feedback loop is how the gbrain maintainers find fragile upgrade paths. Thank you.++### Itemized changes++#### Crash robot in the persistence gate++- The persistence gate runs a crash robot (`scripts/persistence/crash-robot.ts`, `generator.ts`, `model.ts`, `ops.ts`): seeded sequences of real operations across two sources and a connector source (local CLI, an OAuth client and a legacy token as remote agents; page writes, edits, deletes and restores, `remember`/`forget`, takes add and supersede, timeline entries, `sync_brain`, a GitHub connector publish, credential revocation). It SIGKILLs the owner at every crash seam the sequences reach (`src/core/persistence/fault-points.ts`), and runs process faults: a stale `index.lock`, a hung `git commit`, Postgres session drops every 400 ms, and the owner killed right after a `facts-absorb` job commits. A reference model checks for lost or duplicated writes, untrue receipts, withdrawn facts coming back, cross-source writes, request-id replay across principals, takes and facts rows against their page fences, write attribution, orphan rows, wedged queues and lock order.+- `.github/workflows/persistence-validation.yml` adds a `crash-robot` job per engine with PgBouncer for Postgres: 150 s on pull requests, 600 s on pushes, schedules and manual runs. Failing runs replay with `--replay` and shrink with `--shrink`; accepted shrunk sequences live in `test/fixtures/crash-robot/`.+- A restarted PGLite owner (for example `gbrain serve` after a crash) resumes the effects and writes its predecessor left claimed instead of waiting out a 2-minute lease that also held back writes to a withdrawn page.+- `buildHistoryFixture(engine, { pages, seed, sources, worktrees })` (`scripts/persistence/history-fixture.ts`) builds a managed brain with real persistence history at up to 10,000 pages.++#### Facts and chronicle++- Automatic facts drain on PGLite (`src/core/facts/drain.ts`, `drain-scheduler.ts`): `gbrain serve` (stdio and `--http`) and the new `facts_drain` cycle phase run queued `facts-absorb` jobs under per-run and daily spend caps. Jobs without a key are deferred without spending an attempt (minion job deferral); doctor `facts_drain` reports the state. Guide: `docs/guides/facts-drain.md`.+- The `extract_facts` cycle phase fences facts without a fence row itself (#5299).+- `gbrain repair take-supersession` rebuilds supersession chains broken on managed brains (#5886).+- Doctor `revision_backfill` reports pages waiting on the page revision backfill with a resume command that works, and the backfill runs on managed brains (#5216).+- Life chronicle: two same-day events of one page that share who and what both survive (`src/core/chronicle/event-identity.ts`), and an ended calendar invite becomes a `Scheduled:` meeting event without a model call (`invite-projection.ts`).++#### Keys and grants++- Dashboard API keys mint through `mintLegacyToken` with read and write by default; admin only when the box is checked. The dashboard revokes a key by id, so two keys with the same name no longer revoke each other.+- Doctor `legacy_token_null_scope` names every existing full-access key with the command that narrows it.+- Migration v201 (`legacy_token_grant_conversion`) converts every legacy token grant to the unified grant columns; HTTP auth on both transports reads those columns, and a row created later converts on its first read. A malformed `permissions` value now denies every axis on every path.+- Migration v202 (`oauth_client_grant_axes`) adds `oauth_clients.source_grant` and `oauth_clients.takes_holders`: `gbrain auth rescope --client <id> --sources none` and `--takes-holders a,b|none`.++#### Write attribution++- Imports, legacy sync renames and deletes, timeline extraction, legacy facts and takes helpers, cycle phases, schema-pack conversions and repairs record the local maintenance principal (`maintenanceTransaction`). Changed rows keep their creator and move their last writer. `gbrain extract`, meeting-timeline extraction and enrichment remain unattributed (`docs/architecture/system-of-record.md`).+- Batch maintenance writers commit one bounded transaction per batch: 10,000 pages of timeline extraction run as 100 transactions of at most 100 rows.+- `gbrain repair attribution-backfill` on a 10,000-page managed history with 75% of rows reset refilled 6,868 of 7,509 pages, 5,502 of 5,609 versions and 1,501 of 1,501 facts exactly and changed no content; the rest were last changed by `forget`.+- `gbrain calibration undo-wave` works on Postgres.++#### Scale and operations++- The scale tier asserts the large-brain ceilings through the real CLI at every size: progress-aware sync deadline, loud `embed --stale` budget stop, serve boot window, and a 20,000-file `sources add` at 20k pages and up. Ceiling enforcement stays report-only.+- The Postgres `find_orphans` known answer reads totals and one maximal page (it read 1 page of 100 against 104 orphans and failed the 20k nightly).+- PGLite writes made outside a transaction take the WAL checkpoint guard, so large raw writes no longer hang at a 529 MB WAL.+- `gbrain extract timeline --source db` refreshes PGLite planner statistics on batch boundaries during the walk.+- `gbrain migrate --to` refusals carry why and a filled fix naming the refusing side; an unknown engine is `invalid_params`; `postgres` is the canonical engine name (`supabase` stays an alias).+- `gbrain sources refresh` runs inside a resident PGLite owner (`writer_refresh` administration operation); delegated syncs keep the progress-aware deadline; the consumer's idle probe honors the refresh fence.+- Search reuses its projection-readiness answer until the brain changes (`GBRAIN_PROJECTION_READINESS_CACHE=0` turns it off).+- The OpenClaw context-engine heartbeat reports seat write failures with their hints; a pattern page drops a seat its reflections no longer share (#4618).++### For contributors++- Generated files were regenerated, not merged: migration registry, flag registry, schema blobs, llms bundles, goldens.+- New write-attribution suites `test/write-attribution-<family>.test.ts`; helpers `test/helpers/unmanaged-attribution.ts` and `attribution-history-fixture.ts` (`GBRAIN_TEST_BACKFILL_FIXTURE_PAGES`). A test that overrides an engine method with a copy bound to the base engine deadlocks on PGLite once the writer runs in a transaction; override through the transaction engine instead.+- `scripts/persistence/would-have-caught.ts` reverts past fixes one at a time and reports which the gate catches.+## [0.60.48.0] - 2026-10-04**A managed Postgres brain now catches up a big sync backlog in one `gbrain sync` run, about 4.6 times faster, and the run tells your agent exactly what happened and what to do next (#5984).**diff --git a/TODOS.md b/TODOS.mdindex af0fe84c84..32138131b2 100644--- a/TODOS.md+++ b/TODOS.md@@ -1,6 +1,6 @@# TODOS-## Foundations 2 crash robot follow-ups (filed 2026-10-04, GBRA-40 Lane A)+## Foundations 2 crash robot follow-ups (filed 2026-10-04, follow-up from v0.60.53.0)Context: `scripts/persistence/README.md` ("Crash robot"), `scripts/persistence/{generator,model,crash-robot}.ts`.diff --git a/VERSION b/VERSIONindex 34d19106af..08dbee0a54 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-0.60.48.0+0.60.53.0diff --git a/docs/fix-wave-notes/capy-foundations-2.md b/docs/fix-wave-notes/capy-foundations-2.mdnew file mode 100644index 0000000000..83a295015a--- /dev/null+++ b/docs/fix-wave-notes/capy-foundations-2.md@@ -0,0 +1,92 @@+# Foundations 2 notes (`capy/foundations-2`, v0.60.53.0)++One integrated PR. Five lanes were built in parallel from master at+`5bd9e8497` and merged here with merge commits in the order F (scale and+operations), A (crash robot), E (keys and grants), C (write attribution), D+(silent failures). Lane E's placeholder migrations became v201+`legacy_token_grant_conversion` and v202 `oauth_client_grant_axes`, the next+numbers after master's v200. Generated files (migration registry, CLI flag+registry, schema blobs, llms bundles, goldens) were regenerated, never+hand-merged; the module-size ratchet rows that two lanes both grew were merged+to measured line counts, keeping every lane's rationale.++## Headline++| Outcome | Before | After | Measured on |+| --- | --- | --- | --- |+| Crash runs per full persistence gate run (600 s budget) | 0 | PGLite 75 (Bun 1.4.0) and 69 (Bun 1.4.2); Postgres through PgBouncer 18 per Bun version; 11 crash points; 0 violations | `persistence-validation.yml` run 37234740186 on this branch |+| Local robot long run | n/a | PGLite 300 s budget: 40 sequence x crash-point runs, 3 process faults, 0 violations; Postgres 600 s through PgBouncer: 12 runs, 4 process faults, 0 violations | integrated head `8bd4e81f9` |+| Past persistence fixes caught when reverted (12 that reverse-apply cleanly) | 0 | 1 on each engine (6fe43935e, hung git child) | Lane A branch, `would-have-caught.ts` |+| Facts from 10 meeting pages on a served PGLite brain, no command | 0 after 22 min, 10 jobs waiting | 49 facts from 10 pages at about 20 min ($0.084) | Lane D branch, real model |+| Dashboard-minted keys with full access | 20 of 20 | 0 of 20 | `serve --http` fixture, integrated head |+| Legacy tokens authorized from the JSON grant after boot | 50 of 50 | 0 of 50 (50 of 50 requests succeed) | same fixture |+| Unattributed writer references | 90 in 40 files | 7 in 3 files | `test/write-attribution-legacy.test.ts` inventory |+| Scale tier, 10,000 pages, enforced | n/a | PGLite 25 of 25 gates, Postgres 24 of 24 | `scale-tier.yml` run 37234737519 on this branch |+| Scale tier, 20,000 pages | nightly red (PGLite timed out at 50 min) | green on both engines, about 8 min per job | Lane F run 37220459411 |++Foreground MCP latency with and without the live facts drain (12 pages, real+model): `get_page` p95 3.2 to 3.3 ms, `list_pages` 9.1 to 8.8 ms, search 439+to 389 ms.++Scale tier at 10k on this branch: MCP search p50 37.3 ms (PGLite) and 78.6 ms+(Postgres); hybrid query 25 and 201 ms; `find_orphans` 41.4 and 31.9 ms;+import 57 s and 102 s. The Postgres `planner_stats` gate is report-only and+reports no `pg_stats` rows yet for three tables right after import (autovacuum owns statistics there).+Ceiling enforcement stays report-only.++## Items++| Lane | What shipped | Priority |+| --- | --- | --- |+| A | Crash robot over the real operations (generator, reference model, SIGKILL at every crash seam, process faults, replay and shrink); crash-robot CI job per engine with PgBouncer; restarted PGLite owner releases its dead predecessor's claims; `buildHistoryFixture`; lock-order trace; would-have-caught runner | P0 |+| C | Unmanaged writers through `maintenanceTransaction`, bounded per batch; attribution-backfill verified on a 10k managed history; `calibration undo-wave` on Postgres | P1 |+| D | Automatic facts drain on PGLite (serve, serve --http, `facts_drain` cycle phase) with job deferral; #5299 cycle fence; `repair take-supersession` (#5886); doctor `revision_backfill` and the backfill on managed brains (#5216); chronicle event identity and invite projection | P0 drain, P1 rest |+| E | Dashboard key mint fix (read+write default, revoke by id); v201 bulk legacy grant conversion and column reads on both HTTP transports; v202 client `--sources none` and `--takes-holders`; doctor `legacy_token_null_scope` | P0 mint fix, P2 rest |+| F | `find_orphans` known answer on Postgres; PGLite planner stats in the timeline walk; autocommit WAL checkpoint guard; migrate refusals with why and fix; `sources refresh` inside a resident PGLite owner; projection-readiness cache; F4d ceilings in the scale tier; seat heartbeat and pattern-page seat follow-ups | P0 scale fixes and refusal, P2 rest |++Every P0 item shipped. Nothing was cut.++## Integration fixes++- `8bd4e81f9`: Lane F's planner-stats refresh flushed the timeline batch+ before page N, so one 100-row maintenance transaction split in two and Lane+ C's `test/write-attribution-timeline-10k.slow.test.ts` saw 101 transactions+ for 10,000 rows. The refresh now runs after every N pages, where the batch+ is already flushed; Lane F's planner-stats test walks 301 pages so its check+ after page 300 still sees 600 rows.+- `consumer.ts` composes Lane A's `consumer:prepared` seam and first-tick+ PGLite `releaseAbandonedClaims` with Lane F's refresh-fence predicate in the+ idle probe; released claims are still fenced when they are claimed again.++## Gates++- `bun run verify` (69 checks) and `bun run typecheck`.+- `bun run ci:ubicloud` on `8bd4e81f9`: 3,345 items, 0 failed (gitleaks 1,+ unit 2,468, serial 433, slow 30, E2E 412 against Postgres and PgBouncer,+ verify 1), 8 min 27 s wall.+- Lane focused tests after the merge: the 65 unit, serial and slow files green locally; the 11 E2E files green in `ci:ubicloud`.+- `persistence-validation.yml` (manual run, every Bun version): all jobs green.+- OpenClaw native context-engine startup test against pgvector pg16 with+ openclaw 2026.9.4: 1 of 1 pass.+- `uvx semgrep scan --config p/default --config p/typescript --error --baseline-commit origin/master`: 0 findings on 177 changed files.+- `bun run wave-security-scan origin/master..HEAD`: no obfuscation or eval;+ `admin/dist` changed and rebuilds byte-identical from `admin/src`; one+ gitleaks hit, a function-body sha256 in the migrations golden, which+ `.gitleaks.toml` allowlists.+- `bun run check:agent-contract`: OK.+- gstack credential pre-push guard on every push: no HIGH findings (MEDIUM+ hits are minified constants in `admin/dist` and a version-shaped string).++## Deferred (TODOS)++P1: a held sync lock reaches agents as `internal_error` (skipped test; the+agent-output contract owns it); ENOSPC and lost-exit process faults; a seeded+mutation pass; source and writer-lifecycle ops in the robot. P2: a restarted+Postgres owner waits out its predecessor's claims; a CI check that every+mutating operation is registered with the robot; pre-activation claim lock+order; the three link-extraction writers' attribution; one write path for+unmanaged brains; the `permissions` mirror after 2026-11-04; Postgres MCP+search at 20k pages; chronicle occurrence status, keyless invite projection+and invite-aware cost accounting. P3: `forget` as backfill proof,+`register-client --takes-holders`, `embed --stale` budget overshoot,+`findOrphans` paging.diff --git a/openclaw.plugin.json b/openclaw.plugin.jsonindex 3cf3086649..0781d24bc9 100644--- a/openclaw.plugin.json+++ b/openclaw.plugin.json@@ -1,7 +1,7 @@{"id": "gbrain-context-engine","name": "gbrain",- "version": "0.60.48.0",+ "version": "0.60.53.0","description": "Personal knowledge brain with Postgres + pgvector hybrid search","family": "bundle-plugin","kind": "context-engine",diff --git a/package.json b/package.jsonindex a91018fb95..a85945ddd8 100644--- a/package.json+++ b/package.json@@ -212,7 +212,7 @@"bun": ">=1.4.0"},"license": "MIT",- "version": "0.60.48.0",+ "version": "0.60.53.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 533aa47a53..1fcc0dc112 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.48.0",+ "version": "0.60.53.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 43c1351a75..7cdefc8eec 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.48.0",+ "version": "0.60.53.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 f42eb7b0bf..dfbc30ad53 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.48.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.53.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 45cc87ad3a..b58e9adcd2 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.48.0",+ "version": "0.60.53.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 042a7ecce9..fb0d03fede 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.48.0",+ "version": "0.60.53.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 0fcb73a8ce..00fe3d824b 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.48.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.53.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 c7ea253562..0f08ad89d9 100644--- a/plugin/README.md+++ b/plugin/README.md@@ -1,4 +1,4 @@-<!-- gbrain-plugin-tree-stamp: 0.60.48.0 -->+<!-- gbrain-plugin-tree-stamp: 0.60.53.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/skills/migrations/v0.60.53.0.md b/skills/migrations/v0.60.53.0.mdnew file mode 100644index 0000000000..5879f9abaa--- /dev/null+++ b/skills/migrations/v0.60.53.0.md@@ -0,0 +1,47 @@+# Upgrade to v0.60.53.0: automatic facts on PGLite, scoped dashboard keys++Two behavior changes reach existing brains. On PGLite, `gbrain serve` now+turns queued pages into facts on its own, which spends money on the+configured facts model. New admin-dashboard API keys get read and write, not+admin, unless the user ticks admin.++1. **Finish the upgrade.** `gbrain upgrade` runs it. To be sure, on the brain+ host:+ ```bash+ gbrain apply-migrations --yes --no-autopilot-install+ ```+ Migration v201 converts every legacy token grant to the grant columns+ without changing what any token can do; v202 adds per-client source and+ takes-holder columns. Restart every `gbrain serve`, autopilot and worker.++2. **Tell the user about the automatic facts drain (PGLite only).** It is on+ by default. Each extracted page is one paid chat call, capped at $1 per run+ and $5 per rolling day. Show the state:+ ```bash+ gbrain doctor --only facts_drain --json+ ```+ If the user does not want automatic extraction, run+ `gbrain config set facts.extraction_enabled false` after they say so. Raise+ a cap (`facts.drain_budget_usd`, `facts.drain_daily_budget_usd`) only with+ their agreement. Guide: `docs/guides/facts-drain.md`.++3. **Show the user any full-access API keys.**+ ```bash+ gbrain doctor --only legacy_token_null_scope --json+ ```+ Each listed key can do everything, including admin. Ask the user which+ keys need admin; narrow the rest with the printed command, for example+ `gbrain auth rescope --id <token-id> --scopes read,write`. Never narrow a+ key without the user's agreement: an agent using it may lose access.++4. **Check the repairs this release adds.**+ ```bash+ gbrain doctor --only revision_backfill,legacy_token_grant_shape --json+ gbrain repair take-supersession # preview; writes nothing+ ```+ Follow `revision_backfill`'s printed command if it warns. Show the user the+ take-supersession preview before running it with `--apply`.++5. **Know the new options.** `gbrain auth rescope --client <id> --sources none`+ gives an OAuth client no source access without rotating its secret;+ `--takes-holders a,b|none` sets which takes it can read.diff --git a/skills/skills.lock.json b/skills/skills.lock.jsonindex ea8761ea35..e57dbd2a4b 100644--- a/skills/skills.lock.json+++ b/skills/skills.lock.json@@ -164,6 +164,7 @@"migrations/v0.60.45.0.md": "ed92f7b642f1e84e6381ef9e7e855db1ac7d20abd9b79a7bb359c707a04b8b9d","migrations/v0.60.47.0.md": "91a6015e3b85c6f2c8048680ee5873895ae2b1948bad8ba6cebce679c3ec7085","migrations/v0.60.5.0.md": "0d3ee19359a2740de08ac9ec388ddc15e7c72d663afe33832e1e54170528acab",+ "migrations/v0.60.53.0.md": "ccb5291c02795e73df80baee4ea809756c7c5f0544f879853d89cc05d72662cd","migrations/v0.60.6.0.md": "1cbfca2c899e1348acbd61f0baa4c8e723b5283ff868c710c74e116c0cb6726e","migrations/v0.7.0.md": "97c2740445a10b1c5c7123c17dbd625fa27a94095b85d27c2b278da756c4c59a","migrations/v0.8.0.md": "1919ff8b8f3680612ff888e7cfcc0d86ece5d5304ae19af4497bdf40b050561a",diff --git a/templates/bootstrap/template-repo/README.md b/templates/bootstrap/template-repo/README.mdindex 4321c345a8..d021eca7ae 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.48.0 -->+<!-- gbrain-template-stamp: 0.60.53.0 -->This repository is the **"Use this template"** distribution artifact for a[gbrain](https://github.com/garrytan/gbrain) personal-agent workspace — the same