@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/configuration.md
CHANGED
|
@@ -20,6 +20,195 @@ example](#complete-example) is valid on its own.
|
|
|
20
20
|
|
|
21
21
|
An **acceptance check** is a repository-owned agent verify step that runs the built software, exercises each acceptance criterion in the spec, attaches evidence, and returns a typed verdict. Every repository must configure one. It is not a test suite and leaves no test files behind.
|
|
22
22
|
|
|
23
|
+
## `[accounts]`
|
|
24
|
+
|
|
25
|
+
Named accounts select billing for Claude Code or Codex using the user's own
|
|
26
|
+
subscription or membership. Provision Claude and Kimi credentials manually on
|
|
27
|
+
the dispatcher host; Autobuild never runs `claude setup-token` or collects its
|
|
28
|
+
output. ChatGPT subscription accounts use OpenAI's browser authorization through
|
|
29
|
+
`ab accounts login NAME`; see [ChatGPT subscriptions](accounts.md#chatgpt-subscriptions)
|
|
30
|
+
for destinations, protected storage and the single-refresher rule.
|
|
31
|
+
|
|
32
|
+
<!-- config-fragment:accounts -->
|
|
33
|
+
```toml
|
|
34
|
+
[accounts.personal]
|
|
35
|
+
kind = "claude-subscription"
|
|
36
|
+
credentialEnv = "CLAUDE_CODE_OAUTH_TOKEN"
|
|
37
|
+
|
|
38
|
+
[accounts.kimi]
|
|
39
|
+
kind = "kimi-code"
|
|
40
|
+
credentialEnv = "KIMI_CODE_KEY"
|
|
41
|
+
region = "overseas"
|
|
42
|
+
|
|
43
|
+
[accounts.kimi-china]
|
|
44
|
+
kind = "kimi-code"
|
|
45
|
+
credentialEnv = "KIMI_CHINA_KEY"
|
|
46
|
+
region = "china"
|
|
47
|
+
|
|
48
|
+
[roles.implement]
|
|
49
|
+
runtime = "claude"
|
|
50
|
+
account = "kimi"
|
|
51
|
+
model = "kimi-for-coding"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`account` inherits independently on roles and alternates. Without an explicit
|
|
55
|
+
selection, a Claude route chooses the sole Claude subscription account; multiple
|
|
56
|
+
Claude subscription accounts require an explicit selection. ChatGPT accounts
|
|
57
|
+
require explicit selection on Codex; Claude and Kimi accounts require Claude Code.
|
|
58
|
+
Incompatible runtime selections are rejected. Repositories with no accounts
|
|
59
|
+
retain legacy authentication.
|
|
60
|
+
Locally a Claude subscription can use its named token or the host login; Kimi
|
|
61
|
+
requires its membership key. Invalid Claude/Kimi credentials need renewal
|
|
62
|
+
(`claude setup-token` for Claude, replacement membership key for Kimi). Invalid
|
|
63
|
+
ChatGPT credentials require `ab accounts login NAME` for the owning destination;
|
|
64
|
+
quota and overload failures retain alternate fallback.
|
|
65
|
+
|
|
66
|
+
Choose the region of your Kimi membership. The default `overseas` selects
|
|
67
|
+
`https://api.kimi.ai/coding/`; `china` selects `https://api.kimi.com/coding/`.
|
|
68
|
+
The base URL and egress hostname are fixed together and cannot be overridden
|
|
69
|
+
independently. There is no cross-region retry or assertion that keys work across
|
|
70
|
+
regions. Claude Code keeps its native User-Agent.
|
|
71
|
+
|
|
72
|
+
In Vercel Sandbox the guest holds stable nonsecret placeholders, including when
|
|
73
|
+
credential variables are explicitly allowlisted. The host egress policy replaces
|
|
74
|
+
an exact account placeholder header only on its provider's exact hostname.
|
|
75
|
+
The next dispatcher observation tick refreshes credentials for subsequent
|
|
76
|
+
requests without reprovisioning. Changing a local dispatcher's `.env` still needs
|
|
77
|
+
a restart. Accounts are deployment-owned descriptors; configuration artifacts
|
|
78
|
+
contain variable names, never values. ChatGPT accounts must use credential slots
|
|
79
|
+
distinct from every other account. Existing ChatGPT descriptors cannot be
|
|
80
|
+
replaced or removed during live configuration reload: stop dispatch first, or
|
|
81
|
+
introduce a new account name. This restriction qualifies the hot-reload entries
|
|
82
|
+
below.
|
|
83
|
+
|
|
84
|
+
Validation reports credential readiness and makes one minimal model request per
|
|
85
|
+
declared account, including unused accounts, through its runtime (Claude Code
|
|
86
|
+
for Claude/Kimi, Codex for ChatGPT) in the disposable sandbox. Hosted ChatGPT
|
|
87
|
+
project secrets report readiness from write-only status metadata instead; the
|
|
88
|
+
first hosted build is the live check. See
|
|
89
|
+
[ChatGPT subscriptions](accounts.md#chatgpt-subscriptions).
|
|
90
|
+
|
|
91
|
+
<!-- configuration-reference:accounts -->
|
|
92
|
+
|
|
93
|
+
#### `accounts`
|
|
94
|
+
|
|
95
|
+
**TOML key:** `accounts`
|
|
96
|
+
|
|
97
|
+
- **Type:** `table`
|
|
98
|
+
- **Default:** `{}`
|
|
99
|
+
- **Required:** Optional
|
|
100
|
+
- **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
|
|
101
|
+
|
|
102
|
+
**Description:** Named Claude subscription, Kimi Code, or ChatGPT subscription billing accounts. Descriptors contain credential variable names only.
|
|
103
|
+
|
|
104
|
+
**Constraints:** Entry names: nonempty
|
|
105
|
+
|
|
106
|
+
#### `accounts.<name>`
|
|
107
|
+
|
|
108
|
+
**TOML key:** `accounts.<name>`
|
|
109
|
+
|
|
110
|
+
- **Type:** `strict table | strict table | strict table`
|
|
111
|
+
- **Default:** `omitted`
|
|
112
|
+
- **Required:** Required
|
|
113
|
+
- **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
|
|
114
|
+
|
|
115
|
+
**Description:** Named nonsecret billing account descriptor.
|
|
116
|
+
|
|
117
|
+
**Constraints:** None beyond the input type.
|
|
118
|
+
|
|
119
|
+
#### `accounts.<name>.kind` (kind = "chatgpt-subscription")
|
|
120
|
+
|
|
121
|
+
**TOML key:** `accounts.<name>.kind`
|
|
122
|
+
|
|
123
|
+
- **Type:** `"chatgpt-subscription"`
|
|
124
|
+
- **Default:** `omitted`
|
|
125
|
+
- **Required:** Required when kind = "chatgpt-subscription"
|
|
126
|
+
- **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
|
|
127
|
+
|
|
128
|
+
**Description:** Claude subscription, Kimi Code membership, or ChatGPT subscription (Codex only).
|
|
129
|
+
|
|
130
|
+
**Constraints:** None beyond the input type.
|
|
131
|
+
|
|
132
|
+
#### `accounts.<name>.credentialEnv` (kind = "chatgpt-subscription")
|
|
133
|
+
|
|
134
|
+
**TOML key:** `accounts.<name>.credentialEnv`
|
|
135
|
+
|
|
136
|
+
- **Type:** `string`
|
|
137
|
+
- **Default:** `omitted`
|
|
138
|
+
- **Required:** Required when kind = "chatgpt-subscription"
|
|
139
|
+
- **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
|
|
140
|
+
|
|
141
|
+
**Description:** Host credential variable name; ChatGPT names a host-resolved access-token slot, never a credential value.
|
|
142
|
+
|
|
143
|
+
**Constraints:** matches /^[A-Za-z_][A-Za-z0-9_]*$/; Autobuild control variables cannot hold account credentials; Portable environment variable identifier; AB_ control variables are reserved.
|
|
144
|
+
|
|
145
|
+
#### `accounts.<name>.kind` (kind = "claude-subscription")
|
|
146
|
+
|
|
147
|
+
**TOML key:** `accounts.<name>.kind`
|
|
148
|
+
|
|
149
|
+
- **Type:** `"claude-subscription"`
|
|
150
|
+
- **Default:** `omitted`
|
|
151
|
+
- **Required:** Required when kind = "claude-subscription"
|
|
152
|
+
- **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
|
|
153
|
+
|
|
154
|
+
**Description:** Claude subscription, Kimi Code membership, or ChatGPT subscription (Codex only).
|
|
155
|
+
|
|
156
|
+
**Constraints:** None beyond the input type.
|
|
157
|
+
|
|
158
|
+
#### `accounts.<name>.credentialEnv` (kind = "claude-subscription")
|
|
159
|
+
|
|
160
|
+
**TOML key:** `accounts.<name>.credentialEnv`
|
|
161
|
+
|
|
162
|
+
- **Type:** `string`
|
|
163
|
+
- **Default:** `omitted`
|
|
164
|
+
- **Required:** Required when kind = "claude-subscription"
|
|
165
|
+
- **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
|
|
166
|
+
|
|
167
|
+
**Description:** Host credential variable name; ChatGPT names a host-resolved access-token slot, never a credential value.
|
|
168
|
+
|
|
169
|
+
**Constraints:** matches /^[A-Za-z_][A-Za-z0-9_]*$/; Autobuild control variables cannot hold account credentials; Portable environment variable identifier; AB_ control variables are reserved.
|
|
170
|
+
|
|
171
|
+
#### `accounts.<name>.kind` (kind = "kimi-code")
|
|
172
|
+
|
|
173
|
+
**TOML key:** `accounts.<name>.kind`
|
|
174
|
+
|
|
175
|
+
- **Type:** `"kimi-code"`
|
|
176
|
+
- **Default:** `omitted`
|
|
177
|
+
- **Required:** Required when kind = "kimi-code"
|
|
178
|
+
- **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
|
|
179
|
+
|
|
180
|
+
**Description:** Claude subscription, Kimi Code membership, or ChatGPT subscription (Codex only).
|
|
181
|
+
|
|
182
|
+
**Constraints:** None beyond the input type.
|
|
183
|
+
|
|
184
|
+
#### `accounts.<name>.credentialEnv` (kind = "kimi-code")
|
|
185
|
+
|
|
186
|
+
**TOML key:** `accounts.<name>.credentialEnv`
|
|
187
|
+
|
|
188
|
+
- **Type:** `string`
|
|
189
|
+
- **Default:** `omitted`
|
|
190
|
+
- **Required:** Required when kind = "kimi-code"
|
|
191
|
+
- **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
|
|
192
|
+
|
|
193
|
+
**Description:** Host credential variable name; ChatGPT names a host-resolved access-token slot, never a credential value.
|
|
194
|
+
|
|
195
|
+
**Constraints:** matches /^[A-Za-z_][A-Za-z0-9_]*$/; Autobuild control variables cannot hold account credentials; Portable environment variable identifier; AB_ control variables are reserved.
|
|
196
|
+
|
|
197
|
+
#### `accounts.<name>.region` (kind = "kimi-code")
|
|
198
|
+
|
|
199
|
+
**TOML key:** `accounts.<name>.region`
|
|
200
|
+
|
|
201
|
+
- **Type:** `"overseas" | "china"`
|
|
202
|
+
- **Default:** `"overseas"`
|
|
203
|
+
- **Required:** Optional when kind = "kimi-code"
|
|
204
|
+
- **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
|
|
205
|
+
|
|
206
|
+
**Description:** Membership region: overseas (default) or china. Selects the base URL and exact egress host together.
|
|
207
|
+
|
|
208
|
+
**Constraints:** None beyond the input type.
|
|
209
|
+
|
|
210
|
+
<!-- configuration-reference:/accounts -->
|
|
211
|
+
|
|
23
212
|
## `[store]`
|
|
24
213
|
|
|
25
214
|
<!-- configuration-reference:store -->
|
|
@@ -55,100 +244,14 @@ An **acceptance check** is a repository-owned agent verify step that runs the bu
|
|
|
55
244
|
Selection is explicit `--store` > nonblank `AB_STORE` > `[store] url` > the main
|
|
56
245
|
checkout's `.autobuild/`. A configured service without a user credential fails
|
|
57
246
|
with `ab connect` guidance. `AB_TOKEN` overrides the saved service/project
|
|
58
|
-
credential. See [connecting a project](
|
|
247
|
+
credential. See [connecting a project](setup.md#connect-a-project).
|
|
59
248
|
Changing the store requires restarting dispatch.
|
|
60
249
|
|
|
61
|
-
## Hosted service and PostgreSQL BuildStore environment
|
|
62
|
-
|
|
63
|
-
The optional `@defrex/autobuild-hosted-store-service` and its
|
|
64
|
-
`@defrex/autobuild-postgres-store` adapter are configured entirely through the
|
|
65
|
-
environment. They are published to npm as separate packages alongside the
|
|
66
|
-
`@defrex/autobuild` CLI, so a CLI install never acquires the service,
|
|
67
|
-
PostgreSQL, or blob-provider dependencies; a project that embeds the adapter
|
|
68
|
-
or the service adds the package it needs (`bun add
|
|
69
|
-
@defrex/autobuild-postgres-store` or `bun add
|
|
70
|
-
@defrex/autobuild-hosted-store-service`). The cron-driven hosted dispatcher is
|
|
71
|
-
separately published as `@defrex/autobuild-hosted-dispatcher`; a deployment
|
|
72
|
-
opts into building by installing that package, and its `AB_DISPATCHER_*`
|
|
73
|
-
variables are documented in the [hosted-dispatcher runbook](hosted-dispatcher.md),
|
|
74
|
-
not here. The deployable web application still
|
|
75
|
-
runs from a release checkout: choose the compatible tag shown in
|
|
76
|
-
[GitHub Releases](https://github.com/defrex/autobuild/releases), clone that exact
|
|
77
|
-
revision into a dedicated checkout, and run the idempotent migration there:
|
|
78
|
-
|
|
79
|
-
```sh
|
|
80
|
-
git clone --depth 1 --branch v0.6.0 --single-branch https://github.com/defrex/autobuild.git autobuild-v0.6.0
|
|
81
|
-
cd autobuild-v0.6.0
|
|
82
|
-
bun install --frozen-lockfile
|
|
83
|
-
DATABASE_URL=postgres://… bun run postgres:migrate
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
Replace `v0.6.0` with the selected release tag. Schema diagnostics' root
|
|
87
|
-
`postgres:migrate` script is relative to that pinned checkout. A hosted build
|
|
88
|
-
can run the same step itself: `bun run deploy:build` — run from the hosted
|
|
89
|
-
store service package directory (`packages/hosted-store-service`), the Next.js
|
|
90
|
-
project directory — migrates against the
|
|
91
|
-
deployment's database URL, logs the host it prepared, and then builds the web
|
|
92
|
-
application, failing the build when no database URL is configured or the
|
|
93
|
-
schema is incompatible. The database
|
|
94
|
-
identity needs permission to create tables during migration and to select,
|
|
95
|
-
insert, and update those tables at runtime. The complete run, deployment, and
|
|
96
|
-
token procedure is in the [hosted service
|
|
97
|
-
guide](../packages/hosted-store-service/README.md); clients use the
|
|
98
|
-
separate signed-user token described by the [operator API](operator-api.md).
|
|
99
|
-
|
|
100
|
-
| Variable | Required when | Values / purpose |
|
|
101
|
-
|---|---|---|
|
|
102
|
-
| `AB_STORE_SECRET` | Hosted service | Nonblank HMAC signing secret. Service-side only; never give it to clients. |
|
|
103
|
-
| `AB_HOST` | Optional, ordinary Bun host | Bind hostname; defaults to `0.0.0.0`. Vercel supplies its own listener. |
|
|
104
|
-
| `PORT` | Optional, ordinary Bun host | Integer 1–65535; defaults to `3000`. Vercel supplies its own listener. |
|
|
105
|
-
| `AB_STORE` | Remote client | Hosted service base URL used by the kernel, phase commands, and dashboard. |
|
|
106
|
-
| `AB_TOKEN` | Authenticated remote client | Explicit project bearer credential override for CI; otherwise use ab connect. This is not the signing secret. |
|
|
107
|
-
| `BETTER_AUTH_SECRET` | Web dashboard | Independent server-only session secret with at least 32 high-entropy characters. |
|
|
108
|
-
| `BETTER_AUTH_URL` | Web dashboard | Exact HTTP(S) origin, without credentials or a path; HTTPS is mandatory in production. |
|
|
109
|
-
| `GITHUB_CLIENT_ID` | GitHub sign-in | OAuth application client id. |
|
|
110
|
-
| `GITHUB_CLIENT_SECRET` | GitHub sign-in | Server-only OAuth application secret. |
|
|
111
|
-
| `AB_WEB_AUTH_PROVIDERS` | Web dashboard | Comma-separated provider set; currently exactly `github`. |
|
|
112
|
-
| `AB_WEB_SUPER_USER_EMAILS` | Web dashboard | Nonempty comma-separated super-user emails; matching is case-insensitive. Ordinary users require organization membership. |
|
|
113
|
-
| `AB_WEB_REPOSITORIES` | Hosted service | Deprecated once-per-database bootstrap CSV for the durable project registry. Use owner commands thereafter; see [connected projects](setup.md#connected-projects). |
|
|
114
|
-
|
|
115
|
-
GitHub's callback is `{BETTER_AUTH_URL}/api/auth/callback/github`; the app needs
|
|
116
|
-
the `user:email` scope (or GitHub App read-only email permission). Sessions are
|
|
117
|
-
database-backed and represented in the browser only by an HTTP-only cookie.
|
|
118
|
-
Membership or super-user removal takes effect on the next web API request or MCP tool call. Never expose these
|
|
119
|
-
secrets, `AB_STORE_SECRET`, database/blob credentials, machine tokens, or OAuth
|
|
120
|
-
account tokens through a `NEXT_PUBLIC_` variable.
|
|
121
|
-
|
|
122
|
-
The following variables configure the service-side durable adapter (or a direct
|
|
123
|
-
use of `@defrex/autobuild-postgres-store`).
|
|
124
|
-
|
|
125
|
-
| Variable | Required when | Values / purpose |
|
|
126
|
-
|---|---|---|
|
|
127
|
-
| `DATABASE_URL` | Always, unless `AB_POSTGRES_URL` is set | Nonblank PostgreSQL connection URL under its conventional name, as Vercel's Neon and Postgres storage integrations inject it. |
|
|
128
|
-
| `AB_POSTGRES_URL` | Optional override | Explicit Autobuild-specific connection URL; a nonblank value wins over `DATABASE_URL`. No other ambient variable is consulted. |
|
|
129
|
-
| `AB_BLOB_BACKEND` | Always | `s3` or `vercel`. |
|
|
130
|
-
| `AB_BLOB_PREFIX` | Optional | Object pathname prefix; redundant `/` characters are normalized. |
|
|
131
|
-
| `AB_S3_BUCKET` | S3 | Bucket name. |
|
|
132
|
-
| `AB_S3_REGION` | S3 | S3 signing region. |
|
|
133
|
-
| `AB_S3_ENDPOINT` | Optional, S3 | Endpoint URL for an S3-compatible service. |
|
|
134
|
-
| `AB_S3_ACCESS_KEY_ID` | S3 | Explicit access key; ambient AWS credential lookup is not used. |
|
|
135
|
-
| `AB_S3_SECRET_ACCESS_KEY` | S3 | Explicit secret key. |
|
|
136
|
-
| `AB_S3_SESSION_TOKEN` | Optional, S3 | Explicit temporary-credential session token. |
|
|
137
|
-
| `AB_S3_FORCE_PATH_STYLE` | Optional, S3 | Exact boolean `true` or `false`. |
|
|
138
|
-
| `AB_VERCEL_BLOB_ACCESS` | Vercel | `public` or `private`. |
|
|
139
|
-
| `BLOB_READ_WRITE_TOKEN` | Vercel auth option | Blob read-write token. |
|
|
140
|
-
| `VERCEL_OIDC_TOKEN` | Vercel OIDC option | Must be paired with `BLOB_STORE_ID` when no read-write token is supplied. |
|
|
141
|
-
| `BLOB_STORE_ID` | Vercel OIDC option | Must be paired with `VERCEL_OIDC_TOKEN`. |
|
|
142
|
-
|
|
143
|
-
S3 identities need `GetObject` and `PutObject` on the bucket/prefix. The adapter
|
|
144
|
-
maps only a provider 404 to absence and propagates authorization/service errors.
|
|
145
|
-
Vercel object names are deterministic and overwritten idempotently.
|
|
146
|
-
|
|
147
250
|
## Strict parsing and validation
|
|
148
251
|
|
|
149
252
|
Parsing is strict. Unknown top-level keys or tables, unknown fields in a known
|
|
150
253
|
table, fields from the wrong step variant, malformed values, and dangling
|
|
151
|
-
command references are errors. The open maps are `[commands]`, `[roles]`,
|
|
254
|
+
command references are errors. The open maps are `[accounts]`, `[commands]`, `[roles]`,
|
|
152
255
|
`[workspace.config]`, `[workspace.config.runtimeProvisioning]`,
|
|
153
256
|
`[verify.<step>]`, and `[finalize.<step>]`. Autobuild
|
|
154
257
|
validates repository-defined command, role, and step entries.
|
|
@@ -188,7 +291,7 @@ instead: a push to the base branch is honored by a later tick without
|
|
|
188
291
|
restarting anything. Hot fields apply immediately; restart-classified fields
|
|
189
292
|
keep the startup-built adapters and file the existing restart-required notice
|
|
190
293
|
(a long-lived origin-mode watch picks them up on its next process restart;
|
|
191
|
-
|
|
294
|
+
origin-mode dispatch reads configuration from the forge).
|
|
192
295
|
Each dispatch, build, check, or agent action captures the accepted configuration
|
|
193
296
|
snapshot at its start boundary: work already running is not interrupted, while
|
|
194
297
|
the next setup or pipeline step of the same in-flight build uses the new
|
|
@@ -209,8 +312,8 @@ the worktree file has uncommitted edits, because the clean/dirty comparison
|
|
|
209
312
|
could not be performed (non-git workspace or a transient git error), or because
|
|
210
313
|
the branch head never carried the file — the deposit records the source
|
|
211
314
|
`worktree-dirty` with no commit. The build still runs the worktree bytes, but
|
|
212
|
-
provenance declines to attribute them to any commit. **Deployment-owned** sections — `[roles]`
|
|
213
|
-
(runtime, model, args, alternates, per-role `sessionBudgetSeconds`) and
|
|
315
|
+
provenance declines to attribute them to any commit. **Deployment-owned** sections — `[accounts]` and `[roles]`
|
|
316
|
+
(runtime, model, account, args, alternates, per-role `sessionBudgetSeconds`) and
|
|
214
317
|
`[policy]` — keep flowing live. **Dispatcher-owned** sections (`baseBranch`,
|
|
215
318
|
`capacity`, `ticketScanIntervalSeconds`, `forge`, `plugins`, `pr`, `tickets`, `orchestrator`) configure the
|
|
216
319
|
dispatcher itself and are never interpreted by the build runner.
|
|
@@ -271,6 +374,7 @@ These fields hot-reload:
|
|
|
271
374
|
| `[commands]` | Next setup, verify check, or finalize check selected for a build whose OWN branch carries it. Dispatcher readiness, resume, and recovery use the same pin. A base-branch reload does not retarget an in-flight build. |
|
|
272
375
|
| `[verify]` and `[finalize]` | Next engine step selection for a build whose OWN branch carries it. Dispatcher readiness, resume, and recovery use the same pin. An approved plan's selection applies unless unknown names require default-all fallback, and a base-branch reload does not retarget an in-flight build. |
|
|
273
376
|
| `[workspace]` provider and config (including `provisioning`) | Next launch of a build whose OWN branch carries it. A base-branch reload never re-provisions an in-flight build. |
|
|
377
|
+
| `[accounts]` | Descriptors are adopted atomically with roles at the next session boundary, except existing ChatGPT descriptors require stopped dispatch before replacement or removal (see [accounts](#accounts)); credentials refresh on observation ticks. |
|
|
274
378
|
| `[roles]` | Next agent invocation for that role. Runtime, model, args, alternates, and the session budget are captured together and delivered live. |
|
|
275
379
|
| `[upgrade]` | Cancels preparation when disabled; automatic target checks every 60 seconds. |
|
|
276
380
|
| `[policy]` | Next policy, convergence, or agent-session boundary, delivered live. A running session keeps its captured budget. |
|
|
@@ -857,7 +961,7 @@ before claims and list every available builtin and plugin provider.
|
|
|
857
961
|
|
|
858
962
|
### Vercel Sandbox
|
|
859
963
|
|
|
860
|
-
Remote execution is explicit and requires the
|
|
964
|
+
Remote execution is explicit and requires an HTTPS remote store that speaks the remote BuildStore protocol plus its
|
|
861
965
|
scoped token, an HTTPS `github.com/owner/repository` origin, `forge = "github"`,
|
|
862
966
|
and Vercel authentication. Use either `VERCEL_OIDC_TOKEN`, or all of
|
|
863
967
|
`VERCEL_TOKEN`, `VERCEL_TEAM_ID`, and `VERCEL_PROJECT_ID`. The dispatcher also
|
|
@@ -1197,7 +1301,7 @@ by reinstalling the archive before reuse, so an upgraded dispatcher retrofits
|
|
|
1197
1301
|
its persistent guests. Cached registry generations deliver their own manifest
|
|
1198
1302
|
version’s validated GitHub release asset, resolved on first guest use and cached
|
|
1199
1303
|
separately from the normalized host archive. Local launches need no asset fetch; source generations deliver exact packed source bytes (see "Guest distribution version selection and delivery"
|
|
1200
|
-
in docs/setup.md for the release-and-upgrade delivery path and the
|
|
1304
|
+
in docs/setup.md for the release-and-upgrade delivery path and the instance
|
|
1201
1305
|
store's supported client window). Immediately
|
|
1202
1306
|
before every build-child launch, the adapter verifies the
|
|
1203
1307
|
provisioned absolute Bun executable and every referenced runtime again. A
|
|
@@ -1273,12 +1377,11 @@ Vercel images or package managers.
|
|
|
1273
1377
|
Vercel workspaces return an absolute guest `path` plus an opaque sandbox-name
|
|
1274
1378
|
`ref`; they omit dispatcher-local path evidence. Branch config, relative/package
|
|
1275
1379
|
plugins, installed skills, setup, runtimes, checks, and phase CLI commands all
|
|
1276
|
-
resolve in the guest checkout. Only names in `environmentVariables
|
|
1380
|
+
resolve in the guest checkout. Only names in `environmentVariables`, declared account placeholders, and scoped `AB_STORE`/`AB_TOKEN` enter
|
|
1277
1381
|
commands—dispatcher environment variables are never copied wholesale. Pi in a
|
|
1278
1382
|
sandbox should use an API-key provider such as `vercel-ai-gateway/...` with
|
|
1279
|
-
`AI_GATEWAY_API_KEY`; never copy dispatcher `~/.pi` state, OAuth refresh tokens,
|
|
1280
|
-
or attempt an interactive login.
|
|
1281
|
-
Claude Code, and plugin runtimes.
|
|
1383
|
+
`AI_GATEWAY_API_KEY`; never copy dispatcher `~/.pi` state, Pi OAuth refresh tokens,
|
|
1384
|
+
or attempt an interactive login. Plugin runtimes retain their existing API authentication. Claude Code can select a subscription or Kimi billing account. Codex can explicitly select a ChatGPT subscription authorized with `bun ab accounts login NAME`; one local dispatcher or hosted refreshing secret owns renewal, and the real tokens stay on the host.
|
|
1282
1385
|
|
|
1283
1386
|
The opt-in live lifecycle suite is
|
|
1284
1387
|
`packages/core/src/scenarios/vercel-sandbox.live.test.ts`. Set
|
|
@@ -1940,8 +2043,9 @@ failures become failure-tolerant follow-up observations.
|
|
|
1940
2043
|
|
|
1941
2044
|
## `[roles]`
|
|
1942
2045
|
|
|
1943
|
-
An open map from a nonempty role name to
|
|
1944
|
-
wall-clock session budget, and an ordered
|
|
2046
|
+
An open map from a nonempty role name to four primary agent axes (runtime,
|
|
2047
|
+
model, account, and args), one wall-clock session budget, and an ordered
|
|
2048
|
+
alternate list. All six live fields
|
|
1945
2049
|
inherit independently. The reserved
|
|
1946
2050
|
`default` entry is required to name a runtime, is the raw base for every other
|
|
1947
2051
|
role, and is never dispatched itself. Missing it fails eagerly before any
|
|
@@ -1975,6 +2079,19 @@ session starts, with a copyable table and all registered runtime names.
|
|
|
1975
2079
|
|
|
1976
2080
|
**Constraints:** None beyond the input type.
|
|
1977
2081
|
|
|
2082
|
+
#### `roles.<name>.account`
|
|
2083
|
+
|
|
2084
|
+
**TOML key:** `roles.<name>.account`
|
|
2085
|
+
|
|
2086
|
+
- **Type:** `string`
|
|
2087
|
+
- **Default:** `omitted`
|
|
2088
|
+
- **Required:** Optional
|
|
2089
|
+
- **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
|
|
2090
|
+
|
|
2091
|
+
**Description:** Named billing account; inherits independently. Claude selects the sole subscription account when omitted.
|
|
2092
|
+
|
|
2093
|
+
**Constraints:** minimum length 1; matches /\S/
|
|
2094
|
+
|
|
1978
2095
|
#### `roles.<name>.runtime`
|
|
1979
2096
|
|
|
1980
2097
|
**TOML key:** `roles.<name>.runtime`
|
|
@@ -2053,6 +2170,19 @@ session starts, with a copyable table and all registered runtime names.
|
|
|
2053
2170
|
|
|
2054
2171
|
**Constraints:** Omission inherits the base alternate list, otherwise resolves to an empty list; each alternate overlays the resolved primary axes.
|
|
2055
2172
|
|
|
2173
|
+
#### `roles.<name>.alternates[].account`
|
|
2174
|
+
|
|
2175
|
+
**TOML key:** `roles.<name>.alternates[].account`
|
|
2176
|
+
|
|
2177
|
+
- **Type:** `string`
|
|
2178
|
+
- **Default:** `omitted`
|
|
2179
|
+
- **Required:** Optional
|
|
2180
|
+
- **Reload:** Hot: next dispatcher action captures the accepted value. A running invocation keeps its captured values.
|
|
2181
|
+
|
|
2182
|
+
**Description:** Named billing account; inherits independently. Claude selects the sole subscription account when omitted.
|
|
2183
|
+
|
|
2184
|
+
**Constraints:** minimum length 1; matches /\S/
|
|
2185
|
+
|
|
2056
2186
|
#### `roles.<name>.alternates[].runtime`
|
|
2057
2187
|
|
|
2058
2188
|
**TOML key:** `roles.<name>.alternates[].runtime`
|
|
@@ -2132,15 +2262,24 @@ runtime does not discard a model inherited from `default`; the resulting exact
|
|
|
2132
2262
|
pair must be compatible. Autobuild never searches for a runtime that happens
|
|
2133
2263
|
to serve a configured model and never substitutes a different model to repair
|
|
2134
2264
|
an invalid pair. The only implicit fill is when neither the role nor `default`
|
|
2135
|
-
names a model
|
|
2136
|
-
|
|
2137
|
-
|
|
2265
|
+
names a model: a `claude` route selecting a Kimi Code account defaults to
|
|
2266
|
+
`kimi-for-coding`, while every other route uses its runtime's own default. Every
|
|
2267
|
+
alternate overlays that concrete role's effective primary runtime, model, account,
|
|
2268
|
+
and args, then undergoes the same exact-pair validation. Model defaults are applied
|
|
2269
|
+
after these axes are merged, so an alternate without an explicit or inherited
|
|
2270
|
+
model uses the default for its own selected account and runtime. Each configured string is
|
|
2138
2271
|
one argv token; Autobuild does not shell-expand it. The narrow rejected set is
|
|
2139
2272
|
derived from the model and machine-readable protocol options each adapter emits:
|
|
2140
2273
|
Claude rejects `-p`/`--print`, `--output-format`, and `--model`; Codex rejects
|
|
2141
2274
|
`--json` and `--model`/`-m`; Pi rejects `--mode` and `--model`. Claude and Codex
|
|
2142
2275
|
also reject a standalone `--` because Autobuild owns and appends that structural
|
|
2143
|
-
separator immediately before their positional prompt.
|
|
2276
|
+
separator immediately before their positional prompt. Claude routes with a selected
|
|
2277
|
+
account additionally reject `--settings`, `--setting-sources`, and `--bare`
|
|
2278
|
+
because Autobuild owns their authentication settings. Codex routes selecting a
|
|
2279
|
+
ChatGPT subscription account additionally reject `-c`, `--config`, `--profile`,
|
|
2280
|
+
`-p`, `--enable`, and `--disable` because Autobuild owns their provider and
|
|
2281
|
+
configuration routing. This includes using `-c` to set reasoning effort. Routes
|
|
2282
|
+
without an account retain the existing argument behavior. Those option spellings,
|
|
2144
2283
|
`--option=value` forms, compact documented short aliases, and the exact affected
|
|
2145
2284
|
prompt separator join the eager aggregated startup error with a
|
|
2146
2285
|
role/runtime-specific diagnostic. Every other option passes through without
|
|
@@ -2159,9 +2298,10 @@ Autobuild does not install Pi. `ab init` reports a missing or older executable
|
|
|
2159
2298
|
as unusable, and `pi` must be logged in for every configured model. `ab models`
|
|
2160
2299
|
lists this local catalog, while `ab models --available` limits it to models with
|
|
2161
2300
|
configured credentials. Builtin and plugin runtimes use the same exact-pair
|
|
2162
|
-
validation and event attribution. With no configured model,
|
|
2163
|
-
|
|
2164
|
-
default
|
|
2301
|
+
validation and event attribution. With no configured or inherited model, a Claude
|
|
2302
|
+
route selecting a Kimi Code account uses `kimi-for-coding`. Other routes use their
|
|
2303
|
+
runtime's declared default when present: Claude and Codex delegate to their local
|
|
2304
|
+
CLI's selected default, while Pi declares `kimi-coding/k3`. Codex accepts unqualified `gpt-*`
|
|
2165
2305
|
ids. Pi ids remain provider-qualified—including the independent
|
|
2166
2306
|
`openai-codex/*` route—and `ab models [query]` looks them up. Pi always passes
|
|
2167
2307
|
`--no-extensions` to disable ambient package discovery and loads the Autobuild
|
|
@@ -3279,13 +3419,15 @@ the existing text-download projection.
|
|
|
3279
3419
|
- for `forge = "github"`, either export a `GITHUB_TOKEN` or `GH_TOKEN` or run `gh auth login`:
|
|
3280
3420
|
the kernel speaks the GitHub REST API directly, taking `GITHUB_TOKEN`, then `GH_TOKEN`, then the
|
|
3281
3421
|
gh CLI's stored login (`gh auth token`) — so a local dispatcher needs only the gh login, while a
|
|
3282
|
-
host without gh (
|
|
3422
|
+
host without gh (including sandboxed dispatchers) must export a token. Separately make sure the
|
|
3283
3423
|
Git remote can fetch/push with the process's Git credentials;
|
|
3284
3424
|
- Claude sessions invoke the local `claude` CLI and use its configured login;
|
|
3285
3425
|
install Claude Code, launch `claude`, and complete login before dispatching;
|
|
3286
|
-
- Codex sessions invoke the local `codex` CLI
|
|
3287
|
-
|
|
3288
|
-
|
|
3426
|
+
- Codex sessions invoke the local `codex` CLI. Without a named ChatGPT account,
|
|
3427
|
+
run `codex login` before dispatching. Named ChatGPT accounts use
|
|
3428
|
+
`ab accounts login NAME --local` for a local dispatcher or `--project` for a
|
|
3429
|
+
connected project; they preserve the user's ambient Codex login. See
|
|
3430
|
+
[ChatGPT subscriptions](accounts.md#chatgpt-subscriptions);
|
|
3289
3431
|
- Pi sessions use Pi's provider authentication: start `pi` and run `/login`
|
|
3290
3432
|
inside the interactive session, or, for non-interactive use, supply the
|
|
3291
3433
|
provider credentials Pi supports (such as provider API keys in the environment).
|
|
@@ -3373,7 +3515,10 @@ progress is not shown. Harvest does not consume build capacity.
|
|
|
3373
3515
|
and Contents write permission.
|
|
3374
3516
|
- **Agent runtime/provider:** authenticate the runtime selected by the merged
|
|
3375
3517
|
role. A missing Codex adapter diagnostic names both `codex runtime` and the
|
|
3376
|
-
`codex` executable; install it
|
|
3518
|
+
`codex` executable; install it. For legacy Codex authentication, run
|
|
3519
|
+
`codex login`. For a named ChatGPT account, sign in again with
|
|
3520
|
+
`ab accounts login NAME --local` or `--project` for the owning destination; see
|
|
3521
|
+
[ChatGPT subscriptions](accounts.md#chatgpt-subscriptions). A 401/402/403,
|
|
3377
3522
|
permission, quota, or billing rejection is treated as a permanent provider
|
|
3378
3523
|
failure rather than retried indefinitely. For Pi, confirm the
|
|
3379
3524
|
provider-qualified model and provider login.
|
|
@@ -3381,26 +3526,13 @@ progress is not shown. Harvest does not consume build capacity.
|
|
|
3381
3526
|
A protected store reports 401 for a missing, invalid, or expired token and
|
|
3382
3527
|
403 when the token is valid but scoped to another build/session.
|
|
3383
3528
|
|
|
3384
|
-
### Hosted project selection
|
|
3385
|
-
|
|
3386
|
-
The durable PostgreSQL project registry controls dashboard, MCP and operator
|
|
3387
|
-
API access. Super users see every active entry; members see only their organizations’ projects. Administer it with
|
|
3388
|
-
`ab-hosted-store projects list|add|remove` using deployment database credentials;
|
|
3389
|
-
mutations require `--user IDENTITY` for declared attribution. See
|
|
3390
|
-
[connected projects](setup.md#connected-projects) for migration and retention.
|
|
3391
|
-
`AB_DISPATCHER_REPOSITORIES` optionally selects an ordered subset of current
|
|
3392
|
-
registrations. When unset, each authorized tick queries all active entries.
|
|
3393
|
-
Removed credential override keys are inert in dynamic mode; explicit-list
|
|
3394
|
-
configuration still rejects unknown override keys.
|
|
3395
|
-
|
|
3396
3529
|
## Hosted service client compatibility
|
|
3397
3530
|
|
|
3398
3531
|
A service accepts stable and prerelease clients from its own `major.minor`
|
|
3399
3532
|
release line and the two preceding minor lines in the same major. A major starts a new family:
|
|
3400
3533
|
X.0 accepts only X.0, X.1 accepts X.0/X.1, and X.2 onward accepts three lines.
|
|
3401
3534
|
Patch versions are interchangeable in both directions and must never change
|
|
3402
|
-
the protocol.
|
|
3403
|
-
its window. Supported release lines retain their wire handlers and known
|
|
3535
|
+
the protocol. Keep project clients within the instance’s published window. Supported release lines retain their wire handlers and known
|
|
3404
3536
|
protocol identities; an unknown protocol is refused independently of version.
|
|
3405
3537
|
Stable and prerelease service and client identities share their numeric major/minor
|
|
3406
3538
|
line. Malformed or missing identities, build metadata (`+…`), prefixes and
|
|
@@ -3440,9 +3572,7 @@ Commands and acknowledgements are sequence-correlated; hold acknowledgement
|
|
|
3440
3572
|
requires confirmed native cancellation, while merge acknowledgement accepts
|
|
3441
3573
|
consent without claiming that merge gates passed. The same actions are available
|
|
3442
3574
|
through the MCP/operator build-control tools. The terminal uses `l` for merge and
|
|
3443
|
-
`o` for hold on the selected merge.
|
|
3444
|
-
**Hold** on a merge awaiting consent, with the same durable acknowledgements
|
|
3445
|
-
and merge gates. It does not provide a merge-policy editor.
|
|
3575
|
+
`o` for hold on the selected merge.
|
|
3446
3576
|
|
|
3447
3577
|
The repository auto-merge default and its fan-out are retired. Historical events
|
|
3448
3578
|
still replay; explicit old per-build commands map to consent/hold until a new
|
|
@@ -3518,7 +3648,7 @@ still use the checkout. A launcher freezes the currently installed distribution
|
|
|
3518
3648
|
and production dependencies offline; all later local runners and agent CLIs use
|
|
3519
3649
|
that same snapshot. Automatic adoption is enabled by default through `[upgrade]`
|
|
3520
3650
|
below; a manual restart is required when automatic upgrades are disabled or the
|
|
3521
|
-
launcher contract changes. `--once
|
|
3651
|
+
launcher contract changes. `--once` and origin mode retain their
|
|
3522
3652
|
direct execution paths.
|
|
3523
3653
|
|
|
3524
3654
|
## `[upgrade]`
|
|
@@ -3659,20 +3789,9 @@ retry failed installs. Operator stop always wins over replacement startup.
|
|
|
3659
3789
|
Set `automatic = false` to cancel pending preparation and retain manual restart
|
|
3660
3790
|
behavior. A launcher contract change also requires a manual restart. A legacy v1 launcher
|
|
3661
3791
|
without overlap supervision requires restart before another automatic adoption. `--once`,
|
|
3662
|
-
origin
|
|
3792
|
+
origin-mode dispatch and direct development presentation modes do not auto-upgrade.
|
|
3663
3793
|
`ab upgrade` still updates the pin/installation and merges skills locally, commits
|
|
3664
3794
|
when eligible, and never pushes. Pinned dispatchers follow after that commit
|
|
3665
3795
|
reaches the base branch; installed-mode dispatchers follow their replaced install.
|
|
3666
3796
|
Source-mode dispatchers follow changes to packaged inputs merged to the base,
|
|
3667
3797
|
including shipped canonical skills, without a version bump.
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
The retired `AB_WEB_ALLOWED_EMAILS` variable is refused at startup, even if empty.
|
|
3671
|
-
Replace it with `AB_WEB_SUPER_USER_EMAILS`; review the list because these identities
|
|
3672
|
-
are deployment maintainers. Bootstrap the first organization through the
|
|
3673
|
-
[browser management contract](operator-api.md#organization-management-browser),
|
|
3674
|
-
then add members by email and assign legacy unassigned projects. Super users alone
|
|
3675
|
-
create orgs, set or clear the single owner, and assign or move projects. Owners
|
|
3676
|
-
manage their org's members. Removing the last membership or super-user designation
|
|
3677
|
-
revokes human access on the next request without re-login; existing project
|
|
3678
|
-
credentials remain valid until revoked.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Dispatcher hosting"
|
|
3
3
|
group: "reference"
|
|
4
|
-
description: "Run
|
|
4
|
+
description: "Run a local dispatcher with local or remote workspaces over durable state."
|
|
5
5
|
label: "Dispatcher hosting"
|
|
6
6
|
order: 11
|
|
7
7
|
---
|
|
@@ -10,7 +10,7 @@ order: 11
|
|
|
10
10
|
|
|
11
11
|
## Responsibility
|
|
12
12
|
|
|
13
|
-
The dispatcher claims eligible tickets, starts and observes build runners, settles publication and merge, and recovers durable work. Local and
|
|
13
|
+
The dispatcher claims eligible tickets, starts and observes build runners, settles publication and merge, and recovers durable work. Local and origin-mode arrangements run the same kernel. Your operator agent acts through the CLI or MCP; Autobuild never starts it.
|
|
14
14
|
|
|
15
15
|
## Shipped arrangements
|
|
16
16
|
|
|
@@ -40,7 +40,7 @@ The host needs:
|
|
|
40
40
|
|
|
41
41
|
A service manager may own the process under an identity with the same configuration and credentials. To restart, stop gracefully and let drain and suspension finish; work resumes from durable state. A restart never answers escalations or grants merge consent. See [the dispatcher lifecycle](dispatcher.md).
|
|
42
42
|
|
|
43
|
-
###
|
|
43
|
+
### Origin-mode dispatcher with remote workspaces
|
|
44
44
|
|
|
45
45
|
Commit a remote-compatible configuration to the base branch:
|
|
46
46
|
|
|
@@ -73,40 +73,25 @@ model = "vercel-ai-gateway/anthropic/claude-sonnet-4.6"
|
|
|
73
73
|
```
|
|
74
74
|
<!-- seam-config:end -->
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
- **Install the Sandbox plugin** in the project and make it available to the dispatcher deployment.
|
|
78
|
-
- **Replace the example** runtime, model and provisioning commands with values for your account.
|
|
79
|
-
|
|
80
|
-
Deploy `@defrex/autobuild-hosted-dispatcher` and mount its `dispatcherEndpoint()` at `/api/dispatch`; a store-only deployment never dispatches. Server-only environment includes:
|
|
76
|
+
Run the supported CLI from an HTTPS GitHub origin:
|
|
81
77
|
|
|
82
78
|
```sh
|
|
83
|
-
|
|
84
|
-
export CRON_SECRET='<schedule secret>'
|
|
85
|
-
export GITHUB_TOKEN='<repository publication token>'
|
|
86
|
-
export DATABASE_URL='<postgres connection URL>'
|
|
87
|
-
export AI_GATEWAY_API_KEY='<runtime API credential>'
|
|
79
|
+
bun ab dispatch --repository https://github.com/acme/app --plain --store https://builds.example.com
|
|
88
80
|
```
|
|
89
81
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Build the distribution's guest archive into the function bundle before deploying; the function can't pack it at runtime.
|
|
106
|
-
|
|
107
|
-
- **Bounded ticks:** a 240-second default work budget inside a 300-second route. Unfinished work resumes on later ticks; guests run independently.
|
|
108
|
-
- **Overlap:** the repository supervisor lease makes overlapping invocations yield.
|
|
109
|
-
- Selecting Postgres alone never moves dispatch here.
|
|
82
|
+
Use a remote store that speaks the remote BuildStore protocol.
|
|
83
|
+
Connect the project with `ab connect` or supply `AB_TOKEN`. Hosted tickets use
|
|
84
|
+
that registered project's team key. Install the Sandbox plugin on the dispatcher
|
|
85
|
+
host and replace the example runtime and model with your account's values.
|
|
86
|
+
Origin mode reads configuration from the forge and cannot load checkout-relative
|
|
87
|
+
plugins. Export push-capable `GITHUB_TOKEN` or `GH_TOKEN`; forge credentials stay
|
|
88
|
+
on the host. Sandbox provisioning needs `VERCEL_OIDC_TOKEN` or the durable
|
|
89
|
+
`VERCEL_TOKEN`/`VERCEL_TEAM_ID`/`VERCEL_PROJECT_ID` tuple. Guests receive runtime
|
|
90
|
+
API credentials allowlisted through `environmentVariables`, nonsecret billing
|
|
91
|
+
account placeholders, and scoped Store execution authority. Real account
|
|
92
|
+
credentials stay on the host and are applied by provider-scoped egress header
|
|
93
|
+
transforms.
|
|
94
|
+
See [origin-mode setup](setup.md#running-the-dispatcher-without-a-checkout-origin-mode) and [Workspaces](workspaces.md).
|
|
110
95
|
|
|
111
96
|
## Writing your own
|
|
112
97
|
|
package/docs/intake.md
CHANGED
|
@@ -29,6 +29,8 @@ ab observe --kind followup --files src/retry.ts "Retry budget ignores jitter"
|
|
|
29
29
|
|
|
30
30
|
Observation harvest, a shipped repository workflow rather than a build phase, collects observations, synthesizes and reviews proposals, and files approved tickets.
|
|
31
31
|
|
|
32
|
+
Proposals can join an existing ticket in the harvest ledger. The ledger facts shown during synthesis and review are scan-time context; at filing, each approved join is checked against fresh ticket existence and resolution in the selected source. Only existing, unresolved ledger targets from that source can be joined. Missing or resolved targets require suppression, and approval does not override this fresh check.
|
|
33
|
+
|
|
32
34
|
A run starts after `[policy].harvestThreshold` new unclaimed observations (default 5), or once `[policy].harvestMaxDrift` other builds (default 3) have merged since the oldest one (`0` disables drift).
|
|
33
35
|
|
|
34
36
|
|