Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Shorten the upgrade-notice row to fit the 2,000-character fragment limit
garrytan40d425b21466
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 617684e24a..6b214fa68f 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -28,7 +28,7 @@ identifiers and attribution are available in the pre-removal Git revision- `src/core/access/requester-scope.ts` (new): the gate, run in `dispatchToolCall` after access resolves and in every agent job tool call. Every read op and every read-scope op (`think` included) is gated unless it reads no page: `whoami`, `get_brain_identity`, `get_status_snapshot`, `search_modes`, `get_health`, the caller's own `join_brain` / `leave_brain` / `sync_brain_skills` / `request_tools`, and a non-admin credential's own `get_job` / `wait_job`. When the serves policy cannot be read it is read once more, and a second failure refuses retryably (`requester_scope_unknown`) rather than reading as one person; a bound credential is never refused that way. A connection whose reads are refused gets no `_meta.brain_hot_memory` on the calls the gate lets through (the exempt ops above and writes), so it cannot read recent facts through `whoami`.- `access.serves` is read without regard to case or surrounding spaces (`One` pins one person). `access.serves_since` is set once and never cleared, so a brain that served several people once and does again later gets no new grace. A connection counts as existing before that date only when it was created in an earlier second, so one created in the same second is refused like a later one.-- Migration v308 (number assigned at the merge slot): `reads_unscoped` on `access_tokens` and `oauth_clients`, and a trigger that keeps config `access.serves_derived` and sets `access.serves_since` once, the first time the brain serves several people, so a request reads both from its config snapshot. Disabling and re-enabling a member does not restart the grace. Nothing else is rewritten.+- Migration v309: `reads_unscoped` on `access_tokens` and `oauth_clients`, and a trigger that keeps config `access.serves_derived` and sets `access.serves_since` once, the first time the brain serves several people, so a request reads both from its config snapshot. Disabling and re-enabling a member does not restart the grace. Nothing else is rewritten.- `gbrain auth create`, `gbrain auth register-client` and the admin dashboard's key mint refuse an unbound credential on such a brain (`credential_scope_required`). `gbrain auth rescope ... --reads-unscoped --yes` (`none` removes it) is the explicit opt-out, written to the `access-reads-unscoped` audit file; `gbrain access check` reports it.- The fix every refusal, notice, `whoami` note and `gbrain access owner` hint gives for stdio is the per-harness binding, `gbrain setup claude-code|codex --stdio-member <id>`, on PGLite and Postgres alike, or a per-person key over `gbrain serve --http` for a harness several people talk to. Nothing suggests `config set mcp.stdio_member`, and no upgrade, doctor or setup path writes it.- Doctor: `unscoped_shared_reads` fails per unbound credential with its state, grace end and bind command (warns while `access.requester_scope_enforce` is false); `shared_stdio_binding` fails when `mcp.stdio_member` is set on a host where OpenClaw or Hermes is installed, with `gbrain config unset mcp.stdio_member` as its ask-first fix, and is not applicable on a brain that serves one person. `gbrain post-upgrade` lists the unbound credentials.diff --git a/src/core/behavior-change-notice.ts b/src/core/behavior-change-notice.tsindex 1b29e64e77..f4dd37b364 100644--- a/src/core/behavior-change-notice.ts+++ b/src/core/behavior-change-notice.ts@@ -1563,7 +1563,7 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText;{ since: '0.60.693.0', id: 'member_save_withdrawn_scope_gst2346', text: 'A remote `remember` onto a member\'s own page (`memory/members/<id>`) is refused `fact_withdrawn` only when that member could read what was withdrawn: a fact on its own page, its own copy withdrawn by the brain host, or for the brain owner a fact it reads. A claim withdrawn by the brain host or the owner that the member never read no longer refuses its save: the fact saves as the member\'s own active row with the same reply as a new claim. A schema migration makes the database insert guards mark a row on a member page only by that page\'s own withdrawals; a withdrawal still expires matching rows on member pages when it is made, and strikes them in the page\'s file, so an import of a member page\'s file no longer marks a row withdrawn by a withdrawal of another subject. The same holds for each item of a `remember` batch (`items`), a replay with the same `request_id`, a `replaces` and the write receipt (`get_write_request`). Trusted local saves keep the check they had.' },{ since: '0.60.694.0', id: 'owner_labels_guarded_gst2521', text: 'Labels the owner sets with `gbrain repair visibility` (or its `--readers` setter, or `gbrain repair private-labels`) now raise the page\'s label guard to operator_curated, so a later local agent write at the page\'s own tier that drops or widens them is held like a write over an owner page, with a `lower_page` item. A local write below operator_curated whose `readable_by` would leave the brain owner out of a page the owner reads now publishes with the owner kept in the readers (the rest of the narrowing applies), and its item records the requested readers. Accepting such an item (`gbrain trust confirm tp<id>`) on a page whose own tier is an agent\'s writes only the labels and keeps the agent\'s tier; on an owner page it still endorses the edit at the owner\'s tier. The guard is stored in the database (`page_label_guards`) and set only by label repairs run after the upgrade, so labels set earlier, and a managed Git brain rebuilt from a clone, start unguarded; re-running `gbrain repair visibility --slug` or `--readers` on a page that already has those labels raises the guard without changing them. The owner\'s own label writes, synced owner edits, agent narrowing that keeps the owner, and brains with `access.owner_reads_restricted` on are unchanged.' },{ since: '0.60.694.0', id: 'page_label_widening_held_gst2518', text: 'A local agent write (`put_page`, `capture`, `edit_page`, `append_page`, `revert_version`, `restore_page`) less trusted than a page that drops or widens its `visibility`, `access`, `confidentiality` or `readable_by` now publishes with the page\'s earlier labels kept, in the database and in the committed file, and its receipt lists them under `privacy_labels_kept`; so does a maintenance job\'s derived page publication, and a page whose tier is still `unknown` counts as the owner\'s. A soft delete no longer lowers the page\'s tier. Before, the page became readable to remote callers and other members at once, and only a `lower_page` item waited for the owner. That item now records the requested labels: `gbrain trust confirm tp<id>` applies them if the page has not changed since, `gbrain trust drop tp<id>` keeps the earlier ones, and undoing a confirm restores them while the page is unchanged since. Narrowing writes, label-neutral writes, writers at or above the page\'s tier, synced owner edits and `gbrain repair visibility` are unchanged.' },- { since: 'TBD', id: 'requester_scope_gst363', text: 'On a brain that serves several people (two or more enabled members, or config `access.serves = several`; a brain pinned `access.serves one` never does), a remote read through a connection bound to no member (an access token, an OAuth client, or a stdio server started without `--stdio-member` and with no `mcp.stdio_member`) is now refused with `requester_scope_required` before any work; `whoami`, `get_brain_identity`, `get_status_snapshot`, `search_modes`, `get_health` and a non-admin key\'s own `get_job` / `wait_job` still answer. A connection that existed when the brain started serving several people (config `access.serves_since`, set once, or this upgrade) reads for 14 more days with `_meta.access.requester_scope` naming the date and the fix; one created later is refused at once. Bind each connection to the person it serves: `gbrain auth rescope --token <name>|--client <id> --member <id>`; a stdio harness only one person uses, `gbrain setup claude-code|codex --stdio-member <id>` (that one harness entry, PGLite or Postgres); a harness several people talk to, one `--member` key per person over `gbrain serve --http`. A shared agent names the person per call (`--may-act-for`), and `--reads-unscoped --yes` marks one credential to read unscoped on purpose. `gbrain auth create` and `gbrain auth register-client` refuse an unbound credential on such a brain (`credential_scope_required`); `gbrain doctor` fails `unscoped_shared_reads` per unbound credential and `gbrain post-upgrade` lists them. `gbrain doctor` also fails `shared_stdio_binding` when `mcp.stdio_member` is set on a host where OpenClaw or Hermes is installed (fix: `gbrain config unset mcp.stdio_member`); a `hermes` on PATH now counts as Hermes only when it is a script, so React Native\'s compiled `hermes` no longer blocks `--stdio-member`. Hosted brains set `access.requester_scope_enforce false`, which turns every refusal into the notice. Member-bound credentials (the owner\'s included), attested calls, a one-person brain with any number of sources and the local CLI see no change; writes are not affected.' },+ { since: 'TBD', id: 'requester_scope_gst363', text: 'On a brain that serves several people (two or more enabled members, or config `access.serves = several`; a brain pinned `access.serves one` never does), a remote read through a connection bound to no member (an access token, an OAuth client, or a stdio server with no member binding) is now refused with `requester_scope_required` before any work; `whoami`, `get_brain_identity`, `get_status_snapshot`, `search_modes`, `get_health` and a non-admin key\'s own `get_job` / `wait_job` still answer. A connection that existed when the brain started serving several people (config `access.serves_since`, set once, or this upgrade) reads for 14 more days with `_meta.access.requester_scope` naming the date and the fix; one created later is refused at once. Bind each connection to the person it serves: `gbrain auth rescope --token <name>|--client <id> --member <id>`; a stdio harness only one person uses, `gbrain setup claude-code|codex --stdio-member <id>`; a harness several people talk to, one `--member` key per person over `gbrain serve --http`. A shared agent names the person per call (`--may-act-for`), and `--reads-unscoped --yes` marks one credential to read unscoped on purpose. `gbrain auth create` and `gbrain auth register-client` refuse an unbound credential on such a brain (`credential_scope_required`); `gbrain doctor` fails `unscoped_shared_reads` per unbound credential and `gbrain post-upgrade` lists them. `gbrain doctor` also fails `shared_stdio_binding` when `mcp.stdio_member` is set on a host where OpenClaw or Hermes is installed and the brain serves several people; a `hermes` on PATH counts as Hermes only when it is a script. Hosted brains set `access.requester_scope_enforce false`, which turns every refusal into the notice. Member-bound credentials (the owner\'s included), attested calls, a one-person brain and the local CLI see no change; writes are not affected.' },];/** The newest disclosed change's release: the notice id moves only when a release adds rows. */