@defrex/autobuild 1.0.1 → 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.
Files changed (247) hide show
  1. package/README.md +10 -18
  2. package/SPEC.md +499 -238
  3. package/bin/ab-dispatch-generation.ts +11 -2
  4. package/docs/accounts.md +119 -0
  5. package/docs/agent-runtimes.md +4 -4
  6. package/docs/answering-blocked-builds.md +2 -2
  7. package/docs/architecture.md +262 -53
  8. package/docs/assets/headline-wide.png +0 -0
  9. package/docs/build-store.md +3 -41
  10. package/docs/builds.md +4 -4
  11. package/docs/cli.md +18 -4
  12. package/docs/configuration-overview.md +115 -4
  13. package/docs/configuration.md +488 -334
  14. package/docs/dispatcher-hosting.md +19 -34
  15. package/docs/dispatcher.md +1 -1
  16. package/docs/forges.md +5 -5
  17. package/docs/getting-started.md +2 -2
  18. package/docs/glossary.md +6 -6
  19. package/docs/intake.md +2 -0
  20. package/docs/integration-overview.md +15 -15
  21. package/docs/integration-tree.md +45 -38
  22. package/docs/integration.md +6 -6
  23. package/{skills/guide/references/landing-policy.md → docs/merge-policy.md} +40 -24
  24. package/docs/migration-1.0.md +17 -13
  25. package/docs/operating.md +41 -19
  26. package/docs/operator-api.md +180 -51
  27. package/docs/operator-surfaces.md +5 -18
  28. package/docs/overview.md +3 -3
  29. package/docs/plugin-authoring.md +21 -0
  30. package/docs/remote-store-protocol.md +242 -68
  31. package/docs/remote-ticket-protocol.md +30 -50
  32. package/docs/restacking.md +54 -15
  33. package/docs/seams.md +8 -8
  34. package/docs/setup.md +59 -119
  35. package/docs/skills.md +1 -1
  36. package/docs/spec-standard.md +6 -6
  37. package/docs/ticket-dependencies.md +7 -7
  38. package/docs/ticket-sources.md +18 -0
  39. package/docs/tickets.md +8 -2
  40. package/docs/troubleshooting.md +8 -12
  41. package/docs/upgrading.md +9 -4
  42. package/docs/verification.md +60 -14
  43. package/docs/workspaces.md +4 -4
  44. package/package.json +17 -6
  45. package/packages/core/src/accounts/chatgpt-oauth.ts +216 -0
  46. package/packages/core/src/accounts/chatgpt-state.ts +41 -0
  47. package/packages/core/src/accounts/local-credentials.ts +194 -0
  48. package/packages/core/src/accounts/local-inference.ts +106 -0
  49. package/packages/core/src/accounts/local-owner.ts +123 -0
  50. package/packages/core/src/accounts/sensitive.ts +2 -0
  51. package/packages/core/src/cli/accounts.ts +147 -0
  52. package/packages/core/src/cli/binary-direct.ts +13 -1
  53. package/packages/core/src/cli/binary-lifecycle.ts +65 -2
  54. package/packages/core/src/cli/binary.ts +3 -1
  55. package/packages/core/src/cli/build-control.ts +83 -28
  56. package/packages/core/src/cli/connect.ts +3 -3
  57. package/packages/core/src/cli/context.ts +81 -38
  58. package/packages/core/src/cli/dashboard/facts.ts +2 -1
  59. package/packages/core/src/cli/dashboard/integration-detail.ts +8 -8
  60. package/packages/core/src/cli/dashboard/integration-row.ts +40 -13
  61. package/packages/core/src/cli/dashboard/landing-display.ts +25 -0
  62. package/packages/core/src/cli/dashboard/model.ts +56 -33
  63. package/packages/core/src/cli/dashboard/poll.ts +9 -3
  64. package/packages/core/src/cli/dashboard/render.ts +59 -37
  65. package/packages/core/src/cli/dashboard/target-distance.ts +14 -0
  66. package/packages/core/src/cli/dashboard/tree.ts +3 -2
  67. package/packages/core/src/cli/dispatch-args.ts +1 -1
  68. package/packages/core/src/cli/dispatch-frontend.ts +6 -3
  69. package/packages/core/src/cli/dispatch-handoff.ts +125 -44
  70. package/packages/core/src/cli/dispatch-launch-contract.ts +187 -0
  71. package/packages/core/src/cli/dispatch-launcher.ts +54 -21
  72. package/packages/core/src/cli/dispatch-preflight.ts +6 -1
  73. package/packages/core/src/cli/dispatch.ts +106 -11
  74. package/packages/core/src/cli/env.ts +4 -0
  75. package/packages/core/src/cli/help.ts +46 -23
  76. package/packages/core/src/cli/init-readiness-remote.ts +22 -1
  77. package/packages/core/src/cli/init-readiness-shared.ts +5 -1
  78. package/packages/core/src/cli/init-validation.ts +160 -18
  79. package/packages/core/src/cli/main.ts +68 -8
  80. package/packages/core/src/cli/node-verification-provenance.ts +1 -97
  81. package/packages/core/src/cli/publication-settlement.ts +47 -21
  82. package/packages/core/src/cli/repository-status.ts +20 -9
  83. package/packages/core/src/cli/secrets.ts +173 -0
  84. package/packages/core/src/cli/status.ts +42 -5
  85. package/packages/core/src/cli/store-opening.ts +17 -2
  86. package/packages/core/src/cli/terminal.ts +22 -1
  87. package/packages/core/src/cli/terminals.ts +14 -10
  88. package/packages/core/src/cli/upgrade-agent.ts +9 -1
  89. package/packages/core/src/cli/upgrade-landing.ts +70 -30
  90. package/packages/core/src/cli/upgrade.ts +3 -1
  91. package/packages/core/src/cli/wait.ts +15 -7
  92. package/packages/core/src/cli/watch-lifetime.ts +111 -0
  93. package/packages/core/src/cli/watch.ts +635 -510
  94. package/packages/core/src/config/accounts.ts +101 -0
  95. package/packages/core/src/config/effective-artifact.fixture.ts +27 -0
  96. package/packages/core/src/config/effective-artifact.ts +13 -0
  97. package/packages/core/src/config/landing.ts +1 -1
  98. package/packages/core/src/config/live.ts +14 -1
  99. package/packages/core/src/config/load.ts +21 -1
  100. package/packages/core/src/config/pipeline-source.ts +28 -0
  101. package/packages/core/src/config/reference-metadata.ts +2 -0
  102. package/packages/core/src/config/reference.ts +22 -7
  103. package/packages/core/src/config/roles.ts +54 -3
  104. package/packages/core/src/config/schema.ts +146 -162
  105. package/packages/core/src/context-directory.ts +26 -0
  106. package/packages/core/src/distribution-packaging.ts +26 -5
  107. package/packages/core/src/events/catalog.ts +10 -2
  108. package/packages/core/src/events/compatibility.ts +2 -1
  109. package/packages/core/src/events/globs.ts +1 -1
  110. package/packages/core/src/events/payloads.ts +73 -1
  111. package/packages/core/src/events/policy.ts +7 -0
  112. package/packages/core/src/events/repository.ts +4 -4
  113. package/packages/core/src/events/sessions.ts +6 -6
  114. package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +574 -0
  115. package/packages/core/src/kernel/auto-merge.ts +2 -2
  116. package/packages/core/src/kernel/engine.ts +255 -26
  117. package/packages/core/src/kernel/generators/leaf-restack-log.ts +10 -0
  118. package/packages/core/src/kernel/integration-landing.ts +3 -3
  119. package/packages/core/src/kernel/integration-state.ts +27 -4
  120. package/packages/core/src/kernel/leaf-restack-state.ts +28 -3
  121. package/packages/core/src/kernel/log-index.ts +13 -1
  122. package/packages/core/src/kernel/node-landing.ts +8 -8
  123. package/packages/core/src/kernel/node-parent.ts +2 -2
  124. package/packages/core/src/kernel/node-restack-transaction.ts +1 -1
  125. package/packages/core/src/kernel/node-verification-context.ts +216 -0
  126. package/packages/core/src/kernel/phases.ts +1 -1
  127. package/packages/core/src/kernel/plan-verify-selection.ts +16 -0
  128. package/packages/core/src/kernel/publication-retry.ts +168 -0
  129. package/packages/core/src/kernel/reconcile-restack.ts +29 -1
  130. package/packages/core/src/kernel/reducer.ts +85 -5
  131. package/packages/core/src/kernel/target-distance.ts +45 -0
  132. package/packages/core/src/kernel/terminal-guard.ts +10 -1
  133. package/packages/core/src/kernel/verify-stage-state.ts +123 -0
  134. package/packages/core/src/kernel/verify-stages.ts +39 -0
  135. package/packages/core/src/ontology.ts +1 -0
  136. package/packages/core/src/operator/annotations.ts +6 -0
  137. package/packages/core/src/operator/control.ts +1 -1
  138. package/packages/core/src/operator/index.ts +3 -7
  139. package/packages/core/src/operator/landings.ts +5 -1
  140. package/packages/core/src/operator/presentation.ts +6 -1
  141. package/packages/core/src/operator/protocol.ts +6 -0
  142. package/packages/core/src/operator/query.ts +14 -18
  143. package/packages/core/src/operator/registry.ts +39 -7
  144. package/packages/core/src/operator/sandbox-host.ts +64 -40
  145. package/packages/core/src/operator/sandbox.ts +3 -0
  146. package/packages/core/src/operator/ticket-source-backend.ts +3 -12
  147. package/packages/core/src/operator/tickets.ts +25 -4
  148. package/packages/core/src/plugins/manifest.ts +2 -1
  149. package/packages/core/src/ports/forge/contract.ts +2 -2
  150. package/packages/core/src/ports/forge/git-rewrite.ts +25 -2
  151. package/packages/core/src/ports/forge/github-readiness.ts +2 -2
  152. package/packages/core/src/ports/forge/github.ts +26 -7
  153. package/packages/core/src/ports/forge/local-git.ts +4 -4
  154. package/packages/core/src/ports/forge/readiness.ts +1 -1
  155. package/packages/core/src/ports/forge-failure.ts +24 -0
  156. package/packages/core/src/ports/runner/account-env.ts +88 -0
  157. package/packages/core/src/ports/runner/chatgpt-provider.ts +85 -0
  158. package/packages/core/src/ports/runner/claude.ts +26 -2
  159. package/packages/core/src/ports/runner/codex.ts +63 -31
  160. package/packages/core/src/ports/runner/one-shot.ts +2 -0
  161. package/packages/core/src/ports/runner/provider-error.ts +5 -0
  162. package/packages/core/src/ports/runner/routing.ts +35 -4
  163. package/packages/core/src/ports/tickets/contract.ts +58 -0
  164. package/packages/core/src/ports/tickets/tree.ts +1 -1
  165. package/packages/core/src/ports/types.ts +28 -7
  166. package/packages/core/src/ports/workspace/account-policy.ts +72 -0
  167. package/packages/core/src/ports/workspace/build-execution.ts +9 -2
  168. package/packages/core/src/ports/workspace/builtin-capabilities.ts +1 -0
  169. package/packages/core/src/ports/workspace/create.ts +2 -0
  170. package/packages/core/src/ports/workspace/git-worktree.ts +6 -1
  171. package/packages/core/src/ports/workspace/phase-scratch.ts +4 -3
  172. package/packages/core/src/ports/workspace/provider-capabilities.ts +1 -0
  173. package/packages/core/src/ports/workspace/vercel-sandbox.ts +182 -72
  174. package/packages/core/src/processes/build-child.ts +6 -8
  175. package/packages/core/src/processes/build-execution-state.ts +8 -5
  176. package/packages/core/src/processes/build-runner.ts +554 -99
  177. package/packages/core/src/processes/dispatcher.ts +209 -101
  178. package/packages/core/src/processes/execution-no-progress.ts +8 -1
  179. package/packages/core/src/processes/execution-settlement.ts +21 -3
  180. package/packages/core/src/processes/harvest-runner.ts +68 -8
  181. package/packages/core/src/processes/phase-failure-budget.ts +1 -0
  182. package/packages/core/src/processes/publication-loss.ts +8 -2
  183. package/packages/core/src/processes/publication-state.ts +42 -4
  184. package/packages/core/src/processes/repo-view.ts +14 -0
  185. package/packages/core/src/processes/verify-cycle-config.ts +96 -0
  186. package/packages/core/src/project-secrets.ts +105 -0
  187. package/packages/core/src/{integration → scenarios}/harness.ts +330 -317
  188. package/packages/core/src/secret-name.ts +41 -0
  189. package/packages/core/src/store/account-redaction.ts +156 -0
  190. package/packages/core/src/store/adapter.ts +1 -0
  191. package/packages/core/src/store/build-scope.ts +9 -0
  192. package/packages/core/src/store/contract.ts +116 -2
  193. package/packages/core/src/store/local/schema.ts +13 -0
  194. package/packages/core/src/store/local/store.ts +42 -0
  195. package/packages/core/src/store/memory.ts +47 -0
  196. package/packages/core/src/store/operator-presence.ts +21 -0
  197. package/packages/core/src/store/phase-session.ts +10 -0
  198. package/packages/core/src/store/reducer-value-shapes.json +5185 -4156
  199. package/packages/core/src/store/remote/client.ts +89 -48
  200. package/packages/core/src/store/remote/compatibility.ts +20 -0
  201. package/packages/core/src/store/remote/protocol.ts +4 -0
  202. package/packages/core/src/store/remote/version.ts +3 -1
  203. package/packages/core/src/store/retention.ts +2 -3
  204. package/packages/core/src/store/session-handle.ts +9 -0
  205. package/packages/core/src/store/streams/session-writer.ts +1 -1
  206. package/packages/core/src/store/types.ts +12 -2
  207. package/packages/core/src/testing/dispatch-read-budget.ts +122 -0
  208. package/packages/core/src/testing/index.ts +12 -1
  209. package/packages/core/src/testing/reduced-read-budget.ts +47 -0
  210. package/packages/core/src/testing/temp-directories.ts +58 -0
  211. package/skills/code-review/SKILL.md +23 -9
  212. package/skills/finalize/SKILL.md +15 -7
  213. package/skills/guide/SKILL.md +373 -148
  214. package/skills/guide/references/accounts.md +119 -0
  215. package/skills/guide/references/integration-tree.md +45 -38
  216. package/{docs/landing-policy.md → skills/guide/references/merge-policy.md} +40 -24
  217. package/skills/guide/references/migration-1.0.md +17 -13
  218. package/skills/guide/references/operator-api.md +180 -51
  219. package/skills/guide/references/plugin-authoring.md +21 -0
  220. package/skills/guide/references/remote-store-protocol.md +242 -68
  221. package/skills/guide/references/remote-ticket-protocol.md +30 -50
  222. package/skills/guide/references/restacking.md +54 -15
  223. package/skills/guide/references/setup.md +59 -119
  224. package/skills/guide/references/spec-standard.md +6 -6
  225. package/skills/guide/references/ticket-dependencies.md +7 -7
  226. package/skills/harvest/SKILL.md +3 -1
  227. package/skills/harvest-review/SKILL.md +3 -1
  228. package/skills/implement/SKILL.md +43 -17
  229. package/skills/operate/SKILL.md +118 -118
  230. package/skills/plan/SKILL.md +39 -13
  231. package/skills/plan-review/SKILL.md +15 -10
  232. package/skills/reconcile/SKILL.md +22 -3
  233. package/skills/spec/SKILL.md +20 -20
  234. package/skills/tickets/SKILL.md +12 -9
  235. package/templates/autobuild.toml +1 -1
  236. package/templates/hosted-service/package.json +2 -2
  237. package/docs/hosted-dispatcher-cutover-validation.md +0 -178
  238. package/docs/hosted-dispatcher.md +0 -275
  239. package/docs/hosted-service.md +0 -293
  240. package/docs/mcp.md +0 -149
  241. package/packages/core/src/orchestrator/approvals.ts +0 -115
  242. package/packages/core/src/orchestrator/conversation.ts +0 -167
  243. package/packages/core/src/orchestrator/model.ts +0 -86
  244. package/packages/core/src/orchestrator/prompt.ts +0 -63
  245. package/packages/core/src/orchestrator/tools.ts +0 -117
  246. package/packages/core/src/orchestrator/turn-runner.ts +0 -457
  247. package/packages/core/src/processes/orchestrator-tick.ts +0 -360
@@ -4,19 +4,26 @@ import { cachedRuntime } from '../packages/core/src/cli/dispatch-runtime-cache'
4
4
  import { distributionRoot } from '../packages/core/src/distribution'
5
5
  import {
6
6
  consumeGenerationMarker,
7
+ consumeUpgradeCondition,
8
+ DISPATCH_CONDITIONAL_ENV,
7
9
  GENERATION_EXITS,
8
10
  DISPATCH_LAUNCH_CONTEXT_ENV,
9
11
  } from '../packages/core/src/cli/dispatch-launch-contract'
10
12
  import { watchDispatchParent } from '../packages/core/src/cli/dispatch-parent-watch'
11
13
  let code: number = GENERATION_EXITS.failed
14
+ const readerMode = process.argv[2]?.startsWith('--read-') ?? false
12
15
  let presentationOwner = process.argv[2] !== '--preflight'
13
16
  try {
17
+ const condition =
18
+ process.argv[2] === '--read-upgrade' ? consumeUpgradeCondition(process.env) : undefined
19
+ delete process.env[DISPATCH_CONDITIONAL_ENV]
14
20
  const launch = consumeGenerationMarker(process.env, distributionRoot())
15
21
  if (!(await cachedRuntime(launch.runtimeRoot)))
16
22
  throw new Error('dispatcher generation requires a completed cached runtime')
17
23
  const { loadDotEnv } = await import('../packages/core/src/cli/dotenv')
18
24
  const { join } = await import('node:path')
19
25
  loadDotEnv(join(launch.checkout, '.env'), process.env)
26
+ delete process.env[DISPATCH_CONDITIONAL_ENV]
20
27
  const { readHandoff } = await import('../packages/core/src/cli/dispatch-handoff')
21
28
  if (process.argv[2] === '--read-journal') {
22
29
  const { readGenerationJournal } = await import('../packages/core/src/cli/dispatch-handoff')
@@ -33,7 +40,9 @@ try {
33
40
  if (process.argv[2] === '--read-upgrade') {
34
41
  const { readUpgradeProjection } = await import('../packages/core/src/cli/dispatch-handoff')
35
42
  console.log(
36
- JSON.stringify(await readUpgradeProjection(launch, process.argv.slice(3), process.env)),
43
+ JSON.stringify(
44
+ await readUpgradeProjection(launch, process.argv.slice(3), process.env, { condition }),
45
+ ),
37
46
  )
38
47
  process.exit(0)
39
48
  }
@@ -87,7 +96,7 @@ try {
87
96
  watch.close()
88
97
  }
89
98
  } catch (error) {
90
- if (presentationOwner && ownsDispatchPresentation())
99
+ if (readerMode || (presentationOwner && ownsDispatchPresentation()))
91
100
  console.error(error instanceof Error ? error.message : String(error))
92
101
  }
93
102
  process.exit(code)
@@ -0,0 +1,119 @@
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
+ Choose the region of your Kimi membership. The default `overseas` selects
39
+ `https://api.kimi.ai/coding/`; `china` selects `https://api.kimi.com/coding/`.
40
+ The base URL and egress hostname are fixed together and cannot be overridden
41
+ independently. There is no cross-region retry or assertion that keys work across
42
+ regions. Claude Code keeps its native User-Agent.
43
+
44
+ In Vercel Sandbox the guest holds stable nonsecret placeholders, including when
45
+ credential variables are explicitly allowlisted. The host egress policy replaces
46
+ an exact account placeholder header only on its provider's exact hostname.
47
+ The next dispatcher observation tick refreshes credentials for subsequent
48
+ requests without reprovisioning. Changing a local dispatcher's `.env` still needs
49
+ a restart. Accounts are deployment-owned descriptors; configuration artifacts
50
+ contain variable names, never values. Validation reports host credential presence
51
+ and makes one minimal request using each account's actual runtime, including
52
+ unused accounts, in the disposable sandbox. Hosted ChatGPT credentials use the
53
+ metadata readiness boundary described below.
54
+
55
+
56
+ ## ChatGPT subscriptions
57
+
58
+ ChatGPT Plus and Pro are eligible for [Sign in with ChatGPT](https://developers.openai.com/siwc/quickstart).
59
+ Authorization grants plan usage for eligible Responses requests; it does not
60
+ grant access to ChatGPT conversations. Included usage is shared with the plan
61
+ and other authorized apps. Plan exhaustion retains configured alternate fallback.
62
+
63
+ ```toml
64
+ [accounts.chatgpt]
65
+ kind = "chatgpt-subscription"
66
+ credentialEnv = "CHATGPT_ACCESS_TOKEN"
67
+
68
+ [roles.implement]
69
+ runtime = "codex"
70
+ account = "chatgpt"
71
+ ```
72
+
73
+ Run `bun ab accounts login chatgpt --local` on your own machine for a local
74
+ dispatcher, or `bun ab accounts login chatgpt --project` for a connected
75
+ project. Without a destination flag, connected projects choose project storage;
76
+ others choose local storage. The destination is shown before the browser opens.
77
+ OpenAI handles consent and authorization. No token is printed.
78
+
79
+ Local credentials live in protected, ignored main-checkout
80
+ `.autobuild/accounts/` state shared by worktrees. Project sign-in transfers
81
+ credentials directly to the encrypted refreshing project secret named by
82
+ `credentialEnv`; it retains no renewable credential locally. This name
83
+ identifies a host access-token slot, not a refresh token supplied in TOML.
84
+ ChatGPT accounts must use slots distinct from every other account. Existing
85
+ ChatGPT descriptors cannot change during live configuration reload; stop dispatch
86
+ before replacing a descriptor, or introduce a new account name.
87
+
88
+ The stable opaque host identifier belongs to the destination; the issued
89
+ client identifier belongs to the authorized ChatGPT registration. Reauthorization
90
+ keeps identity and registration associated. Never copy the ambient Codex login.
91
+
92
+ Exactly one owner refreshes each connection: the local dispatcher or the
93
+ hosted refreshing secret. Credentials rotate atomically before delivery. Expired access tokens remain
94
+ refreshable after dispatcher downtime; a live validator or dispatcher claim
95
+ cannot be displaced. Only a proven dead process or a released claim permits
96
+ a successor to own renewal.
97
+ Sandboxes hold stable placeholders; only an exact bearer match on
98
+ `api.openai.com` receives the current access token at egress. Local Codex uses
99
+ an isolated CODEX_HOME and a capability-protected loopback Responses forwarder which
100
+ reads current durable state and never refreshes. The shell HOME stays intact
101
+ for Git identity and other operator tools. Missing sandbox credentials revoke
102
+ only their egress transforms; unrelated routes keep running. If hosted secret
103
+ resolution fails, intake and new execution launches wait for recovery. A
104
+ revision-fenced observation-only pass uses ready credentials to repair running
105
+ policies; if those credentials cannot be read, the project is skipped. A failed policy
106
+ update stops the sandbox because revocation could not be confirmed.
107
+
108
+ A failed or uncertain refresh is terminal for that credential generation.
109
+ Sign in again with `bun ab accounts login chatgpt` for the same destination;
110
+ do not retry the old refresh token. Token rejection raises account-specific
111
+ attention rather than an alternate or retry loop.
112
+
113
+ For local credentials, `bun ab init --validate` checks the owner and current
114
+ credential and makes a minimal Codex request. Validation uses a temporary
115
+ exclusive ownership claim only when no dispatcher owns the record. For hosted
116
+ project credentials it uses write-only metadata: presence, owner, set time,
117
+ refresh status and any refresh-window warning. It never downloads tokens.
118
+ **The first hosted build is the live check.** A short refresh-window warning is
119
+ advisory and does not revoke a still-valid credential.
@@ -16,11 +16,11 @@ A runtime transports agent turns: it starts, continues, cancels and ends session
16
16
 
17
17
  Install with `bun add -d --exact @defrex/autobuild`. Examples are complete minimal configs for local execution: install and authenticate the CLI on the dispatcher host, then run `bun ab init --validate`.
18
18
 
19
- A subscription login is host state and doesn't reach a remote sandbox. Remotely, provision every selected runtime and alternate and forward only API credentials; see [Workspaces](workspaces.md).
19
+ Claude Code supports named subscription and Kimi Code billing [accounts](configuration-overview.md#accounts). In a remote sandbox, the guest holds placeholders and host egress policy supplies credentials only to the selected provider. Use the unmodified runtime with your own subscription for ordinary individual usage. Provision every selected runtime and alternate; Pi retains its existing authentication. Codex can explicitly select a ChatGPT subscription account; see [billing accounts](configuration-overview.md#accounts). See [Workspaces](workspaces.md).
20
20
 
21
21
  | Runtime | Models | Model ids | Default model |
22
22
  |---|---|---|---|
23
- | `claude` | Anthropic, via Claude Code | `claude-` family | the CLI's default |
23
+ | `claude` | Anthropic or a selected Kimi Code account, via Claude Code | `claude-` family; Kimi membership IDs with a Kimi account | CLI default; `kimi-for-coding` for Kimi |
24
24
  | `codex` | OpenAI, via the Codex CLI | `gpt-` family | the CLI's default |
25
25
  | `pi` | many providers | `provider/model` | `kimi-coding/k3` |
26
26
 
@@ -28,7 +28,7 @@ Set the model with the role's `model` field, not in `args`; the adapter owns mod
28
28
 
29
29
  ### Claude Code (`claude`)
30
30
 
31
- Install `claude` ([setup](https://code.claude.com/docs/en/setup)) and log in. API-backed environments need a provider credential such as `ANTHROPIC_API_KEY`, not copied login state; see [Claude authentication](https://code.claude.com/docs/en/authentication).
31
+ Install `claude` ([setup](https://code.claude.com/docs/en/setup)) and log in. Remote environments can select a declared subscription or Kimi Code account; legacy API routes can use `ANTHROPIC_API_KEY`. Host login files are not copied; see [Claude authentication](https://code.claude.com/docs/en/authentication).
32
32
 
33
33
  <!-- seam-config:start -->
34
34
  ```toml
@@ -43,7 +43,7 @@ runtime = "claude"
43
43
 
44
44
  ### Codex (`codex`)
45
45
 
46
- Install `codex` ([CLI instructions](https://developers.openai.com/codex/cli)) and run `codex login`. API use needs its own credential, commonly `OPENAI_API_KEY`, with billing authority; see [Codex authentication](https://developers.openai.com/codex/auth).
46
+ Install `codex` ([CLI instructions](https://developers.openai.com/codex/cli)). Legacy routes use `codex login`; named ChatGPT subscription routes use `bun ab accounts login NAME` and leave that ambient login untouched. API use needs its own credential, commonly `OPENAI_API_KEY`, with billing authority; see [Codex authentication](https://developers.openai.com/codex/auth).
47
47
 
48
48
  <!-- seam-config:start -->
49
49
  ```toml
@@ -98,10 +98,10 @@ Each kernel `spec.revised` records the exact artifact and operator identity
98
98
  Ticket-origin revisions re-pin assets; supplied bodies preserve asset pins.
99
99
  The node recollects and verifies the new revision, including on the same head
100
100
  and parent after a failed cycle. Earlier cycles remain historical evidence
101
- and cannot block or authorize landing under the replacement. Children keep
101
+ and cannot block or authorize merge under the replacement. Children keep
102
102
  their specs, claims and targets; contributions are not restarted.
103
103
  Active verification/reconcile or writer work, restack/reparent work, pause,
104
- pending controls, landing intent and ended PRs refuse the no-escalation path.
104
+ pending controls, merge intent and ended PRs refuse the no-escalation path.
105
105
  A concurrent state change refuses publication with a retry explanation;
106
106
  uncited artifacts are inert. Leaves still require an open escalation and
107
107
  restart from `plan`.