(request: SDKControlRequest)
| 808 | void transport.writeBatch(events) |
| 809 | }, |
| 810 | sendControlRequest(request: SDKControlRequest) { |
| 811 | if (authRecoveryInFlight) { |
| 812 | logForDebugging( |
| 813 | `[remote-bridge] Dropping control_request during 401 recovery: ${request.request_id}`, |
| 814 | ) |
| 815 | return |
| 816 | } |
| 817 | const event = { ...request, session_id: sessionId } |
| 818 | if (request.request.subtype === 'can_use_tool') { |
| 819 | transport.reportState('requires_action') |
| 820 | } |
| 821 | void transport.write(event) |
| 822 | logForDebugging( |
| 823 | `[remote-bridge] Sent control_request request_id=${request.request_id}`, |
| 824 | ) |
| 825 | }, |
| 826 | sendControlResponse(response: SDKControlResponse) { |
| 827 | if (authRecoveryInFlight) { |
| 828 | logForDebugging( |
nothing calls this directly
no test coverage detected