( id: string, owner: string, )
| 135 | } |
| 136 | |
| 137 | export async function getRun( |
| 138 | id: string, |
| 139 | owner: string, |
| 140 | ): Promise<AgentRun | null> { |
| 141 | await ensureTable(); |
| 142 | const client = getDbExec(); |
| 143 | const { rows } = await client.execute({ |
| 144 | sql: `SELECT * FROM progress_runs WHERE id = ? AND owner = ?`, |
| 145 | args: [id, owner], |
| 146 | }); |
| 147 | if (rows.length === 0) return null; |
| 148 | return parseRow(rows[0] as Record<string, unknown>); |
| 149 | } |
| 150 | |
| 151 | export async function updateRun( |
| 152 | id: string, |
no test coverage detected