opencode-swarm 7.164.12 → 7.165.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/durable-session-state/SKILL.md +1 -1
- package/.opencode/skills/issue-tracer/SKILL.md +140 -286
- package/.opencode/skills/issue-tracer/assets/pr-template.md +13 -7
- package/.opencode/skills/issue-tracer/references/acceptance-checks.md +66 -0
- package/.opencode/skills/issue-tracer/references/critic-gate.md +53 -11
- package/.opencode/skills/issue-tracer/references/evidence-artifacts.md +128 -23
- package/.opencode/skills/issue-tracer/references/full-resolution-contract.md +69 -0
- package/.opencode/skills/issue-tracer/references/install.md +31 -9
- package/.opencode/skills/issue-tracer/references/localization-playbook.md +26 -14
- package/.opencode/skills/issue-tracer/references/method-provenance.md +19 -3
- package/.opencode/skills/issue-tracer/references/phase-0-setup.md +90 -0
- package/.opencode/skills/issue-tracer/references/phase-1-intake.md +43 -0
- package/.opencode/skills/issue-tracer/references/untrusted-content.md +13 -5
- package/.opencode/skills/issue-tracer/scripts/repro-check.sh +416 -0
- package/.opencode/skills/issue-tracer/scripts/trace-check.sh +479 -0
- package/.opencode/skills/issue-tracer/scripts/trace-init.sh +96 -6
- package/.opencode/skills/loop/SKILL.md +1 -1
- package/.opencode/skills/{plan → swarm-plan}/SKILL.md +1 -1
- package/dist/cli/{coder-settlement-yh1q5fr3.js → coder-settlement-89nt4j7g.js} +11 -11
- package/dist/cli/{config-doctor-bd4yzmh7.js → config-doctor-gm6f5chm.js} +3 -3
- package/dist/cli/{core-y0s1vmyc.js → core-91p43zwj.js} +2 -2
- package/dist/cli/{curation-policy-gs1qakn7.js → curation-policy-bqpmry2n.js} +5 -5
- package/dist/cli/{curator-brqack0j.js → curator-4bs2hmy9.js} +36 -36
- package/dist/cli/{curator-drift-1sg9yk2m.js → curator-drift-hbc3w5zj.js} +4 -4
- package/dist/cli/curator-llm-factory-fhbjwar0.js +70 -0
- package/dist/cli/{evidence-summary-service-nqbcvp30.js → evidence-summary-service-g1xd8egd.js} +16 -16
- package/dist/cli/{gate-evidence-9stdtpej.js → gate-evidence-gdmgsz7c.js} +7 -7
- package/dist/cli/guardrail-explain-1nfbtpgg.js +71 -0
- package/dist/cli/{guardrail-log-sf39x00b.js → guardrail-log-nyggdv04.js} +8 -8
- package/dist/cli/{guardrail-reset-9wr6a60s.js → guardrail-reset-rp9jq0gj.js} +36 -36
- package/dist/cli/{hive-promoter-bqtj8261.js → hive-promoter-39xb4tx2.js} +36 -36
- package/dist/cli/{index-cgewrpw5.js → index-0e9jh9c7.js} +4 -3
- package/dist/cli/{index-3fnym6ac.js → index-1v6vc90w.js} +4 -4
- package/dist/cli/{index-hg09xemc.js → index-2k53pfnc.js} +4 -4
- package/dist/cli/{index-wknpkfm8.js → index-3xyjvx24.js} +7 -7
- package/dist/cli/{index-03enxdaq.js → index-4gmt79q9.js} +1 -1
- package/dist/cli/{index-qgajv9rd.js → index-58be2gtd.js} +3 -3
- package/dist/cli/{index-r2p0pgst.js → index-5ebgzb5a.js} +3 -3
- package/dist/cli/{index-k0s8n6m5.js → index-5ythtd9t.js} +11 -11
- package/dist/cli/{index-hb7bh4r2.js → index-6be5caj8.js} +30 -6
- package/dist/cli/{index-yvqg6kn5.js → index-6m24v15v.js} +2 -2
- package/dist/cli/{index-sphahrmq.js → index-6rx1rdaq.js} +1 -1
- package/dist/cli/{index-r69gzes2.js → index-7h94rfem.js} +7 -7
- package/dist/cli/{index-xxfk62zd.js → index-8bdk7124.js} +2 -2
- package/dist/cli/{index-50j914b5.js → index-a0d4fp6r.js} +29 -7
- package/dist/cli/{index-8vw2pjgr.js → index-afpkqsdb.js} +6 -6
- package/dist/cli/{index-4mjmnysc.js → index-ajknebrc.js} +1 -1
- package/dist/cli/{index-qqq04n70.js → index-anxs69ad.js} +1 -1
- package/dist/cli/{index-888pq4xx.js → index-c4ddtrqg.js} +7 -7
- package/dist/cli/{index-ztm0q26v.js → index-dh5th4jn.js} +1 -1
- package/dist/cli/{index-c45662wc.js → index-e45htt92.js} +1 -1
- package/dist/cli/{index-ad9064j9.js → index-e6n7cemz.js} +4 -4
- package/dist/cli/{index-hvz4ad2t.js → index-f36hy1x4.js} +1 -1
- package/dist/cli/{index-40twgsyh.js → index-g8wdekzz.js} +2 -2
- package/dist/cli/{index-0byep4pe.js → index-gn6ybsc4.js} +8 -8
- package/dist/cli/{index-ewv8qa8q.js → index-gy0nyfbw.js} +2 -2
- package/dist/cli/{index-wasdrhev.js → index-hdakb4n9.js} +4 -4
- package/dist/cli/{index-5wc5pbzc.js → index-hwz46jj7.js} +682 -349
- package/dist/cli/{index-eed0gkv6.js → index-j2svfhzk.js} +2 -2
- package/dist/cli/{index-2bhz5k91.js → index-jre6tm3v.js} +2 -2
- package/dist/cli/{index-b25t91a3.js → index-k1ntjzmf.js} +2 -2
- package/dist/cli/{index-kxv193aq.js → index-n3pjcks8.js} +5 -5
- package/dist/cli/{index-ebce775n.js → index-p7hdp3rp.js} +2 -2
- package/dist/cli/{index-d3mpxsmy.js → index-ptsqnxwd.js} +7 -7
- package/dist/cli/{index-d7j3n5ra.js → index-qzvry1n1.js} +41 -39
- package/dist/cli/{index-m8xrbdmn.js → index-r5hj3nfe.js} +2 -2
- package/dist/cli/{index-x39hjdf1.js → index-tqw8w2n5.js} +1 -1
- package/dist/cli/{index-es64amqt.js → index-w6988bbc.js} +1 -1
- package/dist/cli/{index-mee9maf5.js → index-xwbn7c8m.js} +2 -2
- package/dist/cli/{index-4vb56w2k.js → index-y1zhpfk8.js} +4 -4
- package/dist/cli/{index-vw66q1rw.js → index-zycp24b9.js} +1 -1
- package/dist/cli/index.js +146 -67
- package/dist/cli/{knowledge-escalator-01vva51d.js → knowledge-escalator-eq07pcj3.js} +13 -13
- package/dist/cli/{knowledge-events-dpfwh1hs.js → knowledge-events-rv9q9mkm.js} +11 -11
- package/dist/cli/{knowledge-link-2rvp966j.js → knowledge-link-dgvbqjqg.js} +4 -4
- package/dist/cli/{knowledge-store-aw58ae7b.js → knowledge-store-cxcr0ttk.js} +5 -5
- package/dist/cli/{knowledge-validator-yhd31ryf.js → knowledge-validator-8qtd9ys0.js} +7 -7
- package/dist/cli/{model-preflight-288nsgpw.js → model-preflight-3s1c0zpc.js} +1 -1
- package/dist/cli/{pending-delegations-fjetcz8e.js → pending-delegations-dp3g8e7k.js} +11 -11
- package/dist/cli/{pr-subscriptions-cwwtfs8w.js → pr-subscriptions-3vx06rar.js} +11 -11
- package/dist/cli/{pr-workflow-gate-5xwtg1k2.js → pr-workflow-gate-bbet0apk.js} +36 -36
- package/dist/cli/{runner-mb51twxt.js → runner-0e3bjeev.js} +5 -5
- package/dist/cli/{scan-cursor-j11qwf0v.js → scan-cursor-zwm0xng7.js} +6 -6
- package/dist/cli/{schema-0xp3bde3.js → schema-ebfxgya0.js} +2 -2
- package/dist/cli/{scope-persistence-brrk806y.js → scope-persistence-6c55akfz.js} +15 -15
- package/dist/cli/{skill-generator-j8qzmet9.js → skill-generator-mv5jxzsh.js} +15 -15
- package/dist/cli/{snapshot-coordination-init-h0xmtftq.js → snapshot-coordination-init-n556wa18.js} +36 -36
- package/dist/cli/{telemetry-m84ap0pp.js → telemetry-a1yvjerj.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-j9zykj18.js → worktree-collision-ownership-pp4z4z8p.js} +12 -12
- package/dist/cli/{worktree-isolation-jd39xz6h.js → worktree-isolation-69hz9dgg.js} +36 -36
- package/dist/commands/benchmark.d.ts +5 -1
- package/dist/commands/registry.d.ts +34 -43
- package/dist/commands/turbo.d.ts +1 -1
- package/dist/config/bundled-skills.d.ts +4 -3
- package/dist/config/constants.d.ts +13 -0
- package/dist/config/skill-mirrors.d.ts +3 -3
- package/dist/hooks/extractors.d.ts +9 -0
- package/dist/hooks/non-architect-advisory.d.ts +18 -0
- package/dist/hooks/repo-graph-injection.d.ts +16 -0
- package/dist/index.js +73 -71
- package/dist/services/decision-drift-analyzer.d.ts +7 -0
- package/dist/services/handoff-service.d.ts +10 -0
- package/dist/services/status-service.d.ts +27 -0
- package/dist/state.d.ts +8 -0
- package/dist/tools/repo-graph/builder.d.ts +1 -25
- package/dist/tools/repo-graph/cache.d.ts +5 -1
- package/dist/tools/repo-graph/fallback-scanner.d.ts +71 -0
- package/dist/tools/repo-graph/indexed-storage.d.ts +11 -0
- package/dist/tools/repo-graph/storage.d.ts +7 -0
- package/dist/utils/context-decisions.d.ts +77 -0
- package/dist/utils/sanitize-display.d.ts +7 -0
- package/package.json +3 -2
- package/dist/cli/curator-llm-factory-dtsjc3zf.js +0 -70
- package/dist/cli/guardrail-explain-3ff1z3fm.js +0 -71
package/dist/cli/index.js
CHANGED
|
@@ -5,76 +5,78 @@ import {
|
|
|
5
5
|
VALID_COMMANDS,
|
|
6
6
|
VERSION_PINNED_LEAF,
|
|
7
7
|
discoverVersionPinnedCachePaths,
|
|
8
|
+
formatCommandNotFound,
|
|
9
|
+
getHostConfigDir,
|
|
8
10
|
getPluginCachePaths,
|
|
9
|
-
getPluginConfigDir,
|
|
10
11
|
getPluginLockFilePaths,
|
|
12
|
+
isCommandFailure,
|
|
11
13
|
readCachePackageVersion,
|
|
12
14
|
resolveCommand,
|
|
13
15
|
safeRealpathSync
|
|
14
|
-
} from "./index-
|
|
16
|
+
} from "./index-hwz46jj7.js";
|
|
15
17
|
import"./index-8d90gzaz.js";
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
18
|
+
import"./index-f36hy1x4.js";
|
|
19
|
+
import"./index-hdakb4n9.js";
|
|
20
|
+
import"./index-k1ntjzmf.js";
|
|
21
|
+
import"./index-5ythtd9t.js";
|
|
22
|
+
import"./index-tqw8w2n5.js";
|
|
21
23
|
import"./index-txdagbh7.js";
|
|
22
24
|
import"./index-cw912re7.js";
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
25
|
+
import"./index-6be5caj8.js";
|
|
26
|
+
import"./index-n3pjcks8.js";
|
|
27
|
+
import"./index-g8wdekzz.js";
|
|
26
28
|
import"./index-70ha9e09.js";
|
|
27
|
-
import"./index-
|
|
29
|
+
import"./index-dh5th4jn.js";
|
|
28
30
|
import"./index-9ss2m4rs.js";
|
|
29
|
-
import"./index-
|
|
31
|
+
import"./index-ptsqnxwd.js";
|
|
30
32
|
import"./index-zsrtt42s.js";
|
|
31
|
-
import"./index-
|
|
33
|
+
import"./index-7h94rfem.js";
|
|
32
34
|
import"./index-6chhqq2n.js";
|
|
33
|
-
import"./index-
|
|
35
|
+
import"./index-8bdk7124.js";
|
|
34
36
|
import"./index-b43rt5ph.js";
|
|
35
37
|
import"./index-q7sjgr1y.js";
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
38
|
+
import"./index-e6n7cemz.js";
|
|
39
|
+
import"./index-p7hdp3rp.js";
|
|
40
|
+
import"./index-afpkqsdb.js";
|
|
41
|
+
import"./index-gn6ybsc4.js";
|
|
42
|
+
import"./index-anxs69ad.js";
|
|
41
43
|
import"./index-z6xqpmqg.js";
|
|
42
44
|
import"./index-p612v1mv.js";
|
|
43
|
-
import"./index-
|
|
44
|
-
import"./index-
|
|
45
|
+
import"./index-2k53pfnc.js";
|
|
46
|
+
import"./index-ajknebrc.js";
|
|
45
47
|
import"./index-rtry5xyf.js";
|
|
46
|
-
import"./index-
|
|
48
|
+
import"./index-58be2gtd.js";
|
|
47
49
|
import"./index-3qf1vxtb.js";
|
|
48
50
|
import"./index-n832052r.js";
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
51
|
-
import"./index-
|
|
51
|
+
import"./index-3xyjvx24.js";
|
|
52
|
+
import"./index-y1zhpfk8.js";
|
|
53
|
+
import"./index-xwbn7c8m.js";
|
|
52
54
|
import"./index-556ja8an.js";
|
|
53
|
-
import"./index-
|
|
54
|
-
import"./index-
|
|
55
|
-
import"./index-
|
|
55
|
+
import"./index-6m24v15v.js";
|
|
56
|
+
import"./index-e45htt92.js";
|
|
57
|
+
import"./index-w6988bbc.js";
|
|
56
58
|
import"./index-ry16d01s.js";
|
|
57
59
|
import"./index-n4fzmqz8.js";
|
|
58
|
-
import"./index-
|
|
59
|
-
import"./index-
|
|
60
|
+
import"./index-j2svfhzk.js";
|
|
61
|
+
import"./index-c4ddtrqg.js";
|
|
60
62
|
import"./index-ae75rja9.js";
|
|
61
|
-
import"./index-
|
|
63
|
+
import"./index-6rx1rdaq.js";
|
|
62
64
|
import"./index-7qefgq4j.js";
|
|
63
|
-
import"./index-
|
|
64
|
-
import"./index-
|
|
65
|
-
import"./index-
|
|
65
|
+
import"./index-jre6tm3v.js";
|
|
66
|
+
import"./index-gy0nyfbw.js";
|
|
67
|
+
import"./index-5ebgzb5a.js";
|
|
66
68
|
import"./index-7g4c7s5r.js";
|
|
67
|
-
import"./index-
|
|
69
|
+
import"./index-zycp24b9.js";
|
|
68
70
|
import"./index-9e6fdz2h.js";
|
|
69
71
|
import"./index-4rhhvd1a.js";
|
|
70
72
|
import {
|
|
71
73
|
init_package,
|
|
72
74
|
package_default
|
|
73
|
-
} from "./index-
|
|
75
|
+
} from "./index-0e9jh9c7.js";
|
|
74
76
|
import {
|
|
75
77
|
DEFAULT_AGENT_CONFIGS,
|
|
76
78
|
init_constants
|
|
77
|
-
} from "./index-
|
|
79
|
+
} from "./index-a0d4fp6r.js";
|
|
78
80
|
import"./index-zjygnfay.js";
|
|
79
81
|
import"./index-bk5tah7q.js";
|
|
80
82
|
import"./index-bpmtbmy9.js";
|
|
@@ -98,7 +100,7 @@ var CONFIG_SCHEMA_REF = `https://unpkg.com/opencode-swarm@${package_default.vers
|
|
|
98
100
|
// src/cli/index.ts
|
|
99
101
|
var { version } = package_default;
|
|
100
102
|
var PACKAGE_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
101
|
-
var CONFIG_DIR =
|
|
103
|
+
var CONFIG_DIR = getHostConfigDir();
|
|
102
104
|
var OPENCODE_CONFIG_PATH = path.join(CONFIG_DIR, "opencode.json");
|
|
103
105
|
var PLUGIN_CONFIG_PATH = path.join(CONFIG_DIR, "opencode-swarm.json");
|
|
104
106
|
var PROMPTS_DIR = path.join(CONFIG_DIR, "opencode-swarm");
|
|
@@ -214,42 +216,88 @@ function saveJson(filepath, data) {
|
|
|
214
216
|
fs.writeFileSync(filepath, `${JSON.stringify(data, null, 2)}
|
|
215
217
|
`, "utf-8");
|
|
216
218
|
}
|
|
219
|
+
function stableJsonStringify(value) {
|
|
220
|
+
return JSON.stringify(sortKeysDeep(value));
|
|
221
|
+
}
|
|
222
|
+
function sortKeysDeep(value) {
|
|
223
|
+
if (Array.isArray(value)) {
|
|
224
|
+
return value.map(sortKeysDeep);
|
|
225
|
+
}
|
|
226
|
+
if (value && typeof value === "object") {
|
|
227
|
+
const record = value;
|
|
228
|
+
const sorted = {};
|
|
229
|
+
for (const key of Object.keys(record).sort()) {
|
|
230
|
+
sorted[key] = sortKeysDeep(record[key]);
|
|
231
|
+
}
|
|
232
|
+
return sorted;
|
|
233
|
+
}
|
|
234
|
+
return value;
|
|
235
|
+
}
|
|
217
236
|
async function install() {
|
|
218
237
|
console.log(`\uD83D\uDC1D Installing OpenCode Swarm...
|
|
219
238
|
`);
|
|
220
239
|
ensureDir(CONFIG_DIR);
|
|
221
240
|
ensureDir(PROMPTS_DIR);
|
|
222
241
|
const LEGACY_CONFIG_PATH = path.join(CONFIG_DIR, "config.json");
|
|
223
|
-
|
|
224
|
-
|
|
242
|
+
const configExisted = fs.existsSync(OPENCODE_CONFIG_PATH);
|
|
243
|
+
const originalConfigRaw = configExisted ? fs.readFileSync(OPENCODE_CONFIG_PATH, "utf-8") : null;
|
|
244
|
+
const originalConfig = loadJson(OPENCODE_CONFIG_PATH);
|
|
245
|
+
let opencodeConfig;
|
|
246
|
+
if (originalConfig) {
|
|
247
|
+
opencodeConfig = structuredClone(originalConfig);
|
|
248
|
+
} else {
|
|
225
249
|
const legacyConfig = loadJson(LEGACY_CONFIG_PATH);
|
|
226
250
|
if (legacyConfig) {
|
|
227
251
|
console.log("\u26A0 Migrating existing config from config.json to opencode.json...");
|
|
228
|
-
opencodeConfig = legacyConfig;
|
|
252
|
+
opencodeConfig = structuredClone(legacyConfig);
|
|
229
253
|
} else {
|
|
254
|
+
if (configExisted) {
|
|
255
|
+
console.warn("\u26A0 opencode.json exists but could not be parsed as JSON. " + "Starting from a fresh config; the original file is preserved in the backup written by this install.");
|
|
256
|
+
}
|
|
230
257
|
opencodeConfig = {};
|
|
231
258
|
}
|
|
232
259
|
}
|
|
233
|
-
if (!opencodeConfig.plugin) {
|
|
260
|
+
if (!Array.isArray(opencodeConfig.plugin)) {
|
|
261
|
+
if (opencodeConfig.plugin) {
|
|
262
|
+
console.warn(`\u26A0 opencode.json "plugin" field has an unexpected type (${typeof opencodeConfig.plugin}); replacing it with a plugin array.`);
|
|
263
|
+
}
|
|
234
264
|
opencodeConfig.plugin = [];
|
|
235
265
|
}
|
|
236
266
|
const pluginName = "opencode-swarm";
|
|
237
267
|
opencodeConfig.plugin = opencodeConfig.plugin.filter((p) => p !== pluginName && !p.startsWith(`${pluginName}@`));
|
|
238
268
|
opencodeConfig.plugin.push(pluginName);
|
|
239
|
-
|
|
269
|
+
const agentIsRecord = typeof opencodeConfig.agent === "object" && opencodeConfig.agent !== null && !Array.isArray(opencodeConfig.agent);
|
|
270
|
+
if (!agentIsRecord) {
|
|
271
|
+
if (opencodeConfig.agent) {
|
|
272
|
+
console.warn(`\u26A0 opencode.json "agent" field has an unexpected type (${Array.isArray(opencodeConfig.agent) ? "array" : typeof opencodeConfig.agent}); replacing it with agent overrides.`);
|
|
273
|
+
}
|
|
240
274
|
opencodeConfig.agent = {};
|
|
241
275
|
}
|
|
242
|
-
opencodeConfig.agent
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
276
|
+
const agentRecord = opencodeConfig.agent;
|
|
277
|
+
for (const builtinAgent of ["explore", "general"]) {
|
|
278
|
+
const existing = agentRecord[builtinAgent];
|
|
279
|
+
const existingRecord = typeof existing === "object" && existing !== null && !Array.isArray(existing) ? existing : null;
|
|
280
|
+
if (existingRecord && existingRecord.disable !== undefined) {
|
|
281
|
+
continue;
|
|
282
|
+
}
|
|
283
|
+
agentRecord[builtinAgent] = {
|
|
284
|
+
...existingRecord ?? {},
|
|
285
|
+
disable: true
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
const semanticallyChanged = !originalConfig || stableJsonStringify(opencodeConfig) !== stableJsonStringify(originalConfig);
|
|
289
|
+
if (semanticallyChanged) {
|
|
290
|
+
if (configExisted && originalConfigRaw !== null) {
|
|
291
|
+
const backupPath = path.join(CONFIG_DIR, "opencode.swarm-install-backup.json");
|
|
292
|
+
fs.writeFileSync(backupPath, originalConfigRaw, "utf-8");
|
|
293
|
+
console.log(`\u2713 Backed up existing config to ${path.basename(backupPath)}`);
|
|
294
|
+
}
|
|
295
|
+
saveJson(OPENCODE_CONFIG_PATH, opencodeConfig);
|
|
296
|
+
console.log("\u2713 Added opencode-swarm to OpenCode plugins");
|
|
297
|
+
console.log("\u2713 Disabled default OpenCode agents (explore, general)");
|
|
298
|
+
} else {
|
|
299
|
+
console.log("\u2713 OpenCode config already up to date (no rewrite)");
|
|
300
|
+
}
|
|
253
301
|
const evicted = evictPluginCaches();
|
|
254
302
|
if (evicted.cleared.length > 0) {
|
|
255
303
|
console.log(`\u2713 Cleared opencode plugin cache (next start will fetch latest): ${evicted.cleared.join(", ")}`);
|
|
@@ -270,7 +318,8 @@ async function install() {
|
|
|
270
318
|
const defaultConfig = {
|
|
271
319
|
$schema: CONFIG_SCHEMA_REF,
|
|
272
320
|
agents: { ...DEFAULT_AGENT_CONFIGS },
|
|
273
|
-
max_iterations: 5
|
|
321
|
+
max_iterations: 5,
|
|
322
|
+
auto_select_architect: true
|
|
274
323
|
};
|
|
275
324
|
saveJson(PLUGIN_CONFIG_PATH, defaultConfig);
|
|
276
325
|
console.log("\u2713 Created default plugin config at:", PLUGIN_CONFIG_PATH);
|
|
@@ -423,7 +472,14 @@ async function uninstall() {
|
|
|
423
472
|
return 0;
|
|
424
473
|
}
|
|
425
474
|
}
|
|
426
|
-
if (!
|
|
475
|
+
if (!Array.isArray(opencodeConfig.plugin)) {
|
|
476
|
+
if (opencodeConfig.plugin) {
|
|
477
|
+
console.warn('\u26A0 opencode.json "plugin" field has an unexpected type (expected array); refusing to modify it.');
|
|
478
|
+
}
|
|
479
|
+
console.log("\u26A0 opencode-swarm is not installed (no plugins configured).");
|
|
480
|
+
return 0;
|
|
481
|
+
}
|
|
482
|
+
if (opencodeConfig.plugin.length === 0) {
|
|
427
483
|
console.log("\u26A0 opencode-swarm is not installed (no plugins configured).");
|
|
428
484
|
return 0;
|
|
429
485
|
}
|
|
@@ -434,7 +490,7 @@ async function uninstall() {
|
|
|
434
490
|
return 0;
|
|
435
491
|
}
|
|
436
492
|
opencodeConfig.plugin = filteredPlugins;
|
|
437
|
-
if (opencodeConfig.agent) {
|
|
493
|
+
if (typeof opencodeConfig.agent === "object" && opencodeConfig.agent !== null && !Array.isArray(opencodeConfig.agent)) {
|
|
438
494
|
delete opencodeConfig.agent.explore;
|
|
439
495
|
delete opencodeConfig.agent.general;
|
|
440
496
|
if (Object.keys(opencodeConfig.agent).length === 0) {
|
|
@@ -466,6 +522,17 @@ async function uninstall() {
|
|
|
466
522
|
cleaned = true;
|
|
467
523
|
}
|
|
468
524
|
}
|
|
525
|
+
const backupPath = path.join(CONFIG_DIR, "opencode.swarm-install-backup.json");
|
|
526
|
+
if (fs.existsSync(backupPath)) {
|
|
527
|
+
const canonical = safeRealpathSync(backupPath, backupPath);
|
|
528
|
+
if (canonical === null || path.basename(canonical) !== "opencode.swarm-install-backup.json" || path.basename(path.dirname(canonical)) !== path.basename(CONFIG_DIR)) {
|
|
529
|
+
console.log(`\u2717 Refused to remove install backup (failed safety check): ${canonical ?? backupPath}`);
|
|
530
|
+
} else {
|
|
531
|
+
fs.unlinkSync(canonical);
|
|
532
|
+
console.log(`\u2713 Removed install backup: ${canonical}`);
|
|
533
|
+
cleaned = true;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
469
536
|
if (!cleaned) {
|
|
470
537
|
console.log("\u2713 No config files to clean up");
|
|
471
538
|
}
|
|
@@ -569,10 +636,12 @@ Valid commands: ${VALID_COMMANDS.join(", ")}`);
|
|
|
569
636
|
}
|
|
570
637
|
const resolved = resolveCommand(args);
|
|
571
638
|
if (!resolved) {
|
|
572
|
-
console.error(
|
|
573
|
-
Valid commands: ${VALID_COMMANDS.join(", ")}`);
|
|
639
|
+
console.error(formatCommandNotFound(args));
|
|
574
640
|
return 1;
|
|
575
641
|
}
|
|
642
|
+
if (resolved.warning) {
|
|
643
|
+
console.error(resolved.warning);
|
|
644
|
+
}
|
|
576
645
|
let policy = resolved.entry.toolPolicy;
|
|
577
646
|
if (!policy) {
|
|
578
647
|
const aliasOf = resolved.entry.aliasOf;
|
|
@@ -585,14 +654,24 @@ Valid commands: ${VALID_COMMANDS.join(", ")}`);
|
|
|
585
654
|
console.error(`Refusing to run human-only command '${resolved.key}' from a non-interactive shell. ` + "Run it yourself in a terminal, or set SWARM_ALLOW_HUMAN_ONLY_CLI=1 if this is an explicitly approved automation.");
|
|
586
655
|
return 1;
|
|
587
656
|
}
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
657
|
+
let result;
|
|
658
|
+
try {
|
|
659
|
+
result = await resolved.entry.handler({
|
|
660
|
+
directory: cwd,
|
|
661
|
+
args: resolved.remainingArgs,
|
|
662
|
+
sessionID: "",
|
|
663
|
+
agents: {},
|
|
664
|
+
source: "cli",
|
|
665
|
+
packageRoot: PACKAGE_ROOT
|
|
666
|
+
});
|
|
667
|
+
} catch (error) {
|
|
668
|
+
console.error(`Error executing command '${resolved.key}': ${error instanceof Error ? error.message : String(error)}`);
|
|
669
|
+
return 1;
|
|
670
|
+
}
|
|
671
|
+
if (isCommandFailure(result)) {
|
|
672
|
+
console.log(result.text);
|
|
673
|
+
return result.exitCode ?? 1;
|
|
674
|
+
}
|
|
596
675
|
console.log(result);
|
|
597
676
|
return 0;
|
|
598
677
|
}
|
|
@@ -9,28 +9,28 @@ import {
|
|
|
9
9
|
maybeEscalateOnViolation,
|
|
10
10
|
maybeQuarantineOnContradiction,
|
|
11
11
|
readRecentEscalations
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
12
|
+
} from "./index-n3pjcks8.js";
|
|
13
|
+
import"./index-gn6ybsc4.js";
|
|
14
|
+
import"./index-anxs69ad.js";
|
|
15
15
|
import"./index-z6xqpmqg.js";
|
|
16
16
|
import"./index-p612v1mv.js";
|
|
17
|
-
import"./index-
|
|
17
|
+
import"./index-58be2gtd.js";
|
|
18
18
|
import"./index-3qf1vxtb.js";
|
|
19
19
|
import"./index-n832052r.js";
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
20
|
+
import"./index-j2svfhzk.js";
|
|
21
|
+
import"./index-c4ddtrqg.js";
|
|
22
22
|
import"./index-ae75rja9.js";
|
|
23
|
-
import"./index-
|
|
23
|
+
import"./index-6rx1rdaq.js";
|
|
24
24
|
import"./index-7qefgq4j.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
25
|
+
import"./index-jre6tm3v.js";
|
|
26
|
+
import"./index-gy0nyfbw.js";
|
|
27
|
+
import"./index-5ebgzb5a.js";
|
|
28
28
|
import"./index-7g4c7s5r.js";
|
|
29
|
-
import"./index-
|
|
29
|
+
import"./index-zycp24b9.js";
|
|
30
30
|
import"./index-9e6fdz2h.js";
|
|
31
31
|
import"./index-4rhhvd1a.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
32
|
+
import"./index-0e9jh9c7.js";
|
|
33
|
+
import"./index-a0d4fp6r.js";
|
|
34
34
|
import"./index-zjygnfay.js";
|
|
35
35
|
import"./index-bk5tah7q.js";
|
|
36
36
|
import"./index-bpmtbmy9.js";
|
|
@@ -29,26 +29,26 @@ import {
|
|
|
29
29
|
resolveKnowledgeCounterBaselinePath,
|
|
30
30
|
resolveKnowledgeEventsPath,
|
|
31
31
|
resolveLegacyApplicationLogPath
|
|
32
|
-
} from "./index-
|
|
33
|
-
import"./index-
|
|
32
|
+
} from "./index-gn6ybsc4.js";
|
|
33
|
+
import"./index-anxs69ad.js";
|
|
34
34
|
import"./index-z6xqpmqg.js";
|
|
35
35
|
import"./index-p612v1mv.js";
|
|
36
|
-
import"./index-
|
|
36
|
+
import"./index-58be2gtd.js";
|
|
37
37
|
import"./index-3qf1vxtb.js";
|
|
38
38
|
import"./index-n832052r.js";
|
|
39
|
-
import"./index-
|
|
39
|
+
import"./index-j2svfhzk.js";
|
|
40
40
|
import"./index-ae75rja9.js";
|
|
41
|
-
import"./index-
|
|
41
|
+
import"./index-6rx1rdaq.js";
|
|
42
42
|
import"./index-7qefgq4j.js";
|
|
43
|
-
import"./index-
|
|
44
|
-
import"./index-
|
|
45
|
-
import"./index-
|
|
43
|
+
import"./index-jre6tm3v.js";
|
|
44
|
+
import"./index-gy0nyfbw.js";
|
|
45
|
+
import"./index-5ebgzb5a.js";
|
|
46
46
|
import"./index-7g4c7s5r.js";
|
|
47
|
-
import"./index-
|
|
47
|
+
import"./index-zycp24b9.js";
|
|
48
48
|
import"./index-9e6fdz2h.js";
|
|
49
49
|
import"./index-4rhhvd1a.js";
|
|
50
|
-
import"./index-
|
|
51
|
-
import"./index-
|
|
50
|
+
import"./index-0e9jh9c7.js";
|
|
51
|
+
import"./index-a0d4fp6r.js";
|
|
52
52
|
import"./index-zjygnfay.js";
|
|
53
53
|
import"./index-bk5tah7q.js";
|
|
54
54
|
import"./index-bpmtbmy9.js";
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
resolveLinkDir,
|
|
13
13
|
sanitizeLinkId,
|
|
14
14
|
writeLinkPointer
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-6rx1rdaq.js";
|
|
16
16
|
import"./index-7qefgq4j.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
17
|
+
import"./index-jre6tm3v.js";
|
|
18
|
+
import"./index-gy0nyfbw.js";
|
|
19
|
+
import"./index-5ebgzb5a.js";
|
|
20
20
|
import"./index-7g4c7s5r.js";
|
|
21
21
|
import"./index-bpmtbmy9.js";
|
|
22
22
|
import"./index-zgwm4ryv.js";
|
|
@@ -42,15 +42,15 @@ import {
|
|
|
42
42
|
transactKnowledge,
|
|
43
43
|
transactKnowledgeWithCas,
|
|
44
44
|
wordBigrams
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-c4ddtrqg.js";
|
|
46
46
|
import {
|
|
47
47
|
resolveHiveDataDir
|
|
48
48
|
} from "./index-ae75rja9.js";
|
|
49
|
-
import"./index-
|
|
49
|
+
import"./index-6rx1rdaq.js";
|
|
50
50
|
import"./index-7qefgq4j.js";
|
|
51
|
-
import"./index-
|
|
52
|
-
import"./index-
|
|
53
|
-
import"./index-
|
|
51
|
+
import"./index-jre6tm3v.js";
|
|
52
|
+
import"./index-gy0nyfbw.js";
|
|
53
|
+
import"./index-5ebgzb5a.js";
|
|
54
54
|
import"./index-7g4c7s5r.js";
|
|
55
55
|
import"./index-bk5tah7q.js";
|
|
56
56
|
import"./index-bpmtbmy9.js";
|
|
@@ -23,16 +23,16 @@ import {
|
|
|
23
23
|
validateLesson,
|
|
24
24
|
validateSkillCandidatePath,
|
|
25
25
|
validateSkillPath
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-2k53pfnc.js";
|
|
27
|
+
import"./index-ajknebrc.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
29
|
+
import"./index-c4ddtrqg.js";
|
|
30
30
|
import"./index-ae75rja9.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-6rx1rdaq.js";
|
|
32
32
|
import"./index-7qefgq4j.js";
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
33
|
+
import"./index-jre6tm3v.js";
|
|
34
|
+
import"./index-gy0nyfbw.js";
|
|
35
|
+
import"./index-5ebgzb5a.js";
|
|
36
36
|
import"./index-7g4c7s5r.js";
|
|
37
37
|
import"./index-bk5tah7q.js";
|
|
38
38
|
import"./index-bpmtbmy9.js";
|
|
@@ -66,23 +66,23 @@ import {
|
|
|
66
66
|
sweepStaleDelegations,
|
|
67
67
|
updateCoderSettlement,
|
|
68
68
|
writeDelegationFallback
|
|
69
|
-
} from "./index-
|
|
70
|
-
import"./index-
|
|
69
|
+
} from "./index-afpkqsdb.js";
|
|
70
|
+
import"./index-anxs69ad.js";
|
|
71
71
|
import"./index-z6xqpmqg.js";
|
|
72
72
|
import"./index-p612v1mv.js";
|
|
73
|
-
import"./index-
|
|
74
|
-
import"./index-
|
|
75
|
-
import"./index-
|
|
73
|
+
import"./index-6m24v15v.js";
|
|
74
|
+
import"./index-e45htt92.js";
|
|
75
|
+
import"./index-w6988bbc.js";
|
|
76
76
|
import"./index-ry16d01s.js";
|
|
77
77
|
import"./index-n4fzmqz8.js";
|
|
78
|
-
import"./index-
|
|
79
|
-
import"./index-
|
|
78
|
+
import"./index-j2svfhzk.js";
|
|
79
|
+
import"./index-c4ddtrqg.js";
|
|
80
80
|
import"./index-ae75rja9.js";
|
|
81
|
-
import"./index-
|
|
81
|
+
import"./index-6rx1rdaq.js";
|
|
82
82
|
import"./index-7qefgq4j.js";
|
|
83
|
-
import"./index-
|
|
84
|
-
import"./index-
|
|
85
|
-
import"./index-
|
|
83
|
+
import"./index-jre6tm3v.js";
|
|
84
|
+
import"./index-gy0nyfbw.js";
|
|
85
|
+
import"./index-5ebgzb5a.js";
|
|
86
86
|
import"./index-7g4c7s5r.js";
|
|
87
87
|
import"./index-zjygnfay.js";
|
|
88
88
|
import"./index-bk5tah7q.js";
|
|
@@ -14,23 +14,23 @@ import {
|
|
|
14
14
|
sweepStale,
|
|
15
15
|
unsubscribe,
|
|
16
16
|
updateSnapshot
|
|
17
|
-
} from "./index-
|
|
18
|
-
import"./index-
|
|
17
|
+
} from "./index-ptsqnxwd.js";
|
|
18
|
+
import"./index-anxs69ad.js";
|
|
19
19
|
import"./index-z6xqpmqg.js";
|
|
20
20
|
import"./index-p612v1mv.js";
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
21
|
+
import"./index-6m24v15v.js";
|
|
22
|
+
import"./index-e45htt92.js";
|
|
23
|
+
import"./index-w6988bbc.js";
|
|
24
24
|
import"./index-ry16d01s.js";
|
|
25
25
|
import"./index-n4fzmqz8.js";
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
import"./index-j2svfhzk.js";
|
|
27
|
+
import"./index-c4ddtrqg.js";
|
|
28
28
|
import"./index-ae75rja9.js";
|
|
29
|
-
import"./index-
|
|
29
|
+
import"./index-6rx1rdaq.js";
|
|
30
30
|
import"./index-7qefgq4j.js";
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
31
|
+
import"./index-jre6tm3v.js";
|
|
32
|
+
import"./index-gy0nyfbw.js";
|
|
33
|
+
import"./index-5ebgzb5a.js";
|
|
34
34
|
import"./index-7g4c7s5r.js";
|
|
35
35
|
import"./index-zjygnfay.js";
|
|
36
36
|
import"./index-bk5tah7q.js";
|
|
@@ -78,66 +78,66 @@ import {
|
|
|
78
78
|
withPrWorkflowCheckoutMutationLock,
|
|
79
79
|
withPrWorkflowCheckoutPreparationLock,
|
|
80
80
|
writePrWorkflowAtomicJson
|
|
81
|
-
} from "./index-
|
|
81
|
+
} from "./index-hwz46jj7.js";
|
|
82
82
|
import"./index-8d90gzaz.js";
|
|
83
|
-
import"./index-
|
|
84
|
-
import"./index-
|
|
85
|
-
import"./index-
|
|
86
|
-
import"./index-
|
|
87
|
-
import"./index-
|
|
83
|
+
import"./index-f36hy1x4.js";
|
|
84
|
+
import"./index-hdakb4n9.js";
|
|
85
|
+
import"./index-k1ntjzmf.js";
|
|
86
|
+
import"./index-5ythtd9t.js";
|
|
87
|
+
import"./index-tqw8w2n5.js";
|
|
88
88
|
import"./index-txdagbh7.js";
|
|
89
89
|
import"./index-cw912re7.js";
|
|
90
|
-
import"./index-
|
|
91
|
-
import"./index-
|
|
92
|
-
import"./index-
|
|
90
|
+
import"./index-6be5caj8.js";
|
|
91
|
+
import"./index-n3pjcks8.js";
|
|
92
|
+
import"./index-g8wdekzz.js";
|
|
93
93
|
import"./index-70ha9e09.js";
|
|
94
|
-
import"./index-
|
|
94
|
+
import"./index-dh5th4jn.js";
|
|
95
95
|
import"./index-9ss2m4rs.js";
|
|
96
|
-
import"./index-
|
|
96
|
+
import"./index-ptsqnxwd.js";
|
|
97
97
|
import"./index-zsrtt42s.js";
|
|
98
|
-
import"./index-
|
|
98
|
+
import"./index-7h94rfem.js";
|
|
99
99
|
import"./index-6chhqq2n.js";
|
|
100
|
-
import"./index-
|
|
100
|
+
import"./index-8bdk7124.js";
|
|
101
101
|
import"./index-b43rt5ph.js";
|
|
102
102
|
import"./index-q7sjgr1y.js";
|
|
103
|
-
import"./index-
|
|
104
|
-
import"./index-
|
|
103
|
+
import"./index-e6n7cemz.js";
|
|
104
|
+
import"./index-p7hdp3rp.js";
|
|
105
105
|
import {
|
|
106
106
|
PR_REVIEW_BASE_DIMENSION_IDS
|
|
107
|
-
} from "./index-
|
|
108
|
-
import"./index-
|
|
109
|
-
import"./index-
|
|
107
|
+
} from "./index-afpkqsdb.js";
|
|
108
|
+
import"./index-gn6ybsc4.js";
|
|
109
|
+
import"./index-anxs69ad.js";
|
|
110
110
|
import"./index-z6xqpmqg.js";
|
|
111
111
|
import"./index-p612v1mv.js";
|
|
112
|
-
import"./index-
|
|
113
|
-
import"./index-
|
|
112
|
+
import"./index-2k53pfnc.js";
|
|
113
|
+
import"./index-ajknebrc.js";
|
|
114
114
|
import"./index-rtry5xyf.js";
|
|
115
|
-
import"./index-
|
|
115
|
+
import"./index-58be2gtd.js";
|
|
116
116
|
import"./index-3qf1vxtb.js";
|
|
117
117
|
import"./index-n832052r.js";
|
|
118
|
-
import"./index-
|
|
119
|
-
import"./index-
|
|
120
|
-
import"./index-
|
|
118
|
+
import"./index-3xyjvx24.js";
|
|
119
|
+
import"./index-y1zhpfk8.js";
|
|
120
|
+
import"./index-xwbn7c8m.js";
|
|
121
121
|
import"./index-556ja8an.js";
|
|
122
|
-
import"./index-
|
|
123
|
-
import"./index-
|
|
124
|
-
import"./index-
|
|
122
|
+
import"./index-6m24v15v.js";
|
|
123
|
+
import"./index-e45htt92.js";
|
|
124
|
+
import"./index-w6988bbc.js";
|
|
125
125
|
import"./index-ry16d01s.js";
|
|
126
126
|
import"./index-n4fzmqz8.js";
|
|
127
|
-
import"./index-
|
|
128
|
-
import"./index-
|
|
127
|
+
import"./index-j2svfhzk.js";
|
|
128
|
+
import"./index-c4ddtrqg.js";
|
|
129
129
|
import"./index-ae75rja9.js";
|
|
130
|
-
import"./index-
|
|
130
|
+
import"./index-6rx1rdaq.js";
|
|
131
131
|
import"./index-7qefgq4j.js";
|
|
132
|
-
import"./index-
|
|
133
|
-
import"./index-
|
|
134
|
-
import"./index-
|
|
132
|
+
import"./index-jre6tm3v.js";
|
|
133
|
+
import"./index-gy0nyfbw.js";
|
|
134
|
+
import"./index-5ebgzb5a.js";
|
|
135
135
|
import"./index-7g4c7s5r.js";
|
|
136
|
-
import"./index-
|
|
136
|
+
import"./index-zycp24b9.js";
|
|
137
137
|
import"./index-9e6fdz2h.js";
|
|
138
138
|
import"./index-4rhhvd1a.js";
|
|
139
|
-
import"./index-
|
|
140
|
-
import"./index-
|
|
139
|
+
import"./index-0e9jh9c7.js";
|
|
140
|
+
import"./index-a0d4fp6r.js";
|
|
141
141
|
import"./index-zjygnfay.js";
|
|
142
142
|
import"./index-bk5tah7q.js";
|
|
143
143
|
import"./index-bpmtbmy9.js";
|