File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments