@serkanalgur/opencode-nexus 1.8.3 → 1.9.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/dist/index.js CHANGED
@@ -11454,6 +11454,19 @@ The currency of the whole orchestration is the **validated commit**: a delivery
11454
11454
 
11455
11455
  Execute the five phases in order. Never skip the quality gate.
11456
11456
 
11457
+ ## ⛔ STRICT RULE: Agent Spawning
11458
+
11459
+ **NEVER use OpenCode's built-in \`subagent\` tool. It bypasses Nexus entirely — no cost tracking, no sidebar updates, no self-healing, no session linking.**
11460
+
11461
+ **ALWAYS use \`nexus.spawn\` or \`nexus.delegate\` to create sub-agents.** These tools:
11462
+ - Track costs against your budget
11463
+ - Update the sidebar in real-time
11464
+ - Link child sessions to your parent session in the OpenCode UI
11465
+ - Enable self-healing on failure
11466
+ - Record performance metrics for model selection
11467
+
11468
+ If you accidentally use \`subagent\`, the task will be invisible to Nexus and will not appear in the dashboard or sidebar. This is a hard requirement, not a suggestion.
11469
+
11457
11470
  ## Model configuration
11458
11471
 
11459
11472
  Read your model pools from the first file that exists: \`.opencode/nexus.jsonc\` in the project, then \`~/.config/opencode/nexus.jsonc\`. The configuration maps complexity levels to model pools:
package/dist/tui.js CHANGED
@@ -34763,6 +34763,34 @@ var tui_default = define({
34763
34763
  }
34764
34764
  });
34765
34765
  });
34766
+ const unsubSessionCreated = context.data.on("session.created", (event) => {
34767
+ const newSession = event.data;
34768
+ const newSessionID = newSession.sessionID;
34769
+ const currentRoute = context.ui.router.current();
34770
+ const currentSessionID = currentRoute.type === "session" ? currentRoute.sessionID : null;
34771
+ if (!currentSessionID || !newSessionID)
34772
+ return;
34773
+ const family = context.data.session.family(newSessionID);
34774
+ if (family.includes(currentSessionID) && newSessionID !== currentSessionID) {
34775
+ const meta = newSession.metadata || {};
34776
+ setSidebarState((draft) => {
34777
+ const exists = draft.agents.some((a) => a.sessionID === newSessionID);
34778
+ if (!exists) {
34779
+ draft.agents.push({
34780
+ id: newSessionID,
34781
+ name: newSession.title || newSessionID.slice(0, 12),
34782
+ role: meta.nexusRole || "agent",
34783
+ status: "working",
34784
+ model: meta.nexusModel || "",
34785
+ sessionID: newSessionID,
34786
+ spawnedAt: new Date().toISOString(),
34787
+ tasksCompleted: 0,
34788
+ tasksFailed: 0
34789
+ });
34790
+ }
34791
+ });
34792
+ }
34793
+ });
34766
34794
  const unsubSidebar = context.ui.slot({
34767
34795
  append: "sidebar.content",
34768
34796
  render: (props) => {
@@ -34870,6 +34898,7 @@ var tui_default = define({
34870
34898
  return () => {
34871
34899
  unsubSessionSucceeded();
34872
34900
  unsubSessionFailed();
34901
+ unsubSessionCreated();
34873
34902
  unsubSidebar();
34874
34903
  };
34875
34904
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serkanalgur/opencode-nexus",
3
- "version": "1.8.3",
3
+ "version": "1.9.0",
4
4
  "description": "Adaptive Multi-Agent Orchestration with Cost Intelligence for OpenCode V2",
5
5
  "keywords": [
6
6
  "opencode",