opencode-swarm 7.134.3 → 7.135.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 (64) hide show
  1. package/dist/background/pr-monitor-worker.d.ts +14 -13
  2. package/dist/cli/{config-doctor-yqwm2tfh.js → config-doctor-6398t3a6.js} +2 -2
  3. package/dist/cli/{core-d6yd2jzv.js → core-9876t6cs.js} +1 -1
  4. package/dist/cli/{curation-policy-x5m4x34n.js → curation-policy-f7qz4tez.js} +6 -6
  5. package/dist/cli/{curator-thrwgwh1.js → curator-fjhyezyx.js} +23 -23
  6. package/dist/cli/{curator-llm-factory-24mjnh2y.js → curator-llm-factory-wr3zmy2c.js} +23 -23
  7. package/dist/cli/{evidence-summary-service-pay9409b.js → evidence-summary-service-0cczdmjv.js} +6 -6
  8. package/dist/cli/{gate-evidence-b5v1xvxp.js → gate-evidence-8zrwdj69.js} +4 -4
  9. package/dist/cli/{guardrail-explain-nmfq71cm.js → guardrail-explain-g1s89b3e.js} +24 -24
  10. package/dist/cli/{guardrail-log-2a61rz1w.js → guardrail-log-bd45kw0x.js} +3 -3
  11. package/dist/cli/{hive-promoter-2nkjjwgc.js → hive-promoter-f2yh22m1.js} +23 -23
  12. package/dist/cli/{index-5nybajn9.js → index-09b9zncg.js} +1 -1
  13. package/dist/cli/{index-1mq8kmp6.js → index-247b1c1m.js} +3 -3
  14. package/dist/cli/{index-q3m6bpx2.js → index-2nqsr1dx.js} +4 -4
  15. package/dist/cli/{index-yaptf0hg.js → index-4pdrmemy.js} +2 -2
  16. package/dist/cli/{index-2b7sv71f.js → index-5vp9gka3.js} +1 -1
  17. package/dist/cli/{index-mgr951p8.js → index-5wx8wdxg.js} +5 -5
  18. package/dist/cli/{index-q2rrv0cy.js → index-7a2hm51h.js} +57 -2
  19. package/dist/cli/{index-y3v1404y.js → index-7an2qn0s.js} +1 -1
  20. package/dist/cli/{index-6kfqz0jw.js → index-aky90eqz.js} +1289 -1124
  21. package/dist/cli/{index-wk1h5ec2.js → index-b7p0mp2q.js} +2 -2
  22. package/dist/cli/{index-5f403c30.js → index-bjrkg4tc.js} +2 -2
  23. package/dist/cli/{index-tsmjmhnk.js → index-dzaarxhg.js} +2 -2
  24. package/dist/cli/{index-8fhg2nt2.js → index-ens0gt38.js} +5 -5
  25. package/dist/cli/{index-p8hezdtz.js → index-fpkb3mw1.js} +1 -1
  26. package/dist/cli/{index-2t1n9k7b.js → index-fwkqq9mq.js} +1 -1
  27. package/dist/cli/{index-6wya5cqh.js → index-g1drmgxe.js} +3 -3
  28. package/dist/cli/{index-rjngxx7q.js → index-j89zmcpx.js} +6 -6
  29. package/dist/cli/{index-yqvh2s4w.js → index-jtshf1pd.js} +1 -1
  30. package/dist/cli/{index-ddxt327j.js → index-jxchddjk.js} +1 -1
  31. package/dist/cli/{index-8wktghbc.js → index-nbnqf4fj.js} +1 -1
  32. package/dist/cli/{index-txwm0fv4.js → index-w80r3axq.js} +25 -25
  33. package/dist/cli/{index-reesz606.js → index-wdkkf3xg.js} +2 -2
  34. package/dist/cli/{index-4p02dp92.js → index-wxyxf0bd.js} +2 -2
  35. package/dist/cli/{index-dd7ttx8x.js → index-xg9repnx.js} +1 -1
  36. package/dist/cli/{index-y3rj2jgb.js → index-xhpmagdm.js} +2 -2
  37. package/dist/cli/{index-cfkvc5q9.js → index-yhba8swx.js} +1 -1
  38. package/dist/cli/{index-1j3682j8.js → index-z085b4ka.js} +1 -1
  39. package/dist/cli/index.js +23 -23
  40. package/dist/cli/{knowledge-escalator-fqsavryx.js → knowledge-escalator-4tp3yy7e.js} +7 -7
  41. package/dist/cli/{knowledge-events-ykt8vrvj.js → knowledge-events-7854gb3p.js} +5 -5
  42. package/dist/cli/{knowledge-link-nc4y2zkq.js → knowledge-link-etrfntkd.js} +4 -4
  43. package/dist/cli/{knowledge-store-tpd98m39.js → knowledge-store-cxnr6v01.js} +5 -5
  44. package/dist/cli/{knowledge-validator-kc7fnt2r.js → knowledge-validator-3n5t55qy.js} +8 -8
  45. package/dist/cli/{pending-delegations-v9e40hfk.js → pending-delegations-4z3tkkct.js} +3 -3
  46. package/dist/cli/{pr-subscriptions-ztq40hrt.js → pr-subscriptions-29j794kd.js} +3 -3
  47. package/dist/cli/{scan-cursor-121b73j0.js → scan-cursor-0cexjh3b.js} +6 -6
  48. package/dist/cli/{schema-jb4p8ja9.js → schema-rs5a7ywx.js} +1 -1
  49. package/dist/cli/{scope-persistence-hz3zmmsv.js → scope-persistence-1vsnkmm4.js} +4 -4
  50. package/dist/cli/{skill-generator-m2g5mdva.js → skill-generator-n0h9n0zd.js} +9 -9
  51. package/dist/cli/{telemetry-qh78ymq4.js → telemetry-859khp82.js} +9 -1
  52. package/dist/cli/{worktree-collision-ownership-c4bdnjtx.js → worktree-collision-ownership-dtwr0xj4.js} +3 -3
  53. package/dist/commands/context-map-stats.d.ts +5 -0
  54. package/dist/commands/registry.d.ts +14 -0
  55. package/dist/hooks/scope-guard.d.ts +11 -4
  56. package/dist/index.js +189 -187
  57. package/dist/scope/scope-binding.d.ts +68 -0
  58. package/dist/services/status-service.d.ts +12 -2
  59. package/dist/session/snapshot-reader.d.ts +6 -0
  60. package/dist/state.d.ts +118 -0
  61. package/dist/telemetry.d.ts +5 -0
  62. package/dist/turbo/lean/lane-scope.d.ts +120 -0
  63. package/dist/turbo/lean/runner.d.ts +66 -4
  64. package/package.json +1 -1
@@ -28,6 +28,20 @@ export interface AutomationEvent<T = unknown> {
28
28
  payload: T;
29
29
  source: string;
30
30
  }
31
+ /**
32
+ * Determine whether to skip polling a PR based on idle backoff (issue #1691).
33
+ *
34
+ * After N consecutive no-change polls, skip cycles deterministically:
35
+ * idle 0-2: poll every cycle (no skip)
36
+ * idle 3-5: poll every 2nd cycle (50% reduction)
37
+ * idle 6+: poll every 3rd cycle (67% reduction) — 3× cap per General Council
38
+ *
39
+ * Uses pollCycleCount for deterministic scheduling (no random skips).
40
+ * Any detected change resets the counter to 0.
41
+ *
42
+ * Pure function — exported for direct unit testing without worker setup.
43
+ */
44
+ export declare function shouldSkipIdlePoll(idleCount: number, cycleNumber: number): boolean;
31
45
  /**
32
46
  * PR Monitor Worker.
33
47
  *
@@ -134,19 +148,6 @@ export declare class PrMonitorWorker {
134
148
  * circuit-breaker suspension with exponential backoff.
135
149
  */
136
150
  private handlePollError;
137
- /**
138
- * Determine whether to skip polling a PR based on idle backoff (issue #1691).
139
- *
140
- * After N consecutive no-change polls, skip cycles deterministically:
141
- * idle 0-2: poll every cycle (no skip)
142
- * idle 3-5: poll every 2nd cycle (50% reduction)
143
- * idle 6-9: poll every 3rd cycle (67% reduction)
144
- * idle 10+: poll every 5th cycle (80% reduction)
145
- *
146
- * Uses pollCycleCount for deterministic scheduling (no random skips).
147
- * Any detected change resets the counter to 0.
148
- */
149
- private shouldSkipIdlePoll;
150
151
  /**
151
152
  * Publish an event to the global event bus and optional callback.
152
153
  */
@@ -12,8 +12,8 @@ import {
12
12
  shouldRunOnStartup,
13
13
  writeBackupArtifact,
14
14
  writeDoctorArtifact
15
- } from "./index-2b7sv71f.js";
16
- import"./index-tsmjmhnk.js";
15
+ } from "./index-5vp9gka3.js";
16
+ import"./index-dzaarxhg.js";
17
17
  import"./index-bk5tah7q.js";
18
18
  import"./index-bpmtbmy9.js";
19
19
  import"./index-z6xqpmqg.js";
@@ -14,7 +14,7 @@ import {
14
14
  resolveWorktreeBaseDir,
15
15
  shortenWorktreePath,
16
16
  writeLaneProfileToDiskReal
17
- } from "./index-2t1n9k7b.js";
17
+ } from "./index-fwkqq9mq.js";
18
18
  import"./index-4rhhvd1a.js";
19
19
  import"./index-z6xqpmqg.js";
20
20
  import"./index-zjygnfay.js";
@@ -4,16 +4,16 @@ import {
4
4
  authorizeCuration,
5
5
  buildConfigFingerprintInput,
6
6
  readCohortConfigFingerprint
7
- } from "./index-y3rj2jgb.js";
7
+ } from "./index-xhpmagdm.js";
8
8
  import"./index-rtry5xyf.js";
9
- import"./index-6wya5cqh.js";
9
+ import"./index-g1drmgxe.js";
10
10
  import"./index-ae75rja9.js";
11
- import"./index-cfkvc5q9.js";
12
- import"./index-dd7ttx8x.js";
11
+ import"./index-yhba8swx.js";
12
+ import"./index-xg9repnx.js";
13
13
  import"./index-fsrp8wp3.js";
14
- import"./index-5nybajn9.js";
14
+ import"./index-09b9zncg.js";
15
15
  import"./index-7g4c7s5r.js";
16
- import"./index-q2rrv0cy.js";
16
+ import"./index-7a2hm51h.js";
17
17
  import"./index-qe3v54nb.js";
18
18
  import"./index-zgwm4ryv.js";
19
19
  import"./index-a76rekgs.js";
@@ -14,49 +14,49 @@ import {
14
14
  runCuratorInit,
15
15
  runCuratorPhase,
16
16
  writeCuratorSummary
17
- } from "./index-6kfqz0jw.js";
17
+ } from "./index-aky90eqz.js";
18
18
  import"./index-13xxjfhn.js";
19
- import"./index-yqvh2s4w.js";
20
- import"./index-2b7sv71f.js";
21
- import"./index-8fhg2nt2.js";
19
+ import"./index-jtshf1pd.js";
20
+ import"./index-5vp9gka3.js";
21
+ import"./index-ens0gt38.js";
22
22
  import"./index-4905hd2m.js";
23
23
  import"./index-134d35c1.js";
24
- import"./index-1mq8kmp6.js";
25
- import"./index-mgr951p8.js";
26
- import"./index-5f403c30.js";
24
+ import"./index-247b1c1m.js";
25
+ import"./index-5wx8wdxg.js";
26
+ import"./index-bjrkg4tc.js";
27
27
  import"./index-vxv732ex.js";
28
28
  import"./index-c8s9a3zh.js";
29
29
  import"./index-9ss2m4rs.js";
30
- import"./index-wk1h5ec2.js";
31
- import"./index-1j3682j8.js";
32
- import"./index-q3m6bpx2.js";
33
- import"./index-y3rj2jgb.js";
30
+ import"./index-b7p0mp2q.js";
31
+ import"./index-z085b4ka.js";
32
+ import"./index-2nqsr1dx.js";
33
+ import"./index-xhpmagdm.js";
34
34
  import"./index-rtry5xyf.js";
35
- import"./index-rjngxx7q.js";
36
- import"./index-6wya5cqh.js";
35
+ import"./index-j89zmcpx.js";
36
+ import"./index-g1drmgxe.js";
37
37
  import"./index-ae75rja9.js";
38
- import"./index-cfkvc5q9.js";
39
- import"./index-dd7ttx8x.js";
40
- import"./index-ddxt327j.js";
38
+ import"./index-yhba8swx.js";
39
+ import"./index-xg9repnx.js";
40
+ import"./index-jxchddjk.js";
41
41
  import"./index-k5jrywpr.js";
42
42
  import"./index-n832052r.js";
43
- import"./index-tsmjmhnk.js";
43
+ import"./index-dzaarxhg.js";
44
44
  import"./index-bk5tah7q.js";
45
45
  import"./index-8fwhhayc.js";
46
46
  import"./index-q1exe2b3.js";
47
- import"./index-p8hezdtz.js";
48
- import"./index-4p02dp92.js";
47
+ import"./index-fpkb3mw1.js";
48
+ import"./index-wxyxf0bd.js";
49
49
  import"./index-1kz6da87.js";
50
50
  import"./index-b4z7s917.js";
51
51
  import"./index-b8zgtz81.js";
52
- import"./index-2t1n9k7b.js";
52
+ import"./index-fwkqq9mq.js";
53
53
  import"./index-4rhhvd1a.js";
54
- import"./index-y3v1404y.js";
54
+ import"./index-7an2qn0s.js";
55
55
  import"./index-2ghkk9ve.js";
56
56
  import"./index-fsrp8wp3.js";
57
- import"./index-5nybajn9.js";
57
+ import"./index-09b9zncg.js";
58
58
  import"./index-7g4c7s5r.js";
59
- import"./index-q2rrv0cy.js";
59
+ import"./index-7a2hm51h.js";
60
60
  import"./index-bpmtbmy9.js";
61
61
  import"./index-z6xqpmqg.js";
62
62
  import"./index-zjygnfay.js";
@@ -1,49 +1,49 @@
1
1
  // @bun
2
2
  import {
3
3
  createCuratorLLMDelegate
4
- } from "./index-6kfqz0jw.js";
4
+ } from "./index-aky90eqz.js";
5
5
  import"./index-13xxjfhn.js";
6
- import"./index-yqvh2s4w.js";
7
- import"./index-2b7sv71f.js";
8
- import"./index-8fhg2nt2.js";
6
+ import"./index-jtshf1pd.js";
7
+ import"./index-5vp9gka3.js";
8
+ import"./index-ens0gt38.js";
9
9
  import"./index-4905hd2m.js";
10
10
  import"./index-134d35c1.js";
11
- import"./index-1mq8kmp6.js";
12
- import"./index-mgr951p8.js";
13
- import"./index-5f403c30.js";
11
+ import"./index-247b1c1m.js";
12
+ import"./index-5wx8wdxg.js";
13
+ import"./index-bjrkg4tc.js";
14
14
  import"./index-vxv732ex.js";
15
15
  import"./index-c8s9a3zh.js";
16
16
  import"./index-9ss2m4rs.js";
17
- import"./index-wk1h5ec2.js";
18
- import"./index-1j3682j8.js";
19
- import"./index-q3m6bpx2.js";
20
- import"./index-y3rj2jgb.js";
17
+ import"./index-b7p0mp2q.js";
18
+ import"./index-z085b4ka.js";
19
+ import"./index-2nqsr1dx.js";
20
+ import"./index-xhpmagdm.js";
21
21
  import"./index-rtry5xyf.js";
22
- import"./index-rjngxx7q.js";
23
- import"./index-6wya5cqh.js";
22
+ import"./index-j89zmcpx.js";
23
+ import"./index-g1drmgxe.js";
24
24
  import"./index-ae75rja9.js";
25
- import"./index-cfkvc5q9.js";
26
- import"./index-dd7ttx8x.js";
27
- import"./index-ddxt327j.js";
25
+ import"./index-yhba8swx.js";
26
+ import"./index-xg9repnx.js";
27
+ import"./index-jxchddjk.js";
28
28
  import"./index-k5jrywpr.js";
29
29
  import"./index-n832052r.js";
30
- import"./index-tsmjmhnk.js";
30
+ import"./index-dzaarxhg.js";
31
31
  import"./index-bk5tah7q.js";
32
32
  import"./index-8fwhhayc.js";
33
33
  import"./index-q1exe2b3.js";
34
- import"./index-p8hezdtz.js";
35
- import"./index-4p02dp92.js";
34
+ import"./index-fpkb3mw1.js";
35
+ import"./index-wxyxf0bd.js";
36
36
  import"./index-1kz6da87.js";
37
37
  import"./index-b4z7s917.js";
38
38
  import"./index-b8zgtz81.js";
39
- import"./index-2t1n9k7b.js";
39
+ import"./index-fwkqq9mq.js";
40
40
  import"./index-4rhhvd1a.js";
41
- import"./index-y3v1404y.js";
41
+ import"./index-7an2qn0s.js";
42
42
  import"./index-2ghkk9ve.js";
43
43
  import"./index-fsrp8wp3.js";
44
- import"./index-5nybajn9.js";
44
+ import"./index-09b9zncg.js";
45
45
  import"./index-7g4c7s5r.js";
46
- import"./index-q2rrv0cy.js";
46
+ import"./index-7a2hm51h.js";
47
47
  import"./index-bpmtbmy9.js";
48
48
  import"./index-z6xqpmqg.js";
49
49
  import"./index-zjygnfay.js";
@@ -6,22 +6,22 @@ import {
6
6
  loadPlanJsonOnly,
7
7
  mergeDurableGateEntriesFromEvidence,
8
8
  readDurableGateEvidence
9
- } from "./index-8fhg2nt2.js";
9
+ } from "./index-ens0gt38.js";
10
10
  import"./index-9ss2m4rs.js";
11
- import"./index-wk1h5ec2.js";
12
- import"./index-dd7ttx8x.js";
11
+ import"./index-b7p0mp2q.js";
12
+ import"./index-xg9repnx.js";
13
13
  import"./index-k5jrywpr.js";
14
14
  import"./index-n832052r.js";
15
15
  import"./index-q1exe2b3.js";
16
- import"./index-4p02dp92.js";
16
+ import"./index-wxyxf0bd.js";
17
17
  import"./index-1kz6da87.js";
18
18
  import"./index-b8zgtz81.js";
19
19
  import"./index-4rhhvd1a.js";
20
20
  import"./index-2ghkk9ve.js";
21
21
  import"./index-fsrp8wp3.js";
22
- import"./index-5nybajn9.js";
22
+ import"./index-09b9zncg.js";
23
23
  import"./index-7g4c7s5r.js";
24
- import"./index-q2rrv0cy.js";
24
+ import"./index-7a2hm51h.js";
25
25
  import"./index-bpmtbmy9.js";
26
26
  import"./index-z6xqpmqg.js";
27
27
  import"./index-zjygnfay.js";
@@ -9,12 +9,12 @@ import {
9
9
  readTaskEvidenceRaw,
10
10
  recordAgentDispatch,
11
11
  recordGateEvidence
12
- } from "./index-wk1h5ec2.js";
13
- import"./index-dd7ttx8x.js";
12
+ } from "./index-b7p0mp2q.js";
13
+ import"./index-xg9repnx.js";
14
14
  import"./index-fsrp8wp3.js";
15
- import"./index-5nybajn9.js";
15
+ import"./index-09b9zncg.js";
16
16
  import"./index-7g4c7s5r.js";
17
- import"./index-q2rrv0cy.js";
17
+ import"./index-7a2hm51h.js";
18
18
  import"./index-bpmtbmy9.js";
19
19
  import"./index-qe3v54nb.js";
20
20
  import"./index-a76rekgs.js";
@@ -1,50 +1,50 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-yaptf0hg.js";
5
- import"./index-6kfqz0jw.js";
4
+ } from "./index-4pdrmemy.js";
5
+ import"./index-aky90eqz.js";
6
6
  import"./index-13xxjfhn.js";
7
- import"./index-yqvh2s4w.js";
8
- import"./index-2b7sv71f.js";
9
- import"./index-8fhg2nt2.js";
7
+ import"./index-jtshf1pd.js";
8
+ import"./index-5vp9gka3.js";
9
+ import"./index-ens0gt38.js";
10
10
  import"./index-4905hd2m.js";
11
11
  import"./index-134d35c1.js";
12
- import"./index-1mq8kmp6.js";
13
- import"./index-mgr951p8.js";
14
- import"./index-5f403c30.js";
12
+ import"./index-247b1c1m.js";
13
+ import"./index-5wx8wdxg.js";
14
+ import"./index-bjrkg4tc.js";
15
15
  import"./index-vxv732ex.js";
16
16
  import"./index-c8s9a3zh.js";
17
17
  import"./index-9ss2m4rs.js";
18
- import"./index-wk1h5ec2.js";
19
- import"./index-1j3682j8.js";
20
- import"./index-q3m6bpx2.js";
21
- import"./index-y3rj2jgb.js";
18
+ import"./index-b7p0mp2q.js";
19
+ import"./index-z085b4ka.js";
20
+ import"./index-2nqsr1dx.js";
21
+ import"./index-xhpmagdm.js";
22
22
  import"./index-rtry5xyf.js";
23
- import"./index-rjngxx7q.js";
24
- import"./index-6wya5cqh.js";
23
+ import"./index-j89zmcpx.js";
24
+ import"./index-g1drmgxe.js";
25
25
  import"./index-ae75rja9.js";
26
- import"./index-cfkvc5q9.js";
27
- import"./index-dd7ttx8x.js";
28
- import"./index-ddxt327j.js";
26
+ import"./index-yhba8swx.js";
27
+ import"./index-xg9repnx.js";
28
+ import"./index-jxchddjk.js";
29
29
  import"./index-k5jrywpr.js";
30
30
  import"./index-n832052r.js";
31
- import"./index-tsmjmhnk.js";
31
+ import"./index-dzaarxhg.js";
32
32
  import"./index-bk5tah7q.js";
33
33
  import"./index-8fwhhayc.js";
34
34
  import"./index-q1exe2b3.js";
35
- import"./index-p8hezdtz.js";
36
- import"./index-4p02dp92.js";
35
+ import"./index-fpkb3mw1.js";
36
+ import"./index-wxyxf0bd.js";
37
37
  import"./index-1kz6da87.js";
38
38
  import"./index-b4z7s917.js";
39
39
  import"./index-b8zgtz81.js";
40
- import"./index-2t1n9k7b.js";
40
+ import"./index-fwkqq9mq.js";
41
41
  import"./index-4rhhvd1a.js";
42
- import"./index-y3v1404y.js";
42
+ import"./index-7an2qn0s.js";
43
43
  import"./index-2ghkk9ve.js";
44
44
  import"./index-fsrp8wp3.js";
45
- import"./index-5nybajn9.js";
45
+ import"./index-09b9zncg.js";
46
46
  import"./index-7g4c7s5r.js";
47
- import"./index-q2rrv0cy.js";
47
+ import"./index-7a2hm51h.js";
48
48
  import"./index-bpmtbmy9.js";
49
49
  import"./index-z6xqpmqg.js";
50
50
  import"./index-zjygnfay.js";
@@ -1,9 +1,9 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailLog
4
- } from "./index-8wktghbc.js";
5
- import"./index-yqvh2s4w.js";
6
- import"./index-tsmjmhnk.js";
4
+ } from "./index-nbnqf4fj.js";
5
+ import"./index-jtshf1pd.js";
6
+ import"./index-dzaarxhg.js";
7
7
  import"./index-bk5tah7q.js";
8
8
  import"./index-bpmtbmy9.js";
9
9
  import"./index-z6xqpmqg.js";
@@ -7,51 +7,51 @@ import {
7
7
  isHiveEligible,
8
8
  promoteFromSwarm,
9
9
  promoteToHive
10
- } from "./index-6kfqz0jw.js";
10
+ } from "./index-aky90eqz.js";
11
11
  import"./index-13xxjfhn.js";
12
- import"./index-yqvh2s4w.js";
13
- import"./index-2b7sv71f.js";
14
- import"./index-8fhg2nt2.js";
12
+ import"./index-jtshf1pd.js";
13
+ import"./index-5vp9gka3.js";
14
+ import"./index-ens0gt38.js";
15
15
  import"./index-4905hd2m.js";
16
16
  import"./index-134d35c1.js";
17
- import"./index-1mq8kmp6.js";
18
- import"./index-mgr951p8.js";
19
- import"./index-5f403c30.js";
17
+ import"./index-247b1c1m.js";
18
+ import"./index-5wx8wdxg.js";
19
+ import"./index-bjrkg4tc.js";
20
20
  import"./index-vxv732ex.js";
21
21
  import"./index-c8s9a3zh.js";
22
22
  import"./index-9ss2m4rs.js";
23
- import"./index-wk1h5ec2.js";
24
- import"./index-1j3682j8.js";
25
- import"./index-q3m6bpx2.js";
26
- import"./index-y3rj2jgb.js";
23
+ import"./index-b7p0mp2q.js";
24
+ import"./index-z085b4ka.js";
25
+ import"./index-2nqsr1dx.js";
26
+ import"./index-xhpmagdm.js";
27
27
  import"./index-rtry5xyf.js";
28
28
  import {
29
29
  resolveHiveKnowledgePath
30
- } from "./index-rjngxx7q.js";
31
- import"./index-6wya5cqh.js";
30
+ } from "./index-j89zmcpx.js";
31
+ import"./index-g1drmgxe.js";
32
32
  import"./index-ae75rja9.js";
33
- import"./index-cfkvc5q9.js";
34
- import"./index-dd7ttx8x.js";
35
- import"./index-ddxt327j.js";
33
+ import"./index-yhba8swx.js";
34
+ import"./index-xg9repnx.js";
35
+ import"./index-jxchddjk.js";
36
36
  import"./index-k5jrywpr.js";
37
37
  import"./index-n832052r.js";
38
- import"./index-tsmjmhnk.js";
38
+ import"./index-dzaarxhg.js";
39
39
  import"./index-bk5tah7q.js";
40
40
  import"./index-8fwhhayc.js";
41
41
  import"./index-q1exe2b3.js";
42
- import"./index-p8hezdtz.js";
43
- import"./index-4p02dp92.js";
42
+ import"./index-fpkb3mw1.js";
43
+ import"./index-wxyxf0bd.js";
44
44
  import"./index-1kz6da87.js";
45
45
  import"./index-b4z7s917.js";
46
46
  import"./index-b8zgtz81.js";
47
- import"./index-2t1n9k7b.js";
47
+ import"./index-fwkqq9mq.js";
48
48
  import"./index-4rhhvd1a.js";
49
- import"./index-y3v1404y.js";
49
+ import"./index-7an2qn0s.js";
50
50
  import"./index-2ghkk9ve.js";
51
51
  import"./index-fsrp8wp3.js";
52
- import"./index-5nybajn9.js";
52
+ import"./index-09b9zncg.js";
53
53
  import"./index-7g4c7s5r.js";
54
- import"./index-q2rrv0cy.js";
54
+ import"./index-7a2hm51h.js";
55
55
  import"./index-bpmtbmy9.js";
56
56
  import"./index-z6xqpmqg.js";
57
57
  import"./index-zjygnfay.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-7g4c7s5r.js";
5
5
  import {
6
6
  emit
7
- } from "./index-q2rrv0cy.js";
7
+ } from "./index-7a2hm51h.js";
8
8
  import {
9
9
  __toESM
10
10
  } from "./index-a76rekgs.js";
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  ALLOWED_SKILL_PATH_PREFIXES,
4
4
  validateSkillPath
5
- } from "./index-q3m6bpx2.js";
5
+ } from "./index-2nqsr1dx.js";
6
6
  import {
7
7
  computeOutcomeSignal,
8
8
  readKnowledge,
9
9
  resolveHiveKnowledgePath,
10
10
  resolveSwarmKnowledgePath,
11
11
  transactKnowledge
12
- } from "./index-rjngxx7q.js";
12
+ } from "./index-j89zmcpx.js";
13
13
  import {
14
14
  effectiveRetrievalOutcomes,
15
15
  readKnowledgeCounterRollups
16
- } from "./index-6wya5cqh.js";
16
+ } from "./index-g1drmgxe.js";
17
17
  import {
18
18
  init_knowledge_types,
19
19
  isActiveStatus
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  authorizeCuration
4
- } from "./index-y3rj2jgb.js";
4
+ } from "./index-xhpmagdm.js";
5
5
  import {
6
6
  findNearDuplicate,
7
7
  inferTags,
@@ -9,13 +9,13 @@ import {
9
9
  resolveSwarmKnowledgePath,
10
10
  resolveSwarmRejectedPath,
11
11
  transactKnowledge
12
- } from "./index-rjngxx7q.js";
12
+ } from "./index-j89zmcpx.js";
13
13
  import {
14
14
  resolveKnowledgeStoreDir
15
- } from "./index-cfkvc5q9.js";
15
+ } from "./index-yhba8swx.js";
16
16
  import {
17
17
  atomicWriteFile
18
- } from "./index-dd7ttx8x.js";
18
+ } from "./index-xg9repnx.js";
19
19
  import {
20
20
  require_proper_lockfile
21
21
  } from "./index-7g4c7s5r.js";
@@ -12,14 +12,14 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-6kfqz0jw.js";
15
+ } from "./index-aky90eqz.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
19
19
  isInDeclaredScope,
20
20
  redactPath,
21
21
  redactShellCommand
22
- } from "./index-yqvh2s4w.js";
22
+ } from "./index-jtshf1pd.js";
23
23
 
24
24
  // src/services/guardrail-explain-service.ts
25
25
  import path from "path";
@@ -8,7 +8,7 @@ import {
8
8
  init_constants,
9
9
  init_schema,
10
10
  stripKnownSwarmPrefix
11
- } from "./index-tsmjmhnk.js";
11
+ } from "./index-dzaarxhg.js";
12
12
  import {
13
13
  log
14
14
  } from "./index-zgwm4ryv.js";
@@ -6,13 +6,13 @@ import {
6
6
  resolveSwarmKnowledgePath,
7
7
  transactKnowledge,
8
8
  wordBigrams
9
- } from "./index-rjngxx7q.js";
9
+ } from "./index-j89zmcpx.js";
10
10
  import {
11
11
  countEntryContradictionsInWindow,
12
12
  countEntryViolationsInWindow,
13
13
  readKnowledgeEvents,
14
14
  recordKnowledgeEvent
15
- } from "./index-6wya5cqh.js";
15
+ } from "./index-g1drmgxe.js";
16
16
  import {
17
17
  init_knowledge_types,
18
18
  isActiveStatus
@@ -190,11 +190,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
190
190
  alreadyInactive: true
191
191
  };
192
192
  }
193
- const { quarantineEntry } = await import("./knowledge-validator-kc7fnt2r.js");
193
+ const { quarantineEntry } = await import("./knowledge-validator-3n5t55qy.js");
194
194
  let policyConfig;
195
195
  try {
196
- const { KnowledgeConfigSchema } = await import("./schema-jb4p8ja9.js");
197
- const { loadPluginConfigWithMeta } = await import("./index-reesz606.js");
196
+ const { KnowledgeConfigSchema } = await import("./schema-rs5a7ywx.js");
197
+ const { loadPluginConfigWithMeta } = await import("./index-wdkkf3xg.js");
198
198
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
199
199
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
200
200
  } catch {
@@ -8,6 +8,55 @@ var _writeStream = null;
8
8
  var _projectDirectory = null;
9
9
  var _listeners = [];
10
10
  var _disabled = false;
11
+ var _heartbeatTrackingActive = false;
12
+ var _heartbeatListener = null;
13
+ var heartbeatTimestamps = new Map;
14
+ function capHeartbeatMap() {
15
+ while (heartbeatTimestamps.size >= 500) {
16
+ const oldestKey = heartbeatTimestamps.keys().next().value;
17
+ if (oldestKey === undefined)
18
+ break;
19
+ heartbeatTimestamps.delete(oldestKey);
20
+ }
21
+ }
22
+ function startHeartbeatTracking() {
23
+ if (_heartbeatTrackingActive)
24
+ return;
25
+ _heartbeatTrackingActive = true;
26
+ const listener = (event, data) => {
27
+ if (event !== "heartbeat")
28
+ return;
29
+ const payload = data;
30
+ if (!payload?.sessionId)
31
+ return;
32
+ heartbeatTimestamps.set(payload.sessionId, Date.now());
33
+ capHeartbeatMap();
34
+ };
35
+ _heartbeatListener = listener;
36
+ addTelemetryListener(listener);
37
+ }
38
+ function getLastHeartbeat(sessionId) {
39
+ return heartbeatTimestamps.get(sessionId);
40
+ }
41
+ function stopHeartbeatTracking() {
42
+ _heartbeatTrackingActive = false;
43
+ if (_heartbeatListener !== null) {
44
+ const idx = _listeners.indexOf(_heartbeatListener);
45
+ if (idx >= 0)
46
+ _listeners.splice(idx, 1);
47
+ _heartbeatListener = null;
48
+ }
49
+ }
50
+ function resetHeartbeatTrackingForTesting() {
51
+ _heartbeatTrackingActive = false;
52
+ heartbeatTimestamps.clear();
53
+ if (_heartbeatListener !== null) {
54
+ const idx = _listeners.indexOf(_heartbeatListener);
55
+ if (idx >= 0)
56
+ _listeners.splice(idx, 1);
57
+ _heartbeatListener = null;
58
+ }
59
+ }
11
60
  var _emitCount = 0;
12
61
  var ROTATION_CHECK_INTERVAL = 50;
13
62
  function resetTelemetryForTesting() {
@@ -15,6 +64,7 @@ function resetTelemetryForTesting() {
15
64
  _projectDirectory = null;
16
65
  _listeners.length = 0;
17
66
  _emitCount = 0;
67
+ resetHeartbeatTrackingForTesting();
18
68
  if (_writeStream !== null) {
19
69
  _writeStream.end();
20
70
  _writeStream = null;
@@ -257,6 +307,11 @@ var telemetry = {
257
307
  });
258
308
  }
259
309
  };
260
- var _internals = { telemetry, emit, rotateTelemetryIfNeeded };
310
+ var _internals = {
311
+ telemetry,
312
+ emit,
313
+ rotateTelemetryIfNeeded,
314
+ heartbeatListenerCount: () => _heartbeatListener !== null ? 1 : 0
315
+ };
261
316
 
262
- export { ROTATION_CHECK_INTERVAL, resetTelemetryForTesting, initTelemetry, emit, addTelemetryListener, rotateTelemetryIfNeeded, telemetry, _internals };
317
+ export { startHeartbeatTracking, getLastHeartbeat, stopHeartbeatTracking, resetHeartbeatTrackingForTesting, ROTATION_CHECK_INTERVAL, resetTelemetryForTesting, initTelemetry, emit, addTelemetryListener, rotateTelemetryIfNeeded, telemetry, _internals };
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-2ghkk9ve.js";
5
5
  import {
6
6
  withEvidenceLock
7
- } from "./index-5nybajn9.js";
7
+ } from "./index-09b9zncg.js";
8
8
  import {
9
9
  exports_external,
10
10
  init_zod