opencode-swarm 7.179.0 → 7.180.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 (118) hide show
  1. package/.opencode/skills/execute/SKILL.md +9 -8
  2. package/.opencode/skills/running-tests/SKILL.md +41 -36
  3. package/.opencode/skills/writing-tests/SKILL.md +11 -4
  4. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  5. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  6. package/dist/agents/explorer.d.ts +1 -1
  7. package/dist/background/pr-event-subscribers.d.ts +2 -0
  8. package/dist/background/pr-feedback-event-queue.d.ts +7 -0
  9. package/dist/background/pr-feedback-loop.d.ts +162 -0
  10. package/dist/cli/{coder-settlement-7pt3a0y0.js → coder-settlement-34z9xgnx.js} +13 -13
  11. package/dist/cli/{config-doctor-82w4bp4b.js → config-doctor-tkfrwztz.js} +2 -2
  12. package/dist/cli/{core-9rqzs794.js → core-z9ybzpvr.js} +4 -5
  13. package/dist/cli/{curation-policy-c7mdsf7m.js → curation-policy-gwzmjmt7.js} +6 -5
  14. package/dist/cli/{curator-drift-d93pwt8h.js → curator-drift-3bbn011w.js} +22 -12
  15. package/dist/cli/curator-llm-factory-e162g7xp.js +74 -0
  16. package/dist/cli/{curator-m8act07j.js → curator-zv4qs07j.js} +46 -44
  17. package/dist/cli/{dispatch-3rwdxpp2.js → dispatch-p5zjg5e6.js} +1 -1
  18. package/dist/cli/{evidence-summary-service-a99bgje1.js → evidence-summary-service-wrfth5tr.js} +22 -20
  19. package/dist/cli/{explorer-z0cf5cz0.js → explorer-m50sfrp7.js} +1 -1
  20. package/dist/cli/{gate-evidence-yssmxba5.js → gate-evidence-adqbxnm7.js} +8 -8
  21. package/dist/cli/guardrail-explain-dn96802k.js +75 -0
  22. package/dist/cli/{guardrail-log-j2wtq7p2.js → guardrail-log-rcza6v3y.js} +6 -6
  23. package/dist/cli/{guardrail-reset-07byr7nr.js → guardrail-reset-fjn42e0n.js} +46 -44
  24. package/dist/cli/hive-promoter-hgqqn7qw.js +89 -0
  25. package/dist/cli/{index-7zmbtxw1.js → index-06crt1ej.js} +2 -2
  26. package/dist/cli/{index-wrt875kh.js → index-0725jpp7.js} +1 -1
  27. package/dist/cli/{index-f2v90gfc.js → index-0v1rtanv.js} +24 -165
  28. package/dist/cli/{index-0bc8jdnv.js → index-1hzqyx13.js} +9 -1
  29. package/dist/cli/{index-80q47hpw.js → index-1p8fk9jb.js} +2 -2
  30. package/dist/cli/{index-1rwyfvq2.js → index-2h0qng38.js} +3 -3
  31. package/dist/cli/{index-amf88k1e.js → index-3jap3516.js} +1 -1
  32. package/dist/cli/{index-8815e95e.js → index-5gmn0a3j.js} +8 -8
  33. package/dist/cli/{index-yagqxt2p.js → index-5m378633.js} +4 -4
  34. package/dist/cli/{index-0h3cr7pn.js → index-5yc5n4ae.js} +1 -1
  35. package/dist/cli/{index-pxtye2ng.js → index-7pj0x345.js} +50 -48
  36. package/dist/cli/{index-etmwjgre.js → index-7w6dnpvc.js} +46 -44
  37. package/dist/cli/{index-6tnkvqr9.js → index-8b1f2t5q.js} +8 -10
  38. package/dist/cli/{index-cvg402ha.js → index-91dhg3wr.js} +2 -2
  39. package/dist/cli/{index-3pzwsesm.js → index-92m05mew.js} +2 -2
  40. package/dist/cli/{index-6r92fw88.js → index-93vk5s7v.js} +8 -8
  41. package/dist/cli/{index-ne9zamcs.js → index-989v83pb.js} +1 -1
  42. package/dist/cli/{index-g6nyk713.js → index-aspxz5r5.js} +1 -1
  43. package/dist/cli/index-b9z9gvx0.js +339 -0
  44. package/dist/cli/{index-2b0ktpbf.js → index-bdpgfep1.js} +5 -5
  45. package/dist/cli/{index-nzekzzs2.js → index-bv4b8tpa.js} +5 -5
  46. package/dist/cli/{index-n1tcj1q7.js → index-bx70zs8d.js} +187 -47
  47. package/dist/cli/{index-kmhnkn6t.js → index-caj76d0f.js} +6 -8
  48. package/dist/cli/{index-549wxbe1.js → index-cjapb4hy.js} +1 -1
  49. package/dist/cli/{index-3hne91yd.js → index-cxgr6ad5.js} +13 -15
  50. package/dist/cli/{index-kanxpgf8.js → index-dcttq1mn.js} +2 -2
  51. package/dist/cli/{index-twtez316.js → index-defq2crz.js} +13 -3
  52. package/dist/cli/{index-d66zb40k.js → index-dnbqmay5.js} +3054 -1454
  53. package/dist/cli/index-ejhxgyvm.js +147 -0
  54. package/dist/cli/{index-hwcra3y9.js → index-ekgc71m1.js} +10 -10
  55. package/dist/cli/{index-s4bkey0q.js → index-gc6h1fmf.js} +4 -4
  56. package/dist/cli/index-gx2vp8gx.js +100 -0
  57. package/dist/cli/{index-zgvzbz48.js → index-hamqvzqn.js} +69 -13
  58. package/dist/cli/{index-h59vsbch.js → index-htrb9ec3.js} +1 -1
  59. package/dist/cli/{index-yfpswnjt.js → index-jmrsfhwq.js} +3 -3
  60. package/dist/cli/{index-9p1pqykb.js → index-jrfv2am8.js} +7 -7
  61. package/dist/cli/{index-pskba939.js → index-jscqefqm.js} +1 -1
  62. package/dist/cli/{index-wvpsm8ja.js → index-kp654qcw.js} +32 -17
  63. package/dist/cli/{index-tmy46dtd.js → index-mhrn7hbb.js} +8 -7
  64. package/dist/cli/{index-h4nh6s8b.js → index-nhxykfyy.js} +1 -1
  65. package/dist/cli/{index-ndwbb3xm.js → index-pnt98k7z.js} +7 -7
  66. package/dist/cli/{index-1c1dbwze.js → index-rdec0y3z.js} +1 -1
  67. package/dist/cli/{index-qxk5qkfh.js → index-ret97f1t.js} +5 -5
  68. package/dist/cli/{index-sv4y1cma.js → index-v1sc1gxv.js} +6 -6
  69. package/dist/cli/{index-a11ztzs5.js → index-vmthakz0.js} +1 -1
  70. package/dist/cli/{index-09wm3963.js → index-x6kjbjya.js} +9 -7
  71. package/dist/cli/{index-1sz02k85.js → index-zptq8mp1.js} +4 -103
  72. package/dist/cli/{index-34bwqcea.js → index-zvxy0mev.js} +1 -1
  73. package/dist/cli/{index-zz7gzw57.js → index-zxdawwc7.js} +88 -4
  74. package/dist/cli/index.js +47 -45
  75. package/dist/cli/{knowledge-escalator-yx97q9c1.js → knowledge-escalator-x8vcmb6k.js} +16 -15
  76. package/dist/cli/{knowledge-events-p269fyvv.js → knowledge-events-naf9kyyc.js} +14 -13
  77. package/dist/cli/{knowledge-link-gfz47ves.js → knowledge-link-g0q25hqv.js} +5 -4
  78. package/dist/cli/{knowledge-store-36zemyqa.js → knowledge-store-dnv0ph42.js} +6 -5
  79. package/dist/cli/{knowledge-validator-rd20yq41.js → knowledge-validator-a1rfzkmv.js} +8 -7
  80. package/dist/cli/{mcp-sg9zrkz2.js → mcp-hnb0m05a.js} +1 -1
  81. package/dist/cli/{pending-delegations-8p2gf4kt.js → pending-delegations-05p6cmbh.js} +13 -12
  82. package/dist/cli/{pr-subscriptions-4dj9r71h.js → pr-subscriptions-a2djfzyx.js} +13 -12
  83. package/dist/cli/{pr-workflow-gate-8dgz5z1h.js → pr-workflow-gate-wkmx8nr6.js} +48 -44
  84. package/dist/cli/{runner-16b691ba.js → runner-hkbds12j.js} +6 -5
  85. package/dist/cli/{scan-cursor-nx0jv9ya.js → scan-cursor-4khfn5pm.js} +8 -8
  86. package/dist/cli/{schema-q6gsrxwz.js → schema-a5zb02h8.js} +3 -1
  87. package/dist/cli/{scope-persistence-1k4xsyh7.js → scope-persistence-nsw324ce.js} +18 -17
  88. package/dist/cli/{server-shhxq34t.js → server-exj4wt8j.js} +54 -52
  89. package/dist/cli/{skill-generator-6j7tq2tb.js → skill-generator-r2cdtx7b.js} +18 -17
  90. package/dist/cli/{snapshot-coordination-init-h8n8w1cm.js → snapshot-coordination-init-sad6q0a2.js} +46 -44
  91. package/dist/cli/speckit-checkoff-46g9sqak.js +31 -0
  92. package/dist/cli/{workspace-snapshot-rfnn80dg.js → workspace-snapshot-4m2ex1ey.js} +4 -5
  93. package/dist/cli/{worktree-collision-ownership-97jzh4ra.js → worktree-collision-ownership-4znkfq1t.js} +16 -16
  94. package/dist/cli/{worktree-isolation-g4w74ccb.js → worktree-isolation-mv9ee00v.js} +46 -44
  95. package/dist/commands/pr-feedback-loop.d.ts +1 -0
  96. package/dist/commands/registry.d.ts +10 -2
  97. package/dist/config/schema.d.ts +27 -0
  98. package/dist/hooks/delegation-tracker.d.ts +6 -1
  99. package/dist/hooks/pr-workflow-gate.d.ts +1 -1
  100. package/dist/index.js +639 -606
  101. package/dist/lang/backends/go.d.ts +2 -0
  102. package/dist/mutation/engine.d.ts +1 -0
  103. package/dist/sdd/effective-spec.d.ts +35 -22
  104. package/dist/sdd/speckit-checkoff.d.ts +113 -0
  105. package/dist/session/hydration-ownership.d.ts +83 -0
  106. package/dist/session/snapshot-coordination-init.d.ts +2 -1
  107. package/dist/session/snapshot-reader.d.ts +25 -7
  108. package/dist/state.d.ts +32 -2
  109. package/dist/test-impact/analyzer.d.ts +46 -4
  110. package/dist/test-impact/constants.d.ts +4 -0
  111. package/dist/tools/mutation-test.d.ts +11 -5
  112. package/dist/tools/test-runner.d.ts +34 -6
  113. package/opencode-swarm.schema.json +40 -0
  114. package/package.json +1 -1
  115. package/dist/cli/curator-llm-factory-cbm1ny30.js +0 -72
  116. package/dist/cli/guardrail-explain-ffwmhf7s.js +0 -73
  117. package/dist/cli/hive-promoter-ewrz7vh1.js +0 -87
  118. package/dist/cli/index-4ddpvd5c.js +0 -94
@@ -4,7 +4,7 @@ import { resolveLocalNodeTool } from '../build/command-resolution';
4
4
  import { isCommandAvailable } from '../build/discovery';
5
5
  import type { NativeTestTarget, TestScope } from '../lang/backend';
6
6
  import { buildNativeTargetCommand } from '../lang/default-backend';
7
- import { analyzeImpact, loadImpactMap } from '../test-impact/analyzer.js';
7
+ import { analyzeImpact, getImpactCacheStatus, type ImpactCacheStatus, loadImpactMap, loadImpactMapWithStatus } from '../test-impact/analyzer.js';
8
8
  import { getAllHistory, type TestRunRecord } from '../test-impact/history-store.js';
9
9
  import { bunSpawn } from '../utils/bun-compat';
10
10
  export declare const MAX_OUTPUT_BYTES = 512000;
@@ -12,6 +12,10 @@ export declare const MAX_COMMAND_LENGTH = 500;
12
12
  export declare const DEFAULT_TIMEOUT_MS = 60000;
13
13
  export declare const MAX_TIMEOUT_MS = 300000;
14
14
  export declare const MAX_SAFE_TEST_FILES = 50;
15
+ export declare const MAX_SAFE_SOURCE_FILES = 1;
16
+ export declare const MAX_RAW_FILE_ENTRIES = 512;
17
+ export declare const MAX_FILE_PATH_LENGTH = 4096;
18
+ export declare const MAX_GRAPH_FILE_BYTES: number;
15
19
  /**
16
20
  * Estimate the fan-out (number of unique test files) for given source files
17
21
  * by reading the cached impact map without spawning a subprocess.
@@ -22,6 +26,7 @@ export declare const MAX_SAFE_TEST_FILES = 50;
22
26
  */
23
27
  export declare function estimateFanOut(sourceFiles: string[], cwd: string): Promise<{
24
28
  estimatedCount: number;
29
+ status: 'advisory' | 'unavailable';
25
30
  }>;
26
31
  export declare const SUPPORTED_FRAMEWORKS: readonly ["bun", "vitest", "jest", "mocha", "pytest", "cargo", "pester", "go-test", "maven", "gradle", "dotnet-test", "ctest", "swift-test", "dart-test", "rspec", "minitest", "pest", "phpunit", "php-artisan"];
27
32
  export type TestFramework = (typeof SUPPORTED_FRAMEWORKS)[number] | 'none';
@@ -35,12 +40,11 @@ export interface TestRunnerArgs {
35
40
  bail?: boolean;
36
41
  }
37
42
  export type RegressionOutcome = 'pass' | 'skip' | 'no_impacted_tests' | 'regression' | 'scope_exceeded' | 'error';
38
- /** Binding cap decision reported on every discovery-scope test_runner response. */
43
+ /** Binding cap decision reported on every discovery-scope response. */
39
44
  export interface CapDecision {
40
45
  decision: 'within_cap' | 'cap_exceeded';
41
46
  resolved_test_count: number;
42
47
  limit: number;
43
- source_file_count?: number;
44
48
  }
45
49
  export interface TestTotals {
46
50
  passed: number;
@@ -70,11 +74,9 @@ export interface TestSuccessResult {
70
74
  testCases?: ParsedTestCaseResult[];
71
75
  message?: string;
72
76
  outcome?: RegressionOutcome;
73
- /** Post-resolution deduplicated test-file set (discovery scopes only). */
77
+ resolution?: TestResolution;
74
78
  resolved_test_files?: string[];
75
- /** Binding cap decision — the post-resolution count, never an estimate. */
76
79
  cap_decision?: CapDecision;
77
- /** Non-empty exactly when resolution fell back to a narrower discovery scope. */
78
80
  fallback_reason?: string;
79
81
  }
80
82
  export interface TestErrorResult {
@@ -92,11 +94,35 @@ export interface TestErrorResult {
92
94
  message?: string;
93
95
  outcome?: RegressionOutcome;
94
96
  attempted_scope?: 'graph';
97
+ resolution?: TestResolution;
95
98
  resolved_test_files?: string[];
96
99
  cap_decision?: CapDecision;
97
100
  fallback_reason?: string;
98
101
  }
99
102
  export type TestResult = TestSuccessResult | TestErrorResult;
103
+ export interface TestResolution {
104
+ requestedScope: TestScope;
105
+ effectiveScope: TestScope;
106
+ sourceFiles: string[];
107
+ /**
108
+ * Normalized test files. Execute decisions are always capped at `cap`;
109
+ * scope-exceeded decisions may retain one `cap + 1` sentinel for evidence.
110
+ */
111
+ resolvedFiles: string[];
112
+ cap: number;
113
+ decision: 'execute' | 'scope_exceeded' | 'skip';
114
+ /** Structured fan-out estimate; the scalar fields below are compatibility aliases. */
115
+ estimate: {
116
+ count: number;
117
+ status: 'advisory' | 'unavailable' | 'not_run';
118
+ };
119
+ /** Backward-compatible aliases for consumers that predate the structured estimate. */
120
+ estimateCount: number;
121
+ estimateStatus: 'advisory' | 'unavailable' | 'not_run';
122
+ cacheStatus?: ImpactCacheStatus;
123
+ fallbackReason: string | null;
124
+ evaluable: boolean;
125
+ }
100
126
  /**
101
127
  * Phase 3 dispatch path: detect the test framework via the
102
128
  * `LanguageBackend` registry from `src/lang/dispatch.ts`. Currently
@@ -175,6 +201,8 @@ export declare const test_runner: ReturnType<typeof tool>;
175
201
  export declare const _internals: {
176
202
  analyzeImpact: typeof analyzeImpact;
177
203
  loadImpactMap: typeof loadImpactMap;
204
+ loadImpactMapWithStatus: typeof loadImpactMapWithStatus;
205
+ getImpactCacheStatus: typeof getImpactCacheStatus;
178
206
  isCommandAvailable: typeof isCommandAvailable;
179
207
  existsSync: typeof fs.existsSync;
180
208
  readdirSync: typeof fs.readdirSync;
@@ -1759,6 +1759,17 @@
1759
1759
  }
1760
1760
  }
1761
1761
  },
1762
+ "speckit_checkoff": {
1763
+ "description": "Spec-Kit tasks.md check-off round trip (issue #2501) — opt-in, never on by default.",
1764
+ "type": "object",
1765
+ "properties": {
1766
+ "enabled": {
1767
+ "default": false,
1768
+ "description": "Check off mapped Spec-Kit tasks in the source tasks.md when Swarm completes a plan task (issue #2501). Off by default — write-back to user-owned files is opt-in.",
1769
+ "type": "boolean"
1770
+ }
1771
+ }
1772
+ },
1762
1773
  "git": {
1763
1774
  "description": "Git executable resolution override (issue #2236 hardening).",
1764
1775
  "type": "object",
@@ -5083,6 +5094,35 @@
5083
5094
  }
5084
5095
  }
5085
5096
  },
5097
+ "pr_feedback_loop": {
5098
+ "description": "Autonomous PR babysitting settling loop (issue #2502) — triple opt-in with pr_monitor.enabled + pr_monitor.auto_pr_feedback; off by default; publication profile is none-only.",
5099
+ "type": "object",
5100
+ "properties": {
5101
+ "enabled": {
5102
+ "default": false,
5103
+ "type": "boolean"
5104
+ },
5105
+ "max_actions_per_pr": {
5106
+ "default": 3,
5107
+ "type": "integer",
5108
+ "minimum": 1,
5109
+ "maximum": 10
5110
+ },
5111
+ "max_session_actions": {
5112
+ "default": 10,
5113
+ "type": "integer",
5114
+ "minimum": 1,
5115
+ "maximum": 50
5116
+ },
5117
+ "publication": {
5118
+ "default": "none",
5119
+ "type": "string",
5120
+ "enum": [
5121
+ "none"
5122
+ ]
5123
+ }
5124
+ }
5125
+ },
5086
5126
  "pr_monitor": {
5087
5127
  "description": "GitHub PR subscription and polling (FR-001) — disabled by default; opt-in for real-time PR status updates.",
5088
5128
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.179.0",
3
+ "version": "7.180.0",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,72 +0,0 @@
1
- // @bun
2
- import {
3
- createCuratorLLMDelegate
4
- } from "./index-d66zb40k.js";
5
- import"./index-zgvzbz48.js";
6
- import"./index-pskba939.js";
7
- import"./index-7zmbtxw1.js";
8
- import"./index-h4nh6s8b.js";
9
- import"./index-0bc8jdnv.js";
10
- import"./index-wvpsm8ja.js";
11
- import"./index-g6nyk713.js";
12
- import"./index-txdagbh7.js";
13
- import"./index-n1tcj1q7.js";
14
- import"./index-6b295cas.js";
15
- import"./index-8815e95e.js";
16
- import"./index-qxk5qkfh.js";
17
- import"./index-1rwyfvq2.js";
18
- import"./index-1c1dbwze.js";
19
- import"./index-6r92fw88.js";
20
- import"./index-549wxbe1.js";
21
- import"./index-zsrtt42s.js";
22
- import"./index-3hne91yd.js";
23
- import"./index-2b0ktpbf.js";
24
- import"./index-3pzwsesm.js";
25
- import"./index-pt7h91zc.js";
26
- import"./index-q7sjgr1y.js";
27
- import"./index-kmhnkn6t.js";
28
- import"./index-6tnkvqr9.js";
29
- import"./index-sv4y1cma.js";
30
- import"./index-hwcra3y9.js";
31
- import"./index-s4bkey0q.js";
32
- import"./index-2s7dvzff.js";
33
- import"./index-yagqxt2p.js";
34
- import"./index-0h3cr7pn.js";
35
- import"./index-rtry5xyf.js";
36
- import"./index-kanxpgf8.js";
37
- import"./index-frcemc0b.js";
38
- import"./index-wrt875kh.js";
39
- import"./index-9p1pqykb.js";
40
- import"./index-09wm3963.js";
41
- import"./index-h59vsbch.js";
42
- import"./index-cvg402ha.js";
43
- import"./index-a11ztzs5.js";
44
- import"./index-nzekzzs2.js";
45
- import"./index-ry16d01s.js";
46
- import"./index-rdm3px0g.js";
47
- import"./index-yfpswnjt.js";
48
- import"./index-ndwbb3xm.js";
49
- import"./index-vzm6zre7.js";
50
- import"./index-ae75rja9.js";
51
- import"./index-34bwqcea.js";
52
- import"./index-f2v90gfc.js";
53
- import"./index-7g4c7s5r.js";
54
- import"./index-qt0793qm.js";
55
- import"./index-ne9zamcs.js";
56
- import"./index-1xnse449.js";
57
- import"./index-c1ggtmpm.js";
58
- import"./index-1sz02k85.js";
59
- import"./index-zz7gzw57.js";
60
- import"./index-4ddpvd5c.js";
61
- import"./index-twtez316.js";
62
- import"./index-w872yykk.js";
63
- import"./index-bk5tah7q.js";
64
- import"./index-gknz3bv1.js";
65
- import"./index-zpsr8rpc.js";
66
- import"./index-wvghb3x6.js";
67
- import"./index-9rwhas09.js";
68
- import"./index-zgwm4ryv.js";
69
- import"./index-a76rekgs.js";
70
- export {
71
- createCuratorLLMDelegate
72
- };
@@ -1,73 +0,0 @@
1
- // @bun
2
- import {
3
- handleGuardrailExplain
4
- } from "./index-80q47hpw.js";
5
- import"./index-d66zb40k.js";
6
- import"./index-zgvzbz48.js";
7
- import"./index-pskba939.js";
8
- import"./index-7zmbtxw1.js";
9
- import"./index-h4nh6s8b.js";
10
- import"./index-0bc8jdnv.js";
11
- import"./index-wvpsm8ja.js";
12
- import"./index-g6nyk713.js";
13
- import"./index-txdagbh7.js";
14
- import"./index-n1tcj1q7.js";
15
- import"./index-6b295cas.js";
16
- import"./index-8815e95e.js";
17
- import"./index-qxk5qkfh.js";
18
- import"./index-1rwyfvq2.js";
19
- import"./index-1c1dbwze.js";
20
- import"./index-6r92fw88.js";
21
- import"./index-549wxbe1.js";
22
- import"./index-zsrtt42s.js";
23
- import"./index-3hne91yd.js";
24
- import"./index-2b0ktpbf.js";
25
- import"./index-3pzwsesm.js";
26
- import"./index-pt7h91zc.js";
27
- import"./index-q7sjgr1y.js";
28
- import"./index-kmhnkn6t.js";
29
- import"./index-6tnkvqr9.js";
30
- import"./index-sv4y1cma.js";
31
- import"./index-hwcra3y9.js";
32
- import"./index-s4bkey0q.js";
33
- import"./index-2s7dvzff.js";
34
- import"./index-yagqxt2p.js";
35
- import"./index-0h3cr7pn.js";
36
- import"./index-rtry5xyf.js";
37
- import"./index-kanxpgf8.js";
38
- import"./index-frcemc0b.js";
39
- import"./index-wrt875kh.js";
40
- import"./index-9p1pqykb.js";
41
- import"./index-09wm3963.js";
42
- import"./index-h59vsbch.js";
43
- import"./index-cvg402ha.js";
44
- import"./index-a11ztzs5.js";
45
- import"./index-nzekzzs2.js";
46
- import"./index-ry16d01s.js";
47
- import"./index-rdm3px0g.js";
48
- import"./index-yfpswnjt.js";
49
- import"./index-ndwbb3xm.js";
50
- import"./index-vzm6zre7.js";
51
- import"./index-ae75rja9.js";
52
- import"./index-34bwqcea.js";
53
- import"./index-f2v90gfc.js";
54
- import"./index-7g4c7s5r.js";
55
- import"./index-qt0793qm.js";
56
- import"./index-ne9zamcs.js";
57
- import"./index-1xnse449.js";
58
- import"./index-c1ggtmpm.js";
59
- import"./index-1sz02k85.js";
60
- import"./index-zz7gzw57.js";
61
- import"./index-4ddpvd5c.js";
62
- import"./index-twtez316.js";
63
- import"./index-w872yykk.js";
64
- import"./index-bk5tah7q.js";
65
- import"./index-gknz3bv1.js";
66
- import"./index-zpsr8rpc.js";
67
- import"./index-wvghb3x6.js";
68
- import"./index-9rwhas09.js";
69
- import"./index-zgwm4ryv.js";
70
- import"./index-a76rekgs.js";
71
- export {
72
- handleGuardrailExplain
73
- };
@@ -1,87 +0,0 @@
1
- // @bun
2
- import {
3
- _internals3 as _internals,
4
- checkHivePromotions,
5
- countDistinctProjects,
6
- createHivePromoterHook,
7
- isHiveEligible,
8
- promoteFromSwarm,
9
- promoteToHive
10
- } from "./index-d66zb40k.js";
11
- import"./index-zgvzbz48.js";
12
- import"./index-pskba939.js";
13
- import"./index-7zmbtxw1.js";
14
- import"./index-h4nh6s8b.js";
15
- import"./index-0bc8jdnv.js";
16
- import"./index-wvpsm8ja.js";
17
- import"./index-g6nyk713.js";
18
- import"./index-txdagbh7.js";
19
- import"./index-n1tcj1q7.js";
20
- import"./index-6b295cas.js";
21
- import"./index-8815e95e.js";
22
- import"./index-qxk5qkfh.js";
23
- import"./index-1rwyfvq2.js";
24
- import"./index-1c1dbwze.js";
25
- import"./index-6r92fw88.js";
26
- import"./index-549wxbe1.js";
27
- import"./index-zsrtt42s.js";
28
- import"./index-3hne91yd.js";
29
- import"./index-2b0ktpbf.js";
30
- import"./index-3pzwsesm.js";
31
- import"./index-pt7h91zc.js";
32
- import"./index-q7sjgr1y.js";
33
- import"./index-kmhnkn6t.js";
34
- import"./index-6tnkvqr9.js";
35
- import"./index-sv4y1cma.js";
36
- import"./index-hwcra3y9.js";
37
- import"./index-s4bkey0q.js";
38
- import"./index-2s7dvzff.js";
39
- import"./index-yagqxt2p.js";
40
- import"./index-0h3cr7pn.js";
41
- import"./index-rtry5xyf.js";
42
- import"./index-kanxpgf8.js";
43
- import"./index-frcemc0b.js";
44
- import"./index-wrt875kh.js";
45
- import"./index-9p1pqykb.js";
46
- import"./index-09wm3963.js";
47
- import"./index-h59vsbch.js";
48
- import"./index-cvg402ha.js";
49
- import"./index-a11ztzs5.js";
50
- import"./index-nzekzzs2.js";
51
- import"./index-ry16d01s.js";
52
- import"./index-rdm3px0g.js";
53
- import"./index-yfpswnjt.js";
54
- import {
55
- resolveHiveKnowledgePath
56
- } from "./index-ndwbb3xm.js";
57
- import"./index-vzm6zre7.js";
58
- import"./index-ae75rja9.js";
59
- import"./index-34bwqcea.js";
60
- import"./index-f2v90gfc.js";
61
- import"./index-7g4c7s5r.js";
62
- import"./index-qt0793qm.js";
63
- import"./index-ne9zamcs.js";
64
- import"./index-1xnse449.js";
65
- import"./index-c1ggtmpm.js";
66
- import"./index-1sz02k85.js";
67
- import"./index-zz7gzw57.js";
68
- import"./index-4ddpvd5c.js";
69
- import"./index-twtez316.js";
70
- import"./index-w872yykk.js";
71
- import"./index-bk5tah7q.js";
72
- import"./index-gknz3bv1.js";
73
- import"./index-zpsr8rpc.js";
74
- import"./index-wvghb3x6.js";
75
- import"./index-9rwhas09.js";
76
- import"./index-zgwm4ryv.js";
77
- import"./index-a76rekgs.js";
78
- export {
79
- resolveHiveKnowledgePath,
80
- promoteToHive,
81
- promoteFromSwarm,
82
- isHiveEligible,
83
- createHivePromoterHook,
84
- countDistinctProjects,
85
- checkHivePromotions,
86
- _internals
87
- };
@@ -1,94 +0,0 @@
1
- // @bun
2
- import {
3
- init_logger,
4
- log
5
- } from "./index-zgwm4ryv.js";
6
- import {
7
- __esm
8
- } from "./index-a76rekgs.js";
9
-
10
- // src/observability/startup-contract.ts
11
- function noteStartupAdvisory() {
12
- if (!state.advisoryWindowOpen)
13
- return;
14
- state.advisoryCount += 1;
15
- }
16
- var state;
17
- var init_startup_contract = __esm(() => {
18
- state = {
19
- importMarkMs: null,
20
- serverStartMark: null,
21
- serverResolvedMark: null,
22
- serverMs: null,
23
- queueScheduledAt: null,
24
- queuePending: 0,
25
- queueTasks: 0,
26
- queueCompleted: 0,
27
- queueFailed: 0,
28
- queueSettled: false,
29
- queueSettledMs: null,
30
- advisoryCount: 0,
31
- advisoryWindowOpen: false,
32
- firstTurnDone: false,
33
- firstToolDone: false,
34
- firstToolName: null,
35
- firstTurnMs: null,
36
- firstToolMs: null
37
- };
38
- });
39
-
40
- // src/services/warning-buffer.ts
41
- function sanitizeBufferedLine(s) {
42
- return s.replace(/\s+/g, " ").replace(CONTROL_CHARS_RE, "").replace(/\s+/g, " ").trim();
43
- }
44
- function addDeferredWarning(warning) {
45
- noteStartupAdvisory();
46
- const sanitized = sanitizeBufferedLine(warning);
47
- if (deferredWarnings.length < MAX_DEFERRED_WARNINGS - 1) {
48
- deferredWarnings.push(sanitized);
49
- return;
50
- }
51
- if (!deferredWarningsTruncated) {
52
- deferredWarnings.push(`[opencode-swarm] ${MAX_DEFERRED_WARNINGS - 1} deferred warnings buffered; additional advisories were dropped (cap reached). Run with OPENCODE_SWARM_DEBUG=1 to see all advisories in the debug log.`);
53
- deferredWarningsTruncated = true;
54
- }
55
- }
56
- function renderAdvisoryDetail(data) {
57
- if (data === undefined || data === null)
58
- return "";
59
- let raw;
60
- if (typeof data === "string") {
61
- raw = data;
62
- } else if (data instanceof Error) {
63
- raw = data.message;
64
- } else if (Array.isArray(data) && data.every((d) => typeof d === "string")) {
65
- raw = data.join("; ");
66
- } else {
67
- try {
68
- raw = JSON.stringify(data) ?? String(data);
69
- } catch {
70
- raw = String(data);
71
- }
72
- }
73
- const collapsed = sanitizeBufferedLine(raw);
74
- if (collapsed === "")
75
- return "";
76
- return collapsed.length > MAX_ADVISORY_DETAIL_CHARS ? `${collapsed.slice(0, MAX_ADVISORY_DETAIL_CHARS - 1)}\u2026` : collapsed;
77
- }
78
- function advisoryWarn(message, data) {
79
- const detail = renderAdvisoryDetail(data);
80
- addDeferredWarning(detail ? `${message} ${detail}` : message);
81
- log(message, data);
82
- }
83
- function getDeferredWarnings() {
84
- return [...deferredWarnings];
85
- }
86
- var deferredWarnings, MAX_DEFERRED_WARNINGS = 50, deferredWarningsTruncated = false, CONTROL_CHARS_RE, MAX_ADVISORY_DETAIL_CHARS = 600;
87
- var init_warning_buffer = __esm(() => {
88
- init_startup_contract();
89
- init_logger();
90
- deferredWarnings = [];
91
- CONTROL_CHARS_RE = /[\x00-\x1F\x7F-\x9F]/g;
92
- });
93
-
94
- export { addDeferredWarning, advisoryWarn, getDeferredWarnings, init_warning_buffer };