MCPcopy Create free account
hub / github.com/Noumena-Network/code / sendControlRequest

Function sendControlRequest

src/bridge/remoteBridgeCore.ts:810–825  ·  view source on GitHub ↗
(request: SDKControlRequest)

Source from the content-addressed store, hash-verified

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(

Callers

nothing calls this directly

Calls 3

reportStateMethod · 0.80
logForDebuggingFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected