MCPcopy
hub / github.com/codeaashu/claude-code / write

Method write

src/cli/remoteIO.ts:231–242  ·  view source on GitHub ↗

* Send output to the transport. * In bridge mode, control_request messages are always echoed to stdout so the * bridge parent can detect permission requests. Other messages are echoed only * in debug mode.

(message: StdoutMessage)

Source from the content-addressed store, hash-verified

229 * in debug mode.
230 */
231 async write(message: StdoutMessage): Promise<void> {
232 if (this.ccrClient) {
233 await this.ccrClient.writeEvent(message)
234 } else {
235 await this.transport.write(message)
236 }
237 if (this.isBridge) {
238 if (message.type === 'control_request' || this.isDebug) {
239 writeToStdout(ndjsonSafeStringify(message) + '\n')
240 }
241 }
242 }
243
244 /**
245 * Clean up connections gracefully

Callers 15

constructorMethod · 0.95
ConsoleOAuthFlowFunction · 0.45
handleSelectOptionFunction · 0.45
PassesFunction · 0.45
MCPRemoteServerMenuFunction · 0.45
copyOrWriteToFileFunction · 0.45
handleSelectFunction · 0.45
OAuthFlowStepFunction · 0.45
registerMcpAddCommandFunction · 0.45
registerMcpXaaIdpCommandFunction · 0.45
runHeadlessFunction · 0.45
runFunction · 0.45

Calls 3

ndjsonSafeStringifyFunction · 0.90
writeToStdoutFunction · 0.85
writeEventMethod · 0.80

Tested by

no test coverage detected