Pipelines: uses: agent replaces uses: review (abso issue 688, Agent VCS's shape). One general step: a model reads the version's diff and acts as the run's own seat. instructions: names a file in the project to follow (the server's built-in review when none); model: names a model as the AI binding does (anthropic/claude-sonnet-5, @cf/...); may: lists what the seat may do, and slice 1 knows only note. A path outside the project, a model name that isn't one, and an unknown may are refused. Tests: src/pipeline/test, 32 pass. Version 267 of shared· approvals-page· Oct 15 (2026-10-15 21:16 UTC) · Not checked
Pipelines: uses: agent replaces uses: review ( abso issue 688 · not public , Agent VCS's shape). One general step: a model reads the version's diff and acts as the run's own seat. instructions: names a file in the project to follow (the server's built-in review when none); model: names a model as the AI binding does (anthropic/claude-sonnet-5, @cf/...); may: lists what the seat may do, and slice 1 knows only note.
A path outside the project, a model name that isn't one, and an unknown may are refused. Tests: src/pipeline/test, 32 pass.
Version 266 · Files at version 267
2 files, 72 lines added, 9 removed.
--- a/src/pipeline/pipeline.ts
+++ b/src/pipeline/pipeline.ts
@@ -74,7 +74,7 @@
74 74 | { readonly ok: true; readonly file: PipelineFile } 75 75 | { readonly ok: false; readonly problems: readonly Problem[] }; 77 − export const BUILT_INS = ["deploy", "preview", "notify", "npm-publish", "review"] as const;
77 + export const BUILT_INS = ["deploy", "preview", "notify", "npm-publish", "agent"] as const; 78 78 export type BuiltIn = (typeof BUILT_INS)[number]; 80 80 /** Each built-in step's own settings, beside the keys every job has. */ @@ -84,10 +84,16 @@
85 85 // The npm packages it may publish, from the .tgz files its from: job kept, and the dist-tag (latest if none). 86 86 "npm-publish": ["packages", "tag"], 87 − // A model reads the version's diff and leaves notes on it (abso issue 688). The server picks the model and the caps.
88 − review: [],
87 + // A model reads the version's diff and acts on it as the run's own seat (abso issue 688): the instructions file it 88 + // follows (a built-in review when none), the model, and what the seat may do (note: notes on the changed lines). 89 + agent: ["instructions", "model", "may"], 92 + /** What an agent step's seat may do (688). Slice 1: leave notes on the version's changed lines. */ 93 + export const AGENT_MAY = ["note"] as const; 94 + /** A model as the server's AI binding names it: provider/model or Workers AI's @cf/author/model. */ 95 + const MODEL_NAME = /^(@cf\/)?[a-z0-9][a-z0-9_.-]*\/[a-z0-9][a-z0-9_.:-]*$/i; 91 97 /** An npm dist-tag: npm refuses one that reads as a version, so it starts with a letter. */ 92 98 const DIST_TAG = /^[a-z][a-z0-9_-]{0,31}$/; @@ -337,6 +343,29 @@
337 343 for (const k of settings) if (j[k] !== undefined) withs[k] = j[k]; 338 344 if (uses === "deploy" && typeof j.worker !== "string") 339 345 say(`${at}.worker`, "names the Worker deploy ships, and is missing"); 346 + if (uses === "agent") { 347 + const instructions = j.instructions; 349 + instructions !== undefined && 350 + (typeof instructions !== "string" || 351 + instructions === "" || 352 + instructions.startsWith("/") || 353 + instructions.split("/").includes("..")) 355 + say(`${at}.instructions`, `names a file in the project, such as .abso/review.md, not ${q(instructions)}`); 356 + if (j.model !== undefined && (typeof j.model !== "string" || !MODEL_NAME.test(j.model))) 357 + say(`${at}.model`, `names a model such as anthropic/claude-sonnet-5, not ${q(j.model)}`); 358 + if (j.may !== undefined) { 359 + const may = typeof j.may === "string" ? [j.may] : j.may; 360 + if (!Array.isArray(may) || may.length === 0) 361 + say(`${at}.may`, `lists what the seat may do: ${AGENT_MAY.join(", ")}`); 363 + may.forEach((m, i) => { 364 + if (!(AGENT_MAY as readonly unknown[]).includes(m)) 365 + say(`${at}.may[${i}]`, `${q(m)} isn't something an agent step may do yet (${AGENT_MAY.join(", ")})`); 340 369 if (uses === "npm-publish") { 341 370 if (j.from === undefined) 342 371 say(`${at}.from`, "names the job whose kept .tgz files npm-publish pushes, and is missing"); --- a/src/pipeline/test/pipeline.test.ts
+++ b/src/pipeline/test/pipeline.test.ts
@@ -252,16 +252,50 @@
252 252 has(ps, "pipelines.p.jobs.c.packages[2]", /isn't an npm package name/); 255 − it("review: a step with no settings of its own; the server picks the model (abso issue 688)", () => {
256 − const read = checkPipelines(one({ review: { uses: "review" } }, { only: ["shared"] }));
255 + it("agent: instructions, a model and what its seat may do; all optional (abso issue 688)", () => { 256 + ok(checkPipelines(one({ review: { uses: "agent" } }, { only: ["shared"] }))); 257 + const read = checkPipelines( 262 + instructions: ".abso/review.md", 263 + model: "anthropic/claude-sonnet-5", 266 + tidy: { uses: "agent", model: "@cf/meta/llama-3.3-70b-instruct-fp8-fast", may: "note" }, 268 + { only: ["shared"] }, 258 272 const job = read.ok ? read.file.pipelines[0]!.jobs.find((j) => j.name === "review") : undefined; 259 − assert.equal(job?.uses, "review");
260 − assert.deepEqual(job?.with, {});
273 + assert.equal(job?.uses, "agent"); 274 + assert.deepEqual(job?.with, { 275 + instructions: ".abso/review.md", 276 + model: "anthropic/claude-sonnet-5", 279 + const bad = problems( 282 + a: { uses: "agent", instructions: "../outside.md" }, 283 + b: { uses: "agent", model: "sonnet please" }, 284 + c: { uses: "agent", may: ["note", "land"] }, 285 + d: { uses: "agent", may: [] }, 286 + e: { uses: "agent", instructions: "/etc/passwd" }, 290 + has(bad, "pipelines.p.jobs.a.instructions", /names a file in the project/); 291 + has(bad, "pipelines.p.jobs.b.model", /names a model/); 292 + has(bad, "pipelines.p.jobs.c.may[1]", /isn't something an agent step may do yet/); 293 + has(bad, "pipelines.p.jobs.d.may", /lists what the seat may do/); 294 + has(bad, "pipelines.p.jobs.e.instructions", /names a file in the project/); 261 295 const ps = problems( 262 − checkPipelines(one({ a: { uses: "review", model: "x" }, b: { uses: "review", abso: "writer" } })),
296 + checkPipelines(one({ a: { uses: "agent", worker: "x" }, b: { uses: "agent", abso: "writer" } })), 264 − has(ps, "pipelines.p.jobs.a.model", /./);
298 + has(ps, "pipelines.p.jobs.a.worker", /isn't a key here/); 265 299 has(ps, "pipelines.p.jobs.b.abso", /a uses step runs on the server/);