open-agents-ai 0.71.5 → 0.71.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.
Files changed (2) hide show
  1. package/dist/index.js +28 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11529,26 +11529,50 @@ process.on('SIGINT', () => process.emit('SIGTERM'));
11529
11529
  }
11530
11530
  return `Daemon already running (pid: ${existingPid}).`;
11531
11531
  }
11532
+ const nodeModulesDir = resolve26(this.repoRoot, "node_modules");
11533
+ let nexusResolved = false;
11532
11534
  try {
11533
- execSync20(`node -e "require.resolve('open-agents-nexus')"`, { stdio: "pipe", timeout: 5e3 });
11535
+ const nexusPkg = join28(nodeModulesDir, "open-agents-nexus", "package.json");
11536
+ if (existsSync21(nexusPkg)) {
11537
+ nexusResolved = true;
11538
+ } else {
11539
+ const globalDir = execSync20("npm root -g", { encoding: "utf8", timeout: 5e3 }).trim();
11540
+ if (existsSync21(join28(globalDir, "open-agents-nexus", "package.json"))) {
11541
+ nexusResolved = true;
11542
+ }
11543
+ }
11534
11544
  } catch {
11545
+ }
11546
+ if (!nexusResolved) {
11535
11547
  try {
11536
- execSync20("npm install -g open-agents-nexus@latest 2>&1 || npm install open-agents-nexus@latest 2>&1", {
11548
+ execSync20("npm install open-agents-nexus@latest 2>&1", {
11549
+ cwd: this.repoRoot,
11537
11550
  stdio: "pipe",
11538
11551
  timeout: 12e4
11539
11552
  });
11540
11553
  } catch {
11541
- throw new Error("Failed to install open-agents-nexus. Run: npm install -g open-agents-nexus");
11554
+ try {
11555
+ execSync20("npm install -g open-agents-nexus@latest 2>&1", { stdio: "pipe", timeout: 12e4 });
11556
+ } catch {
11557
+ throw new Error("Failed to install open-agents-nexus. Run: npm install open-agents-nexus");
11558
+ }
11542
11559
  }
11543
11560
  }
11544
11561
  const daemonPath = join28(this.nexusDir, "nexus-daemon.mjs");
11545
11562
  await writeFile12(daemonPath, DAEMON_SCRIPT);
11546
11563
  const agentName = args.agent_name || "open-agents-node";
11547
11564
  const agentType = args.agent_type || "general";
11565
+ const nodePaths = [nodeModulesDir];
11566
+ try {
11567
+ const globalDir = execSync20("npm root -g", { encoding: "utf8", timeout: 5e3 }).trim();
11568
+ nodePaths.push(globalDir);
11569
+ } catch {
11570
+ }
11548
11571
  const child = spawn10("node", [daemonPath, this.nexusDir, agentName, agentType], {
11549
11572
  detached: true,
11550
11573
  stdio: ["ignore", "pipe", "pipe"],
11551
- cwd: this.repoRoot
11574
+ cwd: this.repoRoot,
11575
+ env: { ...process.env, NODE_PATH: nodePaths.join(":") }
11552
11576
  });
11553
11577
  child.unref();
11554
11578
  let earlyOutput = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.71.5",
3
+ "version": "0.71.6",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",