MCPcopy Create free account
hub / github.com/ConsortiumAI/Consortium / request

Method request

packages/consortium-cli/src/claude/sdk/query.ts:115–129  ·  view source on GitHub ↗
(request: ControlRequest, childStdin: Writable)

Source from the content-addressed store, hash-verified

113 }
114
115 private request(request: ControlRequest, childStdin: Writable): Promise<SDKControlResponse['response']> {
116 const requestId = Math.random().toString(36).substring(2, 15)
117 const sdkRequest: SDKControlRequest = {
118 request_id: requestId,
119 type: 'control_request',
120 request
121 }
122 return new Promise((resolve, reject) => {
123 this.pendingControlResponses.set(requestId, (response) => {
124 if (response.subtype === 'success') resolve(response)
125 else reject(new Error(response.error))
126 })
127 childStdin.write(JSON.stringify(sdkRequest) + '\n')
128 })
129 }
130
131 private async handleControlRequest(request: CanUseToolControlRequest): Promise<void> {
132 if (!this.childStdin) return

Callers 1

interruptMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected