(cause: unknown)
| 64 | }; |
| 65 | |
| 66 | const asProtocolError = (cause: unknown): ProtocolError | undefined => { |
| 67 | const sdk = mcpClientSdkIfLoaded(); |
| 68 | if (sdk === undefined) return undefined; |
| 69 | // oxlint-disable-next-line executor/no-instanceof-tagged-error -- boundary: MCP SDK surfaces JSON-RPC protocol errors as this Error subclass |
| 70 | return cause instanceof sdk.client.ProtocolError ? cause : undefined; |
| 71 | }; |
| 72 | |
| 73 | const isUnknownToolCause = (cause: unknown, toolName: string): boolean => { |
| 74 | const sdk = mcpClientSdkIfLoaded(); |
no test coverage detected