Skip to content

Commit 911031c

Browse files
eightHundredsclaude
andcommitted
chore: restore original comments removed during refactor
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0d712c3 commit 911031c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/scopes.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,12 @@ export class MemoryScopeManager implements ScopeManager {
277277

278278
getAccessibleScopes(agentId?: string): string[] {
279279
if (isSystemBypassId(agentId) || !agentId) {
280+
// Keep enumeration semantics consistent for callers that inspect the list.
281+
// This enumerates registered scopes, not every valid built-in pattern.
280282
return this.getAllScopes();
281283
}
282284

285+
// Explicit ACLs still inherit the agent's own reflection scope.
283286
const normalizedAgentId = agentId.trim();
284287
const explicitAccess = this.config.agentAccess[normalizedAgentId];
285288
if (explicitAccess) {
@@ -308,6 +311,9 @@ export class MemoryScopeManager implements ScopeManager {
308311
*/
309312
getScopeFilter(agentId?: string): string[] | undefined {
310313
if (!agentId || isSystemBypassId(agentId)) {
314+
// No agent specified or internal system tasks bypass store-level scope
315+
// filtering entirely. This aligns with isAccessible(scope, undefined)
316+
// which also uses bypass semantics for missing agentId.
311317
return undefined;
312318
}
313319
return this.getAccessibleScopes(agentId);

0 commit comments

Comments
 (0)