opencode-swarm 7.184.16 → 7.185.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 (106) hide show
  1. package/README.md +1 -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/pr-subscriptions.d.ts +18 -0
  5. package/dist/background/stage-b-dispatch-binding-store.d.ts +115 -0
  6. package/dist/cli/{auto-checkpoint-dccr5m5w.js → auto-checkpoint-adn8bg66.js} +7 -7
  7. package/dist/cli/{checkpoint-sntn9axf.js → checkpoint-dvyx8gee.js} +14 -14
  8. package/dist/cli/{coder-settlement-wvesf12p.js → coder-settlement-95dv9r28.js} +10 -10
  9. package/dist/cli/{config-doctor-2kf93041.js → config-doctor-f2jtx8y5.js} +2 -2
  10. package/dist/cli/{core-27f3zcnn.js → core-xn2epqfk.js} +3 -3
  11. package/dist/cli/{curation-policy-1rzheh1x.js → curation-policy-swnyg1jr.js} +4 -4
  12. package/dist/cli/{curator-26a9vxkj.js → curator-91rqz7xg.js} +39 -39
  13. package/dist/cli/{curator-drift-dcysavga.js → curator-drift-qem70sry.js} +8 -8
  14. package/dist/cli/curator-llm-factory-tr6rabws.js +81 -0
  15. package/dist/cli/{evidence-summary-service-7t4xgh9q.js → evidence-summary-service-n7ndpen0.js} +17 -17
  16. package/dist/cli/{gate-evidence-44ydv262.js → gate-evidence-ajh95p02.js} +5 -5
  17. package/dist/cli/guardrail-explain-cne2701m.js +82 -0
  18. package/dist/cli/{guardrail-log-ybxh0ama.js → guardrail-log-b23sf549.js} +6 -6
  19. package/dist/cli/{guardrail-reset-qx2nx56s.js → guardrail-reset-e6njf0hv.js} +39 -39
  20. package/dist/cli/{hive-promoter-hkzhaeyc.js → hive-promoter-8dqvfwsx.js} +39 -39
  21. package/dist/cli/{index-7r3pkgma.js → index-1zpgtnhp.js} +1 -1
  22. package/dist/cli/{index-7m4zf48w.js → index-26nhk01d.js} +1 -1
  23. package/dist/cli/{index-6dgghy8n.js → index-2e7h9yw5.js} +5 -5
  24. package/dist/cli/{index-gvnsfcj0.js → index-2tv5zp9x.js} +7 -7
  25. package/dist/cli/{index-8y9aq9f6.js → index-359w27b1.js} +4 -4
  26. package/dist/cli/{index-m1pqenq9.js → index-3fnpjy4g.js} +2 -2
  27. package/dist/cli/{index-v9ynrcst.js → index-4ysdy8sx.js} +4 -4
  28. package/dist/cli/{index-bntwj2tp.js → index-580t912d.js} +2 -1
  29. package/dist/cli/{index-jtg0zsnx.js → index-62z1vsvf.js} +1 -1
  30. package/dist/cli/{index-8pmx61z1.js → index-6wy9m25t.js} +10 -10
  31. package/dist/cli/{index-marmy421.js → index-73vnyt4b.js} +39 -39
  32. package/dist/cli/{index-cftva3pa.js → index-7jqnckzg.js} +1 -1
  33. package/dist/cli/{index-fxf3zhtq.js → index-97nbaxye.js} +1 -1
  34. package/dist/cli/{index-n5z3d8nc.js → index-9am1ry6w.js} +7 -7
  35. package/dist/cli/{index-a9cajj7y.js → index-cah5ffkh.js} +5 -5
  36. package/dist/cli/{index-ctd0xa67.js → index-djen6c7q.js} +1 -1
  37. package/dist/cli/{index-e2a3evhm.js → index-e5wczpj3.js} +2 -2
  38. package/dist/cli/{index-6h55yp6c.js → index-erv39311.js} +2 -2
  39. package/dist/cli/{index-kvd6jbzr.js → index-f3grtpy3.js} +3 -3
  40. package/dist/cli/{index-dggrcd8z.js → index-fkzv0hj4.js} +41 -41
  41. package/dist/cli/{index-rmr36a5k.js → index-fmxty2h3.js} +2 -2
  42. package/dist/cli/{index-7rzgdcvc.js → index-gemq38en.js} +1 -1
  43. package/dist/cli/{index-df845cwk.js → index-gxjy9y0t.js} +2 -2
  44. package/dist/cli/{index-2y9b45jj.js → index-h5f5q60s.js} +1 -1
  45. package/dist/cli/{index-rnqfz57d.js → index-hx9vyvx0.js} +3 -3
  46. package/dist/cli/{index-8gxb2xxe.js → index-m7g4dsr4.js} +5 -5
  47. package/dist/cli/{index-6drqsy4n.js → index-n0wyd905.js} +3 -3
  48. package/dist/cli/{index-yx5z4200.js → index-p544ppcp.js} +1 -1
  49. package/dist/cli/{index-jns2mnbz.js → index-qccnny3g.js} +3 -3
  50. package/dist/cli/{index-tyzmjw2s.js → index-qqjqpmhj.js} +420 -9
  51. package/dist/cli/{index-r2nr4qxg.js → index-rcx4kb02.js} +4 -4
  52. package/dist/cli/{index-g4d1d91p.js → index-rp0pyywc.js} +7 -7
  53. package/dist/cli/{index-9grg5gr3.js → index-s0c1wxtt.js} +1 -1
  54. package/dist/cli/{index-pwcbtbhd.js → index-s5xmvt3k.js} +1 -1
  55. package/dist/cli/{index-mfqge140.js → index-sz755xt1.js} +1 -1
  56. package/dist/cli/{index-dftztz4y.js → index-t9jr6zc7.js} +1 -1
  57. package/dist/cli/{index-tzrbeas0.js → index-tmd5j8kh.js} +4 -4
  58. package/dist/cli/{index-mdkydrnr.js → index-v5k5jw0r.js} +2 -2
  59. package/dist/cli/{index-fzen7z3b.js → index-vfr3z9rv.js} +5 -1
  60. package/dist/cli/{index-b3q241ze.js → index-w7sftxdy.js} +8 -3
  61. package/dist/cli/{index-yydv4jfy.js → index-yg15df3b.js} +2 -2
  62. package/dist/cli/{index-2fc9ecr0.js → index-zkm995wa.js} +4222 -3674
  63. package/dist/cli/{index-v2v8gdvy.js → index-zxm9h19f.js} +3 -3
  64. package/dist/cli/{index-4g4sr4ah.js → index-zyz0xp2b.js} +1 -1
  65. package/dist/cli/index.js +40 -40
  66. package/dist/cli/{knowledge-escalator-ebr3rw8e.js → knowledge-escalator-xdz6vg62.js} +11 -11
  67. package/dist/cli/{knowledge-events-bw9en61p.js → knowledge-events-dnca00ye.js} +9 -9
  68. package/dist/cli/{knowledge-link-vvyfhhmr.js → knowledge-link-y653vvr8.js} +3 -3
  69. package/dist/cli/{knowledge-store-z9y0rn82.js → knowledge-store-yc20na25.js} +4 -4
  70. package/dist/cli/{knowledge-validator-p1zxa4rp.js → knowledge-validator-c2kfrqdy.js} +6 -6
  71. package/dist/cli/{mcp-qtqcdjj3.js → mcp-mefjep3p.js} +1 -1
  72. package/dist/cli/{model-preflight-fz3dh7wj.js → model-preflight-5xcxc75n.js} +39 -39
  73. package/dist/cli/{pending-delegations-69kt91zp.js → pending-delegations-emhmdkn4.js} +10 -10
  74. package/dist/cli/{pr-subscriptions-yjwfaaqk.js → pr-subscriptions-amc1z05d.js} +10 -10
  75. package/dist/cli/{pr-workflow-gate-6wft8t65.js → pr-workflow-gate-gpq41zx9.js} +41 -39
  76. package/dist/cli/{runner-cwmgb9rw.js → runner-ss88pbb2.js} +4 -4
  77. package/dist/cli/{scan-cursor-srmwyzgp.js → scan-cursor-71gq82ez.js} +5 -5
  78. package/dist/cli/{schema-ks83tpk5.js → schema-108trhk6.js} +3 -1
  79. package/dist/cli/{scope-persistence-68sf3zbq.js → scope-persistence-9gfgvy3p.js} +13 -13
  80. package/dist/cli/{server-e9r2796f.js → server-pkk6y7fa.js} +39 -39
  81. package/dist/cli/{skill-generator-8em4gnwh.js → skill-generator-7g6xjwhr.js} +13 -13
  82. package/dist/cli/{snapshot-coordination-init-s1q9h6ex.js → snapshot-coordination-init-pactfmsy.js} +39 -39
  83. package/dist/cli/{speckit-checkoff-t2msmjh2.js → speckit-checkoff-xyp4c36r.js} +4 -4
  84. package/dist/cli/{workspace-snapshot-gnwak61t.js → workspace-snapshot-0hffyjhd.js} +3 -3
  85. package/dist/cli/{worktree-collision-ownership-r5p156gs.js → worktree-collision-ownership-g26m4c10.js} +11 -11
  86. package/dist/cli/{worktree-isolation-9x2vs2ym.js → worktree-isolation-52529c62.js} +39 -39
  87. package/dist/commands/_shared/url-security.d.ts +20 -9
  88. package/dist/commands/pr-ref.d.ts +44 -8
  89. package/dist/commands/pr-subscribe.d.ts +0 -8
  90. package/dist/commands/pr-unsubscribe.d.ts +2 -1
  91. package/dist/config/schema.d.ts +17 -0
  92. package/dist/config/skill-contract-digest.d.ts +20 -0
  93. package/dist/hooks/delegation-gate.d.ts +5 -1
  94. package/dist/hooks/pr-auto-subscribe.d.ts +5 -4
  95. package/dist/hooks/pr-workflow-gate.d.ts +387 -0
  96. package/dist/hooks/pr-workflow-response-gate.d.ts +2 -0
  97. package/dist/index.js +591 -585
  98. package/dist/providers/forge-provider.d.ts +167 -0
  99. package/dist/providers/host-guards.d.ts +31 -0
  100. package/dist/services/pr-workflow-skill-contract.d.ts +45 -0
  101. package/dist/utils/gh-executable.d.ts +10 -0
  102. package/dist/utils/glab-executable.d.ts +85 -0
  103. package/opencode-swarm.schema.json +19 -0
  104. package/package.json +1 -1
  105. package/dist/cli/curator-llm-factory-tq54zhpw.js +0 -81
  106. package/dist/cli/guardrail-explain-00zvh1zq.js +0 -82
@@ -457,6 +457,13 @@ export interface PrWorkflowGateState {
457
457
  mode: PrWorkflowMode;
458
458
  activatedAt: string;
459
459
  updatedAt: string;
460
+ /**
461
+ * Skill-contract advisories recorded at activation (and appended by the
462
+ * auto-resume wake path) when a stale installed copy of the mode's stamped
463
+ * skill was detected — each names the stale path and the canonical source
464
+ * (issue #2601). Purely diagnostic: detection never gates activation.
465
+ */
466
+ skillContractAdvisories?: string[];
460
467
  prHeadSha?: string;
461
468
  prReviewBaseRef?: string;
462
469
  prReviewBaseSha?: string;
@@ -617,6 +624,17 @@ export declare function activatePrWorkflow(directory: string, sessionID: string,
617
624
  requireCheckoutPreflight?: boolean;
618
625
  prUrl?: string;
619
626
  }): Promise<PrWorkflowGateState>;
627
+ /**
628
+ * Issue #2601: append skill-contract advisories detected by the auto-resume
629
+ * wake path onto the durable gate state, independent of activation-time
630
+ * persistence. Read-modify-write under the session-state mutation lock with
631
+ * the same CAS writer activation uses; string-equality dedupe; capped at 8.
632
+ * Fail-open by design: a concurrent gate transition (BLOCKED from the CAS
633
+ * writer), a missing state, or any error drops the append silently — the
634
+ * advisory was already surfaced through `advisoryWarn` by the detector, and
635
+ * an advisory-record failure must never break the gate.
636
+ */
637
+ export declare function appendPrWorkflowSkillContractAdvisories(directory: string, sessionID: string, advisories: string[]): Promise<void>;
620
638
  export declare function readPrWorkflowGateState(directory: string, sessionID: string): Promise<PrWorkflowGateState | null>;
621
639
  export type SubmitPrReviewResultOutcome = {
622
640
  status: 'recorded' | 'duplicate';
@@ -1455,6 +1473,375 @@ export declare function completePrWorkflow(directory: string, sessionID: string,
1455
1473
  laneLiveness?: PrWorkflowLaneLivenessOptions;
1456
1474
  }): Promise<PrWorkflowCompletionStatus>;
1457
1475
  export declare const _test_exports: {
1476
+ parseGateState: (data: unknown) => z.ZodSafeParseResult<{
1477
+ [x: string]: unknown;
1478
+ schemaVersion: 1;
1479
+ revision: number;
1480
+ sessionID: string;
1481
+ mode: "PR_REVIEW" | "PR_FEEDBACK";
1482
+ activatedAt: string;
1483
+ updatedAt: string;
1484
+ workflowInstanceId?: string | undefined;
1485
+ skillContractAdvisories?: string[] | undefined;
1486
+ prHeadSha?: string | undefined;
1487
+ prReviewBaseRef?: string | undefined;
1488
+ prReviewBaseSha?: string | undefined;
1489
+ prReviewDepthTier?: "L" | "M" | "S" | undefined;
1490
+ prReviewDiffStats?: {
1491
+ changedLines: number;
1492
+ changedFiles: number;
1493
+ hasSubmoduleChange: boolean;
1494
+ } | undefined;
1495
+ prReviewBaseDispatches?: {
1496
+ batchId: string;
1497
+ lanes: {
1498
+ laneId: string;
1499
+ workflowLane: "intent-architecture" | "correctness-state" | "tests-falsifiability" | "security-trust" | "reliability-performance" | "compatibility-delivery";
1500
+ ownedWorkflowLanes?: ("intent-architecture" | "correctness-state" | "tests-falsifiability" | "security-trust" | "reliability-performance" | "compatibility-delivery")[] | undefined;
1501
+ }[];
1502
+ validatedAt: string;
1503
+ }[] | undefined;
1504
+ prReviewBaseDispatch?: {
1505
+ batchId: string;
1506
+ lanes: {
1507
+ laneId: string;
1508
+ workflowLane: "intent-architecture" | "correctness-state" | "tests-falsifiability" | "security-trust" | "reliability-performance" | "compatibility-delivery";
1509
+ ownedWorkflowLanes?: ("intent-architecture" | "correctness-state" | "tests-falsifiability" | "security-trust" | "reliability-performance" | "compatibility-delivery")[] | undefined;
1510
+ }[];
1511
+ validatedAt: string;
1512
+ } | undefined;
1513
+ prReviewResilience?: {
1514
+ policy: {
1515
+ enabled: boolean;
1516
+ canaryProbeMs: number;
1517
+ statusProbeTimeoutMs: number;
1518
+ correlatedFailureThreshold: number;
1519
+ maxRetryAttemptsAfterInitial: number;
1520
+ circuitOpenDurationMs?: number | undefined;
1521
+ };
1522
+ attempts: {
1523
+ attempt: 0 | 1 | 2;
1524
+ targetDimensions: ("intent-architecture" | "correctness-state" | "tests-falsifiability" | "security-trust" | "reliability-performance" | "compatibility-delivery")[];
1525
+ canaryBatchId: string;
1526
+ canaryLaneId: string;
1527
+ canaryWorkflowLane: "intent-architecture" | "correctness-state" | "tests-falsifiability" | "security-trust" | "reliability-performance" | "compatibility-delivery";
1528
+ admittedAt: string;
1529
+ fanoutBatchId?: string | undefined;
1530
+ }[];
1531
+ circuit?: {
1532
+ version: 2;
1533
+ state: "CLOSED" | "OPEN" | "HALF_OPEN";
1534
+ generation: number;
1535
+ contributors: {
1536
+ batchId: string;
1537
+ laneId: string;
1538
+ terminalAt: string;
1539
+ }[];
1540
+ providerClass?: string | undefined;
1541
+ openedAt?: string | undefined;
1542
+ openUntil?: string | undefined;
1543
+ evidenceWaterline?: string | undefined;
1544
+ probe?: {
1545
+ batchId: string;
1546
+ laneId: string;
1547
+ admittedAt: string;
1548
+ } | undefined;
1549
+ } | {
1550
+ signature: string;
1551
+ count: number;
1552
+ contributors: {
1553
+ batchId: string;
1554
+ laneId: string;
1555
+ }[];
1556
+ openedAt: string;
1557
+ } | undefined;
1558
+ } | undefined;
1559
+ prReviewContractRetryDimensions?: ("intent-architecture" | "correctness-state" | "tests-falsifiability" | "security-trust" | "reliability-performance" | "compatibility-delivery")[] | undefined;
1560
+ prReviewTriggerLedger?: ({
1561
+ trigger_id: "auth-identity-secrets" | "untrusted-input-boundaries" | "subprocess-platform" | "concurrency-state" | "dependencies-build-release" | "api-schema-migrations" | "test-infrastructure" | "ui-accessibility-i18n" | "privacy-observability" | "generated-provenance" | "unclassified-risk";
1562
+ result: "MATCHED";
1563
+ evidence: string;
1564
+ } | {
1565
+ trigger_id: "auth-identity-secrets" | "untrusted-input-boundaries" | "subprocess-platform" | "concurrency-state" | "dependencies-build-release" | "api-schema-migrations" | "test-infrastructure" | "ui-accessibility-i18n" | "privacy-observability" | "generated-provenance" | "unclassified-risk";
1566
+ result: "NOT_TRIGGERED";
1567
+ evidence: string;
1568
+ })[] | undefined;
1569
+ prReviewTriggerEvalPath?: string | undefined;
1570
+ prReviewTriggerEvalRunId?: string | undefined;
1571
+ prReviewValidationBatches?: {
1572
+ batchId: string;
1573
+ phase: "reviewer" | "critic" | "council";
1574
+ lanes: {
1575
+ laneId: string;
1576
+ workflowLane: string;
1577
+ reviewItemIds?: string[] | undefined;
1578
+ }[];
1579
+ validatedAt: string;
1580
+ }[] | undefined;
1581
+ prReviewBatchCoherence?: Record<string, {
1582
+ [x: string]: unknown;
1583
+ validatedInventory: string[];
1584
+ reviewerItemBindings?: Record<string, string> | undefined;
1585
+ reviewerItemBindingKeyEncoding?: "prefixed-v1" | undefined;
1586
+ }> | undefined;
1587
+ prReviewRetiredReviewerSessionIds?: string[] | undefined;
1588
+ prReviewRetiredConsolidatedLanes?: string[] | undefined;
1589
+ prReviewReservedRunId?: string | undefined;
1590
+ prReviewArtifactRunId?: string | undefined;
1591
+ prReviewFindingsPath?: string | undefined;
1592
+ prReviewPartialBaseCoverage?: {
1593
+ schemaVersion: 2;
1594
+ runId: string;
1595
+ prHeadSha: string;
1596
+ revisionDigest: string;
1597
+ unresolvedDimensions: {
1598
+ dimension: "intent-architecture" | "correctness-state" | "tests-falsifiability" | "security-trust" | "reliability-performance" | "compatibility-delivery";
1599
+ terminalState: "FAILED" | "CANCELLED" | "NOT_LAUNCHED";
1600
+ reasonKind: "cancelled" | "lane_failure" | "not_launched";
1601
+ failureClass?: "contract" | "resource" | "liveness" | "deadline" | undefined;
1602
+ terminalEventId?: string | undefined;
1603
+ batchId?: string | undefined;
1604
+ laneId?: string | undefined;
1605
+ safeDetail?: string | undefined;
1606
+ }[];
1607
+ admittedAt: string;
1608
+ } | {
1609
+ runId: string;
1610
+ prHeadSha: string;
1611
+ revisionDigest: string;
1612
+ missingDimension: "intent-architecture" | "correctness-state" | "tests-falsifiability" | "security-trust" | "reliability-performance" | "compatibility-delivery";
1613
+ failureClass: "contract" | "resource" | "deadline";
1614
+ terminalEventId: string;
1615
+ admittedAt: string;
1616
+ } | undefined;
1617
+ prReviewCoverageDisclosurePath?: string | undefined;
1618
+ prReviewCoverageDisclosureDigest?: string | undefined;
1619
+ prReviewDimensionCancellations?: Record<"intent-architecture" | "correctness-state" | "tests-falsifiability" | "security-trust" | "reliability-performance" | "compatibility-delivery", {
1620
+ reason: string;
1621
+ cancelledAt: string;
1622
+ source: "armed_recovery";
1623
+ }> | undefined;
1624
+ prReviewSubmitRejections?: {
1625
+ childSessionId: string;
1626
+ at: number;
1627
+ message: string;
1628
+ laneId?: string | undefined;
1629
+ }[] | undefined;
1630
+ prReviewArtifactBoundaries?: ("post_explorer" | "post_reviewer" | "post_critic")[] | undefined;
1631
+ prReviewHandoffPath?: string | undefined;
1632
+ prReviewHandoffRequired?: boolean | undefined;
1633
+ checkoutRecovery?: {
1634
+ code: "UNMERGED_INDEX" | "GIT_OPERATION_IN_PROGRESS" | "DIRTY_SUBMODULE" | "SWARM_STATE_TRACKING_ERROR" | "GIT_STATE_INDETERMINATE";
1635
+ retryable: false;
1636
+ requiredAction: string;
1637
+ evidence: {
1638
+ worktreeRoot: string | null;
1639
+ gitDir: string | null;
1640
+ operations: string[];
1641
+ unmergedCodes: string[];
1642
+ paths: string[];
1643
+ trackedCount: number;
1644
+ untrackedCount: number;
1645
+ pathsTruncated: boolean;
1646
+ detail?: string | undefined;
1647
+ };
1648
+ detectedAt: string;
1649
+ } | undefined;
1650
+ prFeedbackTargetUrl?: string | undefined;
1651
+ prFeedbackReviewHandoff?: {
1652
+ path: string;
1653
+ runId: string;
1654
+ sourcePrHeadSha: string;
1655
+ prUrl: string;
1656
+ findingIds: string[];
1657
+ digest: string;
1658
+ sourceWorkflowInstanceId: string;
1659
+ provenance: "active-review-v1" | "external-v1";
1660
+ } | undefined;
1661
+ prFeedbackInventory?: string[] | undefined;
1662
+ prFeedbackInventoryAmendments?: {
1663
+ entry: string;
1664
+ amendedAt: string;
1665
+ batch: number;
1666
+ }[] | undefined;
1667
+ prFeedbackVerifications?: {
1668
+ batchId: string;
1669
+ ownership: {
1670
+ laneId: string;
1671
+ ownedItemIds: string[];
1672
+ }[];
1673
+ validatedAt: string;
1674
+ }[] | undefined;
1675
+ prFeedbackRetiredItemOwnership?: Record<string, string> | undefined;
1676
+ prFeedbackVerification?: {
1677
+ batchId: string;
1678
+ ownership: {
1679
+ laneId: string;
1680
+ ownedItemIds: string[];
1681
+ }[];
1682
+ validatedAt: string;
1683
+ } | undefined;
1684
+ prFeedbackStageA?: {
1685
+ revisionDigest: string;
1686
+ checks: {
1687
+ category: "lint" | "build" | "typecheck" | "diff-check" | "reproduction";
1688
+ command: string[];
1689
+ durationMs: number;
1690
+ workingDirectory?: string | undefined;
1691
+ obligationId?: string | undefined;
1692
+ validatorContract?: {
1693
+ path: string;
1694
+ id: string;
1695
+ } | undefined;
1696
+ targets?: string[] | undefined;
1697
+ feedbackTargets?: {
1698
+ feedbackItemId: string;
1699
+ target: string;
1700
+ expectedBehavior: string;
1701
+ proofKind?: "conflict" | "metadata" | "defect" | "source-proof" | "ci" | "user-decision" | undefined;
1702
+ }[] | undefined;
1703
+ }[];
1704
+ validatedAt: string;
1705
+ feedbackItemIds?: string[] | undefined;
1706
+ applicableCategories?: ("lint" | "build" | "typecheck")[] | undefined;
1707
+ applicableObligations?: {
1708
+ id: string;
1709
+ category: "lint" | "build" | "typecheck";
1710
+ workingDirectory: string;
1711
+ source: string;
1712
+ validatorContract?: {
1713
+ path: string;
1714
+ id: string;
1715
+ } | undefined;
1716
+ }[] | undefined;
1717
+ } | undefined;
1718
+ prFeedbackGateBatches?: {
1719
+ batchId: string;
1720
+ phase: "stage-b-reviewer" | "stage-b-test" | "closeout-reviewer" | "closeout-critic";
1721
+ laneId: string;
1722
+ itemIds: string[];
1723
+ revisionDigest: string;
1724
+ validatedAt: string;
1725
+ }[] | undefined;
1726
+ prFeedbackReadyToPublish?: {
1727
+ revisionDigest: string;
1728
+ localHead: string;
1729
+ remoteName: string;
1730
+ remoteBranchRef: string;
1731
+ remoteRef: string;
1732
+ validatedAt: string;
1733
+ } | undefined;
1734
+ prFeedbackPublication?: {
1735
+ schemaVersion: 1;
1736
+ history: {
1737
+ schemaVersion: 1;
1738
+ generation: number;
1739
+ state: "reviewing" | "armed" | "invalidated" | "push_in_flight" | "published" | "cancelled_without_publication";
1740
+ workspaceIdentity: string;
1741
+ sessionID: string;
1742
+ intakeHeadSha: string;
1743
+ localHeadRef: string;
1744
+ localHead: string;
1745
+ remoteName: string;
1746
+ remoteBranchRef: string;
1747
+ remoteRef: string;
1748
+ revisionDigest: string;
1749
+ evidence: {
1750
+ stageAValidatedAt: string;
1751
+ batches: {
1752
+ phase: "stage-b-reviewer" | "stage-b-test" | "closeout-reviewer" | "closeout-critic";
1753
+ batchId: string;
1754
+ laneId: string;
1755
+ }[];
1756
+ };
1757
+ createdAt: string;
1758
+ prTargetUrl?: string | undefined;
1759
+ remoteUrlIdentity?: string | undefined;
1760
+ invalidationReason?: string | undefined;
1761
+ supersededByGeneration?: number | undefined;
1762
+ armedAt?: string | undefined;
1763
+ invalidatedAt?: string | undefined;
1764
+ publishedAt?: string | undefined;
1765
+ cancelledAt?: string | undefined;
1766
+ }[];
1767
+ attempts: {
1768
+ attemptId: string;
1769
+ generation: number;
1770
+ sessionID: string;
1771
+ intentDigest: string;
1772
+ intent: {
1773
+ remote: string;
1774
+ sourceSha: string;
1775
+ destRef: string;
1776
+ };
1777
+ prePush: {
1778
+ localHead: string;
1779
+ worktreeClean: boolean;
1780
+ remoteName: string;
1781
+ remoteBranchRef: string;
1782
+ observedRemoteHead: string | null;
1783
+ };
1784
+ startedAt: string;
1785
+ callID?: string | undefined;
1786
+ result?: {
1787
+ outcome: "completed" | "rejected" | "cancelled" | "uncertain";
1788
+ exitStatus: number | "not-observed";
1789
+ diagnostic: string;
1790
+ postPush: {
1791
+ localHead: string | null;
1792
+ observedRemoteHead: string | null;
1793
+ };
1794
+ completedAt: string;
1795
+ } | undefined;
1796
+ }[];
1797
+ active?: {
1798
+ schemaVersion: 1;
1799
+ generation: number;
1800
+ state: "reviewing" | "armed" | "invalidated" | "push_in_flight" | "published" | "cancelled_without_publication";
1801
+ workspaceIdentity: string;
1802
+ sessionID: string;
1803
+ intakeHeadSha: string;
1804
+ localHeadRef: string;
1805
+ localHead: string;
1806
+ remoteName: string;
1807
+ remoteBranchRef: string;
1808
+ remoteRef: string;
1809
+ revisionDigest: string;
1810
+ evidence: {
1811
+ stageAValidatedAt: string;
1812
+ batches: {
1813
+ phase: "stage-b-reviewer" | "stage-b-test" | "closeout-reviewer" | "closeout-critic";
1814
+ batchId: string;
1815
+ laneId: string;
1816
+ }[];
1817
+ };
1818
+ createdAt: string;
1819
+ prTargetUrl?: string | undefined;
1820
+ remoteUrlIdentity?: string | undefined;
1821
+ invalidationReason?: string | undefined;
1822
+ supersededByGeneration?: number | undefined;
1823
+ armedAt?: string | undefined;
1824
+ invalidatedAt?: string | undefined;
1825
+ publishedAt?: string | undefined;
1826
+ cancelledAt?: string | undefined;
1827
+ } | undefined;
1828
+ } | undefined;
1829
+ prFeedbackArmedRecovery?: {
1830
+ recoveredAt: string;
1831
+ prHeadSha: string;
1832
+ revisionDigest: string;
1833
+ generation: number;
1834
+ reason: string;
1835
+ } | undefined;
1836
+ prFeedbackRebindCount?: number | undefined;
1837
+ prFeedbackScopes?: {
1838
+ taskId: string;
1839
+ files: string[];
1840
+ revisionDigest: string;
1841
+ declaredAt: string;
1842
+ consumedByCallId?: string | undefined;
1843
+ }[] | undefined;
1844
+ }>;
1458
1845
  classifyPrReviewCircuitSignal: typeof classifyPrReviewCircuitSignal;
1459
1846
  minimumConsolidatedLaneCover: typeof minimumConsolidatedLaneCover;
1460
1847
  analyzePrReviewBatchRecordIntegrity: typeof analyzePrReviewBatchRecordIntegrity;
@@ -1,5 +1,6 @@
1
1
  import { scanDelegationsForRecovery } from '../background/pending-delegations.js';
2
2
  import { claimPrFeedbackMonitorEvents, readPrFeedbackMonitorQueue } from '../background/pr-feedback-event-queue.js';
3
+ import { ensurePrWorkflowSkillContractsFresh } from '../services/pr-workflow-skill-contract.js';
3
4
  import { observePrWorkflowAutoWakeEvent } from './pr-workflow-auto-wake.js';
4
5
  import { type PrReviewDepthTier, readPrWorkflowGateState } from './pr-workflow-gate.js';
5
6
  export declare const DEFAULT_BOUNDARY_QUIET_MS = 120000;
@@ -12,6 +13,7 @@ export declare const _internals: {
12
13
  readPrFeedbackMonitorQueue: typeof readPrFeedbackMonitorQueue;
13
14
  observePrWorkflowAutoWakeEvent: typeof observePrWorkflowAutoWakeEvent;
14
15
  scanDelegationsForRecovery: typeof scanDelegationsForRecovery;
16
+ ensurePrWorkflowSkillContractsFresh: typeof ensurePrWorkflowSkillContractsFresh;
15
17
  };
16
18
  /**
17
19
  * Maximum number of consecutive unproductive auto-resumes per gated session