Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Spell out --scopes read in the owner opt-out command, since a token minted without it gets full access
garrytan8d118e0ecb38
diff --git a/behavior-changes.d/owner_remote_private_writes_gst2091.md b/behavior-changes.d/owner_remote_private_writes_gst2091.mdindex a197f7fd09..d925d2e518 100644--- a/behavior-changes.d/owner_remote_private_writes_gst2091.md+++ b/behavior-changes.d/owner_remote_private_writes_gst2091.md@@ -1 +1 @@-The brain owner's own remote agents can now change private pages. A credential bound to the brain owner (gbrain access owner set) that has write scope and speaks for itself (no audience, not an attested call, not a subagent job, no slug fence) may rewrite, edit, append to and relabel a page marked visibility: private that it already reads, through put_page, edit_page and append_page, and through put_pages and staged uploads (begin_page_upload and commit_page_upload), which write the same pages; before, these writes answered page_not_found. A put_page that leaves out visibility or readable_by keeps the stored ones, an empty visibility counts as left out, and a page private only through a privacy alias, a pinned question, a derived type or a private origin is saved as visibility: private (a pinned question keeps its marker) by any of these writes that states no visibility; the change is recorded under the owner's credential. Everyone else is refused exactly as before: other members, unbound tokens and OAuth clients, attested calls, the owner's credential asserting a shared room, the owner's credential without write scope, and any write to a page whose readable_by or folder rule leaves the owner out. delete_page on a private page, and any write to a soft-deleted private page, stays refused, and a credential fenced to slug prefixes, even after the write was submitted, gets no owner widening. An owner who does not want an agent to change private pages gives that agent a credential without write scope (gbrain auth create <name> --member <owner> with read scope only), or binds it to its own member instead of the owner.+The brain owner's own remote agents can now change private pages. A credential bound to the brain owner (gbrain access owner set) that has write scope and speaks for itself (no audience, not an attested call, not a subagent job, no slug fence) may rewrite, edit, append to and relabel a page marked visibility: private that it already reads, through put_page, edit_page and append_page, and through put_pages and staged uploads (begin_page_upload and commit_page_upload), which write the same pages; before, these writes answered page_not_found. A put_page that leaves out visibility or readable_by keeps the stored ones, an empty visibility counts as left out, and a page private only through a privacy alias, a pinned question, a derived type or a private origin is saved as visibility: private (a pinned question keeps its marker) by any of these writes that states no visibility; the change is recorded under the owner's credential. Everyone else is refused exactly as before: other members, unbound tokens and OAuth clients, attested calls, the owner's credential asserting a shared room, the owner's credential without write scope, and any write to a page whose readable_by or folder rule leaves the owner out. delete_page on a private page, and any write to a soft-deleted private page, stays refused, and a credential fenced to slug prefixes, even after the write was submitted, gets no owner widening. An owner who does not want an agent to change private pages gives that agent a credential without write scope (gbrain auth create <name> --member <owner> --scopes read; without --scopes the token gets full access), or binds it to its own member instead of the owner.diff --git a/docs/guides/access-designations.md b/docs/guides/access-designations.mdindex 665c5dac75..d9f72b843f 100644--- a/docs/guides/access-designations.md+++ b/docs/guides/access-designations.md@@ -205,7 +205,7 @@ page private only by a privacy alias, a pinned question, a derived type or a pri`visibility: private` by any of these writes that states no visibility, and a pinned question keeps its`pinned_question`. The revision and the journaled request (`ownerWrite`) name the owner's credential. Readers lists andfolder rules that leave the owner out still refuse it, a soft-deleted private page stays refused, and every other caller-is refused as before; to keep an owner agent from changing private pages, give it a credential without write scope.+is refused as before; to keep an owner agent from changing private pages, give it a credential without write scope (`gbrain auth create <name> --member <owner> --scopes read`; without `--scopes` the token gets full access).**The owner opt-in.** `gbrain access owner reads-restricted on` (config `access.owner_reads_restricted`, off bydefault and unchanged on upgrade) lets the owner's credentials read the pages that `readable_by` lists, folder rules