* Build frontend tools for an agent
(agentId?: string)
| 912 | * Build frontend tools for an agent |
| 913 | */ |
| 914 | buildFrontendTools(agentId?: string): Tool[] { |
| 915 | return this._tools |
| 916 | .filter( |
| 917 | (tool) => |
| 918 | tool.available !== false && |
| 919 | (tool.available as boolean | string | undefined) !== "disabled" && |
| 920 | (!tool.agentId || tool.agentId === agentId), |
| 921 | ) |
| 922 | .map((tool) => ({ |
| 923 | name: tool.name, |
| 924 | description: tool.description ?? "", |
| 925 | parameters: createToolSchema(tool), |
| 926 | })); |
| 927 | } |
| 928 | |
| 929 | /** |
| 930 | * Create an agent error subscriber |
no test coverage detected