@defrex/autobuild 1.1.0 → 1.3.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 +249 -15
- package/bin/ab-dispatch-generation.ts +11 -2
- package/docs/accounts.md +130 -0
- package/docs/agent-runtimes.md +4 -4
- package/docs/answering-blocked-builds.md +4 -1
- package/docs/architecture.md +224 -12
- package/docs/build-store.md +3 -41
- package/docs/builds.md +2 -0
- package/docs/cli.md +14 -0
- package/docs/configuration-overview.md +117 -0
- package/docs/configuration.md +266 -141
- package/docs/dispatcher-hosting.md +18 -33
- package/docs/intake.md +2 -0
- package/docs/integration-tree.md +16 -5
- package/docs/merge-policy.md +1 -3
- package/docs/operating.md +1 -2
- package/docs/operator-api.md +144 -53
- package/docs/operator-surfaces.md +32 -20
- package/docs/overview.md +1 -1
- package/docs/plugin-authoring.md +27 -1
- package/docs/remote-store-protocol.md +259 -91
- package/docs/remote-ticket-protocol.md +29 -49
- package/docs/restacking.md +45 -0
- package/docs/seams.md +8 -8
- package/docs/setup.md +34 -129
- package/docs/spec-standard.md +4 -2
- package/docs/ticket-dependencies.md +8 -0
- 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-frontend.ts +1 -0
- 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-repository-feed.ts +107 -26
- package/packages/core/src/cli/dispatch.ts +135 -27
- package/packages/core/src/cli/dispatcher-liveness.ts +6 -1
- package/packages/core/src/cli/forge-clear.ts +30 -0
- package/packages/core/src/cli/help.ts +17 -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 +72 -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 +12 -14
- 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/catalog.ts +1 -0
- package/packages/core/src/events/compatibility.ts +2 -1
- package/packages/core/src/events/forge-degradation-policy.ts +11 -0
- package/packages/core/src/events/payloads.ts +13 -0
- package/packages/core/src/events/policy.ts +9 -0
- package/packages/core/src/events/repository.ts +75 -2
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +278 -0
- package/packages/core/src/kernel/change-presence.ts +74 -8
- package/packages/core/src/kernel/engine.ts +8 -0
- package/packages/core/src/kernel/generators/node-restack-log.ts +14 -0
- package/packages/core/src/kernel/node-polling.ts +40 -7
- package/packages/core/src/kernel/node-restack-demand.ts +74 -0
- package/packages/core/src/kernel/node-restack-state.ts +5 -1
- package/packages/core/src/kernel/node-restack-transaction.ts +33 -1
- package/packages/core/src/kernel/read-facts.ts +6 -0
- package/packages/core/src/kernel/reducer-registry.ts +3 -0
- package/packages/core/src/kernel/reducer.ts +4 -1
- package/packages/core/src/kernel/ticket-preparation.ts +66 -0
- package/packages/core/src/operator/annotations.ts +6 -0
- package/packages/core/src/operator/control.ts +20 -0
- package/packages/core/src/operator/index.ts +4 -0
- package/packages/core/src/operator/protocol.ts +6 -0
- package/packages/core/src/operator/registry.ts +42 -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 +139 -0
- package/packages/core/src/ports/runner/chatgpt-provider.ts +85 -0
- package/packages/core/src/ports/runner/claude.ts +70 -42
- 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 +493 -121
- package/packages/core/src/processes/execution-no-progress.ts +1 -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/processes/harvest.ts +11 -16
- package/packages/core/src/processes/repo-view.ts +3 -0
- 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/artifact-meta.ts +7 -0
- package/packages/core/src/store/contract.ts +60 -1
- package/packages/core/src/store/memory.ts +4 -0
- package/packages/core/src/store/reducer-value-shapes.json +7389 -6647
- package/packages/core/src/store/reducer-value-validation.ts +106 -6
- package/packages/core/src/store/remote/client.ts +85 -50
- package/packages/core/src/store/remote/compatibility.ts +57 -0
- package/packages/core/src/store/remote/index.ts +6 -0
- package/packages/core/src/store/remote/protocol.ts +8 -1
- package/packages/core/src/store/remote/released-reducer-values/1.2.0.json +8129 -0
- package/packages/core/src/store/remote/version.ts +4 -0
- package/packages/core/src/store/repo-state-events.ts +4 -2
- package/packages/core/src/store/snapshots.ts +16 -3
- package/packages/core/src/store/types.ts +2 -0
- package/packages/core/src/testing/dispatch-read-budget.ts +266 -5
- package/packages/core/src/testing/index.ts +2 -1
- package/packages/core/src/testing/reduced-read-budget.ts +560 -5
- package/skills/guide/SKILL.md +164 -37
- package/skills/guide/references/accounts.md +130 -0
- package/skills/guide/references/integration-tree.md +16 -5
- package/skills/guide/references/merge-policy.md +1 -3
- package/skills/guide/references/operator-api.md +144 -53
- package/skills/guide/references/plugin-authoring.md +27 -1
- package/skills/guide/references/remote-store-protocol.md +259 -91
- package/skills/guide/references/remote-ticket-protocol.md +29 -49
- package/skills/guide/references/restacking.md +45 -0
- package/skills/guide/references/setup.md +34 -129
- package/skills/guide/references/spec-standard.md +4 -2
- package/skills/guide/references/ticket-dependencies.md +8 -0
- package/skills/harvest/SKILL.md +3 -1
- package/skills/harvest-review/SKILL.md +3 -1
- package/skills/operate/SKILL.md +26 -11
- package/skills/reconcile/SKILL.md +6 -0
- package/skills/spec/SKILL.md +1 -1
- package/skills/tickets/SKILL.md +10 -5
- 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/skills/guide/SKILL.md
CHANGED
|
@@ -82,6 +82,13 @@ spec → plan ⇄ plan-review → implement ⇄ code-review → verify:* → fin
|
|
|
82
82
|
claims tickets that pass the `[tickets]` ready
|
|
83
83
|
gate, chooses a short immutable slug from the final conforming spec, and
|
|
84
84
|
starts builds up to the top-level `capacity` bound.
|
|
85
|
+
- **Failed preparation.** Durable preparation facts protect the claim-to-build
|
|
86
|
+
interval. Caught failures return tickets to Ready (invalid specs to Triage),
|
|
87
|
+
after exact build-ownership readback. Unresolved attempts stay withheld and
|
|
88
|
+
retry before intake, even at full capacity or with intake disabled. Unsafe
|
|
89
|
+
ownership or externally changed/missing tickets end automatic recovery with
|
|
90
|
+
a diagnostic `abandoned` resolution, leaving the ticket unchanged. See
|
|
91
|
+
[Ticket preparation recovery](references/restacking.md#ticket-preparation-before-build-creation).
|
|
85
92
|
- **Ticket assets** — files or folders attached to a ticket (see
|
|
86
93
|
[Ticket assets](#ticket-assets)) are frozen into the build at claim and
|
|
87
94
|
appear under `$AB_CONTEXT_DIR/assets/` in every phase, as inputs alongside the spec.
|
|
@@ -152,7 +159,11 @@ repository-scoped workflow: deterministic `scan`, agent `synthesize`
|
|
|
152
159
|
⇄ fresh adversarial `review`, then deterministic `file`. Only approved
|
|
153
160
|
spec-standard proposals are created, in `[tickets].proposalState` — the triage
|
|
154
161
|
state unless this repository has named another one. The scan context exposes
|
|
155
|
-
existence and resolution for each distinct observation-origin ticket.
|
|
162
|
+
existence and resolution for each distinct observation-origin ticket. Ledger
|
|
163
|
+
lifecycle is also scan-time context: filing refreshes existence and resolution
|
|
164
|
+
before allowing a join. Each same-source ledger ticket uses one fresh lookup;
|
|
165
|
+
hosted alias resolution shares that response. Missing, resolved, and foreign-source
|
|
166
|
+
ledger tickets cannot be joined. At filing,
|
|
156
167
|
matching-source origins are refreshed and every still-existing unresolved one
|
|
157
168
|
is unioned with the agent-declared `blockedBy` ids; missing, resolved, foreign,
|
|
158
169
|
and absent origins are dropped. Filing records declared and origin-derived
|
|
@@ -225,8 +236,19 @@ The distinctions that change an administrator's answer:
|
|
|
225
236
|
launcher that snapshots the invoking installation and its installed production
|
|
226
237
|
dependencies offline into `.autobuild/runtime/`. The generation's frontend,
|
|
227
238
|
kernel, later local runners and agent PATH CLI execute from that immutable
|
|
228
|
-
root. The launcher owns no Store/lease and uses
|
|
229
|
-
contract
|
|
239
|
+
root. The launcher owns no Store/lease and uses the versioned v1 process
|
|
240
|
+
contract with an optional independently versioned conditional `--read-upgrade`
|
|
241
|
+
environment extension. Its current successful answer and pre-read repository
|
|
242
|
+
change position are scoped to the exact reader runtime, journal, run, lineage
|
|
243
|
+
and recovery context. An unchanged runtime helper makes one position request,
|
|
244
|
+
with zero metadata/reducer/event reads; it revalidates target cache identity
|
|
245
|
+
and rollback retention locally on every check. Full refresh samples position
|
|
246
|
+
before projection reads, so concurrent appends invalidate the following check.
|
|
247
|
+
Errors discard conditional state; unloadable targets retain the healthy
|
|
248
|
+
predecessor reader fallback with the active query. Old peers still exchange
|
|
249
|
+
full v1 answers. Polling remains 1 second idle / 250 ms pending, and cached
|
|
250
|
+
answers still drive pending actions, child exits and recovery expiry.
|
|
251
|
+
Automatic upgrades default on: the kernel checks immediately and every
|
|
230
252
|
60 seconds, resolving a declared Autobuild dependency and Bun lock from the same
|
|
231
253
|
authoritative base-branch commit. Unpinned repositories reread the original
|
|
232
254
|
installation pathname, retained across handoffs. Launching from a source root
|
|
@@ -304,7 +326,7 @@ The distinctions that change an administrator's answer:
|
|
|
304
326
|
Current, distinct previous, held and live-process runtimes survive pruning.
|
|
305
327
|
Cached Bun entries disable auto-install and explicitly pin a neutral compiler
|
|
306
328
|
config. Third-party files remain as installed. `--plain`/non-TTY run directly
|
|
307
|
-
within the generation; `--once`, origin
|
|
329
|
+
within the generation; `--once`, origin-mode and hot development paths bypass
|
|
308
330
|
the launcher. `--once` remains one tick plus drain.
|
|
309
331
|
- **Live configuration** has two explicit contexts. A running dispatcher owns
|
|
310
332
|
the last valid snapshot from the **main checkout**; dispatch, setup, and each
|
|
@@ -315,6 +337,12 @@ The distinctions that change an administrator's answer:
|
|
|
315
337
|
still read the build worktree's branch-owned file. Dispatcher merge readiness,
|
|
316
338
|
resume, and execution recovery use the runner's pinned commands, verify, and
|
|
317
339
|
finalize configuration through the cycle capture's exact artifact revision.
|
|
340
|
+
Lease sweeps reuse at most 128 parsed effective-config pins in a disposable
|
|
341
|
+
LRU, probing the latest metadata revision on every lookup. Artifact-only
|
|
342
|
+
deposits invalidate reuse. Current facts, live settings and cycle captures
|
|
343
|
+
are recomputed; launch, resume and merge boundaries keep fresh artifact reads.
|
|
344
|
+
Restart or eviction costs a full reread. Legacy stores without metadata support
|
|
345
|
+
retain full artifact reads; invalid pins still withhold decisions and retry repair.
|
|
318
346
|
At every verify-cycle entry, after restack or reconcile settles, the runner
|
|
319
347
|
reads `autobuild.toml` from the execution checkout at resolved `HEAD` (including
|
|
320
348
|
detached integration heads). `verify.config-captured` cites an immutable
|
|
@@ -380,7 +408,7 @@ evaluated as config logic.
|
|
|
380
408
|
|
|
381
409
|
**Strictness:** unknown top-level keys/tables and unknown keys inside known
|
|
382
410
|
tables are **errors**, not warnings — a typo must not silently disable a
|
|
383
|
-
verifier. The open maps are `[commands]`, `[roles]`, `[workspace.config]`,
|
|
411
|
+
verifier. The open maps are `[accounts]`, `[commands]`, `[roles]`, `[workspace.config]`,
|
|
384
412
|
`[workspace.config.runtimeProvisioning]`, `[verify.<step>]`, and
|
|
385
413
|
`[finalize.<step>]`. Autobuild strictly validates the
|
|
386
414
|
repository-defined command, role, and step entries. `[workspace.config]` is
|
|
@@ -436,7 +464,7 @@ and `[roles.*].runtime`. BuildStore uses the remote HTTP protocol, not this
|
|
|
436
464
|
manifest, and TelemetrySource has no registration map.
|
|
437
465
|
|
|
438
466
|
For the complete author workflow—from choosing one of the four open ports,
|
|
439
|
-
through the strict versioned manifest and environment
|
|
467
|
+
through the strict versioned manifest and secrets supplied through the environment, to the
|
|
440
468
|
unchanged shared contract suite and optional npm publication—read
|
|
441
469
|
[`references/plugin-authoring.md`](references/plugin-authoring.md).
|
|
442
470
|
|
|
@@ -539,7 +567,7 @@ available providers. A handle's `path` is absolute in its execution environment,
|
|
|
539
567
|
reachability.
|
|
540
568
|
|
|
541
569
|
`provider = "vercel-sandbox"` runs the complete build in a persistent Vercel VM
|
|
542
|
-
and requires
|
|
570
|
+
and requires a remote store that speaks the remote BuildStore protocol over HTTPS and a scoped token, GitHub HTTPS origin, GitHub
|
|
543
571
|
forge, a dispatcher-side push-capable `GITHUB_TOKEN` or `GH_TOKEN`, and either
|
|
544
572
|
`VERCEL_OIDC_TOKEN` or the `VERCEL_TOKEN`/`VERCEL_TEAM_ID`/
|
|
545
573
|
`VERCEL_PROJECT_ID` tuple. These credentials are validated before claims:
|
|
@@ -563,7 +591,7 @@ preflight = "test \"$(pi --version)\" = \"0.84.4\" && pi update --models"
|
|
|
563
591
|
|
|
564
592
|
`timeoutSeconds` is required (60–86400; Hobby currently caps at 2700), `vcpus`
|
|
565
593
|
is 1–32, and optional `region`/unique `failoverRegions` select placement. Only
|
|
566
|
-
the named runtime variables and scoped `AB_STORE`/`AB_TOKEN` enter guest
|
|
594
|
+
the named runtime variables, declared account placeholders, and scoped `AB_STORE`/`AB_TOKEN` enter guest
|
|
567
595
|
commands. Never list Store, Forge, Vercel, or private-clone credentials there.
|
|
568
596
|
Every effective primary/alternate runtime needs a strict
|
|
569
597
|
`runtimeProvisioning` entry with pinned `install` and exact-version `preflight`
|
|
@@ -571,8 +599,7 @@ commands; runtime names remain open for plugins. Install/preflight runs before
|
|
|
571
599
|
the marker in every fresh/replacement/readiness sandbox, and preflight reruns
|
|
572
600
|
before every child. Failures name the runtime, role/alternate, and field and
|
|
573
601
|
start no agent. Keep runtime installation out of `commands.setup`. Pi over
|
|
574
|
-
`vercel-ai-gateway/...` uses `AI_GATEWAY_API_KEY`; never copy OAuth tokens,
|
|
575
|
-
`~/.pi`, or interactive login state. The clone identity is upload-pack-only and
|
|
602
|
+
`vercel-ai-gateway/...` uses `AI_GATEWAY_API_KEY`; never copy Pi state or Pi OAuth refresh tokens. Claude Code can select named [accounts](references/accounts.md): subscription tokens or region-bound Kimi Code keys stay on the dispatcher, with placeholders in the guest and exact-host/header egress transforms. Use the unmodified runtime, your own subscription and ordinary individual usage. Provision Claude/Kimi credentials manually; Autobuild never invokes `claude setup-token`. Codex can explicitly select a ChatGPT Plus/Pro account authorized with `bun ab accounts login NAME [--local|--project]`; exactly one dispatcher or hosted refreshing secret owns its renewal. The clone identity is upload-pack-only and
|
|
576
603
|
scrubbed from Git config before an agent starts. Agents cannot push. Remote phase terminals deposit a durable
|
|
577
604
|
publication request and park; that successful `ab done` is the one terminal and
|
|
578
605
|
must not be repeated. After VM stop and lease release, the local kernel
|
|
@@ -921,20 +948,41 @@ the agent never pushes. An unchanged `HEAD` creates and pushes no commit. Dirty
|
|
|
921
948
|
output, rewritten history, Git errors, and publication failures record the
|
|
922
949
|
step as failed and file an observation while the green build continues.
|
|
923
950
|
|
|
951
|
+
### `[accounts]`
|
|
952
|
+
|
|
953
|
+
An open map of account name to a strict, nonsecret descriptor. Claude and Kimi
|
|
954
|
+
accounts use Claude Code; ChatGPT subscriptions require explicit Codex selection.
|
|
955
|
+
Provision Claude/Kimi credentials manually; authorize ChatGPT with
|
|
956
|
+
`bun ab accounts login NAME [--local|--project]`. Exactly one local dispatcher
|
|
957
|
+
or hosted refreshing secret owns renewal; guests only hold placeholders. Full
|
|
958
|
+
examples, remedies and regional routing are in [billing accounts](references/accounts.md).
|
|
959
|
+
|
|
960
|
+
| Field | Meaning |
|
|
961
|
+
|---|---|
|
|
962
|
+
| `kind` | `claude-subscription` for a setup token, `kimi-code` for a membership key, or `chatgpt-subscription` for a Plus/Pro plan through OpenAI sign-in. |
|
|
963
|
+
| `credentialEnv` | Portable dispatcher environment variable identifier, excluding reserved `AB_` control names. |
|
|
964
|
+
| `region` | Kimi only: `overseas` (default) or `china`; endpoint and egress host are selected together. |
|
|
965
|
+
|
|
924
966
|
### `[roles]`
|
|
925
967
|
|
|
926
|
-
An **open map** of role name → `{ runtime?, model?, args?, extensions?, sessionBudgetSeconds?, alternates? }`.
|
|
927
|
-
The
|
|
968
|
+
An **open map** of role name → `{ runtime?, model?, account?, args?, extensions?, sessionBudgetSeconds?, alternates? }`.
|
|
969
|
+
The four primary axes, session budget, and ordered alternate list inherit independently. The reserved `default` role must explicitly name a
|
|
928
970
|
runtime, is the raw inheritance base for every other role, and is **never
|
|
929
971
|
dispatched as a phase**. Its absence fails eager resolution before a session,
|
|
930
972
|
with a copyable fix and all registered runtime names. Three runtimes ship:
|
|
973
|
+
Named `[accounts]` are deployment-owned nonsecret descriptors, adopted atomically
|
|
974
|
+
with `[roles]`. The `account` axis inherits independently on primary and alternate
|
|
975
|
+
routes. A Claude route defaults to the sole Claude subscription account, and
|
|
976
|
+
ambiguity or incompatible runtimes fail validation. See [billing accounts](references/accounts.md)
|
|
977
|
+
for provisioning, ChatGPT sign-in destinations, Kimi regions, placeholders, single-owner renewal and metadata-only hosted readiness.
|
|
978
|
+
|
|
931
979
|
**`claude`** (local Claude Code CLI), **`codex`** (local Codex CLI; unqualified
|
|
932
980
|
`gpt-*` ids), and **`pi`** (local Pi CLI 0.84.3 or newer; provider-qualified ids
|
|
933
981
|
such as the independent `openai-codex/gpt-5.6-sol` route). Pi runs headlessly
|
|
934
982
|
through RPC and uses that local installation's login and model catalog;
|
|
935
983
|
Autobuild does not install it. `ab models [query]` lists the local catalog, and
|
|
936
984
|
`ab models --available` filters it to configured credentials. Claude and Codex
|
|
937
|
-
delegate an omitted model to their CLI default; Pi declares `kimi-coding/k3`.
|
|
985
|
+
delegate an omitted model to their CLI default; a Claude route selecting a Kimi Code account defaults to `kimi-for-coding`; Pi declares `kimi-coding/k3`.
|
|
938
986
|
Trusted plugins may register additional runtime names;
|
|
939
987
|
they use the same role inheritance, default-model compatibility validation,
|
|
940
988
|
session event attribution, and optional one-shot capability path as builtins.
|
|
@@ -947,7 +995,7 @@ release. The repository workflow resolves `harvest` and `harvest-review`. Two
|
|
|
947
995
|
non-phase judgments use the same runtime/model/args resolver: `slug` optionally
|
|
948
996
|
proposes pre-build naming, and `upgrade` proposes a resolution only when a
|
|
949
997
|
vendored skill merge conflicts. Both are tool-free one-shots and receive the
|
|
950
|
-
role's effective `args
|
|
998
|
+
role's effective `args` and selected account. Missing slug capability uses the deterministic title fallback;
|
|
951
999
|
unavailable upgrade judgment retains the conflict for manual resolution.
|
|
952
1000
|
|
|
953
1001
|
A declared key that none of those routes requests is resolved and validated
|
|
@@ -963,24 +1011,35 @@ consumed by the core `plan` phase, and nothing is reported.
|
|
|
963
1011
|
| Field | Default | Allowed / constraints | Effect |
|
|
964
1012
|
|---|---|---|---|
|
|
965
1013
|
| `runtime` | — | required on `default`; otherwise optional, nonempty string | Runtime for this role. A child that omits it inherits `[roles.default].runtime`. Must name a registered runtime. |
|
|
966
|
-
| `
|
|
967
|
-
| `
|
|
1014
|
+
| `account` | Named billing account; inherits independently on primaries and alternates. Omission selects the sole Claude subscription account for a Claude route. |
|
|
1015
|
+
| `model` | — | optional, nonempty string | Model for this role. A role that omits it inherits `[roles.default].model`; when neither names a model, a Claude route selecting a Kimi Code account uses `kimi-for-coding`, and every other route uses its runtime's own default. |
|
|
1016
|
+
| `args` | `[]` | optional, array of nonempty strings | Ordered extra CLI argv tokens for every phase and tool-free one-shot invocation. Omitted ⇒ inherit `[roles.default].args`; a set list, including `[]`, replaces it wholesale. Each string is one token, without shell parsing. Model and parsed protocol/output-mode spellings are rejected eagerly; Claude routes with a selected account additionally reject `--settings`, `--setting-sources`, and `--bare` because Autobuild owns their authentication settings. Codex routes selecting a ChatGPT subscription account additionally reject `-c`, `--config`, `--profile`, `-p`, `--enable`, and `--disable` because Autobuild owns their provider and configuration routing. |
|
|
968
1017
|
| `extensions` | no effect | deprecated optional array of nonempty strings | Compatibility-only field. Dispatch warns for each declaring role and directs migration to `args`. |
|
|
969
1018
|
| `sessionBudgetSeconds` | policy fallback | optional positive integer | Active-time budget for each build phase session on this logical role; suspended intervals are excluded and native continuation retains the original ceiling. Omitted ⇒ inherit `[roles.default].sessionBudgetSeconds`; absent there too ⇒ `[policy].sessionBudgetSeconds`. One value covers the primary and every alternate. |
|
|
970
|
-
| `alternates` | `[]` | optional ordered array of strict `{ runtime?, model?, args?, extensions? }` entries | Failure-triggered targets. Omitted ⇒ inherit `[roles.default].alternates`; a role list, including `[]`, replaces it wholesale. Each entry overlays that role's effective primary axes and is eagerly validated. `extensions` remains only the deprecated no-op. |
|
|
1019
|
+
| `alternates` | `[]` | optional ordered array of strict `{ runtime?, model?, account?, args?, extensions? }` entries | Failure-triggered targets. Omitted ⇒ inherit `[roles.default].alternates`; a role list, including `[]`, replaces it wholesale. Each entry overlays that role's effective primary axes and is eagerly validated. `extensions` remains only the deprecated no-op. |
|
|
971
1020
|
|
|
972
1021
|
Inheritance is mechanical and **independent per field**: merge each configured
|
|
973
1022
|
role over the raw `default` entry, then validate the exact runtime/model pair.
|
|
974
1023
|
The named runtime must serve the named model. A model-only role never searches
|
|
975
1024
|
for another runtime, and an incompatible inherited model is never replaced by
|
|
976
1025
|
the selected runtime's default. The one implicit fill-in is benign: if neither
|
|
977
|
-
the phase role nor `default` names a model,
|
|
978
|
-
|
|
1026
|
+
the phase role nor `default` names a model, a Claude route selecting a Kimi Code
|
|
1027
|
+
account uses `kimi-for-coding`; every other route uses its runtime's own default.
|
|
1028
|
+
Alternates overlay the primary runtime, model, account, and args before model
|
|
1029
|
+
defaults are applied, so an alternate without an explicit or inherited model uses
|
|
1030
|
+
the default for its own selected account and runtime. Compatibility failures name the role, runtime, model, and served
|
|
979
1031
|
model families; all problems in `default` and every declared role are
|
|
980
1032
|
aggregated by one eager resolver construction before judgment runs. Runtime
|
|
981
|
-
adapters reject
|
|
1033
|
+
adapters reject the model and parsed protocol/output-mode options they
|
|
982
1034
|
emit: Claude rejects `-p`/`--print`, `--output-format`, and `--model`; Codex
|
|
983
|
-
rejects `--json` and `--model`/`-m`; Pi rejects `--mode` and `--model`.
|
|
1035
|
+
rejects `--json` and `--model`/`-m`; Pi rejects `--mode` and `--model`. Claude
|
|
1036
|
+
routes with a selected account additionally reject `--settings`,
|
|
1037
|
+
`--setting-sources`, and `--bare` because Autobuild owns their authentication
|
|
1038
|
+
settings. Codex routes selecting a ChatGPT subscription account additionally
|
|
1039
|
+
reject `-c`, `--config`, `--profile`, `-p`, `--enable`, and `--disable`
|
|
1040
|
+
because Autobuild owns their provider and configuration routing. This includes
|
|
1041
|
+
using `-c` to set reasoning effort. Routes without an account retain the existing
|
|
1042
|
+
argument behavior. Exact
|
|
984
1043
|
spellings, `--option=value` forms, and documented compact short aliases join
|
|
985
1044
|
that same role-naming aggregate. Every other option passes through without
|
|
986
1045
|
Autobuild validation, including sandbox, approval, session, tool, skill,
|
|
@@ -1257,7 +1316,7 @@ Exact changed targets can include downgrades. Missing or inconsistent declared-p
|
|
|
1257
1316
|
metadata never falls back to installed mode. Self-hosting source launches follow
|
|
1258
1317
|
the authoritative base commit using packaged-content and production-lock equality,
|
|
1259
1318
|
without modifying operator or build worktrees. Equal-content advances still record
|
|
1260
|
-
the latest resolved target SHA. Compatible generations overlap through the durable draining handoff described above. `--once`, origin
|
|
1319
|
+
the latest resolved target SHA. Compatible generations overlap through the durable draining handoff described above. `--once`, origin-mode and direct hot
|
|
1261
1320
|
presentation modes bypass automatic adoption. Operator stop wins over cutover.
|
|
1262
1321
|
Repository status exposes per-run resolved target, upgrade target, failure and handoff facts, both
|
|
1263
1322
|
generations, takeover, outstanding draining builds and deadline;
|
|
@@ -1292,7 +1351,7 @@ repo path, needs no `AB_*` environment, and is safe to re-run. It:
|
|
|
1292
1351
|
setup prompt for the user to run in a coding agent.
|
|
1293
1352
|
- The setup agent inspects the repository, configures real commands and verify
|
|
1294
1353
|
steps, independently chooses pipeline role runtimes/models, configures the
|
|
1295
|
-
ticket source and environment
|
|
1354
|
+
ticket source and credentials supplied through the environment, arranges
|
|
1296
1355
|
an acceptance check through a repository-owned agent verify skill in every
|
|
1297
1356
|
repository. Wire an existing maintained end-to-end or browser test suite into an ordinary `check` step. If none exists, do not create one during setup. The acceptance check neither substitutes for nor seeds a suite. It completes `bun ab init --validate`, fixing failures
|
|
1298
1357
|
and reviewing warnings. The human then starts `bun ab dispatch` and opens
|
|
@@ -1480,11 +1539,16 @@ every agent session as `AB_STORE`.
|
|
|
1480
1539
|
|
|
1481
1540
|
From a checkout with an origin remote, run `ab connect https://YOUR_ORIGIN`.
|
|
1482
1541
|
The CLI prints a verification URL and short code and attempts to open a browser.
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1542
|
+
The code link opens approval directly; if sign-in is needed, it returns there.
|
|
1543
|
+
Check the full repository identity and code, and approve or deny. For an
|
|
1544
|
+
unassigned project, choose an eligible organization; a sole option is visibly
|
|
1545
|
+
selected. Approval requires that destination even for previously registered
|
|
1546
|
+
unassigned projects. Assigned projects show their organization as read-only;
|
|
1547
|
+
moving them uses project management. With no eligible organization, approval is
|
|
1548
|
+
unavailable until a super user creates one. Another device can open the printed
|
|
1549
|
+
URL, or visit `/connect` and enter the code. Approval uses the instance’s browser
|
|
1550
|
+
consent endpoint. Requests expire after ten minutes. Denial requires no
|
|
1551
|
+
organization choice; denial and timeout leave local configuration unchanged.
|
|
1488
1552
|
|
|
1489
1553
|
On approval the service registers the project and issues a project credential.
|
|
1490
1554
|
The CLI keeps it in `$XDG_CONFIG_HOME/autobuild/credentials` (or
|
|
@@ -1495,6 +1559,22 @@ absent; review and commit that change yourself. An existing different URL
|
|
|
1495
1559
|
must be changed explicitly before connecting. Reconnecting replaces the saved
|
|
1496
1560
|
credential only after approval and revokes the previous credential.
|
|
1497
1561
|
|
|
1562
|
+
Connected project members can manage write-only project secrets in the web **Settings** tab (also available to super users), or with
|
|
1563
|
+
`ab secrets list [--json]`, `ab secrets set NAME` and `ab secrets remove NAME`.
|
|
1564
|
+
Set reads hidden terminal input or redirected stdin; values never appear in
|
|
1565
|
+
arguments or responses. These sessionless commands use the saved owner
|
|
1566
|
+
credential and recheck current membership. The current setter owns the value,
|
|
1567
|
+
which serves every hosted build of that project. Hosted ticks resolve a fresh,
|
|
1568
|
+
complete encrypted set and override matching deployment variables for that
|
|
1569
|
+
project only; local dispatchers keep using their own environment. For projects
|
|
1570
|
+
with saved secrets, failed configuration, decryption or refresh prevents dispatch.
|
|
1571
|
+
Projects without secrets continue with an empty set without encryption
|
|
1572
|
+
configuration. Every secret write still requires valid encryption configuration.
|
|
1573
|
+
List exposes only status, owner, timestamps and a keyed fingerprint. See the
|
|
1574
|
+
[write-only protocol](references/remote-store-protocol.md#project-secrets-v1).
|
|
1575
|
+
Sandbox forwarding rules remain separate; saving a secret does not grant
|
|
1576
|
+
credential forwarding into an operator sandbox.
|
|
1577
|
+
|
|
1498
1578
|
All worktrees share the main checkout's configuration and the user's saved
|
|
1499
1579
|
credential. A service manager running as that user uses the same HOME and
|
|
1500
1580
|
XDG_CONFIG_HOME, with no AB_STORE or AB_TOKEN exports. A fresh clone with
|
|
@@ -1607,7 +1687,7 @@ assets are not moved and are not a fallback. Each has a kind and a name.
|
|
|
1607
1687
|
- `ab ticket attach <id> <kind> <path> [--name <name>] [--json]` stores `<path>`
|
|
1608
1688
|
(default name: its basename). Attaching the same kind and name again makes a
|
|
1609
1689
|
new revision; earlier ones stay retrievable. Over the store's size limit
|
|
1610
|
-
(25 MiB by default, lower
|
|
1690
|
+
(25 MiB by default, lower when the instance advertises a request ceiling) it is refused. Attach and
|
|
1611
1691
|
remove leave a note on the ticket naming the asset.
|
|
1612
1692
|
- `ab ticket show <id>` lists the current assets; with `--json` the ticket
|
|
1613
1693
|
gains an `assets` array.
|
|
@@ -1695,7 +1775,7 @@ restack state and conflicting files remain in detail, along with every child's
|
|
|
1695
1775
|
ticket id, title and live phase (or queued/merged), open-first counts, verification
|
|
1696
1776
|
steps and current outcomes, repair instructions, and the merge rule. Cancelled
|
|
1697
1777
|
children are omitted; historical missing titles or filenames are explicit.
|
|
1698
|
-
|
|
1778
|
+
|
|
1699
1779
|
|
|
1700
1780
|
On a TTY, `ab dispatch` renders one fixed interactive frame anchored at the
|
|
1701
1781
|
terminal's first row. Its header remains on that top row as frame height changes
|
|
@@ -1710,6 +1790,13 @@ of recorded observation occurrences not yet claimed by a Harvest snapshot
|
|
|
1710
1790
|
against `policy.harvestThreshold`. The Store-only interactive frontend refreshes
|
|
1711
1791
|
that display value directly from the BuildStore; a failed refresh retains the
|
|
1712
1792
|
last successful count, shows a diagnostic, and appends no transport event.
|
|
1793
|
+
The frontend checkpoints dashboard facts, the latest run start and the sampled
|
|
1794
|
+
lease holder's start; identity history stays partial and missing holders use a
|
|
1795
|
+
bounded per-run lookup. Unchanged written/refused checkpoints are not uploaded
|
|
1796
|
+
again. Dirty saves run at most once per 30 seconds; transient failures retry
|
|
1797
|
+
without new events after 30, 60, 120, 240, then 300 seconds (capped). Teardown
|
|
1798
|
+
forces only dirty state. An equal-cursor refusal leaves correlation recoverable
|
|
1799
|
+
by bounded lookup on restart; a later advancing checkpoint persists it.
|
|
1713
1800
|
Non-interactive dispatch performs no frontend-only sampling, and the separate
|
|
1714
1801
|
drift trigger is not displayed. An indented controls line follows for
|
|
1715
1802
|
`intake ON`/`intake OFF` and `harvest ON`/`harvest OFF`, plus a conditional yellow `repository PAUSED` segment while
|
|
@@ -2006,6 +2093,8 @@ revision and keeps any open PR. A build's spec can therefore change under it:
|
|
|
2006
2093
|
phase runs after the revision read the new revision, while historical runs
|
|
2007
2094
|
remain readable at the revision they actually saw.
|
|
2008
2095
|
|
|
2096
|
+
If a leaf spec revision arrives during an unfinished reconcile, the same reconcile attempt resumes under the revised spec on its retained frozen target. Its replay and committed contribution remain owned by reconcile. Confirmed publication must settle before the fresh plan loop opens; prior approvals and verification remain invalidated.
|
|
2097
|
+
|
|
2009
2098
|
Operators may explicitly revise an opened idle collecting node or a node blocked on failed
|
|
2010
2099
|
integration verification without an escalation. Use
|
|
2011
2100
|
`ab answer <node> --revise-spec replacement.md` or, after amending its ticket,
|
|
@@ -2022,7 +2111,8 @@ Active verification/reconcile or writer work, restack/reparent work, pause,
|
|
|
2022
2111
|
pending controls, merge intent and ended PRs refuse the no-escalation path.
|
|
2023
2112
|
A concurrent state change refuses publication with a retry explanation;
|
|
2024
2113
|
uncited artifacts are inert. Leaves still require an open escalation and
|
|
2025
|
-
restart from `plan
|
|
2114
|
+
restart from `plan` after any unfinished reconcile resumes under the revised
|
|
2115
|
+
spec and its publication is confirmed.
|
|
2026
2116
|
|
|
2027
2117
|
Every command requires an applicable target in this repository. Pause and
|
|
2028
2118
|
resume require an active build; abort and hold also accept queued builds.
|
|
@@ -2218,7 +2308,12 @@ The default watch reports actionable conditions only:
|
|
|
2218
2308
|
this clock; after grace, the first qualifying failure starts a new five-minute
|
|
2219
2309
|
interval. Each persistence episode is reported once. Repository read failures
|
|
2220
2310
|
fail the watch tick and retry on the next tick; repeated failures use this
|
|
2221
|
-
existing attention.
|
|
2311
|
+
existing attention. If failure publication is also unavailable, watch warns
|
|
2312
|
+
with both errors and retries at least one second apart (or the configured
|
|
2313
|
+
interval, if longer). It retains one bounded unreported window and appends
|
|
2314
|
+
it on recovery, without blocking handoff acceptance. Local warnings do not
|
|
2315
|
+
start the durable attention clock retroactively; explicit stops remain stops.
|
|
2316
|
+
Validation errors include reducer, scope, cursor, field
|
|
2222
2317
|
path, and running version/commit in the stored tick error.
|
|
2223
2318
|
|
|
2224
2319
|
Repository conditions are included with no slugs or with `--repository`.
|
|
@@ -2270,13 +2365,14 @@ outcome. Last-tick age refreshes independently of the event cursor and never use
|
|
|
2270
2365
|
heartbeat as completion evidence. Open telemetry protects unsafe work during
|
|
2271
2366
|
shutdown; historical journals retain their boundary fallback. Missing historical
|
|
2272
2367
|
evidence is null. The liveness query uses
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2368
|
+
persisted repository and exact per-run reduced values, including when newer
|
|
2369
|
+
invocations hide an older holder or stop. Missing facts never trigger a full-log
|
|
2370
|
+
fallback.
|
|
2276
2371
|
|
|
2277
2372
|
Repository-following `ab watch` additionally emits a read-only `dispatcher.lost`
|
|
2278
2373
|
observation when an observed lease expires without a matching stop or validated
|
|
2279
|
-
successor takeover.
|
|
2374
|
+
successor takeover. Any recorded stop, normal or abnormal, suppresses loss;
|
|
2375
|
+
abnormal stops retain their own default attention event. A completed ownership transfer suppresses predecessor loss
|
|
2280
2376
|
even while its sessions drain; a handoff without takeover still reports loss on
|
|
2281
2377
|
expiry. Successor loss and upgrade-failure/rollback attention remain independent. JSON carries
|
|
2282
2378
|
`observation` instead of `event`, with run, observedAt, leaseExpiresAt and available
|
|
@@ -2594,7 +2690,15 @@ clears it. `policy.janitorBackoffMaxSeconds` sets the positive integer cap.
|
|
|
2594
2690
|
|
|
2595
2691
|
A classified forge rate limit records repository degradation with `resetAt`.
|
|
2596
2692
|
Forge work waits during cooldown; passing the deadline permits a recovery
|
|
2597
|
-
request
|
|
2693
|
+
request; a successful probe records automatic recovery. An authorized operator
|
|
2694
|
+
may explicitly override erroneous recorded state with
|
|
2695
|
+
`ab repository forge-clear --forge <name> --reason <text>` or
|
|
2696
|
+
`repository.forge_clear {repo, forge, reason}`. This appends a human-attributed
|
|
2697
|
+
`dispatcher.forge-recovered` fact with the reason; it does not prove provider
|
|
2698
|
+
success. A subsequent actual limit records a fresh cooldown. Hosted admission
|
|
2699
|
+
requires a schema-valid finite ISO `resetAt` no later than server time plus
|
|
2700
|
+
24 hours, inclusive; past deadlines remain valid. Rejection never clamps or
|
|
2701
|
+
invents a provider reset, and historical events remain readable.
|
|
2598
2702
|
Native merge application failures keep candidate-specific retry eligibility,
|
|
2599
2703
|
including automatic decisions without a human command. Retries recheck consent,
|
|
2600
2704
|
holds, verification and the exact candidate. Uncertain enables remain pending
|
|
@@ -2651,3 +2755,26 @@ automatic and explicit demand points, minimal presence paths and upgrade behavio
|
|
|
2651
2755
|
Deprecated config spelling for `[merge]` / `[[merge]]`; see the
|
|
2652
2756
|
[compatibility notes](references/merge-policy.md#deprecated-spellings). Never
|
|
2653
2757
|
declare both spellings, including empty arrays. `ab upgrade` migrates this key.
|
|
2758
|
+
|
|
2759
|
+
|
|
2760
|
+
### Permanent hosted project deletion
|
|
2761
|
+
|
|
2762
|
+
Super users and organization owners can permanently delete an authorized project
|
|
2763
|
+
from the web Projects page after a warning and count preview in the shared confirmation dialog. This removes
|
|
2764
|
+
hosted state, tickets, blobs, secrets and accounts, revokes all credentials and
|
|
2765
|
+
retains only repository, actor, deletion time and an opaque generation id as audit.
|
|
2766
|
+
`ab disconnect` only revokes the saved credential; admin `projects remove` only
|
|
2767
|
+
unregisters access and retains data. Failed deletion leaves access refused and
|
|
2768
|
+
supports retry with the original preview token from the Projects page’s unfinished deletions list, including after a
|
|
2769
|
+
reload or service restart; registration waits for cleanup. Each request shares one
|
|
2770
|
+
full admission per project. Deletion invalidates admitted generations during the
|
|
2771
|
+
initial purge and waits only for active mutation transactions; a later mutation
|
|
2772
|
+
in the same request is refused atomically, while earlier commits remain allowed. Legacy untraceable orphan blobs
|
|
2773
|
+
with no ownership record or retained project reference are excluded from deletion.
|
|
2774
|
+
A fresh connection requires browser approval and starts empty, including hosted
|
|
2775
|
+
ticket numbering from 1. Old credentials remain invalid with 401; independently
|
|
2776
|
+
repository-established requests receive 403 project not registered. See
|
|
2777
|
+
[project deletion](references/operator-api.md#permanent-project-deletion) for
|
|
2778
|
+
generation-bound preview tokens and API semantics.
|
|
2779
|
+
|
|
2780
|
+
Paged operator ticket listings may use the optional API 1.9 `TicketSource.listPage(criteria, page)` capability; without it, the operator reads the full listing and slices it. Native errors propagate. CLI ticket lists and dispatcher ready scans remain exhaustive through `listReady`/`listAll`. PostgreSQL pages natively; file, Linear and remote `HostedTicketSource` retain fallback. The POST list-ready protocol stays exhaustive. See the [custom source contract](references/plugin-authoring.md) for types and contract coverage.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Billing accounts
|
|
2
|
+
|
|
3
|
+
Named accounts select billing for Claude Code or Codex, using the user's own
|
|
4
|
+
subscription within ordinary individual usage. Claude and Kimi credentials are
|
|
5
|
+
provisioned manually; Autobuild never runs `claude setup-token`. ChatGPT
|
|
6
|
+
accounts use OpenAI's browser authorization through the CLI.
|
|
7
|
+
|
|
8
|
+
```toml
|
|
9
|
+
[accounts.personal]
|
|
10
|
+
kind = "claude-subscription"
|
|
11
|
+
credentialEnv = "CLAUDE_CODE_OAUTH_TOKEN"
|
|
12
|
+
|
|
13
|
+
[accounts.kimi]
|
|
14
|
+
kind = "kimi-code"
|
|
15
|
+
credentialEnv = "KIMI_CODE_KEY"
|
|
16
|
+
region = "overseas"
|
|
17
|
+
|
|
18
|
+
[accounts.kimi-china]
|
|
19
|
+
kind = "kimi-code"
|
|
20
|
+
credentialEnv = "KIMI_CHINA_KEY"
|
|
21
|
+
region = "china"
|
|
22
|
+
|
|
23
|
+
[roles.implement]
|
|
24
|
+
runtime = "claude"
|
|
25
|
+
account = "kimi"
|
|
26
|
+
model = "kimi-for-coding"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`account` inherits independently on roles and alternates. Without an explicit
|
|
30
|
+
selection, a Claude route chooses the sole Claude subscription account; multiple
|
|
31
|
+
subscription accounts require an explicit selection. ChatGPT accounts require explicit selection on Codex; Claude and Kimi accounts
|
|
32
|
+
require Claude Code. Incompatible runtime selections are rejected. Repositories with no accounts retain legacy authentication.
|
|
33
|
+
Locally a Claude subscription can use its named token or the host login; Kimi
|
|
34
|
+
requires its membership key. Invalid credentials need renewal (`claude setup-token`
|
|
35
|
+
for Claude, replacement membership key for Kimi); quota and overload failures
|
|
36
|
+
retain alternate fallback.
|
|
37
|
+
|
|
38
|
+
Selected Claude/Kimi credentials stay out of process arguments: each invocation
|
|
39
|
+
uses a private 0700 directory and a regular 0600 settings file, removed after
|
|
40
|
+
normal exit, launch failure or cancellation. The settings preserve selected-account
|
|
41
|
+
authentication precedence over saved user/project settings. Remote settings and
|
|
42
|
+
environments continue to contain placeholders only.
|
|
43
|
+
|
|
44
|
+
Choose the region of your Kimi membership. The default `overseas` selects
|
|
45
|
+
`https://api.kimi.ai/coding/`; `china` selects `https://api.kimi.com/coding/`.
|
|
46
|
+
The base URL and egress hostname are fixed together and cannot be overridden
|
|
47
|
+
independently. There is no cross-region retry or assertion that keys work across
|
|
48
|
+
regions. Claude Code keeps its native User-Agent.
|
|
49
|
+
|
|
50
|
+
In Vercel Sandbox the guest holds stable nonsecret placeholders, including when
|
|
51
|
+
credential variables are explicitly allowlisted. The host egress policy replaces
|
|
52
|
+
an exact account placeholder header only on its provider's exact hostname.
|
|
53
|
+
The next dispatcher observation tick refreshes credentials for subsequent
|
|
54
|
+
requests without reprovisioning. Changing a local dispatcher's `.env` still needs
|
|
55
|
+
a restart. Accounts are deployment-owned descriptors; configuration artifacts
|
|
56
|
+
contain variable names, never values. Validation reports host credential presence
|
|
57
|
+
and makes one minimal request using each account's actual runtime, including
|
|
58
|
+
unused accounts, in the disposable sandbox. Hosted ChatGPT credentials use the
|
|
59
|
+
metadata readiness boundary described below.
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## ChatGPT subscriptions
|
|
63
|
+
|
|
64
|
+
ChatGPT Plus and Pro are eligible for [Sign in with ChatGPT](https://developers.openai.com/siwc/quickstart).
|
|
65
|
+
Authorization grants plan usage for eligible Responses requests; it does not
|
|
66
|
+
grant access to ChatGPT conversations. Included usage is shared with the plan
|
|
67
|
+
and other authorized apps. Plan exhaustion retains configured alternate fallback.
|
|
68
|
+
|
|
69
|
+
```toml
|
|
70
|
+
[accounts.chatgpt]
|
|
71
|
+
kind = "chatgpt-subscription"
|
|
72
|
+
credentialEnv = "CHATGPT_ACCESS_TOKEN"
|
|
73
|
+
|
|
74
|
+
[roles.implement]
|
|
75
|
+
runtime = "codex"
|
|
76
|
+
account = "chatgpt"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Run `bun ab accounts login chatgpt --local` on your own machine for a local
|
|
80
|
+
dispatcher, or `bun ab accounts login chatgpt --project` for a connected
|
|
81
|
+
project. Without a destination flag, connected projects choose project storage;
|
|
82
|
+
others choose local storage. The destination is shown before the browser opens.
|
|
83
|
+
OpenAI handles consent and authorization. No token is printed.
|
|
84
|
+
|
|
85
|
+
Local credentials live in protected, ignored main-checkout
|
|
86
|
+
`.autobuild/accounts/` state shared by worktrees. Project sign-in transfers
|
|
87
|
+
credentials directly to the encrypted refreshing project secret named by
|
|
88
|
+
`credentialEnv`; it retains no renewable credential locally. This name
|
|
89
|
+
identifies a host access-token slot, not a refresh token supplied in TOML.
|
|
90
|
+
ChatGPT accounts must use slots distinct from every other account. Existing
|
|
91
|
+
ChatGPT descriptors cannot change during live configuration reload; stop dispatch
|
|
92
|
+
before replacing a descriptor, or introduce a new account name.
|
|
93
|
+
|
|
94
|
+
The stable opaque host identifier belongs to the destination; the issued
|
|
95
|
+
client identifier belongs to the authorized ChatGPT registration. Reauthorization
|
|
96
|
+
keeps identity and registration associated. Never copy the ambient Codex login.
|
|
97
|
+
|
|
98
|
+
Exactly one owner refreshes each connection: the local dispatcher or the
|
|
99
|
+
hosted refreshing secret. Both owners refresh only at or after the maximum of
|
|
100
|
+
any provider earliest-refresh floor and their pre-expiry threshold. Local renewal
|
|
101
|
+
uses a one-minute margin; hosted renewal uses ten minutes to tolerate a delayed
|
|
102
|
+
five-minute tick. Before refresh is due, still-valid access is supplied unchanged.
|
|
103
|
+
Expired access behind a future provider floor is never delivered.
|
|
104
|
+
Credentials rotate atomically before delivery. Expired access tokens remain
|
|
105
|
+
refreshable after dispatcher downtime; a live validator or dispatcher claim
|
|
106
|
+
cannot be displaced. Only a proven dead process or a released claim permits
|
|
107
|
+
a successor to own renewal.
|
|
108
|
+
Sandboxes hold stable placeholders; only an exact bearer match on
|
|
109
|
+
`api.openai.com` receives the current access token at egress. Local Codex uses
|
|
110
|
+
an isolated CODEX_HOME and a capability-protected loopback Responses forwarder which
|
|
111
|
+
reads current durable state and never refreshes. The shell HOME stays intact
|
|
112
|
+
for Git identity and other operator tools. Missing sandbox credentials revoke
|
|
113
|
+
only their egress transforms; unrelated routes keep running. If hosted secret
|
|
114
|
+
resolution fails, intake and new execution launches wait for recovery. A
|
|
115
|
+
revision-fenced observation-only pass uses ready credentials to repair running
|
|
116
|
+
policies; if those credentials cannot be read, the project is skipped. A failed policy
|
|
117
|
+
update stops the sandbox because revocation could not be confirmed.
|
|
118
|
+
|
|
119
|
+
A failed or uncertain refresh is terminal for that credential generation.
|
|
120
|
+
Sign in again with `bun ab accounts login chatgpt` for the same destination;
|
|
121
|
+
do not retry the old refresh token. Token rejection raises account-specific
|
|
122
|
+
attention rather than an alternate or retry loop.
|
|
123
|
+
|
|
124
|
+
For local credentials, `bun ab init --validate` checks the owner and current
|
|
125
|
+
credential and makes a minimal Codex request. Validation uses a temporary
|
|
126
|
+
exclusive ownership claim only when no dispatcher owns the record. For hosted
|
|
127
|
+
project credentials it uses write-only metadata: presence, owner, set time,
|
|
128
|
+
refresh status and any refresh-window warning. It never downloads tokens.
|
|
129
|
+
**The first hosted build is the live check.** A short refresh-window warning is
|
|
130
|
+
advisory and does not revoke a still-valid credential.
|
|
@@ -249,7 +249,11 @@ metadata never changes completeness or merge eligibility.
|
|
|
249
249
|
Collecting nodes may intentionally trail their parent. They refresh before
|
|
250
250
|
verification and merge, for queued dependency presence, on operator request,
|
|
251
251
|
and after accepted re-parenting. Descendants need independent demand; presence
|
|
252
|
-
requests follow only the minimal proven ancestor path.
|
|
252
|
+
requests follow only the minimal proven ancestor path. Unavailable immediate-parent
|
|
253
|
+
identities remain pending; durable availability facts bound idle preparation across
|
|
254
|
+
restart. Head, request, ancestry, alias and confirmed landing changes trigger a fresh
|
|
255
|
+
assessment. Re-parenting to another branch explicitly disposes of old destination
|
|
256
|
+
requests without claiming coverage. See
|
|
253
257
|
[restacking](restacking.md#timing-and-evidence) for timing, requests and distance.
|
|
254
258
|
|
|
255
259
|
## Polling and status
|
|
@@ -263,9 +267,15 @@ GitHub-only changes are discovered on the next due check, within the idle
|
|
|
263
267
|
interval plus normal tick scheduling while the dispatcher is running; failure,
|
|
264
268
|
cooldown and transport-budget gates still apply. Pending operations retain
|
|
265
269
|
active polling and action-time readiness checks remain fresh. Successful
|
|
266
|
-
`node.poll-checked` facts preserve quiet history across restarts
|
|
267
|
-
|
|
268
|
-
|
|
270
|
+
`node.poll-checked` advisory facts preserve quiet history across restarts.
|
|
271
|
+
Each successfully observed activity or policy epoch records one quiet-period
|
|
272
|
+
anchor; unchanged active checks add no checkpoints. At the quiet threshold a
|
|
273
|
+
check may be immediately due, then each successful due idle check records its
|
|
274
|
+
completion. Growth is bounded by one anchor per observed epoch plus due idle
|
|
275
|
+
checks. Missing or unusable evidence forces a fresh check; interrupted or
|
|
276
|
+
contended writes leave the durable deadline unchanged and retry conservatively. `ab build status` reports active or idle cadence and the
|
|
277
|
+
last durably recorded successful check (or unrecorded evidence); this timestamp
|
|
278
|
+
can trail successful active checks.
|
|
269
279
|
|
|
270
280
|
## Operator node spec revisions
|
|
271
281
|
|
|
@@ -285,4 +295,5 @@ Active verification/reconcile or writer work, restack/reparent work, pause,
|
|
|
285
295
|
pending controls, merge intent and ended PRs refuse the no-escalation path.
|
|
286
296
|
A concurrent state change refuses publication with a retry explanation;
|
|
287
297
|
uncited artifacts are inert. Leaves still require an open escalation and
|
|
288
|
-
restart from `plan
|
|
298
|
+
restart from `plan` after any unfinished reconcile resumes under the revised
|
|
299
|
+
spec and its publication is confirmed.
|
|
@@ -29,9 +29,7 @@ and re-finalization until hold or completion; it approves the merge rather than
|
|
|
29
29
|
an immutable diff. Accepted node reparenting revokes it. Commands and receipts
|
|
30
30
|
are sequence-correlated: hold acknowledgement confirms native cancellation;
|
|
31
31
|
merge acknowledgement does not claim gates passed. MCP/operator tools offer the
|
|
32
|
-
same actions; the terminal uses `l`/`o`.
|
|
33
|
-
**Hold** on a merge awaiting consent. These controls record the same durable
|
|
34
|
-
actions; **Merge** does not mean the merge gates have passed.
|
|
32
|
+
same actions; the terminal uses `l`/`o`. These controls record durable actions; merge consent does not mean the merge gates have passed.
|
|
35
33
|
|
|
36
34
|
## Worked configurations
|
|
37
35
|
|