(cause: unknown)
| 181 | }; |
| 182 | |
| 183 | const asProtocolError = (cause: unknown): ProtocolError | undefined => { |
| 184 | const sdk = mcpClientSdkIfLoaded(); |
| 185 | if (sdk === undefined) return undefined; |
| 186 | // oxlint-disable-next-line executor/no-instanceof-tagged-error -- boundary: MCP SDK surfaces JSON-RPC protocol errors as this Error subclass |
| 187 | return cause instanceof sdk.client.ProtocolError ? cause : undefined; |
| 188 | }; |
| 189 | |
| 190 | const isUnknownToolCause = (cause: unknown, toolName: string): boolean => { |
| 191 | const sdk = mcpClientSdkIfLoaded(); |
no test coverage detected