MCPcopy
hub / github.com/colbymchenry/codegraph / trackInflight

Function trackInflight

src/mcp/proxy.ts:231–238  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

229 // in-process so the host always gets a reply.
230 const inflight = new Map<unknown, string>();
231 const trackInflight = (line: string): void => {
232 try {
233 const m = JSON.parse(line) as JsonRpc;
234 if (m && m.id !== undefined && typeof m.method === 'string' && m.method !== 'initialize') {
235 inflight.set(m.id, line);
236 }
237 } catch { /* unparseable — nothing we could re-serve anyway */ }
238 };
239
240 const writeClient = (obj: JsonRpc | string): void => {
241 try { process.stdout.write((typeof obj === 'string' ? obj : JSON.stringify(obj)) + '\n'); } catch { /* host gone */ }

Callers 2

routeToDaemonFunction · 0.85
runLocalHandshakeProxyFunction · 0.85

Calls 1

setMethod · 0.80

Tested by

no test coverage detected