Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Mark only audience members in access member list, keeping the person rows as before

garrytan988a8b327400
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 87954c1046..414fb72b8f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,7 +20,7 @@ identifiers and attribution are available in the pre-removal Git revision
- Migration v305 (`src/core/schema-migrations/v305-access-lineage-designs.ts`): `access_rules.covers_derived` (default true), `access_members.kind` (`person` | `audience`, default `person`), the SQL function `gbrain_access_lineage_rules()`, and new versions of `gbrain_access_origin_restricted()`, `gbrain_access_origin_closed_for()` (10 arguments) and `gbrain_access_origin_hidden_for()` (9 arguments); the v304 signatures stay as wrappers. Nothing is rewritten, and every existing rule keeps its digest.
- Raw-only rules: `src/core/access/folder-rules.ts` (`covers_derived: false` in `access.yml`, the held widening `derived_released` and the narrowing `derived_covered`), `src/core/access/policy.ts` (stored, compared and previewed with `lineage` in `gbrain access apply`), `src/commands/access-rules.ts` (`rule add --raw-only`).
-- Audience members: `src/core/access/members.ts` (`setMemberKind`, `member add --kind`, refused for remote callers with `permission_denied`), `src/core/search/private-visibility.ts` (the owner's read of an audience member page, its versions, derived pages and facts), `gbrain access member kind <id> person|audience`; `member list` shows the kind.
+- Audience members: `src/core/access/members.ts` (`setMemberKind`, `member add --kind`, refused for remote callers with `permission_denied`), `src/core/search/private-visibility.ts` (the owner's read of an audience member page, its versions, derived pages and facts), `gbrain access member kind <id> person|audience`; `member list` marks audience members.
- Member lineage: config `access.members_read_lineage` (`src/core/access/lineage.ts`, `gbrain access members-read-lineage [on|off]`, refused for remote callers); `src/core/access/caller.ts` and `src/cli/as-preview.ts` give it to a member speaking for itself, never to an audience of several or an unbound credential (an unbound `granted_sources` token included), while a member-bound `granted_sources` token gets its member's lineage; `whoami` adds `members_read_lineage` while it is on.
- `src/cli/enforced-member.ts`: the enforced member CLI's output guard judges slugs under the record the read ran under, so with member lineage on it no longer withholds output naming a derived page the member reads.
- The semantic cache key (`src/core/search/mode.ts`) and the per-caller key (`src/core/access/member-facts.ts`) carry the member lineage and the owner's audience members.
diff --git a/docs/guides/access-designations.md b/docs/guides/access-designations.md
index fd7abb7eca..bfc8ca0257 100644
--- a/docs/guides/access-designations.md
+++ b/docs/guides/access-designations.md
@@ -203,7 +203,7 @@ pages and its facts as if the page named the owner, with or without the owner op
the opt-in is on. Only that page: a page that lists the audience in `readable_by` stays under the usual rules (the
owner opt-in opens it), and a person member's member page stays closed to the owner. Nothing changes for any other
caller, and no write widens. Only the brain operator on the brain host sets a kind; a remote caller is refused
-(`permission_denied`). `gbrain access member list` shows each member's kind, `who-can-read` lists the owner on such a
+(`permission_denied`). `gbrain access member list` marks each audience member, `who-can-read` lists the owner on such a
page, and doctor's `access_audience_members` lists the audience members.
### Members read lineage (`gbrain access members-read-lineage`)
diff --git a/src/commands/access.ts b/src/commands/access.ts
index 036c4911bb..5565aa8b24 100644
--- a/src/commands/access.ts
+++ b/src/commands/access.ts
@@ -135,7 +135,7 @@ function positionals(args: string[]): string[] {
}
function memberLine(m: MemberRecord): string {
- return ` ${m.id}${m.display_name ? ` (${m.display_name})` : ''} ${m.status} ${m.kind}${m.email ? ` email: ${m.email}` : ''}${m.groups.length ? ` groups: ${m.groups.join(', ')}` : ''}`;
+ return ` ${m.id}${m.display_name ? ` (${m.display_name})` : ''} ${m.status}${m.kind === 'audience' ? ' audience' : ''}${m.email ? ` email: ${m.email}` : ''}${m.groups.length ? ` groups: ${m.groups.join(', ')}` : ''}`;
}
export interface WhoCanReadEntry {