opencode-swarm 7.149.0 → 7.149.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 (70) hide show
  1. package/dist/background/candidate-contract.d.ts +1 -1
  2. package/dist/background/pending-delegations.d.ts +6 -0
  3. package/dist/background/pr-review-contract.d.ts +20 -0
  4. package/dist/cli/{config-doctor-fx8d6pma.js → config-doctor-d3nsq1nz.js} +2 -2
  5. package/dist/cli/{core-0v762txd.js → core-y9d858n6.js} +1 -1
  6. package/dist/cli/{curation-policy-4jxx3ey4.js → curation-policy-nck9g765.js} +6 -6
  7. package/dist/cli/{curator-6w4frzdz.js → curator-f5m0hh2p.js} +28 -28
  8. package/dist/cli/{curator-llm-factory-8fstpeqh.js → curator-llm-factory-mzh9ns5s.js} +28 -28
  9. package/dist/cli/{evidence-summary-service-x00z38n2.js → evidence-summary-service-601x7ne7.js} +12 -12
  10. package/dist/cli/{gate-evidence-ejdek2td.js → gate-evidence-kjs9vsx9.js} +6 -6
  11. package/dist/cli/{guardrail-explain-nynjhbzk.js → guardrail-explain-j291sss5.js} +29 -29
  12. package/dist/cli/{guardrail-log-6bktj08e.js → guardrail-log-1jykfrqc.js} +5 -5
  13. package/dist/cli/{guardrail-reset-hsfd5ykq.js → guardrail-reset-tr07m077.js} +28 -28
  14. package/dist/cli/{hive-promoter-32artf8c.js → hive-promoter-162ws6xp.js} +28 -28
  15. package/dist/cli/{index-6thxr1q7.js → index-1aztaa2s.js} +3 -3
  16. package/dist/cli/{index-xdp0bx28.js → index-38ema5k2.js} +2 -2
  17. package/dist/cli/{index-bmaz2yy4.js → index-4sdhbxgq.js} +1 -1
  18. package/dist/cli/{index-ef0wracg.js → index-5gntxwxt.js} +5 -5
  19. package/dist/cli/{index-8yan955h.js → index-64d17yd0.js} +2 -2
  20. package/dist/cli/{index-bcfcekx9.js → index-7m8rk72d.js} +287 -78
  21. package/dist/cli/{index-cfvbd3dg.js → index-apwcvfjt.js} +2 -2
  22. package/dist/cli/{index-wsar7d91.js → index-cna8m7my.js} +1 -1
  23. package/dist/cli/{index-q8e2yd98.js → index-cqhf7fkw.js} +1 -1
  24. package/dist/cli/{index-42habrdv.js → index-dkrz1vv5.js} +4 -4
  25. package/dist/cli/{index-ame8ek9g.js → index-dtmgt2xn.js} +5 -5
  26. package/dist/cli/{index-zkcwan96.js → index-eaq9b0qm.js} +1 -1
  27. package/dist/cli/{index-kb1p6dpx.js → index-ekvs3ade.js} +7 -7
  28. package/dist/cli/{index-c83bztkp.js → index-exn0ztsv.js} +1 -1
  29. package/dist/cli/{index-ka2vav7t.js → index-f53yyerg.js} +30 -30
  30. package/dist/cli/{index-79pwr8hc.js → index-fc4x86sy.js} +5 -5
  31. package/dist/cli/{index-s7t2c9jd.js → index-hxbrsb40.js} +2 -2
  32. package/dist/cli/{index-c1h0rdkr.js → index-jb9tb1sd.js} +1 -1
  33. package/dist/cli/{index-5q5ws00e.js → index-jg2gwzvq.js} +4 -4
  34. package/dist/cli/{index-wbz365gn.js → index-k2sm9677.js} +1 -1
  35. package/dist/cli/{index-ccyve4pb.js → index-kgk65rde.js} +1 -1
  36. package/dist/cli/{index-a90c1gtn.js → index-m8dn0qnm.js} +1 -1
  37. package/dist/cli/{index-01q7mb83.js → index-mdwtj4xm.js} +6 -6
  38. package/dist/cli/{index-vfv4vnnc.js → index-n99s022c.js} +1 -1
  39. package/dist/cli/{index-41n0thtd.js → index-pf22x0dr.js} +2 -1
  40. package/dist/cli/{index-z6471b7r.js → index-prxrmc3b.js} +2 -2
  41. package/dist/cli/{index-8hkxm9mh.js → index-srwp8fs7.js} +4 -4
  42. package/dist/cli/{index-mza55jmc.js → index-t994f8fp.js} +1 -1
  43. package/dist/cli/{index-n6jykega.js → index-vy6q9d8j.js} +3 -2
  44. package/dist/cli/{index-pgfn8h50.js → index-xe83cwvn.js} +7 -7
  45. package/dist/cli/{index-wj0gnab0.js → index-xggpmtfx.js} +1 -1
  46. package/dist/cli/{index-hbhw2qd7.js → index-yjj3s8af.js} +3 -3
  47. package/dist/cli/index.js +28 -28
  48. package/dist/cli/{knowledge-escalator-ty2kesdj.js → knowledge-escalator-whkxxgxj.js} +11 -11
  49. package/dist/cli/{knowledge-events-x3rd7r3j.js → knowledge-events-rnqzt87h.js} +9 -9
  50. package/dist/cli/{knowledge-link-a5f89833.js → knowledge-link-mzn8x0qd.js} +5 -5
  51. package/dist/cli/{knowledge-store-zsz4dxjq.js → knowledge-store-7de59rnz.js} +6 -6
  52. package/dist/cli/{knowledge-validator-bdhgkw9f.js → knowledge-validator-bpk17jf4.js} +8 -8
  53. package/dist/cli/{pending-delegations-aez8ebdr.js → pending-delegations-qzy6rnvw.js} +3 -3
  54. package/dist/cli/{pr-subscriptions-cpnwvc6y.js → pr-subscriptions-q862pvz1.js} +3 -3
  55. package/dist/cli/{runner-9mnkfjw7.js → runner-1aygs98c.js} +6 -6
  56. package/dist/cli/{scan-cursor-3ba1spad.js → scan-cursor-0p51fh61.js} +7 -7
  57. package/dist/cli/{schema-h251vmd1.js → schema-8g2nxhjf.js} +1 -1
  58. package/dist/cli/{scope-persistence-h1b31ba2.js → scope-persistence-hhkr0c46.js} +8 -8
  59. package/dist/cli/{skill-generator-esrn40th.js → skill-generator-pk9gcz7r.js} +13 -13
  60. package/dist/cli/{telemetry-jtq6px7k.js → telemetry-5deacb7w.js} +1 -1
  61. package/dist/cli/{worktree-collision-ownership-r8j31h06.js → worktree-collision-ownership-9v8e0dz7.js} +3 -3
  62. package/dist/cli/{worktree-isolation-pbr4d5m9.js → worktree-isolation-1hwwfbdw.js} +28 -28
  63. package/dist/failures/invocation-failure.d.ts +7 -0
  64. package/dist/hooks/pr-workflow-gate.d.ts +37 -6
  65. package/dist/index.js +33 -30
  66. package/dist/services/session-reflection.d.ts +7 -0
  67. package/dist/state.d.ts +10 -0
  68. package/dist/tools/dispatch-lanes.d.ts +50 -1
  69. package/dist/tools/write-pr-review-artifact.d.ts +2 -0
  70. package/package.json +2 -1
@@ -2,7 +2,7 @@ import * as fsp from 'node:fs/promises';
2
2
  import { z } from 'zod';
3
3
  import { type CandidateSeverity, type FindingsSeverity, type RowFormatFamily } from '../background/candidate-contract.js';
4
4
  import { type LaneOutputArtifact } from '../background/lane-output-store.js';
5
- import { type BackgroundDelegationRecord, type BackgroundDelegationResult, type BackgroundDelegationWorkflowLaneRecovery, findByBatchId, sweepStaleDelegations } from '../background/pending-delegations.js';
5
+ import { type BackgroundDelegationRecord, type BackgroundDelegationResult, type BackgroundDelegationWorkflowLaneFailureClass, type BackgroundDelegationWorkflowLaneRecovery, findByBatchId, sweepStaleDelegations } from '../background/pending-delegations.js';
6
6
  import { type PrReviewInlineTriggerRow } from '../background/pr-review-trigger-contract.js';
7
7
  import { type RevisionDigestResult, resolveCommitCountSince, resolveCommitCountSinceAsync, resolveCurrentGitHead, resolveCurrentGitHeadAsync, resolveCurrentUpstreamPushTarget, resolveCurrentUpstreamPushTargetAsync, resolveCurrentUpstreamRemoteRef, resolveExactRemoteBranchHead, resolveExactRemoteBranchHeadAsync, resolveIsExactSingleChildCommit, resolveIsExactSingleChildCommitAsync, resolveIsWorkingTreeClean, resolveIsWorkingTreeCleanAsync, resolvePrReviewDiffStats, resolvePrReviewDiffStatsAsync, resolvePrWorkflowRevisionDigest, resolvePrWorkflowRevisionDigestDetailed, resolveRemoteRefsContainingHead, resolveRemoteRefsContainingHeadAsync } from '../background/workspace-snapshot.js';
8
8
  import { type PrReviewResilienceConfig } from '../config/schema.js';
@@ -349,6 +349,8 @@ export interface PrWorkflowGateState {
349
349
  /** @deprecated Compatibility projection of the most recent base dispatch. */
350
350
  prReviewBaseDispatch?: PrReviewBaseDispatchRecord;
351
351
  prReviewResilience?: PrReviewResilienceStateRecord;
352
+ /** Dimensions that consumed their one contract-only retry; top-level for rollback readability. */
353
+ prReviewContractRetryDimensions?: PrReviewBaseDimensionId[];
352
354
  /** Canonical ordered semantic ledger frozen by the first micro dispatch. */
353
355
  prReviewTriggerLedger?: PrReviewInlineTriggerRow[];
354
356
  prReviewTriggerEvalPath?: string;
@@ -393,6 +395,9 @@ export interface PrWorkflowGateState {
393
395
  prReviewArtifactRunId?: string;
394
396
  prReviewFindingsPath?: string;
395
397
  prReviewArtifactBoundaries?: PrReviewArtifactBoundary[];
398
+ prReviewPartialBaseCoverage?: PrReviewPartialBaseCoverageRecord;
399
+ prReviewCoverageDisclosurePath?: string;
400
+ prReviewCoverageDisclosureDigest?: string;
396
401
  prReviewHandoffPath?: string;
397
402
  prReviewHandoffRequired?: boolean;
398
403
  checkoutRecovery?: PrWorkflowCheckoutRecoveryRecord;
@@ -432,6 +437,15 @@ export interface PrWorkflowGateState {
432
437
  prFeedbackRebindCount?: number;
433
438
  prFeedbackScopes?: PrFeedbackScopeDeclarationRecord[];
434
439
  }
440
+ export interface PrReviewPartialBaseCoverageRecord {
441
+ runId: string;
442
+ prHeadSha: string;
443
+ revisionDigest: string;
444
+ missingDimension: PrReviewBaseDimensionId;
445
+ failureClass: BackgroundDelegationWorkflowLaneFailureClass;
446
+ terminalEventId: string;
447
+ admittedAt: string;
448
+ }
435
449
  /**
436
450
  * Bound on the PR_FEEDBACK inventory-amendment audit ledger (issue #2242 R3).
437
451
  *
@@ -536,7 +550,7 @@ declare function probeAlivePrWorkflowLaneSessions(directory: string, records: Ba
536
550
  alive: Set<string>;
537
551
  degradedReason?: PrWorkflowLaneProbeDegradedReason;
538
552
  }>;
539
- /** One still-pending pr-review lane's host liveness reading (issue #2280 Part B). */
553
+ /** One still-pending lane's host liveness reading (issue #2280 Part B). */
540
554
  export interface PrWorkflowPendingLaneLiveness {
541
555
  laneId: string;
542
556
  /**
@@ -568,7 +582,7 @@ export interface PrWorkflowPendingLaneLiveness {
568
582
  degradedReason?: PrWorkflowLaneProbeDegradedReason | 'advisory-unavailable';
569
583
  }
570
584
  /**
571
- * Bounded, fail-open liveness advisory for still-pending pr-review lanes
585
+ * Bounded, fail-open liveness advisory for still-pending async lanes
572
586
  * (issue #2280 Part B).
573
587
  *
574
588
  * ALERT-ONLY, by design: this reads host session status and reports it; it
@@ -770,18 +784,32 @@ export declare class PrReviewResilienceRetryExhaustedError extends Error {
770
784
  readonly code: "PR_REVIEW_RESILIENCE_RETRY_EXHAUSTED";
771
785
  constructor(message: string);
772
786
  }
787
+ declare function classifyTerminalFailureSignature(record: BackgroundDelegationRecord): string | null;
773
788
  interface EnforcePrReviewBaseDimensionsOptions {
774
789
  batchId: string;
775
790
  prHeadSha: string;
776
791
  revisionDigest?: string;
792
+ prReviewContractRetry?: boolean;
777
793
  prReviewWaveStage?: 'canary' | 'fanout';
778
794
  prReviewWaveAttempt?: 0 | 1 | 2;
779
795
  prReviewResiliencePolicy?: PrReviewResilienceConfig;
780
796
  }
781
797
  export declare function enforcePrReviewBaseDimensions(directory: string, sessionID: string, lanes: readonly PrWorkflowLaneSpec[], options: EnforcePrReviewBaseDimensionsOptions): Promise<PrWorkflowGateState>;
782
- export declare function rollbackPrReviewBaseAdmissionIfUnlaunched(directory: string, sessionID: string, batchId: string): Promise<boolean>;
798
+ export declare function rollbackPrReviewBaseAdmissionIfUnlaunched(directory: string, sessionID: string, batchId: string, contractRetry?: boolean): Promise<boolean>;
783
799
  declare function minimumConsolidatedLaneCover(sets: ReadonlyArray<readonly string[]>): number;
784
- /** Validate durable exact-six PR review evidence across all base and retry batches. */
800
+ export declare function admitPrReviewPartialBaseCoverage(directory: string, sessionID: string, runId: string, missingDimension: PrReviewBaseDimensionId): Promise<PrWorkflowGateState>;
801
+ /**
802
+ * Undo a newly admitted partial-base disclosure when the findings checkpoint
803
+ * cannot be completed. The compare-and-clear checks keep a stale writer from
804
+ * deleting a disclosure that another writer has already committed.
805
+ */
806
+ export declare function rollbackPrReviewPartialBaseCoverageAdmission(directory: string, sessionID: string, options: {
807
+ runId: string;
808
+ boundary: 'post_explorer' | 'post_reviewer' | 'post_critic';
809
+ relativePath: string;
810
+ digest: string;
811
+ }): Promise<boolean>;
812
+ /** Validate durable exact-six or explicitly admitted N-1 PR review evidence. */
785
813
  export declare function assertPrReviewBaseCoverageSettled(directory: string, sessionID: string, gateContext?: PrReviewGateContext): Promise<PrWorkflowGateState>;
786
814
  /** Persist a council/reviewer/critic validation batch before launch. */
787
815
  export declare function recordPrReviewValidationBatch(directory: string, sessionID: string, phase: PrReviewValidationPhase, lanes: readonly PrWorkflowLaneSpec[], options: {
@@ -835,7 +863,9 @@ export declare function resolvePrReviewWriterRunId(directory: string, sessionID:
835
863
  export declare function markPrReviewTriggerEvaluationComplete(directory: string, sessionID: string, runId: string, artifactPath: string): Promise<PrWorkflowGateState>;
836
864
  /** Freeze one exact inline trigger ledger across every micro dispatch. */
837
865
  export declare function bindPrReviewTriggerLedger(directory: string, sessionID: string, input: unknown): Promise<PrWorkflowGateState>;
838
- export declare function assertPrReviewArtifactBoundary(directory: string, sessionID: string, runId: string, boundary: PrReviewArtifactBoundary, findingIds: string[]): Promise<PrWorkflowGateState>;
866
+ export declare function assertPrReviewArtifactBoundary(directory: string, sessionID: string, runId: string, boundary: PrReviewArtifactBoundary, findingIds: string[], options?: {
867
+ skipBaseCoverage?: boolean;
868
+ }): Promise<PrWorkflowGateState>;
839
869
  /**
840
870
  * Artifact records are a projection of lane receipts, never a caller-controlled
841
871
  * replacement for them. Keep their workflow status/action aligned with the
@@ -871,6 +901,7 @@ export declare function enforcePrWorkflowToolBefore(directory: string, sessionID
871
901
  /** Validate the terminal PR workflow contract before removing its durable gate. */
872
902
  export declare function completePrWorkflow(directory: string, sessionID: string, expectedMode: PrWorkflowMode, prHeadSha: string): Promise<PrWorkflowCompletionStatus>;
873
903
  export declare const _test_exports: {
904
+ classifyTerminalFailureSignature: typeof classifyTerminalFailureSignature;
874
905
  minimumConsolidatedLaneCover: typeof minimumConsolidatedLaneCover;
875
906
  analyzePrReviewBatchRecordIntegrity: typeof analyzePrReviewBatchRecordIntegrity;
876
907
  MAX_COVER_UNIVERSE_BITS: number;