@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.
- package/README.md +10 -18
- package/SPEC.md +499 -238
- package/bin/ab-dispatch-generation.ts +11 -2
- package/docs/accounts.md +119 -0
- package/docs/agent-runtimes.md +4 -4
- package/docs/answering-blocked-builds.md +2 -2
- package/docs/architecture.md +262 -53
- package/docs/assets/headline-wide.png +0 -0
- package/docs/build-store.md +3 -41
- package/docs/builds.md +4 -4
- package/docs/cli.md +18 -4
- package/docs/configuration-overview.md +115 -4
- package/docs/configuration.md +488 -334
- package/docs/dispatcher-hosting.md +19 -34
- package/docs/dispatcher.md +1 -1
- package/docs/forges.md +5 -5
- package/docs/getting-started.md +2 -2
- package/docs/glossary.md +6 -6
- package/docs/intake.md +2 -0
- package/docs/integration-overview.md +15 -15
- package/docs/integration-tree.md +45 -38
- package/docs/integration.md +6 -6
- package/{skills/guide/references/landing-policy.md → docs/merge-policy.md} +40 -24
- package/docs/migration-1.0.md +17 -13
- package/docs/operating.md +41 -19
- package/docs/operator-api.md +180 -51
- package/docs/operator-surfaces.md +5 -18
- package/docs/overview.md +3 -3
- package/docs/plugin-authoring.md +21 -0
- package/docs/remote-store-protocol.md +242 -68
- package/docs/remote-ticket-protocol.md +30 -50
- package/docs/restacking.md +54 -15
- package/docs/seams.md +8 -8
- package/docs/setup.md +59 -119
- package/docs/skills.md +1 -1
- package/docs/spec-standard.md +6 -6
- package/docs/ticket-dependencies.md +7 -7
- package/docs/ticket-sources.md +18 -0
- package/docs/tickets.md +8 -2
- package/docs/troubleshooting.md +8 -12
- package/docs/upgrading.md +9 -4
- package/docs/verification.md +60 -14
- package/docs/workspaces.md +4 -4
- package/package.json +17 -6
- 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-direct.ts +13 -1
- package/packages/core/src/cli/binary-lifecycle.ts +65 -2
- package/packages/core/src/cli/binary.ts +3 -1
- package/packages/core/src/cli/build-control.ts +83 -28
- package/packages/core/src/cli/connect.ts +3 -3
- package/packages/core/src/cli/context.ts +81 -38
- package/packages/core/src/cli/dashboard/facts.ts +2 -1
- package/packages/core/src/cli/dashboard/integration-detail.ts +8 -8
- package/packages/core/src/cli/dashboard/integration-row.ts +40 -13
- package/packages/core/src/cli/dashboard/landing-display.ts +25 -0
- package/packages/core/src/cli/dashboard/model.ts +56 -33
- package/packages/core/src/cli/dashboard/poll.ts +9 -3
- package/packages/core/src/cli/dashboard/render.ts +59 -37
- package/packages/core/src/cli/dashboard/target-distance.ts +14 -0
- package/packages/core/src/cli/dashboard/tree.ts +3 -2
- package/packages/core/src/cli/dispatch-args.ts +1 -1
- package/packages/core/src/cli/dispatch-frontend.ts +6 -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 +106 -11
- package/packages/core/src/cli/env.ts +4 -0
- package/packages/core/src/cli/help.ts +46 -23
- 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 +68 -8
- package/packages/core/src/cli/node-verification-provenance.ts +1 -97
- package/packages/core/src/cli/publication-settlement.ts +47 -21
- package/packages/core/src/cli/repository-status.ts +20 -9
- package/packages/core/src/cli/secrets.ts +173 -0
- package/packages/core/src/cli/status.ts +42 -5
- package/packages/core/src/cli/store-opening.ts +17 -2
- package/packages/core/src/cli/terminal.ts +22 -1
- package/packages/core/src/cli/terminals.ts +14 -10
- package/packages/core/src/cli/upgrade-agent.ts +9 -1
- package/packages/core/src/cli/upgrade-landing.ts +70 -30
- package/packages/core/src/cli/upgrade.ts +3 -1
- package/packages/core/src/cli/wait.ts +15 -7
- package/packages/core/src/cli/watch-lifetime.ts +111 -0
- package/packages/core/src/cli/watch.ts +635 -510
- package/packages/core/src/config/accounts.ts +101 -0
- package/packages/core/src/config/effective-artifact.fixture.ts +27 -0
- package/packages/core/src/config/effective-artifact.ts +13 -0
- package/packages/core/src/config/landing.ts +1 -1
- package/packages/core/src/config/live.ts +14 -1
- package/packages/core/src/config/load.ts +21 -1
- package/packages/core/src/config/pipeline-source.ts +28 -0
- package/packages/core/src/config/reference-metadata.ts +2 -0
- package/packages/core/src/config/reference.ts +22 -7
- package/packages/core/src/config/roles.ts +54 -3
- package/packages/core/src/config/schema.ts +146 -162
- package/packages/core/src/context-directory.ts +26 -0
- package/packages/core/src/distribution-packaging.ts +26 -5
- package/packages/core/src/events/catalog.ts +10 -2
- package/packages/core/src/events/compatibility.ts +2 -1
- package/packages/core/src/events/globs.ts +1 -1
- package/packages/core/src/events/payloads.ts +73 -1
- package/packages/core/src/events/policy.ts +7 -0
- package/packages/core/src/events/repository.ts +4 -4
- package/packages/core/src/events/sessions.ts +6 -6
- package/packages/core/src/kernel/__snapshots__/reducer-accumulator-shapes.json +574 -0
- package/packages/core/src/kernel/auto-merge.ts +2 -2
- package/packages/core/src/kernel/engine.ts +255 -26
- package/packages/core/src/kernel/generators/leaf-restack-log.ts +10 -0
- package/packages/core/src/kernel/integration-landing.ts +3 -3
- package/packages/core/src/kernel/integration-state.ts +27 -4
- package/packages/core/src/kernel/leaf-restack-state.ts +28 -3
- package/packages/core/src/kernel/log-index.ts +13 -1
- package/packages/core/src/kernel/node-landing.ts +8 -8
- package/packages/core/src/kernel/node-parent.ts +2 -2
- package/packages/core/src/kernel/node-restack-transaction.ts +1 -1
- package/packages/core/src/kernel/node-verification-context.ts +216 -0
- package/packages/core/src/kernel/phases.ts +1 -1
- package/packages/core/src/kernel/plan-verify-selection.ts +16 -0
- package/packages/core/src/kernel/publication-retry.ts +168 -0
- package/packages/core/src/kernel/reconcile-restack.ts +29 -1
- package/packages/core/src/kernel/reducer.ts +85 -5
- package/packages/core/src/kernel/target-distance.ts +45 -0
- package/packages/core/src/kernel/terminal-guard.ts +10 -1
- package/packages/core/src/kernel/verify-stage-state.ts +123 -0
- package/packages/core/src/kernel/verify-stages.ts +39 -0
- package/packages/core/src/ontology.ts +1 -0
- package/packages/core/src/operator/annotations.ts +6 -0
- package/packages/core/src/operator/control.ts +1 -1
- package/packages/core/src/operator/index.ts +3 -7
- package/packages/core/src/operator/landings.ts +5 -1
- package/packages/core/src/operator/presentation.ts +6 -1
- package/packages/core/src/operator/protocol.ts +6 -0
- package/packages/core/src/operator/query.ts +14 -18
- package/packages/core/src/operator/registry.ts +39 -7
- package/packages/core/src/operator/sandbox-host.ts +64 -40
- package/packages/core/src/operator/sandbox.ts +3 -0
- package/packages/core/src/operator/ticket-source-backend.ts +3 -12
- package/packages/core/src/operator/tickets.ts +25 -4
- package/packages/core/src/plugins/manifest.ts +2 -1
- package/packages/core/src/ports/forge/contract.ts +2 -2
- package/packages/core/src/ports/forge/git-rewrite.ts +25 -2
- package/packages/core/src/ports/forge/github-readiness.ts +2 -2
- package/packages/core/src/ports/forge/github.ts +26 -7
- package/packages/core/src/ports/forge/local-git.ts +4 -4
- package/packages/core/src/ports/forge/readiness.ts +1 -1
- package/packages/core/src/ports/forge-failure.ts +24 -0
- 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 +9 -2
- 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/phase-scratch.ts +4 -3
- package/packages/core/src/ports/workspace/provider-capabilities.ts +1 -0
- package/packages/core/src/ports/workspace/vercel-sandbox.ts +182 -72
- package/packages/core/src/processes/build-child.ts +6 -8
- package/packages/core/src/processes/build-execution-state.ts +8 -5
- package/packages/core/src/processes/build-runner.ts +554 -99
- package/packages/core/src/processes/dispatcher.ts +209 -101
- package/packages/core/src/processes/execution-no-progress.ts +8 -1
- 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/phase-failure-budget.ts +1 -0
- package/packages/core/src/processes/publication-loss.ts +8 -2
- package/packages/core/src/processes/publication-state.ts +42 -4
- package/packages/core/src/processes/repo-view.ts +14 -0
- package/packages/core/src/processes/verify-cycle-config.ts +96 -0
- package/packages/core/src/project-secrets.ts +105 -0
- package/packages/core/src/{integration → scenarios}/harness.ts +330 -317
- package/packages/core/src/secret-name.ts +41 -0
- package/packages/core/src/store/account-redaction.ts +156 -0
- package/packages/core/src/store/adapter.ts +1 -0
- package/packages/core/src/store/build-scope.ts +9 -0
- package/packages/core/src/store/contract.ts +116 -2
- package/packages/core/src/store/local/schema.ts +13 -0
- package/packages/core/src/store/local/store.ts +42 -0
- package/packages/core/src/store/memory.ts +47 -0
- package/packages/core/src/store/operator-presence.ts +21 -0
- package/packages/core/src/store/phase-session.ts +10 -0
- package/packages/core/src/store/reducer-value-shapes.json +5185 -4156
- package/packages/core/src/store/remote/client.ts +89 -48
- package/packages/core/src/store/remote/compatibility.ts +20 -0
- package/packages/core/src/store/remote/protocol.ts +4 -0
- package/packages/core/src/store/remote/version.ts +3 -1
- package/packages/core/src/store/retention.ts +2 -3
- package/packages/core/src/store/session-handle.ts +9 -0
- package/packages/core/src/store/streams/session-writer.ts +1 -1
- package/packages/core/src/store/types.ts +12 -2
- package/packages/core/src/testing/dispatch-read-budget.ts +122 -0
- package/packages/core/src/testing/index.ts +12 -1
- package/packages/core/src/testing/reduced-read-budget.ts +47 -0
- package/packages/core/src/testing/temp-directories.ts +58 -0
- package/skills/code-review/SKILL.md +23 -9
- package/skills/finalize/SKILL.md +15 -7
- package/skills/guide/SKILL.md +373 -148
- package/skills/guide/references/accounts.md +119 -0
- package/skills/guide/references/integration-tree.md +45 -38
- package/{docs/landing-policy.md → skills/guide/references/merge-policy.md} +40 -24
- package/skills/guide/references/migration-1.0.md +17 -13
- package/skills/guide/references/operator-api.md +180 -51
- package/skills/guide/references/plugin-authoring.md +21 -0
- package/skills/guide/references/remote-store-protocol.md +242 -68
- package/skills/guide/references/remote-ticket-protocol.md +30 -50
- package/skills/guide/references/restacking.md +54 -15
- package/skills/guide/references/setup.md +59 -119
- package/skills/guide/references/spec-standard.md +6 -6
- package/skills/guide/references/ticket-dependencies.md +7 -7
- package/skills/harvest/SKILL.md +3 -1
- package/skills/harvest-review/SKILL.md +3 -1
- package/skills/implement/SKILL.md +43 -17
- package/skills/operate/SKILL.md +118 -118
- package/skills/plan/SKILL.md +39 -13
- package/skills/plan-review/SKILL.md +15 -10
- package/skills/reconcile/SKILL.md +22 -3
- package/skills/spec/SKILL.md +20 -20
- package/skills/tickets/SKILL.md +12 -9
- package/templates/autobuild.toml +1 -1
- package/templates/hosted-service/package.json +2 -2
- package/docs/hosted-dispatcher-cutover-validation.md +0 -178
- package/docs/hosted-dispatcher.md +0 -275
- package/docs/hosted-service.md +0 -293
- package/docs/mcp.md +0 -149
- package/packages/core/src/orchestrator/approvals.ts +0 -115
- package/packages/core/src/orchestrator/conversation.ts +0 -167
- package/packages/core/src/orchestrator/model.ts +0 -86
- package/packages/core/src/orchestrator/prompt.ts +0 -63
- package/packages/core/src/orchestrator/tools.ts +0 -117
- package/packages/core/src/orchestrator/turn-runner.ts +0 -457
- 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(
|
|
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)
|
package/docs/accounts.md
ADDED
|
@@ -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.
|
package/docs/agent-runtimes.md
CHANGED
|
@@ -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
|
-
|
|
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 |
|
|
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.
|
|
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))
|
|
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
|
|
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,
|
|
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`.
|