({ scope, maxSteps, startRank } = {})
| 57 | |
| 58 | /** Construct the mutable, serializable run record broadcast to the canvas. */ |
| 59 | export function makeRun({ scope, maxSteps, startRank } = {}) { |
| 60 | return { |
| 61 | running: true, |
| 62 | cancelled: false, |
| 63 | scope: scope === "all" ? "all" : "phase", |
| 64 | maxSteps: maxSteps || AUTOPILOT_MAX_STEPS, |
| 65 | startRank: startRank == null ? null : startRank, |
| 66 | status: "running", |
| 67 | current: null, |
| 68 | completed: [], |
| 69 | startedAt: Date.now(), |
| 70 | finishedAt: null, |
| 71 | }; |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Drive the run to completion. Mutates `run` in place and calls |
no outgoing calls
no test coverage detected