Repository navigation
v0.60.684.0
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.