agent-merge-broker 0.5.0 → 0.7.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 (49) hide show
  1. package/README.md +91 -26
  2. package/dist/broker.d.ts +41 -1
  3. package/dist/broker.d.ts.map +1 -1
  4. package/dist/broker.js +250 -8
  5. package/dist/broker.js.map +1 -1
  6. package/dist/cli.js +122 -13
  7. package/dist/cli.js.map +1 -1
  8. package/dist/config.d.ts +1 -0
  9. package/dist/config.d.ts.map +1 -1
  10. package/dist/config.js +56 -5
  11. package/dist/config.js.map +1 -1
  12. package/dist/index.d.ts +4 -2
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +4 -2
  15. package/dist/index.js.map +1 -1
  16. package/dist/provenance.d.ts +12 -0
  17. package/dist/provenance.d.ts.map +1 -1
  18. package/dist/provenance.js +104 -0
  19. package/dist/provenance.js.map +1 -1
  20. package/dist/publisher.d.ts +3 -3
  21. package/dist/publisher.js +3 -3
  22. package/dist/serve-log.d.ts +67 -0
  23. package/dist/serve-log.d.ts.map +1 -0
  24. package/dist/serve-log.js +62 -0
  25. package/dist/serve-log.js.map +1 -0
  26. package/dist/service.d.ts +64 -0
  27. package/dist/service.d.ts.map +1 -0
  28. package/dist/service.js +200 -0
  29. package/dist/service.js.map +1 -0
  30. package/dist/store.d.ts +16 -0
  31. package/dist/store.d.ts.map +1 -1
  32. package/dist/store.js +73 -0
  33. package/dist/store.js.map +1 -1
  34. package/dist/types.d.ts +26 -0
  35. package/dist/types.d.ts.map +1 -1
  36. package/dist/validation.d.ts.map +1 -1
  37. package/dist/validation.js +1 -1
  38. package/dist/validation.js.map +1 -1
  39. package/dist/verify.d.ts +10 -1
  40. package/dist/verify.d.ts.map +1 -1
  41. package/dist/verify.js +134 -42
  42. package/dist/verify.js.map +1 -1
  43. package/docs/ARCHITECTURE.md +35 -15
  44. package/docs/PROTOCOL.md +19 -4
  45. package/docs/RELEASING.md +17 -8
  46. package/docs/SECURITY.md +36 -6
  47. package/package.json +2 -2
  48. package/schemas/config.schema.json +59 -3
  49. package/schemas/provenance.schema.json +11 -1
package/README.md CHANGED
@@ -33,7 +33,7 @@ One integration authority; implementation stays distributed:
33
33
  - Commit receipts separate implementation from integration authority.
34
34
  - A deterministic conflict/dependency scheduler forms bounded batches.
35
35
  - Every batch is tested through real cherry-picks in a disposable worktree.
36
- - Focused checks run after each task and authoritative checks run over the batch.
36
+ - Focused checks run after each task; the complete gate runs either in the broker or as required CI.
37
37
  - Successful work becomes one local branch, remote branch, or GitHub pull request.
38
38
  - Published branches can carry a committed provenance manifest for fast remote policy checks.
39
39
  - Tasks are dependency-complete only after their batch is actually merged.
@@ -45,7 +45,9 @@ It is deliberately **not** an agent framework and **not** a replacement for prot
45
45
 
46
46
  `0.3.0` was the first public release: the local broker core, the GitHub CLI publishing adapter with auto-merge, and the remote provenance verifier.
47
47
 
48
- `0.5.0` is current. Since the first release the lifecycle has been made recoverable — work can be resubmitted and rescoped after a failure, pre-flight validation runs the same validators integration does, and a publication interrupted partway through can be retried rather than reconciled by hand.
48
+ `0.7.0` is current. Repositories can explicitly delegate the complete integration decision to
49
+ protected required CI after focused broker preflight, avoiding a duplicate serial full-suite run.
50
+ The default remains broker-authoritative validation for backward compatibility.
49
51
 
50
52
  The on-disk state, receipt, and provenance formats are versioned, but compatibility is not guaranteed until `1.0.0`. Expect format migrations before then.
51
53
 
@@ -80,7 +82,10 @@ npm link
80
82
  - `.merge-broker/config.json` — repository policy and commands
81
83
  - `.merge-broker/agent-instructions.md` — a reusable worker contract
82
84
 
83
- Runtime state, receipt records, manifests, locks, and integration worktrees live under Git's common directory. Every linked worktree therefore sees the same broker state, while runtime artifacts do not pollute commits.
85
+ It also creates an Ed25519 provenance private key, mode `0600`, under Git's common runtime directory.
86
+ Only its public key is written to the committed configuration. Runtime state, receipt records,
87
+ manifests, keys, locks, and integration worktrees therefore stay outside commits while every linked
88
+ worktree sees the same broker authority.
84
89
 
85
90
  ## Quick start
86
91
 
@@ -88,6 +93,7 @@ Initialize an existing Git repository and edit its generated configuration:
88
93
 
89
94
  ```bash
90
95
  merge-broker init --base main --base-ref origin/main --remote origin
96
+ git add .merge-broker && git commit -m 'Configure authenticated merge brokerage'
91
97
  merge-broker doctor
92
98
  ```
93
99
 
@@ -178,29 +184,49 @@ This sets `core.hooksPath`, so it refuses to run when the repository already has
178
184
  stop working, and `--uninstall` puts everything back. `MERGE_BROKER_ALLOW_DIRECT_PUSH=1` is the
179
185
  deliberate emergency bypass.
180
186
 
181
- A remote gate proves a pull request really is an unaltered broker batch. It reads only Git, so it
182
- can run before any dependency is installed and reject bypassed work for almost nothing:
187
+ ### Publishing without a terminal
188
+
189
+ `serve` polls for verified batches and publishes them, but only while somebody keeps it running in a
190
+ terminal. When nobody does, a submitted task sits in `submitted` indefinitely — and to the agent
191
+ that submitted it, waiting forever is indistinguishable from being rejected. Install the loop as a
192
+ per-user service instead:
193
+
194
+ ```bash
195
+ merge-broker install-service
196
+ ```
197
+
198
+ This writes a launchd agent on macOS or a systemd user unit on Linux, one per repository, and starts
199
+ it. It is deliberately a *user* service on both platforms: a system daemon would need root and would
200
+ run as the wrong user for the repository's SSH and forge credentials. `--uninstall` removes it, and
201
+ the service writes to `$(git rev-parse --git-common-dir)/merge-broker/serve.log`, including when it
202
+ was installed from a linked worktree whose `.git` is a file.
203
+
204
+ A remote gate authenticates a pull request as an immutable broker batch. It reads the trusted public
205
+ key from the protected base branch, so it can reject unsigned, forged, or post-assembly work before
206
+ installing dependencies:
183
207
 
184
208
  ```yaml
185
209
  - uses: actions/checkout@v4
186
210
  with:
187
211
  ref: ${{ github.event.pull_request.head.sha }}
188
212
  fetch-depth: 0
189
- - uses: WeSpitfire/agent-merge-broker/verify@v1
213
+ - uses: WeSpitfire/agent-merge-broker/verify@v0.7.0
190
214
  ```
191
215
 
192
- The check confirms that the branch is a broker integration branch, that its manifest was assembled
193
- on real base history, that the final commit changes nothing but that manifest, that the integrated
194
- diff matches exactly the paths the receipts account for, that every submitted commit is present, and
195
- that all recorded validations passed. It accepts the "update branch" merges a protected base
196
- produces, and rejects a merge that brings in anything the base does not already contain.
216
+ The check verifies the Ed25519 signature, branch and batch identity, real base history, one-file
217
+ manifest commit, integrated diff, submitted commit trail, and recorded validation results. The
218
+ provenance commit must remain the branch head. Even a normal base-update merge can carry arbitrary
219
+ conflict resolution, so any post-assembly merge is rejected; re-cut a stale batch with `batch
220
+ refresh` instead.
197
221
 
198
222
  Verification policy is read from the configuration committed on the *base* branch, never from the
199
- change under review.
223
+ change under review. Repositories initialized before `0.6.0` must run `merge-broker provenance
224
+ setup-signing`, commit the resulting public-key policy, and keep the private key outside the working
225
+ tree. Until then verification reports structural-only rather than authenticated provenance.
200
226
 
201
227
  ## Automatic merging
202
228
 
203
- With `publish.mode` set to `pull-request` and `publish.autoMerge` enabled, the broker enables GitHub auto-merge on each published batch. GitHub lands the pull request once required status checks pass and updates the branch when the base branch requires it. The broker never pushes to the base branch itself, so branch protection remains the authority on what may merge.
229
+ With `publish.mode` set to `pull-request` and `publish.autoMerge` enabled, the broker enables GitHub auto-merge on each published batch. GitHub lands the pull request once required status checks pass. The broker never pushes to the base branch itself, so branch protection remains the authority on what may merge. If the base moves first, re-cut the batch; do not use GitHub's update-branch merge because immutable provenance deliberately rejects it.
204
230
 
205
231
  Two configuration combinations cannot work and are rejected at load time rather than stalling silently:
206
232
 
@@ -250,7 +276,13 @@ forge that fails halfway leaves a published batch carrying a `publishWarning` ra
250
276
  whose pull request exists but whose state does not admit it. Running `batch publish` again finds the
251
277
  existing pull request and retries what is left.
252
278
 
253
- A process that dies mid-integration leaves its lock behind. A holder on this machine is reclaimed automatically once its process is gone, but a holder on another machine cannot be probed at all and would otherwise block integration for the full stale window. `merge-broker unlock` reports lock state and releases a lock whose owner is provably gone; `--force` overrides that check and should follow confirming that no integration is running.
279
+ A process that dies mid-integration can leave both a lock and durable `running` state. A holder on
280
+ this machine is reclaimed automatically once its process is gone; a holder on another machine cannot
281
+ be probed and waits out the stale window. Once the integration lock is safely acquired, `serve` and
282
+ `integrate` automatically mark the abandoned batch failed, clean its broker-owned worktree and
283
+ branch, and return its tasks to `submitted` without spending their attempt budget. `merge-broker
284
+ recover` performs that reconciliation explicitly. `unlock --force` remains only for an owner that
285
+ cannot be proven gone and must follow confirming no integration is active.
254
286
 
255
287
  ## Housekeeping
256
288
 
@@ -298,10 +330,13 @@ The generated `.merge-broker/config.json` is intentionally explicit and reviewab
298
330
  "maxAttempts": 3,
299
331
  "provenance": {
300
332
  "enabled": true,
301
- "directory": ".merge-broker/attestations"
333
+ "directory": ".merge-broker/attestations",
334
+ "requireSignature": true,
335
+ "publicKey": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----\n"
302
336
  }
303
337
  },
304
338
  "validation": {
339
+ "authority": "broker",
305
340
  "shell": "/bin/sh",
306
341
  "focused": [
307
342
  {
@@ -330,8 +365,9 @@ The generated `.merge-broker/config.json` is intentionally explicit and reviewab
330
365
  Validator commands run inside the isolated integration worktree, under `/bin/sh` unless
331
366
  `validation.shell` names another interpreter. The shell is deliberately fixed and is never a login
332
367
  shell: an integration decision must not depend on whose machine assembled the batch. The environment
333
- is inherited from the process that invoked the broker, minus `MERGE_BROKER_TOKEN`, so PATH and
334
- toolchain managers work while worker credentials stay out of repository-defined commands.
368
+ is inherited from the process that invoked the broker, minus `MERGE_BROKER_TOKEN`,
369
+ `MERGE_BROKER_SIGNING_KEY`, and `MERGE_BROKER_SIGNING_KEY_FILE`, so PATH and toolchain managers work
370
+ while broker credentials stay out of repository-defined commands.
335
371
 
336
372
  Validators receive these environment variables:
337
373
 
@@ -343,8 +379,8 @@ Validators receive these environment variables:
343
379
 
344
380
  Commands may also use the shell-safe placeholders `{taskId}` and `{files}`. Validator output retained in state is capped to prevent unbounded growth.
345
381
 
346
- `merge-broker validate` runs these same validators against a working tree, so a worker can get the
347
- integration answer before submitting rather than a weaker local approximation of it. It reports
382
+ `merge-broker validate` runs these same broker-side validators against a working tree, so a worker
383
+ can get the local integration answer before submitting rather than a weaker approximation of it. It reports
348
384
  `MERGE_BROKER_BATCH_ID=local`, which a validator can branch on if it needs to behave differently
349
385
  outside a batch.
350
386
 
@@ -352,19 +388,44 @@ The JSON schemas in [`schemas/`](schemas/) can be used by editors, adapters, and
352
388
 
353
389
  ### One authoritative CI pass
354
390
 
355
- Repositories that make GitHub the authoritative validator can leave broker
356
- authoritative validators empty, keep provenance enabled, and reject any PR
357
- without a valid broker manifest before installing dependencies. The full lint,
358
- type, test, and build suite then runs exactly once on the assembled broker PR.
359
- Task worktrees retain only fast changed-scope feedback, while deployment builds
360
- the already-checked revision without repeating the whole suite.
391
+ Repositories that make required pull-request checks the authoritative validator can opt in explicitly:
392
+
393
+ ```json
394
+ {
395
+ "validation": {
396
+ "authority": "required-ci",
397
+ "focused": [
398
+ {
399
+ "name": "changed-scope preflight",
400
+ "paths": ["src/**", "test/**"],
401
+ "command": "npm test -- {files}",
402
+ "timeoutSeconds": 300
403
+ }
404
+ ],
405
+ "authoritative": []
406
+ }
407
+ }
408
+ ```
409
+
410
+ `required-ci` is accepted only with pull-request publication and authenticated signed provenance.
411
+ The broker still checks leases, submitted paths, cherry-pick compatibility, and every matching
412
+ focused validator before retaining the batch. It then publishes the immutable signed revision, and
413
+ the protected branch's required CI checks run the full lint, type, test, and build suite exactly
414
+ once. The broker cannot inspect every forge's branch-protection policy, so configuring
415
+ `required-ci` is an operator assertion that the complete suite really is required before merge.
416
+
417
+ The default is `broker`, including for configurations created before this field existed. In that
418
+ mode the broker runs every `validation.authoritative` command over the assembled batch before it
419
+ retains a branch, preserving the original behavior.
361
420
 
362
421
  ## Command surface
363
422
 
364
423
  ```text
365
424
  merge-broker init
366
425
  merge-broker doctor
426
+ merge-broker provenance setup-signing [--private-key <path>] [--rotate]
367
427
  merge-broker install-hooks [--force] [--uninstall]
428
+ merge-broker install-service [--uninstall] [--interval <seconds>] [--no-eager]
368
429
  merge-broker verify-provenance --branch <ref> --head <sha> --base <sha>
369
430
  merge-broker validate [--task <id>] [--scope focused|authoritative|all] [--base <ref>] [--cwd <path>]
370
431
  merge-broker task register|claim|extend|heartbeat|submit|retry|release|cancel|show
@@ -377,6 +438,7 @@ merge-broker metrics
377
438
  merge-broker events
378
439
  merge-broker prune [--older-than <days>] [--dry-run]
379
440
  merge-broker unlock [state|integration] [--force]
441
+ merge-broker recover
380
442
  merge-broker serve [--publish] [--eager]
381
443
  ```
382
444
 
@@ -384,7 +446,10 @@ Every command accepts `--json` for adapters and `-C <directory>` for explicit re
384
446
 
385
447
  ## Guarantees and limits
386
448
 
387
- Path overlap is a conservative coordination signal, not proof of semantic compatibility. Non-overlapping tasks can still break contracts. For this reason, the disposable worktree and authoritative validation—not the scheduler—are the final integration decision.
449
+ Path overlap is a conservative coordination signal, not proof of semantic compatibility.
450
+ Non-overlapping tasks can still break contracts. For this reason, the disposable worktree plus the
451
+ configured authority—broker-side validation or protected required CI—not the scheduler, makes the
452
+ final integration decision.
388
453
 
389
454
  The scheduler uses a deterministic weighted greedy heuristic. It does not claim to solve the NP-hard maximum independent set problem optimally. Batches are deliberately capped because very large batches reduce CI traffic but increase failure blast radius.
390
455
 
package/dist/broker.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { GitRepository } from "./git.js";
2
2
  import { StateStore, type LockStatus } from "./store.js";
3
3
  import { type HookInstallation } from "./hooks.js";
4
- import type { BatchRecord, BrokerConfig, BrokerState, IntegrationOptions, IntegrationResult, LocalValidationResult, RefreshResult, PruneOptions, PruneResult, SchedulePlan, TaskRecord } from "./types.js";
4
+ import { type ServiceInstallation } from "./service.js";
5
+ import type { BatchRecord, BrokerConfig, BrokerState, IntegrationOptions, IntegrationResult, LocalValidationResult, RefreshResult, RecoveryResult, PruneOptions, PruneResult, SchedulePlan, TaskRecord } from "./types.js";
5
6
  export interface RegisterTaskInput {
6
7
  id: string;
7
8
  title?: string;
@@ -35,6 +36,19 @@ export declare class MergeBroker {
35
36
  configPath: string;
36
37
  created: boolean;
37
38
  }>;
39
+ /**
40
+ * Enables authenticated provenance for an existing repository or rotates/imports its identity.
41
+ * The private key stays in Git's runtime state; configuration receives only the public key.
42
+ */
43
+ setupProvenanceSigning(options?: {
44
+ privateKeyFile?: string;
45
+ rotate?: boolean;
46
+ }): Promise<{
47
+ publicKey: string;
48
+ keyId: string;
49
+ keyPath: string;
50
+ }>;
51
+ private provenanceSigningPrivateKey;
38
52
  registerTask(input: RegisterTaskInput): Promise<TaskRecord>;
39
53
  claimTask(input: ClaimTaskInput): Promise<{
40
54
  task: TaskRecord;
@@ -81,6 +95,12 @@ export declare class MergeBroker {
81
95
  cwd?: string;
82
96
  }): Promise<LocalValidationResult>;
83
97
  integrate(options?: IntegrationOptions): Promise<IntegrationResult>;
98
+ private recoverAbandonedIntegrationsLocked;
99
+ /**
100
+ * Recovers durable `running` state left by a killed integration process. Acquiring the integration
101
+ * lock is the proof that the former process is no longer allowed to make progress.
102
+ */
103
+ recoverAbandonedIntegrations(): Promise<RecoveryResult>;
84
104
  publishBatch(id: string): Promise<BatchRecord>;
85
105
  syncBatch(id: string): Promise<BatchRecord>;
86
106
  syncPublishedBatches(): Promise<{
@@ -136,6 +156,26 @@ export declare class MergeBroker {
136
156
  force?: boolean;
137
157
  uninstall?: boolean;
138
158
  }): Promise<HookInstallation>;
159
+ /**
160
+ * Installs the integration loop as a per-user service.
161
+ *
162
+ * Without it `serve` only runs while a terminal is open, so a submitted task
163
+ * waits for a human to notice — indistinguishable, to the agent that
164
+ * submitted it, from the broker rejecting the work.
165
+ */
166
+ installService(options?: {
167
+ uninstall?: boolean;
168
+ intervalSeconds?: number;
169
+ eager?: boolean;
170
+ nodePath?: string;
171
+ cliPath?: string;
172
+ pathEntries?: string[];
173
+ logFile?: string;
174
+ }): Promise<ServiceInstallation | {
175
+ name: string;
176
+ file: string;
177
+ removed: boolean;
178
+ }>;
139
179
  inspectLocks(): Promise<LockStatus[]>;
140
180
  releaseLock(name: string, options?: {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