MCPcopy Index your code
hub / github.com/Noumena-Network/code / write

Method write

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

376 * in debug mode.
377 */
378 async write(message: StdoutMessage): Promise<void> {
379 if (this.ccrClient) {
380 await this.ccrClient.writeEvent(message)
381 } else {
382 await this.transport.write(message)
383 }
384 if (this.isBridge) {
385 if (message.type === 'control_request' || this.isDebug) {
386 writeToStdout(ndjsonSafeStringify(message) + '\n')
387 }
388 }
389 }
390
391 /**
392 * 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