fix: 会商席位与总控角色隔离,编排能力只归总控
This commit is contained in:
1 parent
ff80cc110d
commit
3384f2e51c
10 files changed
+488
-125
No files matched your search
@@ -1474,7 +1474,7 @@ def grep_tool(
|
||||
|
||||
|
||||
@tool("read_file", parse_docstring=True)
|
||||
def read_file_tool(
|
||||
def read_file_tool(
|
||||
runtime: ToolRuntime[ContextT, ThreadState],
|
||||
description: str,
|
||||
path: str,
|
||||
@@ -1488,12 +1488,21 @@ def read_file_tool(
|
||||
path: The **absolute** path to the file to read.
|
||||
start_line: Optional starting line number (1-indexed, inclusive). Use with end_line to read a specific range.
|
||||
end_line: Optional ending line number (1-indexed, inclusive). Use with start_line to read a specific range.
|
||||
"""
|
||||
try:
|
||||
sandbox = ensure_sandbox_initialized(runtime)
|
||||
ensure_thread_directories_exist(runtime)
|
||||
requested_path = path
|
||||
if is_local_sandbox(runtime):
|
||||
"""
|
||||
try:
|
||||
requested_path = path
|
||||
if _is_skills_path(requested_path):
|
||||
from deerflow.tools.builtins.skill_tools import (
|
||||
_resolve_active_agent_id,
|
||||
is_coordinator_only_skill_path,
|
||||
)
|
||||
|
||||
if is_coordinator_only_skill_path(requested_path) and _resolve_active_agent_id(runtime) != "roundtable-coordinator":
|
||||
# Match skill_view's non-leaking behavior: ordinary agents must not discover whether it exists.
|
||||
return f"Error: File not found: {requested_path}"
|
||||
sandbox = ensure_sandbox_initialized(runtime)
|
||||
ensure_thread_directories_exist(runtime)
|
||||
if is_local_sandbox(runtime):
|
||||
thread_data = get_thread_data(runtime)
|
||||
validate_local_tool_path(path, thread_data, read_only=True)
|
||||
if _is_skills_path(path):
|
||||
|
||||
Reference in new issue
Block a user