| | @@ -64,6 +64,7 @@ |
| 64 | 64 | "POST /repos/{owner}/{repo}/diffinery/tasks/{number}/retry": { scope: "write", sessionOnly: true }, |
| 65 | 65 | "POST /repos/{owner}/{repo}/diffinery/tasks/{number}/plan/approve": { scope: "write", sessionOnly: true }, |
| 66 | 66 | "POST /repos/{owner}/{repo}/diffinery/tasks/{number}/attempts/{attempt}/pick": { scope: "write", sessionOnly: true }, |
| 67 | + "PATCH /repos/{owner}/{repo}/diffinery/tasks/{number}": { scope: "write", sessionOnly: true }, |
| 67 | 68 | "POST /repos/{owner}/{repo}/diffinery/tasks/{number}/plan/split": { scope: "write", sessionOnly: true }, |
| 68 | 69 | "POST /repos/{owner}/{repo}/diffinery/project/posts": { scope: "write", sessionOnly: true }, |
| 69 | 70 | "PUT /repos/{owner}/{repo}/diffinery/project/memory": { scope: "write", sessionOnly: true }, |
| | @@ -1448,6 +1449,8 @@ |
| 1448 | 1449 | base: ["string", "Branch to start from (default: the default branch)."], |
| 1449 | 1450 | plan_first: ["boolean", "`true` to plan in a read-only sandbox before building, `false` to build at once. Left out, the project's default; a project that requires plans ignores `false`. See /docs/agents/tasks#plan-first."], |
| 1450 | 1451 | attempts: ["integer", "1 (default) to 4: run the first build as that many attempts side by side, then pick one (422 above 1 for a task on a pull request's branch). See /docs/agents/tasks#best-of-n."], |
| 1452 | + fix_checks: ["boolean", "Start a fix run when the pull request's checks fail (default `true`, `false` for a task on a pull request's branch). See /docs/agents/tasks#verify-and-land."], |
| 1453 | + land: ["boolean", "Turn on auto-merge for its pull request as the task's agent, so it merges once approved and checks pass (default `false`)."], |
| 1451 | 1454 | command: ["string", "For `custom`: the shell command to run."], |
| 1452 | 1455 | }, |
| 1453 | 1456 | }, |
| | @@ -1518,9 +1521,15 @@ |
| 1518 | 1521 | }, |
| 1519 | 1522 | "GET /repos/{owner}/{repo}/diffinery/tasks/{number}": { |
| 1520 | 1523 | summary: "Get an agent task", |
| 1521 | | - description: "The task, its runs and its pull request. Needs write access. A plan-first task also has `plan_state` (`planning`, `waiting`, `approved` or `split`) and `plan`; a task split from a plan has `parent_task`. A task with more than one attempt has `pick_state` (`running`, `waiting` or `picked`) and `picked_attempt`, and each run its `attempt`.", |
| 1524 | + description: "The task, its runs and its pull request. Needs write access. A plan-first task also has `plan_state` (`planning`, `waiting`, `approved` or `split`) and `plan`; a task split from a plan has `parent_task`. A task with more than one attempt has `pick_state` (`running`, `waiting` or `picked`) and `picked_attempt`, and each run its `attempt`. Every task has `fix_checks`, `check_fixes` (fix runs started so far) and `land`.", |
| 1522 | 1525 | access: "write", |
| 1523 | 1526 | }, |
| 1527 | + "PATCH /repos/{owner}/{repo}/diffinery/tasks/{number}": { |
| 1528 | + summary: "Change a task's options", |
| 1529 | + description: "From a browser session only, by the person who started the task. `fix_checks` starts a fix run when its pull request's checks fail (one per commit, at most 3 per task); turning `land` on turns on auto-merge for an open pull request as the task's agent, under the usual rules for agents. 422 when a value isn't `true` or `false`; 409 `only agent tasks have these options` for an agent review. Audited as `task.options`. See /docs/agents/tasks#verify-and-land.", |
| 1530 | + access: "write", |
| 1531 | + body: { fix_checks: ["boolean", "Fix failing checks."], land: ["boolean", "Land when approved."] }, |
| 1532 | + }, |
| 1524 | 1533 | "GET /repos/{owner}/{repo}/diffinery/tasks/{number}/attempts": { |
| 1525 | 1534 | summary: "Compare a task's attempts", |
| 1526 | 1535 | description: "Needs write access. One entry per attempt of a best-of-N task: `attempt`, `run`, `state`, `error`, `branch`, `head_sha`, `changes` (`files`, `additions`, `deletions`), `checks` and `failing_checks` on its branch, `model_requests`, `tokens`, `summary` (its last message) and `compare_url`. See /docs/agents/tasks#best-of-n.", |