Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
docs(train C): the fail-closed line names only slug-bound credentials
garrytand1ede09d8a66
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex b311e40ea4..d05f97a1b1 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -29,7 +29,7 @@ identifiers and attribution are available in the pre-removal Git revision- A call that sends `x-qm-actor` or an `acting_user` argument from a credential without the attest right is now refused (`actor_not_attested`) instead of reading as the credential; tokens issued before this upgrade never attest, so a QM client takes a fresh client-credentials token after it is granted.- Migration v286 adds `access_member_links`, the attest columns on access tokens and OAuth clients, and the grant type on OAuth tokens; it is database-only, so a repo-less brain gets it unchanged.- Writers never dedup, supersede or contest across member pages: `extract_facts`, capture and supersession leave member-page facts out of their candidates, so a write never learns that another member saved the same claim.-- A member's facts go only on `memory/members/<member>`, so a writer whose slug prefixes do not cover that page is refused (`permission_denied`) by `remember` and `memory_write` for that member. That covers a credential with `bound_slug_prefixes` and an agent job from `submit_agent`, which writes only under its own prefixes.+- A member's facts go only on `memory/members/<member>`, so a credential whose `bound_slug_prefixes` do not cover that page is refused (`permission_denied`) by `remember` and `memory_write` for that member.- `memory_write` binds its idempotency key to the whole batch, so a retry under the same key with more, fewer or different facts refuses (`idempotency_conflict`), and a batch with an invalid fact saves nothing.- The QM contract QM vendors is `docs/contracts/qm-memory-provider/v1.json`; the guide is `docs/guides/qm.md`.diff --git a/src/core/behavior-change-notice.ts b/src/core/behavior-change-notice.tsindex 26a2b18a27..62231d7701 100644--- a/src/core/behavior-change-notice.ts+++ b/src/core/behavior-change-notice.ts@@ -1383,7 +1383,7 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText;{ since: '0.60.543.0', id: 'folder_access_rules_gbra218', text: 'A source can now keep whole folders to named members with folder rules (`gbrain access rule add --prefix partners/alice-example/ --readers alice-example,group:team-a --source <id>`, preview then `--yes`). On a repo-less source the rules live in the database; on a git-backed source they live in `.gbrain/access.yml`, committed through `gbrain git commit-push` and applied on sync. A remote read of a page under a rule needs the caller\'s member to be listed on every rule covering it, on top of the page\'s own `readable_by`; no hatch, grant or `--as` relaxes it. Narrowing applies at once; a change that widens (removing a rule or a reader) is held until `gbrain access apply --source <id>` previews it and `--yes --expect <plan_hash>` approves it. While an apply is unfinished its prefixes read as nobody remotely (`access_policy_pending`, fixed by `gbrain access resume --source <id>`). `gbrain export` carries each source\'s applied rules under `.gbrain/`, and `gbrain import` installs them before any page (`--access-policy <source>` picks one source\'s rules from a multi-source export). Remote callers cannot write `.gbrain/` pages. Nothing changes on a source with no folder rule.' },{ since: '0.60.543.0', id: 'folder_access_scoped_role_gbra218', text: 'On Postgres, a database role that neither owns the folder access tables (`access_policy_state`, `access_rules`, `access_pending_coverage`) nor bypasses row-level security, and holds no policy that lets it read them, no longer reads them as "no rule": a page write it makes is refused with `writer_coordinator_required` (`unreadable_state`, naming the table), and its reads treat every page as under a pending folder prefix, so remote reads show nothing. The owner, a role that bypasses RLS and PGLite are unaffected; docs/ENGINES.md ("Folder access tables") lists the four policies a scoped role needs.' },{ since: '0.60.546.0', id: 'qm_attested_actor_gst359', text: 'A trusted system can now name the person a call serves: a client-credentials client the brain host grants the attest right (`gbrain auth rescope --client <id> --attest-actor qm`) sends `x-qm-actor: <canonical id>`, and each attested operation runs as the member that id is linked to (`gbrain access member link <member> --qm <id>`), never reading `visibility: private` pages; `capture`, `extract_facts`, take writes and `list_write_conflicts` are not attestable yet. A call that sends `x-qm-actor` or an `acting_user` argument without that right, for an operation outside the credential\'s `--attest-ops`, or with an id that is not 1-256 visible ASCII characters is refused (`actor_not_attested`); an id with no link to an enabled member is refused (`actor_unlinked`). Refusals carry their code in `structuredContent.error`. Every MCP server\'s `serverInfo` now includes a one-line `description`.' },- { since: '0.60.546.0', id: 'member_facts_gst359', text: 'A fact a member saves remotely (`remember` attested as a person, or from a credential bound to one member) now goes on that member\'s own page `memory/members/<member>`, created with `readable_by: [member:<id>]`, as a `visibility: private` fact with the entity kept as metadata, instead of on the entity page where every reader of the source recalled it. Only that member recalls it; it never dedups against, supersedes or contests another page\'s fact, never consolidates into a take, and keeps its readers through a fence rebuild and relink. A writer whose slug prefixes do not cover that page (a credential with `bound_slug_prefixes`, or an agent job from `submit_agent`, which writes only under its own prefixes) is refused (`permission_denied`) by `remember` and `memory_write` for a member instead of writing outside its grant. Under one attest client, hot memory, `delta` cursors, write receipts (`get_write_request`, `list_write_requests`, `cancel_write_request`, replays by `request_id`) and agent jobs (`get_agent_job`) are kept to the person they were made for: another person and the client\'s bare calls get `not_found`. `remember`, `delta`, the receipt operations, `submit_agent` and `get_agent_job` are now attestable.' },+ { since: '0.60.546.0', id: 'member_facts_gst359', text: 'A fact a member saves remotely (`remember` attested as a person, or from a credential bound to one member) now goes on that member\'s own page `memory/members/<member>`, created with `readable_by: [member:<id>]`, as a `visibility: private` fact with the entity kept as metadata, instead of on the entity page where every reader of the source recalled it. Only that member recalls it; it never dedups against, supersedes or contests another page\'s fact, never consolidates into a take, and keeps its readers through a fence rebuild and relink. A credential whose `bound_slug_prefixes` do not cover that page is refused (`permission_denied`) by `remember` and `memory_write` for a member instead of writing outside its grant. Under one attest client, hot memory, `delta` cursors, write receipts (`get_write_request`, `list_write_requests`, `cancel_write_request`, replays by `request_id`) and agent jobs (`get_agent_job`) are kept to the person they were made for: another person and the client\'s bare calls get `not_found`. `remember`, `delta`, the receipt operations, `submit_agent` and `get_agent_job` are now attestable.' },{ since: '0.60.546.0', id: 'qm_memory_provider_gst359', text: 'QM can now keep per-person memory: `memory_recall` and `memory_write`, the default attested operations of an attest client with `get_write_request` (`gbrain auth rescope --client <id> --attest-actor qm`), read the person\'s own recent facts first and then the facts they may read, and save facts on that person\'s own page `memory/members/<member>`, readable by them alone. `memory_write` needs an attested person (`actor_not_attested` reason `actor_required` otherwise), and a reused `idempotency_key` returns the first receipt for the same person only. `forget` and `forget_fact` are now attestable: for an attested person or a credential bound to a member they withdraw only a fact on that member\'s own page, and only on that page; any other fact is `not_found`. A request carrying `x-qm-audience` is refused (`actor_not_attested` reason `audience_not_supported`) until channel audiences are served. `remember` and `memory_write` accept `valid_from` only as an ISO 8601 date or time in years 0001-9999. The contract QM vendors is `docs/contracts/qm-memory-provider/v1.json`.' },{ since: '0.60.516.0', id: 'quoted_fence_marker_8059', text: 'A page that quotes a facts or takes fence marker in prose (text after the marker on its line, or a blockquote line) is now held or refused with the fence reason `quoted_marker` instead of `repeated_marker` or `unclosed_ambiguous_tail`, and `gbrain repair fences`, `gbrain repair content`, `gbrain sync unblock --apply` and the maintenance run repair it by wrapping each mention in backticks, with a receipt per file; readers count fence lines exactly as before. The edit is kept only when every fence row stays where it was and nothing the privacy boundary hid becomes visible. Existing `invalid_fence` holds are screened once more on the next sync. `forget` now locates the facts fence it rewrites with the parser\'s code-aware search, so a marker quoted in code above the fence no longer moves the rewrite.' },// #7199 (re-port of #7228). since is stamped at the merge slot.