@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
@@ -1,6 +1,6 @@
1
- # Landing policy
1
+ # Merge policy
2
2
 
3
- Landing authorization is an ordered, strict `[[landing]]` array in
3
+ Merge authorization is an ordered, strict `[[merge]]` array in
4
4
  `autobuild.toml`. Rules require `mode = "auto"` or `"consent"`; optional
5
5
  predicates are ANDed, omissions are wildcards, and the first match wins.
6
6
 
@@ -22,14 +22,14 @@ Editing configuration does not revise that decision. A replacement candidate
22
22
  gets a fresh decision. Policy is live dispatcher configuration, separate from
23
23
  the pinned execution pipeline.
24
24
 
25
- `ab hold <slug>` suppresses landing and revokes consent, even before readiness.
26
- `ab land <slug>` requires readiness, clears hold and consents to this landing
25
+ `ab hold <slug>` suppresses merge and revokes consent, even before readiness.
26
+ `ab merge <slug>` requires readiness, clears hold and consents to this merge
27
27
  into its destination. Consent survives head replacement, restacking, verification
28
- and re-finalization until hold or completion; it approves the landing rather than
28
+ 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
- land acknowledgement does not claim gates passed. MCP/operator tools offer the
32
- same actions; the terminal uses `l`/`o`, and the web has no consent controls.
31
+ merge acknowledgement does not claim gates passed. MCP/operator tools offer the
32
+ same actions; the terminal uses `l`/`o`. These controls record durable actions; merge consent does not mean the merge gates have passed.
33
33
 
34
34
  ## Worked configurations
35
35
 
@@ -40,7 +40,7 @@ repository's commands, roles and verification before operating it.
40
40
 
41
41
  ```toml
42
42
  baseBranch = "main"
43
- landing = []
43
+ merge = []
44
44
 
45
45
  [tickets]
46
46
  source = "file"
@@ -55,11 +55,11 @@ consent. No special rule is needed for a repository without integration nodes.
55
55
  ```toml
56
56
  baseBranch = "main"
57
57
 
58
- [[landing]]
58
+ [[merge]]
59
59
  into = "root"
60
60
  mode = "consent"
61
61
 
62
- [[landing]]
62
+ [[merge]]
63
63
  into = "node"
64
64
  mode = "auto"
65
65
 
@@ -69,7 +69,7 @@ readyState = "ready"
69
69
  ```
70
70
 
71
71
  Leaves and nodes entering the root match rule 1 and require consent. Leaves and
72
- nested nodes entering any node match rule 2 and land automatically when ready.
72
+ nested nodes entering any node match rule 2 and merge automatically when ready.
73
73
  A specific destination can replace `"node"` with its ticket id, such as
74
74
  `"REL-1"`; it matches that frozen destination only.
75
75
 
@@ -78,15 +78,15 @@ A specific destination can replace `"node"` with its ticket id, such as
78
78
  ```toml
79
79
  baseBranch = "main"
80
80
 
81
- [[landing]]
81
+ [[merge]]
82
82
  label = "review"
83
83
  mode = "consent"
84
84
 
85
- [[landing]]
85
+ [[merge]]
86
86
  from = "node"
87
87
  mode = "consent"
88
88
 
89
- [[landing]]
89
+ [[merge]]
90
90
  mode = "auto"
91
91
 
92
92
  [tickets]
@@ -99,14 +99,14 @@ other leaves match rule 3. `Review` does not match `review`. Moving the catch-al
99
99
  to the front would shadow both safeguards and automatically authorize nodes too.
100
100
  Authorization never bypasses verification, checks, protection or merge gates.
101
101
 
102
- ## Landing methods
102
+ ## Merge methods
103
103
 
104
104
  Root-target leaves squash into one identity-bearing commit per build.
105
105
  Node-target children use serialized, exact-parent guarded fast-forwards;
106
- node-to-local-git-root landing also fast-forwards, preserving the contributions.
107
- Node-to-GitHub-root landing uses PR rebase merge guarded on verified head after
106
+ node-to-local-git-root merge also fast-forwards, preserving the contributions.
107
+ Node-to-GitHub-root merge uses PR rebase merge guarded on verified head after
108
108
  a final parent freshness read. Enforced up-to-date protection provides a fenced
109
- landing; uncertainty is recorded as unfenced and requires immutable landed-tree
109
+ merge; uncertainty is recorded as unfenced and requires immutable merged-tree
110
110
  audit. A mismatch raises operator attention without rewriting the shared parent.
111
111
  Pending audits survive completion and retry until settled.
112
112
 
@@ -115,15 +115,15 @@ authoritatively ungated root permits an inspected-head guarded direct squash;
115
115
  unknown gate state defers. Node targets instead require authoritative proof of
116
116
  an ungated destination, cancel native auto-merge and serialize the guarded push.
117
117
  Gated or unproven node destinations stay open with actionable diagnostics.
118
- Successful push proves landing; forge acknowledgement is best-effort, including
119
- a landed-SHA comment and closing an unacknowledged open review.
118
+ Successful push proves merge; forge acknowledgement is best-effort, including
119
+ a merged-SHA comment and closing an unacknowledged open review.
120
120
 
121
121
  Native application receipts bind to exact candidates; consent does not. Every
122
122
  replacement confirms cancellation first; the next poll reconciles native state
123
123
  before other actions. Stale enables are repaired by polling. This bounded model
124
124
  requires replacement-head checks to take far longer than a poll interval. It
125
125
  has no durable native-effect reservation. Human forge merges record whether a
126
- hold was overridden; possible stale-enable landings raise operator attention.
126
+ hold was overridden; possible stale-enable merges raise operator attention.
127
127
  No result is undone by rewriting the target.
128
128
 
129
129
  ## Forge requirements
@@ -136,7 +136,7 @@ retention policy. See [restacking](restacking.md).
136
136
 
137
137
  Tree admission requires node branch creation, authoritative branch-head reads
138
138
  and comparison. Reparenting additionally requires PR retargeting. Controlled
139
- landing requires exact-parent guarded publication and authoritative gate proof;
139
+ merge requires exact-parent guarded publication and authoritative gate proof;
140
140
  GitHub root nodes also need rebase merge support. Root leaves require squash
141
141
  support. Readiness inspection reports method/publication hard failures and
142
142
  linear-history/freshness recommendations without changing provider settings or
@@ -145,7 +145,7 @@ pushing probes. Unknown permission never proves permission.
145
145
  Legacy plugins can remain readable without supporting tree operations: old
146
146
  ticket sources read as work/root and refuse tree metadata writes. This read
147
147
  compatibility does not grant forge tree capabilities. Upgrade adapters before
148
- admitting nodes or requesting unsupported retargeting or landing operations.
148
+ admitting nodes or requesting unsupported retargeting or merge operations.
149
149
  For the lifecycle see [integration trees](integration-tree.md); for old controls
150
150
  and upgrade conversion see [migration](migration-1.0.md).
151
151
 
@@ -157,5 +157,21 @@ Local-git's shared database retains authoritative CAS.
157
157
 
158
158
  Native cancellation receipts are candidate- and operation-specific. Publication
159
159
  retries confirm forge state before reusing a receipt; external re-enables require
160
- another confirmed cancellation. Classified transient landing failures retain
160
+ another confirmed cancellation. Classified transient merge failures retain
161
161
  retry eligibility and recheck authorization after repository forge cooldown.
162
+
163
+ ## Deprecated spellings
164
+
165
+ `ab land` and `ab landings` remain callable aliases for `ab merge` and `ab merges`,
166
+ with one deprecation notice on stderr. `node-landed` remains an alias for the
167
+ `ab wait --for node-merged` condition. Ordinary help lists only the current names.
168
+
169
+ The deprecated `[[landing]]` config array has the same semantics as `[[merge]]`
170
+ and warns after validation. Declare only one spelling, including empty arrays.
171
+ `ab upgrade` renames the old root key and table headers while preserving policy;
172
+ unsupported spellings require the reported manual edit before retrying.
173
+
174
+ MCP discovery offers `merges.list` and its deprecated alias `landings.list`.
175
+ `builds.control` accepts canonical `merge` and deprecated `land` actions through
176
+ both MCP bindings. HTTP control bodies and durable event fields retain their
177
+ existing wire names, including `land`, `landing.decided`, and `integration.landed`.
@@ -1,6 +1,6 @@
1
1
  # Migrating from 0.x to 1.0
2
2
 
3
- The integration tree changes replay and landing authorization. It does not cut a
3
+ The integration tree changes replay and merge authorization. It does not cut a
4
4
  release or rename `baseBranch`: that setting now names the tree root. Existing
5
5
  tickets default to work with no target and continue targeting the root. Adopt
6
6
  nodes only when useful; see [integration trees](integration-tree.md).
@@ -13,7 +13,7 @@ review local conflicts. `--no-self-update` skips installation update while still
13
13
  performing repository migration and skill merging. Preserve local customizations
14
14
  and use the installed [setup reference](setup.md) to review verification and roles.
15
15
 
16
- When `landing` is absent, upgrade reads the target repository's configured
16
+ When neither `merge` nor its deprecated `landing` alias is declared, upgrade reads the target repository's configured
17
17
  BuildStore journal, ignoring ambient `AB_STORE` for that choice, and appends:
18
18
 
19
19
  | Legacy repository default | Leaf rule | Node rule |
@@ -23,15 +23,18 @@ BuildStore journal, ignoring ambient `AB_STORE` for that choice, and appends:
23
23
 
24
24
  A genuinely absent local journal counts as no fact. An unreadable or unavailable
25
25
  journal fails migration with guidance: restore store access and retry, or write
26
- explicit rules after deciding the desired policy. Existing valid landing arrays
27
- are preserved byte-for-byte, including root-level `landing = []`, which selects
26
+ explicit rules after deciding the desired policy. Existing valid merge arrays
27
+ are preserved byte-for-byte, including root-level `merge = []`, which selects
28
28
  the new leaf-auto/node-consent defaults. Fresh init uses those new defaults.
29
- See [landing policy](landing-policy.md) for complete worked configurations.
29
+ An explicit deprecated `landing` array is renamed to `merge`, preserving values,
30
+ selectors, order and surrounding comments without reading the legacy journal.
31
+ Declaring both spellings is an error, including empty arrays.
32
+ See [merge policy](merge-policy.md) for complete worked configurations.
30
33
 
31
34
  The repository auto-merge default, its fan-out and old CLI/default controls are
32
- retired. Use `ab land` and `ab hold`, not an old repository switch. Historical
33
- explicit per-build `build.auto-merge-requested`/`cancelled` facts map to land/hold
34
- until a new landing command supersedes them; historical default-seeded requests
35
+ retired. Use `ab merge` and `ab hold`, not an old repository switch. Historical
36
+ explicit per-build `build.auto-merge-requested`/`cancelled` facts map to merge/hold
37
+ until a new merge command supersedes them; historical default-seeded requests
35
38
  confer no consent. New claims do not materialize old defaults.
36
39
 
37
40
  ## Builds already in flight
@@ -39,14 +42,15 @@ confer no consent. New claims do not materialize old defaults.
39
42
  Historical events and merge reconciliations keep their replay/display meaning;
40
43
  old merge commits remain valid history. Later replay uses the promoted historical
41
44
  contribution base. The current engine can restack resumed builds at newly reached
42
- verification or waiting-for-landing boundaries, and current landing rules govern
45
+ verification or waiting-for-merge boundaries, and current merge rules govern
43
46
  new readiness decisions. There is no claim-version switch promising every old
44
47
  build finishes with the old merge standard. Drain old work before switching
45
48
  versions if retaining old execution behavior is required. Simultaneous old and
46
49
  new writers are not a supported migration strategy.
47
50
 
48
- Execution pipeline configuration stays pinned to the build; live dispatcher
49
- landing policy is separate. A recorded readiness decision retains its rule
51
+ Execution pipeline configuration stays owned by the build and is re-pinned
52
+ from its checkout at each verify cycle; live dispatcher
53
+ merge policy is separate. A recorded readiness decision retains its rule
50
54
  snapshot despite configuration edits; a new candidate receives a new decision.
51
55
  Explicit consent persists through replay and re-verification until hold or
52
56
  completion, except accepted node reparenting revokes it.
@@ -62,7 +66,7 @@ replay; the kernel owns branch replacement with expected-head guards.
62
66
 
63
67
  Root leaves squash; node destinations and local-git root nodes fast-forward;
64
68
  GitHub root nodes use guarded rebase merge with recorded fencing/audit limits.
65
- Check [forge requirements](landing-policy.md#forge-requirements) and
69
+ Check [forge requirements](merge-policy.md#forge-requirements) and
66
70
  [restacking](restacking.md) before enabling nodes on a plugin forge. Ensure
67
71
  archive publication/read permissions, tree capabilities and required merge
68
72
  methods are available; legacy read compatibility is insufficient.
@@ -71,7 +75,7 @@ methods are available; legacy read compatibility is insufficient.
71
75
 
72
76
  Parent movement is now observed without starting a node replay. Existing frozen
73
77
  transactions finish after upgrade; subsequent replay needs completeness before
74
- verification, freshness before landing, dependency presence, operator demand
78
+ verification, freshness before merge, dependency presence, operator demand
75
79
  (`ab restack <node>`), or accepted re-parenting. Nested nodes need independent
76
80
  demand. Leaves keep their existing timing. There is no eager compatibility mode.
77
81
  See [restacking](restacking.md) for durable requests and parent commit distance.
package/docs/operating.md CHANGED
@@ -1,14 +1,14 @@
1
1
  ---
2
2
  title: "Working with your operator agent"
3
3
  group: "guides"
4
- description: "Delegate specs, tickets, monitoring, and landing to your agent while keeping product decisions and authority with you."
4
+ description: "Delegate specs, tickets, monitoring, and merge to your agent while keeping product decisions and authority with you."
5
5
  label: "Working with your operator agent"
6
6
  order: 6
7
7
  ---
8
8
 
9
9
  # Working with your operator agent
10
10
 
11
- Your operator agent keeps work moving through `ab` or MCP. Under your instructions it writes specs, files and grooms tickets, watches builds, answers bounded escalations, pauses or aborts work, and authorizes landing.
11
+ Your operator agent keeps work moving through `ab` or MCP. Under your instructions it writes specs, files and grooms tickets, operates the builds the repository's dispatcher dispatches, answers bounded escalations, pauses or aborts work, and authorizes merge.
12
12
 
13
13
  - **You own** goals, scope, tradeoffs and authority, and you run the dispatcher and upgrades.
14
14
  - **The agent never** starts, stops or restarts dispatch; it reports dispatcher trouble to you.
@@ -17,7 +17,7 @@ Your operator agent keeps work moving through `ab` or MCP. Under your instructio
17
17
  ## Choose a harness
18
18
 
19
19
  - **A local coding agent** at the repository root with the installed `ab-operate` skill, using the CLI or `bun ab mcp` (operator tools over stdio).
20
- - **A remote agent** with no checkout, on the authenticated hosted `/mcp` endpoint. See [Operator surfaces](operator-surfaces.md).
20
+ - **An API client** using the authenticated [Operator API contract](operator-api.md).
21
21
 
22
22
  We recommend the same model as your reviewer roles, since the agent interprets findings and escalation answers.
23
23
 
@@ -27,23 +27,46 @@ Autobuild ships no agent memory. Keep goals, decisions, constraints and monitor
27
27
 
28
28
  ## Give steering that sticks
29
29
 
30
- Give the agent your scope, priorities, acceptance boundaries, escalation thresholds and landing authority. For example:
30
+ Give the agent your scope, priorities, acceptance boundaries, escalation thresholds and merge authority. For example:
31
31
 
32
- > Keep this change API-compatible. Prioritize the retry budget over diagnostics. You may answer questions already settled by this spec, but ask me about scope changes and before granting landing consent.
32
+ > Keep this change API-compatible. Prioritize the retry budget over diagnostics. You may answer questions already settled by this spec, but ask me about scope changes and before granting merge consent.
33
33
 
34
- Agree on boundaries before the agent acts: moving a ticket to ready can start a build immediately, and granting consent can let it land once gates pass.
34
+ Agree on boundaries before the agent acts: moving a ticket to ready can start a build immediately, and granting consent can let it merge once gates pass.
35
35
 
36
36
  The agent answers questions your instructions settle and escalates ambiguous goals, scope or compatibility tradeoffs, consequential or destructive choices, missing authority or access, and dispatcher trouble.
37
37
 
38
38
  ## Watch for attention
39
39
 
40
40
  ```
41
- bun ab watch --json
41
+ bun ab repository status --json
42
+ bun ab watch --operator --json
42
43
  ```
43
44
 
44
- `watch` monitors active builds, new builds and the repository journal.
45
-
46
- - **Default filter:** actionable attention only, such as escalations and ready landings awaiting consent. Add `--event` globs for routine lifecycle events.
45
+ Before registering, inspect `operator.registrations` in repository status. If
46
+ another live operator is present, the agent tells you and stops unless you direct
47
+ otherwise. Filing sessions preserve intent, rejected alternatives and out-of-scope
48
+ reasons in ticket bodies so that operator can answer escalations.
49
+
50
+ `watch --operator` monitors active builds, new builds and the repository journal.
51
+ It writes advisory mutable presence, never events or a lease. Multiple operators
52
+ may register; presence is no lock. Unflagged watches write nothing. Repository
53
+ status lists live registrations with host, PID, start time and heartbeat age.
54
+ Heartbeats run every 30 seconds; presence expires five minutes after the last
55
+ successful heartbeat, including a final best-effort heartbeat on orderly timeout
56
+ or count completion. SIGINT, SIGTERM, SIGHUP and stdout EPIPE attempt withdrawal
57
+ within about two seconds. Failures leave TTL expiry as the fallback; older services
58
+ without withdrawal support fall back silently. SIGKILL still relies on TTL expiry.
59
+
60
+ Re-arm with `bun ab watch --operator --json --since <watch-cursor>` using only
61
+ the standing watch's own cursor. This preserves one ID and original start time
62
+ across a re-arm gap of up to five minutes. After termination withdraws presence,
63
+ the same cursor re-registers the same ID and start time. Reconcile current and
64
+ newly dispatched builds after arming and on timeout. Keep operating after the initial work ends,
65
+ until you end or hand off the role. `wait` does not heartbeat or carry registration
66
+ identity: a separate unflagged diagnostic wait/watch must never replace the
67
+ standing monitor or supply its resume cursor. MCP presence is deferred.
68
+
69
+ - **Default filter:** actionable attention only, such as escalations and ready merges awaiting consent. Add `--event` globs for routine lifecycle events.
47
70
  - **Starts now:** a fresh watch ignores history, so check current status too.
48
71
  - **Resumable:** pass the opaque cursor from the JSON output back with `--since` to receive events recorded while away. The final JSON line always carries one.
49
72
  - **Duration:** 30 minutes by default; `--timeout 0` keeps it open.
@@ -80,29 +103,28 @@ bun ab resume my-build
80
103
  - **`pause --all`** holds queued work, turns intake off and requests pauses on running builds.
81
104
  - **`resume --all`** releases the hold, turns intake on and resumes cleanly paused builds.
82
105
 
83
- Intake off only stops new ticket claims; a repository pause also holds queued builds. Neither withdraws landing consent; use `hold`.
106
+ Intake off only stops new ticket claims; a repository pause also holds queued builds. Neither withdraws merge consent; use `hold`.
84
107
 
85
- ## Authorize landing
108
+ ## Authorize merge
86
109
 
87
- Ordered landing rules choose automatic authorization or explicit consent. With no matching rule, leaves default to auto and integration nodes to consent. Verification, checks, protection and merge gates still apply.
110
+ Ordered merge rules choose automatic authorization or explicit consent. With no matching rule, leaves default to auto and integration nodes to consent. Verification, checks, protection and merge gates still apply.
88
111
 
89
112
  ```
90
- bun ab land my-build
113
+ bun ab merge my-build
91
114
  bun ab hold my-build
92
115
  ```
93
116
 
94
- - **`land`** requires a ready build, clears its hold and grants consent to land into its destination.
95
- - **`hold`** suppresses landing and revokes consent, even before the build is ready.
117
+ - **`merge`** requires a ready build, clears its hold and grants consent to merge into its destination.
118
+ - **`hold`** suppresses merge and revokes consent, even before the build is ready.
96
119
  - **Persistence:** consent survives head changes, restacks, verification and re-finalization until a hold or completion. Accepted node reparenting revokes it.
97
120
 
98
121
  ## Choose an operator surface
99
122
 
100
123
  Every surface reads the same durable state; [Operator surfaces](operator-surfaces.md) covers remote access.
101
124
 
102
- | Surface | Progress, escalations, pause/resume | Landing consent and hold |
125
+ | Surface | Progress, escalations, pause/resume | Merge consent and hold |
103
126
  |---|---|---|
104
- | Terminal dashboard (`bun ab dispatch`) | Yes | Keys `l` (land) and `o` (hold) |
105
- | Hosted web app | Yes, plus sessions and transcripts | No |
127
+ | Terminal dashboard (`bun ab dispatch`) | Yes | Keys `l` (merge) and `o` (hold) |
106
128
  | CLI and MCP operator tools | Yes | Yes |
107
129
 
108
130
  ## An example session