| | @@ -62,6 +62,8 @@ |
| 62 | 62 | "POST /repos/{owner}/{repo}/diffinery/tasks": { scope: "write", sessionOnly: true }, |
| 63 | 63 | "POST /repos/{owner}/{repo}/diffinery/tasks/{number}/messages": { scope: "write", sessionOnly: true }, |
| 64 | 64 | "POST /repos/{owner}/{repo}/diffinery/tasks/{number}/retry": { scope: "write", sessionOnly: true }, |
| 65 | + "POST /repos/{owner}/{repo}/diffinery/tasks/{number}/plan/approve": { scope: "write", sessionOnly: true }, |
| 66 | + "POST /repos/{owner}/{repo}/diffinery/tasks/{number}/plan/split": { scope: "write", sessionOnly: true }, |
| 65 | 67 | "POST /repos/{owner}/{repo}/diffinery/project/posts": { scope: "write", sessionOnly: true }, |
| 66 | 68 | "PUT /repos/{owner}/{repo}/diffinery/project/memory": { scope: "write", sessionOnly: true }, |
| 67 | 69 | "PUT /repos/{owner}/{repo}/diffinery/project/settings": { scope: "write", sessionOnly: true }, |
| | @@ -1443,6 +1445,7 @@ |
| 1443 | 1445 | model: ["string", "With `provider: openrouter`: the OpenRouter model id (default `~anthropic/claude-sonnet-latest` for Claude Code, `~openai/gpt-sol-latest` for Codex)."], |
| 1444 | 1446 | agent: ["string", "The agent's login (required)."], |
| 1445 | 1447 | base: ["string", "Branch to start from (default: the default branch)."], |
| 1448 | + 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."], |
| 1446 | 1449 | command: ["string", "For `custom`: the shell command to run."], |
| 1447 | 1450 | }, |
| 1448 | 1451 | }, |
| | @@ -1503,11 +1506,31 @@ |
| 1503 | 1506 | }, |
| 1504 | 1507 | "PUT /repos/{owner}/{repo}/diffinery/project/settings": { |
| 1505 | 1508 | summary: "Change the project settings", |
| 1506 | | - description: "Project instructions every agent task and agent review gets, and how many tasks run at once. Tasks beyond `max_running` queue and start oldest first. A person in a browser session only. Audited as `project.settings`.", |
| 1509 | + description: "Project instructions every agent task and agent review gets, how many tasks run at once, and whether tasks plan first. Tasks beyond `max_running` queue and start oldest first. A person in a browser session only. Audited as `project.settings`.", |
| 1507 | 1510 | access: "admin", |
| 1508 | | - body: { max_running: ["integer", "1 to 10 (default 3)."], instructions: ["string", "At most 10,000 characters."] }, |
| 1511 | + body: { |
| 1512 | + max_running: ["integer", "1 to 10 (default 3)."], |
| 1513 | + instructions: ["string", "At most 10,000 characters."], |
| 1514 | + plan_first: ["string", "`off` (default: tasks build at once unless started with `plan_first: true`), `default` (tasks plan first unless started with `plan_first: false`) or `required` (every task plans first, including ones coordinators start)."], |
| 1515 | + }, |
| 1509 | 1516 | }, |
| 1510 | | - "GET /repos/{owner}/{repo}/diffinery/tasks/{number}": { summary: "Get an agent task", description: "The task, its runs and its pull request. Needs write access.", access: "write" }, |
| 1517 | + "GET /repos/{owner}/{repo}/diffinery/tasks/{number}": { |
| 1518 | + summary: "Get an agent task", |
| 1519 | + 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`.", |
| 1520 | + access: "write", |
| 1521 | + }, |
| 1522 | + "POST /repos/{owner}/{repo}/diffinery/tasks/{number}/plan/approve": { |
| 1523 | + summary: "Approve a task's plan", |
| 1524 | + description: "From a browser session only, by the person who started the task. The build run starts with the goal and the plan, and every later run gets the plan as the approved one. 409 `the plan isn't ready yet` while it plans, `this task has no plan waiting for approval`, or `the task is running`. Audited as `task.plan_approve`. See /docs/agents/tasks#plan-first.", |
| 1525 | + access: "write", |
| 1526 | + status: 202, |
| 1527 | + }, |
| 1528 | + "POST /repos/{owner}/{repo}/diffinery/tasks/{number}/plan/split": { |
| 1529 | + summary: "Split a task's plan into tasks", |
| 1530 | + description: "From a browser session only, by the person who started the task. Your coordinator gets the goal and the plan as a post of yours and starts tasks for its parts, each with `parent_task`; this task is then done with. Returns `post`, `task` (the coordinator's run) and `status` (`started` or `queued`). 422 `set up your coordinator for this project first` without a coordinator; the same 409s as approving. Audited as `task.plan_split`.", |
| 1531 | + access: "write", |
| 1532 | + status: 202, |
| 1533 | + }, |
| 1511 | 1534 | "GET /repos/{owner}/{repo}/diffinery/tasks/{number}/transcript": { |
| 1512 | 1535 | summary: "Read a task's transcript", |
| 1513 | 1536 | description: "Lines after `after` (a line number), oldest first: `stream` is `out` and `err` (the runtime's output, Claude Code's `stream-json` or Codex's `--json` lines), `setup` (installing and pushing) or `note` (Diffinery's own). Model keys and git credentials are masked.", |