Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
docs(migrations): v0.60.34.0 agent upgrade note (pending-write exit 10, legacy token regrants, take embedding consent, new defaults)
garrytan9de7592e70a8
diff --git a/llms-full.txt b/llms-full.txtindex e2605fddb0..873be555dc 100644--- a/llms-full.txt+++ b/llms-full.txt@@ -3971,7 +3971,7 @@ Details in INSTALL_FOR_AGENTS.md ("Engine preference for harness installs").| Concurrency | Single process | Connection pooling || Backups | Manual (file copy) | Managed by Supabase |-**Migration:** `gbrain migrate --to supabase` exports everything (pages, chunks, embeddings, links, tags, timeline, facts) and imports into Supabase. Config rows copy in full minus the engine-local denylist (`MIGRATE_CONFIG_ENGINE_LOCAL_KEYS`: the target-owned `engine`/`version` connection + schema ledger and the physical embedding-column registry keys); skipped keys are printed, never silent, and the run ends with a per-table copied-count summary. `gbrain migrate --to pglite` goes the other direction. Bidirectional, lossless.+**Migration:** `gbrain migrate --to supabase` exports everything (pages, chunks, embeddings, links, tags, timeline, facts) and imports into Supabase. Config rows copy in full minus the engine-local denylist (`MIGRATE_CONFIG_ENGINE_LOCAL_KEYS`: the target-owned `engine`/`version` connection + schema ledger and the physical embedding-column registry keys); skipped keys are printed, never silent, and the run ends with a per-table copied-count summary. `gbrain migrate --to pglite` goes the other direction. The copy is lossless for what it carries, but it refuses two kinds of brain: a managed brain (`writer_coordinator_required`, "cannot mutate a managed brain through the legacy writer") and any brain with durable write history, fact withdrawals or canonical worktree ownership (rows in `persistence_requests`, `fact_withdrawals` or `persistence_worktrees`), because the copier cannot carry request IDs, withdrawals or ownership. A brain that has saved memory through the write coordinator (`remember`, `put_page` from an agent or a resident `gbrain serve`) has that history, so in practice `migrate --to` works only for brains that never used it. For those brains, keep the datastore and repair forward (`gbrain doctor`, `gbrain repair`) instead of migrating, and choose Postgres up front if you expect 1000+ files or several machines. An engine move that preserves request IDs, withdrawals, attribution, grants and ownership is planned, not shipped.The migration and the autopilot daemon do not race: `migrate --to` claims acooperative pause marker before touching the target. The marker doubles as adiff --git a/skills/migrations/v0.60.34.0.md b/skills/migrations/v0.60.34.0.mdnew file mode 100644index 0000000000..6ef091bf12--- /dev/null+++ b/skills/migrations/v0.60.34.0.md@@ -0,0 +1,87 @@+# Upgrade to v0.60.34.0: fix wave 8++This release changes how writes report back, how legacy tokens are granted,+and several defaults. Most of it needs nothing from you. The steps below are+the ones an agent or a script around gbrain should know about.++Paid work and grant changes need the user's agreement. Never run+`gbrain embed --stale`, a repair with `--apply`, or `gbrain auth rescope-token`+on the user's behalf without asking.++1. **Finish the migration.** `gbrain upgrade` runs it. To be sure, run on the+ brain host:+ ```bash+ gbrain apply-migrations --yes --no-autopilot-install+ ```+ Three schema migrations run (v190-v192): upstream-observation columns on+ `sources`, alias rows that cascade with their source (orphan alias rows+ left by earlier source removals are deleted), and take-vector identity+ columns. A brain created before v150 also backfills page revisions in+ batches; it prints progress, is safe to interrupt and resumes on the next+ run. Until a page's revision is backfilled, a write that names a revision+ for it is refused with `revision_backfill_pending`.++2. **Pending writes exit 10, not 1.** A CLI write that was accepted but had+ not committed when the wait ended (30 s by default) now exits 10 and+ prints its receipt. Exit 0 still means committed and 1 still means failed.+ Scripts that treat any non-zero exit as failure should either check for 10+ or pass `--accept-pending` (or set `GBRAIN_ACCEPT_PENDING=1`). Do not+ resubmit a pending write with a new request id. Replay it with the same+ `request_id`, or poll it:+ ```bash+ gbrain call get_write_request '{"request_id":"<id from the receipt>"}'+ ```+ `--wait <seconds>`, `GBRAIN_WRITE_WAIT_MS` or+ `gbrain config set persistence.write_wait_ms <ms>` change the wait.++3. **Legacy tokens: an empty source list now means no sources.** A legacy+ bearer token whose stored `source_id` is an explicit empty list used to+ fall back to `default`; it is now refused for every operation. Regrant+ explicitly when the user agrees:+ ```bash+ gbrain auth rescope-token <name> --sources default # or a,b+ gbrain auth rescope-token <name> --reset-default sources # back to the default+ ```+ A rerun of bootstrap harness rotation carries the old token's grants and+ no longer adds operations that are newer than the token. Preview what it+ withheld and widen only by name:+ ```bash+ gbrain auth rescope-token <name> --refresh-operations+ gbrain auth rescope-token <name> --refresh-operations --add <op,...>+ ```++4. **Ask before embedding takes.** Takes are now embedded with pages by+ `gbrain embed --stale` and the cycle's embed phase, and existing take+ vectors are re-embedded once so they record their model and claim. That+ calls the embedding provider and can cost money. `gbrain doctor`+ (`fact_take_vectors`) counts what is missing. To turn it off:+ `gbrain config set takes.auto_embed false`.++5. **Know what else is on by default.** Dream reads imported+ `type: conversation` pages when a corpus directory is set+ (`gbrain config set dream.synthesize.conversation_pages false` turns it+ off). Atom extraction of connector email and meeting pages is on again+ (`gbrain config set cycle.extract_atoms.connector_pages false`). Both call+ the configured models.++6. **Expect some doctor checks to turn yellow.** Checks that could not verify+ anything now warn "not verified" instead of reporting ok, `sync_freshness`+ reports a remote source whose upstream was not checked in 24 hours as+ "upstream unknown", and `auto_chronicle` reports that `auto_chronicle=true`+ has no effect yet. Each warning names its fix.++7. **Re-derive markdown link types if you rely on them.** The bundled packs'+ bare-word verb regexes no longer type markdown links (a nearby "started"+ or "joined" no longer makes a link `founded` or `works_at`). To redo+ existing links: `gbrain extract links --source db`.++8. **Verify:**+ ```bash+ gbrain doctor+ gbrain remember "upgrade check" --provenance upgrade; echo "exit=$?"+ ```+ `exit=0` means the write committed.++9. **If any step fails,** file an issue at+ https://github.com/garrytan/gbrain/issues with the output of+ `gbrain doctor` and `~/.gbrain/upgrade-errors.jsonl` if it exists.diff --git a/skills/skills.lock.json b/skills/skills.lock.jsonindex b408306c61..98e9018943 100644--- a/skills/skills.lock.json+++ b/skills/skills.lock.json@@ -158,6 +158,7 @@"migrations/v0.60.28.0.md": "f7fa936066fb188f6f3f54bb6c720f57743792e4371d0b98dd3cb5a57d1bd9c9","migrations/v0.60.30.0.md": "2dd24bb319cad80ae15c52fb163c704fc3adfc1182d44ab563f636f07434a9e0","migrations/v0.60.31.0.md": "fb8c0a98451a6f7826413ee7463421612511986252f6b803d91a26da94d378bf",+ "migrations/v0.60.34.0.md": "1d45e41dea447c6fdfd4a942ecb02df802548668f3d43d1de30352d39565f58d","migrations/v0.60.5.0.md": "0d3ee19359a2740de08ac9ec388ddc15e7c72d663afe33832e1e54170528acab","migrations/v0.60.6.0.md": "1cbfca2c899e1348acbd61f0baa4c8e723b5283ff868c710c74e116c0cb6726e","migrations/v0.7.0.md": "97c2740445a10b1c5c7123c17dbd625fa27a94095b85d27c2b278da756c4c59a",