setTurnCheckpointRef(turnId: string, ref: string): Promise<void> {
const db = await this._ensureDb();
await dbRun(db, 'INSERT OR IGNORE INTO turns (id) VALUES (?)', [turnId]);
await dbRun(db, 'UPDATE turns SET checkpoint_ref = ? WHERE id = ?', [ref, turnId]);
});
}
async getTurnCheckpointRef(turnId: string): Promise<string | undefined> {