opencode-swarm 7.185.1 → 7.186.1

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 (98) hide show
  1. package/.opencode/skills/swarm-pr-review/SKILL.md +3 -3
  2. package/.opencode/skills/swarm-pr-review/references/lane-output-recoverability.md +19 -1
  3. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  4. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  5. package/dist/background/pr-feedback-event-queue.d.ts +3 -2
  6. package/dist/background/pr-feedback-loop-runtime.d.ts +4 -1
  7. package/dist/background/pr-feedback-loop.d.ts +2 -1
  8. package/dist/background/pr-monitor-worker.d.ts +9 -1
  9. package/dist/background/pr-review-trigger-contract.d.ts +8 -0
  10. package/dist/background/pr-subscriptions.d.ts +23 -0
  11. package/dist/cli/{auto-checkpoint-2jecngee.js → auto-checkpoint-fsd4a9q9.js} +7 -7
  12. package/dist/cli/{checkpoint-qm05wdbh.js → checkpoint-rc61fd93.js} +14 -14
  13. package/dist/cli/{coder-settlement-56prayae.js → coder-settlement-x198191a.js} +10 -10
  14. package/dist/cli/{config-doctor-3b99vx74.js → config-doctor-mj4ae4jn.js} +2 -2
  15. package/dist/cli/{core-cxnqsrxp.js → core-fvsjr20m.js} +3 -3
  16. package/dist/cli/{curation-policy-ytzwb080.js → curation-policy-pxwagyh7.js} +4 -4
  17. package/dist/cli/{curator-drift-dt4g79a4.js → curator-drift-t150w08d.js} +8 -8
  18. package/dist/cli/{curator-5k3mktpe.js → curator-h7j1xse4.js} +39 -39
  19. package/dist/cli/curator-llm-factory-29cswvhr.js +81 -0
  20. package/dist/cli/{evidence-summary-service-8e2fghz0.js → evidence-summary-service-h42y6hwq.js} +17 -17
  21. package/dist/cli/{gate-evidence-vk8rebsx.js → gate-evidence-c7caa5x2.js} +5 -5
  22. package/dist/cli/guardrail-explain-yfd11za1.js +82 -0
  23. package/dist/cli/{guardrail-log-m6mydjet.js → guardrail-log-hcr5rptq.js} +6 -6
  24. package/dist/cli/{guardrail-reset-w41yndke.js → guardrail-reset-fqgf5sdb.js} +39 -39
  25. package/dist/cli/{hive-promoter-400xzdds.js → hive-promoter-632ewk29.js} +39 -39
  26. package/dist/cli/{index-9g61bfj9.js → index-010en5sq.js} +1 -1
  27. package/dist/cli/{index-r9zc92pb.js → index-03d68zxw.js} +41 -41
  28. package/dist/cli/{index-s7va6n84.js → index-0t61279z.js} +3 -3
  29. package/dist/cli/{index-zt3taseq.js → index-3rd7gqfg.js} +2 -2
  30. package/dist/cli/{index-ek5gvpvm.js → index-4h6e73bx.js} +7 -7
  31. package/dist/cli/{index-2c6e1p7j.js → index-4z0zdcd7.js} +3 -3
  32. package/dist/cli/{index-afmyp3kt.js → index-5v1sqv3m.js} +1 -1
  33. package/dist/cli/{index-6wqv8f7d.js → index-8fnayk3x.js} +5 -5
  34. package/dist/cli/{index-2b3bgm20.js → index-8jq3jsas.js} +1 -1
  35. package/dist/cli/{index-xgdypzch.js → index-92bbwjek.js} +1 -1
  36. package/dist/cli/{index-62akgg9d.js → index-92y6cpqn.js} +1 -1
  37. package/dist/cli/{index-cnbpht7m.js → index-98j268bh.js} +3 -3
  38. package/dist/cli/{index-s68z4a39.js → index-9z9g1897.js} +2 -2
  39. package/dist/cli/{index-dryhmaft.js → index-ay508kfq.js} +3 -3
  40. package/dist/cli/{index-8nsjefpc.js → index-bpqw4n2f.js} +1 -1
  41. package/dist/cli/{index-6sffjy74.js → index-c5e1wr7h.js} +1 -1
  42. package/dist/cli/{index-pa6fzbms.js → index-chaa1v0b.js} +4 -4
  43. package/dist/cli/{index-cp2nerjd.js → index-dbcwvc1v.js} +43 -20
  44. package/dist/cli/{index-hgfkcb1q.js → index-ef3pecd4.js} +813 -583
  45. package/dist/cli/{index-nw16apxs.js → index-ezttvjcf.js} +5 -5
  46. package/dist/cli/{index-m1bhg85z.js → index-gbmsvfp2.js} +2 -2
  47. package/dist/cli/{index-zxck9sr7.js → index-gjrs1epm.js} +1 -1
  48. package/dist/cli/{index-9h93zjm3.js → index-hmwnegkz.js} +1 -1
  49. package/dist/cli/{index-7jt24hpz.js → index-hq9f7fwf.js} +2 -2
  50. package/dist/cli/{index-rtznwf0g.js → index-hw8w4mkh.js} +39 -39
  51. package/dist/cli/{index-07bk0zm9.js → index-j42256hj.js} +1 -1
  52. package/dist/cli/{index-ycqsnfd1.js → index-jwkybwv0.js} +4 -4
  53. package/dist/cli/{index-yj7etak0.js → index-m8dry0a6.js} +1 -1
  54. package/dist/cli/{index-dz5cbkrm.js → index-mnb1pg1n.js} +4 -4
  55. package/dist/cli/{index-rr1dggfe.js → index-nnmgg6z6.js} +1 -1
  56. package/dist/cli/{index-7n3h39h9.js → index-pe1wgpvg.js} +7 -7
  57. package/dist/cli/{index-pppjg0ct.js → index-ptp6d5mm.js} +18 -20
  58. package/dist/cli/{index-nen885g8.js → index-q9wnbz9q.js} +1 -1
  59. package/dist/cli/{index-5n08z6qj.js → index-qg0nhcke.js} +5 -5
  60. package/dist/cli/{index-ppj5bjaq.js → index-qj7ewgrf.js} +7 -7
  61. package/dist/cli/{index-nhw5rt5x.js → index-syt8wykh.js} +4 -4
  62. package/dist/cli/{index-74yxwf8y.js → index-t46swpqf.js} +1 -1
  63. package/dist/cli/{index-ekyg4p8b.js → index-teyvb5tr.js} +1 -1
  64. package/dist/cli/{index-ss6b8jpz.js → index-vvajq163.js} +2 -2
  65. package/dist/cli/{index-1fc5aj26.js → index-w12y73z5.js} +1 -1
  66. package/dist/cli/{index-vqz0avr4.js → index-wrhf5apg.js} +2 -2
  67. package/dist/cli/{index-smwybqka.js → index-xe34ymp8.js} +2 -2
  68. package/dist/cli/{index-fa014mra.js → index-xkxt1b08.js} +3 -3
  69. package/dist/cli/{index-373880cv.js → index-y7s92gte.js} +1 -1
  70. package/dist/cli/index.js +40 -40
  71. package/dist/cli/{knowledge-escalator-30bb9fyg.js → knowledge-escalator-gajaew60.js} +11 -11
  72. package/dist/cli/{knowledge-events-gfbx97x0.js → knowledge-events-fsbgfz4z.js} +9 -9
  73. package/dist/cli/{knowledge-link-dv78fb9g.js → knowledge-link-jnnk0nmk.js} +3 -3
  74. package/dist/cli/{knowledge-store-2ssd489f.js → knowledge-store-vaq1g1dx.js} +4 -4
  75. package/dist/cli/{knowledge-validator-7bxvezgv.js → knowledge-validator-pdr6m77a.js} +6 -6
  76. package/dist/cli/{mcp-apr65eya.js → mcp-5sn4e5t2.js} +1 -1
  77. package/dist/cli/{model-preflight-g7b12yn2.js → model-preflight-z9p55ssn.js} +39 -39
  78. package/dist/cli/{pending-delegations-x8q7cxr7.js → pending-delegations-asyc469v.js} +10 -10
  79. package/dist/cli/{pr-subscriptions-qwr6ybcb.js → pr-subscriptions-nacx8r6a.js} +12 -10
  80. package/dist/cli/{pr-workflow-gate-qd5tfkak.js → pr-workflow-gate-j3r636zg.js} +41 -39
  81. package/dist/cli/{runner-tb3eppeg.js → runner-fns4esbf.js} +4 -4
  82. package/dist/cli/{scan-cursor-1m6dj2s2.js → scan-cursor-y9rchz83.js} +5 -5
  83. package/dist/cli/{schema-yvhamv41.js → schema-g377jsvv.js} +1 -1
  84. package/dist/cli/{scope-persistence-xdedbzdg.js → scope-persistence-dtympt37.js} +13 -13
  85. package/dist/cli/{server-nhdkvdt2.js → server-n51pvxds.js} +39 -39
  86. package/dist/cli/{skill-generator-fzvp9m8z.js → skill-generator-k3hnf8xx.js} +13 -13
  87. package/dist/cli/{snapshot-coordination-init-xqxek8kn.js → snapshot-coordination-init-k1f93806.js} +39 -39
  88. package/dist/cli/{speckit-checkoff-57tf4079.js → speckit-checkoff-w7qbrzph.js} +4 -4
  89. package/dist/cli/{workspace-snapshot-kcfkk3a2.js → workspace-snapshot-1sa8m2ea.js} +3 -3
  90. package/dist/cli/{worktree-collision-ownership-80n814a8.js → worktree-collision-ownership-4yxah5wy.js} +11 -11
  91. package/dist/cli/{worktree-isolation-kaxkr61t.js → worktree-isolation-p0pz81a1.js} +39 -39
  92. package/dist/git/pr.d.ts +73 -0
  93. package/dist/hooks/pr-workflow-gate.d.ts +69 -0
  94. package/dist/index.js +39 -39
  95. package/dist/tools/write-pr-review-trigger-eval.d.ts +2 -1
  96. package/package.json +1 -1
  97. package/dist/cli/curator-llm-factory-hkk29g2y.js +0 -81
  98. package/dist/cli/guardrail-explain-ma658hkw.js +0 -82
@@ -3,7 +3,7 @@ name: swarm-pr-review
3
3
  audience: swarm-plugin
4
4
  description: Run a graph-guided, tool-augmented PR review using context packing, parallel exploration, mandatory repository-agnostic risk-family coverage with dispatch scaled to diff size and risk, independent reviewer validation, critic challenge, and metrics writeback. Use for deep pull request review with low false-positive tolerance and high recall in any repository, on any agent harness (structured lane controller, native parallel subagents, or single-context sequential passes).
5
5
  disable-model-invocation: true
6
- swarm-contract-digest: 96af70854748
6
+ swarm-contract-digest: eb20aa7994a5
7
7
  ---
8
8
 
9
9
  # /swarm-pr-review
@@ -971,7 +971,7 @@ Before Phase 4 or synthesis, all base lanes must be settled. `dispatch_lanes_asy
971
971
  - **Mode B (invalid structured output):** Under Profile A, collection reports `status: failed` with a named contract predicate while retaining the non-empty preview, digest, and `output_ref`; the artifact has zero valid `[CANDIDATE]` rows and no parseable `[CLEAN] | lane | coverage_scope | evidence` attestation. Under Profiles B/C, treat the equivalent non-empty report as failed when parsing yields zero candidates and no valid clean attestation. The non-empty transcript is diagnostic evidence, never coverage proof.
972
972
 
973
973
  For ANY lane that failed (either mode):
974
- 1. **Retry** (max 2 attempts after the initial attempt) with materially different parameters — different session or prompt decomposition, while preserving the required structured async mode and exact head provenance.
974
+ 1. **Retry** (initial dispatch plus 2 retries — PR_REVIEW_MICRO_FAMILY_RETRY_BUDGET; each micro-family dispatch acknowledgment records one counted attempt in gate state) with materially different parameters — different session or prompt decomposition, while preserving the required structured async mode and exact head provenance.
975
975
  2. If a base lane fails under Profile A, retry only the unresolved `workflow_lane` identifiers with `dispatch_lanes_async`, `mode: "swarm-pr-review:base"`, the same exact `pr_head_sha`, explorer agents, and the staged-resilience fields when that policy is enabled: a singleton `pr_review_wave_stage: "canary"` first, then a matching `"fanout"` batch only for the remaining unresolved obligations. The durable gate joins successful provenance across the initial wave and retry batches, carries unresolved obligations forward attempt by attempt, and rejects typed `retry_exhausted` or `circuit_open` outcomes before any new lane is launched. While that controller is active, blocking `dispatch_lanes` and direct Task dispatch are not equivalent because they cannot satisfy the structured provenance gate. Under Profiles B/C, retry only the failed `workflow_lane` identifiers with a fresh subagent or pass, the same exact `pr_head_sha`, and a materially different prompt decomposition.
976
976
  3. If no equivalent alternative can be verified AND every launched lane is terminal or explicitly cancelled, **settle N-of-6 truthfully (issue #2383)** instead of discarding validated work: admit the terminal settlement with `write_pr_review_artifact` (`kind: "findings"`, `boundary: "post_explorer"`, the sentinel `CLEAN-REVIEW` record when no candidates exist, and `partial_base_coverage: { unresolved_dimensions: [<exactly the dimensions that are not covered>] }`), run the remaining phases over the covered dimensions' findings, and complete with `complete_pr_workflow` carrying the verdict the settlement allows. NEVER fabricate coverage, NEVER present an unresolved dimension as reviewed, and NEVER let a partial report approve.
977
977
  4. **Terminal report kinds (issue #2383):** all six dimensions covered → `COMPLETE` (verdict may be APPROVE, REQUEST_CHANGES, or INCOMPLETE); at least one covered → `PARTIAL` (verdict must be REQUEST_CHANGES or INCOMPLETE; validated findings from covered dimensions remain publishable); zero covered → `NO_COVERAGE` (skip the findings ladder entirely, call `complete_pr_workflow` with `report_verdict: "INCOMPLETE"` directly — the completion returns a truthful operational report with per-dimension reasons and never claims a code-quality review). A still-live lane blocks settlement: poll, cancel explicitly with `cancel_pending`, or let the presumed-stale sweep settle it first.
@@ -1746,7 +1746,7 @@ Council findings are supplementary, not authoritative overrides. Do not adopt co
1746
1746
  11. Obligation precedence is deterministic. Do not skip higher-precedence sources to fill gaps with LLM synthesis.
1747
1747
  12. Do not leak secrets from logs, evidence bundles, config files, URLs, or scanner output.
1748
1748
  13. Do not recommend destructive git or filesystem actions as fixes unless they are clearly scoped, safe, and necessary.
1749
- 14. If subagents fail, timeout, or return malformed output, retry with corrected parameters (the initial attempt plus up to 2 retries — aborting after only the first retry is one bounded retry early) through the dispatch mechanism of the active profile — Profile A: the same structured `dispatch_lanes_async` workflow mode and exact `pr_head_sha`, where blocking or direct-Task dispatch cannot preserve the durable provenance contract and is not an equivalent fallback; Profiles B/C: a fresh subagent or pass bound to the same exact `pr_head_sha`. If retries fail, the affected coverage dimension is BLOCKED and must be surfaced to the user before synthesis — except that a micro family whose every lane is liveness-terminal with no retained artifact settles through the disclosed dead-family path on the trigger receipt (issue #2835) instead of BLOCKED, and abort is legitimate only after that settlement path has been exhausted or is unavailable. Do not fabricate validation results, do not present partial findings as complete or beyond the truthful N-of-6 settlement (issue #2383), and do not silently mark candidates UNVERIFIED to proceed past the gap.
1749
+ 14. If subagents fail, timeout, or return malformed output, retry with corrected parameters (the initial attempt plus up to 2 retries — aborting after only the first retry is one bounded retry early) through the dispatch mechanism of the active profile — Profile A: the same structured `dispatch_lanes_async` workflow mode and exact `pr_head_sha`, where blocking or direct-Task dispatch cannot preserve the durable provenance contract and is not an equivalent fallback; Profiles B/C: a fresh subagent or pass bound to the same exact `pr_head_sha`. If retries fail, the affected coverage dimension is BLOCKED and must be surfaced to the user before synthesis — except that a micro family whose every lane is liveness-terminal with no retained artifact settles through the disclosed dead-family path on the trigger receipt (issue #2835; the micro-family dispatch ledger enforces the retry budget mechanically — three recorded dispatch attempts before the admission stops failing closed) instead of BLOCKED, and abort is legitimate only after that settlement path has been exhausted or is unavailable. Do not fabricate validation results, do not present partial findings as complete or beyond the truthful N-of-6 settlement (issue #2383), and do not silently mark candidates UNVERIFIED to proceed past the gap.
1750
1750
 
1751
1751
  15. If context pack, repo graph, deterministic signals, or Swarm artifacts are unavailable, retry with alternative access paths. If a source that should exist on the active profile is still unavailable after retry, the affected coverage dimension is BLOCKED and must be surfaced to the user. A source that cannot exist on the active profile (for example `.swarm/` artifacts outside Profile A) is marked N/A in the validation provenance instead — N/A is disclosure, never a waiver of the dimensions and families that must still be covered. Do not proceed to synthesis with unclosed coverage gaps under a "best available evidence" rationale — the architect is not authorized to produce a degraded review that hides a coverage gap; the disclosed N-of-6 PARTIAL/NO_COVERAGE settlement (issue #2383) is the only sanctioned partial exit.
1752
1752
 
@@ -336,7 +336,25 @@ UNATTESTED and can never support an APPROVE verdict. This disclosure is the
336
336
  settlement of last resort for a dead family: retry the family first (the
337
337
  initial attempt plus up to 2 retries — aborting after only the first retry is
338
338
  one bounded retry early), then disclose, and only then is `abort_pr_workflow`
339
- legitimate. An operator-cancelled lane does NOT qualify — `cancel_pending` is
339
+ legitimate.
340
+
341
+ The retry budget is mechanically enforced (issue #2878): every micro-family
342
+ dispatch acknowledgment (`dispatch_lanes_async` with mode
343
+ `swarm-pr-review:micro`) appends one record to the persisted per-family
344
+ micro-family dispatch ledger in PR-workflow gate state, and the dead-family
345
+ admission requires three recorded dispatch attempts (initial dispatch plus 2
346
+ retries, `PR_REVIEW_MICRO_FAMILY_RETRY_BUDGET`) for the cited family under
347
+ the same `pr_head_sha` — with the cited batch among the counted attempts —
348
+ before it stops failing closed with an actionable budget message that names
349
+ the recorded count. Crash-window disposition of the ledger: each attempt is
350
+ durably recorded at acknowledgment time, strictly before any lane session is
351
+ created, so no dead lane can exist whose dispatch was not first counted; a
352
+ crash between the acknowledgment and the lane launch leaves a benign orphan
353
+ entry (batchId idempotence prevents double-counting on a retry of the same
354
+ dispatch call, and the over-count direction is conservative because the cited
355
+ batch must still exist as a real stale delegation record to be disclosed at
356
+ all); the ledger is bounded at 128 records with a fail-closed BLOCKED refusal
357
+ at the cap — never silent eviction. An operator-cancelled lane does NOT qualify — `cancel_pending` is
340
358
  a controlled act by the controller; re-dispatch the family instead of
341
359
  disclosing it.
342
360
 
@@ -1,4 +1,5 @@
1
1
  import * as fsp from 'node:fs/promises';
2
+ import { type ForgeContext } from '../providers/forge-provider.js';
2
3
  export declare const MAX_PR_FEEDBACK_MONITOR_EVENTS = 20;
3
4
  export interface PrFeedbackMonitorEvent {
4
5
  type: string;
@@ -22,9 +23,9 @@ export interface PrFeedbackMonitorQueueRecord {
22
23
  sessionID: string;
23
24
  events: PrFeedbackMonitorEvent[];
24
25
  }
25
- export declare function enqueuePrFeedbackMonitorEvent(directory: string, sessionID: string, event: Omit<PrFeedbackMonitorEvent, 'claimedWorkflowInstanceId' | 'claimedAt' | 'claimedOwnerPid'>): Promise<PrFeedbackMonitorQueueRecord>;
26
+ export declare function enqueuePrFeedbackMonitorEvent(directory: string, sessionID: string, event: Omit<PrFeedbackMonitorEvent, 'claimedWorkflowInstanceId' | 'claimedAt' | 'claimedOwnerPid'>, forge?: ForgeContext): Promise<PrFeedbackMonitorQueueRecord>;
26
27
  export declare function readPrFeedbackMonitorQueue(directory: string, sessionID: string): Promise<PrFeedbackMonitorQueueRecord | null>;
27
- export declare function claimPrFeedbackMonitorEvents(directory: string, sessionID: string, workflowInstanceId: string, prUrl: string, dedupTokens?: readonly string[], ownerPid?: number): Promise<PrFeedbackMonitorEvent[]>;
28
+ export declare function claimPrFeedbackMonitorEvents(directory: string, sessionID: string, workflowInstanceId: string, prUrl: string, dedupTokens?: readonly string[], ownerPid?: number, forge?: ForgeContext): Promise<PrFeedbackMonitorEvent[]>;
28
29
  /**
29
30
  * Remove queued events by dedup token (#2502 loop cancellation). Claimed but
30
31
  * unsettled events otherwise stay in the queue forever — a claim alone never
@@ -11,9 +11,10 @@ import type { OpencodeClient } from '@opencode-ai/sdk';
11
11
  import type { PluginConfig } from '../config/schema.js';
12
12
  import { dispatchEphemeralAgent } from '../evaluation/ephemeral-agent-dispatcher.js';
13
13
  import { parseCriticResponseFields } from '../full-auto/critic-response-parser.js';
14
- import { getPRPollSnapshot } from '../git/pr.js';
14
+ import { getMRPollSnapshot, getPRPollSnapshot } from '../git/pr.js';
15
15
  import { canonicalRootKeyFresh, canonicalRootKeyFreshAsync } from '../utils/canonical-root.js';
16
16
  import { log } from '../utils/logger.js';
17
+ import { findSubscriptionRecordForPrUrl } from './pr-subscriptions.js';
17
18
  /** The input shape shared with `pr-feedback-loop` without a runtime import. */
18
19
  export interface PrFeedbackLoopOversightInput {
19
20
  directory: string;
@@ -67,6 +68,8 @@ export declare function dispatchPrFeedbackOversight(input: PrFeedbackLoopOversig
67
68
  /** Test-only DI visibility; production behavior still uses these same calls. */
68
69
  export declare const _internals: {
69
70
  getPRPollSnapshot: typeof getPRPollSnapshot;
71
+ getMRPollSnapshot: typeof getMRPollSnapshot;
72
+ findSubscriptionRecordForPrUrl: typeof findSubscriptionRecordForPrUrl;
70
73
  dispatchEphemeralAgent: typeof dispatchEphemeralAgent;
71
74
  parseCriticResponseFields: typeof parseCriticResponseFields;
72
75
  canonicalRootKeyFresh: typeof canonicalRootKeyFresh;
@@ -1,3 +1,4 @@
1
+ import type { ForgeContext } from '../providers/forge-provider.js';
1
2
  import { type PrFeedbackMonitorEvent } from './pr-feedback-event-queue';
2
3
  import { listActive } from './pr-subscriptions';
3
4
  export declare const PR_FEEDBACK_LOOP_STATE_REL: string;
@@ -167,7 +168,7 @@ export declare function readPrFeedbackLoopCancellation(directory: string, sessio
167
168
  * keeping the check and enqueue in the loop → queue order prevents a stop
168
169
  * from racing between the check and a queue write after cleanup.
169
170
  */
170
- export declare function enqueuePrFeedbackMonitorEventIfNotCancelled(directory: string, sessionID: string, event: Omit<PrFeedbackMonitorEvent, 'claimedWorkflowInstanceId' | 'claimedAt' | 'claimedOwnerPid'>): Promise<boolean>;
171
+ export declare function enqueuePrFeedbackMonitorEventIfNotCancelled(directory: string, sessionID: string, event: Omit<PrFeedbackMonitorEvent, 'claimedWorkflowInstanceId' | 'claimedAt' | 'claimedOwnerPid'>, forge?: ForgeContext): Promise<boolean>;
171
172
  /**
172
173
  * Process ONE queued monitor event end-to-end for the session (the #2502
173
174
  * completion-fixture unit): claim → classify → authorize → oversight → act →
@@ -7,7 +7,7 @@
7
7
  * start/stop/dispose lifecycle and bounded, fail-open operation.
8
8
  */
9
9
  import type { PrMonitorConfig } from '../config/schema';
10
- import { getMergeGroupRun, getPRPollSnapshot, getPRReviewComments } from '../git/pr';
10
+ import { getMergeGroupRun, getMRComments, getMRPollSnapshot, getPRPollSnapshot, getPRReviewComments } from '../git/pr';
11
11
  import { type AutomationEventType, getGlobalEventBus } from './event-bus';
12
12
  import { listActive, sweepStale, unsubscribe, updateSnapshot } from './pr-subscriptions';
13
13
  /** Configuration options for PrMonitorWorker construction. */
@@ -176,6 +176,12 @@ export declare class PrMonitorWorker {
176
176
  * @param mergeGroupRunFetchSucceeded - if false, mergeGroupRun fields are
177
177
  * intentionally omitted from snapshotUpdates to preserve prior snapshot state
178
178
  * on transient fetch failures.
179
+ * @param gitLabPipelines - #2882 glab path only: real pipeline verdicts for
180
+ * the MR head sha plus whether the pipelines fetch succeeded. When present,
181
+ * CI transitions key off these checks instead of statusCheckRollup (which
182
+ * stays an honest-unavailable marker for GitLab and is never populated
183
+ * from pipeline data); when fetchSucceeded is false, lastCheckRunSet is
184
+ * left untouched so prior CI state is preserved (mergeGroupRun pattern).
179
185
  */
180
186
  private computeChanges;
181
187
  /**
@@ -225,6 +231,8 @@ export declare class PrMonitorWorker {
225
231
  export declare const _internals: {
226
232
  getPRPollSnapshot: typeof getPRPollSnapshot;
227
233
  getPRReviewComments: typeof getPRReviewComments;
234
+ getMRPollSnapshot: typeof getMRPollSnapshot;
235
+ getMRComments: typeof getMRComments;
228
236
  getMergeGroupRun: typeof getMergeGroupRun;
229
237
  listActive: typeof listActive;
230
238
  updateSnapshot: typeof updateSnapshot;
@@ -1,4 +1,12 @@
1
1
  import { z } from 'zod';
2
+ /**
3
+ * Issue #2878: the swarm-pr-review retry budget for a micro family — the
4
+ * initial dispatch plus up to this many retries — that the dead-family
5
+ * admission in `write_pr_review_trigger_eval` requires to be provably
6
+ * exhausted, from the persisted per-family dispatch ledger in PR-workflow
7
+ * gate state, before a liveness-dead family may be disclosed.
8
+ */
9
+ export declare const PR_REVIEW_MICRO_FAMILY_RETRY_BUDGET = 2;
2
10
  export declare const PR_REVIEW_TRIGGER_DEFINITIONS: readonly [{
3
11
  readonly id: "auth-identity-secrets";
4
12
  readonly scope: "universal";
@@ -380,6 +380,29 @@ export declare function listActive(directory: string): Promise<PrSubscriptionRec
380
380
  * Look up an active subscription for a specific PR. Lock-free bounded read.
381
381
  */
382
382
  export declare function lookupByPr(directory: string, repoFullName: string, prNumber: number): Promise<PrSubscriptionRecord | null>;
383
+ /**
384
+ * Find the active subscription record whose forge declaration authorizes a
385
+ * given MR/PR URL or (repoFullName, prNumber) identity (issue #2882 AC5).
386
+ *
387
+ * Every PROVIDED key field must match. `prUrl` matches on raw string equality
388
+ * or — for declared generic self-hosted GitLab hosts, which never canonicalize
389
+ * without context — on record-scoped canonicalization (both URLs canonicalized
390
+ * with the candidate record's own `forge` declaration). This resolves the
391
+ * lookup chicken-and-egg: the declaration needed to canonicalize lives on the
392
+ * record being looked for.
393
+ *
394
+ * Tie-breaking: first match wins. The store's composite `correlationId`
395
+ * (`${sessionID}::${repoFullName}::${prNumber}`) is unique, so true duplicates
396
+ * are impossible; callers needing session scoping pass `sessionID` too.
397
+ * Returns null on miss — callers then run with NO configured context and the
398
+ * existing fail-closed canonicalization behavior stands.
399
+ */
400
+ export declare function findSubscriptionRecordForPrUrl(directory: string, key: {
401
+ prUrl?: string;
402
+ repoFullName?: string;
403
+ prNumber?: number;
404
+ sessionID?: string;
405
+ }): Promise<PrSubscriptionRecord | null>;
383
406
  /**
384
407
  * Update the snapshot for a given correlationId. Merges `updates` into the
385
408
  * existing active record and persists the new snapshot. Returns the merged
@@ -1,27 +1,27 @@
1
1
  // @bun
2
- import"./index-7jt24hpz.js";
2
+ import"./index-hq9f7fwf.js";
3
3
  import"./index-frcemc0b.js";
4
4
  import"./index-0725jpp7.js";
5
5
  import {
6
6
  appendCoreEventSync
7
- } from "./index-373880cv.js";
7
+ } from "./index-y7s92gte.js";
8
8
  import {
9
9
  derivePlanIdentityHash
10
10
  } from "./index-7pmbnjvj.js";
11
- import"./index-xgdypzch.js";
11
+ import"./index-92bbwjek.js";
12
12
  import"./index-w6w6ny06.js";
13
13
  import"./index-mc72pk74.js";
14
14
  import"./index-c1ggtmpm.js";
15
- import"./index-yj7etak0.js";
15
+ import"./index-m8dry0a6.js";
16
16
  import"./index-gx2vp8gx.js";
17
17
  import {
18
18
  loadPluginConfigWithMeta
19
- } from "./index-ekyg4p8b.js";
19
+ } from "./index-teyvb5tr.js";
20
20
  import {
21
21
  init_git_executable,
22
22
  resolveGitExecutable
23
23
  } from "./index-zxdawwc7.js";
24
- import"./index-rr1dggfe.js";
24
+ import"./index-nnmgg6z6.js";
25
25
  import"./index-48jvqqfa.js";
26
26
  import"./index-bk5tah7q.js";
27
27
  import"./index-gknz3bv1.js";
@@ -153,7 +153,7 @@ async function maybeSaveAutoCheckpoint(directory, plan) {
153
153
  generation += 1;
154
154
  label = buildAutoCheckpointLabel(plan, completedCount, generation);
155
155
  }
156
- const { saveCheckpointRecord } = await import("./checkpoint-qm05wdbh.js");
156
+ const { saveCheckpointRecord } = await import("./checkpoint-rc61fd93.js");
157
157
  const result = await saveCheckpointRecord(label, directory);
158
158
  if (result.success) {
159
159
  emitAutoSavedEvent(directory, {
@@ -3,27 +3,27 @@ import {
3
3
  _internals,
4
4
  checkpoint,
5
5
  saveCheckpointRecord
6
- } from "./index-nhw5rt5x.js";
7
- import"./index-pppjg0ct.js";
6
+ } from "./index-syt8wykh.js";
7
+ import"./index-ptp6d5mm.js";
8
8
  import"./index-6b295cas.js";
9
9
  import"./index-9nyqt3kb.js";
10
- import"./index-2b3bgm20.js";
10
+ import"./index-8jq3jsas.js";
11
11
  import"./index-zsrtt42s.js";
12
- import"./index-zt3taseq.js";
12
+ import"./index-3rd7gqfg.js";
13
13
  import"./index-g4fs6z4e.js";
14
- import"./index-afmyp3kt.js";
14
+ import"./index-5v1sqv3m.js";
15
15
  import"./index-2s7dvzff.js";
16
- import"./index-7jt24hpz.js";
16
+ import"./index-hq9f7fwf.js";
17
17
  import"./index-frcemc0b.js";
18
18
  import"./index-0725jpp7.js";
19
- import"./index-dryhmaft.js";
20
- import"./index-373880cv.js";
21
- import"./index-nen885g8.js";
22
- import"./index-74yxwf8y.js";
19
+ import"./index-ay508kfq.js";
20
+ import"./index-y7s92gte.js";
21
+ import"./index-q9wnbz9q.js";
22
+ import"./index-t46swpqf.js";
23
23
  import"./index-ry16d01s.js";
24
24
  import"./index-rdm3px0g.js";
25
25
  import"./index-7pmbnjvj.js";
26
- import"./index-xgdypzch.js";
26
+ import"./index-92bbwjek.js";
27
27
  import"./index-6cjpmvpa.js";
28
28
  import"./index-t7hmqgjy.js";
29
29
  import"./index-w6w6ny06.js";
@@ -31,11 +31,11 @@ import"./index-mc72pk74.js";
31
31
  import"./index-c1ggtmpm.js";
32
32
  import"./index-ejhxgyvm.js";
33
33
  import"./index-7g4c7s5r.js";
34
- import"./index-yj7etak0.js";
34
+ import"./index-m8dry0a6.js";
35
35
  import"./index-gx2vp8gx.js";
36
- import"./index-ekyg4p8b.js";
36
+ import"./index-teyvb5tr.js";
37
37
  import"./index-zxdawwc7.js";
38
- import"./index-rr1dggfe.js";
38
+ import"./index-nnmgg6z6.js";
39
39
  import"./index-48jvqqfa.js";
40
40
  import"./index-bk5tah7q.js";
41
41
  import"./index-gknz3bv1.js";
@@ -14,17 +14,17 @@ import {
14
14
  releaseCoderDispatchOwnership,
15
15
  settleCoderDispatch,
16
16
  transferCoderSettlementToBackground
17
- } from "./index-ek5gvpvm.js";
18
- import"./index-s68z4a39.js";
19
- import"./index-vqz0avr4.js";
20
- import"./index-cnbpht7m.js";
21
- import"./index-2c6e1p7j.js";
17
+ } from "./index-4h6e73bx.js";
18
+ import"./index-9z9g1897.js";
19
+ import"./index-wrhf5apg.js";
20
+ import"./index-98j268bh.js";
21
+ import"./index-4z0zdcd7.js";
22
22
  import"./index-g4fs6z4e.js";
23
- import"./index-afmyp3kt.js";
23
+ import"./index-5v1sqv3m.js";
24
24
  import"./index-2s7dvzff.js";
25
- import"./index-373880cv.js";
26
- import"./index-xgdypzch.js";
27
- import"./index-6sffjy74.js";
25
+ import"./index-y7s92gte.js";
26
+ import"./index-92bbwjek.js";
27
+ import"./index-c5e1wr7h.js";
28
28
  import"./index-6cjpmvpa.js";
29
29
  import"./index-t7hmqgjy.js";
30
30
  import"./index-w6w6ny06.js";
@@ -32,7 +32,7 @@ import"./index-mc72pk74.js";
32
32
  import"./index-c1ggtmpm.js";
33
33
  import"./index-ejhxgyvm.js";
34
34
  import"./index-7g4c7s5r.js";
35
- import"./index-yj7etak0.js";
35
+ import"./index-m8dry0a6.js";
36
36
  import"./index-zxdawwc7.js";
37
37
  import"./index-48jvqqfa.js";
38
38
  import"./index-gknz3bv1.js";
@@ -16,11 +16,11 @@ import {
16
16
  shouldRunOnStartup,
17
17
  writeBackupArtifact,
18
18
  writeDoctorArtifact
19
- } from "./index-9h93zjm3.js";
19
+ } from "./index-hmwnegkz.js";
20
20
  import"./index-6b295cas.js";
21
21
  import"./index-ry16d01s.js";
22
22
  import"./index-c1ggtmpm.js";
23
- import"./index-rr1dggfe.js";
23
+ import"./index-nnmgg6z6.js";
24
24
  import"./index-48jvqqfa.js";
25
25
  import"./index-bk5tah7q.js";
26
26
  import"./index-gknz3bv1.js";
@@ -14,12 +14,12 @@ import {
14
14
  resolveWorktreeBaseDir,
15
15
  shortenWorktreePath,
16
16
  writeLaneProfileToDiskReal
17
- } from "./index-2c6e1p7j.js";
18
- import"./index-afmyp3kt.js";
17
+ } from "./index-4z0zdcd7.js";
18
+ import"./index-5v1sqv3m.js";
19
19
  import"./index-2s7dvzff.js";
20
20
  import"./index-mc72pk74.js";
21
21
  import"./index-c1ggtmpm.js";
22
- import"./index-yj7etak0.js";
22
+ import"./index-m8dry0a6.js";
23
23
  import"./index-zxdawwc7.js";
24
24
  import"./index-48jvqqfa.js";
25
25
  import"./index-zpsr8rpc.js";
@@ -5,11 +5,11 @@ import {
5
5
  authorizeCuration,
6
6
  buildConfigFingerprintInput,
7
7
  readCohortConfigFingerprint
8
- } from "./index-8nsjefpc.js";
8
+ } from "./index-bpqw4n2f.js";
9
9
  import"./index-rtry5xyf.js";
10
10
  import"./index-vzm6zre7.js";
11
- import"./index-zxck9sr7.js";
12
- import"./index-6sffjy74.js";
11
+ import"./index-gjrs1epm.js";
12
+ import"./index-c5e1wr7h.js";
13
13
  import"./index-6cjpmvpa.js";
14
14
  import"./index-t7hmqgjy.js";
15
15
  import"./index-w6w6ny06.js";
@@ -17,7 +17,7 @@ import"./index-mc72pk74.js";
17
17
  import"./index-c1ggtmpm.js";
18
18
  import"./index-ejhxgyvm.js";
19
19
  import"./index-7g4c7s5r.js";
20
- import"./index-yj7etak0.js";
20
+ import"./index-m8dry0a6.js";
21
21
  import"./index-gknz3bv1.js";
22
22
  import"./index-zpsr8rpc.js";
23
23
  import"./index-zgwm4ryv.js";
@@ -5,23 +5,23 @@ import {
5
5
  readPriorDriftReports,
6
6
  runDeterministicDriftCheck,
7
7
  writeDriftReport
8
- } from "./index-s7va6n84.js";
9
- import"./index-2b3bgm20.js";
10
- import"./index-zt3taseq.js";
11
- import"./index-afmyp3kt.js";
8
+ } from "./index-0t61279z.js";
9
+ import"./index-8jq3jsas.js";
10
+ import"./index-3rd7gqfg.js";
11
+ import"./index-5v1sqv3m.js";
12
12
  import"./index-2s7dvzff.js";
13
13
  import"./index-0725jpp7.js";
14
- import"./index-74yxwf8y.js";
14
+ import"./index-t46swpqf.js";
15
15
  import"./index-ry16d01s.js";
16
16
  import"./index-rdm3px0g.js";
17
17
  import"./index-mc72pk74.js";
18
18
  import"./index-c1ggtmpm.js";
19
19
  import"./index-ejhxgyvm.js";
20
20
  import"./index-7g4c7s5r.js";
21
- import"./index-yj7etak0.js";
22
- import"./index-ekyg4p8b.js";
21
+ import"./index-m8dry0a6.js";
22
+ import"./index-teyvb5tr.js";
23
23
  import"./index-zxdawwc7.js";
24
- import"./index-rr1dggfe.js";
24
+ import"./index-nnmgg6z6.js";
25
25
  import"./index-48jvqqfa.js";
26
26
  import"./index-bk5tah7q.js";
27
27
  import"./index-gknz3bv1.js";
@@ -14,61 +14,61 @@ import {
14
14
  runCuratorInit,
15
15
  runCuratorPhase,
16
16
  writeCuratorSummary
17
- } from "./index-hgfkcb1q.js";
18
- import"./index-ss6b8jpz.js";
19
- import"./index-9h93zjm3.js";
20
- import"./index-pa6fzbms.js";
17
+ } from "./index-ef3pecd4.js";
18
+ import"./index-vvajq163.js";
19
+ import"./index-hmwnegkz.js";
20
+ import"./index-chaa1v0b.js";
21
21
  import"./index-7bxssqaf.js";
22
- import"./index-1fc5aj26.js";
23
- import"./index-62akgg9d.js";
22
+ import"./index-w12y73z5.js";
23
+ import"./index-92y6cpqn.js";
24
24
  import"./index-txdagbh7.js";
25
- import"./index-smwybqka.js";
25
+ import"./index-xe34ymp8.js";
26
26
  import"./index-rdec0y3z.js";
27
- import"./index-s7va6n84.js";
28
- import"./index-ek5gvpvm.js";
29
- import"./index-dz5cbkrm.js";
30
- import"./index-5n08z6qj.js";
31
- import"./index-s68z4a39.js";
32
- import"./index-cp2nerjd.js";
27
+ import"./index-0t61279z.js";
28
+ import"./index-4h6e73bx.js";
29
+ import"./index-mnb1pg1n.js";
30
+ import"./index-qg0nhcke.js";
31
+ import"./index-9z9g1897.js";
32
+ import"./index-dbcwvc1v.js";
33
33
  import"./index-cjapb4hy.js";
34
- import"./index-vqz0avr4.js";
34
+ import"./index-wrhf5apg.js";
35
35
  import"./index-pt7h91zc.js";
36
36
  import"./index-q7sjgr1y.js";
37
- import"./index-nhw5rt5x.js";
38
- import"./index-pppjg0ct.js";
37
+ import"./index-syt8wykh.js";
38
+ import"./index-ptp6d5mm.js";
39
39
  import"./index-6b295cas.js";
40
40
  import"./index-9nyqt3kb.js";
41
- import"./index-2b3bgm20.js";
41
+ import"./index-8jq3jsas.js";
42
42
  import"./index-zsrtt42s.js";
43
- import"./index-zt3taseq.js";
44
- import"./index-cnbpht7m.js";
45
- import"./index-2c6e1p7j.js";
43
+ import"./index-3rd7gqfg.js";
44
+ import"./index-98j268bh.js";
45
+ import"./index-4z0zdcd7.js";
46
46
  import"./index-g4fs6z4e.js";
47
- import"./index-nw16apxs.js";
48
- import"./index-ppj5bjaq.js";
49
- import"./index-afmyp3kt.js";
47
+ import"./index-ezttvjcf.js";
48
+ import"./index-qj7ewgrf.js";
49
+ import"./index-5v1sqv3m.js";
50
50
  import"./index-2s7dvzff.js";
51
- import"./index-ycqsnfd1.js";
52
- import"./index-8nsjefpc.js";
51
+ import"./index-jwkybwv0.js";
52
+ import"./index-bpqw4n2f.js";
53
53
  import"./index-rtry5xyf.js";
54
- import"./index-7jt24hpz.js";
54
+ import"./index-hq9f7fwf.js";
55
55
  import"./index-frcemc0b.js";
56
56
  import"./index-0725jpp7.js";
57
- import"./index-6wqv8f7d.js";
58
- import"./index-dryhmaft.js";
59
- import"./index-373880cv.js";
60
- import"./index-9g61bfj9.js";
61
- import"./index-nen885g8.js";
62
- import"./index-74yxwf8y.js";
57
+ import"./index-8fnayk3x.js";
58
+ import"./index-ay508kfq.js";
59
+ import"./index-y7s92gte.js";
60
+ import"./index-010en5sq.js";
61
+ import"./index-q9wnbz9q.js";
62
+ import"./index-t46swpqf.js";
63
63
  import"./index-ry16d01s.js";
64
64
  import"./index-rdm3px0g.js";
65
65
  import"./index-7pmbnjvj.js";
66
- import"./index-xgdypzch.js";
67
- import"./index-7n3h39h9.js";
66
+ import"./index-92bbwjek.js";
67
+ import"./index-pe1wgpvg.js";
68
68
  import"./index-vzm6zre7.js";
69
69
  import"./index-ae75rja9.js";
70
- import"./index-zxck9sr7.js";
71
- import"./index-6sffjy74.js";
70
+ import"./index-gjrs1epm.js";
71
+ import"./index-c5e1wr7h.js";
72
72
  import"./index-6cjpmvpa.js";
73
73
  import"./index-t7hmqgjy.js";
74
74
  import"./index-w6w6ny06.js";
@@ -76,11 +76,11 @@ import"./index-mc72pk74.js";
76
76
  import"./index-c1ggtmpm.js";
77
77
  import"./index-ejhxgyvm.js";
78
78
  import"./index-7g4c7s5r.js";
79
- import"./index-yj7etak0.js";
79
+ import"./index-m8dry0a6.js";
80
80
  import"./index-gx2vp8gx.js";
81
- import"./index-ekyg4p8b.js";
81
+ import"./index-teyvb5tr.js";
82
82
  import"./index-zxdawwc7.js";
83
- import"./index-rr1dggfe.js";
83
+ import"./index-nnmgg6z6.js";
84
84
  import"./index-48jvqqfa.js";
85
85
  import"./index-bk5tah7q.js";
86
86
  import"./index-gknz3bv1.js";
@@ -0,0 +1,81 @@
1
+ // @bun
2
+ import {
3
+ createCuratorLLMDelegate
4
+ } from "./index-ef3pecd4.js";
5
+ import"./index-vvajq163.js";
6
+ import"./index-hmwnegkz.js";
7
+ import"./index-chaa1v0b.js";
8
+ import"./index-7bxssqaf.js";
9
+ import"./index-w12y73z5.js";
10
+ import"./index-92y6cpqn.js";
11
+ import"./index-txdagbh7.js";
12
+ import"./index-xe34ymp8.js";
13
+ import"./index-rdec0y3z.js";
14
+ import"./index-0t61279z.js";
15
+ import"./index-4h6e73bx.js";
16
+ import"./index-mnb1pg1n.js";
17
+ import"./index-qg0nhcke.js";
18
+ import"./index-9z9g1897.js";
19
+ import"./index-dbcwvc1v.js";
20
+ import"./index-cjapb4hy.js";
21
+ import"./index-wrhf5apg.js";
22
+ import"./index-pt7h91zc.js";
23
+ import"./index-q7sjgr1y.js";
24
+ import"./index-syt8wykh.js";
25
+ import"./index-ptp6d5mm.js";
26
+ import"./index-6b295cas.js";
27
+ import"./index-9nyqt3kb.js";
28
+ import"./index-8jq3jsas.js";
29
+ import"./index-zsrtt42s.js";
30
+ import"./index-3rd7gqfg.js";
31
+ import"./index-98j268bh.js";
32
+ import"./index-4z0zdcd7.js";
33
+ import"./index-g4fs6z4e.js";
34
+ import"./index-ezttvjcf.js";
35
+ import"./index-qj7ewgrf.js";
36
+ import"./index-5v1sqv3m.js";
37
+ import"./index-2s7dvzff.js";
38
+ import"./index-jwkybwv0.js";
39
+ import"./index-bpqw4n2f.js";
40
+ import"./index-rtry5xyf.js";
41
+ import"./index-hq9f7fwf.js";
42
+ import"./index-frcemc0b.js";
43
+ import"./index-0725jpp7.js";
44
+ import"./index-8fnayk3x.js";
45
+ import"./index-ay508kfq.js";
46
+ import"./index-y7s92gte.js";
47
+ import"./index-010en5sq.js";
48
+ import"./index-q9wnbz9q.js";
49
+ import"./index-t46swpqf.js";
50
+ import"./index-ry16d01s.js";
51
+ import"./index-rdm3px0g.js";
52
+ import"./index-7pmbnjvj.js";
53
+ import"./index-92bbwjek.js";
54
+ import"./index-pe1wgpvg.js";
55
+ import"./index-vzm6zre7.js";
56
+ import"./index-ae75rja9.js";
57
+ import"./index-gjrs1epm.js";
58
+ import"./index-c5e1wr7h.js";
59
+ import"./index-6cjpmvpa.js";
60
+ import"./index-t7hmqgjy.js";
61
+ import"./index-w6w6ny06.js";
62
+ import"./index-mc72pk74.js";
63
+ import"./index-c1ggtmpm.js";
64
+ import"./index-ejhxgyvm.js";
65
+ import"./index-7g4c7s5r.js";
66
+ import"./index-m8dry0a6.js";
67
+ import"./index-gx2vp8gx.js";
68
+ import"./index-teyvb5tr.js";
69
+ import"./index-zxdawwc7.js";
70
+ import"./index-nnmgg6z6.js";
71
+ import"./index-48jvqqfa.js";
72
+ import"./index-bk5tah7q.js";
73
+ import"./index-gknz3bv1.js";
74
+ import"./index-zpsr8rpc.js";
75
+ import"./index-wvghb3x6.js";
76
+ import"./index-9rwhas09.js";
77
+ import"./index-zgwm4ryv.js";
78
+ import"./index-a76rekgs.js";
79
+ export {
80
+ createCuratorLLMDelegate
81
+ };