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

Function writeWire

packages/server/test/snapshotService.unit.test.ts:156–161  ·  view source on GitHub ↗
(sessionDir: string, lines: ReadonlyArray<unknown>)

Source from the content-addressed store, hash-verified

154}
155
156async function writeWire(sessionDir: string, lines: ReadonlyArray<unknown>): Promise<void> {
157 const agentDir = join(sessionDir, 'agents', 'main');
158 await mkdir(agentDir, { recursive: true });
159 const body = lines.map((line) => JSON.stringify(line)).join('\n') + (lines.length > 0 ? '\n' : '');
160 await writeFile(join(agentDir, 'wire.jsonl'), body, 'utf-8');
161}
162
163async function writeState(sessionDir: string, meta: Record<string, unknown>): Promise<void> {
164 await mkdir(sessionDir, { recursive: true });

Callers 1

Calls 2

mkdirFunction · 0.50
writeFileFunction · 0.50

Tested by

no test coverage detected