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

Method write

src/cli/remoteIO.ts:234–245  ·  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

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

Callers 15

constructorMethod · 0.95
fFunction · 0.45
loadSettingsFromFlagFunction · 0.45
mainFunction · 0.45
getInputPromptFunction · 0.45
runFunction · 0.45
parseChannelEntriesFunction · 0.45
resetCursorFunction · 0.45
setupFunction · 0.45
ConsoleOAuthFlowFunction · 0.45
handleSelectOptionFunction · 0.45

Calls 3

ndjsonSafeStringifyFunction · 0.90
writeEventMethod · 0.80
writeToStdoutFunction · 0.50

Tested by

no test coverage detected