(registry: RuntimeNodeAgentBridgeRegistry, params: unknown)
| 261 | } |
| 262 | |
| 263 | function bridgeFor(registry: RuntimeNodeAgentBridgeRegistry, params: unknown): RuntimeNodeServerProtocolAgentBridge { |
| 264 | const id = providerId(params) |
| 265 | const bridge = registry.bridges.get(id) |
| 266 | if (!bridge) throw new Error(`Agent provider ${id} is not connected in server-protocol mode`) |
| 267 | return bridge |
| 268 | } |
| 269 | |
| 270 | function requireCapability(bridge: RuntimeNodeServerProtocolAgentBridge, capability: keyof AgentProviderCapabilities): void { |
| 271 | if (!bridgeCapabilities(bridge)[capability]) { |
no test coverage detected