open-agents-ai 0.68.2 → 0.68.3

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 +56 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -24619,8 +24619,57 @@ function askSecret(rl, question) {
24619
24619
  stdin.on("data", onData);
24620
24620
  });
24621
24621
  }
24622
+ function ensureCurl() {
24623
+ if (hasCmd("curl"))
24624
+ return true;
24625
+ const plat = platform();
24626
+ if (plat === "win32") {
24627
+ process.stdout.write(` ${c2.yellow("\u26A0")} curl not found on Windows \u2014 install it manually.
24628
+ `);
24629
+ return false;
24630
+ }
24631
+ process.stdout.write(` ${c2.cyan("\u25CF")} curl not found. Installing...
24632
+ `);
24633
+ const strategies = [
24634
+ { check: "apt-get", install: "sudo apt-get update -qq && sudo apt-get install -y -qq curl", label: "apt" },
24635
+ { check: "dnf", install: "sudo dnf install -y -q curl", label: "dnf" },
24636
+ { check: "yum", install: "sudo yum install -y -q curl", label: "yum" },
24637
+ { check: "pacman", install: "sudo pacman -S --noconfirm curl", label: "pacman" },
24638
+ { check: "apk", install: "sudo apk add --quiet curl", label: "apk" },
24639
+ { check: "zypper", install: "sudo zypper install -y curl", label: "zypper" }
24640
+ ];
24641
+ for (const s of strategies) {
24642
+ if (hasCmd(s.check)) {
24643
+ try {
24644
+ execSync20(s.install, { stdio: "inherit", timeout: 12e4 });
24645
+ if (hasCmd("curl")) {
24646
+ process.stdout.write(` ${c2.green("\u2714")} curl installed via ${s.label}.
24647
+ `);
24648
+ return true;
24649
+ }
24650
+ } catch {
24651
+ process.stdout.write(` ${c2.yellow("\u26A0")} ${s.label} install failed, trying next...
24652
+ `);
24653
+ }
24654
+ }
24655
+ }
24656
+ if (plat === "darwin") {
24657
+ try {
24658
+ execSync20("xcode-select --install", { stdio: "inherit", timeout: 3e5 });
24659
+ if (hasCmd("curl"))
24660
+ return true;
24661
+ } catch {
24662
+ }
24663
+ }
24664
+ process.stdout.write(` ${c2.red("\u2716")} Could not install curl. Install it manually and retry.
24665
+ `);
24666
+ return false;
24667
+ }
24622
24668
  async function autoInstallOllama(rl) {
24623
24669
  const plat = platform();
24670
+ if (plat !== "win32" && !ensureCurl()) {
24671
+ return false;
24672
+ }
24624
24673
  if (plat === "linux") {
24625
24674
  return installOllamaLinux();
24626
24675
  } else if (plat === "darwin") {
@@ -24823,6 +24872,9 @@ function pullModelWithAutoUpdate(tag) {
24823
24872
  process.stdout.write(`
24824
24873
  ${c2.yellow("\u26A0")} Ollama needs to be updated for this model.
24825
24874
  `);
24875
+ if (!ensureCurl()) {
24876
+ throw new Error("curl is required to update Ollama but could not be installed.");
24877
+ }
24826
24878
  process.stdout.write(` ${c2.cyan("\u25CF")} Updating Ollama via official install script...
24827
24879
 
24828
24880
  `);
@@ -25582,6 +25634,10 @@ function ensureCloudflaredBackground(onInfo) {
25582
25634
  _cloudflaredInstallPromise = (async () => {
25583
25635
  const arch = process.arch;
25584
25636
  const os = platform();
25637
+ if (os !== "win32" && !ensureCurl()) {
25638
+ log("curl not available \u2014 cannot install cloudflared.");
25639
+ return false;
25640
+ }
25585
25641
  if (os === "linux") {
25586
25642
  const archMap = { x64: "amd64", arm64: "arm64", arm: "arm" };
25587
25643
  const cfArch = archMap[arch] ?? "amd64";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.68.2",
3
+ "version": "0.68.3",
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",