opencode-swarm 7.146.0 → 7.146.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 (60) hide show
  1. package/.opencode/skills/swarm-pr-review/SKILL.md +67 -33
  2. package/dist/cli/{config-doctor-vs6hvbew.js → config-doctor-sd7x5bts.js} +2 -2
  3. package/dist/cli/{core-jvvm935f.js → core-17febkvw.js} +1 -1
  4. package/dist/cli/{curation-policy-xv0j8zyt.js → curation-policy-x19e8bqc.js} +4 -4
  5. package/dist/cli/{curator-llm-factory-pe6skby4.js → curator-llm-factory-zxbgkjm5.js} +23 -23
  6. package/dist/cli/{curator-5bxh1djq.js → curator-vghf320v.js} +23 -23
  7. package/dist/cli/{evidence-summary-service-6m9jmzk8.js → evidence-summary-service-xma4aagr.js} +9 -9
  8. package/dist/cli/{gate-evidence-84sfx6g8.js → gate-evidence-2bznvee8.js} +4 -4
  9. package/dist/cli/{guardrail-explain-jhbxq8yb.js → guardrail-explain-ppzg0xz9.js} +24 -24
  10. package/dist/cli/{guardrail-log-vpbp3rm4.js → guardrail-log-xexwz93q.js} +3 -3
  11. package/dist/cli/{hive-promoter-mmmfszv8.js → hive-promoter-j3vw2hj4.js} +23 -23
  12. package/dist/cli/{index-jfcgnvg6.js → index-19f0zycs.js} +2 -2
  13. package/dist/cli/{index-5qwmpamg.js → index-1c9mfnj0.js} +1 -1
  14. package/dist/cli/{index-d4e6wpkg.js → index-4qvsh3m5.js} +8 -5
  15. package/dist/cli/{index-pz2py5v7.js → index-7x00nx8m.js} +321 -99
  16. package/dist/cli/{index-gxbhp7sx.js → index-9qbr27bw.js} +2 -2
  17. package/dist/cli/{index-s8qyaqs2.js → index-bd4g9fvb.js} +1 -1
  18. package/dist/cli/{index-q2mvacjr.js → index-cw96tpy6.js} +4 -4
  19. package/dist/cli/{index-4p3qfb05.js → index-e1hjd15c.js} +1 -1
  20. package/dist/cli/{index-j43qndgc.js → index-e3caa7ng.js} +25 -25
  21. package/dist/cli/{index-f17j50dx.js → index-fksfxhmx.js} +5 -5
  22. package/dist/cli/{index-fzqhn96z.js → index-g8qbjqqz.js} +1 -1
  23. package/dist/cli/{index-fay8h6v8.js → index-h8qed3pr.js} +18 -3
  24. package/dist/cli/{index-zd1mfygt.js → index-k46kg4t6.js} +5 -5
  25. package/dist/cli/{index-bma2wrqx.js → index-n7trn9wz.js} +5 -1
  26. package/dist/cli/{index-j20fzn0w.js → index-qbpxrw95.js} +1 -1
  27. package/dist/cli/{index-92cxd0r1.js → index-t7sfrv3v.js} +3 -3
  28. package/dist/cli/{index-n6ke10ck.js → index-twwb61bh.js} +3 -3
  29. package/dist/cli/{index-g3xt1d16.js → index-txh3h83v.js} +4 -4
  30. package/dist/cli/{index-zsmsy1dh.js → index-tzyvmkd1.js} +1 -1
  31. package/dist/cli/{index-fyr2wbvz.js → index-va8a2zrq.js} +2 -2
  32. package/dist/cli/{index-kfmee1cr.js → index-vacrzesw.js} +6 -6
  33. package/dist/cli/{index-x8pm918t.js → index-w0cj7zyd.js} +1 -1
  34. package/dist/cli/{index-0a0asz2s.js → index-w5r84rd1.js} +1 -1
  35. package/dist/cli/{index-vk15nbh4.js → index-xz0ccakc.js} +1 -1
  36. package/dist/cli/{index-kggqpefz.js → index-ycgm9pzg.js} +1 -1
  37. package/dist/cli/{index-nsr5b69r.js → index-zkaz3fhw.js} +1 -1
  38. package/dist/cli/{index-kwxp0z0n.js → index-zwn2e2pe.js} +3 -3
  39. package/dist/cli/index.js +23 -23
  40. package/dist/cli/{knowledge-escalator-c9p3w12b.js → knowledge-escalator-wj85ppdt.js} +9 -9
  41. package/dist/cli/{knowledge-events-d201414m.js → knowledge-events-4y9kk2xe.js} +7 -7
  42. package/dist/cli/{knowledge-link-82ew2yc4.js → knowledge-link-8pr02pza.js} +3 -3
  43. package/dist/cli/{knowledge-store-ds45k9th.js → knowledge-store-kc8dwc14.js} +4 -4
  44. package/dist/cli/{knowledge-validator-707vsncy.js → knowledge-validator-584ga9fb.js} +6 -6
  45. package/dist/cli/{runner-pqsf809k.js → runner-e7z9cf5y.js} +4 -4
  46. package/dist/cli/{scan-cursor-znhqb8xa.js → scan-cursor-rhjym1pn.js} +5 -5
  47. package/dist/cli/{schema-dnnm0p40.js → schema-yb3pvhcs.js} +5 -1
  48. package/dist/cli/{scope-persistence-4n24a1e2.js → scope-persistence-bxwjk9rc.js} +5 -5
  49. package/dist/cli/{skill-generator-5s0p3y8k.js → skill-generator-3w8w7htr.js} +11 -11
  50. package/dist/cli/{worktree-isolation-1v2mythh.js → worktree-isolation-av1rshr3.js} +23 -23
  51. package/dist/commands/registry.d.ts +1 -1
  52. package/dist/config/schema.d.ts +22 -0
  53. package/dist/hooks/guardrails/index.d.ts +35 -0
  54. package/dist/hooks/pr-workflow-gate.d.ts +48 -2
  55. package/dist/hooks/pr-workflow-response-gate.d.ts +24 -0
  56. package/dist/index.js +60 -62
  57. package/dist/tools/dispatch-lanes.d.ts +13 -1
  58. package/dist/workflow/coder-settlement.d.ts +13 -0
  59. package/dist/workflow/stage-a-repair.d.ts +41 -0
  60. package/package.json +1 -1
@@ -9,14 +9,14 @@ import {
9
9
  maybeEscalateOnViolation,
10
10
  maybeQuarantineOnContradiction,
11
11
  readRecentEscalations
12
- } from "./index-f17j50dx.js";
13
- import"./index-kfmee1cr.js";
14
- import"./index-zd1mfygt.js";
15
- import"./index-jfcgnvg6.js";
12
+ } from "./index-fksfxhmx.js";
13
+ import"./index-vacrzesw.js";
14
+ import"./index-k46kg4t6.js";
15
+ import"./index-19f0zycs.js";
16
16
  import"./index-gprxjmm7.js";
17
17
  import"./index-n832052r.js";
18
- import"./index-5qwmpamg.js";
19
- import"./index-fay8h6v8.js";
18
+ import"./index-1c9mfnj0.js";
19
+ import"./index-h8qed3pr.js";
20
20
  import"./index-cpg98bh1.js";
21
21
  import"./index-9e6fdz2h.js";
22
22
  import"./index-4rhhvd1a.js";
@@ -25,10 +25,10 @@ import"./index-z6xqpmqg.js";
25
25
  import"./index-zj6t9zgx.js";
26
26
  import"./index-zjygnfay.js";
27
27
  import"./index-ae75rja9.js";
28
- import"./index-x8pm918t.js";
29
- import"./index-j20fzn0w.js";
28
+ import"./index-w0cj7zyd.js";
29
+ import"./index-qbpxrw95.js";
30
30
  import"./index-bk5tah7q.js";
31
- import"./index-kggqpefz.js";
31
+ import"./index-ycgm9pzg.js";
32
32
  import"./index-bghwrr59.js";
33
33
  import"./index-qyvjp0bq.js";
34
34
  import"./index-7g4c7s5r.js";
@@ -29,12 +29,12 @@ import {
29
29
  resolveKnowledgeCounterBaselinePath,
30
30
  resolveKnowledgeEventsPath,
31
31
  resolveLegacyApplicationLogPath
32
- } from "./index-zd1mfygt.js";
33
- import"./index-jfcgnvg6.js";
32
+ } from "./index-k46kg4t6.js";
33
+ import"./index-19f0zycs.js";
34
34
  import"./index-gprxjmm7.js";
35
35
  import"./index-n832052r.js";
36
- import"./index-5qwmpamg.js";
37
- import"./index-fay8h6v8.js";
36
+ import"./index-1c9mfnj0.js";
37
+ import"./index-h8qed3pr.js";
38
38
  import"./index-cpg98bh1.js";
39
39
  import"./index-9e6fdz2h.js";
40
40
  import"./index-4rhhvd1a.js";
@@ -43,10 +43,10 @@ import"./index-z6xqpmqg.js";
43
43
  import"./index-zj6t9zgx.js";
44
44
  import"./index-zjygnfay.js";
45
45
  import"./index-ae75rja9.js";
46
- import"./index-x8pm918t.js";
47
- import"./index-j20fzn0w.js";
46
+ import"./index-w0cj7zyd.js";
47
+ import"./index-qbpxrw95.js";
48
48
  import"./index-bk5tah7q.js";
49
- import"./index-kggqpefz.js";
49
+ import"./index-ycgm9pzg.js";
50
50
  import"./index-bghwrr59.js";
51
51
  import"./index-qyvjp0bq.js";
52
52
  import"./index-7g4c7s5r.js";
@@ -12,9 +12,9 @@ import {
12
12
  resolveLinkDir,
13
13
  sanitizeLinkId,
14
14
  writeLinkPointer
15
- } from "./index-x8pm918t.js";
16
- import"./index-j20fzn0w.js";
17
- import"./index-kggqpefz.js";
15
+ } from "./index-w0cj7zyd.js";
16
+ import"./index-qbpxrw95.js";
17
+ import"./index-ycgm9pzg.js";
18
18
  import"./index-bghwrr59.js";
19
19
  import"./index-qyvjp0bq.js";
20
20
  import"./index-7g4c7s5r.js";
@@ -41,14 +41,14 @@ import {
41
41
  transactKnowledge,
42
42
  transactKnowledgeWithCas,
43
43
  wordBigrams
44
- } from "./index-kfmee1cr.js";
44
+ } from "./index-vacrzesw.js";
45
45
  import {
46
46
  resolveHiveDataDir
47
47
  } from "./index-ae75rja9.js";
48
- import"./index-x8pm918t.js";
49
- import"./index-j20fzn0w.js";
48
+ import"./index-w0cj7zyd.js";
49
+ import"./index-qbpxrw95.js";
50
50
  import"./index-bk5tah7q.js";
51
- import"./index-kggqpefz.js";
51
+ import"./index-ycgm9pzg.js";
52
52
  import"./index-bghwrr59.js";
53
53
  import"./index-qyvjp0bq.js";
54
54
  import"./index-7g4c7s5r.js";
@@ -23,15 +23,15 @@ import {
23
23
  validateLesson,
24
24
  validateSkillCandidatePath,
25
25
  validateSkillPath
26
- } from "./index-q2mvacjr.js";
27
- import"./index-4p3qfb05.js";
26
+ } from "./index-cw96tpy6.js";
27
+ import"./index-e1hjd15c.js";
28
28
  import"./index-rtry5xyf.js";
29
- import"./index-kfmee1cr.js";
29
+ import"./index-vacrzesw.js";
30
30
  import"./index-ae75rja9.js";
31
- import"./index-x8pm918t.js";
32
- import"./index-j20fzn0w.js";
31
+ import"./index-w0cj7zyd.js";
32
+ import"./index-qbpxrw95.js";
33
33
  import"./index-bk5tah7q.js";
34
- import"./index-kggqpefz.js";
34
+ import"./index-ycgm9pzg.js";
35
35
  import"./index-bghwrr59.js";
36
36
  import"./index-qyvjp0bq.js";
37
37
  import"./index-7g4c7s5r.js";
@@ -3,12 +3,12 @@ import {
3
3
  _internals,
4
4
  createModelEvaluationExecutor,
5
5
  runEvaluation
6
- } from "./index-0a0asz2s.js";
7
- import"./index-nsr5b69r.js";
6
+ } from "./index-w5r84rd1.js";
7
+ import"./index-zkaz3fhw.js";
8
8
  import"./index-y8552snf.js";
9
9
  import"./index-zj6t9zgx.js";
10
- import"./index-j20fzn0w.js";
11
- import"./index-kggqpefz.js";
10
+ import"./index-qbpxrw95.js";
11
+ import"./index-ycgm9pzg.js";
12
12
  import"./index-bghwrr59.js";
13
13
  import"./index-qyvjp0bq.js";
14
14
  import"./index-7g4c7s5r.js";
@@ -4,15 +4,15 @@ import {
4
4
  alreadyCuratedThisGeneration,
5
5
  claimNextScanBatch,
6
6
  getScanStatus
7
- } from "./index-gxbhp7sx.js";
8
- import"./index-kfmee1cr.js";
7
+ } from "./index-9qbr27bw.js";
8
+ import"./index-vacrzesw.js";
9
9
  import"./index-9e6fdz2h.js";
10
10
  import"./index-4rhhvd1a.js";
11
11
  import"./index-ae75rja9.js";
12
- import"./index-x8pm918t.js";
13
- import"./index-j20fzn0w.js";
12
+ import"./index-w0cj7zyd.js";
13
+ import"./index-qbpxrw95.js";
14
14
  import"./index-bk5tah7q.js";
15
- import"./index-kggqpefz.js";
15
+ import"./index-ycgm9pzg.js";
16
16
  import"./index-bghwrr59.js";
17
17
  import"./index-qyvjp0bq.js";
18
18
  import"./index-7g4c7s5r.js";
@@ -26,6 +26,7 @@ import {
26
26
  DEFAULT_ARCHITECT_PROFILE,
27
27
  DEFAULT_EXTERNAL_SKILLS_CONFIG,
28
28
  DEFAULT_MODEL_CONTEXT_TOKENS,
29
+ DEFAULT_PR_REVIEW_RESILIENCE_CONFIG,
29
30
  DEFAULT_SKILLS_CONFIG,
30
31
  DEFAULT_SKILL_OPT_CONFIG,
31
32
  DecisionDecaySchema,
@@ -64,6 +65,7 @@ import {
64
65
  PlanCursorConfigSchema,
65
66
  PluginConfigSchema,
66
67
  PrMonitorConfigSchema,
68
+ PrReviewResilienceConfigSchema,
67
69
  PricingConfigSchema,
68
70
  PrmConfigSchema,
69
71
  QualityBudgetConfigSchema,
@@ -97,7 +99,7 @@ import {
97
99
  resolveGeneratedAgentRole,
98
100
  resolveGuardrailsConfig,
99
101
  stripKnownSwarmPrefix
100
- } from "./index-fay8h6v8.js";
102
+ } from "./index-h8qed3pr.js";
101
103
  import"./index-cpg98bh1.js";
102
104
  import"./index-zjygnfay.js";
103
105
  import"./index-bk5tah7q.js";
@@ -138,6 +140,7 @@ export {
138
140
  QualityBudgetConfigSchema,
139
141
  PrmConfigSchema,
140
142
  PricingConfigSchema,
143
+ PrReviewResilienceConfigSchema,
141
144
  PrMonitorConfigSchema,
142
145
  PluginConfigSchema,
143
146
  PlanCursorConfigSchema,
@@ -176,6 +179,7 @@ export {
176
179
  DecisionDecaySchema,
177
180
  DEFAULT_SKILL_OPT_CONFIG,
178
181
  DEFAULT_SKILLS_CONFIG,
182
+ DEFAULT_PR_REVIEW_RESILIENCE_CONFIG,
179
183
  DEFAULT_MODEL_CONTEXT_TOKENS,
180
184
  DEFAULT_EXTERNAL_SKILLS_CONFIG,
181
185
  DEFAULT_ARCHITECT_PROFILE,
@@ -23,11 +23,11 @@ import {
23
23
  tombstoneScopeBinding,
24
24
  writeScopeBindingToDisk,
25
25
  writeScopeToDisk
26
- } from "./index-kwxp0z0n.js";
27
- import"./index-fzqhn96z.js";
26
+ } from "./index-zwn2e2pe.js";
27
+ import"./index-g8qbjqqz.js";
28
28
  import"./index-556ja8an.js";
29
- import"./index-5qwmpamg.js";
30
- import"./index-fay8h6v8.js";
29
+ import"./index-1c9mfnj0.js";
30
+ import"./index-h8qed3pr.js";
31
31
  import"./index-cpg98bh1.js";
32
32
  import"./index-9e6fdz2h.js";
33
33
  import"./index-4rhhvd1a.js";
@@ -36,7 +36,7 @@ import"./index-z6xqpmqg.js";
36
36
  import"./index-zj6t9zgx.js";
37
37
  import"./index-zjygnfay.js";
38
38
  import"./index-bk5tah7q.js";
39
- import"./index-kggqpefz.js";
39
+ import"./index-ycgm9pzg.js";
40
40
  import"./index-bghwrr59.js";
41
41
  import"./index-qyvjp0bq.js";
42
42
  import"./index-7g4c7s5r.js";
@@ -33,17 +33,17 @@ import {
33
33
  sanitizeSlug,
34
34
  selectCandidateEntries,
35
35
  writeEvalStub
36
- } from "./index-g3xt1d16.js";
37
- import"./index-q2mvacjr.js";
38
- import"./index-4p3qfb05.js";
36
+ } from "./index-txh3h83v.js";
37
+ import"./index-cw96tpy6.js";
38
+ import"./index-e1hjd15c.js";
39
39
  import"./index-rtry5xyf.js";
40
- import"./index-kfmee1cr.js";
41
- import"./index-zd1mfygt.js";
42
- import"./index-jfcgnvg6.js";
40
+ import"./index-vacrzesw.js";
41
+ import"./index-k46kg4t6.js";
42
+ import"./index-19f0zycs.js";
43
43
  import"./index-gprxjmm7.js";
44
44
  import"./index-n832052r.js";
45
- import"./index-5qwmpamg.js";
46
- import"./index-fay8h6v8.js";
45
+ import"./index-1c9mfnj0.js";
46
+ import"./index-h8qed3pr.js";
47
47
  import"./index-cpg98bh1.js";
48
48
  import"./index-9e6fdz2h.js";
49
49
  import"./index-4rhhvd1a.js";
@@ -52,10 +52,10 @@ import"./index-z6xqpmqg.js";
52
52
  import"./index-zj6t9zgx.js";
53
53
  import"./index-zjygnfay.js";
54
54
  import"./index-ae75rja9.js";
55
- import"./index-x8pm918t.js";
56
- import"./index-j20fzn0w.js";
55
+ import"./index-w0cj7zyd.js";
56
+ import"./index-qbpxrw95.js";
57
57
  import"./index-bk5tah7q.js";
58
- import"./index-kggqpefz.js";
58
+ import"./index-ycgm9pzg.js";
59
59
  import"./index-bghwrr59.js";
60
60
  import"./index-qyvjp0bq.js";
61
61
  import"./index-7g4c7s5r.js";
@@ -21,47 +21,47 @@ import {
21
21
  sanitizeWorktreeTaskId,
22
22
  standardWorktreeByCallID,
23
23
  standardWorktreeSerializationSessions
24
- } from "./index-pz2py5v7.js";
25
- import"./index-0a0asz2s.js";
26
- import"./index-vk15nbh4.js";
27
- import"./index-bma2wrqx.js";
28
- import"./index-d4e6wpkg.js";
29
- import"./index-nsr5b69r.js";
24
+ } from "./index-7x00nx8m.js";
25
+ import"./index-w5r84rd1.js";
26
+ import"./index-xz0ccakc.js";
27
+ import"./index-n7trn9wz.js";
28
+ import"./index-4qvsh3m5.js";
29
+ import"./index-zkaz3fhw.js";
30
30
  import"./index-134d35c1.js";
31
31
  import"./index-abtrcs16.js";
32
32
  import"./index-y8552snf.js";
33
- import"./index-f17j50dx.js";
34
- import"./index-gxbhp7sx.js";
33
+ import"./index-fksfxhmx.js";
34
+ import"./index-9qbr27bw.js";
35
35
  import"./index-70ha9e09.js";
36
36
  import"./index-c8s9a3zh.js";
37
37
  import"./index-9ss2m4rs.js";
38
38
  import"./index-z9yhhk6q.js";
39
39
  import"./index-5e5a1y2r.js";
40
- import"./index-g3xt1d16.js";
41
- import"./index-q2mvacjr.js";
42
- import"./index-4p3qfb05.js";
40
+ import"./index-txh3h83v.js";
41
+ import"./index-cw96tpy6.js";
42
+ import"./index-e1hjd15c.js";
43
43
  import"./index-rtry5xyf.js";
44
44
  import"./index-zsrtt42s.js";
45
45
  import"./index-97psh79d.js";
46
46
  import"./index-e1pxav9g.js";
47
- import"./index-92cxd0r1.js";
48
- import"./index-zsmsy1dh.js";
49
- import"./index-kwxp0z0n.js";
50
- import"./index-fzqhn96z.js";
47
+ import"./index-t7sfrv3v.js";
48
+ import"./index-tzyvmkd1.js";
49
+ import"./index-zwn2e2pe.js";
50
+ import"./index-g8qbjqqz.js";
51
51
  import"./index-556ja8an.js";
52
52
  import"./index-7sy3aa9m.js";
53
53
  import"./index-wx8zdh4a.js";
54
54
  import"./index-3g0xk6tk.js";
55
55
  import"./index-85gkedsf.js";
56
- import"./index-kfmee1cr.js";
57
- import"./index-zd1mfygt.js";
56
+ import"./index-vacrzesw.js";
57
+ import"./index-k46kg4t6.js";
58
58
  import {
59
59
  resolveWorktreeIsolationConfig
60
- } from "./index-jfcgnvg6.js";
60
+ } from "./index-19f0zycs.js";
61
61
  import"./index-gprxjmm7.js";
62
62
  import"./index-n832052r.js";
63
- import"./index-5qwmpamg.js";
64
- import"./index-fay8h6v8.js";
63
+ import"./index-1c9mfnj0.js";
64
+ import"./index-h8qed3pr.js";
65
65
  import"./index-cpg98bh1.js";
66
66
  import"./index-9e6fdz2h.js";
67
67
  import"./index-4rhhvd1a.js";
@@ -70,10 +70,10 @@ import"./index-z6xqpmqg.js";
70
70
  import"./index-zj6t9zgx.js";
71
71
  import"./index-zjygnfay.js";
72
72
  import"./index-ae75rja9.js";
73
- import"./index-x8pm918t.js";
74
- import"./index-j20fzn0w.js";
73
+ import"./index-w0cj7zyd.js";
74
+ import"./index-qbpxrw95.js";
75
75
  import"./index-bk5tah7q.js";
76
- import"./index-kggqpefz.js";
76
+ import"./index-ycgm9pzg.js";
77
77
  import"./index-bghwrr59.js";
78
78
  import"./index-qyvjp0bq.js";
79
79
  import"./index-7g4c7s5r.js";
@@ -833,7 +833,7 @@ export declare const COMMAND_REGISTRY: {
833
833
  readonly recover: {
834
834
  readonly handler: (ctx: CommandContext) => Promise<string>;
835
835
  readonly description: "Recover wedged coder settlements [task_id] [--force]";
836
- readonly details: "Settles stale coder-settlement WALs in .swarm/coder-settlements/ — the CODER_DISPATCH_IN_PROGRESS wedge where a dispatch's completion never fired (issue #2268). Safe mode recovers settlements whose owner process is gone. --force also releases ownership keys held by this process: use only when no dispatch is genuinely running (a late completion then reports CODER_SETTLEMENT_IDEMPOTENCY_CONFLICT, safe to ignore). Never interrupts another live OpenCode process. Human-only.";
836
+ readonly details: "Settles stale coder-settlement WALs in .swarm/coder-settlements/ — the CODER_DISPATCH_IN_PROGRESS wedge where a dispatch's completion never fired (issue #2268). Safe mode recovers settlements whose owner process is gone. --force also releases ownership keys held by this process: use only when no dispatch is genuinely running (a late completion then reports CODER_SETTLEMENT_IDEMPOTENCY_CONFLICT, safe to ignore). Never interrupts another live OpenCode process. Also repairs tasks wedged at coder_delegated with unattributed green pre_check evidence — the post-reset TASK_WORKFLOW_STAGE_A_REQUIRED wedge — by writing the missing stage_a_passed transition directly (audit events land in .swarm/events.jsonl); pass [task_id] to scope both phases to one task. Human-only.";
837
837
  readonly args: "[task_id] [--force]";
838
838
  readonly category: "utility";
839
839
  readonly toolPolicy: "human-only";
@@ -1727,6 +1727,21 @@ export declare const DEFAULT_SKILLS_CONFIG: SkillsConfig;
1727
1727
  * plugin load (AGENTS.md #1 — fail-open, bounded init).
1728
1728
  */
1729
1729
  export declare function resolveExternalSkillsConfig(input: unknown): ExternalSkillsConfig;
1730
+ export interface PrReviewResilienceConfig {
1731
+ enabled: boolean;
1732
+ canary_probe_ms: number;
1733
+ status_probe_timeout_ms: number;
1734
+ correlated_failure_threshold: number;
1735
+ max_retry_attempts_after_initial: number;
1736
+ }
1737
+ export declare const DEFAULT_PR_REVIEW_RESILIENCE_CONFIG: PrReviewResilienceConfig;
1738
+ export declare const PrReviewResilienceConfigSchema: z.ZodObject<{
1739
+ enabled: z.ZodDefault<z.ZodBoolean>;
1740
+ canary_probe_ms: z.ZodDefault<z.ZodNumber>;
1741
+ status_probe_timeout_ms: z.ZodDefault<z.ZodNumber>;
1742
+ correlated_failure_threshold: z.ZodDefault<z.ZodNumber>;
1743
+ max_retry_attempts_after_initial: z.ZodDefault<z.ZodNumber>;
1744
+ }, z.core.$strict>;
1730
1745
  export declare const PluginConfigSchema: z.ZodObject<{
1731
1746
  config_format_version: z.ZodDefault<z.ZodNumber>;
1732
1747
  agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -1816,6 +1831,13 @@ export declare const PluginConfigSchema: z.ZodObject<{
1816
1831
  background_subagents: z.ZodDefault<z.ZodBoolean>;
1817
1832
  background_pending_timeout_minutes: z.ZodDefault<z.ZodNumber>;
1818
1833
  }, z.core.$strip>>;
1834
+ pr_review_resilience: z.ZodOptional<z.ZodObject<{
1835
+ enabled: z.ZodDefault<z.ZodBoolean>;
1836
+ canary_probe_ms: z.ZodDefault<z.ZodNumber>;
1837
+ status_probe_timeout_ms: z.ZodDefault<z.ZodNumber>;
1838
+ correlated_failure_threshold: z.ZodDefault<z.ZodNumber>;
1839
+ max_retry_attempts_after_initial: z.ZodDefault<z.ZodNumber>;
1840
+ }, z.core.$strict>>;
1819
1841
  gates: z.ZodOptional<z.ZodObject<{
1820
1842
  syntax_check: z.ZodDefault<z.ZodObject<{
1821
1843
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -32,7 +32,42 @@ export declare const _internals: {
32
32
  */
33
33
  noOpStateSize: () => number;
34
34
  hasNoOpState: (sessionID: string) => boolean;
35
+ /**
36
+ * Durable Stage-A attribution fallback seam (TASK_WORKFLOW_STAGE_A_REQUIRED
37
+ * post-reset wedge). This is the production call site (see `toolBefore`
38
+ * below); it is also a substitution point tests may override to simulate
39
+ * reset-flow attribution without real WAL files. See
40
+ * {@link resolveDurableGateTaskId}.
41
+ */
42
+ resolveDurableGateTaskId: (directory: string, callerFiles: string[] | null) => Promise<DurableAttributionResult>;
35
43
  };
44
+ export declare function emitDurableAttributionAdvisory(sessionID: string, key: string, message: string): void;
45
+ /**
46
+ * Stage A workflow-transition write errors that indicate an attribution or
47
+ * correlation miss — the post-reset wedge signature. These escalate beyond a
48
+ * log line because every silent one is exactly how tasks wedge at
49
+ * coder_delegated with no diagnostic. Duplicate transitions never throw
50
+ * (isDuplicateTransition returns the existing evidence), so any throw here is
51
+ * abnormal; TASK_WORKFLOW_TERMINAL and fencing codes stay warn-only because a
52
+ * late gate result after close/settlement is expected churn, not a wedge.
53
+ *
54
+ * `TASK_WORKFLOW_GENERATION_MISMATCH` is deliberately EXCLUDED: it is a CAS
55
+ * fencing code that fires during ordinary concurrent/parallel-lane operation
56
+ * (a sibling transition legitimately bumped the generation between this
57
+ * call's read and write), not only after a reset. Escalating it here would
58
+ * turn a routine race into a false "run /swarm recover" advisory during
59
+ * normal, non-reset operation.
60
+ */
61
+ export declare const STAGE_A_ATTRIBUTION_MISS_CODES: Set<string>;
62
+ export declare function stageAWriteErrorCode(error: unknown): string | null;
63
+ type DurableAttributionResult = {
64
+ taskId: string;
65
+ } | {
66
+ ambiguous: string[];
67
+ } | {
68
+ unbound: string;
69
+ reason: 'files_mismatch' | 'truncated';
70
+ } | null;
36
71
  /**
37
72
  * Issue #853 Layer B: tools that are structurally blocked while
38
73
  * `.swarm/spec-staleness.json` exists.
@@ -5,6 +5,7 @@ import { type LaneOutputArtifact } from '../background/lane-output-store.js';
5
5
  import { type BackgroundDelegationRecord, type BackgroundDelegationResult, 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
+ import { type PrReviewResilienceConfig } from '../config/schema.js';
8
9
  import { classifyPrWorkflowGitState, type PrWorkflowGitState } from '../git/pr-workflow-state.js';
9
10
  export declare const PR_REVIEW_BASE_DIMENSION_IDS: readonly ["intent-architecture", "correctness-state", "tests-falsifiability", "security-trust", "reliability-performance", "compatibility-delivery"];
10
11
  export declare const PR_REVIEW_REQUIRED_MICRO_LANE_IDS: ("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")[];
@@ -161,6 +162,36 @@ interface PrReviewBaseDispatchRecord {
161
162
  }>;
162
163
  validatedAt: string;
163
164
  }
165
+ interface PrReviewResiliencePolicyRecord {
166
+ enabled: boolean;
167
+ canaryProbeMs: number;
168
+ statusProbeTimeoutMs: number;
169
+ correlatedFailureThreshold: number;
170
+ maxRetryAttemptsAfterInitial: number;
171
+ }
172
+ interface PrReviewResilienceAttemptRecord {
173
+ attempt: 0 | 1 | 2;
174
+ targetDimensions: PrReviewBaseDimensionId[];
175
+ canaryBatchId: string;
176
+ canaryLaneId: string;
177
+ canaryWorkflowLane: PrReviewBaseDimensionId;
178
+ admittedAt: string;
179
+ fanoutBatchId?: string;
180
+ }
181
+ interface PrReviewResilienceCircuitRecord {
182
+ signature: string;
183
+ count: number;
184
+ contributors: Array<{
185
+ batchId: string;
186
+ laneId: string;
187
+ }>;
188
+ openedAt: string;
189
+ }
190
+ interface PrReviewResilienceStateRecord {
191
+ policy: PrReviewResiliencePolicyRecord;
192
+ attempts: PrReviewResilienceAttemptRecord[];
193
+ circuit?: PrReviewResilienceCircuitRecord;
194
+ }
164
195
  interface PrFeedbackVerificationRecord {
165
196
  batchId: string;
166
197
  ownership: PrFeedbackLaneOwnership[];
@@ -299,6 +330,7 @@ export interface PrWorkflowGateState {
299
330
  prReviewBaseDispatches?: PrReviewBaseDispatchRecord[];
300
331
  /** @deprecated Compatibility projection of the most recent base dispatch. */
301
332
  prReviewBaseDispatch?: PrReviewBaseDispatchRecord;
333
+ prReviewResilience?: PrReviewResilienceStateRecord;
302
334
  /** Canonical ordered semantic ledger frozen by the first micro dispatch. */
303
335
  prReviewTriggerLedger?: PrReviewInlineTriggerRow[];
304
336
  prReviewTriggerEvalPath?: string;
@@ -650,11 +682,24 @@ export declare function assertCurrentCheckoutHead(directory: string, expectedHea
650
682
  /** Prove that every PR-review lane reads the immutable checked-out PR tree. */
651
683
  export declare function assertPrReviewCleanCheckout(directory: string, mode?: PrWorkflowMode): Promise<void>;
652
684
  export declare function enforcePrWorkflowDispatchLanesAsync(directory: string, sessionID: string, toolName: string): Promise<PrWorkflowGateState | null>;
653
- export declare function enforcePrReviewBaseDimensions(directory: string, sessionID: string, lanes: readonly PrWorkflowLaneSpec[], options: {
685
+ export declare class PrReviewResilienceCircuitOpenError extends Error {
686
+ readonly code: "PR_REVIEW_RESILIENCE_CIRCUIT_OPEN";
687
+ constructor(message: string);
688
+ }
689
+ export declare class PrReviewResilienceRetryExhaustedError extends Error {
690
+ readonly code: "PR_REVIEW_RESILIENCE_RETRY_EXHAUSTED";
691
+ constructor(message: string);
692
+ }
693
+ interface EnforcePrReviewBaseDimensionsOptions {
654
694
  batchId: string;
655
695
  prHeadSha: string;
656
696
  revisionDigest?: string;
657
- }): Promise<PrWorkflowGateState>;
697
+ prReviewWaveStage?: 'canary' | 'fanout';
698
+ prReviewWaveAttempt?: 0 | 1 | 2;
699
+ prReviewResiliencePolicy?: PrReviewResilienceConfig;
700
+ }
701
+ export declare function enforcePrReviewBaseDimensions(directory: string, sessionID: string, lanes: readonly PrWorkflowLaneSpec[], options: EnforcePrReviewBaseDimensionsOptions): Promise<PrWorkflowGateState>;
702
+ export declare function rollbackPrReviewBaseAdmissionIfUnlaunched(directory: string, sessionID: string, batchId: string): Promise<boolean>;
658
703
  declare function minimumConsolidatedLaneCover(sets: ReadonlyArray<readonly string[]>): number;
659
704
  /** Validate durable exact-six PR review evidence across all base and retry batches. */
660
705
  export declare function assertPrReviewBaseCoverageSettled(directory: string, sessionID: string, gateContext?: PrReviewGateContext): Promise<PrWorkflowGateState>;
@@ -822,6 +867,7 @@ export declare const _test_exports: {
822
867
  * that would silently drift if the cap ever moved.
823
868
  */
824
869
  MAX_WORKFLOW_BATCHES: number;
870
+ MAX_PR_REVIEW_RESILIENCE_CIRCUIT_CONTRIBUTORS: number;
825
871
  /**
826
872
  * The three ledger ceilings whose overflow makes the capacity GC abandon a
827
873
  * prune and keep every batch. Exposed on the same reasoning as
@@ -1,9 +1,15 @@
1
1
  import { claimPrFeedbackMonitorEvents, readPrFeedbackMonitorQueue } from '../background/pr-feedback-event-queue.js';
2
+ import { observePrWorkflowAutoWakeEvent } from './pr-workflow-auto-wake.js';
2
3
  import { type PrReviewDepthTier, readPrWorkflowGateState } from './pr-workflow-gate.js';
4
+ export declare const DEFAULT_BOUNDARY_QUIET_MS = 120000;
5
+ export declare const DEFAULT_BOUNDARY_WATCHDOG_MS = 5000;
6
+ export declare const DEFAULT_STATUS_PROBE_TIMEOUT_MS = 250;
7
+ export declare const MAX_TRACKED_BOUNDARY_TOOL_PARTS = 200;
3
8
  export declare const _internals: {
4
9
  readPrWorkflowGateState: typeof readPrWorkflowGateState;
5
10
  claimPrFeedbackMonitorEvents: typeof claimPrFeedbackMonitorEvents;
6
11
  readPrFeedbackMonitorQueue: typeof readPrFeedbackMonitorQueue;
12
+ observePrWorkflowAutoWakeEvent: typeof observePrWorkflowAutoWakeEvent;
7
13
  };
8
14
  /**
9
15
  * Maximum number of consecutive unproductive auto-resumes per gated session
@@ -85,9 +91,13 @@ export declare const DEFAULT_TOTAL_WAKE_CEILINGS: Record<PrReviewDepthTier, numb
85
91
  * messageID-less path).
86
92
  */
87
93
  export declare const MAX_TRACKED_WAKE_SESSIONS = 200;
94
+ type SessionReadiness = 'idle' | 'busy' | 'retry' | 'unknown';
88
95
  interface PrWorkflowResponseGateClient {
89
96
  session?: unknown;
90
97
  }
98
+ type TimerHandle = ReturnType<typeof setTimeout>;
99
+ type ScheduleTimer = (callback: () => void, delayMs: number) => TimerHandle;
100
+ type ClearScheduledTimer = (timer: TimerHandle) => void;
91
101
  interface WakeBudget {
92
102
  consecutiveUnproductive: number;
93
103
  lastWakeAt: number;
@@ -142,6 +152,12 @@ export declare function createPrWorkflowResponseGate(options: {
142
152
  maxConsecutiveUnproductiveWakes?: number;
143
153
  wakeCooldownMs?: number;
144
154
  bannerCooldownMs?: number;
155
+ boundaryQuietMs?: number;
156
+ boundaryWatchdogMs?: number;
157
+ statusProbeTimeoutMs?: number;
158
+ now?: () => number;
159
+ scheduleTimer?: ScheduleTimer;
160
+ clearScheduledTimer?: ClearScheduledTimer;
145
161
  /** Override the per-tier default total-wake ceilings. A single number
146
162
  * applies uniformly to all tiers; a partial Record allows per-tier
147
163
  * overrides with unspecified tiers falling back to the defaults.
@@ -166,5 +182,13 @@ export declare function createPrWorkflowResponseGate(options: {
166
182
  * without relying on `promptAsync` call counts alone.
167
183
  */
168
184
  _inspectWakeBudget: (sessionID: string) => WakeBudget | undefined;
185
+ _inspectBoundaryActivity: (sessionID: string) => {
186
+ lastParentActivityAt: number;
187
+ lastHostStatus: SessionReadiness;
188
+ activeToolPartCount: number;
189
+ quietDeadlineAt?: number;
190
+ watchdogDeadlineAt?: number;
191
+ hasTimer: boolean;
192
+ } | undefined;
169
193
  };
170
194
  export {};