opencode-swarm 7.109.3 → 7.110.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.
- package/.opencode/skills/swarm/SKILL.md +186 -0
- package/.opencode/skills/swarm-ci-monitor/SKILL.md +369 -0
- package/.opencode/skills/swarm-pr-feedback/SKILL.md +86 -17
- package/dist/cli/{config-doctor-q354tb2w.js → config-doctor-9vjyj9m3.js} +2 -2
- package/dist/cli/{curator-9q3m25va.js → curator-4qqzpd85.js} +4 -4
- package/dist/cli/{curator-llm-factory-78dyv010.js → curator-llm-factory-y4kvr1ph.js} +4 -4
- package/dist/cli/{guardrail-explain-csnawe0d.js → guardrail-explain-10hh57cr.js} +5 -5
- package/dist/cli/{guardrail-log-8mqqsssq.js → guardrail-log-5240bawg.js} +3 -3
- package/dist/cli/{hive-promoter-xnx734y3.js → hive-promoter-wvxqyayt.js} +4 -4
- package/dist/cli/{index-h4c4rrwx.js → index-18690p15.js} +23 -2
- package/dist/cli/{index-xyz8epk6.js → index-1mc2yfc2.js} +79 -17
- package/dist/cli/{index-wj4jeavn.js → index-d3txrx5q.js} +1 -1
- package/dist/cli/{index-3nd7bz90.js → index-khj0knr0.js} +6 -6
- package/dist/cli/{index-vx76tcxe.js → index-p5vm9gy9.js} +1 -1
- package/dist/cli/{index-r9dbs4zr.js → index-xhsba2sn.js} +2 -2
- package/dist/cli/{index-fm7xz1ne.js → index-zjh648z4.js} +81 -1
- package/dist/cli/index.js +4 -4
- package/dist/cli/{schema-x17zmd03.js → schema-5vmb5dh8.js} +3 -1
- package/dist/config/bundled-skills.d.ts +1 -1
- package/dist/config/schema.d.ts +12 -4
- package/dist/index.js +6 -6
- package/package.json +3 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
ALL_AGENT_NAMES,
|
|
4
|
+
GATE_CONFIG_KNOWN_SECTION_KEYS,
|
|
5
|
+
GateConfigSchema,
|
|
4
6
|
PluginConfigSchema,
|
|
5
7
|
stripKnownSwarmPrefix
|
|
6
|
-
} from "./index-
|
|
8
|
+
} from "./index-18690p15.js";
|
|
7
9
|
import {
|
|
8
10
|
log
|
|
9
11
|
} from "./index-zgwm4ryv.js";
|
|
@@ -13,6 +15,7 @@ import * as crypto from "crypto";
|
|
|
13
15
|
import * as fs from "fs";
|
|
14
16
|
import * as os from "os";
|
|
15
17
|
import * as path from "path";
|
|
18
|
+
var CONFIG_DOCTOR_MAX_CONFIG_FILE_BYTES = 102400;
|
|
16
19
|
var KNOWN_TOP_LEVEL_KEYS = new Set(Object.keys(PluginConfigSchema.shape));
|
|
17
20
|
var DEPRECATED_FIELDS = new Map([
|
|
18
21
|
[
|
|
@@ -79,6 +82,82 @@ function emitObjectTypeMismatch(key, value, findings) {
|
|
|
79
82
|
});
|
|
80
83
|
}
|
|
81
84
|
}
|
|
85
|
+
function isPlainObject(value) {
|
|
86
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
87
|
+
}
|
|
88
|
+
function collectRawGatesConfigFindings(directory) {
|
|
89
|
+
const findings = [];
|
|
90
|
+
const { userConfigPath, projectConfigPath } = getConfigPaths(directory);
|
|
91
|
+
for (const configPath of [userConfigPath, projectConfigPath]) {
|
|
92
|
+
if (!fs.existsSync(configPath))
|
|
93
|
+
continue;
|
|
94
|
+
try {
|
|
95
|
+
const stats = fs.statSync(configPath);
|
|
96
|
+
if (stats.size > CONFIG_DOCTOR_MAX_CONFIG_FILE_BYTES)
|
|
97
|
+
continue;
|
|
98
|
+
const raw = JSON.parse(fs.readFileSync(configPath, "utf-8"));
|
|
99
|
+
if (!isPlainObject(raw) || raw.gates === undefined)
|
|
100
|
+
continue;
|
|
101
|
+
if (!isPlainObject(raw.gates)) {
|
|
102
|
+
findings.push({
|
|
103
|
+
id: "invalid-gates-config",
|
|
104
|
+
title: "Invalid gates config",
|
|
105
|
+
description: `"gates" in ${configPath} must be an object. The loader ignores that section and keeps other valid config sections active.`,
|
|
106
|
+
severity: "error",
|
|
107
|
+
path: "gates",
|
|
108
|
+
currentValue: raw.gates,
|
|
109
|
+
autoFixable: false
|
|
110
|
+
});
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
for (const [sectionName, sectionValue] of Object.entries(raw.gates)) {
|
|
114
|
+
const schema = GateConfigSchema.shape[sectionName];
|
|
115
|
+
if (!schema) {
|
|
116
|
+
findings.push({
|
|
117
|
+
id: "unknown-gates-section",
|
|
118
|
+
title: "Unknown gates config section",
|
|
119
|
+
description: `Unknown gates section "gates.${sectionName}" in ${configPath} is ignored by the loader.`,
|
|
120
|
+
severity: "warn",
|
|
121
|
+
path: `gates.${sectionName}`,
|
|
122
|
+
currentValue: sectionValue,
|
|
123
|
+
autoFixable: false
|
|
124
|
+
});
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
const knownFields = GATE_CONFIG_KNOWN_SECTION_KEYS[sectionName];
|
|
128
|
+
if (knownFields && isPlainObject(sectionValue)) {
|
|
129
|
+
const knownFieldSet = new Set(knownFields);
|
|
130
|
+
for (const fieldName of Object.keys(sectionValue)) {
|
|
131
|
+
if (!knownFieldSet.has(fieldName)) {
|
|
132
|
+
findings.push({
|
|
133
|
+
id: "unknown-gates-key",
|
|
134
|
+
title: "Unknown gates config key",
|
|
135
|
+
description: `Unknown gates key "gates.${sectionName}.${fieldName}" in ${configPath} is ignored by the loader.`,
|
|
136
|
+
severity: "warn",
|
|
137
|
+
path: `gates.${sectionName}.${fieldName}`,
|
|
138
|
+
currentValue: sectionValue[fieldName],
|
|
139
|
+
autoFixable: false
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
const sectionResult = schema.safeParse(sectionValue);
|
|
145
|
+
if (!sectionResult.success) {
|
|
146
|
+
findings.push({
|
|
147
|
+
id: "invalid-gates-section",
|
|
148
|
+
title: "Invalid gates config section",
|
|
149
|
+
description: `"gates.${sectionName}" in ${configPath} failed validation. The loader uses defaults for that gate section and keeps other valid config sections active.`,
|
|
150
|
+
severity: "error",
|
|
151
|
+
path: `gates.${sectionName}`,
|
|
152
|
+
currentValue: sectionValue,
|
|
153
|
+
autoFixable: false
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
} catch {}
|
|
158
|
+
}
|
|
159
|
+
return findings;
|
|
160
|
+
}
|
|
82
161
|
function emitWorktreeIsolationLayeringAdvisory(config, findings) {
|
|
83
162
|
const parallelization = config.parallelization;
|
|
84
163
|
const worktreePolicy = config.worktree?.policy ?? "auto";
|
|
@@ -927,6 +1006,7 @@ function walkConfigAndValidate(obj, path2, findings, visited = new WeakSet) {
|
|
|
927
1006
|
function runConfigDoctor(config, directory) {
|
|
928
1007
|
const findings = [];
|
|
929
1008
|
walkConfigAndValidate(config, "", findings);
|
|
1009
|
+
findings.push(...collectRawGatesConfigFindings(directory));
|
|
930
1010
|
emitWorktreeIsolationLayeringAdvisory(config, findings);
|
|
931
1011
|
const summary = {
|
|
932
1012
|
info: findings.filter((f) => f.severity === "info").length,
|
package/dist/cli/index.js
CHANGED
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
package_default,
|
|
9
9
|
resolveCommand
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
} from "./index-1mc2yfc2.js";
|
|
11
|
+
import"./index-d3txrx5q.js";
|
|
12
12
|
import"./index-mtzjbaaa.js";
|
|
13
13
|
import"./index-c8s9a3zh.js";
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-zjh648z4.js";
|
|
15
15
|
import"./index-j2v3w1ds.js";
|
|
16
16
|
import"./index-scww5b77.js";
|
|
17
17
|
import"./index-yw8qpf51.js";
|
|
@@ -19,7 +19,7 @@ import"./index-85bacexr.js";
|
|
|
19
19
|
import"./index-09xpycan.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_AGENT_CONFIGS
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-18690p15.js";
|
|
23
23
|
import"./index-b15qbvph.js";
|
|
24
24
|
import"./index-y5z2qdvk.js";
|
|
25
25
|
import"./index-41fgssqr.js";
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
ExternalSkillCandidateSchema,
|
|
34
34
|
ExternalSkillCandidateSourceTypeSchema,
|
|
35
35
|
ExternalSkillsConfigSchema,
|
|
36
|
+
GATE_CONFIG_KNOWN_SECTION_KEYS,
|
|
36
37
|
GateConfigSchema,
|
|
37
38
|
GateFeatureSchema,
|
|
38
39
|
GeneralCouncilConfigSchema,
|
|
@@ -85,7 +86,7 @@ import {
|
|
|
85
86
|
resolveGeneratedAgentRole,
|
|
86
87
|
resolveGuardrailsConfig,
|
|
87
88
|
stripKnownSwarmPrefix
|
|
88
|
-
} from "./index-
|
|
89
|
+
} from "./index-18690p15.js";
|
|
89
90
|
import"./index-bfwt3abw.js";
|
|
90
91
|
import"./index-p0arc26j.js";
|
|
91
92
|
import"./index-293f68mj.js";
|
|
@@ -143,6 +144,7 @@ export {
|
|
|
143
144
|
GeneralCouncilConfigSchema,
|
|
144
145
|
GateFeatureSchema,
|
|
145
146
|
GateConfigSchema,
|
|
147
|
+
GATE_CONFIG_KNOWN_SECTION_KEYS,
|
|
146
148
|
ExternalSkillsConfigSchema,
|
|
147
149
|
ExternalSkillCandidateSourceTypeSchema,
|
|
148
150
|
ExternalSkillCandidateSchema,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const BUNDLED_PROJECT_SKILLS: readonly ["brainstorm", "specify", "clarify-spec", "resume", "clarify", "discover", "consult", "pre-phase-briefing", "council", "deep-dive", "deep-research", "codebase-review-swarm", "swarm-implement", "design-docs", "swarm-pr-review", "swarm-pr-feedback", "swarm-pr-subscribe", "issue-ingest", "plan", "critic-gate", "execute", "phase-wrap", "loop", "writing-tests", "running-tests", "engineering-conventions", "commit-pr", "worktree-retry-cleanup", "skill-edit-validation", "merge-queue-readiness", "gate-attribution", "ci-failure-batching"];
|
|
1
|
+
export declare const BUNDLED_PROJECT_SKILLS: readonly ["brainstorm", "specify", "clarify-spec", "resume", "clarify", "discover", "consult", "pre-phase-briefing", "council", "deep-dive", "deep-research", "codebase-review-swarm", "swarm-implement", "design-docs", "swarm-pr-review", "swarm", "swarm-pr-feedback", "swarm-pr-subscribe", "swarm-ci-monitor", "issue-ingest", "plan", "critic-gate", "execute", "phase-wrap", "loop", "writing-tests", "running-tests", "engineering-conventions", "commit-pr", "worktree-retry-cleanup", "skill-edit-validation", "merge-queue-readiness", "gate-attribution", "ci-failure-batching"];
|
|
2
2
|
interface CopyState {
|
|
3
3
|
files: number;
|
|
4
4
|
bytes: number;
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -285,6 +285,14 @@ export declare const QualityBudgetConfigSchema: z.ZodObject<{
|
|
|
285
285
|
exclude_globs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
286
286
|
}, z.core.$strip>;
|
|
287
287
|
export type QualityBudgetConfig = z.infer<typeof QualityBudgetConfigSchema>;
|
|
288
|
+
export declare const GATE_CONFIG_KNOWN_SECTION_KEYS: {
|
|
289
|
+
readonly syntax_check: readonly ["enabled"];
|
|
290
|
+
readonly placeholder_scan: readonly ["enabled", "deny_patterns", "allow_globs", "max_allowed_findings"];
|
|
291
|
+
readonly sast_scan: readonly ["enabled"];
|
|
292
|
+
readonly sbom_generate: readonly ["enabled"];
|
|
293
|
+
readonly build_check: readonly ["enabled"];
|
|
294
|
+
readonly quality_budget: readonly ["enabled", "max_complexity_delta", "max_public_api_delta", "max_duplication_ratio", "min_test_to_code_ratio", "enforce_on_globs", "exclude_globs"];
|
|
295
|
+
};
|
|
288
296
|
export declare const GateConfigSchema: z.ZodObject<{
|
|
289
297
|
syntax_check: z.ZodDefault<z.ZodObject<{
|
|
290
298
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -304,7 +312,7 @@ export declare const GateConfigSchema: z.ZodObject<{
|
|
|
304
312
|
build_check: z.ZodDefault<z.ZodObject<{
|
|
305
313
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
306
314
|
}, z.core.$strip>>;
|
|
307
|
-
quality_budget: z.ZodObject<{
|
|
315
|
+
quality_budget: z.ZodDefault<z.ZodObject<{
|
|
308
316
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
309
317
|
max_complexity_delta: z.ZodDefault<z.ZodNumber>;
|
|
310
318
|
max_public_api_delta: z.ZodDefault<z.ZodNumber>;
|
|
@@ -312,7 +320,7 @@ export declare const GateConfigSchema: z.ZodObject<{
|
|
|
312
320
|
min_test_to_code_ratio: z.ZodDefault<z.ZodNumber>;
|
|
313
321
|
enforce_on_globs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
314
322
|
exclude_globs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
315
|
-
}, z.core.$strip
|
|
323
|
+
}, z.core.$strip>>;
|
|
316
324
|
}, z.core.$strip>;
|
|
317
325
|
export type GateConfig = z.infer<typeof GateConfigSchema>;
|
|
318
326
|
export declare const PipelineConfigSchema: z.ZodObject<{
|
|
@@ -1624,7 +1632,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
1624
1632
|
build_check: z.ZodDefault<z.ZodObject<{
|
|
1625
1633
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1626
1634
|
}, z.core.$strip>>;
|
|
1627
|
-
quality_budget: z.ZodObject<{
|
|
1635
|
+
quality_budget: z.ZodDefault<z.ZodObject<{
|
|
1628
1636
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1629
1637
|
max_complexity_delta: z.ZodDefault<z.ZodNumber>;
|
|
1630
1638
|
max_public_api_delta: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1632,7 +1640,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
1632
1640
|
min_test_to_code_ratio: z.ZodDefault<z.ZodNumber>;
|
|
1633
1641
|
enforce_on_globs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1634
1642
|
exclude_globs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1635
|
-
}, z.core.$strip
|
|
1643
|
+
}, z.core.$strip>>;
|
|
1636
1644
|
}, z.core.$strip>>;
|
|
1637
1645
|
context_budget: z.ZodOptional<z.ZodObject<{
|
|
1638
1646
|
enabled: z.ZodDefault<z.ZodBoolean>;
|