opencode-swarm 7.166.2 → 7.166.4

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/.opencode/skills/council/SKILL.md +4 -1
  2. package/.opencode/skills/deep-dive/SKILL.md +1 -1
  3. package/.opencode/skills/deep-research/SKILL.md +4 -1
  4. package/.opencode/skills/gate-attribution/SKILL.md +3 -0
  5. package/.opencode/skills/pre-phase-briefing/SKILL.md +8 -0
  6. package/.opencode/skills/swarm-pr-review/SKILL.md +30 -30
  7. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  8. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  9. package/dist/cli/{coder-settlement-pv86n7n4.js → coder-settlement-yynntj5j.js} +11 -11
  10. package/dist/cli/{config-doctor-fy1aytwt.js → config-doctor-8asc35km.js} +2 -2
  11. package/dist/cli/{core-1d9vqbt4.js → core-qrbhs2q4.js} +1 -1
  12. package/dist/cli/{curation-policy-gnpgc3z7.js → curation-policy-bvxf5pxv.js} +9 -6
  13. package/dist/cli/{curator-drift-efmgp1v2.js → curator-drift-20m2ab5w.js} +4 -4
  14. package/dist/cli/curator-llm-factory-rs4921ks.js +71 -0
  15. package/dist/cli/{curator-a4rbehfr.js → curator-qk4xmkv4.js} +37 -36
  16. package/dist/cli/{evidence-summary-service-dvp1kbm4.js → evidence-summary-service-rktcp3s4.js} +15 -15
  17. package/dist/cli/{gate-evidence-qf27gdfx.js → gate-evidence-k6nzqca1.js} +6 -6
  18. package/dist/cli/guardrail-explain-jdspxzjr.js +72 -0
  19. package/dist/cli/{guardrail-log-qhw3knjt.js → guardrail-log-962pzjev.js} +7 -7
  20. package/dist/cli/{guardrail-reset-84ydxdg3.js → guardrail-reset-dv02t0bm.js} +37 -36
  21. package/dist/cli/{hive-promoter-y2daybf6.js → hive-promoter-9zzr28p2.js} +37 -36
  22. package/dist/cli/{index-ytsts0zj.js → index-0v6bf0j9.js} +1 -1
  23. package/dist/cli/{index-bysyj3z4.js → index-1aex5zd9.js} +1 -1
  24. package/dist/cli/{index-p0r5fn7y.js → index-251vrmge.js} +2 -2
  25. package/dist/cli/{index-sxe3t040.js → index-2w0beg3s.js} +2 -2
  26. package/dist/cli/{index-sxsyd7kf.js → index-3ct7fd75.js} +6 -6
  27. package/dist/cli/{index-jr6tppv9.js → index-3nm1b3t2.js} +7 -7
  28. package/dist/cli/{index-22sannyk.js → index-3s194swm.js} +36 -10
  29. package/dist/cli/{index-ft1tnx0e.js → index-5bd84nxc.js} +1 -1
  30. package/dist/cli/{index-gy55mc55.js → index-5qws47d4.js} +3369 -2820
  31. package/dist/cli/{index-7pp8fz4j.js → index-6d4dc99f.js} +1 -1
  32. package/dist/cli/{index-nthqfxzz.js → index-75f9jj3h.js} +2 -2
  33. package/dist/cli/{index-x4azb6qj.js → index-7g5kdtvw.js} +2 -2
  34. package/dist/cli/{index-qmp4gxac.js → index-8ewgab6z.js} +1 -1
  35. package/dist/cli/{index-0a0jsbhg.js → index-9eswrdp5.js} +1 -1
  36. package/dist/cli/{index-x8cvbkjs.js → index-9wv6a3jx.js} +2 -2
  37. package/dist/cli/{index-c0eyq4rp.js → index-bxrxqwce.js} +4 -4
  38. package/dist/cli/{index-bks56jbg.js → index-f6zgz02s.js} +3 -3
  39. package/dist/cli/{index-2n1v8ft1.js → index-gccxen4x.js} +5 -1
  40. package/dist/cli/{index-7mxrqy4r.js → index-gr5wg0nj.js} +7 -7
  41. package/dist/cli/{index-st47knj6.js → index-gsftf6c8.js} +3 -3
  42. package/dist/cli/{index-wz258yje.js → index-kwervbv6.js} +11 -11
  43. package/dist/cli/{index-3nww2vnx.js → index-kz44j3qe.js} +8 -8
  44. package/dist/cli/{index-19hjpqsy.js → index-m21x1bkx.js} +17 -9
  45. package/dist/cli/{index-j81kpway.js → index-m3tx1q9v.js} +1 -1
  46. package/dist/cli/{index-z1kmkh72.js → index-m9q6f3ty.js} +2 -2
  47. package/dist/cli/{index-3wtfrjcx.js → index-n189w64j.js} +3 -3
  48. package/dist/cli/{index-ty0wg9yp.js → index-n65x6e1y.js} +5 -5
  49. package/dist/cli/{index-hgphhnrp.js → index-qd619x3r.js} +2 -2
  50. package/dist/cli/{index-fkk7x6sy.js → index-qd726agw.js} +2 -2
  51. package/dist/cli/{index-jgtje76m.js → index-qv4byzwp.js} +94 -29
  52. package/dist/cli/{index-c23w8t46.js → index-qww0h314.js} +11 -6
  53. package/dist/cli/{index-y3dtdn2f.js → index-rk10x4zr.js} +1 -1
  54. package/dist/cli/{index-4kwxpnf8.js → index-sahf5yz3.js} +1 -1
  55. package/dist/cli/{index-e0bjbadr.js → index-shqhq68n.js} +8 -3
  56. package/dist/cli/{index-kd68b6mg.js → index-st1zw5ps.js} +2 -2
  57. package/dist/cli/{index-14z9en94.js → index-t8tw1bhs.js} +1 -1
  58. package/dist/cli/{index-9ccxcjdm.js → index-v5wanchr.js} +4 -4
  59. package/dist/cli/index-vzm6zre7.js +167 -0
  60. package/dist/cli/{index-8nv3bc9h.js → index-wd86yj53.js} +4 -4
  61. package/dist/cli/{index-nrdj94za.js → index-x8c42y8s.js} +39 -38
  62. package/dist/cli/{index-hbjax6hy.js → index-z62gdhkd.js} +8 -8
  63. package/dist/cli/index.js +37 -36
  64. package/dist/cli/{knowledge-escalator-aq7gzhpd.js → knowledge-escalator-w4bfnks3.js} +13 -12
  65. package/dist/cli/{knowledge-events-9z5sskyv.js → knowledge-events-wmnx8m6b.js} +10 -10
  66. package/dist/cli/{knowledge-link-ps2v4s18.js → knowledge-link-w1fwqts4.js} +4 -4
  67. package/dist/cli/{knowledge-store-1hzt2a0t.js → knowledge-store-5442ph4m.js} +8 -5
  68. package/dist/cli/{knowledge-validator-xe1fza7c.js → knowledge-validator-5rmardr4.js} +8 -7
  69. package/dist/cli/{pending-delegations-0nfjg7vp.js → pending-delegations-ea6zpqw2.js} +12 -11
  70. package/dist/cli/{pr-subscriptions-8974hwa0.js → pr-subscriptions-yqxt0avv.js} +12 -11
  71. package/dist/cli/{pr-workflow-gate-xgak5wvz.js → pr-workflow-gate-px36rczj.js} +37 -36
  72. package/dist/cli/{runner-7zqbp81n.js → runner-nmrjv7te.js} +5 -5
  73. package/dist/cli/{scan-cursor-hc4v0c90.js → scan-cursor-efrage98.js} +7 -6
  74. package/dist/cli/{schema-w1hsvw1h.js → schema-w2sds948.js} +3 -1
  75. package/dist/cli/{scope-persistence-k17003v4.js → scope-persistence-dd7p3tdv.js} +15 -14
  76. package/dist/cli/{skill-generator-tbxgpc9x.js → skill-generator-c0720k51.js} +15 -14
  77. package/dist/cli/{snapshot-coordination-init-vaf34wf0.js → snapshot-coordination-init-dp42vvme.js} +37 -36
  78. package/dist/cli/{telemetry-8qn4eag5.js → telemetry-ce0tx41h.js} +1 -1
  79. package/dist/cli/{workspace-snapshot-y85jy6gs.js → workspace-snapshot-0kxj2grt.js} +3 -3
  80. package/dist/cli/{worktree-collision-ownership-r3jdke7h.js → worktree-collision-ownership-emh2yhpx.js} +13 -12
  81. package/dist/cli/{worktree-isolation-sa1tbqff.js → worktree-isolation-a8f1yahq.js} +37 -36
  82. package/dist/commands/close.d.ts +82 -0
  83. package/dist/config/schema.d.ts +9 -0
  84. package/dist/context-map/capsule-persistence.d.ts +13 -8
  85. package/dist/hooks/delegate-ack-collector.d.ts +7 -0
  86. package/dist/hooks/knowledge-store.d.ts +7 -0
  87. package/dist/hooks/review-receipt.d.ts +29 -1
  88. package/dist/index.js +554 -551
  89. package/dist/knowledge/curation-policy.d.ts +7 -0
  90. package/dist/memory/consolidation-log.d.ts +9 -0
  91. package/dist/memory/injector.d.ts +7 -0
  92. package/dist/memory/run-log.d.ts +8 -0
  93. package/dist/retention/caps.d.ts +33 -0
  94. package/dist/retention/dir-prune.d.ts +72 -0
  95. package/dist/retention/jsonl-cap.d.ts +84 -0
  96. package/dist/retention/sweep.d.ts +67 -0
  97. package/dist/services/compaction-service.d.ts +14 -0
  98. package/dist/services/skill-changelog.d.ts +20 -0
  99. package/dist/summaries/manager.d.ts +41 -4
  100. package/dist/test-impact/history-store.d.ts +16 -0
  101. package/dist/turbo/epic/calibration.d.ts +16 -1
  102. package/dist/turbo/epic/divergence-recorder.d.ts +11 -0
  103. package/opencode-swarm.schema.json +15 -0
  104. package/package.json +1 -1
  105. package/dist/cli/curator-llm-factory-cwg62ynw.js +0 -70
  106. package/dist/cli/guardrail-explain-zskpzgsr.js +0 -71
@@ -1,16 +1,16 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailLog
4
- } from "./index-ytsts0zj.js";
5
- import"./index-3wtfrjcx.js";
4
+ } from "./index-0v6bf0j9.js";
5
+ import"./index-n189w64j.js";
6
6
  import"./index-p612v1mv.js";
7
- import"./index-hgphhnrp.js";
8
- import"./index-fkk7x6sy.js";
9
- import"./index-19hjpqsy.js";
10
- import"./index-bks56jbg.js";
7
+ import"./index-qd619x3r.js";
8
+ import"./index-qd726agw.js";
9
+ import"./index-m21x1bkx.js";
10
+ import"./index-f6zgz02s.js";
11
11
  import"./index-7qefgq4j.js";
12
12
  import"./index-ee6ydtfe.js";
13
- import"./index-e0bjbadr.js";
13
+ import"./index-shqhq68n.js";
14
14
  import"./index-0tc0pcmh.js";
15
15
  import"./index-bk5tah7q.js";
16
16
  import"./index-bpmtbmy9.js";
@@ -3,62 +3,63 @@ import {
3
3
  getAgentSession,
4
4
  getBlockingActionCircuit,
5
5
  resetActionCircuitExternally
6
- } from "./index-gy55mc55.js";
6
+ } from "./index-5qws47d4.js";
7
7
  import"./index-d5qf7hvh.js";
8
- import"./index-j81kpway.js";
9
- import"./index-3wtfrjcx.js";
10
- import"./index-2n1v8ft1.js";
11
- import"./index-wz258yje.js";
12
- import"./index-ft1tnx0e.js";
8
+ import"./index-m3tx1q9v.js";
9
+ import"./index-n189w64j.js";
10
+ import"./index-gccxen4x.js";
11
+ import"./index-kwervbv6.js";
12
+ import"./index-5bd84nxc.js";
13
13
  import"./index-txdagbh7.js";
14
14
  import"./index-cw912re7.js";
15
- import"./index-jgtje76m.js";
16
- import"./index-ty0wg9yp.js";
17
- import"./index-x4azb6qj.js";
15
+ import"./index-qv4byzwp.js";
16
+ import"./index-n65x6e1y.js";
17
+ import"./index-7g5kdtvw.js";
18
18
  import"./index-70ha9e09.js";
19
- import"./index-bysyj3z4.js";
19
+ import"./index-1aex5zd9.js";
20
20
  import"./index-9ss2m4rs.js";
21
- import"./index-jr6tppv9.js";
21
+ import"./index-3nm1b3t2.js";
22
22
  import"./index-zsrtt42s.js";
23
- import"./index-hbjax6hy.js";
24
- import"./index-p0r5fn7y.js";
25
- import"./index-x8cvbkjs.js";
23
+ import"./index-z62gdhkd.js";
24
+ import"./index-251vrmge.js";
25
+ import"./index-9wv6a3jx.js";
26
26
  import"./index-b43rt5ph.js";
27
27
  import"./index-q7sjgr1y.js";
28
- import"./index-c0eyq4rp.js";
29
- import"./index-qmp4gxac.js";
30
- import"./index-sxsyd7kf.js";
31
- import"./index-3nww2vnx.js";
32
- import"./index-4kwxpnf8.js";
28
+ import"./index-bxrxqwce.js";
29
+ import"./index-8ewgab6z.js";
30
+ import"./index-3ct7fd75.js";
31
+ import"./index-kz44j3qe.js";
32
+ import"./index-sahf5yz3.js";
33
33
  import"./index-p612v1mv.js";
34
- import"./index-8nv3bc9h.js";
35
- import"./index-c23w8t46.js";
34
+ import"./index-wd86yj53.js";
35
+ import"./index-qww0h314.js";
36
36
  import"./index-rtry5xyf.js";
37
- import"./index-kd68b6mg.js";
37
+ import"./index-st1zw5ps.js";
38
38
  import"./index-3qf1vxtb.js";
39
39
  import"./index-n832052r.js";
40
- import"./index-7mxrqy4r.js";
41
- import"./index-9ccxcjdm.js";
42
- import"./index-hgphhnrp.js";
43
- import"./index-nthqfxzz.js";
44
- import"./index-7pp8fz4j.js";
45
- import"./index-y3dtdn2f.js";
40
+ import"./index-gr5wg0nj.js";
41
+ import"./index-v5wanchr.js";
42
+ import"./index-qd619x3r.js";
43
+ import"./index-75f9jj3h.js";
44
+ import"./index-6d4dc99f.js";
45
+ import"./index-rk10x4zr.js";
46
46
  import"./index-ry16d01s.js";
47
47
  import"./index-n4fzmqz8.js";
48
- import"./index-fkk7x6sy.js";
49
- import"./index-22sannyk.js";
48
+ import"./index-qd726agw.js";
49
+ import"./index-3s194swm.js";
50
+ import"./index-vzm6zre7.js";
50
51
  import"./index-ae75rja9.js";
51
- import"./index-14z9en94.js";
52
- import"./index-sxe3t040.js";
53
- import"./index-19hjpqsy.js";
54
- import"./index-bks56jbg.js";
52
+ import"./index-t8tw1bhs.js";
53
+ import"./index-2w0beg3s.js";
54
+ import"./index-m21x1bkx.js";
55
+ import"./index-f6zgz02s.js";
55
56
  import"./index-7qefgq4j.js";
56
57
  import"./index-ee6ydtfe.js";
57
58
  import"./index-7g4c7s5r.js";
58
- import"./index-0a0jsbhg.js";
59
+ import"./index-9eswrdp5.js";
59
60
  import"./index-9e6fdz2h.js";
60
61
  import"./index-4rhhvd1a.js";
61
- import"./index-e0bjbadr.js";
62
+ import"./index-shqhq68n.js";
62
63
  import"./index-0tc0pcmh.js";
63
64
  import"./index-bk5tah7q.js";
64
65
  import"./index-bpmtbmy9.js";
@@ -7,64 +7,65 @@ import {
7
7
  isHiveEligible,
8
8
  promoteFromSwarm,
9
9
  promoteToHive
10
- } from "./index-gy55mc55.js";
10
+ } from "./index-5qws47d4.js";
11
11
  import"./index-d5qf7hvh.js";
12
- import"./index-j81kpway.js";
13
- import"./index-3wtfrjcx.js";
14
- import"./index-2n1v8ft1.js";
15
- import"./index-wz258yje.js";
16
- import"./index-ft1tnx0e.js";
12
+ import"./index-m3tx1q9v.js";
13
+ import"./index-n189w64j.js";
14
+ import"./index-gccxen4x.js";
15
+ import"./index-kwervbv6.js";
16
+ import"./index-5bd84nxc.js";
17
17
  import"./index-txdagbh7.js";
18
18
  import"./index-cw912re7.js";
19
- import"./index-jgtje76m.js";
20
- import"./index-ty0wg9yp.js";
21
- import"./index-x4azb6qj.js";
19
+ import"./index-qv4byzwp.js";
20
+ import"./index-n65x6e1y.js";
21
+ import"./index-7g5kdtvw.js";
22
22
  import"./index-70ha9e09.js";
23
- import"./index-bysyj3z4.js";
23
+ import"./index-1aex5zd9.js";
24
24
  import"./index-9ss2m4rs.js";
25
- import"./index-jr6tppv9.js";
25
+ import"./index-3nm1b3t2.js";
26
26
  import"./index-zsrtt42s.js";
27
- import"./index-hbjax6hy.js";
28
- import"./index-p0r5fn7y.js";
29
- import"./index-x8cvbkjs.js";
27
+ import"./index-z62gdhkd.js";
28
+ import"./index-251vrmge.js";
29
+ import"./index-9wv6a3jx.js";
30
30
  import"./index-b43rt5ph.js";
31
31
  import"./index-q7sjgr1y.js";
32
- import"./index-c0eyq4rp.js";
33
- import"./index-qmp4gxac.js";
34
- import"./index-sxsyd7kf.js";
35
- import"./index-3nww2vnx.js";
36
- import"./index-4kwxpnf8.js";
32
+ import"./index-bxrxqwce.js";
33
+ import"./index-8ewgab6z.js";
34
+ import"./index-3ct7fd75.js";
35
+ import"./index-kz44j3qe.js";
36
+ import"./index-sahf5yz3.js";
37
37
  import"./index-p612v1mv.js";
38
- import"./index-8nv3bc9h.js";
39
- import"./index-c23w8t46.js";
38
+ import"./index-wd86yj53.js";
39
+ import"./index-qww0h314.js";
40
40
  import"./index-rtry5xyf.js";
41
- import"./index-kd68b6mg.js";
41
+ import"./index-st1zw5ps.js";
42
42
  import"./index-3qf1vxtb.js";
43
43
  import"./index-n832052r.js";
44
- import"./index-7mxrqy4r.js";
45
- import"./index-9ccxcjdm.js";
46
- import"./index-hgphhnrp.js";
47
- import"./index-nthqfxzz.js";
48
- import"./index-7pp8fz4j.js";
49
- import"./index-y3dtdn2f.js";
44
+ import"./index-gr5wg0nj.js";
45
+ import"./index-v5wanchr.js";
46
+ import"./index-qd619x3r.js";
47
+ import"./index-75f9jj3h.js";
48
+ import"./index-6d4dc99f.js";
49
+ import"./index-rk10x4zr.js";
50
50
  import"./index-ry16d01s.js";
51
51
  import"./index-n4fzmqz8.js";
52
- import"./index-fkk7x6sy.js";
52
+ import"./index-qd726agw.js";
53
53
  import {
54
54
  resolveHiveKnowledgePath
55
- } from "./index-22sannyk.js";
55
+ } from "./index-3s194swm.js";
56
+ import"./index-vzm6zre7.js";
56
57
  import"./index-ae75rja9.js";
57
- import"./index-14z9en94.js";
58
- import"./index-sxe3t040.js";
59
- import"./index-19hjpqsy.js";
60
- import"./index-bks56jbg.js";
58
+ import"./index-t8tw1bhs.js";
59
+ import"./index-2w0beg3s.js";
60
+ import"./index-m21x1bkx.js";
61
+ import"./index-f6zgz02s.js";
61
62
  import"./index-7qefgq4j.js";
62
63
  import"./index-ee6ydtfe.js";
63
64
  import"./index-7g4c7s5r.js";
64
- import"./index-0a0jsbhg.js";
65
+ import"./index-9eswrdp5.js";
65
66
  import"./index-9e6fdz2h.js";
66
67
  import"./index-4rhhvd1a.js";
67
- import"./index-e0bjbadr.js";
68
+ import"./index-shqhq68n.js";
68
69
  import"./index-0tc0pcmh.js";
69
70
  import"./index-bk5tah7q.js";
70
71
  import"./index-bpmtbmy9.js";
@@ -4,7 +4,7 @@ import {
4
4
  readShellAuditTail,
5
5
  redactPath,
6
6
  redactShellCommand
7
- } from "./index-3wtfrjcx.js";
7
+ } from "./index-n189w64j.js";
8
8
 
9
9
  // src/services/guardrail-log-service.ts
10
10
  var BLOCK_TYPES = new Set([
@@ -5,7 +5,7 @@ import {
5
5
  batchDurabilityClass,
6
6
  classifyDbWriteError,
7
7
  getProjectDb
8
- } from "./index-y3dtdn2f.js";
8
+ } from "./index-rk10x4zr.js";
9
9
  import {
10
10
  _internals,
11
11
  canonicalRootKeyFresh
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-4kwxpnf8.js";
4
+ } from "./index-sahf5yz3.js";
5
5
  import {
6
6
  bunSpawn
7
7
  } from "./index-p612v1mv.js";
8
8
  import {
9
9
  atomicWriteSwarmFile
10
- } from "./index-19hjpqsy.js";
10
+ } from "./index-m21x1bkx.js";
11
11
  import {
12
12
  canonicalRootKey,
13
13
  sameProjectRoot
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  atomicWriteFileAnyRoot
4
- } from "./index-19hjpqsy.js";
4
+ } from "./index-m21x1bkx.js";
5
5
  import {
6
6
  emit
7
- } from "./index-bks56jbg.js";
7
+ } from "./index-f6zgz02s.js";
8
8
  import {
9
9
  require_proper_lockfile
10
10
  } from "./index-7g4c7s5r.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-4kwxpnf8.js";
4
+ } from "./index-sahf5yz3.js";
5
5
  import {
6
6
  bunWrite
7
7
  } from "./index-p612v1mv.js";
@@ -18,18 +18,18 @@ import {
18
18
  releaseCoordinationLease,
19
19
  transitionCoordinationState,
20
20
  withCoordinationTransaction
21
- } from "./index-7pp8fz4j.js";
21
+ } from "./index-6d4dc99f.js";
22
22
  import {
23
23
  getProjectDb,
24
24
  projectDbExists
25
- } from "./index-y3dtdn2f.js";
25
+ } from "./index-rk10x4zr.js";
26
26
  import {
27
27
  observeDelegationLedgerPressure
28
- } from "./index-fkk7x6sy.js";
28
+ } from "./index-qd726agw.js";
29
29
  import {
30
30
  EvidenceLockTimeoutError,
31
31
  withEvidenceLock
32
- } from "./index-sxe3t040.js";
32
+ } from "./index-2w0beg3s.js";
33
33
  import {
34
34
  canonicalRootKeyFresh,
35
35
  sameProjectRoot
@@ -4524,7 +4524,7 @@ async function reconcileLegacyCoderSettlements(directory, maxRecords, onReconcil
4524
4524
  const candidates = readDelegations(directory).filter((record) => record.normalizedAgent === "coder" && Boolean(record.legacyCoderSettlementTransfer) && Boolean(record.terminalResult)).slice(0, maxRecords);
4525
4525
  if (candidates.length === 0)
4526
4526
  return 0;
4527
- const { transferCoderSettlementToBackground } = await import("./coder-settlement-pv86n7n4.js");
4527
+ const { transferCoderSettlementToBackground } = await import("./coder-settlement-yynntj5j.js");
4528
4528
  let transferred = 0;
4529
4529
  for (const record of candidates) {
4530
4530
  try {
@@ -1,30 +1,30 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-4kwxpnf8.js";
4
+ } from "./index-sahf5yz3.js";
5
5
  import {
6
6
  deleteCoordinationState,
7
7
  importCoordinationOnce,
8
8
  listCoordinationStates,
9
9
  transitionCoordinationState,
10
10
  withCoordinationTransaction
11
- } from "./index-7pp8fz4j.js";
11
+ } from "./index-6d4dc99f.js";
12
12
  import {
13
13
  getProjectDb,
14
14
  projectDbExists
15
- } from "./index-y3dtdn2f.js";
15
+ } from "./index-rk10x4zr.js";
16
16
  import {
17
17
  observeStoreHealth
18
- } from "./index-fkk7x6sy.js";
18
+ } from "./index-qd726agw.js";
19
19
  import {
20
20
  withEvidenceLock
21
- } from "./index-sxe3t040.js";
21
+ } from "./index-2w0beg3s.js";
22
22
  import {
23
23
  atomicWriteSwarmFileSync
24
- } from "./index-19hjpqsy.js";
24
+ } from "./index-m21x1bkx.js";
25
25
  import {
26
26
  telemetry
27
- } from "./index-bks56jbg.js";
27
+ } from "./index-f6zgz02s.js";
28
28
  import {
29
29
  canonicalRootKey,
30
30
  canonicalRootKeyFresh,
@@ -1,4 +1,9 @@
1
1
  // @bun
2
+ import {
3
+ appendCappedJsonl,
4
+ readTailJsonl,
5
+ resolveRetentionCap
6
+ } from "./index-vzm6zre7.js";
2
7
  import {
3
8
  resolveHiveEventsPath,
4
9
  resolveHiveKnowledgePath,
@@ -6,13 +11,13 @@ import {
6
11
  } from "./index-ae75rja9.js";
7
12
  import {
8
13
  resolveKnowledgeStoreDir
9
- } from "./index-14z9en94.js";
14
+ } from "./index-t8tw1bhs.js";
10
15
  import {
11
16
  atomicWriteFile
12
- } from "./index-sxe3t040.js";
17
+ } from "./index-2w0beg3s.js";
13
18
  import {
14
19
  readCachedParsedFile
15
- } from "./index-19hjpqsy.js";
20
+ } from "./index-m21x1bkx.js";
16
21
  import {
17
22
  require_proper_lockfile
18
23
  } from "./index-7g4c7s5r.js";
@@ -216,11 +221,32 @@ function computeContentHash(lesson) {
216
221
  async function readRejectedLessons(directory) {
217
222
  return readKnowledge(resolveSwarmRejectedPath(directory));
218
223
  }
224
+ var MAX_RETRACTION_RECORDS = 500;
219
225
  async function readRetractionRecords(directory) {
220
- return readKnowledge(resolveSwarmRetractionsPath(directory));
226
+ return readTailJsonl(resolveSwarmRetractionsPath(directory), {
227
+ maxEntries: resolveRetentionCap("MAX_RETRACTION_RECORDS", MAX_RETRACTION_RECORDS)
228
+ });
221
229
  }
222
230
  async function appendRetractionRecord(directory, record) {
223
- await appendKnowledge(resolveSwarmRetractionsPath(directory), record);
231
+ const filePath = resolveSwarmRetractionsPath(directory);
232
+ const dir = path.dirname(filePath);
233
+ await mkdir(dir, { recursive: true });
234
+ let release = null;
235
+ try {
236
+ release = await import_proper_lockfile.default.lock(dir, {
237
+ retries: { retries: 5, minTimeout: 100, maxTimeout: 500 },
238
+ stale: 5000
239
+ });
240
+ await appendCappedJsonl(filePath, JSON.stringify(record), {
241
+ maxEntries: resolveRetentionCap("MAX_RETRACTION_RECORDS", MAX_RETRACTION_RECORDS)
242
+ });
243
+ } finally {
244
+ if (release) {
245
+ try {
246
+ await release();
247
+ } catch {}
248
+ }
249
+ }
224
250
  }
225
251
  async function appendRewriteHistory(directory, record) {
226
252
  const filePath = resolveRewriteHistoryPath(directory);
@@ -713,7 +739,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
713
739
  const {
714
740
  readAuthoritativeKnowledgeCounterRollups,
715
741
  effectiveRetrievalOutcomes
716
- } = await import("./knowledge-events-9z5sskyv.js");
742
+ } = await import("./knowledge-events-wmnx8m6b.js");
717
743
  const rollups = await readAuthoritativeKnowledgeCounterRollups(directory);
718
744
  const flagIds = new Set;
719
745
  for (const e of atFloor) {
@@ -780,11 +806,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
780
806
  });
781
807
  }
782
808
  if (action === "quarantine" && toQuarantine.length > 0) {
783
- const { quarantineEntry } = await import("./knowledge-validator-xe1fza7c.js");
784
- const { KnowledgeConfigSchema } = await import("./schema-w1hsvw1h.js");
809
+ const { quarantineEntry } = await import("./knowledge-validator-5rmardr4.js");
810
+ const { KnowledgeConfigSchema } = await import("./schema-w2sds948.js");
785
811
  let config;
786
812
  try {
787
- const { loadPluginConfigWithMeta } = await import("./index-st47knj6.js");
813
+ const { loadPluginConfigWithMeta } = await import("./index-gsftf6c8.js");
788
814
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
789
815
  config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
790
816
  } catch {
@@ -905,4 +931,4 @@ var _internals = {
905
931
  getArchivedKnowledgeIds
906
932
  };
907
933
 
908
- export { isActiveSwarmKnowledgeEntry, findActiveSwarmNearDuplicate, reinforceSwarmKnowledgeEntry, getPlatformConfigDir, resolveSwarmKnowledgePath, resolveSwarmRejectedPath, resolveSwarmRetractionsPath, resolveRewriteHistoryPath, resolveHiveKnowledgePath2 as resolveHiveKnowledgePath, resolveHiveRejectedPath2 as resolveHiveRejectedPath, resolveHiveEventsPath2 as resolveHiveEventsPath, readKnowledge, normalizeEntry, computeContentHash, readRejectedLessons, readRetractionRecords, appendRetractionRecord, appendRewriteHistory, readRewriteHistory, dedupeCapped, appendKnowledge, rewriteKnowledge, transactFile, transactKnowledge, transactKnowledgeWithCas, getArchivedKnowledgeIds, appendKnowledgeWithCapEnforcement, enforceKnowledgeCap, selectKnowledgeCapSurvivors, sweepAgedEntries, sweepStaleTodos, appendRejectedLesson, normalize, wordBigrams, jaccardBigram, findNearDuplicate, computeConfidence, MAX_CONFIRMED_BY, confirmEntriesPhase, OUTCOME_SIGNAL_SMOOTHING, computeOutcomeSignal, inferTags, bumpKnowledgeConfidenceBatch, bumpKnowledgeConfidenceBatchResult, _internals };
934
+ export { isActiveSwarmKnowledgeEntry, findActiveSwarmNearDuplicate, reinforceSwarmKnowledgeEntry, getPlatformConfigDir, resolveSwarmKnowledgePath, resolveSwarmRejectedPath, resolveSwarmRetractionsPath, resolveRewriteHistoryPath, resolveHiveKnowledgePath2 as resolveHiveKnowledgePath, resolveHiveRejectedPath2 as resolveHiveRejectedPath, resolveHiveEventsPath2 as resolveHiveEventsPath, readKnowledge, normalizeEntry, computeContentHash, readRejectedLessons, MAX_RETRACTION_RECORDS, readRetractionRecords, appendRetractionRecord, appendRewriteHistory, readRewriteHistory, dedupeCapped, appendKnowledge, rewriteKnowledge, transactFile, transactKnowledge, transactKnowledgeWithCas, getArchivedKnowledgeIds, appendKnowledgeWithCapEnforcement, enforceKnowledgeCap, selectKnowledgeCapSurvivors, sweepAgedEntries, sweepStaleTodos, appendRejectedLesson, normalize, wordBigrams, jaccardBigram, findNearDuplicate, computeConfidence, MAX_CONFIRMED_BY, confirmEntriesPhase, OUTCOME_SIGNAL_SMOOTHING, computeOutcomeSignal, inferTags, bumpKnowledgeConfidenceBatch, bumpKnowledgeConfidenceBatchResult, _internals };
@@ -11,7 +11,7 @@ import {
11
11
  assertProjectRoot,
12
12
  atomicWriteFile,
13
13
  withEvidenceLock
14
- } from "./index-sxe3t040.js";
14
+ } from "./index-2w0beg3s.js";
15
15
  import {
16
16
  exports_external,
17
17
  init_zod