sync: 鍚屾灞€鍩熺綉鏈€鏂颁唬鐮?(source master @ b69568e4)
This commit is contained in:
1 parent
4f7f07504a
commit
8bc8b0e082
1651 files changed
+278599
-11416
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