(sessionDir: string, lines: ReadonlyArray<unknown>)
| 154 | } |
| 155 | |
| 156 | async 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 | |
| 163 | async function writeState(sessionDir: string, meta: Record<string, unknown>): Promise<void> { |
| 164 | await mkdir(sessionDir, { recursive: true }); |
no test coverage detected