( sessionDir: string, state: Record<string, unknown>, )
| 25 | } |
| 26 | |
| 27 | async function writeSessionState( |
| 28 | sessionDir: string, |
| 29 | state: Record<string, unknown>, |
| 30 | ): Promise<void> { |
| 31 | await writeFile(join(sessionDir, 'state.json'), `${JSON.stringify(state, null, 2)}\n`, 'utf-8'); |
| 32 | } |
| 33 | |
| 34 | async function readSessionState(sessionDir: string): Promise<Record<string, unknown>> { |
| 35 | const raw = await readFile(join(sessionDir, 'state.json'), 'utf-8'); |
no test coverage detected