MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / request

Function request

apps/kimi-code/test/utils/kimi-datasource-plugin.test.ts:435–446  ·  view source on GitHub ↗
(method: string, params: unknown)

Source from the content-addressed store, hash-verified

433
434 return {
435 request(method: string, params: unknown): Promise<JsonRpcResponse> {
436 const id = nextId++;
437 const payload = `${JSON.stringify({ jsonrpc: '2.0', id, method, params })}\n`;
438 return new Promise((resolve, reject) => {
439 const timeout = setTimeout(() => {
440 pending.delete(id);
441 reject(new Error(`Timed out waiting for MCP response ${id}. stderr: ${stderr.join('')}`));
442 }, 5_000);
443 pending.set(id, { resolve, reject, timeout });
444 child.stdin.write(payload);
445 });
446 },
447 };
448}
449

Callers

nothing calls this directly

Calls 4

rejectFunction · 0.85
deleteMethod · 0.65
setMethod · 0.65
writeMethod · 0.65

Tested by

no test coverage detected