专为 OpenClaw 与 Hermes 打造的 AI 智能体核心
为gbrain打分
给出您宝贵的评分:
相关产品
手机端可长按图片保存,分享到朋友圈 / 社群
使用 gbrain,你可以:
GBrain 由 Garry Tan 开源出品,是面向 OpenClaw、Hermes 智能体量身定制的专属 AI 大脑,为智能体提供专属底层架构与能力支撑,赋能 AI 智能体实现智能调度与自主运行。
用户评论 (0)
2026年10月05日
2026年10月06日
2026年10月05日
2026年11月11日
v0.60.687.0
2026年11月12日
An upgrade can no longer run the same schema step twice at once. When two gbrain processes started on one brain together (a cron job and an agent, or two hosts after an upgrade), both could apply the same schema migration. On Postgres reached through a transaction-mode pooler such as PgBouncer or Supabase's pooler, the lock meant to keep them apart did not hold. The pooler hands each statement to whichever server connection is free, so the lock could be taken on one connection and left behind on another. The second process then ran the step too, which showed up as a failed migration (for example a duplicate key on pg_proc while a function was being created) or as a step applied twice, and a lock left behind could keep later upgrades waiting until they timed out. Every path that changes the schema now takes one lock that holds for the whole run, through a pooler or a direct connection, and on PGLite. There is nothing to do beyond upgrading.
Itemized changes
- The schema setup a gbrain process runs when it opens the brain (which
gbrain initandgbrain upgradego through) andgbrain apply-migrationstake the same schema-migration lock, and each migration step checks that the lock is still held before it runs. - On Postgres the lock is a transaction-scoped advisory lock held on one reserved server connection for the whole run, so a transaction-mode pooler cannot move it, and it is released when the run ends or the connection drops. A connection pool with only one connection keeps the previous session lock.
- While one process holds the lock, another waits for it and then finds the steps already applied. If the wait times out, the message names the process holding the lock and, when that process is a running migration, says to let it finish rather than terminate it.
- The idle-connection check that runs before a migration no longer counts the lock's own connection as a blocker.
- Tests:
test/e2e/schema-migration-lock-postgres.test.ts(direct Postgres and PgBouncer),test/e2e/schema-migration-lock-direct-pool-postgres.test.tsandtest/schema-migration-lock-pglite.test.tsstart two runners at once and check that each step runs once and that no lock is left behind. - For contributors:
bun run typecheckraises its Node heap ceiling from 6,144 MB to 8,192 MB, because a cold tsc run now peaks at about 6.5 GB and one CI typecheck job aborted at the old ceiling.
v0.60.685.0
2026年11月12日
remember now tells the truth about a fact saved for something that has no page yet, a source that lives in Git keeps that fact in Git, and the brain owner's own agents save facts shared by default. Three changes to how agents save and withdraw facts land together.
A fact saved for an entity whose page does not exist yet (remember never creates a page) used to get a reply that named the missing page, so an agent would report the fact as saved to a file. The reply now says the fact is stored in the database only and names the put_page call that creates the page. On a source whose pages are canonical in Git (canonical: git), such a fact no longer lives in the database alone, where a rebuild from Git would lose it: it is committed to Git as a row of memory/unattributed that names the entity, and maintenance moves it into the entity's page once that page exists. Other sources and brains with no Git repository store it as before.
A credential bound to the brain owner (gbrain access owner set) reads the whole brain, but its remember kept every fact private on the owner's member page unless the call passed share: true, its visibility: "world" was refused, and its forget refused a fact it had just shared. Those private facts also stayed out of hot memory, turn context and context packs, which carry shared facts only. Now, speaking for itself, the owner's credential saves a fact with no visibility on its subject's page for every reader of the source, keeps it private on its member page when the call passes visibility: "private", when the page or facts.default_visibility keeps facts private, or when it replaces a fact on that page, and withdraws a shared fact it reads. The trade-off: an owner agent that follows a planted instruction can now share a fact without passing a flag, so pass visibility: "private" for a fact that must stay with the owner. Member credentials, attested QM calls (x-qm-actor), audiences, subagent jobs and slug-fenced clients keep what they had.
The changes meet on a strict source. The owner's save for an entity with no page is held, shared, on memory/unattributed like any other shared save, the owner's forget strikes it there, and the brain host's purge removes it from the file.
Upgrade every gbrain host of a strict source together, because an older gbrain holds a memory/unattributed file that carries the new entity column as a malformed fence, with no data loss.
Reported by @andreineacsu (#9101). First fixed by @Masashi-Ono0611 in #9103.
Itemized changes
The reply for a fact on no page (GST-2446, #9165)
- The reply names a
pageonly when the fact is on one. For an entity with no page it used to carrypage: "<the entity slug>", a page that does not exist; now the field is absent. A pending reply'starget.slugfollows the same rule, and so does a fact with no entity on a source that cannot hold thememory/unattributedpage. - Each
itemsentry of a batch carriespersistenceandwrite_through, the same fields the single form returns. Before, a batch item gave no sign of whether it landed in a page file or in the database alone. - When the source has a checkout, the reason no file was written is
write_through.skipped: "entity_page_missing", in the reply and in the write receipt. It used to readno_repo_configured, which is false for such a source. A source with no checkout still readsno_repo_configured. - Where the brain's pages are in a Git repository, the reply adds one
entity_page_missingnotice per entity per session with theput_pagecall that creates the page. Once the page exists, the next maintenance cycle can move the facts saved for that entity into the page's Facts table and its file. A brain with no Git repository gets no notice, because there the database is the record. gbrain rememberprintsnote: the entity has no page, so this fact is stored in the database only, and a batch line ends(no page: database only).- Docs:
docs/guides/entity-scoped-facts.md, theremembersection ofdocs/mcp/TOOL_REFERENCE.mdanddocs/protocol/MEMORY_VERBS_v1.mddescribe the reply. One behavior-change row discloses the reply change after an upgrade. - Tests:
test/remember-pageless-entity-gst2446.test.tsruns on PGLite and Postgres against a Git checkout, a content folder with no Git and a source with no checkout, single and batch, through the operation handler and through MCP dispatch. It also pins that the fact reaches the page's Facts table and its committed file once the page is created.
A strict source keeps a pageless fact in Git (GST-2492, #9179)
- The reply, each batch item and the write receipt say where the fact is:
page: "memory/unattributed",persistence: {mode: "filesystem"},write_through: {written: true, held_for: "<entity>"}, and theentity_page_missingnotice says the fact is saved and committed and when it moves. - The
extract_factsmaintenance phase moves held facts into a new entity page in one commit. The fact keeps its id, provenance and embedding, and the held row is struck (moved to <entity>); when the page is restricted the held row is removed instead, so the world-readable holding page keeps nothing of it. A page kept out of Git does not take the fact; the run warnsHELD_FACT_UNMOVABLEand the fact stays held. forgetstrikes a held fact's own row, andpurge_factremoves it frommemory/unattributedas it removes a fact with no entity, so a rebuild does not bring it back (a purge of a held fact also drops every copy of the same claim text onmemory/unattributed, held for another entity or with no entity);remember … replacessupersedes a held fact frommemory/unattributedor from the entity's page.- A client bound to slug prefixes may save a held fact for an entity inside its prefixes; a fact with no entity is still refused for it. An entity under a folder access rule is never held on the world-readable page, so its fact stays in the database, as before.
- Only
memory/unattributedreads theentitycolumn, and an invalid entity cell makes its fence malformed. Every other page parses exactly as before. An older gbrain holds amemory/unattributedfile that carries the column as a malformed fence, so upgrade every host of a strict source together. - Tests:
test/remember-strict-held-gst2492.test.tson PGLite and Postgres: the commit before the reply (handler, batch, MCP), rebuilds from a clone of HEAD, the move (one commit, interrupted after its commit and replayed), restricted and database-only pages, forget, purge, both supersede paths, a prefix-bound client, duplicates and the fence column.
The owner's own facts are shared by default (GST-2346 D1, #9178)
- An explicit
visibility: "world"onto a page whose facts are kept private is refused (share_target_restricted), asshare: trueis, and the reply still names thepageandvisibilitythe fact got. Works the same on a brain with no Git repository and on a managed one. src/core/access/member-facts.ts:ownerSpeaksForItself(CallerAccess.owner, no attested actor, no audience, not a subagent, no slug fence).src/core/persistence/memory-mutations.ts:remembertakes the ordinary route for the owner and moves a default save the page or brain default keeps private to the owner's member page;forgettakes the ordinary remote path for the owner when that path reads the fact.src/core/verbs.ts: nomember_share_requiredfor the owner.src/core/facts/writeback-config.ts,src/core/ops/memory-settings.ts,src/mcp/http-transport.ts,src/commands/serve-http-mcp.ts: with writeback on, the owner's credential gets the instructions of a credential bound to no member.- Docs: access designations, the company-brain tutorial,
TOOL_REFERENCE.md,MEMORY_VERBS_v1.md, the access key-files entry,skills/brain-ops/SKILL.md; behaviour-change rowowner_facts_shared_gst2346. - Tests:
test/owner-facts-d1-gst2346.test.ts(every caller shape, repo-less and managed, PGLite and Postgres);test/member-forget-refusal-9101.test.tsnow expects the owner to withdraw a fact it shared.
Where the changes meet
test/remember-strict-held-gst2492.test.tsadds an owner-bound OAuth credential on a strict source, on PGLite and Postgres. Its save for an entity with no page is held, shared, onmemory/unattributedwith #9179's reply, itsforgetstrikes the held row,purge_factover MCP is refusedtrusted_local_only, and the host's purge removes the claim so a rebuild from Git does not bring it back.docs/guides/memory-boundaries.md: the purge section says a purge of a held fact drops every copy of the same claim text onmemory/unattributed.
v0.60.684.0
2026年11月12日
An agent that runs gbrain for one member can now be held to that member's view of the brain. Set GBRAIN_ENFORCED_MEMBER=<member> in the launcher that starts the agent's gbrain calls, and every command it runs reads exactly what a remote credential bound to that member would read: pages kept to other members, private pages, folders the member is outside of and other members' personal sources leave no slug, title, body, fact or count behind. Writes still land where they land today, as trusted local writes, but the mode refuses a write to a page the member cannot read and every change to a page's readers or visibility. remember saves a fact only with --entity naming a page the member reads, and its refusal says so with the exact retry command. gbrain write-request <id> reads the member's own receipts, and any other id answers exactly like an unknown one. sync, sources refresh and git commit-push keep working with their output replaced by one line (sync and refresh take only --source <id>, --no-pull, --no-embed, --json and --dry-run, on a source the member reads), doctor prints only check names, statuses and counts, and hook succeeds silently so group turns never fail. Every other command is refused with one exact line, exit 3 and the code enforced_member_refused, --help included, and so is everything when the value is empty, names an unknown member or names the owner. Unset, nothing changes. The mode binds only a caller whose launcher pins the variable; a process that can unset it, or read the brain's files or database directly, is outside it. Guide: docs/guides/enforced-member.md.
Itemized changes
src/cli/enforced-member.ts,src/cli/enforced-member-classes.ts,src/cli/enforced-commit-push.ts: the gate, the allow-list (every CLI command and operation classified once) and the read, write and commit-push checks;src/cli/main.tscalls the gate before any dispatch.src/core/cli-force-exit.ts:setStdoutCapture, so the mode also withholds what a command writes through the fd-1 chain (--jsondocuments).src/mcp/dispatch.ts:DispatchOpts.enforcedMemberforces hidden privacy and no owner access on a dispatched read.src/commands/recall.ts: recall reads through the member filter under the mode;src/cli/cli-socket-client.ts,src/cli.ts: the warm socket and the skill-resolver fast path are skipped under the mode.src/core/error-registry.ts: new codeenforced_member_refused(regenerateddocs/guides/error-codes.md).- Known limits: a PGLite brain with a running
gbrain serverefuses every enforced-mode read; a thin-client install refuses; creating a page at a slug the member cannot read refuses where a free slug would be created. - Tests:
test/enforced-member.serial.test.ts(CLI subprocesses on PGLite and Postgres, repo-less and git),test/enforced-member-classes.test.ts.
v0.60.683.0
2026年11月12日
Making a page private through an operator repair no longer lowers its trust or rewrites its file. On a managed brain, an operator who added visibility: private to one page through a local put_page, or ran gbrain repair visibility, saw the page drop from "your notes" (operator_curated) to "written by an agent", a pending lower_page proposal only a typed token could settle, and a re-rendered file: a slug key removed, a source_kind value overwritten with put_page, keys reordered, and provenance stamps and a trust_tier marker added. Both repairs and gbrain repair private-labels now write through one label-only door. The page keeps its tier, no proposal is filed, and its file changes only on the label lines, with every other key, its order and the body kept byte for byte. A new slug-bound form, gbrain repair visibility --slug <page>, is the operator's single-page way to make a page private (preview first, then --apply --expect <hash>). A plain put_page, local or remote, is still an agent edit and lowers the page as before. gbrain trust backfill --label-lowerings lists every lower_page proposal as label-only or content, counted by proposer, so an operator can see which lowerings came from label-only writes; it changes nothing, and raising a page back stays a trust decision.
Itemized changes
src/core/persistence/label-edit.ts(new): thelabel_editintent (setandremoveovervisibility,access,confidentiality) and the line editor that applies it to a file's frontmatter, or declines a label line it cannot edit as one line.src/core/persistence/page-prepare.ts: amanaged_maintenance_pagewrite that carrieslabel_editpublishes the canonical file's own bytes with only its label lines edited (labelEditFile), keeping its body when it reads as the write's body, and refuses instead of re-rendering when no line edit reads back as the write.src/core/persistence/prepared-maintenance.ts: maintenance page publications carrylabelEdit.src/core/repair/label-write.ts(new): the label-only write door both repairs use (the maintenance door withkeep_truston a managed brain; the import under the page lock andwithTrustKeepotherwise);filesInCheckoutandimportAtRevisionmoved here fromprivate-labels.ts.src/core/repair/visibility.ts: page and fenced-fact items write through the label door instead ofput_page; on a brain without managed persistence a page whose file sits in a checkout gets the same label-line edit in that file, imported with its tier kept, and a file it cannot write (sync.write_throughoff, a pulled clone, a write error) is heldfile_backedwith nothing written; a segmented page is held (segmented_page); a page that changed after it was read is skipped (revision_conflict) instead of counted; new--slugselection (classpages), preview-bound, tighten-only; a fenced fact row it could not make private is reportedfact_left_readablewhen remote callers can still read it, orfact_left_worldwhen only its page's privacy hides it (NOT CLOSEDin the text output for both), instead of a plain skip.src/core/repair/private-labels.ts: clears and restores carry their label edit, so the file loses or regains only those lines.src/core/trust/label-lowerings.ts(new),src/cli/commands/trust.ts:gbrain trust backfill --label-lowerings [--source ID] [--json], read-only.- Tests:
test/label-only-repairs.test.ts(managed Git source and repo-less brain, PGLite and Postgres);test/owner-member-boundary.test.tspins that the owner reads its private pages and pages that list it, and never another member's restricted page, on every read path.
v0.60.682.0
2026年11月12日
The brain owner reads the derived pages and facts of pages it can already read, and the operator can let the owner read pages kept to other members. An atom, a synthesized concept, a Life Chronicle event, a page with derived_from or a fact made from a page under a folder rule, or from a page that names readers, was hidden from every remote caller, the owner included, even when the rule or the readers named the owner. Credentials bound to the owner now read them whenever they read every origin, with no setting. A new opt-in, gbrain access owner reads-restricted on, off by default and settable only by the operator on the brain host, lets the owner also read pages that readers lists, folder rules and page rules keep to other members, with their derived pages and facts, but never another member's own member page. Nothing changes for any other caller or for writes, and nothing changes on upgrade.
Itemized changes
Owner reads and the owner opt-in (GST-2490)
- Migration v304 (
src/core/schema-migrations/v304-access-owner-origin.ts):gbrain_access_origin_closed_for()andgbrain_access_origin_hidden_for(), the lineage arms ofgbrain_access_origin_restricted()asked per origin for one caller. Only owner reads call them;gbrain_access_origin_restricted()is unchanged. Nothing is rewritten. src/core/search/private-visibility.ts:ownerAccessSqlfor owner reads (read-only operations only:remoteCallerAccessinsrc/core/access/caller.ts,src/mcp/dispatch.ts,src/core/minions/tools/brain-allowlist.ts, and--as <owner>insrc/cli/as-preview.ts), fact provenance and the readers checks for single rows; the search cache key and the hot-memory key carry the owner mode.src/core/access/owner.ts,src/commands/access.ts:gbrain access owner reads-restricted on|off(refused for remote callers), shown bygbrain access owner,access check(owner_reads_restricted) andwho-can-read;whoamiaddsowner_reads_restrictedfor every remote caller while it is on; doctoraccess_owner_reads_restricted(src/commands/doctor/checks/owner-reads-restricted.ts).- Unchanged on purpose: what every other caller reads, every write and publication check, member private facts, personal sources, shared-room audiences and attested calls.
- Docs:
docs/guides/access-designations.md(derived pages, member access, the owner opt-in), key-files entry. - Tests:
test/owner-reads-restricted.test.ts(opt-in off and on, owner, other members and unbound keys,--as, writes, the remote refusal; PGLite and Postgres, rules in the database and inaccess.yml); doctor goldens.
v0.60.681.0
2026年11月12日
The low-capacity warning now says it is not a refusal, and a quota refusal no longer reads a whole week of admissions while it holds the write counters. v0.60.681.0 made the write_capacity_low notice open with "This write was saved", but the notice also rides sync status, dry runs and failed batches, where nothing was saved. It now opens with "This notice is not a refusal: writes still work, and this call's own result says what it did", and over MCP its fix is the read-only get_brain_health call instead of a CLI command the agent would relay to its user. A write_quota_exhausted, write_quota_insufficient or background-pause refusal runs under the counter locks, and v0.60.681.0 had it walk the scope's whole week (up to 200,000 admissions) to match doctor's value. It now takes the 7-day mean rates the last forecast recorded, lifecycle changes included, and without a forecast from the last minute it samples the latest 1,000 admissions as before. Both apply only under a cap the operator set: since v0.60.681.0 the caps are off by default.
Itemized changes
src/core/persistence/capacity-snapshot.ts:write_capacity_lowopens with "This notice is not a refusal" and never claims the call saved anything; its fix carriesmcp(get_brain_health), and its why says nothing needs to change for this call.src/core/persistence/capacity-forecast.ts,src/core/persistence/limits.ts:readCapacityForecastrecords each scope's 7-day mean gross and net rates for a minute (recordForecastRates,FORECAST_RATES_TTL_MS), andoneYearCapacityuses them, so the refusal names doctor's value, lifecycle changes included; without a recorded forecast it samples the latest 1,000 admissions and never walks the week. The sample's compacted size uses the forecast's SQL (receipt-bytes.ts).src/core/behavior-change-notice.ts: one row for the new wording and the refusal's rate source.- Docs:
docs/guides/write-refusals.md(write_capacity_lowrow),docs/guides/concurrent-writes.md,docs/architecture/key-files/core-persistence-capacity.md. - Tests:
test/persistence-capacity-notices.test.ts(the notice rendered over HTTP and stdio runsget_brain_health; a week of lifecycle changes moves the brain's value to doctor's; a refusal reads at most the latest 1,000 admissions, and none after a forecast; a refusal after a forecast names doctor's value, on PGLite and Postgres).
v0.60.680.0
2026年11月12日
gbrain now tells you when a privacy label it doesn't recognize leaves a page readable. A page with no visibility counts as private only when access is private, restricted or confidential, or confidentiality is confidential, secret, private or restricted. Any other value, such as access: personal or a confidentiality value naming a health record, was ignored without a word, so the page read as world to every remote caller and could be committed to the brain's git remote. Writes and doctor now say so. Who can read a page does not change.
You can now keep one page to some members, even when gbrain can't write the page. A page at the root of a source (one named after a folder, say) could not be covered by a folder rule, and a page whose file was removed from git outside gbrain refused a visibility: private edit with source_changed, whose receipt only offered the ghost-page repair, which deletes the page. gbrain access rule add --slug <page> --readers <list> now restricts exactly that page without writing it, and the refusal names that route. Removing the rule is the undo.
Itemized changes
Ignored privacy labels: a write-time notice and a doctor check (GST-2462)
src/core/search/ignored-privacy-labels.ts: one rule, in TypeScript and SQL, for a page whoseaccessorconfidentialityvalue gbrain ignores (novisibility, no recognized value, no other default-private rule), and theprivacy_label_ignoredsafety notice. The notice names the key and the value, says remote callers read the page like an unlabelled one and, on a source with a git checkout, that the label does not keep it out of git (a repo-less source gets no git sentence), and its fix asks the user before addingvisibility: private. It never quotes page content.src/core/ops/pages.ts:put_pagecarries the notice for the page it stored.src/commands/import.ts,src/cli/commands/import.tsandsrc/commands/sync/(perform.ts,full.ts,plain-directory.ts,run.ts):gbrain importandgbrain synccarry one notice per run that counts pages by value and names no page (--jsonundernotices, otherwise on stderr); a managed sync reads the source's pages updated during the run.src/commands/doctor/checks/privacy-label-ignored.ts,src/commands/doctor/wave-checks.ts: doctorprivacy_label_ignoredcounts such pages by key and value. A value containing private, confidential, secret, restricted, personal, health or therapy warns, any other value is information, and the fix is the read-onlygbrain list --where <key>=<value> --json. Bounded for large brains. The frontmatter GIN index serves the scan, which stops after 100,000 labelled pages, returns at most 50 values and runs under a 15 s statement timeout (an overrun reports the health as unknown).- Unchanged on purpose: the recognized values,
visibility.honor_aliases, and every read and git placement decision. No repair rewrites labels. - Docs:
docs/guides/access-designations.md(unrecognized label values),docs/guides/troubleshooting.md,skills/conventions/page-privacy.md, key-files entries. - Tests:
test/privacy-label-ignored.test.ts(put_page, import, sync and a managed git source, doctor, and a pin that reads stay the same; PGLite and Postgres),test/ignored-privacy-labels.test.ts(the TypeScript and SQL rules agree on both engines).
Page rules: restrict one exact page (GST-2462)
src/core/access/folder-rules.ts: a rule can name one page withslug:instead ofprefix:(gbrain access rule add --slug <page>,src/commands/access-rules.ts). It is stored in the same rulebook without the trailing/and covers only that slug, never a folder of the same name or a longer slug. Aprefix:without/is still refused and now names the slug form.- Migration v303 (provisional number,
access_page_rules): both prefix checks accept the page form, andgbrain_access_folder_rules/gbrain_access_pending_coversmatch a slash-less prefix only when it equals the slug;src/core/search/private-visibility.tsand the rule preview use the same matcher. Folder prefixes match exactly as before, so no page is restamped on upgrade. Upgrade every gbrain host that shares the brain before adding a page rule. Reads are decided in the database, so an older host still keeps the page restricted, but it refuses its owngbrain access rulecommands and, on a git-backed source, stops syncing that source withstored rulebook holds a malformed ruleuntil it is upgraded. src/core/persistence/service.ts,terminal-classify.ts,verb-errors.ts,page-prepare.ts: a write refused because the page's canonical file is missing names the page rule as the way to narrow who reads the page, beside the ghost-page repair.- Docs:
docs/guides/access-designations.md,docs/tutorials/company-brain.md,docs/guides/write-refusals.md#canonical_file_missing. - Tests:
test/access-page-rule-fileless.test.ts(a root page named after its folder and a page whose file left git on a managed git source, and a repo-less brain, on PGLite and Postgres: put refuses and names the route, the rule hides each page from unbound callers while the owner reads it, nothing else is covered, no page file is written, and removing the rule restores the reads after approval).
v0.60.679.0
2026年11月12日
Doctor, dream, enrich and maintain --safe fixes, landed together. gbrain maintain --safe no longer deletes pages or calls a paid provider, several doctor checks now report what they find accurately, dream phases stop and report correctly, and enrich, model-call errors, atom provenance, transcript dates and the stale link sweep get community-reported fixes. Each fix has a test that fails without it.
The unindexed_files maintenance phase no longer reports a complete scan when a source could not be scanned. A source whose Git checkout failed to read was counted as an error and the phase warned, but its details.complete still said true, so anything reading the phase result took the run as a full scan of every managed source. complete is now true only when no source stopped at its time budget and none errored. Reported by @Masashi-Ono0611 (#8887).
A source with automatic sync off now walks forward through its pages on a database whose DateStyle is not ISO. The per-source maintenance window saved its cursor in the session's date style. Under a day-first style such as German, DMY or SQL, DMY, a cursor dated after the 12th of a month was not a date the cycle handler could read, so it dropped the cursor and the next cycle started again from the source's oldest pages; a source over 2,000 pages never got past its first window. The cursor is now always written as a UTC ISO timestamp with microseconds. A source holding a cursor in the old form may start from its oldest pages one last time; from then on it advances. Reported by @javieraldape (#8771).
gbrain dream --drain stops as no progress when its batches only skip items the backlog keeps counting. The drain checked for no progress only after a batch that extracted nothing and skipped nothing. A page the phase skips on every batch while the backlog still counts it kept that check from ever running, so the drain ran all 1,000 batches, held the cycle lock for minutes and ended max_batches with exit 11, which tells the caller to rerun a stop a rerun cannot clear. A batch that extracts nothing now always rechecks the backlog, and when it did not shrink, the drain stops no_progress (atom_drain_no_progress, exit 1), and skips that do shrink it keep draining. Reported by @h6y3 (#8445).
gbrain dream --help --json prints its help as one JSON document. Under --json, stdout carries only a JSON document, and dream printed its help as plain text, which went to stderr. So stdout was empty, the run exited 0 and logged a missing-document event that gbrain doctor counts under its agent-contract check. It now prints {"command": "dream", "help": "<the help text>", "contract_version": 1}, and dream retriage --help --json and dream reset-key --help --json do the same. gbrain dream --help without --json prints exactly the same text as before. Reported by @Kkkkkuro (#8510).
Concept synthesis stops when its maintenance job times out or is cancelled. The synthesize_concepts dream phase never looked at the cycle's abort signal, so with a slow model it kept calling the model and publishing concept pages after its job had timed out, and an aborted model call could be written as a template fallback page. The phase now passes the signal to the model call and checks it before each concept and again right before each page is written, so nothing is published once the job is cancelled. The spend of the model calls that finished and the failed-attempt counts are still saved, so the recorded spend and the retry limit keep counting them. On a managed brain, concepts synthesized but not yet published when the job stops are synthesized again on the next run. No setting changed. Reported by @Nazim22 (#7986).
Doctor checks that misreported their findings now report them accurately. A community bug wave: each fix below was reported by a contributor, reproduced on master with a failing test first, and rewritten here.
gbrain maintain --safe no longer deletes pages or calls a paid provider. It used to run the whole dream cycle on the default source, so pages soft-deleted more than 72 hours earlier were purged for good, and the embedding, synthesis and other model phases ran too. The source cycle now runs only free phases that never purge: lint, backlinks, sync, the fence and content repair lanes, unindexed files, extract, extract_facts, symbol edges, emotional weight, consolidate, orphans and schema suggestions. It also holds back extract_facts when an embedding provider is set up or the decide conflict slot is on (its conflict sweep calls the decision provider), and the fence and content repair lanes when an embedding provider is set up (their publications embed) or fences.repair.llm has a repair model. The JSON report lists the phases that ran and the ones held back. Old soft-deleted pages are still purged by gbrain pages purge-deleted (preview it with --dry-run), gbrain dream and an installed autopilot, and the paid phases still run from gbrain dream.
Enrich write-ups from thinking models are no longer cut off. Enrich capped every write-up at 2048 output tokens, which thinking-by-default models such as Claude 5 spend on reasoning, so write-ups came back truncated or failed. Thinking models now get the gateway's thinking headroom; other models keep 2048.
An OpenAI account with no credits left is reported as a billing problem instead of being retried. OpenAI answers with HTTP 429 when an organisation has no credits, and gbrain read that as a rate limit and retried. A provider body whose error type or code is a billing code now decides billing wherever the error is wrapped.
Atom quotes keep their provenance when the model drops Markdown or punctuation, and a failed fence step no longer books a healthy facts round. Quote matching skips line-leading # and > markers, quotation marks and a spaced dash, never words or number signs; ambiguous or reworded quotes still fail closed. A fence write that fails with an I/O or database error now counts as failed and stops the facts.fence round, so doctor's extract_health warns.
A write-up that has its own dated timeline section round-trips. A page with no timeline whose body had a ## Timeline highlights section re-parsed that section as the page timeline, so enrich refused its own paid write-up with CONCEPT_REPUBLICATION_LOSSY.
Transcripts without a date in the filename take the date in their frontmatter, and the atoms extracted from a transcript take the transcript's date. Both used to fall back to the date of the run.
The admin dashboard's live feed keeps reconnecting after a dropped connection, and four smaller fixes land with it: the load throttle still applies its concurrency and memory limits when the machine reports no load data (Windows), a remember TTL past the representable date range is refused as invalid_params instead of throwing, a worker pool whose error callback throws now stops every worker before rejecting, and claude-cli tool loops read the previous turn's prompt cache instead of rewriting the whole transcript to it.
The stale link sweep no longer re-extracts one page forever when a bare-name frontmatter link matches a top-level page. A person page with founded: ["acme-toolkit"] resolves that name under companies/, so a top-level page named acme-toolkit does not satisfy it and the link stays wanted. The wanted-link row was still stamped as if its target existed, which marks its page stale on every pass, so the sweep queued the same page again and again (thousands of extract jobs an hour) and starved lower-priority jobs. Only a slug reference to an existing page is stamped that way now, and a row an earlier release stamped settles the next time its page is extracted, which the sweep does on its own. Editing the top-level page still re-checks the link once. One narrow case is left for a follow-up release. If the top-level page is created for the first time while that link is being extracted, the link can stay missing until either page is written again. Reported by @akinduroifedayo (#9140) and first fixed by @Masashi-Ono0611 (#9144); @akinduroifedayo's own fix (#9149) also found that narrow case.
Itemized changes
src/core/cycle/unindexed-files.ts:details.completealso requireserrors.length === 0. Test:test/unindexed-files.test.ts(a source whose.git/HEADis unreadable: phasewarn, one error,complete: false).src/core/cycle/source-window.ts: the listing instant and the last page'supdated_atare formatted withto_char(... AT TIME ZONE 'UTC', 'YYYY-MM-DD"T"HH24:MI:SS.US"Z"'). Test:test/sync-disabled-cycle-window.test.ts(the real queued handler underGerman, DMYadvances window by window;German,SQLandPostgresstyles under a +05:45 time zone give ISO UTC cursors with microseconds and the same windows), now also run on Postgres bytest/e2e/sync-disabled-cycle-window-postgres.test.ts.src/core/cycle/extract-atoms-drain.ts: the no-progress recount runs after every batch withextracted === 0, not only whenskippedis also 0. Test:test/extract-atoms-drain.test.ts(a skip-only batch over a flat backlog stopsno_progressafter one batch; skip-only batches that shrink the backlog drain).src/cli/help/render.ts: newprintHelpText(command, text, args), the--help --jsondocument for a handler that prints its own help text;src/commands/dream.ts,dream-retriage.tsanddream-reset-key.tsprint their help through it. Test:test/dream-help-json-8510.test.ts(the real CLI: one document per help, nojson_document_missingevent, plain--helpstdout equal to the document text).src/core/cycle/synthesize-concepts.ts,src/core/cycle.ts:signaloption, passed from the cycle like extract_atoms', handed to the narrativechatcall and checked before each concept, right before each publication and before the final managed flush; an abort saves the retry counters and the finished spend to the rollup, then throwsAbortError. Test:test/cycle/synthesize-concepts-abort-7986.test.ts(runCycleunder the creator pack: a job aborted during the second model call publishes only the first concept and makes no third call; an aborted call is not published; an abort during the page read before the first publication publishes nothing; an aborted run still writes its spend and failed attempts).timeline_history: on a brain with more than 10,000 pages carrying database-only timeline rows, a pass keeps only the first 10,000 for its final recount. It used to report that recount as exact, and a pass whose kept pages had been repaired was recorded as clean while the rest still held database-only rows. Such a pass now reports its counts as a lower bound ("at least"), keeps warning, and is never trusted as clean. A pass saved by an earlier release, which did not record whether it dropped pages, is treated the same way when its kept list is full. Reported by @Masashi-Ono0611 (#8511).conversation_format_coverage: the sample now includes pages stored under the granular conversation types the extractor already reads (slack-thread,slack-dm-day,email-digest), so unparseable transcripts on a brain that never ran the type-consolidation pack are reported instead of silently skipped. Reported by @Masashi-Ono0611 (#8519).minions_migrationundergbrain doctor --fast: a migration the brain's config can decline (v0.53.0,shared_skills.migration.enabled) is no longer listed as not run. Without a database connection the check cannot read that setting, andgbrain apply-migrations --yesskips a declined migration, so the warning could never clear. The fullgbrain doctorstill reports it when it is not declined. Reported by @Masashi-Ono0611 (#8721).stale_mentions: each stale example now carries its owngbrain unlinkcommand with the link type the row is stored under, shell-quoted so a slug or link type with quotes or$(...)pastes as plain words, with the options first and--before the two slugs, so a slug that starts with--is never read as a flag. The hint used to say--link-type mentionsfor every row, which removes nothing for a typed link stored under a verb such asfounded. Reported by @Masashi-Ono0611 (#8817).schema_pack_consistency: pages gbrain itself wrote (extract receipts underextracts/, and pages from the code importer) no longer count as undeclared on a custom schema pack copied before the base pack declared their types. The exemption follows how the page was written, not its type name. A page of yours that uses one of those types, such as a Markdown note withtype: code, still warns, as do your own undeclared types. Reported by @Masashi-Ono0611 (#8818).embedding_stateandgbrain embed --stale: a page whose body holds only a protected takes fence (which never reaches search chunks) is now countedemptyinstead ofchunkless_healable. Doctor no longer warns about it, andembed --staleno longer plans a heal that can never produce a chunk. A page is treated this way only when the writer already chunked its current revision to nothing; a chunkless page that was never chunked, a page whose chunks were deleted after it was chunked, or anembed_skippage an older release stored without chunks, is still healed. Deleting a page's chunks clears that seal, indeleteChunks, an empty chunk replacement andpurge_fact's chunk delete (which also empties pages whose body held no purged row), so such a page stays healable. Reported by @akinduroifedayo (#8502).managed_sync_backlog: removing a source in the middle of a managed sync now removes its sync cursor too, whether the brain is managed or not. The cursor used to stay behind, and doctor warned about a stalled backlog forever with a resume command that failedunknown_source. A cursor an earlier removal already left behind is no longer reported, including after the source is added back under the same id. Reported by @omni-nordaware (#8741).src/commands/maintain.ts:MAINTAIN_SAFE_PHASESis the allowlist of free, non-purging phases;maintainSafePhasesintersects it with the source's own phase list and holds back provider-gated phases (extract_factson an embedding provider or an enabled decide conflict slot,fence_repairandcontent_repairon an embedding provider or a resolved repair model); the dry-run and applied actions reportphasesandheld_phases; the help text namesgbrain pages purge-deletedandgbrain dream.src/core/behavior-change-notice.ts: one row for the changedmaintain --safebehavior.scripts/module-size-limits.tsv: the notice file's ceiling grows by one for that row.- Docs: the
maintain.tsrow indocs/architecture/key-files/commands-4.md. - Tests:
test/maintain.test.ts: the allowlist holds no purge or paid phase; each provider holds its phase; a non-default source keeps its subset; on PGLite a page soft-deleted 100 hours ago survives--safeand no unsafe phase runs; a keyless brain with the decide conflict slot on holdsextract_facts. src/commands/enrich.ts(defaultSynthesize): thinking models get the gateway's thinking output headroom; other models keep the 2048-token cap. A thinking-model write-up can reserve up to 32000 output tokens against--max-usdper in-flight call. Test:test/enrich/thinking-cap-7564.test.ts. Reported by @mattverlaque (#7564).serializeMarkdown,edit_page's view and the timeline file splice: a body with no timeline sentinel whose own dated section would split under the bare-section fallback ends with an empty<!-- timeline -->; every other body keeps its bytes. Test:test/markdown-own-timeline-section-7738.test.ts. Reported by @mattverlaque (#7738).src/core/ai/errors.ts: "no credits remaining" is a billing phrase, and a billingerror.type/error.codedecides billing through every wrapper layer. Test:test/ai/classify-billing-credits-8400.test.ts. Reported by @Masashi-Ono0611 (#8699, #8400).src/core/ai/providers/claude-cli-language-model.ts: one content block per message over--input-format stream-json(rendered text unchanged, lone surrogates still become U+FFFD), so each turn reads the previous turn's cache. The subscription-only env scrub is unchanged. Test:test/claude-cli-prompt-cache-7352.test.ts. Reported by @spiky02plateau (#7352).src/core/cycle/extract-atoms.ts(locateQuote): folds with the shared grounding core's markup option. Test:test/cycle/extract-atoms-quote-markup-8373.test.ts. Reported by @Masashi-Ono0611 (#8373).- Legacy fence step of
extract_facts: an untyped fence write error counts inpagesFailedand halts the round withitem_error; typed refusals, a busy source lock, segmented pages and files on another host stay holds. Test:test/extract-facts-fence-failure-health-8758.test.ts(PGLite and Postgres, managed and unmanaged). Reported by @javieraldape (#8758). - Transcript discovery and
--input: an undated basename falls back to the frontmatterdate; impossible calendar days are rejected and the date window filters on the resolved date. Test:test/transcript-discovery-frontmatter-date.test.ts. Reported by @spiky02plateau (#7267). src/core/cycle/atom-source-date.ts: newtranscriptAtomSourceDate(frontmatter date, else the path date that names theatoms/<date>/folder); an undated transcript still gets none. Test:test/extract-atoms-source-date.test.ts. Reported by @spiky02plateau (#7268).- Admin dashboard: the EventSource
onerroronly sets the status fromreadyStateand no longer closes the stream;admin/distandsrc/admin-embedded.tsare rebuilt. Test:test/admin-dashboard-stream-reconnect.test.ts. Reported by @ramybarsoum (#8913). - Load throttle (
shouldProceed),rememberTTL parsing and the worker pool: see the paragraph above. Tests:test/backoff.test.ts,test/writeback-config.test.ts,test/worker-pool.test.ts. Reported by @ramybarsoum (#8913). src/core/wanted-links-store.ts(replaceWantedLinks):checked_atis-infinityonly for aslugrow whose exact page exists; anamerow getsnow(), and the existingON CONFLICTupdate re-stamps old rows on their origin's next extraction. Test:test/wanted-links.test.tsandtest/e2e/wanted-links-postgres.test.ts(topLevelSlugNameReferenceSettles: the origin is not stale after one sweep, and a row forced to-infinitysettles after one more;topLevelSlugNamePageEditWakesOnce: an edit of the top-level page lists the origin stale once and one sweep settles it). Reported by @akinduroifedayo (#9140); first fixed by @Masashi-Ono0611 (#9144) and also by @akinduroifedayo (#9149).
v0.60.678.0
2026年11月12日
Pushes from an unmanaged checkout now scan every commit they publish for secrets, not only the files they just wrote. Four gbrain pushes from a checkout that is not a managed worktree carried earlier local commits to the remote unscanned: the access-policy commit, the durability-scaffolding commit, gbrain sources push (which scanned only its own staged files, then pushed the whole branch tip, even with nothing new to commit) and the first push of gbrain bootstrap repo after the remote branch was gone (which scanned only the current tree). A credential a script committed with plain git commit, including one a later commit removed or one in a commit message, went out with them. Each now runs the range scan managed publishes use over what the remote lacks (the whole history when the remote has no such branch) and refuses publish_secret_found or publish_scan_unreadable, with nothing pushed and the local commits kept. gbrain sources push pushes the exact commit it scanned, leased on the remote tip it read, so a remote rewound in between is scanned again. An allowlist edit that gbrain sources push or gbrain bootstrap repo commits itself, after scanning it, still publishes; one a script committed is left to the user. Remoteless checkouts, managed worktrees and repo-less brains are unchanged, and the policy command's retry hint keeps --scan-secrets.
Reported and first fixed by @javieraldape (#9159).
Itemized changes
src/core/access/policy-git.ts,src/core/brain-repo-durability.ts: the policy and scaffolding commits publish withscanSecrets; a scaffolding refusal names its code in the harden step.src/core/workspace-push.ts: before the push,stagedScanPublishRefusaloverorigin/<branch>..HEAD, thengit push --force-with-lease=refs/heads/<branch>:<scanned tip> origin <sha>:refs/heads/<branch>; a local branch that does not contain the remote tip is not pushed.src/core/bootstrap/repo.ts: both first pushes scan the branch they push, with its whole history, and refuse if it moved during the scan (scanHistoryoption, a seam for runner fakes);src/commands/bootstrap.tsprints a refusal's code and next step.src/core/git/commit-push.ts: a scanned publish whose remote has no such branch yet (no tracking ref) scans the whole history and leases the push on the branch being absent, where it used to refusepublish_scan_unreadable.src/core/git/range-secret-scan.ts:stagedScanPublishRefusal, the range refusal with gate changes inworkspace_pushandbootstrapledger commits exempt, and files over the range scan's cap exempt inworkspace_pushcommits (its staged scan streams them up to 512 MiB).- Tests:
test/unmanaged-push-history-scan-8902.serial.test.ts(each path against a local bare remote: a removed credential, a credential in a commit message, clean history, a remoteless policy commit, allowlist edits, a rewound remote).
v0.60.677.0
2026年11月12日
You can now leave one source out of automatic publishing without turning off its sync. Set gbrain config set sources.auto_reconcile.source.<id> false, and neither gbrain sources git-reconcile (which autopilot runs each tick) nor gbrain sources refresh pushes that checkout's local commits. The source still syncs and fast-forwards. Before this, the only per-source switch was gbrain sources set-sync <id> off, which also stopped its sync. Nothing changes until the key is set.
src/core/persistence/worktree-refresh.ts:publishOptedOutreads the key for a worktree's members. A diverged refresh with any member off refusesrefresh_diverged, naming the key, with nothing pushed.src/commands/sources-git-reconcile.ts: a checkout with a source off reportsunpublishedwith the reason and lists the sources underpublish_off, in--dry-runtoo. A checkout only behind still fast-forwards.src/commands/sources.ts:gbrain sources statusprints the opt-out and addsauto_reconcile: falseto--json.src/core/bounded-child-exec.ts: withkillTree, a child stopped at its time limit has its descendants stopped with it. The commit-push children of git-reconcile and refresh use it, so a timed-out publish leaves no git or ssh process running into the next reconcile.src/core/config.ts: the key is registered, sogbrain config setaccepts it.- Docs:
docs/guides/live-sync.md,docs/guides/shared-checkout-git.md. - Tests:
test/reconcile-publish-opt-out-gst2250.test.ts(PGLite and Postgres): an opted-out source stays unpublished, syncs and fast-forwards while another source publishes; a managed member opted out blocks refresh's publish and sync still imports; the global key,set-sync offand a key set totruebehave as before; a hung child's grandchild is gone after the timeout.