(taskId: string, id: string, data: Partial<AgentTaskRun>)
| 50 | } |
| 51 | |
| 52 | async updateRun(taskId: string, id: string, data: Partial<AgentTaskRun>): Promise<void> { |
| 53 | const runs = await this.readJsonFile<AgentTaskRun[]>(this.filename(taskId), []); |
| 54 | const idx = runs.findIndex((r) => r.id === id); |
| 55 | if (idx < 0) return; |
| 56 | Object.assign(runs[idx], data); |
| 57 | await this.writeJsonFile(this.filename(taskId), runs); |
| 58 | } |
| 59 | |
| 60 | async listRuns(taskId: string, limit = 50): Promise<AgentTaskRun[]> { |
| 61 | const runs = await this.readJsonFile<AgentTaskRun[]>(this.filename(taskId), []); |
no test coverage detected