sync update from LAN repo (source dhk-1 @ 3e87be55)
This commit is contained in:
1 parent
ab6068a7c1
commit
42f2a26fa8
1482 files changed
+227759
-9584
No files matched your search
@@ -206,11 +206,18 @@ def _filter_tools(
|
||||
# Apply allowlist if specified
|
||||
if allowed is not None:
|
||||
allowed_set = set(allowed)
|
||||
# begin_write_file is an internal transport companion rather than a
|
||||
# separately granted capability. A subagent allowed to write files
|
||||
# needs it only when its selected model opts into the text bridge.
|
||||
if "write_file" in allowed_set:
|
||||
allowed_set.add("begin_write_file")
|
||||
filtered = [t for t in filtered if t.name in allowed_set]
|
||||
|
||||
# Apply denylist
|
||||
if disallowed is not None:
|
||||
disallowed_set = set(disallowed)
|
||||
if "write_file" in disallowed_set:
|
||||
disallowed_set.add("begin_write_file")
|
||||
filtered = [t for t in filtered if t.name not in disallowed_set]
|
||||
|
||||
return filtered
|
||||
|
||||
Reference in new issue
Block a user