@defrex/autobuild 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -13
- package/SPEC.md +140 -10
- package/bin/ab-dispatch-generation.ts +11 -2
- package/docs/accounts.md +119 -0
- package/docs/agent-runtimes.md +4 -4
- package/docs/architecture.md +107 -8
- package/docs/build-store.md +3 -41
- package/docs/cli.md +14 -0
- package/docs/configuration-overview.md +111 -0
- package/docs/configuration.md +260 -141
- package/docs/dispatcher-hosting.md +18 -33
- package/docs/intake.md +2 -0
- package/docs/merge-policy.md +1 -3
- package/docs/operating.md +1 -2
- package/docs/operator-api.md +100 -47
- package/docs/operator-surfaces.md +3 -20
- package/docs/overview.md +1 -1
- package/docs/plugin-authoring.md +21 -0
- package/docs/remote-store-protocol.md +198 -89
- package/docs/remote-ticket-protocol.md +29 -49
- package/docs/seams.md +8 -8
- package/docs/setup.md +34 -129
- package/docs/ticket-sources.md +18 -0
- package/docs/troubleshooting.md +7 -11
- package/docs/upgrading.md +1 -1
- package/docs/workspaces.md +4 -4
- package/package.json +14 -5
- package/packages/core/src/accounts/chatgpt-oauth.ts +216 -0
- package/packages/core/src/accounts/chatgpt-state.ts +41 -0
- package/packages/core/src/accounts/local-credentials.ts +194 -0
- package/packages/core/src/accounts/local-inference.ts +106 -0
- package/packages/core/src/accounts/local-owner.ts +123 -0
- package/packages/core/src/accounts/sensitive.ts +2 -0
- package/packages/core/src/cli/accounts.ts +147 -0
- package/packages/core/src/cli/binary.ts +3 -1
- package/packages/core/src/cli/connect.ts +3 -3
- package/packages/core/src/cli/dispatch-handoff.ts +125 -44
- package/packages/core/src/cli/dispatch-launch-contract.ts +187 -0
- package/packages/core/src/cli/dispatch-launcher.ts +54 -21
- package/packages/core/src/cli/dispatch-preflight.ts +6 -1
- package/packages/core/src/cli/dispatch.ts +71 -2
- package/packages/core/src/cli/help.ts +16 -0
- package/packages/core/src/cli/init-readiness-remote.ts +22 -1
- package/packages/core/src/cli/init-readiness-shared.ts +5 -1
- package/packages/core/src/cli/init-validation.ts +160 -18
- package/packages/core/src/cli/main.ts +44 -0
- package/packages/core/src/cli/publication-settlement.ts +4 -1
- package/packages/core/src/cli/secrets.ts +173 -0
- package/packages/core/src/cli/store-opening.ts +11 -1
- package/packages/core/src/cli/upgrade-agent.ts +9 -1
- package/packages/core/src/cli/watch.ts +3 -1
- package/packages/core/src/config/accounts.ts +101 -0
- package/packages/core/src/config/live.ts +14 -1
- package/packages/core/src/config/roles.ts +54 -3
- package/packages/core/src/config/schema.ts +60 -0
- package/packages/core/src/events/compatibility.ts +2 -1
- package/packages/core/src/events/payloads.ts +3 -0
- package/packages/core/src/events/repository.ts +2 -0
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +3 -0
- package/packages/core/src/kernel/reducer.ts +4 -1
- package/packages/core/src/operator/index.ts +2 -0
- package/packages/core/src/operator/protocol.ts +6 -0
- package/packages/core/src/operator/registry.ts +22 -1
- package/packages/core/src/operator/tickets.ts +25 -4
- package/packages/core/src/plugins/manifest.ts +2 -1
- package/packages/core/src/ports/runner/account-env.ts +88 -0
- package/packages/core/src/ports/runner/chatgpt-provider.ts +85 -0
- package/packages/core/src/ports/runner/claude.ts +26 -2
- package/packages/core/src/ports/runner/codex.ts +63 -31
- package/packages/core/src/ports/runner/one-shot.ts +2 -0
- package/packages/core/src/ports/runner/provider-error.ts +5 -0
- package/packages/core/src/ports/runner/routing.ts +35 -4
- package/packages/core/src/ports/tickets/contract.ts +58 -0
- package/packages/core/src/ports/tickets/tree.ts +1 -1
- package/packages/core/src/ports/types.ts +28 -7
- package/packages/core/src/ports/workspace/account-policy.ts +72 -0
- package/packages/core/src/ports/workspace/build-execution.ts +6 -1
- package/packages/core/src/ports/workspace/builtin-capabilities.ts +1 -0
- package/packages/core/src/ports/workspace/create.ts +2 -0
- package/packages/core/src/ports/workspace/git-worktree.ts +6 -1
- package/packages/core/src/ports/workspace/provider-capabilities.ts +1 -0
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +125 -35
- package/packages/core/src/processes/build-runner.ts +32 -1
- package/packages/core/src/processes/dispatcher.ts +23 -0
- package/packages/core/src/processes/execution-settlement.ts +21 -3
- package/packages/core/src/processes/harvest-runner.ts +68 -8
- package/packages/core/src/project-secrets.ts +105 -0
- package/packages/core/src/secret-name.ts +41 -0
- package/packages/core/src/store/account-redaction.ts +156 -0
- package/packages/core/src/store/contract.ts +3 -1
- package/packages/core/src/store/reducer-value-shapes.json +2889 -2781
- package/packages/core/src/store/remote/client.ts +42 -47
- package/packages/core/src/store/remote/compatibility.ts +18 -0
- package/packages/core/src/testing/dispatch-read-budget.ts +122 -0
- package/packages/core/src/testing/index.ts +1 -0
- package/packages/core/src/testing/reduced-read-budget.ts +47 -0
- package/skills/guide/SKILL.md +120 -30
- package/skills/guide/references/accounts.md +119 -0
- package/skills/guide/references/merge-policy.md +1 -3
- package/skills/guide/references/operator-api.md +100 -47
- package/skills/guide/references/plugin-authoring.md +21 -0
- package/skills/guide/references/remote-store-protocol.md +198 -89
- package/skills/guide/references/remote-ticket-protocol.md +29 -49
- package/skills/guide/references/setup.md +34 -129
- package/skills/harvest/SKILL.md +3 -1
- package/skills/harvest-review/SKILL.md +3 -1
- package/skills/operate/SKILL.md +5 -6
- package/skills/spec/SKILL.md +1 -1
- package/skills/tickets/SKILL.md +3 -2
- package/templates/hosted-service/package.json +2 -2
- package/docs/hosted-dispatcher-cutover-validation.md +0 -178
- package/docs/hosted-dispatcher.md +0 -278
- package/docs/hosted-service.md +0 -304
- package/docs/mcp.md +0 -150
package/docs/merge-policy.md
CHANGED
|
@@ -29,9 +29,7 @@ and re-finalization until hold or completion; it approves the merge rather than
|
|
|
29
29
|
an immutable diff. Accepted node reparenting revokes it. Commands and receipts
|
|
30
30
|
are sequence-correlated: hold acknowledgement confirms native cancellation;
|
|
31
31
|
merge acknowledgement does not claim gates passed. MCP/operator tools offer the
|
|
32
|
-
same actions; the terminal uses `l`/`o`.
|
|
33
|
-
**Hold** on a merge awaiting consent. These controls record the same durable
|
|
34
|
-
actions; **Merge** does not mean the merge gates have passed.
|
|
32
|
+
same actions; the terminal uses `l`/`o`. These controls record durable actions; merge consent does not mean the merge gates have passed.
|
|
35
33
|
|
|
36
34
|
## Worked configurations
|
|
37
35
|
|
package/docs/operating.md
CHANGED
|
@@ -17,7 +17,7 @@ Your operator agent keeps work moving through `ab` or MCP. Under your instructio
|
|
|
17
17
|
## Choose a harness
|
|
18
18
|
|
|
19
19
|
- **A local coding agent** at the repository root with the installed `ab-operate` skill, using the CLI or `bun ab mcp` (operator tools over stdio).
|
|
20
|
-
- **
|
|
20
|
+
- **An API client** using the authenticated [Operator API contract](operator-api.md).
|
|
21
21
|
|
|
22
22
|
We recommend the same model as your reviewer roles, since the agent interprets findings and escalation answers.
|
|
23
23
|
|
|
@@ -125,7 +125,6 @@ Every surface reads the same durable state; [Operator surfaces](operator-surface
|
|
|
125
125
|
| Surface | Progress, escalations, pause/resume | Merge consent and hold |
|
|
126
126
|
|---|---|---|
|
|
127
127
|
| Terminal dashboard (`bun ab dispatch`) | Yes | Keys `l` (merge) and `o` (hold) |
|
|
128
|
-
| Hosted web app | Yes, plus sessions and transcripts | Merge/Hold on a merge awaiting consent |
|
|
129
128
|
| CLI and MCP operator tools | Yes | Yes |
|
|
130
129
|
|
|
131
130
|
## An example session
|
package/docs/operator-api.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Operator API v1
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A conforming hosted instance implements this normative polling-oriented operator
|
|
4
|
+
contract at
|
|
4
5
|
`/operator/v1/repos/{repo}`. It is versioned with remote store protocol **6**.
|
|
5
6
|
Every request must send `X-Autobuild-Version`,
|
|
6
7
|
`X-Autobuild-Protocol-Version: 6`, and `Authorization: Bearer …`. Identity is
|
|
@@ -14,29 +15,26 @@ every request. Revocation takes effect on the next request without affecting
|
|
|
14
15
|
other credentials. Unknown, expired or revoked credentials receive `401 auth`;
|
|
15
16
|
removed projects receive `403 auth` with `project not registered`.
|
|
16
17
|
|
|
17
|
-
The
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
break-glass credential. It can cross project boundaries. Keep it owner-only:
|
|
35
|
-
never give it or `AB_STORE_SECRET` to a dispatcher or build agent.
|
|
18
|
+
The hosted cron dispatcher issues a dispatcher-purpose credential per repository
|
|
19
|
+
tick, then deletes that exact row on completion or failure. Its crash-safety
|
|
20
|
+
expiry is capped at the invocation deadline plus 60 seconds and the configured
|
|
21
|
+
`AB_DISPATCHER_TOKEN_TTL_SECONDS` upper bound. Each served tick removes at most
|
|
22
|
+
100 expired or revoked dispatcher rows through indexed probes. Legacy unexpired
|
|
23
|
+
rows keep their recorded expiry and are pruned afterward. Owner lifetimes are
|
|
24
|
+
unchanged. Build and harvest grants are independent signed authority, governed
|
|
25
|
+
by durable lifecycle facts and the existing evidence grace, not parent credential
|
|
26
|
+
storage or TTL; agents never receive the cron credential.
|
|
27
|
+
|
|
28
|
+
Obtain a project credential with `ab connect <instance-url>` or from the
|
|
29
|
+
instance, and use `AB_TOKEN` on non-interactive clients. Interactive connection
|
|
30
|
+
saves the credential outside the repository. Retired credential formats are
|
|
31
|
+
refused with a credential-format-changed diagnostic; supported old protocol
|
|
32
|
+
shapes still require current credentials. Compatibility does not restore retired
|
|
33
|
+
authentication. Versioned, attributed owner-admin credentials are an explicit
|
|
34
|
+
cross-project exception and must never be supplied to build agents.
|
|
36
35
|
|
|
37
36
|
Owner-purpose project credentials attribute every write to their recorded creator.
|
|
38
|
-
Dispatcher-purpose credentials are refused.
|
|
39
|
-
and MCP receive short-lived internal signatures with an explicit version,
|
|
37
|
+
Dispatcher-purpose credentials are refused. Internal operator credentials use short-lived internal signatures with an explicit version,
|
|
40
38
|
selected repository, signed user, expiry and MCP `via`. Only the service holds
|
|
41
39
|
the signing key. These signatures authorize operator routes only and require a
|
|
42
40
|
registered project; replay against another project is refused.
|
|
@@ -46,13 +44,12 @@ tool execution. Body repositories and secondary build/session identifiers are
|
|
|
46
44
|
also checked inside that project. Explicit project mismatches return `403 auth:
|
|
47
45
|
wrong project`; removal returns `403 auth: project not registered`. Encode each
|
|
48
46
|
repository, build, session and artifact kind as a separate URL path segment.
|
|
49
|
-
Registration
|
|
50
|
-
commands; see [owner workflow](setup.md#connected-projects).
|
|
47
|
+
Registration is instance-owned; project credentials cannot administer it.
|
|
51
48
|
|
|
52
49
|
## Operator sessions
|
|
53
50
|
|
|
54
51
|
Operator sessions are the signed-in user's durable orchestrator
|
|
55
|
-
conversations: a
|
|
52
|
+
conversations: a third store resource. A session
|
|
56
53
|
belongs to the user who created it; other members of the same repository
|
|
57
54
|
can read it and cannot write to it (`403 auth` on non-owner writes). Every
|
|
58
55
|
write is attributed to the token's signed user — never a client-supplied
|
|
@@ -91,7 +88,7 @@ raw session-event append. External operator harnesses own agent execution.
|
|
|
91
88
|
| `GET …/status` | Repository intake, pause, and default-auto-merge projection. |
|
|
92
89
|
| `GET …/harvest/status` | Harvest gate, runs, steps, recovery, and attention projection. |
|
|
93
90
|
| `GET …/builds/{slug}/artifacts/{kind}?rev=N` | Raw bytes (`application/octet-stream`) plus content-disposition and `X-Autobuild-Artifact-*` metadata headers. Omit `rev` for latest. |
|
|
94
|
-
| `GET …/tickets?state=S&label=L` | `{states,tickets,diagnostics,criteria,triageState,readyState}`. The
|
|
91
|
+
| `GET …/tickets?state=S&label=L&limit=N&offset=K&order=O` | `{states,tickets,diagnostics,criteria,triageState,readyState,doneState,total}`. The three lifecycle names come from effective repository configuration (including provider fallback). With no `state`, `criteria.state` is `triageState`; repeated `label` parameters narrow that state with AND filters. An explicit `state` selects that exact backend workflow state. `limit` (0–200) returns one page, after skipping `offset`, in `order` `oldest` (the source order, the default) or `newest`; `total` counts every match before paging. |
|
|
95
92
|
| `GET …/tickets/states` | Full state metadata `{name,tickets,about?}[]`, including empty states (`tickets.states` in MCP). |
|
|
96
93
|
| `GET …/tickets/{id}` | `{ticket,blockers,build}`. Blockers include native `exists`/`resolved` status; `build` prefers an active matching repository build, otherwise the most recently updated one. |
|
|
97
94
|
|
|
@@ -110,7 +107,7 @@ MCP presence registration is deferred. `ab watch`
|
|
|
110
107
|
streams build and repository events by polling the same event logs client-side
|
|
111
108
|
(the store protocol's `GET /builds/{slug}/events` and `GET /repos/{repo}/events`
|
|
112
109
|
reads), not as a transport on this API. `triageState`, `readyState`,
|
|
113
|
-
and every entry in `states` are backend state names and must be sent back verbatim
|
|
110
|
+
`doneState`, and every entry in `states` are backend state names and must be sent back verbatim
|
|
114
111
|
when used with the move control.
|
|
115
112
|
|
|
116
113
|
## Controls
|
|
@@ -148,7 +145,7 @@ The retry object is deliberately bare: adding `text` is a `400 validation`
|
|
|
148
145
|
rather than silently changing the resolution to guidance. A revision object may
|
|
149
146
|
also carry `ceiling` only to receive the shared `incompatible-answer-options`
|
|
150
147
|
refusal; a ceiling and spec revision cannot be performed together.
|
|
151
|
-
The
|
|
148
|
+
The protocol does not supply ticket-provider credentials. For ticket-origin
|
|
152
149
|
revision, a trusted caller fetches the current ticket body and supplies it; the
|
|
153
150
|
build must still have a recorded ticket. Revision conformance, lazy retry,
|
|
154
151
|
artifact metadata, event ordering, and refusal rules are the same as the CLI.
|
|
@@ -174,8 +171,7 @@ restart from `plan`.
|
|
|
174
171
|
## The registry's protocol face: `POST …/tools/{tool}`
|
|
175
172
|
|
|
176
173
|
One generic route executes any entry of the agent tool registry (the same
|
|
177
|
-
closed table `ab mcp` serves over stdio
|
|
178
|
-
over Streamable HTTP): the body is the tool's validated input — `repo`
|
|
174
|
+
closed table `ab mcp` serves over stdio): the body is the tool's validated input — `repo`
|
|
179
175
|
included and required to equal the URL's repository — and the response is the
|
|
180
176
|
registry result verbatim. The verified operator token supplies the acting
|
|
181
177
|
identity and, when minted with one, the `via` attribution marker; the body
|
|
@@ -222,18 +218,16 @@ progress and unattempted builds. Unexpected failures are `500 internal`.
|
|
|
222
218
|
|
|
223
219
|
## Browser gateway
|
|
224
220
|
|
|
225
|
-
The
|
|
221
|
+
The cookie-authenticated gateway contract uses `/api/web/repos/{repo}/…`.
|
|
226
222
|
That route is not a second public bearer-token API: it requires a current
|
|
227
|
-
Better Auth HTTP-only cookie, rechecks the
|
|
223
|
+
Better Auth HTTP-only cookie, rechecks the instance’s current organization membership and project registration, rejects cross-origin JSON controls, and delegates only the dashboard,
|
|
228
224
|
build, settings, and harvest operator suffixes listed above. It replaces caller-supplied authorization/version
|
|
229
225
|
headers with a server-minted token that expires after 30 seconds and carries
|
|
230
226
|
the normalized signed-in email. Consequently every durable control event has
|
|
231
227
|
the browser user's human actor while no token or signing secret reaches client
|
|
232
|
-
code. Responses are private/no-store;
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
absent here, and the streaming read surface is the CLI's `ab watch`, which
|
|
236
|
-
polls the store's event reads client-side. Delegated bearer tokens remain
|
|
228
|
+
code. Responses are private/no-store; 401 requires reauthentication.
|
|
229
|
+
Polling clients may use a two-second interval. The gateway provides no
|
|
230
|
+
streaming transport; `ab watch` polls store event reads client-side. Delegated bearer tokens remain
|
|
237
231
|
server-side.
|
|
238
232
|
|
|
239
233
|
The API does not expose phase-session commands, runner startup, a push or
|
|
@@ -387,12 +381,12 @@ ignores old holds. Preflight failure suppression above remains separate.
|
|
|
387
381
|
## Organization management (browser)
|
|
388
382
|
|
|
389
383
|
These same-origin cookie-session routes are the management contract. Mutations
|
|
390
|
-
require the exact
|
|
384
|
+
require the exact configured instance origin as Origin and `application/json`, accept at most
|
|
391
385
|
8192 characters of JSON, and reject unsupported fields. Responses are private,
|
|
392
386
|
no-store. No client-supplied actor or role is trusted. Raw Better Auth
|
|
393
387
|
`/api/auth/organization/*` routes are disabled, including invitations.
|
|
394
388
|
|
|
395
|
-
### Discovery and
|
|
389
|
+
### Discovery and creation
|
|
396
390
|
|
|
397
391
|
`GET /api/web/orgs` returns
|
|
398
392
|
`{isSuperUser,organizations:[{id,name,slug,ownerEmail,membershipRole}]}`.
|
|
@@ -403,14 +397,10 @@ Results sort by slug then ID. Members may inspect and read rosters in their own
|
|
|
403
397
|
organizations, including member emails. Foreign organizations return 403 before
|
|
404
398
|
resource detail. A multi-org member uses these IDs for explicit connect selection.
|
|
405
399
|
|
|
406
|
-
|
|
407
|
-
`AB_WEB_SUPER_USER_EMAILS`, then POST `{name,slug}` to `/api/web/orgs`.
|
|
400
|
+
Only super users may POST `{name,slug}` to `/api/web/orgs`.
|
|
408
401
|
The response is 201 `{organization}` in the discovery shape. Names are nonblank
|
|
409
402
|
and at most 100 characters; slugs are unique lowercase kebab strings of at most
|
|
410
|
-
100 characters. Creation grants no membership.
|
|
411
|
-
operator to `/members`, and super users to `/organizations` and `/projects`.
|
|
412
|
-
These separate pages show acknowledged reads, refresh after writes, and confirm
|
|
413
|
-
member removal and project moves inline before writing.
|
|
403
|
+
100 characters. Creation grants no membership.
|
|
414
404
|
|
|
415
405
|
Super users and the organization’s members can GET `/api/web/orgs/:orgId` for
|
|
416
406
|
`{organization,projects:[repo]}` with active owned projects and the caller’s actual
|
|
@@ -447,5 +437,68 @@ the inactive project; re-registration restores that assignment.
|
|
|
447
437
|
Status codes are 401 for absent, malformed or expired sessions; 403 for admission
|
|
448
438
|
or role refusal; 400 for invalid inputs; 404 for missing resources after role
|
|
449
439
|
checks; 409 for duplicate slugs; and sanitized 503 for store outages. Foreign
|
|
450
|
-
projects return the same unknown-repository result as absent projects. Machine
|
|
451
|
-
|
|
440
|
+
projects return the same unknown-repository result as absent projects. Machine credentials retain their separate authority.
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
### Permanent project deletion
|
|
444
|
+
|
|
445
|
+
Super users and the owner of a project's organization can delete it from the
|
|
446
|
+
Projects page. Owners see only projects in organizations they own; Move and
|
|
447
|
+
Assign remain super-user operations. The shared confirmation dialog names the project,
|
|
448
|
+
shows current build, hosted ticket, secret and subscription-account counts, and
|
|
449
|
+
requires a second, destructive action. Local files and configuration are unaffected.
|
|
450
|
+
|
|
451
|
+
Authenticated human sessions can use `GET /api/web/projects/deletion?repo=<encoded repository>`
|
|
452
|
+
for the authorized preview. It returns `repo`, an opaque `token`, `builds`,
|
|
453
|
+
`tickets`, `secrets`, and `subscriptionAccounts`. Send that token unchanged in
|
|
454
|
+
`If-Match` to `DELETE /api/web/projects/deletion`, with exactly `{repo}` as JSON.
|
|
455
|
+
The write requires the configured same origin. Missing tokens return 428;
|
|
456
|
+
a token for another live generation returns 412 without changing anything.
|
|
457
|
+
A token for an already-deleted generation is an idempotent no-op, including after
|
|
458
|
+
reconnection, for the initiating actor or a super user. Success returns
|
|
459
|
+
`{deleted:true}` only after cleanup completes. Unauthorized callers receive no counts.
|
|
460
|
+
|
|
461
|
+
Deletion cuts off access before purging builds, events, sessions, streams,
|
|
462
|
+
artifacts, hosted tickets and assets, secrets, subscription accounts, credentials,
|
|
463
|
+
connections, presence and organization assignment. Blobs another project references
|
|
464
|
+
or reserves survive. The only retained project record contains the repository,
|
|
465
|
+
initiating actor, deletion time and one opaque generation id. Provider failure
|
|
466
|
+
leaves access refused and durable cleanup pending. The Projects page lists
|
|
467
|
+
unfinished deletions with a **Finish deletion…** action, including after reloading,
|
|
468
|
+
opening another tab or restarting the service. Reopen its confirmation dialog to
|
|
469
|
+
retry cleanup with the original operation's preview token, even though the live
|
|
470
|
+
generation was invalidated at the initial purge. A pending preview returns that
|
|
471
|
+
same original token. Deletion waits only for mutation transactions already holding
|
|
472
|
+
the project generation row, never for an entire HTTP request. Subsequent mutation
|
|
473
|
+
transactions in an admitted request fail with `403 project not registered` and
|
|
474
|
+
roll back; operations committed before the purge remain permissible.
|
|
475
|
+
Cancel only closes the confirmation and does not undo the cutoff.
|
|
476
|
+
`GET /api/web/projects/deletions` returns `{projects: string[]}` for pending
|
|
477
|
+
cleanup authorized to the current owner or super user, including unassigned
|
|
478
|
+
projects for super users. Members and outsiders receive no pending project names.
|
|
479
|
+
This management-only list does not restore projects to builds selectors or normal
|
|
480
|
+
organization discovery. Cleanup commits progress in batches of at most 32 blobs,
|
|
481
|
+
using provider batch deletion where supported; a failed batch remains retryable. Registration is blocked until cleanup
|
|
482
|
+
finishes. Legacy untraceable orphan blobs with no ownership record or retained
|
|
483
|
+
project reference are excluded from deletion.
|
|
484
|
+
|
|
485
|
+
Old credentials return `401` as unknown or revoked, including repository-free
|
|
486
|
+
connection status calls; routes that otherwise establish the repository return
|
|
487
|
+
`403 project not registered`. No credential tombstones are retained. Browser
|
|
488
|
+
approval of a fresh `ab connect` registers an empty project; proposing a connection
|
|
489
|
+
alone does not register it. Old credentials and grants remain invalid. Hosted
|
|
490
|
+
ticket numbering starts again at 1.
|
|
491
|
+
|
|
492
|
+
`ab disconnect` only revokes the saved credential and retains project data.
|
|
493
|
+
The admin `projects remove` command only unregisters access and retains data;
|
|
494
|
+
it is a separate operation from permanent web project deletion.
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
S3 cleanup requires `s3:DeleteObject`, `s3:ListBucketVersions` and
|
|
498
|
+
`s3:DeleteObjectVersion` for the configured bucket and exact prefixed content
|
|
499
|
+
keys. It removes stored versions and delete markers as well as current objects;
|
|
500
|
+
permission or retention failures leave deletion pending. Vercel Blob cleanup uses
|
|
501
|
+
the same store identity, token and prefixed pathname as uploads. Missing objects
|
|
502
|
+
are successful cleanup; provider errors never count as completed deletion.
|
|
503
|
+
|
|
504
|
+
Paged ticket listings use the source's optional native `listPage(criteria, page)` capability when present, otherwise read the full listing and reverse/slice it. Native errors propagate. PostgreSQL counts matches without bodies and reads only the requested window. Zero limits and offsets past the end still report the full matching total. Unpaged listings remain exhaustive; the wire payload is the same for both paths.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Operator surfaces"
|
|
3
3
|
group: "reference"
|
|
4
|
-
description: "Watch and act through the terminal,
|
|
4
|
+
description: "Watch and act through the terminal, CLI, local stdio MCP, or Operator API with your operator agent."
|
|
5
5
|
label: "Operator surfaces"
|
|
6
6
|
order: 12
|
|
7
7
|
---
|
|
@@ -35,7 +35,7 @@ bun ab build status example-build --json
|
|
|
35
35
|
- Interactive `dispatch` shows the terminal dashboard.
|
|
36
36
|
- A shell-capable agent follows progress and acts through the CLI, including `bun ab watch` and `bun ab wait`.
|
|
37
37
|
- A standing CLI operator uses `bun ab watch --operator --json` after checking `bun ab repository status --json` for existing presence. It operates the builds the repository's dispatcher dispatches and adopts new ones.
|
|
38
|
-
- Presence is advisory, allows multiple registrations, and is not exposed by MCP
|
|
38
|
+
- Presence is advisory, allows multiple registrations, and is not exposed by MCP. Termination attempts withdrawal; routine timeout/count re-arms keep the five-minute grace. SIGKILL and failed withdrawal rely on TTL expiry.
|
|
39
39
|
- Dashboard and API share one lifecycle vocabulary.
|
|
40
40
|
|
|
41
41
|
A local CLI can use a remote Store:
|
|
@@ -53,15 +53,6 @@ readyState = "ready"
|
|
|
53
53
|
|
|
54
54
|
`bun ab connect https://builds.example.com` approves the registered project and saves its credential outside the checkout; CI sets `AB_TOKEN` instead. It authorizes the project only, not forge or runtime access. See [Build store](build-store.md).
|
|
55
55
|
|
|
56
|
-
### Web app
|
|
57
|
-
|
|
58
|
-
The hosted web app shows registered repositories and their builds.
|
|
59
|
-
|
|
60
|
-
- **Sign-in** uses the deployment's GitHub authentication and organization membership policy, independent of CLI credentials.
|
|
61
|
-
- **Merge consent:** a merge awaiting consent offers **Merge** and **Hold**. These record durable actions; readiness and merge gates still apply. See [Authorize merge](operating.md#authorize-merge).
|
|
62
|
-
- **Appearance:** open the account menu and choose **System**, **Light** or **Dark** under **Theme**. System is the default and follows the OS preference. Your choice is saved for this browser.
|
|
63
|
-
- **Secrets** (database, blob, signing, OAuth, super-user list) stay on the service, never in TOML or browser bundles.
|
|
64
|
-
|
|
65
56
|
### Local stdio MCP
|
|
66
57
|
|
|
67
58
|
For an agent with an MCP client but no convenient shell, configure the client to launch:
|
|
@@ -75,17 +66,9 @@ bun ab mcp
|
|
|
75
66
|
- **Phase refusal.** Refuses phase-session `AB_*` authority, including malformed tuples: repository-wide tools can't be narrowed to one phase.
|
|
76
67
|
- **Attribution.** Sessionless writes use the local user identity, like the CLI.
|
|
77
68
|
|
|
78
|
-
### Hosted HTTP MCP
|
|
79
|
-
|
|
80
|
-
A remote agent connects its MCP client to `https://builds.example.com/mcp` over Streamable HTTP.
|
|
81
|
-
|
|
82
|
-
- **Authentication:** OAuth with discovery, dynamic registration, PKCE and rotating refresh tokens, authorized through the deployment's sign-in and organization membership. `AB_TOKEN` doesn't substitute.
|
|
83
|
-
- **Every call** rechecks access and repository scope.
|
|
84
|
-
- **Writes** record the authorizing identity and MCP client.
|
|
85
|
-
|
|
86
69
|
## Writing your own
|
|
87
70
|
|
|
88
|
-
There's no operator-surface plugin map. Build a client of the versioned, authenticated Operator API, or
|
|
71
|
+
There's no operator-surface plugin map. Build a client of the versioned, authenticated Operator API, or launch local stdio MCP.
|
|
89
72
|
|
|
90
73
|
- One registry defines tools, schemas, annotations and execution, keeping CLI, API and MCP at parity.
|
|
91
74
|
- Follow the API's request, version and authentication requirements; don't scrape dashboard markup.
|
package/docs/overview.md
CHANGED
|
@@ -12,7 +12,7 @@ slug: ""
|
|
|
12
12
|
Autobuild runs coding agents through a fixed pipeline that takes a groomed ticket to a verified pull request, with a separate workspace for each build. Three actors keep that work moving:
|
|
13
13
|
|
|
14
14
|
- **You** decide goals, scope, tradeoffs, and how much authority to delegate.
|
|
15
|
-
- **Your operator agent** is an external agent that writes specs, files and grooms tickets, operates the builds the repository's dispatcher dispatches, and answers questions within your instructions. The `ab` CLI is primarily its interface;
|
|
15
|
+
- **Your operator agent** is an external agent that writes specs, files and grooms tickets, operates the builds the repository's dispatcher dispatches, and answers questions within your instructions. The `ab` CLI is primarily its interface; agents without a shell can use local stdio MCP or the Operator API.
|
|
16
16
|
- **The dispatcher** claims ready work and runs the durable pipeline, including isolated agent sessions, checks, and publication.
|
|
17
17
|
|
|
18
18
|
|
package/docs/plugin-authoring.md
CHANGED
|
@@ -139,6 +139,7 @@ A plugin relying on a capability declares an `apiVersion` range containing its v
|
|
|
139
139
|
- **1.5** `path` is the path in the workspace environment; set optional `localPath` only when the dispatcher can reach that same copy directly. Workspace-owned executors receive the durable provider locator as `BuildExecutionStart.workspaceRef`; local PID supervision stays host-owned.
|
|
140
140
|
- **1.7** Workspace factory seams.
|
|
141
141
|
- **1.8** Forge failure classification and request observers.
|
|
142
|
+
- **1.9** Optional native ticket-source paging (`listPage`); older sources retain operator slicing.
|
|
142
143
|
|
|
143
144
|
## 2. Create a repository-local module
|
|
144
145
|
|
|
@@ -424,3 +425,23 @@ An adapter opts in with `integrationTree: true` and must:
|
|
|
424
425
|
- expose kind and target in revisions
|
|
425
426
|
|
|
426
427
|
Don't opt in unless the source preserves these semantics. Legacy sources get ordinary CRUD; the compatibility facade refuses metadata writes before legacy methods run, and unsupported sources should also refuse metadata at their own write boundary.
|
|
428
|
+
|
|
429
|
+
## Optional ticket paging capability
|
|
430
|
+
|
|
431
|
+
Native paging is an optional API 1.9 ticket-source capability:
|
|
432
|
+
`listPage?(criteria: TicketCriteria, page: TicketPage): Promise<TicketPageListing>`.
|
|
433
|
+
The SDK exports these types; the result is `TicketListing & { total: number }`.
|
|
434
|
+
Criteria retain state, labels (AND), and assignee semantics. The page has a
|
|
435
|
+
nonnegative integer `limit`, optional nonnegative integer `offset` (default 0),
|
|
436
|
+
and optional `order: 'oldest' | 'newest'` (default oldest). Newest reverses the
|
|
437
|
+
entire source order before offset and limit. Total counts all matches, even
|
|
438
|
+
with limit zero or an offset past the end. Records, diagnostics and errors
|
|
439
|
+
match the exhaustive listing. The shared `describeTicketSourceContract` suite
|
|
440
|
+
automatically compares declared native paging with full-read windows.
|
|
441
|
+
|
|
442
|
+
Only paged operator listings select this capability. Sources without it retain
|
|
443
|
+
the full-read/reverse/slice fallback; native errors propagate. Unpaged operator
|
|
444
|
+
listings, CLI ticket lists and dispatcher ready scans remain exhaustive through
|
|
445
|
+
`listReady`/`listAll`. The hosted PostgreSQL source counts matches without
|
|
446
|
+
bodies and reads only the SQL-bounded window. File, Linear and the remote
|
|
447
|
+
`HostedTicketSource` retain fallback; the POST list-ready protocol stays exhaustive.
|