opencode-swarm 6.13.0 → 6.13.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.
package/dist/cli/index.js CHANGED
@@ -52,26 +52,14 @@ async function install() {
52
52
  console.log("\u2713 Disabled default OpenCode agents (explore, general)");
53
53
  if (!fs.existsSync(PLUGIN_CONFIG_PATH)) {
54
54
  const defaultConfig = {
55
- preset: "remote",
56
- presets: {
57
- remote: {
58
- architect: { model: "anthropic/claude-sonnet-4.5" },
59
- coder: { model: "openai/gpt-5.2-codex" },
60
- sme: { model: "google/gemini-3-flash" },
61
- reviewer: { model: "google/gemini-3-flash" },
62
- test_engineer: { model: "google/gemini-3-flash" }
63
- },
64
- hybrid: {
65
- architect: { model: "anthropic/claude-sonnet-4.5" },
66
- coder: { model: "ollama/qwen3:72b" },
67
- sme: { model: "npu/qwen3:14b" },
68
- reviewer: { model: "npu/qwen3:14b" },
69
- test_engineer: { model: "npu/qwen3:14b" }
70
- }
55
+ agents: {
56
+ architect: { model: "anthropic/claude-sonnet-4-20250514" },
57
+ coder: { model: "anthropic/claude-sonnet-4-20250514" },
58
+ sme: { model: "google/gemini-2.5-flash" },
59
+ reviewer: { model: "google/gemini-2.5-flash" },
60
+ test_engineer: { model: "google/gemini-2.5-flash" }
71
61
  },
72
- swarm_mode: "remote",
73
- max_iterations: 5,
74
- inject_phase_reminders: true
62
+ max_iterations: 5
75
63
  };
76
64
  saveJson(PLUGIN_CONFIG_PATH, defaultConfig);
77
65
  console.log("\u2713 Created default plugin config at:", PLUGIN_CONFIG_PATH);
package/dist/index.js CHANGED
@@ -31565,16 +31565,16 @@ for (const [agentName, tools] of Object.entries(AGENT_TOOL_MAP)) {
31565
31565
  }
31566
31566
  }
31567
31567
  var DEFAULT_MODELS = {
31568
- architect: "anthropic/claude-sonnet-4-5",
31569
- explorer: "google/gemini-2.0-flash",
31570
- coder: "anthropic/claude-sonnet-4-5",
31571
- test_engineer: "google/gemini-2.0-flash",
31572
- sme: "google/gemini-2.0-flash",
31573
- reviewer: "google/gemini-2.0-flash",
31574
- critic: "google/gemini-2.0-flash",
31575
- docs: "google/gemini-2.0-flash",
31576
- designer: "google/gemini-2.0-flash",
31577
- default: "google/gemini-2.0-flash"
31568
+ architect: "anthropic/claude-sonnet-4-20250514",
31569
+ explorer: "google/gemini-2.5-flash",
31570
+ coder: "anthropic/claude-sonnet-4-20250514",
31571
+ test_engineer: "google/gemini-2.5-flash",
31572
+ sme: "google/gemini-2.5-flash",
31573
+ reviewer: "google/gemini-2.5-flash",
31574
+ critic: "google/gemini-2.5-flash",
31575
+ docs: "google/gemini-2.5-flash",
31576
+ designer: "google/gemini-2.5-flash",
31577
+ default: "google/gemini-2.5-flash"
31578
31578
  };
31579
31579
  var DEFAULT_SCORING_CONFIG = {
31580
31580
  enabled: false,
@@ -32108,6 +32108,22 @@ function loadRawConfigFromPath(configPath) {
32108
32108
  return { config: null, fileExisted: false, hadError: false };
32109
32109
  }
32110
32110
  }
32111
+ function migratePresetsConfig(raw) {
32112
+ if (raw.presets && typeof raw.presets === "object" && !raw.agents) {
32113
+ const presetName = raw.preset || "remote";
32114
+ const presets = raw.presets;
32115
+ const activePreset = presets[presetName] || Object.values(presets)[0];
32116
+ if (activePreset && typeof activePreset === "object") {
32117
+ const migrated = { ...raw, agents: activePreset };
32118
+ delete migrated.preset;
32119
+ delete migrated.presets;
32120
+ delete migrated.swarm_mode;
32121
+ console.warn("[opencode-swarm] Migrated v6.12 presets config to agents format. Consider updating your opencode-swarm.json.");
32122
+ return migrated;
32123
+ }
32124
+ }
32125
+ return raw;
32126
+ }
32111
32127
  function loadPluginConfig(directory) {
32112
32128
  const userConfigPath = path.join(getUserConfigDir(), "opencode", CONFIG_FILENAME);
32113
32129
  const projectConfigPath = path.join(directory, ".opencode", CONFIG_FILENAME);
@@ -32121,6 +32137,7 @@ function loadPluginConfig(directory) {
32121
32137
  if (rawProjectConfig) {
32122
32138
  mergedRaw = deepMerge(mergedRaw, rawProjectConfig);
32123
32139
  }
32140
+ mergedRaw = migratePresetsConfig(mergedRaw);
32124
32141
  const result = PluginConfigSchema.safeParse(mergedRaw);
32125
32142
  if (!result.success) {
32126
32143
  if (rawUserConfig) {
@@ -37140,7 +37157,18 @@ function consolidateSystemMessages(messages) {
37140
37157
  systemContents.push(trimmedContent);
37141
37158
  }
37142
37159
  if (systemContents.length === 0) {
37143
- return [...messages];
37160
+ return messages.filter((m) => {
37161
+ if (m.role !== "system") {
37162
+ return true;
37163
+ }
37164
+ if (typeof m.content !== "string" || m.name !== undefined || m.tool_call_id !== undefined) {
37165
+ return true;
37166
+ }
37167
+ if (m.content.trim().length > 0) {
37168
+ return true;
37169
+ }
37170
+ return false;
37171
+ });
37144
37172
  }
37145
37173
  const mergedSystemContent = systemContents.join(`
37146
37174
 
@@ -37153,9 +37181,14 @@ function consolidateSystemMessages(messages) {
37153
37181
  ...Object.fromEntries(Object.entries(firstSystemMessage).filter(([key]) => key !== "role" && key !== "content"))
37154
37182
  });
37155
37183
  for (let i2 = 0;i2 < messages.length; i2++) {
37156
- if (!systemMessageIndices.includes(i2)) {
37157
- result.push({ ...messages[i2] });
37184
+ const message = messages[i2];
37185
+ if (systemMessageIndices.includes(i2)) {
37186
+ continue;
37187
+ }
37188
+ if (message.role === "system" && typeof message.content === "string" && message.content.trim().length === 0) {
37189
+ continue;
37158
37190
  }
37191
+ result.push({ ...message });
37159
37192
  }
37160
37193
  return result;
37161
37194
  }
@@ -48474,7 +48507,7 @@ var OpenCodeSwarm = async (ctx) => {
48474
48507
  opencodeConfig.command = {
48475
48508
  ...opencodeConfig.command || {},
48476
48509
  swarm: {
48477
- template: "{{arguments}}",
48510
+ template: 'The /swarm command has been processed by the plugin handler. Acknowledge with: "Done." Do not take any further action. User input was: $ARGUMENTS',
48478
48511
  description: "Swarm management commands"
48479
48512
  }
48480
48513
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.13.0",
3
+ "version": "6.13.1",
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",
@@ -9,6 +9,14 @@
9
9
  },
10
10
  "type": "module",
11
11
  "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/zaxbysauce/opencode-swarm.git"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public",
18
+ "registry": "https://registry.npmjs.org/"
19
+ },
12
20
  "keywords": [
13
21
  "opencode",
14
22
  "opencode-plugin",