open-agents-ai 0.186.30 → 0.186.32

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 +14 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -68730,13 +68730,18 @@ async function handleV1Run(req, res) {
68730
68730
  }
68731
68731
  }
68732
68732
  job.profile = profileName || null;
68733
+ const runCfg = loadConfig();
68733
68734
  const runEnv = {
68734
68735
  ...process.env,
68735
68736
  OA_JOB_ID: id,
68736
68737
  __OPEN_AGENTS_NO_AUTO_RUN: "",
68737
68738
  OA_RUN_USER: authUser,
68738
- OA_RUN_SCOPE: authScope
68739
+ OA_RUN_SCOPE: authScope,
68740
+ // Pass backend config so subprocess doesn't have to rediscover
68741
+ OLLAMA_HOST: runCfg.backendUrl || process.env["OLLAMA_HOST"] || "http://127.0.0.1:11434"
68739
68742
  };
68743
+ if (runCfg.apiKey)
68744
+ runEnv["OA_API_KEY_INHERIT"] = runCfg.apiKey;
68740
68745
  if (activeProfile) {
68741
68746
  runEnv["OA_TOOL_PROFILE"] = JSON.stringify(activeProfile);
68742
68747
  }
@@ -68748,7 +68753,7 @@ async function handleV1Run(req, res) {
68748
68753
  }
68749
68754
  }
68750
68755
  }
68751
- const child = spawn21("node", [oaBin, ...args], {
68756
+ const child = spawn21(process.execPath, [oaBin, ...args], {
68752
68757
  cwd: cwd4,
68753
68758
  env: runEnv,
68754
68759
  stdio: ["ignore", "pipe", "pipe"],
@@ -69175,13 +69180,17 @@ ${historyLines}
69175
69180
  if (model)
69176
69181
  args.push("--model", model.replace(/^local\//, ""));
69177
69182
  const streamMode = chatBody.stream !== false;
69183
+ const currentCfg = loadConfig();
69178
69184
  const runEnv = {
69179
69185
  ...process.env,
69180
69186
  __OPEN_AGENTS_NO_AUTO_RUN: "",
69181
69187
  OA_RUN_USER: req._authUser || "anonymous",
69182
- OA_RUN_SCOPE: req._authScope || "admin"
69188
+ OA_RUN_SCOPE: req._authScope || "admin",
69189
+ OLLAMA_HOST: currentCfg.backendUrl || process.env["OLLAMA_HOST"] || "http://127.0.0.1:11434"
69183
69190
  };
69184
- const child = spawn21("oa", args, {
69191
+ if (currentCfg.apiKey)
69192
+ runEnv["OA_API_KEY_INHERIT"] = currentCfg.apiKey;
69193
+ const child = spawn21(process.execPath, [oaBin, ...args], {
69185
69194
  cwd: cwdPath,
69186
69195
  env: runEnv,
69187
69196
  stdio: ["ignore", "pipe", "pipe"]
@@ -74953,7 +74962,7 @@ async function runBackground(task, config, opts) {
74953
74962
  const args = [task, "--json"];
74954
74963
  if (config.model)
74955
74964
  args.push("--model", config.model);
74956
- const child = spawn22("node", [oaBin, ...args], {
74965
+ const child = spawn22(process.execPath, [oaBin, ...args], {
74957
74966
  cwd: repoRoot,
74958
74967
  env: { ...process.env, OA_JOB_ID: id },
74959
74968
  stdio: ["ignore", "pipe", "pipe"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.186.30",
3
+ "version": "0.186.32",
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",