(bridge: RuntimeNodeServerProtocolAgentBridge, capability: keyof AgentProviderCapabilities)
| 268 | } |
| 269 | |
| 270 | function requireCapability(bridge: RuntimeNodeServerProtocolAgentBridge, capability: keyof AgentProviderCapabilities): void { |
| 271 | if (!bridgeCapabilities(bridge)[capability]) { |
| 272 | throw new RuntimeHandlerError("unsupported_capability", `Agent provider ${bridge.providerId} does not support ${capability}`) |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | function requireRequestId(params: unknown): RuntimeRequestId { |
| 277 | const value = asRecord(params).requestId |
no test coverage detected