MCPcopy Create free account
hub / github.com/MemTensor/MemOS / writeLine

Function writeLine

apps/memos-local-plugin/bridge/stdio.ts:124–134  ·  view source on GitHub ↗
(obj: unknown)

Source from the content-addressed store, hash-verified

122 }
123
124 function writeLine(obj: unknown): void {
125 try {
126 stdout.write(JSON.stringify(obj) + "\n");
127 } catch (err) {
128 if (logToStderr) {
129 process.stderr.write(
130 `bridge.stdio.write.err: ${err instanceof Error ? err.message : String(err)}\n`,
131 );
132 }
133 }
134 }
135
136 function writeNotification<P>(method: string, params: P): void {
137 writeLine({ jsonrpc: "2.0", method, params });

Callers 3

writeNotificationFunction · 0.85
handleLineFunction · 0.85
serverRequestFunction · 0.85

Calls 1

writeMethod · 0.65

Tested by

no test coverage detected