fix: skill memory keys breaking unrestricted node permissions
Only extend read_keys/write_keys with skill memory keys when the list was already non-empty (restricted). An empty list means "allow all" — adding _-prefixed skill keys to an empty list accidentally activated the permission check and blocked legitimate reads.
This commit is contained in:
@@ -1831,16 +1831,18 @@ class GraphExecutor:
|
||||
# unchanged — empty means "allow all".
|
||||
read_keys = list(node_spec.input_keys)
|
||||
write_keys = list(node_spec.output_keys)
|
||||
# Only extend lists that were already restricted (non-empty).
|
||||
# Empty means "allow all" — adding keys would accidentally
|
||||
# activate the permission check and block legitimate reads/writes.
|
||||
if read_keys or write_keys:
|
||||
from framework.skills.defaults import SHARED_MEMORY_KEYS as _skill_keys
|
||||
|
||||
# Also include any _-prefixed keys already written to memory
|
||||
existing_underscore = [k for k in memory._data if k.startswith("_")]
|
||||
extra_keys = set(_skill_keys) | set(existing_underscore)
|
||||
for k in extra_keys:
|
||||
if k not in read_keys:
|
||||
if read_keys and k not in read_keys:
|
||||
read_keys.append(k)
|
||||
if k not in write_keys:
|
||||
if write_keys and k not in write_keys:
|
||||
write_keys.append(k)
|
||||
|
||||
scoped_memory = memory.with_permissions(
|
||||
|
||||
Reference in New Issue
Block a user