@defrex/autobuild 1.0.0-beta.4 → 1.0.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 +1 -1
- package/SPEC.md +45 -36
- package/docs/agent-runtimes.md +157 -0
- package/docs/build-store.md +123 -0
- package/docs/builds.md +82 -0
- package/docs/cli.md +48 -0
- package/docs/configuration-overview.md +93 -0
- package/docs/configuration.md +1626 -204
- package/docs/dispatcher-hosting.md +115 -0
- package/docs/dispatcher.md +59 -0
- package/docs/forges.md +121 -0
- package/docs/getting-started.md +60 -0
- package/docs/glossary.md +60 -0
- package/docs/hosted-service.md +2 -2
- package/docs/intake.md +48 -0
- package/docs/integration-overview.md +81 -0
- package/docs/operating.md +114 -0
- package/docs/operator-api.md +6 -6
- package/docs/operator-surfaces.md +90 -0
- package/docs/overview.md +49 -0
- package/docs/plugin-authoring.md +426 -0
- package/docs/remote-store-protocol.md +8 -8
- package/docs/seams.md +66 -0
- package/docs/setup.md +8 -6
- package/docs/skills.md +119 -0
- package/docs/ticket-sources.md +132 -0
- package/docs/tickets.md +69 -0
- package/docs/troubleshooting.md +111 -0
- package/docs/upgrading.md +50 -0
- package/docs/verification.md +146 -0
- package/docs/website.md +47 -5
- package/docs/workspaces.md +152 -0
- package/package.json +5 -4
- package/packages/core/src/cli/env.ts +1 -1
- package/packages/core/src/cli/help.ts +4 -2
- package/packages/core/src/config/landing.ts +8 -0
- package/packages/core/src/config/reference-metadata.ts +31 -0
- package/packages/core/src/config/reference.ts +342 -0
- package/packages/core/src/config/roles.ts +1 -1
- package/packages/core/src/config/schema.ts +344 -6
- package/packages/core/src/ontology.ts +2 -2
- package/packages/core/src/open-map.ts +3 -1
- package/skills/finalize/SKILL.md +3 -1
- package/skills/guide/SKILL.md +42 -25
- package/skills/guide/references/operator-api.md +18 -10
- package/skills/guide/references/plugin-authoring.md +227 -303
- package/skills/guide/references/remote-store-protocol.md +8 -8
- package/skills/guide/references/setup.md +8 -6
- package/skills/implement/SKILL.md +4 -2
- package/skills/operate/SKILL.md +26 -27
- package/skills/plan/SKILL.md +12 -4
- package/skills/spec/SKILL.md +1 -1
- package/skills/tickets/SKILL.md +1 -1
- package/templates/hosted-service/package.json +2 -2
package/docs/operator-api.md
CHANGED
|
@@ -51,9 +51,9 @@ commands; see [owner workflow](setup.md#connected-projects).
|
|
|
51
51
|
|
|
52
52
|
## Operator sessions
|
|
53
53
|
|
|
54
|
-
Operator sessions are the signed-in
|
|
54
|
+
Operator sessions are the signed-in user's durable orchestrator
|
|
55
55
|
conversations: a hosted-only third store resource. A session
|
|
56
|
-
belongs to the
|
|
56
|
+
belongs to the user who created it; other members of the same repository
|
|
57
57
|
can read it and cannot write to it (`403 auth` on non-owner writes). Every
|
|
58
58
|
write is attributed to the token's signed user — never a client-supplied
|
|
59
59
|
identity — and carries no `via` marker: session events are the delegate's own
|
|
@@ -62,14 +62,14 @@ archived status is terminal.
|
|
|
62
62
|
|
|
63
63
|
| Method and path | Result |
|
|
64
64
|
|---|---|
|
|
65
|
-
| `GET …/sessions` | The repository's session records, newest update first. Readable by any
|
|
66
|
-
| `POST …/sessions` | `{"title"?:"…"}` → `201` + the created `SessionRecord`; the signed-in
|
|
67
|
-
| `GET …/sessions/{sid}` | `{session, state, turns}` where `state` is the reducer's derived state (`status`, `openTurn`, `pendingApproval`, `wakeGlobs`, `wakeCursors`, `turns`) and `turns` the ordered turn list. Readable by any
|
|
65
|
+
| `GET …/sessions` | The repository's session records, newest update first. Readable by any member of the repository. |
|
|
66
|
+
| `POST …/sessions` | `{"title"?:"…"}` → `201` + the created `SessionRecord`; the signed-in user owns it. |
|
|
67
|
+
| `GET …/sessions/{sid}` | `{session, state, turns}` where `state` is the reducer's derived state (`status`, `openTurn`, `pendingApproval`, `wakeGlobs`, `wakeCursors`, `turns`) and `turns` the ordered turn list. Readable by any member of the repository. |
|
|
68
68
|
| `POST …/sessions/{sid}/messages` | `{"text":"…"}` → appends `message.posted`. Owner only. |
|
|
69
69
|
| `PUT …/sessions/{sid}/wake` | `{"globs":["…"]}` (possibly empty) → appends `session.wake-set`. Owner only. |
|
|
70
70
|
| `POST …/sessions/{sid}/approvals` | `{"turn":"…","toolCallId":"…","decision":"approve"\|"deny"}` → `approval.answered`. Owner only; `409 refusal` when the reduced state has no matching pending approval. |
|
|
71
71
|
| `POST …/sessions/{sid}/archive` | Empty body → `session.archived`. Owner only; `409 refusal` when already archived. |
|
|
72
|
-
| `GET …/sessions/{sid}/turns/{turn}/stream?since=N&wait=N` | The turn's stream read: `{chunks,status,outcome?,artifact?}` with `since` strictly greater-than and the same bounded-wait semantics as the stream protocol (whole seconds, clamped at 30). Unknown turn is `404 not-found`. Readable by any
|
|
72
|
+
| `GET …/sessions/{sid}/turns/{turn}/stream?since=N&wait=N` | The turn's stream read: `{chunks,status,outcome?,artifact?}` with `since` strictly greater-than and the same bounded-wait semantics as the stream protocol (whole seconds, clamped at 30). Unknown turn is `404 not-found`. Readable by any member of the repository. |
|
|
73
73
|
|
|
74
74
|
Session state is a reduction of the session's event log, never a stored
|
|
75
75
|
column; a `GET …/sessions/{sid}` response therefore always reflects the
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Operator surfaces"
|
|
3
|
+
group: "reference"
|
|
4
|
+
description: "Watch and act through the terminal, web app, CLI, or MCP with your operator agent."
|
|
5
|
+
label: "Operator surfaces"
|
|
6
|
+
order: 12
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Operator surfaces
|
|
10
|
+
|
|
11
|
+
## Responsibility
|
|
12
|
+
|
|
13
|
+
Operator surfaces are where you and your operator agent inspect tickets and builds, answer escalations, pause work and authorize landing. Autobuild never hosts or starts your agent; it runs anywhere.
|
|
14
|
+
|
|
15
|
+
## Shipped arrangements
|
|
16
|
+
|
|
17
|
+
### Terminal dashboard and local CLI
|
|
18
|
+
|
|
19
|
+
A local Store needs no dashboard credential:
|
|
20
|
+
|
|
21
|
+
<!-- seam-config:start -->
|
|
22
|
+
```toml
|
|
23
|
+
[tickets]
|
|
24
|
+
source = "file"
|
|
25
|
+
readyState = "ready"
|
|
26
|
+
```
|
|
27
|
+
<!-- seam-config:end -->
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
bun ab dispatch
|
|
31
|
+
bun ab builds
|
|
32
|
+
bun ab build status example-build --json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- Interactive `dispatch` shows the terminal dashboard.
|
|
36
|
+
- A shell-capable agent follows progress and acts through the CLI, including `bun ab watch` and `bun ab wait`.
|
|
37
|
+
- Dashboard and API share one lifecycle vocabulary.
|
|
38
|
+
|
|
39
|
+
A local CLI can use a remote Store:
|
|
40
|
+
|
|
41
|
+
<!-- seam-config:start -->
|
|
42
|
+
```toml
|
|
43
|
+
[store]
|
|
44
|
+
url = "https://builds.example.com"
|
|
45
|
+
|
|
46
|
+
[tickets]
|
|
47
|
+
source = "file"
|
|
48
|
+
readyState = "ready"
|
|
49
|
+
```
|
|
50
|
+
<!-- seam-config:end -->
|
|
51
|
+
|
|
52
|
+
`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).
|
|
53
|
+
|
|
54
|
+
### Web app
|
|
55
|
+
|
|
56
|
+
The hosted web app shows registered repositories and their builds.
|
|
57
|
+
|
|
58
|
+
- **Sign-in** uses the deployment's GitHub authentication and email allowlist, independent of CLI credentials.
|
|
59
|
+
- **Secrets** (database, blob, signing, OAuth, allowlist) stay on the service, never in TOML or browser bundles.
|
|
60
|
+
|
|
61
|
+
### Local stdio MCP
|
|
62
|
+
|
|
63
|
+
For an agent with an MCP client but no convenient shell, configure the client to launch:
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
bun ab mcp
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- **Scope.** Run from the connected project, or pass `--store` and `--repo` to constrain authority.
|
|
70
|
+
- **Lifetime.** Serves the operator tool registry over stdio; exits on client EOF. No daemon.
|
|
71
|
+
- **Phase refusal.** Refuses phase-session `AB_*` authority, including malformed tuples: repository-wide tools can't be narrowed to one phase.
|
|
72
|
+
- **Attribution.** Sessionless writes use the local user identity, like the CLI.
|
|
73
|
+
|
|
74
|
+
### Hosted HTTP MCP
|
|
75
|
+
|
|
76
|
+
A remote agent connects its MCP client to `https://builds.example.com/mcp` over Streamable HTTP.
|
|
77
|
+
|
|
78
|
+
- **Authentication:** OAuth with discovery, dynamic registration, PKCE and rotating refresh tokens, authorized through the deployment's sign-in and allowlist. `AB_TOKEN` doesn't substitute.
|
|
79
|
+
- **Every call** rechecks access and repository scope.
|
|
80
|
+
- **Writes** record the authorizing identity and MCP client.
|
|
81
|
+
|
|
82
|
+
## Writing your own
|
|
83
|
+
|
|
84
|
+
There's no operator-surface plugin map. Build a client of the versioned, authenticated Operator API, or connect through MCP.
|
|
85
|
+
|
|
86
|
+
- One registry defines tools, schemas, annotations and execution, keeping CLI, API and MCP at parity.
|
|
87
|
+
- Follow the API's request, version and authentication requirements; don't scrape dashboard markup.
|
|
88
|
+
- A new surface adds no pipeline phase and no embedded operator agent.
|
|
89
|
+
|
|
90
|
+
[Writing a plugin](plugin-authoring.md) covers infrastructure adapters.
|
package/docs/overview.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "How Autobuild works"
|
|
3
|
+
group: "start"
|
|
4
|
+
description: "The ticket-driven development lifecycle, its review and verification gates, and the repositories it fits."
|
|
5
|
+
label: "Overview"
|
|
6
|
+
order: 0
|
|
7
|
+
slug: ""
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# How Autobuild works
|
|
11
|
+
|
|
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
|
+
|
|
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, watches builds, and answers questions within your instructions. The `ab` CLI is primarily its interface; remote agents use MCP.
|
|
16
|
+
- **The dispatcher** claims ready work and runs the durable pipeline, including isolated agent sessions, checks, and publication.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## From a ticket to a change
|
|
20
|
+
|
|
21
|
+
A ticket states the observable change, why it matters, acceptance criteria, explicit limits, and evidence. Grooming turns it into a buildable spec and moves it to the tracker's ready state; filing alone doesn't make it ready.
|
|
22
|
+
|
|
23
|
+
The dispatcher claims ready tickets up to your configured capacity and runs each through the same pipeline:
|
|
24
|
+
|
|
25
|
+
1. **Spec.** The ticket's spec becomes the build's contract.
|
|
26
|
+
2. **Plan and plan review.** An agent proposes a plan; an independent reviewer checks it against the spec and can request revisions.
|
|
27
|
+
3. **Implement and code review.** An agent commits the change; a fresh reviewer's findings send it back for another round.
|
|
28
|
+
4. **Verify.** Your configured checks, commands or agent verifiers, run in order; a failure returns the build to implementation. This effectively replaces CI.
|
|
29
|
+
5. **Finalize.** An agent writes the pull request description and Autobuild opens the PR.
|
|
30
|
+
|
|
31
|
+
Landing depends on the configured policy and merge gates. Conflicts are reconciled, then verified again. Related work can be collected into an integration tree before landing.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Where it fits
|
|
35
|
+
|
|
36
|
+
Autobuild fits repositories whose work can be stated as clear tickets and checked automatically.
|
|
37
|
+
|
|
38
|
+
- **Requirements.** Bun, git, and your agent runtime (Claude Code, Codex CLI, or Pi) with its access and credentials.
|
|
39
|
+
- **Throughput over latency.** Independent builds run side by side, but each one pays for planning, review, and verification. A small edit you need now is better done directly in your coding agent.
|
|
40
|
+
- **Not a product owner.** It doesn't make product decisions or make vague tickets precise without your input; builds stop for answers, and your agent brings unresolved decisions back to you. If you can't state what done means, or your checks can't detect a broken change, fix grooming and verification first.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## Using these docs
|
|
44
|
+
|
|
45
|
+
Start with [Getting started](getting-started.md), then:
|
|
46
|
+
|
|
47
|
+
- **Concepts:** [builds](builds.md), the [dispatcher](dispatcher.md), [integration](integration-overview.md), [tickets](tickets.md) with the [spec standard](tickets.md#groom-a-buildable-spec), and [Skills](skills.md) for editable agent defaults.
|
|
48
|
+
- **Operating and configuring:** [Working with your operator agent](operating.md), [Seams](seams.md), and the [configuration reference](configuration-overview.md).
|
|
49
|
+
- **Reference:** [CLI](cli.md), [Upgrading](upgrading.md), [Troubleshooting](troubleshooting.md), and the [Glossary](glossary.md).
|
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Writing a plugin"
|
|
3
|
+
group: "guides"
|
|
4
|
+
description: "Build, contract-test, package, and publish an Autobuild infrastructure adapter."
|
|
5
|
+
label: "Plugins"
|
|
6
|
+
order: 7
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Writing a plugin
|
|
10
|
+
|
|
11
|
+
A plugin is a trusted Bun module, loaded in-process from the consuming repository, that connects Autobuild to another ticket tracker, agent runtime, workspace system or forge.
|
|
12
|
+
|
|
13
|
+
Install Autobuild in the target repository with `bun add -d --exact @defrex/autobuild`; `ab <command>` below means `bun ab <command>` there.
|
|
14
|
+
|
|
15
|
+
**Definition of done for an adapter: the unchanged shared contract suite for its port passes.** Interface conformance or a clean `ab plugin doctor` is not enough.
|
|
16
|
+
|
|
17
|
+
## 1. Choose the port and preserve its semantics
|
|
18
|
+
|
|
19
|
+
Import public types only from `@defrex/autobuild/plugin-sdk`; internal module paths are not API.
|
|
20
|
+
|
|
21
|
+
| Port | Manifest map | Factory returns | Selected by |
|
|
22
|
+
|---|---|---|---|
|
|
23
|
+
| `ticket-source` | `ticketSources` | `TicketSource` | `[tickets].source` |
|
|
24
|
+
| `agent-runtime` | `agentRuntimes` | `RuntimeRegistration` | `[roles.*].runtime` |
|
|
25
|
+
| `workspace-provider` | `workspaceProviders` | `WorkspaceProvider` | `[workspace].provider` |
|
|
26
|
+
| `forge` | `forges` | `Forge` | root `forge` key |
|
|
27
|
+
|
|
28
|
+
All four manifest maps have production selectors. Omitted forge and workspace selectors default to builtin `github` and `git-worktree`; roles keep normal runtime inheritance.
|
|
29
|
+
|
|
30
|
+
`BuildStore` and `BlobStore` contract types are exported for remote-server authors, but BuildStore is **not** an in-process manifest map: implement the language-neutral remote store protocol and run its conformance path. `TelemetrySource` is a frozen port type with no plugin registration surface in this release.
|
|
31
|
+
|
|
32
|
+
### `ticket-source`
|
|
33
|
+
|
|
34
|
+
Lists, gets and claims tickets to start builds; receives comments, transitions, creates and updates. Owns lifecycle names, dependency completion, idempotent creation with a stable external creation-key projection, and partial-list diagnostics. Never consulted mid-build; not artifact storage.
|
|
35
|
+
|
|
36
|
+
### `agent-runtime`
|
|
37
|
+
|
|
38
|
+
Wrap an `AgentRunner` that supports:
|
|
39
|
+
|
|
40
|
+
- start, continue and end, with complete transcripts and usage
|
|
41
|
+
- per-turn environment refresh, and cancellation that keeps an endable handle for transcript deposition
|
|
42
|
+
- typed failures: verbatim message, retry-compatible `permanent` bit, optional `cause: availability | exhaustion | credentials | configuration` routing evidence
|
|
43
|
+
- the distribution-managed `ab` launcher
|
|
44
|
+
|
|
45
|
+
Declare served model prefixes and a default. Optional tool-free `oneShot` sits beside the runner interface.
|
|
46
|
+
|
|
47
|
+
### `workspace-provider`
|
|
48
|
+
|
|
49
|
+
- Provision an absolute, writable working copy for the requested branch; return durable base evidence.
|
|
50
|
+
- Resume an intact branch non-destructively, never silently re-cut from a newer base. Rematerialize a lost copy. Make release idempotent.
|
|
51
|
+
- Optional `provision.publication` supplies a durable confirmed SHA and known cache tips for authoritative readback and cache repair. Preserve unknown unpublished work.
|
|
52
|
+
|
|
53
|
+
### `forge`
|
|
54
|
+
|
|
55
|
+
- Kernel-owned regular pushes, idempotent PR opening, PR-state projection, gated and ungated auto-merge, head-guarded squash merge, and comments. Agents never receive forge credentials or push.
|
|
56
|
+
- API 1.2: optional idempotent `closePr` and `deleteBranch` for abort cleanup. `closePr` must preserve a racing merge. Without them, cleanup stays visibly pending.
|
|
57
|
+
- Optional `prAttachments` hosts images; the text-only path must work without it.
|
|
58
|
+
|
|
59
|
+
### Reconcile rewrites
|
|
60
|
+
|
|
61
|
+
Reconcile requires the optional grouped `Forge.rewrite` capability:
|
|
62
|
+
|
|
63
|
+
1. Snapshot the actual build branch into a build-private ref.
|
|
64
|
+
2. Publish immutable exact-SHA refs under `refs/autobuild/archive/<slug>/<sha>`.
|
|
65
|
+
3. Replace the explicit branch, leased on an explicit expected remote head.
|
|
66
|
+
|
|
67
|
+
- Return `lease-mismatch` separately from transport, auth and policy failures.
|
|
68
|
+
- If the CAS succeeds but another writer advances the branch before readback, return `lease-mismatch` with `rewritten: true` and the observed `actual` head. The kernel records the write and retries without claiming completion.
|
|
69
|
+
- After an acknowledged replacement, reattach the matching detached workspace HEAD to the build branch so later publication works.
|
|
70
|
+
- Never overwrite unknown work or fall back to merging, ordinary pushes, archive branches or tags.
|
|
71
|
+
- Older forge plugins still load; reconcile refuses them actionably.
|
|
72
|
+
- Remote workspace providers also need trusted `WorkspacePublication.rewrite` after guest teardown; ordinary `publish` can't publish a restack.
|
|
73
|
+
|
|
74
|
+
### Publication readback
|
|
75
|
+
|
|
76
|
+
Publication succeeds only when an authoritative branch-head readback equals the frozen intended SHA, including recovery after a failed push. Unconfirmed candidate ancestry never proves publication.
|
|
77
|
+
|
|
78
|
+
- `pushBranch(workspacePath, branch, sha?)` receives the frozen SHA from kernel callers and stays fast-forward only. Legacy callers may omit the SHA to select HEAD.
|
|
79
|
+
- `confirmPublication` inspects the authoritative head and refreshes caches only on an exact SHA match. Kernel callers refuse adapters lacking it before pushing.
|
|
80
|
+
- Remote-backed local refs are caches: set them unconditionally after confirmation, fetching the advertised ref if objects are missing, without resetting checkout files. `localExpected` is historical input only. Local-git's shared ref database stays authoritative and keeps CAS.
|
|
81
|
+
- Hosted `WorkspacePublication` must provide authoritative `isPublished`, and confirm after writing and before retrying.
|
|
82
|
+
- Remote inspection must not resume a stopped guest or run commands in it; refresh the guest cache inside trusted publication before stopping it. Missing inspection fails actionably.
|
|
83
|
+
|
|
84
|
+
### Forge failures and request accounting
|
|
85
|
+
|
|
86
|
+
API 1.8 adds optional forge failure classification. Import `ForgeFailure` and `isForgeFailure`, plus the types `ForgeFailureDetails`, `ForgeRequestObserver` and `ForgeRequestContext`, from `@defrex/autobuild/plugin-sdk`.
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
// Rate limit, with a valid ISO reset timestamp:
|
|
90
|
+
throw new ForgeFailure(message, { kind: 'rate-limited', resetAt })
|
|
91
|
+
// Retryable transport error:
|
|
92
|
+
throw new ForgeFailure(message, { kind: 'transient', retry: 'retryable' })
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
- Don't classify ordinary policy and permission refusals; they remain deferrals. Never include credentials.
|
|
96
|
+
- The `forgeFailure: 'autobuild.forge-failure.v1'` discriminant and validated details work across separately loaded SDK copies. Arbitrary legacy errors aren't classified.
|
|
97
|
+
|
|
98
|
+
Optional `Forge.observeRequests(observer): () => void` returns a disposer and calls each observer once per wire request, including failures and pagination.
|
|
99
|
+
|
|
100
|
+
- Pass `ForgeRequestContext` with the build slug, or `{}` when unknown; the host fills missing attribution from its current build-scoped operation, else the request is repository/unattributed. Capture context before awaiting transport; notify after the outcome.
|
|
101
|
+
- Credential discovery and skipped calls are not provider requests.
|
|
102
|
+
|
|
103
|
+
| `outcome` | Request |
|
|
104
|
+
|---|---|
|
|
105
|
+
| `restPrimary` | REST HTTP response other than 304 |
|
|
106
|
+
| `restNotModified` | REST 304 |
|
|
107
|
+
| `graphql` | GraphQL call, including failures |
|
|
108
|
+
| omitted | network failure (no proven REST debit) |
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
observeRequests(observer: ForgeRequestObserver) {
|
|
112
|
+
this.observers.add(observer)
|
|
113
|
+
return () => { this.observers.delete(observer) }
|
|
114
|
+
}
|
|
115
|
+
// Capture context before awaiting the transport. After response/failure:
|
|
116
|
+
for (const observer of this.observers) {
|
|
117
|
+
observer({ build: context.build, ...(outcome ? { outcome } : {}) })
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Declare `apiVersion: '^1.8.0'` for these capabilities. Legacy 1.x plugins load without observers and show unavailable counts.
|
|
122
|
+
|
|
123
|
+
### Read scopes
|
|
124
|
+
|
|
125
|
+
Forge optimizations that don't change the required plugin API version:
|
|
126
|
+
|
|
127
|
+
- **`withReadScope(work)`** wraps a dispatcher tick, sharing promises and observations across builds; tears down on rejection too. Operations outside the scope stay independent.
|
|
128
|
+
- **`primeNodeReads({workspacePath, parent, head, prNumber?})`** seeds opened-node facts. Non-cooldown failures emit a diagnostic and fall through to ordinary stage reads, preserving recovery when the previous parent disappeared.
|
|
129
|
+
|
|
130
|
+
Invalidate observations before writes, including uncertain writes and Git pushes. Acknowledgement and readiness reads stay fresh. Branch and ref endpoints share normalized facts, never HTTP validators.
|
|
131
|
+
|
|
132
|
+
### API versions
|
|
133
|
+
|
|
134
|
+
A plugin relying on a capability declares an `apiVersion` range containing its version (for example `^1.5.0`). Legacy plugins without newer fields keep working.
|
|
135
|
+
|
|
136
|
+
- **1.2** Forge `closePr` and `deleteBranch`.
|
|
137
|
+
- **1.3** `AgentRunner` failure `cause` and the `exhaustion-failure` contract scenario. Without `cause`, `permanent: false` is eligible for a configured alternate; `permanent: true` stops the chain.
|
|
138
|
+
- **1.4** Optional `Ticket.creationKey`: the stable external create/adoption key, projected from `create`, `get` and `listReady`, correlating ready tickets with durable Harvest reservations while blocker recording is unfinished. Legacy tickets may omit it.
|
|
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
|
+
- **1.7** Workspace factory seams.
|
|
141
|
+
- **1.8** Forge failure classification and request observers.
|
|
142
|
+
|
|
143
|
+
## 2. Create a repository-local module
|
|
144
|
+
|
|
145
|
+
```text
|
|
146
|
+
my-repository/
|
|
147
|
+
├── autobuild.toml
|
|
148
|
+
└── autobuild-plugin.ts
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Use `import type` for SDK symbols that are only types:
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
import type {
|
|
155
|
+
AutobuildPluginManifest,
|
|
156
|
+
ForgePluginFactory,
|
|
157
|
+
} from '@defrex/autobuild/plugin-sdk'
|
|
158
|
+
import { AcmeForge } from '@acme/forge-client'
|
|
159
|
+
|
|
160
|
+
const createForge: ForgePluginFactory = ({ config, env, repoRoot }) => {
|
|
161
|
+
const token = env.ACME_FORGE_TOKEN
|
|
162
|
+
if (!token) throw new Error('ACME_FORGE_TOKEN is required')
|
|
163
|
+
return new AcmeForge({ token, config, repoRoot })
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export default {
|
|
167
|
+
name: 'acme-forge',
|
|
168
|
+
apiVersion: '^1.2.0',
|
|
169
|
+
forges: { acme: createForge },
|
|
170
|
+
} satisfies AutobuildPluginManifest
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### The manifest
|
|
174
|
+
|
|
175
|
+
Every module default-exports one strict `AutobuildPluginManifest`:
|
|
176
|
+
|
|
177
|
+
- **`name`** Nonblank diagnostic and ownership identity; need not equal the npm package name.
|
|
178
|
+
- **`apiVersion`** A semver **range accepted by the plugin**, not its package version: the narrowest range containing the host plugin API you ran contracts against. `ab plugin list` reports it beside the host version; invalid or incompatible ranges fail loading.
|
|
179
|
+
- **Registration keys** Only `ticketSources`, `agentRuntimes`, `workspaceProviders` and `forges`; unknown fields fail validation.
|
|
180
|
+
- **Adapter names** Register verbatim. Declare `__proto__` computed, `{ ['__proto__']: factory }`; a plain `__proto__:` key sets the prototype. Parsed maps have a null prototype, so undeclared names read `undefined`. Blank or whitespace-only names are rejected.
|
|
181
|
+
- **Registrations** A bare adapter factory, or `{ factory, contract: { factory, live? } }` whose contract factory returns that port suite's fixture factory. Ticket-source descriptors may declare a deduplicated `requiredEnv` list; the host rejects missing or empty credentials before invoking the selected factory.
|
|
182
|
+
|
|
183
|
+
### Factory context
|
|
184
|
+
|
|
185
|
+
Every adapter and contract factory receives `{ config, env, repoRoot }`: read-only `config`, the process `env`, and `repoRoot`, the absolute consuming-repository root.
|
|
186
|
+
|
|
187
|
+
| Port | `config` |
|
|
188
|
+
|---|---|
|
|
189
|
+
| ticket-source | the existing strict `[tickets]` fields; no untyped plugin-options table |
|
|
190
|
+
| workspace-provider | the open `[workspace.config]` table, the only place for adapter-owned settings |
|
|
191
|
+
| agent-runtime, forge | an empty object |
|
|
192
|
+
|
|
193
|
+
Workspace-provider factories also receive optional host-derived seams (API 1.7), absent when the call site has none; ignoring them changes nothing.
|
|
194
|
+
|
|
195
|
+
- **`storeRef`, `delegateCredential`** Store URL and credential-exchange callback; guaranteed when the registration declares `capabilities.storeRequirements`.
|
|
196
|
+
- **`runtimeReferences`** The host's effective runtime routes.
|
|
197
|
+
- **`origin`, `remoteBranchHead`** Checkout-less readers; when absent, fall back to host `git` from `repoRoot`.
|
|
198
|
+
|
|
199
|
+
Remote workspace factories must call `delegateCredential(storeRef, undefined, target)` for per-resource grants before provisioning or launching guests; parent authority stays in host composition.
|
|
200
|
+
|
|
201
|
+
- `storeToken` is retired and never supplied; factory environments exclude `AB_TOKEN`. Plugins that forwarded it must migrate to the callback and fail closed without it.
|
|
202
|
+
- Launch credentials travel through the separate transient execution-auth argument, never serialized execution identity.
|
|
203
|
+
|
|
204
|
+
### Configure and resolve
|
|
205
|
+
|
|
206
|
+
List module specifiers at the TOML root, before any table, and select adapters:
|
|
207
|
+
|
|
208
|
+
```toml
|
|
209
|
+
plugins = ["./autobuild-plugin.ts"]
|
|
210
|
+
forge = "acme"
|
|
211
|
+
|
|
212
|
+
[tickets]
|
|
213
|
+
source = "file"
|
|
214
|
+
readyState = "ready"
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
- Repository-path specifiers resolve from the config-bearing root, which is the immutable build worktree in scoped phases.
|
|
218
|
+
- npm package specifiers resolve from the consuming main checkout's installed dependencies first, then from the Autobuild installation the CLI runs from.
|
|
219
|
+
- Install extensions in the consuming repository with `bun add -d --exact @defrex/autobuild-<extension>`; a repository copy wins over an installed one, and missing packages fail and are never installed automatically.
|
|
220
|
+
- Specifiers must be unique: an exact repeat fails config validation before any plugin loads, naming the value and both positions.
|
|
221
|
+
|
|
222
|
+
### Loading rules
|
|
223
|
+
|
|
224
|
+
- Modules load in declaration order; registration is atomic per manifest.
|
|
225
|
+
- Resolution or evaluation failure, a missing or malformed default export, an incompatible API range, or a collision fails before any claims or builds.
|
|
226
|
+
- Within one port, builtin and earlier-plugin names can't be shadowed; a collision names the adapter and both owners. Different ports may share a name.
|
|
227
|
+
- Plugins are trusted like configured shell commands: Bun evaluates them in-process with repository authority and no sandbox.
|
|
228
|
+
|
|
229
|
+
### Cached dispatcher generations
|
|
230
|
+
|
|
231
|
+
In a cached dispatcher generation, selection uses the same roots, but selected external plugin code and its installed dependency closure are copied into an immutable auxiliary snapshot.
|
|
232
|
+
|
|
233
|
+
- ESM, CommonJS `require`, delayed imports, export-from and module-anchored `createRequire` all resolve the core package, SDK values and classes included, to the same frozen runtime, without loader hooks or source transforms.
|
|
234
|
+
- Repo-path modules copy their literal import closure and literal `new URL(..., import.meta.url)` assets, not the checkout or unused dev dependencies. Packaged plugins keep their package's assets and dependency graph.
|
|
235
|
+
- Package-relative assets stay beside copied modules. `import.meta.url` and filenames name the snapshot; cwd and factory `repoRoot` remain the consuming checkout. Explicit absolute paths stay plugin-controlled external resources.
|
|
236
|
+
- Snapshots use neutral compiler boundaries; cached Bun entrypoints pin the core config with `--no-install --tsconfig-override`. Autobuild-owned compiler chains can't escape the runtime; installed third-party development configs are preserved byte-for-byte.
|
|
237
|
+
- New selections can prepare new snapshots without changing the generation's core identity. Live plugin processes keep their core runtime independently of Store leases.
|
|
238
|
+
- Plugin-loading CLI calls reclaim dead snapshots, so edits between phase commands don't pile up checkout-sized copies.
|
|
239
|
+
|
|
240
|
+
Noncached consumers follow the separately loaded SDK compatibility rules in section 1.
|
|
241
|
+
|
|
242
|
+
## 3. Keep secrets out of source and config
|
|
243
|
+
|
|
244
|
+
- Never put credentials in `autobuild.toml`, the manifest, committed fixtures or contract output.
|
|
245
|
+
- Read them from the factory's `env` (for example `env.ACME_FORGE_TOKEN`), document the required environment variables, and keep local values in ignored env files or a secret manager.
|
|
246
|
+
- Validate credentials when the selected adapter or live fixture is created, not at module top level, so registration stays lazy and diagnostics can inspect unrelated adapters. Ticket-source descriptors should declare `requiredEnv`; other ports check in their factories.
|
|
247
|
+
|
|
248
|
+
## 4. Add the contract harness first
|
|
249
|
+
|
|
250
|
+
A contract-bearing registration:
|
|
251
|
+
|
|
252
|
+
```ts
|
|
253
|
+
const manifest = {
|
|
254
|
+
name: 'acme',
|
|
255
|
+
apiVersion: '^1.2.0',
|
|
256
|
+
ticketSources: {
|
|
257
|
+
acme: {
|
|
258
|
+
factory: createAcmeTicketSource,
|
|
259
|
+
contract: { factory: createAcmeTicketContract },
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
} satisfies AutobuildPluginManifest
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
The contract factory returns a `TicketSourceContractFactory`, `AgentRunnerContractFactory`, `WorkspaceProviderContractFactory` or `ForgeContractFactory` (harness types from `@defrex/autobuild/plugin-sdk`). The host runs the unchanged shared suite; don't copy, wrap, skip or weaken its assertions.
|
|
266
|
+
|
|
267
|
+
Contract fixtures must:
|
|
268
|
+
|
|
269
|
+
- isolate resources (UUID-namespaced records, branches, PRs, sessions or workspaces)
|
|
270
|
+
- expose the independent controls and probes their harness type requires
|
|
271
|
+
- clean up in `cleanup`, even after an assertion failure
|
|
272
|
+
- make retries and release idempotent where the port requires it
|
|
273
|
+
|
|
274
|
+
A fixture that contacts a provider or mutates external resources must declare `contract: { factory, live: true }` and runs only with an explicit opt-in:
|
|
275
|
+
|
|
276
|
+
```sh
|
|
277
|
+
AB_RUN_LIVE_PORT_CONTRACTS=1 ab plugin test forge acme
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Author loop:
|
|
281
|
+
|
|
282
|
+
```sh
|
|
283
|
+
ab plugin list
|
|
284
|
+
ab plugin doctor
|
|
285
|
+
ab plugin test ticket-source acme
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
| Command | Does |
|
|
289
|
+
|---|---|
|
|
290
|
+
| `list` | builtins and configured registrations: provenance, resolution, API compatibility, contract availability |
|
|
291
|
+
| `doctor` | loads every configured module, nonzero if any fail; not a semantics check |
|
|
292
|
+
| `test` | runs the unchanged suite for one port and adapter, forwards per-test output, returns its exit status |
|
|
293
|
+
|
|
294
|
+
Repeat after every adapter change until the suite is green, with the live opt-in when applicable.
|
|
295
|
+
|
|
296
|
+
## 5. Zero-network wiring walkthrough
|
|
297
|
+
|
|
298
|
+
This scratch example proves module resolution, manifest spelling, configuration and the TicketSource contract bridge offline. It uses Autobuild's reference fake, so it is **only a wiring exercise**; your real adapter's harness must still pass the same suite.
|
|
299
|
+
|
|
300
|
+
Create `autobuild-plugin.ts`:
|
|
301
|
+
|
|
302
|
+
<!-- plugin-authoring-walkthrough-module:start -->
|
|
303
|
+
```ts
|
|
304
|
+
import { FakeTicketSource } from '@defrex/autobuild/plugin-sdk'
|
|
305
|
+
import type {
|
|
306
|
+
AutobuildPluginManifest,
|
|
307
|
+
TicketSourceContractFactory,
|
|
308
|
+
TicketSourcePluginFactory,
|
|
309
|
+
} from '@defrex/autobuild/plugin-sdk'
|
|
310
|
+
|
|
311
|
+
const createSource: TicketSourcePluginFactory = () => new FakeTicketSource()
|
|
312
|
+
|
|
313
|
+
const ticketContract: TicketSourceContractFactory = async () => ({
|
|
314
|
+
source: new FakeTicketSource([], {
|
|
315
|
+
createState: 'Triage',
|
|
316
|
+
doneState: 'Done',
|
|
317
|
+
}),
|
|
318
|
+
states: { ready: 'Ready', claimed: 'Doing', completed: 'Done' },
|
|
319
|
+
editableLabel: 'contract',
|
|
320
|
+
})
|
|
321
|
+
|
|
322
|
+
export default {
|
|
323
|
+
name: 'walkthrough',
|
|
324
|
+
apiVersion: '^1.2.0',
|
|
325
|
+
ticketSources: {
|
|
326
|
+
walkthrough: {
|
|
327
|
+
factory: createSource,
|
|
328
|
+
contract: { factory: () => ticketContract },
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
} satisfies AutobuildPluginManifest
|
|
332
|
+
```
|
|
333
|
+
<!-- plugin-authoring-walkthrough-module:end -->
|
|
334
|
+
|
|
335
|
+
Create `autobuild.toml`:
|
|
336
|
+
|
|
337
|
+
<!-- plugin-authoring-walkthrough-config:start -->
|
|
338
|
+
```toml
|
|
339
|
+
plugins = ["./autobuild-plugin.ts"]
|
|
340
|
+
|
|
341
|
+
[tickets]
|
|
342
|
+
source = "walkthrough"
|
|
343
|
+
readyState = "ready"
|
|
344
|
+
```
|
|
345
|
+
<!-- plugin-authoring-walkthrough-config:end -->
|
|
346
|
+
|
|
347
|
+
Then run:
|
|
348
|
+
|
|
349
|
+
```sh
|
|
350
|
+
ab init
|
|
351
|
+
ab plugin doctor
|
|
352
|
+
ab plugin list
|
|
353
|
+
ab plugin test ticket-source walkthrough
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
`ab init` keeps the existing config and vendors this guide. Doctor and list show the `walkthrough` plugin and adapter; the contract run exits zero.
|
|
357
|
+
|
|
358
|
+
## 6. Package and publish when reuse warrants it
|
|
359
|
+
|
|
360
|
+
A repository-local module needs no packaging. An npm plugin needs one public module plus ordinary test and typecheck setup:
|
|
361
|
+
|
|
362
|
+
```text
|
|
363
|
+
acme-autobuild-plugin/
|
|
364
|
+
├── src/index.ts
|
|
365
|
+
├── package.json
|
|
366
|
+
├── tsconfig.json
|
|
367
|
+
└── bun.lock
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
This manifest declares only the tested host release (`1.0.0-beta.2`); widen it only after the unchanged contracts pass on each added host.
|
|
371
|
+
|
|
372
|
+
```json
|
|
373
|
+
{
|
|
374
|
+
"name": "@acme/autobuild-plugin",
|
|
375
|
+
"version": "1.0.0",
|
|
376
|
+
"type": "module",
|
|
377
|
+
"exports": { ".": "./src/index.ts" },
|
|
378
|
+
"files": ["src", "README.md"],
|
|
379
|
+
"scripts": {
|
|
380
|
+
"typecheck": "tsc --noEmit",
|
|
381
|
+
"test": "bun test",
|
|
382
|
+
"prepublishOnly": "bun run typecheck && bun test"
|
|
383
|
+
},
|
|
384
|
+
"devDependencies": { "@defrex/autobuild": "1.0.0-beta.2", "typescript": "5.9.3" },
|
|
385
|
+
"peerDependencies": { "@defrex/autobuild": "1.0.0-beta.2" },
|
|
386
|
+
"peerDependenciesMeta": { "@defrex/autobuild": { "optional": true } }
|
|
387
|
+
}
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
- **Dependencies.** Type-only SDK imports erase, so Autobuild is a dev dependency, not a runtime `dependencies` entry. The optional peer names the tested host without loading a second Autobuild copy. Runtime imports, such as the reference fake, need a runtime dependency; never ship the fake as a production adapter.
|
|
391
|
+
- **Versions.** Package semver is independent of the host range and `apiVersion`. On an incompatible host plugin API, update adapter and contracts, change the range once they pass, and version the package by the user-visible compatibility change.
|
|
392
|
+
|
|
393
|
+
Before publishing:
|
|
394
|
+
|
|
395
|
+
```sh
|
|
396
|
+
bun run typecheck
|
|
397
|
+
bun test
|
|
398
|
+
npm pack --dry-run
|
|
399
|
+
npm pack
|
|
400
|
+
# inspect the tarball, then install that exact .tgz in a scratch consumer
|
|
401
|
+
npm publish --access public
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
1. Check the dry-run and tarball file lists for source, secrets, local fixtures and missing exports.
|
|
405
|
+
2. Install the tarball in a scratch consuming repository with `plugins = ["@acme/autobuild-plugin"]`.
|
|
406
|
+
3. Rerun `ab plugin doctor`, `ab plugin list` and the contract command.
|
|
407
|
+
|
|
408
|
+
Drop `--access public` when the registry or access policy says otherwise.
|
|
409
|
+
|
|
410
|
+
Official npm references: [`package.json` fields](https://docs.npmjs.com/cli/v11/configuring-npm/package-json),
|
|
411
|
+
[`npm pack`](https://docs.npmjs.com/cli/v11/commands/npm-pack), and
|
|
412
|
+
[`npm publish`](https://docs.npmjs.com/cli/v11/commands/npm-publish).
|
|
413
|
+
|
|
414
|
+
## Optional ticket tree capability
|
|
415
|
+
|
|
416
|
+
Existing ticket sources stay compatible unchanged. Raw `Ticket.kind` is optional; public projections normalize it to `work`.
|
|
417
|
+
|
|
418
|
+
An adapter opts in with `integrationTree: true` and must:
|
|
419
|
+
|
|
420
|
+
- implement `listAll(): Promise<TicketListing>` over every state, ignoring ready filters, exhausting pagination and propagating infrastructure failures
|
|
421
|
+
- persist `kind?: 'work' | 'node'` and `target?: string | null` on drafts and updates: omitted preserves or defaults, explicit `work` resets kind, `null` clears target
|
|
422
|
+
- read targets as source-local canonical ticket ids
|
|
423
|
+
- before writing any mixed patch, including revision-checked writes, validate same-source existence, node kind, self and ancestor cycles, corrupt chains, and demotion of a node with children
|
|
424
|
+
- expose kind and target in revisions
|
|
425
|
+
|
|
426
|
+
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.
|
|
@@ -62,7 +62,7 @@ headers, or available backend.
|
|
|
62
62
|
`Date.toISOString()` form, for example `2026-07-15T12:00:00.000Z`.
|
|
63
63
|
- Event sequence numbers and artifact revisions are integers assigned by the
|
|
64
64
|
server. Clients must not assign either except for the negative deposit
|
|
65
|
-
placeholders described in [Atomic deposits](#
|
|
65
|
+
placeholders described in [Atomic deposits](#8-atomic-deposits).
|
|
66
66
|
- Optional object members are omitted, not represented as `null`, unless a
|
|
67
67
|
response below explicitly specifies JSON `null`.
|
|
68
68
|
- The server owns durability. Events and artifact metadata visible in a
|
|
@@ -144,8 +144,8 @@ An actor is exactly one of:
|
|
|
144
144
|
|
|
145
145
|
`role`, `session`, `user`, and `source` are nonempty strings. A human actor may
|
|
146
146
|
carry an optional `via` marker naming the delegate that performed the write on
|
|
147
|
-
the person's behalf: `{ "kind": "session", "id": nonempty }` (
|
|
148
|
-
|
|
147
|
+
the person's behalf: `{ "kind": "session", "id": nonempty }` (a human account's
|
|
148
|
+
operator-agent session) or `{ "kind": "mcp", "client": nonempty }` (an MCP
|
|
149
149
|
client). `via` is valid only on `human` actors and only on build and
|
|
150
150
|
repository events — session events are the delegate's own log — and a `via`
|
|
151
151
|
key on any other actor variant is a validation failure. These are the
|
|
@@ -688,7 +688,7 @@ authority:
|
|
|
688
688
|
## 5. Operator-session operations
|
|
689
689
|
|
|
690
690
|
Operator sessions are a third resource kind: durable orchestrator-conversation
|
|
691
|
-
state keyed by repository and operator. They are hosted-only — local installs
|
|
691
|
+
state keyed by repository and session owner (the human account in `operator`). They are hosted-only — local installs
|
|
692
692
|
interact through the CLI and dashboard and never create one — but the resource
|
|
693
693
|
contract is uniform, and a conforming server implements it the same way it
|
|
694
694
|
implements the repository journal. A session record is:
|
|
@@ -698,7 +698,7 @@ implements the repository journal. A session record is:
|
|
|
698
698
|
{
|
|
699
699
|
"id": "os_9f2c…", // server-assigned, `os_`-prefixed
|
|
700
700
|
"repo": "acme/autobuild",
|
|
701
|
-
"operator": "alice", // trimmed nonblank
|
|
701
|
+
"operator": "alice", // trimmed nonblank session-owner identity
|
|
702
702
|
"title": "fix the login flow", // optional
|
|
703
703
|
"createdAt": "2026-07-15T12:00:00.000Z",
|
|
704
704
|
"updatedAt": "2026-07-15T12:03:00.000Z"
|
|
@@ -707,13 +707,13 @@ implements the repository journal. A session record is:
|
|
|
707
707
|
|
|
708
708
|
Creating a session makes the record and its first event visible together: the
|
|
709
709
|
record's creation atomically appends a `session.created` event as sequence 1
|
|
710
|
-
with the
|
|
710
|
+
with the session owner as a `human` actor. The session event catalog is closed and
|
|
711
711
|
separate from the build and repository catalogs (`session.created`,
|
|
712
712
|
`message.posted`, `session.wake-set`, `turn.started`, `turn.suspended`,
|
|
713
713
|
`turn.resumed`, `approval.requested`, `approval.answered`, `turn.completed`,
|
|
714
714
|
`turn.failed`, `session.archived`), with its own per-session sequence starting
|
|
715
715
|
at 1 and its own actor-per-type rules. A `via` member is never valid on a
|
|
716
|
-
session event: session events are the delegate's own log, and the
|
|
716
|
+
session event: session events are the delegate's own log, and the session owner's
|
|
717
717
|
identity is already the actor.
|
|
718
718
|
|
|
719
719
|
| BuildStore operation | HTTP route | Request | Success |
|
|
@@ -967,7 +967,7 @@ project; phase CLI scoped handles still constrain build and session access.
|
|
|
967
967
|
Authenticated raw writes cannot claim a delegated `via`. Owner-project
|
|
968
968
|
credentials also use their recorded creator for operator writes. Dispatcher
|
|
969
969
|
credentials have an immutable server-side purpose: raw store and tickets only,
|
|
970
|
-
never
|
|
970
|
+
never operator controls. The hosted dispatcher issues one per project
|
|
971
971
|
invocation, expiring at its configured TTL, and does not revoke at tick return
|
|
972
972
|
for dispatcher plumbing. Spawned builds receive independent delegated grants. Shared content-addressed blobs
|
|
973
973
|
remain deduplicated; this is resource authorization, not blob partitioning.
|