@serkanalgur/opencode-nexus 2.1.0 → 2.3.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 +98 -2
- package/dist/tui.js +101 -88
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11538,10 +11538,60 @@ nexus.spawn(role="coder", task="Implement refresh tokens", wait=false)
|
|
|
11538
11538
|
- **architect** — Design system architecture (read-only)
|
|
11539
11539
|
|
|
11540
11540
|
## Cost & Config
|
|
11541
|
-
- Models
|
|
11541
|
+
- Models configured in nexus.jsonc or ~/.config/opencode/nexus.jsonc
|
|
11542
11542
|
- Use nexus.forecast() to estimate costs before spawning
|
|
11543
11543
|
- Use nexus.costs() to check budget
|
|
11544
|
-
- Use nexus.performance.best(role) to pick
|
|
11544
|
+
- Use nexus.performance.best(role) to pick best model for a role
|
|
11545
|
+
|
|
11546
|
+
## Git Workflow
|
|
11547
|
+
|
|
11548
|
+
When code changes are needed, follow this workflow:
|
|
11549
|
+
|
|
11550
|
+
### 1. Pre-Flight
|
|
11551
|
+
- Detect git status (clean? on which branch?)
|
|
11552
|
+
- Check for CI/CD config (.github/, .gitlab-ci.yml)
|
|
11553
|
+
- Verify git identity is set (user.name, user.email)
|
|
11554
|
+
|
|
11555
|
+
### 2. Branching
|
|
11556
|
+
- NEVER commit directly to main
|
|
11557
|
+
- Create feature branch: feat/description, fix/description, chore/description
|
|
11558
|
+
- Use conventional branch naming
|
|
11559
|
+
|
|
11560
|
+
### 3. Commits
|
|
11561
|
+
- Use conventional commits: feat:, fix:, docs:, chore:, refactor:, test:
|
|
11562
|
+
- One logical change per commit
|
|
11563
|
+
- Imperative mood in commit message
|
|
11564
|
+
- Reference issues if applicable
|
|
11565
|
+
|
|
11566
|
+
### 4. Pull Request
|
|
11567
|
+
- Create PR with descriptive title and body
|
|
11568
|
+
- Include: what changed, why, how to test
|
|
11569
|
+
- Link related issues
|
|
11570
|
+
- Request review
|
|
11571
|
+
|
|
11572
|
+
### 5. Merge
|
|
11573
|
+
- Squash merge for clean history
|
|
11574
|
+
- Delete feature branch after merge
|
|
11575
|
+
- Never force push to shared branches
|
|
11576
|
+
|
|
11577
|
+
## Delegation Standard
|
|
11578
|
+
|
|
11579
|
+
When spawning a sub-agent, provide:
|
|
11580
|
+
1. TASK — Atomic, specific goal
|
|
11581
|
+
2. EXPECTED OUTCOME — Concrete success criteria
|
|
11582
|
+
3. MUST DO — Exhaustive requirements
|
|
11583
|
+
4. MUST NOT DO — Forbidden actions
|
|
11584
|
+
5. REQUIRED TOOLS — What tools to use
|
|
11585
|
+
6. CONTEXT — File paths, patterns, constraints
|
|
11586
|
+
|
|
11587
|
+
## Quality Gates
|
|
11588
|
+
|
|
11589
|
+
Before marking a task complete:
|
|
11590
|
+
1. Code compiles/builds without errors
|
|
11591
|
+
2. Tests pass
|
|
11592
|
+
3. No security vulnerabilities (use nexus.security.scan)
|
|
11593
|
+
4. Follows project conventions
|
|
11594
|
+
5. Has appropriate test coverage
|
|
11545
11595
|
`;
|
|
11546
11596
|
var src_default = define({
|
|
11547
11597
|
id: "nexus",
|
|
@@ -11880,6 +11930,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
11880
11930
|
},
|
|
11881
11931
|
additionalProperties: false
|
|
11882
11932
|
},
|
|
11933
|
+
options: { codemode: true },
|
|
11883
11934
|
execute: async (input) => {
|
|
11884
11935
|
const { detailed } = input;
|
|
11885
11936
|
const status = orchestrator.getStatus(detailed);
|
|
@@ -11897,6 +11948,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
11897
11948
|
},
|
|
11898
11949
|
additionalProperties: false
|
|
11899
11950
|
},
|
|
11951
|
+
options: { codemode: true },
|
|
11900
11952
|
execute: async (input) => {
|
|
11901
11953
|
const { filter } = input;
|
|
11902
11954
|
return { content: orchestrator.listAgents(filter) };
|
|
@@ -11910,6 +11962,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
11910
11962
|
properties: {},
|
|
11911
11963
|
additionalProperties: false
|
|
11912
11964
|
},
|
|
11965
|
+
options: { codemode: true },
|
|
11913
11966
|
execute: async () => {
|
|
11914
11967
|
return { content: orchestrator.getCostReport() };
|
|
11915
11968
|
}
|
|
@@ -11922,6 +11975,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
11922
11975
|
properties: {},
|
|
11923
11976
|
additionalProperties: false
|
|
11924
11977
|
},
|
|
11978
|
+
options: { codemode: true },
|
|
11925
11979
|
execute: async () => {
|
|
11926
11980
|
const state = orchestrator.getState();
|
|
11927
11981
|
await ctx.storage.set("orchestrator-state", JSON.parse(JSON.stringify(state)));
|
|
@@ -11936,6 +11990,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
11936
11990
|
properties: {},
|
|
11937
11991
|
additionalProperties: false
|
|
11938
11992
|
},
|
|
11993
|
+
options: { codemode: true },
|
|
11939
11994
|
execute: async () => {
|
|
11940
11995
|
const state = orchestrator.getState();
|
|
11941
11996
|
const tasks = state.tasks || [];
|
|
@@ -11954,6 +12009,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
11954
12009
|
required: ["level"],
|
|
11955
12010
|
additionalProperties: false
|
|
11956
12011
|
},
|
|
12012
|
+
options: { codemode: true },
|
|
11957
12013
|
execute: async (input) => {
|
|
11958
12014
|
const { level, basePath } = input;
|
|
11959
12015
|
orchestrator.configManager.saveConfig(level, basePath || process.cwd());
|
|
@@ -11973,6 +12029,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
11973
12029
|
required: ["level"],
|
|
11974
12030
|
additionalProperties: false
|
|
11975
12031
|
},
|
|
12032
|
+
options: { codemode: true },
|
|
11976
12033
|
execute: async (input) => {
|
|
11977
12034
|
const { level, basePath } = input;
|
|
11978
12035
|
const path = basePath || process.cwd();
|
|
@@ -11999,6 +12056,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
11999
12056
|
required: ["name"],
|
|
12000
12057
|
additionalProperties: false
|
|
12001
12058
|
},
|
|
12059
|
+
options: { codemode: true },
|
|
12002
12060
|
execute: async (input) => {
|
|
12003
12061
|
const { name } = input;
|
|
12004
12062
|
try {
|
|
@@ -12020,6 +12078,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
12020
12078
|
},
|
|
12021
12079
|
additionalProperties: false
|
|
12022
12080
|
},
|
|
12081
|
+
options: { codemode: true },
|
|
12023
12082
|
execute: async (input) => {
|
|
12024
12083
|
const { port, host } = input;
|
|
12025
12084
|
orchestrator.startDashboard(port, host);
|
|
@@ -12034,6 +12093,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
12034
12093
|
properties: {},
|
|
12035
12094
|
additionalProperties: false
|
|
12036
12095
|
},
|
|
12096
|
+
options: { codemode: true },
|
|
12037
12097
|
execute: async () => {
|
|
12038
12098
|
orchestrator.stopDashboard();
|
|
12039
12099
|
return { content: "Dashboard stopped" };
|
|
@@ -12051,6 +12111,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
12051
12111
|
},
|
|
12052
12112
|
additionalProperties: false
|
|
12053
12113
|
},
|
|
12114
|
+
options: { codemode: true },
|
|
12054
12115
|
execute: async (input) => {
|
|
12055
12116
|
const { model, setInput, setOutput } = input;
|
|
12056
12117
|
if (model && setInput !== undefined && setOutput !== undefined) {
|
|
@@ -12091,6 +12152,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
12091
12152
|
required: ["role", "task"],
|
|
12092
12153
|
additionalProperties: false
|
|
12093
12154
|
},
|
|
12155
|
+
options: { codemode: true },
|
|
12094
12156
|
execute: async (input) => {
|
|
12095
12157
|
const { role, task, model, wait, timeout } = input;
|
|
12096
12158
|
try {
|
|
@@ -12227,6 +12289,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
12227
12289
|
required: ["role", "task"],
|
|
12228
12290
|
additionalProperties: false
|
|
12229
12291
|
},
|
|
12292
|
+
options: { codemode: true },
|
|
12230
12293
|
execute: async (input) => {
|
|
12231
12294
|
const { role, task, model, timeout } = input;
|
|
12232
12295
|
try {
|
|
@@ -12290,6 +12353,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
12290
12353
|
},
|
|
12291
12354
|
additionalProperties: false
|
|
12292
12355
|
},
|
|
12356
|
+
options: { codemode: true },
|
|
12293
12357
|
execute: async (input) => {
|
|
12294
12358
|
const { name, baseDir } = input;
|
|
12295
12359
|
if (!name || name === "list") {
|
|
@@ -12313,6 +12377,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
12313
12377
|
properties: {},
|
|
12314
12378
|
additionalProperties: false
|
|
12315
12379
|
},
|
|
12380
|
+
options: { codemode: true },
|
|
12316
12381
|
execute: async () => {
|
|
12317
12382
|
const scores = orchestrator.performanceTracker.getScores();
|
|
12318
12383
|
if (scores.length === 0)
|
|
@@ -12333,6 +12398,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
12333
12398
|
required: ["role"],
|
|
12334
12399
|
additionalProperties: false
|
|
12335
12400
|
},
|
|
12401
|
+
options: { codemode: true },
|
|
12336
12402
|
execute: async (input) => {
|
|
12337
12403
|
const { role } = input;
|
|
12338
12404
|
const best = orchestrator.performanceTracker.getBestModel(role);
|
|
@@ -12353,6 +12419,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
12353
12419
|
required: ["content"],
|
|
12354
12420
|
additionalProperties: false
|
|
12355
12421
|
},
|
|
12422
|
+
options: { codemode: true },
|
|
12356
12423
|
execute: async (input) => {
|
|
12357
12424
|
const { content, filename } = input;
|
|
12358
12425
|
const issues = orchestrator.securityScanner.scanContent(content, filename || "unknown");
|
|
@@ -12370,6 +12437,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
12370
12437
|
},
|
|
12371
12438
|
additionalProperties: false
|
|
12372
12439
|
},
|
|
12440
|
+
options: { codemode: true },
|
|
12373
12441
|
execute: async (input) => {
|
|
12374
12442
|
const { count } = input;
|
|
12375
12443
|
const records = count ? orchestrator.executionHistory.getRecent(count) : orchestrator.executionHistory.getAll();
|
|
@@ -12388,6 +12456,7 @@ You are a technical writer who creates documentation that developers actually wa
|
|
|
12388
12456
|
properties: {},
|
|
12389
12457
|
additionalProperties: false
|
|
12390
12458
|
},
|
|
12459
|
+
options: { codemode: true },
|
|
12391
12460
|
execute: async () => {
|
|
12392
12461
|
const stats = orchestrator.executionHistory.getStats();
|
|
12393
12462
|
return { content: `Total: ${stats.total} | Success: ${(stats.successRate * 100).toFixed(1)}% | Cost: $${stats.totalCost.toFixed(4)} | Avg: ${stats.avgDuration.toFixed(0)}ms
|
|
@@ -12402,6 +12471,7 @@ By role: ${JSON.stringify(stats.byRole)}` };
|
|
|
12402
12471
|
properties: {},
|
|
12403
12472
|
additionalProperties: false
|
|
12404
12473
|
},
|
|
12474
|
+
options: { codemode: true },
|
|
12405
12475
|
execute: async () => {
|
|
12406
12476
|
const roles = orchestrator.customRoles.list();
|
|
12407
12477
|
if (roles.length === 0)
|
|
@@ -12425,6 +12495,7 @@ By role: ${JSON.stringify(stats.byRole)}` };
|
|
|
12425
12495
|
},
|
|
12426
12496
|
required: ["name", "displayName", "prompt"]
|
|
12427
12497
|
},
|
|
12498
|
+
options: { codemode: true },
|
|
12428
12499
|
execute: async (input) => {
|
|
12429
12500
|
const { name, displayName, emoji, prompt, model } = input;
|
|
12430
12501
|
orchestrator.customRoles.register({ name, displayName, emoji: emoji || "\uD83E\uDD16", prompt, model });
|
|
@@ -12441,6 +12512,7 @@ By role: ${JSON.stringify(stats.byRole)}` };
|
|
|
12441
12512
|
},
|
|
12442
12513
|
required: ["tasks"]
|
|
12443
12514
|
},
|
|
12515
|
+
options: { codemode: true },
|
|
12444
12516
|
execute: async (input) => {
|
|
12445
12517
|
const { tasks } = input;
|
|
12446
12518
|
const taskList = JSON.parse(tasks);
|
|
@@ -12475,6 +12547,7 @@ Total: ~$${result.totalEstimatedCost.toFixed(4)}`);
|
|
|
12475
12547
|
name: "worktree.enable",
|
|
12476
12548
|
description: "Enable git worktree isolation for agents",
|
|
12477
12549
|
input: { type: "object", properties: { repoRoot: { type: "string", description: "Repository root (defaults to cwd)" } } },
|
|
12550
|
+
options: { codemode: true },
|
|
12478
12551
|
execute: async (input) => {
|
|
12479
12552
|
const { repoRoot } = input;
|
|
12480
12553
|
orchestrator.enableWorktrees(repoRoot || process.cwd());
|
|
@@ -12485,6 +12558,7 @@ Total: ~$${result.totalEstimatedCost.toFixed(4)}`);
|
|
|
12485
12558
|
name: "worktree.list",
|
|
12486
12559
|
description: "List active agent worktrees",
|
|
12487
12560
|
input: { type: "object", properties: {}, additionalProperties: false },
|
|
12561
|
+
options: { codemode: true },
|
|
12488
12562
|
execute: async () => {
|
|
12489
12563
|
if (!orchestrator.worktreeManager)
|
|
12490
12564
|
return { content: "Worktree isolation not enabled." };
|
|
@@ -12499,6 +12573,7 @@ Total: ~$${result.totalEstimatedCost.toFixed(4)}`);
|
|
|
12499
12573
|
name: "worktree.disable",
|
|
12500
12574
|
description: "Disable worktree isolation and clean up",
|
|
12501
12575
|
input: { type: "object", properties: {}, additionalProperties: false },
|
|
12576
|
+
options: { codemode: true },
|
|
12502
12577
|
execute: async () => {
|
|
12503
12578
|
if (orchestrator.worktreeManager) {
|
|
12504
12579
|
orchestrator.worktreeManager.cleanupAll();
|
|
@@ -12511,6 +12586,7 @@ Total: ~$${result.totalEstimatedCost.toFixed(4)}`);
|
|
|
12511
12586
|
name: "sessions",
|
|
12512
12587
|
description: "List all active Nexus agent sessions",
|
|
12513
12588
|
input: { type: "object", properties: {}, additionalProperties: false },
|
|
12589
|
+
options: { codemode: true },
|
|
12514
12590
|
execute: async () => {
|
|
12515
12591
|
const agents = orchestrator.getState().agents;
|
|
12516
12592
|
if (agents.length === 0)
|
|
@@ -12528,6 +12604,7 @@ ${lines.join(`
|
|
|
12528
12604
|
name: "background",
|
|
12529
12605
|
description: "Move running agents to background (detach from current session)",
|
|
12530
12606
|
input: { type: "object", properties: {}, additionalProperties: false },
|
|
12607
|
+
options: { codemode: true },
|
|
12531
12608
|
execute: async () => {
|
|
12532
12609
|
const agents = orchestrator.getState().agents.filter((a) => a.status === "working" || a.status === "idle");
|
|
12533
12610
|
if (agents.length === 0)
|
|
@@ -12550,6 +12627,7 @@ ${lines.join(`
|
|
|
12550
12627
|
},
|
|
12551
12628
|
required: ["sessionID"]
|
|
12552
12629
|
},
|
|
12630
|
+
options: { codemode: true },
|
|
12553
12631
|
execute: async (input) => {
|
|
12554
12632
|
const { sessionID } = input;
|
|
12555
12633
|
try {
|
|
@@ -12578,6 +12656,7 @@ ${lastMsg.content}` };
|
|
|
12578
12656
|
required: ["question"],
|
|
12579
12657
|
additionalProperties: false
|
|
12580
12658
|
},
|
|
12659
|
+
options: { codemode: true },
|
|
12581
12660
|
execute: async (input) => {
|
|
12582
12661
|
const { question, options, assumption } = input;
|
|
12583
12662
|
const optionList = options ? options.split(",").map((o) => o.trim()) : [];
|
|
@@ -12605,6 +12684,7 @@ Options: ${optionList.map((o, i) => `${i + 1}. ${o}`).join(", ")}`;
|
|
|
12605
12684
|
required: ["description"],
|
|
12606
12685
|
additionalProperties: false
|
|
12607
12686
|
},
|
|
12687
|
+
options: { codemode: true },
|
|
12608
12688
|
execute: async (input) => {
|
|
12609
12689
|
const { description, assignedTo } = input;
|
|
12610
12690
|
const item = orchestrator.todoEnforcer.add(description, assignedTo);
|
|
@@ -12619,6 +12699,7 @@ Options: ${optionList.map((o, i) => `${i + 1}. ${o}`).join(", ")}`;
|
|
|
12619
12699
|
properties: {},
|
|
12620
12700
|
additionalProperties: false
|
|
12621
12701
|
},
|
|
12702
|
+
options: { codemode: true },
|
|
12622
12703
|
execute: async () => {
|
|
12623
12704
|
return { content: orchestrator.todoEnforcer.formatAll() };
|
|
12624
12705
|
}
|
|
@@ -12634,6 +12715,7 @@ Options: ${optionList.map((o, i) => `${i + 1}. ${o}`).join(", ")}`;
|
|
|
12634
12715
|
required: ["id"],
|
|
12635
12716
|
additionalProperties: false
|
|
12636
12717
|
},
|
|
12718
|
+
options: { codemode: true },
|
|
12637
12719
|
execute: async (input) => {
|
|
12638
12720
|
const { id } = input;
|
|
12639
12721
|
const item = orchestrator.todoEnforcer.get(id);
|
|
@@ -12651,6 +12733,7 @@ Options: ${optionList.map((o, i) => `${i + 1}. ${o}`).join(", ")}`;
|
|
|
12651
12733
|
properties: {},
|
|
12652
12734
|
additionalProperties: false
|
|
12653
12735
|
},
|
|
12736
|
+
options: { codemode: true },
|
|
12654
12737
|
execute: async () => {
|
|
12655
12738
|
const stats = orchestrator.todoEnforcer.getStats();
|
|
12656
12739
|
return {
|
|
@@ -12675,6 +12758,7 @@ Options: ${optionList.map((o, i) => `${i + 1}. ${o}`).join(", ")}`;
|
|
|
12675
12758
|
required: ["description"],
|
|
12676
12759
|
additionalProperties: false
|
|
12677
12760
|
},
|
|
12761
|
+
options: { codemode: true },
|
|
12678
12762
|
execute: async (input) => {
|
|
12679
12763
|
const { description, autoContinue } = input;
|
|
12680
12764
|
const goal = goalManager.set(description, autoContinue ?? true);
|
|
@@ -12685,6 +12769,7 @@ Options: ${optionList.map((o, i) => `${i + 1}. ${o}`).join(", ")}`;
|
|
|
12685
12769
|
name: "goal.status",
|
|
12686
12770
|
description: "Show current goal status",
|
|
12687
12771
|
input: { type: "object", properties: {}, additionalProperties: false },
|
|
12772
|
+
options: { codemode: true },
|
|
12688
12773
|
execute: async () => {
|
|
12689
12774
|
const goal = goalManager.getActive();
|
|
12690
12775
|
if (!goal)
|
|
@@ -12698,6 +12783,7 @@ Tasks: ${goal.tasks.length}` };
|
|
|
12698
12783
|
name: "goal.complete",
|
|
12699
12784
|
description: "Complete current goal",
|
|
12700
12785
|
input: { type: "object", properties: {}, additionalProperties: false },
|
|
12786
|
+
options: { codemode: true },
|
|
12701
12787
|
execute: async () => {
|
|
12702
12788
|
const goal = goalManager.getActive();
|
|
12703
12789
|
if (!goal)
|
|
@@ -12710,6 +12796,7 @@ Tasks: ${goal.tasks.length}` };
|
|
|
12710
12796
|
name: "goal.list",
|
|
12711
12797
|
description: "List all goals",
|
|
12712
12798
|
input: { type: "object", properties: {}, additionalProperties: false },
|
|
12799
|
+
options: { codemode: true },
|
|
12713
12800
|
execute: async () => {
|
|
12714
12801
|
const goals = goalManager.getAll();
|
|
12715
12802
|
if (goals.length === 0)
|
|
@@ -12727,6 +12814,7 @@ Tasks: ${goal.tasks.length}` };
|
|
|
12727
12814
|
properties: {},
|
|
12728
12815
|
additionalProperties: false
|
|
12729
12816
|
},
|
|
12817
|
+
options: { codemode: true },
|
|
12730
12818
|
execute: async () => {
|
|
12731
12819
|
const active = goalManager.getActive();
|
|
12732
12820
|
if (!active)
|
|
@@ -12753,6 +12841,7 @@ Tasks: ${goal.tasks.length}` };
|
|
|
12753
12841
|
properties: {},
|
|
12754
12842
|
additionalProperties: false
|
|
12755
12843
|
},
|
|
12844
|
+
options: { codemode: true },
|
|
12756
12845
|
execute: async () => {
|
|
12757
12846
|
const active = goalManager.getActive();
|
|
12758
12847
|
if (!active)
|
|
@@ -12777,6 +12866,7 @@ Tasks: ${goal.tasks.length}` };
|
|
|
12777
12866
|
properties: {},
|
|
12778
12867
|
additionalProperties: false
|
|
12779
12868
|
},
|
|
12869
|
+
options: { codemode: true },
|
|
12780
12870
|
execute: async () => {
|
|
12781
12871
|
const goals = goalManager.getAll();
|
|
12782
12872
|
if (goals.length === 0)
|
|
@@ -12804,6 +12894,7 @@ ${lines.join(`
|
|
|
12804
12894
|
required: ["name", "leadRole"],
|
|
12805
12895
|
additionalProperties: false
|
|
12806
12896
|
},
|
|
12897
|
+
options: { codemode: true },
|
|
12807
12898
|
execute: async (input) => {
|
|
12808
12899
|
const { name, leadRole } = input;
|
|
12809
12900
|
const team = teamManager.create(name, leadRole);
|
|
@@ -12827,6 +12918,7 @@ Add members with nexus.team.addMember(teamId="${team.id}", role="...", model="..
|
|
|
12827
12918
|
required: ["teamId", "role", "model"],
|
|
12828
12919
|
additionalProperties: false
|
|
12829
12920
|
},
|
|
12921
|
+
options: { codemode: true },
|
|
12830
12922
|
execute: async (input) => {
|
|
12831
12923
|
const { teamId, role, model } = input;
|
|
12832
12924
|
const member = teamManager.addMember(teamId, role, model);
|
|
@@ -12853,6 +12945,7 @@ Total members: ${team?.members.length || 0}` };
|
|
|
12853
12945
|
},
|
|
12854
12946
|
additionalProperties: false
|
|
12855
12947
|
},
|
|
12948
|
+
options: { codemode: true },
|
|
12856
12949
|
execute: async (input) => {
|
|
12857
12950
|
const { teamId } = input;
|
|
12858
12951
|
if (teamId) {
|
|
@@ -12890,6 +12983,7 @@ ${lines.join(`
|
|
|
12890
12983
|
required: ["teamId"],
|
|
12891
12984
|
additionalProperties: false
|
|
12892
12985
|
},
|
|
12986
|
+
options: { codemode: true },
|
|
12893
12987
|
execute: async (input) => {
|
|
12894
12988
|
const { teamId } = input;
|
|
12895
12989
|
const team = teamManager.get(teamId);
|
|
@@ -12920,6 +13014,7 @@ ${team.members.map((m) => ` - ${m.role}: ${m.model}`).join(`
|
|
|
12920
13014
|
required: ["pattern", "language", "directory"],
|
|
12921
13015
|
additionalProperties: false
|
|
12922
13016
|
},
|
|
13017
|
+
options: { codemode: true },
|
|
12923
13018
|
execute: async (input) => {
|
|
12924
13019
|
const { pattern, language, directory } = input;
|
|
12925
13020
|
const results = astGrep.search(pattern, language, directory);
|
|
@@ -12935,6 +13030,7 @@ ${lines.join(`
|
|
|
12935
13030
|
name: "astgrep.status",
|
|
12936
13031
|
description: "Check if ast-grep is installed",
|
|
12937
13032
|
input: { type: "object", properties: {}, additionalProperties: false },
|
|
13033
|
+
options: { codemode: true },
|
|
12938
13034
|
execute: async () => {
|
|
12939
13035
|
const available = astGrep.isAvailable();
|
|
12940
13036
|
return { content: available ? "✅ ast-grep is installed" : "❌ ast-grep is not installed. Install with: cargo install ast-grep" };
|
package/dist/tui.js
CHANGED
|
@@ -34857,104 +34857,117 @@ var tui_default = define({
|
|
|
34857
34857
|
pollChildSessions();
|
|
34858
34858
|
} catch {}
|
|
34859
34859
|
const agents = sidebarState.agents;
|
|
34860
|
-
if (!agents || agents.length === 0)
|
|
34860
|
+
if (!agents || agents.length === 0)
|
|
34861
34861
|
return null;
|
|
34862
|
-
|
|
34863
|
-
|
|
34864
|
-
|
|
34865
|
-
|
|
34866
|
-
|
|
34867
|
-
|
|
34868
|
-
|
|
34869
|
-
|
|
34870
|
-
|
|
34871
|
-
|
|
34872
|
-
|
|
34873
|
-
|
|
34874
|
-
|
|
34875
|
-
|
|
34876
|
-
|
|
34877
|
-
|
|
34878
|
-
|
|
34879
|
-
|
|
34880
|
-
|
|
34881
|
-
|
|
34882
|
-
|
|
34883
|
-
|
|
34884
|
-
|
|
34885
|
-
|
|
34886
|
-
|
|
34887
|
-
|
|
34862
|
+
try {
|
|
34863
|
+
const activeAgents = agents.filter((a) => a.status === "working" || a.status === "idle");
|
|
34864
|
+
const completedAgents = agents.filter((a) => a.status === "completed");
|
|
34865
|
+
const failedAgents = agents.filter((a) => a.status === "failed");
|
|
34866
|
+
return /* @__PURE__ */ jsxDEV("div", {
|
|
34867
|
+
style: {
|
|
34868
|
+
padding: "8px",
|
|
34869
|
+
borderTop: "1px solid #333",
|
|
34870
|
+
marginTop: "8px"
|
|
34871
|
+
},
|
|
34872
|
+
children: [
|
|
34873
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
34874
|
+
style: {
|
|
34875
|
+
fontSize: "11px",
|
|
34876
|
+
color: "#888",
|
|
34877
|
+
marginBottom: "4px",
|
|
34878
|
+
display: "flex",
|
|
34879
|
+
justifyContent: "space-between",
|
|
34880
|
+
alignItems: "center"
|
|
34881
|
+
},
|
|
34882
|
+
children: [
|
|
34883
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
34884
|
+
children: "\uD83E\uDD16 Nexus Agents"
|
|
34885
|
+
}, undefined, false, undefined, this),
|
|
34886
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
34887
|
+
style: { color: "#666" },
|
|
34888
|
+
children: [
|
|
34889
|
+
activeAgents.length,
|
|
34890
|
+
" active"
|
|
34891
|
+
]
|
|
34892
|
+
}, undefined, true, undefined, this)
|
|
34893
|
+
]
|
|
34894
|
+
}, undefined, true, undefined, this),
|
|
34895
|
+
activeAgents.map((agent) => /* @__PURE__ */ jsxDEV("div", {
|
|
34896
|
+
style: {
|
|
34897
|
+
fontSize: "10px",
|
|
34898
|
+
padding: "2px 0",
|
|
34899
|
+
color: agent.status === "working" ? "#4ade80" : "#94a3b8"
|
|
34900
|
+
},
|
|
34901
|
+
children: [
|
|
34902
|
+
/* @__PURE__ */ jsxDEV("span", {
|
|
34903
|
+
children: agent.status === "working" ? "\uD83D\uDD04" : "⏸️"
|
|
34904
|
+
}, undefined, false, undefined, this),
|
|
34905
|
+
" ",
|
|
34906
|
+
agent.name,
|
|
34907
|
+
agent.model && /* @__PURE__ */ jsxDEV("span", {
|
|
34908
|
+
style: { color: "#64748b" },
|
|
34909
|
+
children: [
|
|
34910
|
+
" — ",
|
|
34911
|
+
agent.model.split("/").pop()
|
|
34912
|
+
]
|
|
34913
|
+
}, undefined, true, undefined, this)
|
|
34914
|
+
]
|
|
34915
|
+
}, agent.id, true, undefined, this)),
|
|
34916
|
+
completedAgents.length > 0 && /* @__PURE__ */ jsxDEV("div", {
|
|
34917
|
+
style: {
|
|
34918
|
+
marginTop: "4px",
|
|
34919
|
+
paddingTop: "4px",
|
|
34920
|
+
borderTop: "1px solid #222"
|
|
34921
|
+
},
|
|
34922
|
+
children: /* @__PURE__ */ jsxDEV("div", {
|
|
34923
|
+
style: { fontSize: "10px", color: "#666", marginBottom: "2px" },
|
|
34888
34924
|
children: [
|
|
34889
|
-
|
|
34890
|
-
|
|
34925
|
+
"✅ ",
|
|
34926
|
+
completedAgents.length,
|
|
34927
|
+
" completed"
|
|
34891
34928
|
]
|
|
34892
34929
|
}, undefined, true, undefined, this)
|
|
34893
|
-
|
|
34894
|
-
|
|
34895
|
-
|
|
34896
|
-
|
|
34897
|
-
|
|
34898
|
-
padding: "2px 0",
|
|
34899
|
-
color: agent.status === "working" ? "#4ade80" : "#94a3b8"
|
|
34900
|
-
},
|
|
34901
|
-
children: [
|
|
34902
|
-
/* @__PURE__ */ jsxDEV("span", {
|
|
34903
|
-
children: agent.status === "working" ? "\uD83D\uDD04" : "⏸️"
|
|
34904
|
-
}, undefined, false, undefined, this),
|
|
34905
|
-
" ",
|
|
34906
|
-
agent.name,
|
|
34907
|
-
agent.model && /* @__PURE__ */ jsxDEV("span", {
|
|
34908
|
-
style: { color: "#64748b" },
|
|
34930
|
+
}, undefined, false, undefined, this),
|
|
34931
|
+
failedAgents.length > 0 && /* @__PURE__ */ jsxDEV("div", {
|
|
34932
|
+
style: { marginTop: "2px" },
|
|
34933
|
+
children: /* @__PURE__ */ jsxDEV("div", {
|
|
34934
|
+
style: { fontSize: "10px", color: "#ef4444", marginBottom: "2px" },
|
|
34909
34935
|
children: [
|
|
34910
|
-
"
|
|
34911
|
-
|
|
34936
|
+
"❌ ",
|
|
34937
|
+
failedAgents.length,
|
|
34938
|
+
" failed"
|
|
34912
34939
|
]
|
|
34913
34940
|
}, undefined, true, undefined, this)
|
|
34914
|
-
|
|
34915
|
-
|
|
34916
|
-
|
|
34917
|
-
|
|
34918
|
-
|
|
34919
|
-
|
|
34920
|
-
|
|
34921
|
-
},
|
|
34922
|
-
children: /* @__PURE__ */ jsxDEV("div", {
|
|
34923
|
-
style: { fontSize: "10px", color: "#666", marginBottom: "2px" },
|
|
34924
|
-
children: [
|
|
34925
|
-
"✅ ",
|
|
34926
|
-
completedAgents.length,
|
|
34927
|
-
" completed"
|
|
34928
|
-
]
|
|
34929
|
-
}, undefined, true, undefined, this)
|
|
34930
|
-
}, undefined, false, undefined, this),
|
|
34931
|
-
failedAgents.length > 0 && /* @__PURE__ */ jsxDEV("div", {
|
|
34932
|
-
style: { marginTop: "2px" },
|
|
34933
|
-
children: /* @__PURE__ */ jsxDEV("div", {
|
|
34934
|
-
style: { fontSize: "10px", color: "#ef4444", marginBottom: "2px" },
|
|
34941
|
+
}, undefined, false, undefined, this),
|
|
34942
|
+
sidebarState.totalCost > 0 && /* @__PURE__ */ jsxDEV("div", {
|
|
34943
|
+
style: {
|
|
34944
|
+
marginTop: "4px",
|
|
34945
|
+
fontSize: "10px",
|
|
34946
|
+
color: "#666"
|
|
34947
|
+
},
|
|
34935
34948
|
children: [
|
|
34936
|
-
"
|
|
34937
|
-
|
|
34938
|
-
"
|
|
34949
|
+
"\uD83D\uDCB0 $",
|
|
34950
|
+
sidebarState.totalCost.toFixed(4),
|
|
34951
|
+
" / $",
|
|
34952
|
+
sidebarState.budgetRemaining.toFixed(2),
|
|
34953
|
+
" remaining"
|
|
34939
34954
|
]
|
|
34940
34955
|
}, undefined, true, undefined, this)
|
|
34941
|
-
|
|
34942
|
-
|
|
34943
|
-
|
|
34944
|
-
|
|
34945
|
-
|
|
34946
|
-
|
|
34947
|
-
|
|
34948
|
-
|
|
34949
|
-
|
|
34950
|
-
|
|
34951
|
-
|
|
34952
|
-
|
|
34953
|
-
|
|
34954
|
-
|
|
34955
|
-
|
|
34956
|
-
]
|
|
34957
|
-
}, undefined, true, undefined, this);
|
|
34956
|
+
]
|
|
34957
|
+
}, undefined, true, undefined, this);
|
|
34958
|
+
} catch {
|
|
34959
|
+
const active = agents.filter((a) => a.status === "working").length;
|
|
34960
|
+
const failed = agents.filter((a) => a.status === "failed").length;
|
|
34961
|
+
const completed = agents.filter((a) => a.status === "completed").length;
|
|
34962
|
+
const parts = [`${agents.length} agents`];
|
|
34963
|
+
if (active > 0)
|
|
34964
|
+
parts.push(`${active} active`);
|
|
34965
|
+
if (completed > 0)
|
|
34966
|
+
parts.push(`${completed} done`);
|
|
34967
|
+
if (failed > 0)
|
|
34968
|
+
parts.push(`${failed} failed`);
|
|
34969
|
+
return `\uD83E\uDD16 ${parts.join(", ")}`;
|
|
34970
|
+
}
|
|
34958
34971
|
}
|
|
34959
34972
|
});
|
|
34960
34973
|
return () => {
|