Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(grants): name no #7812 commands before they exist

garrytane3d37936c1b5
diff --git a/docs/mcp/ADMIN.md b/docs/mcp/ADMIN.md
index d662fbe1dc..130f0efed0 100644
--- a/docs/mcp/ADMIN.md
+++ b/docs/mcp/ADMIN.md
@@ -427,8 +427,7 @@ Fix it with today's commands:
recall, list_pages or any read without it reads the token's full grant.
The fix is a member-bound or rescoped token (`gbrain auth rescope …`).
-Per-member keys (`gbrain access member add <id>`, then
-`gbrain auth create <name> --member <id>`) arrive with gbrain#7812.
+Per-member keys arrive with gbrain#7812.
## Dashboard API keys
diff --git a/src/core/grants/shared-exposure.ts b/src/core/grants/shared-exposure.ts
index 5ae6b06fb9..d97b8083dd 100644
--- a/src/core/grants/shared-exposure.ts
+++ b/src/core/grants/shared-exposure.ts
@@ -177,7 +177,7 @@ export function remedyText(s: ExposureSubject, census?: ChatCensus | null): stri
steps.push(`the chat sits in one source (${census!.chat_sources[0]}), so a source grant cannot separate it`);
}
steps.push('mark pages nobody else may see visibility: private (hidden from every remote caller while search.remote_private_pages stays off)');
- return `Fix: ${steps.join('; ')}. source_ids narrows only the call that sends it, so recall, list_pages or any read without it reads the token's full grant; the fix is ${splitBySource(census) ? 'a member-bound or rescoped token (gbrain auth rescope …)' : 'a member-bound token'}, not per-call narrowing. Per-member keys (gbrain access member add <id>, then gbrain auth create <name> --member <id>) arrive with gbrain#7812 and are not in this version.`;
+ return `Fix: ${steps.join('; ')}. source_ids narrows only the call that sends it, so recall, list_pages or any read without it reads the token's full grant; the fix is ${splitBySource(census) ? 'a member-bound or rescoped token (gbrain auth rescope …)' : 'a member-bound token'}, not per-call narrowing. Per-member keys arrive with gbrain#7812 and are not in this version.`;
}
export function exposureFix(s: ExposureSubject, census?: ChatCensus | null): Action {
diff --git a/test/shared-exposure.test.ts b/test/shared-exposure.test.ts
index 5bd2470364..0ffc85e3a4 100644
--- a/test/shared-exposure.test.ts
+++ b/test/shared-exposure.test.ts
@@ -149,7 +149,8 @@ describe('signals and the warning', () => {
expect(n.why).toContain('visibility: private');
expect(n.why).toContain('source_ids narrows only the call that sends it, so recall, list_pages or any read without it reads the token\'s full grant');
expect(n.why).not.toContain('narrow single calls');
- expect(n.why).toContain('gbrain auth create <name> --member <id>) arrive with gbrain#7812');
+ expect(n.why).toContain('Per-member keys arrive with gbrain#7812 and are not in this version.');
+ expect(n.why).not.toContain('gbrain access');
expect(n.user_message).toBe(n.fix!.user_message);
}
const bot = sharedTokenNotice({ kind: 'stdio', harness: 'hermes' }, { harness: 'hermes' })!;