(tools: readonly T[], permissionContext: ToolPermissionContext)
| 260 | * before the model sees them — not just at call time. |
| 261 | */ |
| 262 | export function filterToolsByDenyRules< |
| 263 | T extends { |
| 264 | name: string |
| 265 | mcpInfo?: { serverName: string; toolName: string } |
| 266 | }, |
| 267 | >(tools: readonly T[], permissionContext: ToolPermissionContext): T[] { |
| 268 | return tools.filter(tool => !getDenyRuleForTool(permissionContext, tool)) |
| 269 | } |
| 270 | |
| 271 | export const getTools = (permissionContext: ToolPermissionContext): Tools => { |
| 272 | // Simple mode: only Bash, Read, and Edit tools |
no test coverage detected