opencode-swarm 6.85.4 → 6.86.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.
@@ -26,6 +26,16 @@ export interface CouncilWorkflowConfig {
26
26
  enabled?: boolean;
27
27
  };
28
28
  }
29
+ /**
30
+ * Subset of PluginConfig.ui_review needed to gate the designer agent
31
+ * references in the architect prompt. Only `enabled` is consumed here —
32
+ * runtime agent creation is handled separately in agents/index.ts.
33
+ * Keeping this shape narrow avoids pulling the full PluginConfig type
34
+ * into the agent-prompt layer.
35
+ */
36
+ export interface UIReviewConfig {
37
+ enabled?: boolean;
38
+ }
29
39
  /**
30
40
  * Build the Work Complete Council four-phase workflow block. Returns the full
31
41
  * block text when council.enabled === true, otherwise the empty string. The
@@ -44,4 +54,4 @@ export declare function buildCouncilWorkflow(council?: CouncilWorkflowConfig): s
44
54
  * BRAINSTORM, and PLAN inline paths stay in lockstep.
45
55
  */
46
56
  export declare function buildQaGateSelectionDialogue(modeLabel: 'BRAINSTORM' | 'SPECIFY' | 'PLAN'): string;
47
- export declare function createArchitectAgent(model: string, customPrompt?: string, customAppendPrompt?: string, adversarialTesting?: AdversarialTestingConfig, council?: CouncilWorkflowConfig): AgentDefinition;
57
+ export declare function createArchitectAgent(model: string, customPrompt?: string, customAppendPrompt?: string, adversarialTesting?: AdversarialTestingConfig, council?: CouncilWorkflowConfig, uiReview?: UIReviewConfig): AgentDefinition;
@@ -0,0 +1 @@
1
+ export {};
package/dist/cli/index.js CHANGED
@@ -18973,6 +18973,7 @@ for (const [agentName, tools] of Object.entries(AGENT_TOOL_MAP)) {
18973
18973
  // src/config/schema.ts
18974
18974
  var AgentOverrideConfigSchema = exports_external.object({
18975
18975
  model: exports_external.string().optional(),
18976
+ variant: exports_external.string().min(1).optional(),
18976
18977
  temperature: exports_external.number().min(0).max(2).optional(),
18977
18978
  disabled: exports_external.boolean().optional(),
18978
18979
  fallback_models: exports_external.array(exports_external.string()).max(3).optional()
@@ -16,6 +16,7 @@ import { z } from 'zod';
16
16
  export declare function stripKnownSwarmPrefix(agentName: string): string;
17
17
  export declare const AgentOverrideConfigSchema: z.ZodObject<{
18
18
  model: z.ZodOptional<z.ZodString>;
19
+ variant: z.ZodOptional<z.ZodString>;
19
20
  temperature: z.ZodOptional<z.ZodNumber>;
20
21
  disabled: z.ZodOptional<z.ZodBoolean>;
21
22
  fallback_models: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -25,6 +26,7 @@ export declare const SwarmConfigSchema: z.ZodObject<{
25
26
  name: z.ZodOptional<z.ZodString>;
26
27
  agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
27
28
  model: z.ZodOptional<z.ZodString>;
29
+ variant: z.ZodOptional<z.ZodString>;
28
30
  temperature: z.ZodOptional<z.ZodNumber>;
29
31
  disabled: z.ZodOptional<z.ZodBoolean>;
30
32
  fallback_models: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -627,6 +629,7 @@ export type ParallelizationConfig = z.infer<typeof ParallelizationConfigSchema>;
627
629
  export declare const PluginConfigSchema: z.ZodObject<{
628
630
  agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
629
631
  model: z.ZodOptional<z.ZodString>;
632
+ variant: z.ZodOptional<z.ZodString>;
630
633
  temperature: z.ZodOptional<z.ZodNumber>;
631
634
  disabled: z.ZodOptional<z.ZodBoolean>;
632
635
  fallback_models: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -635,6 +638,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
635
638
  name: z.ZodOptional<z.ZodString>;
636
639
  agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
637
640
  model: z.ZodOptional<z.ZodString>;
641
+ variant: z.ZodOptional<z.ZodString>;
638
642
  temperature: z.ZodOptional<z.ZodNumber>;
639
643
  disabled: z.ZodOptional<z.ZodBoolean>;
640
644
  fallback_models: z.ZodOptional<z.ZodArray<z.ZodString>>;
package/dist/index.js CHANGED
@@ -14721,6 +14721,7 @@ var init_schema = __esm(() => {
14721
14721
  SEPARATORS = ["_", "-", " "];
14722
14722
  AgentOverrideConfigSchema = exports_external.object({
14723
14723
  model: exports_external.string().optional(),
14724
+ variant: exports_external.string().min(1).optional(),
14724
14725
  temperature: exports_external.number().min(0).max(2).optional(),
14725
14726
  disabled: exports_external.boolean().optional(),
14726
14727
  fallback_models: exports_external.array(exports_external.string()).max(3).optional()
@@ -54348,7 +54349,7 @@ function buildSlashCommandsList() {
54348
54349
  return lines.join(`
54349
54350
  `);
54350
54351
  }
54351
- function createArchitectAgent(model, customPrompt, customAppendPrompt, adversarialTesting, council) {
54352
+ function createArchitectAgent(model, customPrompt, customAppendPrompt, adversarialTesting, council, uiReview) {
54352
54353
  let prompt = ARCHITECT_PROMPT;
54353
54354
  if (customPrompt) {
54354
54355
  prompt = customPrompt;
@@ -54383,6 +54384,13 @@ ${councilBlock}`;
54383
54384
  prompt = prompt?.replace(/\{\{ADVERSARIAL_TEST_STEP\}\}/g, ` 5m. {{AGENT_PREFIX}}test_engineer - Adversarial tests. FAIL \u2192 coder retry from 5g. Scope: attack vectors only \u2014 malformed inputs, boundary violations, injection attempts.
54384
54385
  \u2192 REQUIRED: Print "testengineer-adversarial: [PASS | FAIL \u2014 details]"`)?.replace(/\{\{ADVERSARIAL_TEST_CHECKLIST\}\}/g, " [GATE] test_engineer-adversarial: PASS / FAIL \u2014 value: ___");
54385
54386
  }
54387
+ if (!uiReview?.enabled) {
54388
+ prompt = prompt?.replace(", {{AGENT_PREFIX}}designer", "")?.replace(/\n 9\. \*\*UI\/UX DESIGN GATE\*\*:[\s\S]*?(?=\n10\. \*\*)/, `
54389
+ `)?.replace(`
54390
+ {{AGENT_PREFIX}}designer - UI/UX design specs (scaffold generation for UI components \u2014 runs BEFORE coder on UI tasks)`, "")?.replace(/\n\{\{AGENT_PREFIX\}\}designer\nTASK: Design specification[\s\S]*?accessibility(?=\n\n## WORKFLOW)/, "")?.replace(`5a. **UI DESIGN GATE** (conditional \u2014 Rule 9): If task matches UI trigger \u2192 {{AGENT_PREFIX}}designer produces scaffold \u2192 pass scaffold to coder as INPUT. If no match \u2192 skip.
54391
+
54392
+ `, "")?.replace("\u2192 After step 5a (or immediately if no UI task applies): Call update_task_status", "\u2192 Call update_task_status")?.replace(" (if designer scaffold produced, include it as INPUT)", "");
54393
+ }
54386
54394
  return {
54387
54395
  name: "architect",
54388
54396
  description: "Central orchestrator of the development pipeline. Analyzes requests, coordinates SME consultation, manages code generation, and triages QA feedback.",
@@ -57641,11 +57649,27 @@ function getTemperatureOverride(agentName, swarmAgents, swarmPrefix) {
57641
57649
  const baseAgentName = stripSwarmPrefix(agentName, swarmPrefix);
57642
57650
  return swarmAgents?.[baseAgentName]?.temperature;
57643
57651
  }
57652
+ function getVariantOverride(agentName, swarmAgents, swarmPrefix) {
57653
+ const baseAgentName = stripSwarmPrefix(agentName, swarmPrefix);
57654
+ return swarmAgents?.[baseAgentName]?.variant;
57655
+ }
57644
57656
  function applyOverrides(agent, swarmAgents, swarmPrefix) {
57645
57657
  const tempOverride = getTemperatureOverride(agent.name, swarmAgents, swarmPrefix);
57646
57658
  if (tempOverride !== undefined) {
57647
57659
  agent.config.temperature = tempOverride;
57648
57660
  }
57661
+ const variantOverride = getVariantOverride(agent.name, swarmAgents, swarmPrefix);
57662
+ const modelSegments = agent.config.model?.split("/") ?? [];
57663
+ if (modelSegments.length >= 3) {
57664
+ const autoVariant = modelSegments[modelSegments.length - 1];
57665
+ const cleanedModel = modelSegments.slice(0, -1).join("/");
57666
+ const effectiveVariant = variantOverride ?? autoVariant;
57667
+ console.warn(`[swarm] Deprecation: model "${agent.config.model}" embeds variant. ` + `Use "model": "${cleanedModel}", "variant": "${effectiveVariant}" instead.`);
57668
+ agent.config.model = cleanedModel;
57669
+ agent.config.variant = effectiveVariant;
57670
+ } else if (variantOverride !== undefined) {
57671
+ agent.config.variant = variantOverride;
57672
+ }
57649
57673
  return agent;
57650
57674
  }
57651
57675
  function createSwarmAgents(swarmId, swarmConfig, isDefault, pluginConfig) {
@@ -57660,7 +57684,7 @@ function createSwarmAgents(swarmId, swarmConfig, isDefault, pluginConfig) {
57660
57684
  const prefixName = (name2) => `${prefix}${name2}`;
57661
57685
  if (!isAgentDisabled("architect", swarmAgents, swarmPrefix)) {
57662
57686
  const architectPrompts = getPrompts("architect");
57663
- const architect = createArchitectAgent(getModel("architect"), architectPrompts.prompt, architectPrompts.appendPrompt, pluginConfig?.adversarial_testing, pluginConfig?.council);
57687
+ const architect = createArchitectAgent(getModel("architect"), architectPrompts.prompt, architectPrompts.appendPrompt, pluginConfig?.adversarial_testing, pluginConfig?.council, pluginConfig?.ui_review);
57664
57688
  architect.name = prefixName("architect");
57665
57689
  const swarmName = swarmConfig.name || swarmId;
57666
57690
  const swarmIdentity = isDefault ? "default" : swarmId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.85.4",
3
+ "version": "6.86.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",