fix(chat/sdk): block built-in Bash via disallowed_tools and resolve merge conflicts

- Add disallowed_tools=["Bash"] to SDK options so the model never tries
  the built-in Bash tool (previously it tried Bash, got blocked by the
  security hook, then fell back to bash_exec — wasting a turn)
- Resolve merge conflicts in tools/models.py (keep both HEAD additions
  and incoming BlockDetails/BlockDetailsResponse)
- Fix pyright error in find_block.py (pass categories to BlockInfoSummary)
This commit is contained in:
Zamil Majdy
2026-02-13 14:44:42 +04:00
parent cb3839198c
commit 28c1121a8f
2 changed files with 2 additions and 0 deletions

View File

@@ -537,6 +537,7 @@ async def stream_chat_completion_sdk(
"system_prompt": system_prompt,
"mcp_servers": {"copilot": mcp_server},
"allowed_tools": COPILOT_TOOL_NAMES,
"disallowed_tools": ["Bash"],
"hooks": security_hooks,
"cwd": sdk_cwd,
"max_buffer_size": config.claude_agent_max_buffer_size,

View File

@@ -146,6 +146,7 @@ class FindBlockTool(BaseTool):
id=block_id,
name=block.name,
description=block.description or "",
categories=[c.value for c in block.categories],
)
)