@serkanalgur/opencode-nexus 1.8.0 → 1.8.2

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/README.md CHANGED
@@ -146,15 +146,36 @@ Failed tasks follow a 4-step escalation chain:
146
146
 
147
147
  ### Web Dashboard
148
148
 
149
- Real-time monitoring via embedded HTTP + WebSocket server:
149
+ Real-time monitoring via embedded HTTP + WebSocket server on port 4747.
150
150
 
151
+ **How to start:**
152
+
153
+ 1. Ask the agent to start the dashboard:
154
+ ```
155
+ Use nexus.dashboard.start with port=4747
156
+ ```
157
+
158
+ 2. Or use the TUI command:
159
+ ```
160
+ /nexus web
161
+ ```
162
+ This shows instructions and tries to open your browser.
163
+
164
+ 3. Open in browser: `http://localhost:4747`
165
+
166
+ **What it shows:**
167
+ - Agent grid with role, status, model, and metrics
168
+ - Cost tracker with budget gauge
169
+ - DAG visualization with task dependencies
170
+ - Activity log with all events
171
+ - Config panel (read-only)
172
+ - Auto-refresh every 5 seconds
173
+
174
+ **Stop the dashboard:**
151
175
  ```
152
- nexus.dashboard.start(port=4747) # Start server
153
- # Open http://localhost:4747 in browser
176
+ nexus.dashboard.stop()
154
177
  ```
155
178
 
156
- Features: Agent grid, cost tracker, DAG visualization, activity log, config editor, auto-refresh.
157
-
158
179
  ### Team Mode
159
180
 
160
181
  Create a team of specialist agents working in parallel:
package/dist/index.js CHANGED
@@ -11536,6 +11536,24 @@ Stop it when done:
11536
11536
  nexus.dashboard.stop()
11537
11537
  \`\`\`
11538
11538
 
11539
+ ## Git Workflow & Environment Detection
11540
+
11541
+ Before starting any work, detect the git environment and follow proper workflow:
11542
+
11543
+ ### Detection
11544
+ - Run \`git status\` to verify it's a git repo
11545
+ - Check \`.github/\` or \`.gitlab-ci.yml\` for CI/CD
11546
+ - Check \`git remote -v\` for GitHub/GitLab URLs
11547
+
11548
+ ### Rules
11549
+ 1. **NEVER push directly to main** — always create a feature branch
11550
+ 2. **Use conventional commits**: \`feat:\`, \`fix:\`, \`docs:\`, \`chore:\`
11551
+ 3. **Create PR** for review before merging
11552
+ 4. **Ask the user** about branching strategy if unclear
11553
+
11554
+ ### Memory
11555
+ Store git workflow preferences in memory for future reference.
11556
+
11539
11557
  ## Quality Gates
11540
11558
 
11541
11559
  ## Phase 2 — Worktrees and snapshots
package/dist/tui.js CHANGED
@@ -34541,19 +34541,23 @@ var tui_default = define({
34541
34541
  context.ui.toast.show({
34542
34542
  title: "⚡ Nexus Web Dashboard",
34543
34543
  message: [
34544
- `Port: ${port} Host: ${host}`,
34544
+ `Starting dashboard on port ${port}...`,
34545
34545
  "",
34546
- "To start the dashboard, ask the agent:",
34547
- ` nexus.dashboard.start(port=${port}, host="${host}")`,
34546
+ `Ask the agent to run: nexus.dashboard.start(port=${port})`,
34548
34547
  "",
34549
- `Then open: http://${host}:${port}`,
34548
+ `Or type: nexus.dashboard.start with port=${port} in your next message`,
34550
34549
  "",
34551
- "Or use /nexus-dashboard for a config summary."
34550
+ `Then open: http://${host}:${port}`
34552
34551
  ].join(`
34553
34552
  `),
34554
- variant: "info",
34555
- duration: 12000
34553
+ variant: "success",
34554
+ duration: 8000
34556
34555
  });
34556
+ try {
34557
+ const { exec } = await import("node:child_process");
34558
+ const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
34559
+ exec(`${cmd} http://${host}:${port}`);
34560
+ } catch {}
34557
34561
  }
34558
34562
  break;
34559
34563
  case "model":
@@ -34739,27 +34743,33 @@ var tui_default = define({
34739
34743
  budgetRemaining: 10
34740
34744
  }
34741
34745
  });
34742
- const unsubStorage = context.data.on("model.updated", (event) => {});
34746
+ const unsubSessionSucceeded = context.data.on("session.execution.succeeded", (event) => {
34747
+ const sessionId = event.data.sessionID;
34748
+ setSidebarState((draft) => {
34749
+ const agent = draft.agents.find((a) => a.sessionID === sessionId);
34750
+ if (agent) {
34751
+ agent.status = "completed";
34752
+ agent.tasksCompleted++;
34753
+ }
34754
+ });
34755
+ });
34756
+ const unsubSessionFailed = context.data.on("session.execution.failed", (event) => {
34757
+ const sessionId = event.data.sessionID;
34758
+ setSidebarState((draft) => {
34759
+ const agent = draft.agents.find((a) => a.sessionID === sessionId);
34760
+ if (agent) {
34761
+ agent.status = "failed";
34762
+ agent.tasksFailed++;
34763
+ }
34764
+ });
34765
+ });
34743
34766
  const unsubSidebar = context.ui.slot({
34744
34767
  append: "sidebar.content",
34745
34768
  render: (props) => {
34746
- const family = context.data.session.family(props.sessionID);
34747
- const sessions = context.data.session.list();
34748
- const childSessions = family.filter((id) => id !== props.sessionID).map((id) => context.data.session.get(id)).filter(Boolean);
34749
- if (childSessions.length === 0 && sidebarState.agents.length === 0) {
34769
+ const agents = sidebarState.agents;
34770
+ if (!agents || agents.length === 0) {
34750
34771
  return null;
34751
34772
  }
34752
- const agents = sidebarState.agents.length > 0 ? sidebarState.agents : childSessions.map((s) => ({
34753
- id: s.id,
34754
- name: s.title || s.id.slice(0, 12),
34755
- role: "agent",
34756
- status: "idle",
34757
- model: "",
34758
- sessionID: s.id,
34759
- spawnedAt: new Date().toISOString(),
34760
- tasksCompleted: 0,
34761
- tasksFailed: 0
34762
- }));
34763
34773
  const activeAgents = agents.filter((a) => a.status === "working" || a.status === "idle");
34764
34774
  const completedAgents = agents.filter((a) => a.status === "completed");
34765
34775
  const failedAgents = agents.filter((a) => a.status === "failed");
@@ -34858,7 +34868,8 @@ var tui_default = define({
34858
34868
  }
34859
34869
  });
34860
34870
  return () => {
34861
- unsubStorage();
34871
+ unsubSessionSucceeded();
34872
+ unsubSessionFailed();
34862
34873
  unsubSidebar();
34863
34874
  };
34864
34875
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serkanalgur/opencode-nexus",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "Adaptive Multi-Agent Orchestration with Cost Intelligence for OpenCode V2",
5
5
  "keywords": [
6
6
  "opencode",