mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-13 08:14:58 -05:00
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:
@@ -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,
|
||||
|
||||
@@ -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],
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user