Minimal ToolManager stub.
| 27 | |
| 28 | |
| 29 | class FakeToolManager: |
| 30 | """Minimal ToolManager stub.""" |
| 31 | |
| 32 | def __init__(self, tool_names: list[str] | None = None): |
| 33 | self._tool_names = tool_names or ["read_file", "write_file"] |
| 34 | |
| 35 | async def get_all_tools(self) -> list[FakeToolInfo]: |
| 36 | return [FakeToolInfo(name=n) for n in self._tool_names] |
| 37 | |
| 38 | async def get_adapted_tools_for_llm(self, provider: str) -> tuple[list[dict], dict]: |
| 39 | tools = [ |
| 40 | { |
| 41 | "type": "function", |
| 42 | "function": { |
| 43 | "name": n, |
| 44 | "description": f"Tool: {n}", |
| 45 | "parameters": { |
| 46 | "type": "object", |
| 47 | "properties": { |
| 48 | "path": {"type": "string", "description": "File path"} |
| 49 | }, |
| 50 | "required": ["path"], |
| 51 | }, |
| 52 | }, |
| 53 | } |
| 54 | for n in self._tool_names |
| 55 | ] |
| 56 | return tools, {} |
| 57 | |
| 58 | |
| 59 | class FakePlanningContext: |