MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / trackInflight

Function trackInflight

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

Source from the content-addressed store, hash-verified

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

Tested by

no test coverage detected