opencode-swarm 7.171.2 → 7.172.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 (124) hide show
  1. package/README.md +5 -0
  2. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  3. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  4. package/dist/background/delegation-lifecycle.d.ts +21 -5
  5. package/dist/background/pending-delegations.d.ts +118 -6
  6. package/dist/cli/ast-diff-f2a1y02y.js +13 -0
  7. package/dist/cli/{coder-settlement-9e696204.js → coder-settlement-0k46xqk2.js} +14 -14
  8. package/dist/cli/{config-doctor-zr748h4m.js → config-doctor-x41bxjp6.js} +6 -6
  9. package/dist/cli/{core-aa3jmzcs.js → core-3spww0at.js} +5 -5
  10. package/dist/cli/{curation-policy-fakrpw5t.js → curation-policy-92qhvewe.js} +7 -7
  11. package/dist/cli/{curator-drift-r9r8gepb.js → curator-drift-fqvxe2zw.js} +8 -8
  12. package/dist/cli/{curator-xgpxtaf1.js → curator-eyz6gg74.js} +45 -45
  13. package/dist/cli/curator-llm-factory-jnsjqq99.js +72 -0
  14. package/dist/cli/{dispatch-hwwj3qrb.js → dispatch-9yqqqfr6.js} +2 -2
  15. package/dist/cli/{evidence-summary-service-5e2323zr.js → evidence-summary-service-kf0vb1hf.js} +22 -22
  16. package/dist/cli/{gate-evidence-5htpsr5y.js → gate-evidence-89wvxgs9.js} +9 -9
  17. package/dist/cli/guardrail-explain-rz4kaqyp.js +73 -0
  18. package/dist/cli/guardrail-log-kfjk62sz.js +23 -0
  19. package/dist/cli/{guardrail-reset-rdqxeqy0.js → guardrail-reset-d8m1h5sz.js} +45 -45
  20. package/dist/cli/hive-promoter-0ekf5zp1.js +87 -0
  21. package/dist/cli/{index-qcy7eg6z.js → index-0y2ygy5f.js} +154 -37
  22. package/dist/cli/{index-aa2eyfvr.js → index-12w05bxk.js} +2 -2
  23. package/dist/cli/{index-95e3a9en.js → index-1s3t3jdc.js} +1 -1
  24. package/dist/cli/{index-f1rj1j8t.js → index-1vsmh63p.js} +2713 -1429
  25. package/dist/cli/{index-gq2zdxep.js → index-25fa4krx.js} +8 -8
  26. package/dist/cli/{index-qdy4a48x.js → index-29j9sjbw.js} +3 -3
  27. package/dist/cli/{index-wfh89qct.js → index-2rdj9mdh.js} +4 -4
  28. package/dist/cli/{index-dsgc303n.js → index-328eg2bb.js} +4 -4
  29. package/dist/cli/{index-nyn01yrz.js → index-34jdempk.js} +2 -2
  30. package/dist/cli/{index-9txyxbqc.js → index-39x78qk0.js} +8 -8
  31. package/dist/cli/{index-5a8q4qr5.js → index-3kqzzwvd.js} +2 -2
  32. package/dist/cli/{index-r60cw2jt.js → index-53ges0rk.js} +7 -7
  33. package/dist/cli/{index-2ryy0cwt.js → index-5hambjmn.js} +6 -6
  34. package/dist/cli/{index-vqb65csb.js → index-63t4m2t5.js} +16 -16
  35. package/dist/cli/{index-0caqxnby.js → index-677gzqmd.js} +1 -1
  36. package/dist/cli/{index-b3pmzbh1.js → index-6fb3y9pm.js} +2 -2
  37. package/dist/cli/{index-e7yv4xw1.js → index-6jshhpjw.js} +3 -3
  38. package/dist/cli/{index-j6rq132j.js → index-7q1m8rsw.js} +7 -7
  39. package/dist/cli/{index-rrc08h4q.js → index-8k09fkqj.js} +5 -5
  40. package/dist/cli/{index-mazy938h.js → index-8wnjcav5.js} +4 -4
  41. package/dist/cli/{index-nbdmdyke.js → index-a2kv054j.js} +1 -1
  42. package/dist/cli/{index-9dz2ee2g.js → index-br3r0y73.js} +67 -47
  43. package/dist/cli/{index-ee6ydtfe.js → index-c1ggtmpm.js} +1 -1
  44. package/dist/cli/{index-evxd1art.js → index-dga9j6s1.js} +2 -2
  45. package/dist/cli/{index-nfs78aqj.js → index-dpb1xs5m.js} +2 -2
  46. package/dist/cli/{index-sxt7fgcw.js → index-ecaws78e.js} +1 -1
  47. package/dist/cli/{index-yqbnsmmv.js → index-efkckdaw.js} +1 -1
  48. package/dist/cli/{index-cw912re7.js → index-fpbcxykc.js} +1 -1
  49. package/dist/cli/{index-3qf1vxtb.js → index-frcemc0b.js} +1 -1
  50. package/dist/cli/{index-bpmtbmy9.js → index-gknz3bv1.js} +1 -1
  51. package/dist/cli/{index-11gz0few.js → index-gmw8a1qa.js} +1 -1
  52. package/dist/cli/{index-5400m33a.js → index-hnvmj9wx.js} +1 -1
  53. package/dist/cli/{index-ph94evsh.js → index-jvg7hvjp.js} +7 -7
  54. package/dist/cli/{index-g6nen3gt.js → index-k441jgzk.js} +1 -1
  55. package/dist/cli/{index-6k5aq7b9.js → index-mj07x42s.js} +2 -2
  56. package/dist/cli/{index-kb66he4e.js → index-nqbmk4b9.js} +1 -1
  57. package/dist/cli/{index-er6sk4e6.js → index-nyrhz1h1.js} +2 -2
  58. package/dist/cli/{index-b43rt5ph.js → index-pt7h91zc.js} +19 -1
  59. package/dist/cli/{ast-diff-b0esr2kf.js → index-qss1s93b.js} +3 -6
  60. package/dist/cli/{index-04ph4jp2.js → index-r08tgb71.js} +2 -2
  61. package/dist/cli/{index-3jcp3zb6.js → index-s723hx7z.js} +2 -2
  62. package/dist/cli/{index-jr6pypmj.js → index-tfmb620d.js} +45 -45
  63. package/dist/cli/{index-7qqwx64h.js → index-v2fge66b.js} +8 -8
  64. package/dist/cli/{index-fhh02gwx.js → index-v6msnkz2.js} +2 -2
  65. package/dist/cli/{index-7hnjs7tf.js → index-w1d5nsdc.js} +2 -2
  66. package/dist/cli/{index-n832052r.js → index-wrt875kh.js} +1 -1
  67. package/dist/cli/{index-9vfp6g53.js → index-xn9tm7sr.js} +47 -47
  68. package/dist/cli/{index-d79q2f8z.js → index-y8y2bjsy.js} +4 -4
  69. package/dist/cli/{semantic-classifier-ygqk0me1.js → index-ykamkw55.js} +2 -5
  70. package/dist/cli/{index-9br68j86.js → index-z2deqhpp.js} +1 -1
  71. package/dist/cli/{index-0yffa3np.js → index-z81mxyhm.js} +5 -5
  72. package/dist/cli/{index-q2yk70rs.js → index-zbw6h4xn.js} +4 -3
  73. package/dist/cli/index.js +53 -47
  74. package/dist/cli/{knowledge-escalator-kn74r5w8.js → knowledge-escalator-qtz01ffw.js} +17 -17
  75. package/dist/cli/{knowledge-events-7gpw741m.js → knowledge-events-8w0mvkzc.js} +15 -15
  76. package/dist/cli/{knowledge-link-vh9pfnb9.js → knowledge-link-3xp7h4xn.js} +6 -6
  77. package/dist/cli/{knowledge-store-3f9kke7z.js → knowledge-store-p5ps09qg.js} +7 -7
  78. package/dist/cli/{knowledge-validator-c2z68v8v.js → knowledge-validator-rc63wfkp.js} +9 -9
  79. package/dist/cli/mcp-pmfg7wpk.js +78 -0
  80. package/dist/cli/mcp.d.ts +27 -0
  81. package/dist/cli/{model-preflight-1ycat9jz.js → model-preflight-2mvdbj0c.js} +1 -1
  82. package/dist/cli/{pending-delegations-d5c07rb7.js → pending-delegations-1sg6g7et.js} +21 -13
  83. package/dist/cli/{pr-subscriptions-krv0jvds.js → pr-subscriptions-yd804apk.js} +13 -13
  84. package/dist/cli/{pr-workflow-gate-hmdht1he.js → pr-workflow-gate-pf3ssffq.js} +45 -45
  85. package/dist/cli/{runner-8m8qhngm.js → runner-rry4z6j2.js} +7 -7
  86. package/dist/cli/{scan-cursor-b57xxs3q.js → scan-cursor-j93ek248.js} +8 -8
  87. package/dist/cli/{schema-r8tv8dqm.js → schema-hvptm5hf.js} +3 -3
  88. package/dist/cli/{scope-persistence-0sc90mpj.js → scope-persistence-3tfvswtk.js} +17 -17
  89. package/dist/cli/semantic-classifier-bjsez0v5.js +8 -0
  90. package/dist/cli/server-rbvx63t6.js +18129 -0
  91. package/dist/cli/{skill-generator-syxa1mxm.js → skill-generator-r9wc6xt1.js} +19 -19
  92. package/dist/cli/snapshot-coordination-init-7w5em40w.js +86 -0
  93. package/dist/cli/{telemetry-0mz37v3h.js → telemetry-vw919tfm.js} +3 -3
  94. package/dist/cli/{workspace-snapshot-hkz2wt1c.js → workspace-snapshot-x54wxr6a.js} +4 -4
  95. package/dist/cli/{worktree-collision-ownership-1tzw8qzp.js → worktree-collision-ownership-yetwf2ch.js} +14 -14
  96. package/dist/cli/{worktree-isolation-ez0e48v3.js → worktree-isolation-sxfj78hv.js} +45 -45
  97. package/dist/hooks/pr-workflow-gate.d.ts +14 -2
  98. package/dist/hooks/pr-workflow-session-resolver.d.ts +45 -0
  99. package/dist/hooks/search-knowledge.d.ts +7 -0
  100. package/dist/index.js +102 -102
  101. package/dist/mcp/adapters/knowledge-memory.d.ts +16 -0
  102. package/dist/mcp/adapters/scope-repo.d.ts +14 -0
  103. package/dist/mcp/adapters/verification.d.ts +20 -0
  104. package/dist/mcp/pipeline.d.ts +25 -0
  105. package/dist/mcp/registry.d.ts +47 -0
  106. package/dist/mcp/server.d.ts +35 -0
  107. package/dist/memory/gateway.d.ts +9 -1
  108. package/dist/observability/catalog.d.ts +4 -3
  109. package/dist/pr-review/completion.d.ts +12 -0
  110. package/dist/telemetry.d.ts +11 -1
  111. package/dist/tools/dispatch-lanes.d.ts +5 -1
  112. package/dist/tools/placeholder-scan.d.ts +10 -0
  113. package/dist/tools/pr-workflow-status.d.ts +6 -0
  114. package/dist/tools/quality-budget.d.ts +10 -0
  115. package/dist/tools/repo-map.d.ts +5 -0
  116. package/dist/tools/sast-scan.d.ts +11 -0
  117. package/dist/tools/swarm-memory-recall.d.ts +12 -0
  118. package/dist/tools/syntax-check.d.ts +12 -1
  119. package/package.json +2 -1
  120. package/dist/cli/curator-llm-factory-nshzhgs4.js +0 -72
  121. package/dist/cli/guardrail-explain-d0h0p73g.js +0 -73
  122. package/dist/cli/guardrail-log-heejmjce.js +0 -23
  123. package/dist/cli/hive-promoter-n262tkm3.js +0 -87
  124. package/dist/cli/snapshot-coordination-init-x18mwxyv.js +0 -86
package/README.md CHANGED
@@ -32,6 +32,11 @@ Most AI coding tools let one model write code and ask that same model whether th
32
32
 
33
33
  ### Key Features
34
34
 
35
+ | Surface | Entry point |
36
+ |---|---|
37
+ | `swarm-implement.yml` gated GitHub Action | `swarm:implement` issue label or workflow_dispatch — runs the implementation pipeline and opens an evidence PR |
38
+
39
+
35
40
  - 🏗️ **Specialized core, optional, and conditional agents** — architect, coder, reviewer, test_engineer, critic, critic_finding_validator, explorer, sme, docs, designer, critic_oversight, critic_sounding_board, critic_drift_verifier, critic_hallucination_verifier, curator_init, curator_phase, council_generalist, council_skeptic, council_domain_expert. Run `/swarm agents` for the live roster — that is the source of truth, not this list.
36
41
  - 🔒 **Gated pipeline** — code never ships without reviewer + test engineer approval
37
42
  - 🔎 **Independent auto-review engine** — bounded whole-diff review in a fresh read-only model session, structured diff-anchored findings, optional independent validation, advisory-by-default phase review, and an evidence-backed opt-in completion gate. v7 remains opt-in; v8's default is pinned to a committed 30-diff cost burn-in.
@@ -20,7 +20,7 @@
20
20
  * while DIAGNOSTIC observations run only on `claimed` (exactly-once-at-emit).
21
21
  */
22
22
  import { type PricingConfig } from '../services/cost-accounting.js';
23
- import { type BackgroundDelegationRecord, type BackgroundDelegationResult, type BackgroundTerminalResult, claimTerminalResult, findByCorrelationId } from './pending-delegations.js';
23
+ import { type BackgroundDelegationRecord, type BackgroundDelegationResult, type BackgroundTerminalResult, claimTerminalResult, findByCorrelationId, findByCorrelationIdDetailed } from './pending-delegations.js';
24
24
  /** Terminal statuses a shared settle may establish (mirrors Task semantics). */
25
25
  export type DelegationTerminalStatus = 'completed' | 'error' | 'cancelled';
26
26
  /**
@@ -31,11 +31,19 @@ export type DelegationTerminalStatus = 'completed' | 'error' | 'cancelled';
31
31
  * or a legacy status-only writer won the race) is a benign outcome that must
32
32
  * not tick the late-terminal audit — the audit belongs to the writer that
33
33
  * owns the conflicting *event*, and there is none.
34
+ *
35
+ * `uncertain` (issue #2511) means the classifying re-read could not establish
36
+ * the store's authoritative state: the record is KNOWN to exist (the claim
37
+ * path raced, not the record), so callers must treat the settle as retryable,
38
+ * never map it onto `missing`/`not_open` handling, and never tear anything
39
+ * down on it.
34
40
  */
35
- export type DelegationSettleKind = 'claimed' | 'duplicate' | 'conflict' | 'already_terminal_without_event' | 'not_open' | 'missing';
41
+ export type DelegationSettleKind = 'claimed' | 'duplicate' | 'conflict' | 'already_terminal_without_event' | 'not_open' | 'missing' | 'uncertain';
36
42
  export interface DelegationSettleOutcome {
37
43
  kind: DelegationSettleKind;
38
44
  record?: BackgroundDelegationRecord;
45
+ /** Present only on `uncertain`: the delegation-store read failure reason. */
46
+ reason?: string;
39
47
  }
40
48
  /**
41
49
  * Settle outcomes that mean "the work item is already durably terminal; the
@@ -90,7 +98,8 @@ export declare function buildDelegationTerminal(record: Pick<BackgroundDelegatio
90
98
  * See {@link DelegationSettleKind} for the non-claim outcomes; callers map
91
99
  * `duplicate`/`conflict`/`already_terminal_without_event` to their benign
92
100
  * already-terminal handling and `missing`/`not_open` to their
93
- * settle-failure diagnostics.
101
+ * settle-failure diagnostics, and `uncertain` to retry-later (the record is
102
+ * not provably absent, so no teardown and no missing-style diagnostic fires).
94
103
  */
95
104
  export declare function settleDelegationTerminal(directory: string, record: BackgroundDelegationRecord, terminal: DelegationTerminalInput, observations?: DelegationObservationInput, now?: number): Promise<DelegationSettleOutcome>;
96
105
  /**
@@ -182,18 +191,25 @@ export interface RecoverTerminalLaneReceiptsOptions {
182
191
  */
183
192
  export declare function recoverTerminalLaneReceipts(directory: string, records?: readonly BackgroundDelegationRecord[], options?: RecoverTerminalLaneReceiptsOptions): Promise<TerminalLaneReceiptRecoveryResult>;
184
193
  /**
185
- * Test seam (repo convention): the telemetry sink and the claim are injectable
186
- * so tests can stub them without `mock.module`.
194
+ * Test seam (repo convention): the telemetry sink, the claim, and the
195
+ * classifying re-read are injectable so tests can stub them without
196
+ * `mock.module`.
187
197
  */
188
198
  export declare const _internals: {
189
199
  claimTerminalResult: typeof claimTerminalResult;
190
200
  findByCorrelationId: typeof findByCorrelationId;
201
+ findByCorrelationIdDetailed: typeof findByCorrelationIdDetailed;
191
202
  telemetry: {
192
203
  sessionStarted(sessionId: string, agentName: string): void;
193
204
  sessionEnded(sessionId: string, reason: string): void;
194
205
  agentActivated(sessionId: string, agentName: string, oldName?: string): void;
195
206
  delegationBegin(sessionId: string, agentName: string, taskId: string): void;
196
207
  delegationEnd(sessionId: string, agentName: string, taskId: string, result: string, costFields?: Partial<import("../services/cost-accounting.js").DelegationCostFields>): void;
208
+ delegationReadUncertain(event: {
209
+ attempt: number;
210
+ reasonCode: string;
211
+ source: string;
212
+ }): void;
197
213
  taskStateChanged(sessionId: string, taskId: string, newState: string, oldState?: string): void;
198
214
  gatePassed(sessionId: string, gate: string, taskId: string): void;
199
215
  gateParseError(taskId: string, error: Error): void;
@@ -464,15 +464,64 @@ export interface CompactBackgroundDelegationsResult {
464
464
  export declare function compactBackgroundDelegations(directory: string, options?: {
465
465
  force?: boolean;
466
466
  }): Promise<CompactBackgroundDelegationsResult>;
467
+ /**
468
+ * Bounded retry budget for advisory delegation reads (issue #2511): after a
469
+ * first uncertain attempt the reader waits this long and re-attempts exactly
470
+ * once, so the total budget stays at two attempts plus at most this delay
471
+ * (~25 ms beyond a single read). Retry state is per-invocation only.
472
+ */
473
+ export declare const DELEGATION_READ_RETRY_DELAY_MS = 25;
474
+ /**
475
+ * Epistemic advisory-read result (issue #2511). `ok` covers both a loaded and
476
+ * a healthy-empty store (empty `records` is a KNOWN-absent answer); `uncertain`
477
+ * means the authoritative state could not be established — never read as
478
+ * absence. Mirrors `RecoveryOwnershipScanResult` and the #2199
479
+ * `readTaskEvidenceState` discriminated-reader precedent.
480
+ */
481
+ export type DelegationReadOutcome = {
482
+ status: 'ok';
483
+ records: BackgroundDelegationRecord[];
484
+ source: 'coordination' | 'legacy-ledger' | 'checkpoint+tail' | 'checkpoint+ledger-suffix';
485
+ } | {
486
+ status: 'uncertain';
487
+ reason: string;
488
+ source: 'coordination-import' | 'coordination-read' | 'fold';
489
+ repairHint?: string;
490
+ attempts: number;
491
+ };
492
+ /**
493
+ * Advisory delegation-store read that preserves epistemic state (issue #2511).
494
+ *
495
+ * Lock-free, defensive, never throws. One attempt = the exact composite the
496
+ * legacy array reader used (coordination gate -> SQLite rows -> folded
497
+ * checkpoint/ledger); an explicitly uncertain load retries exactly once within
498
+ * the documented budget (DELEGATION_READ_RETRY_DELAY_MS), and a second failure
499
+ * stays typed uncertainty: the durable health artifact records the last-known
500
+ * evidence as stale (never as current proof) and one bounded
501
+ * `delegation_read_uncertain` telemetry signal is emitted with the attempt
502
+ * count. Retry-success returns the ok outcome with no telemetry.
503
+ *
504
+ * Consumers making decisions (gate settlement, completion coverage, collect,
505
+ * duplicate-batch admission, receipt ownership) MUST consume this outcome and
506
+ * propagate uncertainty; `[]` from the legacy wrapper below is reserved for
507
+ * audited maintenance safe-skips.
508
+ */
509
+ export declare function readDelegationsDetailed(directory: string): DelegationReadOutcome;
467
510
  /**
468
511
  * Read and fold the store to the latest snapshot per correlationId. Lock-free and
469
512
  * defensive: a missing file yields an empty list, and malformed/partial lines are
470
513
  * skipped (never throws). Records are returned in first-seen correlationId order.
471
514
  *
472
515
  * Checkpoint-aware (issue #2034): when a published checkpoint exists, the fold is
473
- * checkpoint summaries + the bounded transition tail. When the authoritative
474
- * state is uncertain (invalid checkpoint/manifest with a rolled tail), this
475
- * returns [] the strict recovery scan is the fail-closed authority.
516
+ * checkpoint summaries + the bounded transition tail.
517
+ *
518
+ * MAINTENANCE-READ CONVENIENCE (issue #2511): an explicitly uncertain
519
+ * authoritative state also yields [] here. That is an audited safe-skip for
520
+ * maintenance callers only (findOpenAsyncLaneBatches,
521
+ * reconcileLegacyCoderSettlements, recoverTerminalLaneReceipts) — decision
522
+ * paths must call `readDelegationsDetailed` and propagate the typed
523
+ * uncertainty instead of reading absence as fact. The strict recovery scan
524
+ * (`scanDelegationsForRecovery`) remains the fail-closed authority.
476
525
  *
477
526
  * Cost: O(checkpoint + tail lines) per call. The tail is bounded by the
478
527
  * compaction high-water mark in normal operation.
@@ -487,7 +536,28 @@ export declare function readDelegations(directory: string): BackgroundDelegation
487
536
  * callers depend on it.
488
537
  */
489
538
  export declare function scanDelegationsForRecovery(directory: string): RecoveryOwnershipScanResult<BackgroundDelegationRecord>;
490
- /** Returns the folded record for a correlationId, or null. Lock-free read. */
539
+ /** Typed single-lookup result (issue #2511): a found/absent answer, or typed uncertainty. */
540
+ export type DelegationLookupOutcome<T> = {
541
+ status: 'ok';
542
+ value: T;
543
+ } | {
544
+ status: 'uncertain';
545
+ reason: string;
546
+ source: 'coordination-import' | 'coordination-read' | 'fold';
547
+ repairHint?: string;
548
+ attempts: number;
549
+ };
550
+ /**
551
+ * Exact-child lookup preserving epistemic state (issue #2511): `ok` with a
552
+ * record or `null` (genuinely absent), or `uncertain` when the store read
553
+ * failed — decision callers must not read that as absence.
554
+ */
555
+ export declare function findByCorrelationIdDetailed(directory: string, correlationId: string): DelegationLookupOutcome<BackgroundDelegationRecord | null>;
556
+ /**
557
+ * Returns the folded record for a correlationId, or null. Lock-free read.
558
+ * Maintenance convenience (issue #2511): an uncertain store yields null —
559
+ * decision paths must use `findByCorrelationIdDetailed`.
560
+ */
491
561
  export declare function findByCorrelationId(directory: string, correlationId: string): BackgroundDelegationRecord | null;
492
562
  export interface RecordPendingInput {
493
563
  correlationId: string;
@@ -654,6 +724,12 @@ export declare function registerLegacyCoderSettlementReconciler(directory: strin
654
724
  declare function getLegacyCoderSettlementReconciler(directory: string): LegacyCoderSettlementReconciler | undefined;
655
725
  /** Test-only seam for the bounded legacy-settlement reconciler registry. */
656
726
  export declare const _internals: {
727
+ readRetryDelayMs: number;
728
+ /** Test-only seam for the delegation_read_uncertain emit registry. */
729
+ delegationReadUncertainEmitCooldownMs: number;
730
+ resetDelegationReadUncertainRegistry: () => void;
731
+ delegationReadUncertainEmitOrderSnapshot: () => string[];
732
+ delegationReadUncertainCooldownsSnapshot: () => Map<string, number>;
657
733
  getLegacyCoderSettlementReconciler: typeof getLegacyCoderSettlementReconciler;
658
734
  readFallbackDirectory: typeof readFallbackDirectory;
659
735
  getLegacyCoderSettlementReconcilerOrder: () => string[];
@@ -720,9 +796,29 @@ export declare function preparePendingBackgroundAdvisories(directory: string, pa
720
796
  */
721
797
  export declare function acknowledgeObservedBackgroundAdvisories(directory: string, parentSessionId: string, observedTexts: readonly string[]): Promise<number>;
722
798
  export declare function releasePreparedBackgroundAdvisories(directory: string, parentSessionId: string, preparationId: string, eventIds: readonly string[]): Promise<boolean>;
799
+ /**
800
+ * Batch lookup preserving epistemic state (issue #2511): `ok` with the batch's
801
+ * records (possibly empty — a KNOWN-absent answer), or `uncertain` when the
802
+ * store read failed. Decision callers (terminal/coverage/inventory paths) must
803
+ * propagate uncertainty rather than treating an unreadable store as an empty
804
+ * batch.
805
+ */
806
+ export declare function findByBatchIdDetailed(directory: string, batchId: string, opts?: {
807
+ parentSessionId?: string;
808
+ }): DelegationLookupOutcome<BackgroundDelegationRecord[]>;
809
+ /**
810
+ * Maintenance convenience over {@link findByBatchIdDetailed} (issue #2511): an
811
+ * uncertain store yields [] — safe only for audited maintenance callers.
812
+ */
723
813
  export declare function findByBatchId(directory: string, batchId: string, opts?: {
724
814
  parentSessionId?: string;
725
815
  }): BackgroundDelegationRecord[];
816
+ /**
817
+ * Lane-knowledge maintenance pass (issue #2511 audited SAFE-SKIP): an
818
+ * uncertain store intentionally yields [] — this enumeration is re-run on
819
+ * every call, so a transiently unreadable store only delays maintenance and
820
+ * never feeds a decision that treats absence as fact.
821
+ */
726
822
  export declare function findOpenAsyncLaneBatches(directory: string): BackgroundDelegationRecord[];
727
823
  /**
728
824
  * Public alias of the internal terminal predicate so shared lifecycle callers
@@ -801,8 +897,24 @@ export interface CompletionDelegationLookup {
801
897
  record: BackgroundDelegationRecord;
802
898
  fallback?: BackgroundDelegationFallbackArtifact;
803
899
  }
804
- /** Lookup used by terminal handling: primary ledger first, exact fallback second. */
805
- export declare function findDelegationForCompletion(directory: string, correlationId: string): Promise<CompletionDelegationLookup | null>;
900
+ /**
901
+ * Issue #2511: the primary ledger read stayed uncertain. `record` is null
902
+ * consumers must check `source === 'uncertain'` (or `'uncertain' in lookup`)
903
+ * BEFORE the no-owner branch and defer terminal ingestion instead of treating
904
+ * the trusted receipt as unowned.
905
+ */
906
+ export type CompletionDelegationLookupResult = CompletionDelegationLookup | {
907
+ source: 'uncertain';
908
+ record: null;
909
+ uncertain: string;
910
+ };
911
+ /**
912
+ * Lookup used by terminal handling: primary ledger first, exact fallback
913
+ * second. Issue #2511: an uncertain primary read is returned typed — the
914
+ * fallback file is deliberately NOT consulted then, because a durable primary
915
+ * owner would make the fallback irrelevant and the defer must stand.
916
+ */
917
+ export declare function findDelegationForCompletion(directory: string, correlationId: string): Promise<CompletionDelegationLookupResult | null>;
806
918
  /**
807
919
  * Promote one exact fallback into the append-only primary ledger, then remove it.
808
920
  * A conflicting primary identity fails closed and leaves the fallback untouched.
@@ -0,0 +1,13 @@
1
+ // @bun
2
+ import {
3
+ computeASTDiff
4
+ } from "./index-qss1s93b.js";
5
+ import"./index-r9wnyq0v.js";
6
+ import"./index-7ryh498h.js";
7
+ import"./index-pt7h91zc.js";
8
+ import"./index-q7sjgr1y.js";
9
+ import"./index-zgwm4ryv.js";
10
+ import"./index-a76rekgs.js";
11
+ export {
12
+ computeASTDiff
13
+ };
@@ -13,25 +13,25 @@ import {
13
13
  releaseCoderDispatchOwnership,
14
14
  settleCoderDispatch,
15
15
  transferCoderSettlementToBackground
16
- } from "./index-gq2zdxep.js";
17
- import"./index-fhh02gwx.js";
18
- import"./index-nyn01yrz.js";
19
- import"./index-rrc08h4q.js";
20
- import"./index-mazy938h.js";
21
- import"./index-b3pmzbh1.js";
16
+ } from "./index-25fa4krx.js";
17
+ import"./index-v6msnkz2.js";
18
+ import"./index-34jdempk.js";
19
+ import"./index-8k09fkqj.js";
20
+ import"./index-8wnjcav5.js";
21
+ import"./index-6fb3y9pm.js";
22
22
  import"./index-2s7dvzff.js";
23
- import"./index-6k5aq7b9.js";
24
- import"./index-nfs78aqj.js";
25
- import"./index-evxd1art.js";
23
+ import"./index-mj07x42s.js";
24
+ import"./index-dpb1xs5m.js";
25
+ import"./index-dga9j6s1.js";
26
26
  import"./index-7g4c7s5r.js";
27
- import"./index-9dz2ee2g.js";
28
- import"./index-nbdmdyke.js";
27
+ import"./index-br3r0y73.js";
28
+ import"./index-a2kv054j.js";
29
29
  import"./index-1xnse449.js";
30
- import"./index-ee6ydtfe.js";
30
+ import"./index-c1ggtmpm.js";
31
31
  import"./index-0mhftbpp.js";
32
32
  import"./index-a1w58b47.js";
33
- import"./index-sxt7fgcw.js";
34
- import"./index-bpmtbmy9.js";
33
+ import"./index-ecaws78e.js";
34
+ import"./index-gknz3bv1.js";
35
35
  import"./index-zpsr8rpc.js";
36
36
  import"./index-yzjaj53h.js";
37
37
  import"./index-zgwm4ryv.js";
@@ -14,14 +14,14 @@ import {
14
14
  shouldRunOnStartup,
15
15
  writeBackupArtifact,
16
16
  writeDoctorArtifact
17
- } from "./index-qdy4a48x.js";
18
- import"./index-cw912re7.js";
17
+ } from "./index-29j9sjbw.js";
18
+ import"./index-fpbcxykc.js";
19
19
  import"./index-ry16d01s.js";
20
- import"./index-ee6ydtfe.js";
21
- import"./index-q2yk70rs.js";
22
- import"./index-sxt7fgcw.js";
20
+ import"./index-c1ggtmpm.js";
21
+ import"./index-zbw6h4xn.js";
22
+ import"./index-ecaws78e.js";
23
23
  import"./index-bk5tah7q.js";
24
- import"./index-bpmtbmy9.js";
24
+ import"./index-gknz3bv1.js";
25
25
  import"./index-zpsr8rpc.js";
26
26
  import"./index-zgwm4ryv.js";
27
27
  import"./index-a76rekgs.js";
@@ -14,15 +14,15 @@ import {
14
14
  resolveWorktreeBaseDir,
15
15
  shortenWorktreePath,
16
16
  writeLaneProfileToDiskReal
17
- } from "./index-mazy938h.js";
18
- import"./index-b3pmzbh1.js";
17
+ } from "./index-8wnjcav5.js";
18
+ import"./index-6fb3y9pm.js";
19
19
  import"./index-2s7dvzff.js";
20
- import"./index-nbdmdyke.js";
20
+ import"./index-a2kv054j.js";
21
21
  import"./index-1xnse449.js";
22
- import"./index-ee6ydtfe.js";
22
+ import"./index-c1ggtmpm.js";
23
23
  import"./index-0mhftbpp.js";
24
24
  import"./index-a1w58b47.js";
25
- import"./index-sxt7fgcw.js";
25
+ import"./index-ecaws78e.js";
26
26
  import"./index-zpsr8rpc.js";
27
27
  import"./index-zgwm4ryv.js";
28
28
  import"./index-a76rekgs.js";
@@ -5,17 +5,17 @@ import {
5
5
  authorizeCuration,
6
6
  buildConfigFingerprintInput,
7
7
  readCohortConfigFingerprint
8
- } from "./index-0caqxnby.js";
8
+ } from "./index-677gzqmd.js";
9
9
  import"./index-rtry5xyf.js";
10
10
  import"./index-vzm6zre7.js";
11
- import"./index-95e3a9en.js";
12
- import"./index-evxd1art.js";
11
+ import"./index-1s3t3jdc.js";
12
+ import"./index-dga9j6s1.js";
13
13
  import"./index-7g4c7s5r.js";
14
- import"./index-9dz2ee2g.js";
15
- import"./index-nbdmdyke.js";
14
+ import"./index-br3r0y73.js";
15
+ import"./index-a2kv054j.js";
16
16
  import"./index-1xnse449.js";
17
- import"./index-ee6ydtfe.js";
18
- import"./index-bpmtbmy9.js";
17
+ import"./index-c1ggtmpm.js";
18
+ import"./index-gknz3bv1.js";
19
19
  import"./index-zpsr8rpc.js";
20
20
  import"./index-zgwm4ryv.js";
21
21
  import"./index-a76rekgs.js";
@@ -4,27 +4,27 @@ import {
4
4
  getGlobalEventBus,
5
5
  getGroupCommitWriter,
6
6
  importLegacyJsonFiles
7
- } from "./index-kb66he4e.js";
7
+ } from "./index-nqbmk4b9.js";
8
8
  import {
9
9
  readEffectiveSpecSync
10
- } from "./index-9br68j86.js";
10
+ } from "./index-z2deqhpp.js";
11
11
  import {
12
12
  readSwarmFileAsync
13
- } from "./index-b3pmzbh1.js";
13
+ } from "./index-6fb3y9pm.js";
14
14
  import"./index-2s7dvzff.js";
15
- import"./index-n832052r.js";
15
+ import"./index-wrt875kh.js";
16
16
  import {
17
17
  DURABILITY_CLASSES,
18
18
  getProjectDb,
19
19
  projectDbExists
20
- } from "./index-yqbnsmmv.js";
20
+ } from "./index-efkckdaw.js";
21
21
  import"./index-rdm3px0g.js";
22
22
  import"./index-ry16d01s.js";
23
- import"./index-nbdmdyke.js";
23
+ import"./index-a2kv054j.js";
24
24
  import"./index-1xnse449.js";
25
- import"./index-ee6ydtfe.js";
25
+ import"./index-c1ggtmpm.js";
26
26
  import"./index-a1w58b47.js";
27
- import"./index-bpmtbmy9.js";
27
+ import"./index-gknz3bv1.js";
28
28
  import"./index-zpsr8rpc.js";
29
29
  import {
30
30
  init_logger,
@@ -14,67 +14,67 @@ import {
14
14
  runCuratorInit,
15
15
  runCuratorPhase,
16
16
  writeCuratorSummary
17
- } from "./index-f1rj1j8t.js";
18
- import"./index-5400m33a.js";
19
- import"./index-er6sk4e6.js";
20
- import"./index-dsgc303n.js";
21
- import"./index-kb66he4e.js";
22
- import"./index-qdy4a48x.js";
23
- import"./index-vqb65csb.js";
24
- import"./index-3jcp3zb6.js";
17
+ } from "./index-1vsmh63p.js";
18
+ import"./index-hnvmj9wx.js";
19
+ import"./index-nyrhz1h1.js";
20
+ import"./index-328eg2bb.js";
21
+ import"./index-nqbmk4b9.js";
22
+ import"./index-29j9sjbw.js";
23
+ import"./index-63t4m2t5.js";
24
+ import"./index-s723hx7z.js";
25
25
  import"./index-txdagbh7.js";
26
- import"./index-9br68j86.js";
27
- import"./index-cw912re7.js";
28
- import"./index-d79q2f8z.js";
29
- import"./index-0yffa3np.js";
30
- import"./index-04ph4jp2.js";
26
+ import"./index-z2deqhpp.js";
27
+ import"./index-fpbcxykc.js";
28
+ import"./index-y8y2bjsy.js";
29
+ import"./index-z81mxyhm.js";
30
+ import"./index-r08tgb71.js";
31
31
  import"./index-fyfbpz4f.js";
32
- import"./index-7qqwx64h.js";
32
+ import"./index-v2fge66b.js";
33
33
  import"./index-0hgmsyfp.js";
34
34
  import"./index-zsrtt42s.js";
35
- import"./index-gq2zdxep.js";
36
- import"./index-fhh02gwx.js";
37
- import"./index-nyn01yrz.js";
38
- import"./index-b43rt5ph.js";
35
+ import"./index-25fa4krx.js";
36
+ import"./index-v6msnkz2.js";
37
+ import"./index-34jdempk.js";
38
+ import"./index-pt7h91zc.js";
39
39
  import"./index-q7sjgr1y.js";
40
- import"./index-rrc08h4q.js";
41
- import"./index-mazy938h.js";
42
- import"./index-qcy7eg6z.js";
43
- import"./index-9txyxbqc.js";
44
- import"./index-b3pmzbh1.js";
40
+ import"./index-8k09fkqj.js";
41
+ import"./index-8wnjcav5.js";
42
+ import"./index-0y2ygy5f.js";
43
+ import"./index-39x78qk0.js";
44
+ import"./index-6fb3y9pm.js";
45
45
  import"./index-2s7dvzff.js";
46
- import"./index-wfh89qct.js";
47
- import"./index-0caqxnby.js";
46
+ import"./index-2rdj9mdh.js";
47
+ import"./index-677gzqmd.js";
48
48
  import"./index-rtry5xyf.js";
49
- import"./index-e7yv4xw1.js";
50
- import"./index-3qf1vxtb.js";
51
- import"./index-n832052r.js";
52
- import"./index-j6rq132j.js";
53
- import"./index-2ryy0cwt.js";
54
- import"./index-6k5aq7b9.js";
55
- import"./index-aa2eyfvr.js";
56
- import"./index-g6nen3gt.js";
57
- import"./index-yqbnsmmv.js";
49
+ import"./index-6jshhpjw.js";
50
+ import"./index-frcemc0b.js";
51
+ import"./index-wrt875kh.js";
52
+ import"./index-7q1m8rsw.js";
53
+ import"./index-5hambjmn.js";
54
+ import"./index-mj07x42s.js";
55
+ import"./index-12w05bxk.js";
56
+ import"./index-k441jgzk.js";
57
+ import"./index-efkckdaw.js";
58
58
  import"./index-rdm3px0g.js";
59
59
  import"./index-ry16d01s.js";
60
- import"./index-nfs78aqj.js";
61
- import"./index-r60cw2jt.js";
60
+ import"./index-dpb1xs5m.js";
61
+ import"./index-53ges0rk.js";
62
62
  import"./index-vzm6zre7.js";
63
63
  import"./index-ae75rja9.js";
64
- import"./index-95e3a9en.js";
65
- import"./index-evxd1art.js";
64
+ import"./index-1s3t3jdc.js";
65
+ import"./index-dga9j6s1.js";
66
66
  import"./index-7g4c7s5r.js";
67
- import"./index-9dz2ee2g.js";
68
- import"./index-nbdmdyke.js";
67
+ import"./index-br3r0y73.js";
68
+ import"./index-a2kv054j.js";
69
69
  import"./index-1xnse449.js";
70
- import"./index-ee6ydtfe.js";
71
- import"./index-5a8q4qr5.js";
70
+ import"./index-c1ggtmpm.js";
71
+ import"./index-3kqzzwvd.js";
72
72
  import"./index-0mhftbpp.js";
73
73
  import"./index-a1w58b47.js";
74
- import"./index-q2yk70rs.js";
75
- import"./index-sxt7fgcw.js";
74
+ import"./index-zbw6h4xn.js";
75
+ import"./index-ecaws78e.js";
76
76
  import"./index-bk5tah7q.js";
77
- import"./index-bpmtbmy9.js";
77
+ import"./index-gknz3bv1.js";
78
78
  import"./index-zpsr8rpc.js";
79
79
  import"./index-76qm2c2y.js";
80
80
  import"./index-yzjaj53h.js";
@@ -0,0 +1,72 @@
1
+ // @bun
2
+ import {
3
+ createCuratorLLMDelegate
4
+ } from "./index-1vsmh63p.js";
5
+ import"./index-hnvmj9wx.js";
6
+ import"./index-nyrhz1h1.js";
7
+ import"./index-328eg2bb.js";
8
+ import"./index-nqbmk4b9.js";
9
+ import"./index-29j9sjbw.js";
10
+ import"./index-63t4m2t5.js";
11
+ import"./index-s723hx7z.js";
12
+ import"./index-txdagbh7.js";
13
+ import"./index-z2deqhpp.js";
14
+ import"./index-fpbcxykc.js";
15
+ import"./index-y8y2bjsy.js";
16
+ import"./index-z81mxyhm.js";
17
+ import"./index-r08tgb71.js";
18
+ import"./index-fyfbpz4f.js";
19
+ import"./index-v2fge66b.js";
20
+ import"./index-0hgmsyfp.js";
21
+ import"./index-zsrtt42s.js";
22
+ import"./index-25fa4krx.js";
23
+ import"./index-v6msnkz2.js";
24
+ import"./index-34jdempk.js";
25
+ import"./index-pt7h91zc.js";
26
+ import"./index-q7sjgr1y.js";
27
+ import"./index-8k09fkqj.js";
28
+ import"./index-8wnjcav5.js";
29
+ import"./index-0y2ygy5f.js";
30
+ import"./index-39x78qk0.js";
31
+ import"./index-6fb3y9pm.js";
32
+ import"./index-2s7dvzff.js";
33
+ import"./index-2rdj9mdh.js";
34
+ import"./index-677gzqmd.js";
35
+ import"./index-rtry5xyf.js";
36
+ import"./index-6jshhpjw.js";
37
+ import"./index-frcemc0b.js";
38
+ import"./index-wrt875kh.js";
39
+ import"./index-7q1m8rsw.js";
40
+ import"./index-5hambjmn.js";
41
+ import"./index-mj07x42s.js";
42
+ import"./index-12w05bxk.js";
43
+ import"./index-k441jgzk.js";
44
+ import"./index-efkckdaw.js";
45
+ import"./index-rdm3px0g.js";
46
+ import"./index-ry16d01s.js";
47
+ import"./index-dpb1xs5m.js";
48
+ import"./index-53ges0rk.js";
49
+ import"./index-vzm6zre7.js";
50
+ import"./index-ae75rja9.js";
51
+ import"./index-1s3t3jdc.js";
52
+ import"./index-dga9j6s1.js";
53
+ import"./index-7g4c7s5r.js";
54
+ import"./index-br3r0y73.js";
55
+ import"./index-a2kv054j.js";
56
+ import"./index-1xnse449.js";
57
+ import"./index-c1ggtmpm.js";
58
+ import"./index-3kqzzwvd.js";
59
+ import"./index-0mhftbpp.js";
60
+ import"./index-a1w58b47.js";
61
+ import"./index-zbw6h4xn.js";
62
+ import"./index-ecaws78e.js";
63
+ import"./index-bk5tah7q.js";
64
+ import"./index-gknz3bv1.js";
65
+ import"./index-zpsr8rpc.js";
66
+ import"./index-76qm2c2y.js";
67
+ import"./index-yzjaj53h.js";
68
+ import"./index-zgwm4ryv.js";
69
+ import"./index-a76rekgs.js";
70
+ export {
71
+ createCuratorLLMDelegate
72
+ };
@@ -11,13 +11,13 @@ import {
11
11
  defaultTestFilesFor,
12
12
  detectProjectLanguages,
13
13
  tokenizeCommand
14
- } from "./index-5400m33a.js";
14
+ } from "./index-hnvmj9wx.js";
15
15
  import"./index-2s7dvzff.js";
16
16
  import {
17
17
  canonicalRootKeyFreshAsync,
18
18
  canonicalRootKeyLexical
19
19
  } from "./index-1xnse449.js";
20
- import"./index-ee6ydtfe.js";
20
+ import"./index-c1ggtmpm.js";
21
21
  import"./index-zpsr8rpc.js";
22
22
  import"./index-zgwm4ryv.js";
23
23
  import"./index-a76rekgs.js";