@serkanalgur/opencode-nexus 1.2.4 → 1.2.6

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
@@ -8567,6 +8567,14 @@ class NexusConfigManager {
8567
8567
  const config = this.getNonDefaultConfig();
8568
8568
  this.writeJsoncFile(globalPath, config);
8569
8569
  }
8570
+ initProjectConfig(basePath) {
8571
+ const projectPath = join(basePath, ".opencode", "nexus.jsonc");
8572
+ this.writeJsoncFile(projectPath, { ...DEFAULT_CONFIG });
8573
+ }
8574
+ initGlobalConfig() {
8575
+ const globalPath = join(homedir(), ".config", "opencode", "nexus.jsonc");
8576
+ this.writeJsoncFile(globalPath, { ...DEFAULT_CONFIG });
8577
+ }
8570
8578
  saveConfig(level, basePath) {
8571
8579
  if (level === "project") {
8572
8580
  this.saveProjectConfig(basePath || process.cwd());
@@ -10282,9 +10290,18 @@ Please continue from where the previous agent left off.`;
10282
10290
  const modelName = slashIndex > -1 ? modelConfig.slice(slashIndex + 1) : modelConfig;
10283
10291
  const roleEmoji = this.configManager.getRoleEmoji(config.role);
10284
10292
  const title = `${roleEmoji} ${this.configManager.getRoleDisplayName(config.role)} — ${modelConfig}`;
10293
+ const agentTypeMap = {
10294
+ architect: "build",
10295
+ coder: "build",
10296
+ reviewer: "code-reviewer",
10297
+ tester: "build",
10298
+ explorer: "explore",
10299
+ documenter: "doc-writer"
10300
+ };
10301
+ const agentType = agentTypeMap[config.role] || "build";
10285
10302
  const session = await this.ctx.session.create({
10286
10303
  title,
10287
- agent: "build",
10304
+ agent: agentType,
10288
10305
  model: modelName ? { providerID: provider, id: modelName } : undefined
10289
10306
  });
10290
10307
  const agent = {
@@ -10853,11 +10870,11 @@ var src_default = define({
10853
10870
  const path = basePath || process.cwd();
10854
10871
  const locations = [];
10855
10872
  if (level === "project" || level === "both") {
10856
- orchestrator.configManager.saveProjectConfig(path);
10873
+ orchestrator.configManager.initProjectConfig(path);
10857
10874
  locations.push(`${path}/.opencode/nexus.jsonc`);
10858
10875
  }
10859
10876
  if (level === "global" || level === "both") {
10860
- orchestrator.configManager.saveGlobalConfig();
10877
+ orchestrator.configManager.initGlobalConfig();
10861
10878
  locations.push("~/.config/opencode/nexus.jsonc");
10862
10879
  }
10863
10880
  return { content: `Config initialized at ${level} level(s): ${locations.join(", ")}` };
package/dist/tui.js CHANGED
@@ -310,6 +310,14 @@ class NexusConfigManager {
310
310
  const config = this.getNonDefaultConfig();
311
311
  this.writeJsoncFile(globalPath, config);
312
312
  }
313
+ initProjectConfig(basePath) {
314
+ const projectPath = join(basePath, ".opencode", "nexus.jsonc");
315
+ this.writeJsoncFile(projectPath, { ...DEFAULT_CONFIG });
316
+ }
317
+ initGlobalConfig() {
318
+ const globalPath = join(homedir(), ".config", "opencode", "nexus.jsonc");
319
+ this.writeJsoncFile(globalPath, { ...DEFAULT_CONFIG });
320
+ }
313
321
  saveConfig(level, basePath) {
314
322
  if (level === "project") {
315
323
  this.saveProjectConfig(basePath || process.cwd());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serkanalgur/opencode-nexus",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "Adaptive Multi-Agent Orchestration with Cost Intelligence for OpenCode V2",
5
5
  "keywords": [
6
6
  "opencode",