@serkanalgur/opencode-nexus 2.0.1 → 2.0.3

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 (2) hide show
  1. package/dist/index.js +35 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11455,6 +11455,24 @@ The currency of the whole orchestration is the **validated commit**: a delivery
11455
11455
 
11456
11456
  Execute the five phases in order. Never skip the quality gate.
11457
11457
 
11458
+ ## ⛔ STRICT RULE: You Are an Orchestrator, Not a Worker
11459
+
11460
+ **You NEVER do the work yourself. You ONLY decompose and delegate.**
11461
+
11462
+ This means:
11463
+ - **NEVER read source files yourself** — delegate to nexus.spawn(role="explorer")
11464
+ - **NEVER write code yourself** — delegate to nexus.spawn(role="coder")
11465
+ - **NEVER review code yourself** — delegate to nexus.spawn(role="reviewer")
11466
+ - **NEVER write tests yourself** — delegate to nexus.spawn(role="tester")
11467
+ - **NEVER explore codebases yourself** — delegate to nexus.spawn(role="explorer")
11468
+ - **NEVER write documentation yourself** — delegate to nexus.spawn(role="documenter")
11469
+
11470
+ Your job is to: analyze the request → decompose into tasks → select models → spawn agents → monitor progress → review results → integrate. Nothing else.
11471
+
11472
+ If you find yourself reading a file, STOP. Spawn an explorer agent instead.
11473
+ If you find yourself writing code, STOP. Spawn a coder agent instead.
11474
+ If you find yourself thinking "I'll just quickly check this", STOP. Spawn an explorer agent.
11475
+
11458
11476
  ## ⛔ STRICT RULE: Agent Spawning
11459
11477
 
11460
11478
  **NEVER use OpenCode's built-in \`subagent\` tool. It bypasses Nexus entirely — no cost tracking, no sidebar updates, no self-healing, no session linking.**
@@ -12569,7 +12587,23 @@ By role: ${JSON.stringify(stats.byRole)}` };
12569
12587
  const { tasks } = input;
12570
12588
  const taskList = JSON.parse(tasks);
12571
12589
  const remaining = orchestrator.budget.maxTotalCost - orchestrator.totalSpent;
12572
- const result = orchestrator.forecaster.forecastAll(taskList, remaining);
12590
+ const normalizedTasks = taskList.map((t) => ({
12591
+ task: t.task || {
12592
+ id: `forecast-${Date.now()}`,
12593
+ name: t.name || `${t.role} task`,
12594
+ description: t.description || "",
12595
+ files: { include: [] },
12596
+ dependencies: [],
12597
+ requiredRole: t.role,
12598
+ complexity: typeof t.complexity === "number" ? { overall: t.complexity, factors: { fileCount: 0, codeLines: 0, dependencyDepth: 0, domainKnowledge: 0, riskLevel: "low" } } : { overall: 50, factors: { fileCount: 0, codeLines: 0, dependencyDepth: 0, domainKnowledge: 0, riskLevel: "low" } },
12599
+ priority: "normal",
12600
+ status: "pending"
12601
+ },
12602
+ role: t.role,
12603
+ model: t.model,
12604
+ complexity: typeof t.complexity === "number" ? { overall: t.complexity, factors: { fileCount: 0, codeLines: 0, dependencyDepth: 0, domainKnowledge: 0, riskLevel: "low" } } : t.complexity || { overall: 50, factors: { fileCount: 0, codeLines: 0, dependencyDepth: 0, domainKnowledge: 0, riskLevel: "low" } }
12605
+ }));
12606
+ const result = orchestrator.forecaster.forecastAll(normalizedTasks, remaining);
12573
12607
  const lines = result.estimates.map((e) => `${e.taskName}: ~$${e.estimatedCost.toFixed(4)} (${e.model})`);
12574
12608
  lines.push(`
12575
12609
  Total: ~$${result.totalEstimatedCost.toFixed(4)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serkanalgur/opencode-nexus",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Adaptive Multi-Agent Orchestration with Cost Intelligence for OpenCode V2",
5
5
  "keywords": [
6
6
  "opencode",