open-agents-ai 0.15.7 → 0.15.8

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 +17 -15
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -15422,10 +15422,8 @@ async function startInteractive(config, repoPath) {
15422
15422
  const needsSetup = isFirstRun() || !await isModelAvailable(config);
15423
15423
  if (needsSetup && config.backendType === "ollama") {
15424
15424
  const setupModel = await runSetupWizard(config);
15425
- if (setupModel === null) {
15426
- process.exit(0);
15427
- }
15428
- config = { ...config, model: setupModel };
15425
+ const freshConfig = loadConfig();
15426
+ config = { ...config, ...freshConfig, model: setupModel ?? freshConfig.model };
15429
15427
  }
15430
15428
  }
15431
15429
  if (config.backendType === "ollama" && !config.model.startsWith("open-agents-")) {
@@ -15444,16 +15442,18 @@ async function startInteractive(config, repoPath) {
15444
15442
  if (!isResumed) {
15445
15443
  try {
15446
15444
  const healthUrl = config.backendType === "ollama" ? `${config.backendUrl}/api/tags` : `${config.backendUrl}/v1/models`;
15447
- const resp = await fetch(healthUrl, { signal: AbortSignal.timeout(1e4) });
15445
+ const headers = {};
15446
+ if (config.apiKey)
15447
+ headers["Authorization"] = `Bearer ${config.apiKey}`;
15448
+ const resp = await fetch(healthUrl, { headers, signal: AbortSignal.timeout(1e4) });
15448
15449
  if (!resp.ok)
15449
15450
  throw new Error(`HTTP ${resp.status}`);
15450
15451
  } catch {
15451
- renderError(`Cannot reach ${config.backendType} at ${config.backendUrl}`);
15452
+ renderWarning(`Cannot reach ${config.backendType} at ${config.backendUrl}`);
15452
15453
  if (config.backendType === "ollama") {
15453
15454
  renderInfo("Start Ollama with: ollama serve");
15454
15455
  }
15455
- renderInfo("Use /endpoint to configure a different backend.");
15456
- process.exit(1);
15456
+ renderInfo("Use /endpoint to configure a different backend. Starting anyway...");
15457
15457
  }
15458
15458
  }
15459
15459
  const carousel = new Carousel();
@@ -15957,10 +15957,8 @@ async function runWithTUI(task, config, repoPath) {
15957
15957
  const needsSetup = isFirstRun() || !await isModelAvailable(config);
15958
15958
  if (needsSetup && config.backendType === "ollama") {
15959
15959
  const setupModel = await runSetupWizard(config);
15960
- if (setupModel === null) {
15961
- process.exit(0);
15962
- }
15963
- config = { ...config, model: setupModel };
15960
+ const freshConfig = loadConfig();
15961
+ config = { ...config, ...freshConfig, model: setupModel ?? freshConfig.model };
15964
15962
  }
15965
15963
  if (config.backendType === "ollama" && !config.model.startsWith("open-agents-")) {
15966
15964
  try {
@@ -15973,15 +15971,18 @@ async function runWithTUI(task, config, repoPath) {
15973
15971
  }
15974
15972
  try {
15975
15973
  const healthUrl = config.backendType === "ollama" ? `${config.backendUrl}/api/tags` : `${config.backendUrl}/v1/models`;
15976
- const resp = await fetch(healthUrl, { signal: AbortSignal.timeout(1e4) });
15974
+ const headers = {};
15975
+ if (config.apiKey)
15976
+ headers["Authorization"] = `Bearer ${config.apiKey}`;
15977
+ const resp = await fetch(healthUrl, { headers, signal: AbortSignal.timeout(1e4) });
15977
15978
  if (!resp.ok)
15978
15979
  throw new Error(`HTTP ${resp.status}`);
15979
15980
  } catch {
15980
- renderError(`Cannot reach ${config.backendType} at ${config.backendUrl}`);
15981
+ renderWarning(`Cannot reach ${config.backendType} at ${config.backendUrl}`);
15981
15982
  if (config.backendType === "ollama") {
15982
15983
  renderInfo("Start Ollama with: ollama serve");
15983
15984
  }
15984
- process.exit(1);
15985
+ renderInfo("The agent will retry when you submit a task. Use /endpoint to reconfigure.");
15985
15986
  }
15986
15987
  renderCompactHeader(config.model);
15987
15988
  renderUserMessage(task);
@@ -16000,6 +16001,7 @@ var init_interactive = __esm({
16000
16001
  init_dist5();
16001
16002
  init_dist2();
16002
16003
  init_listen();
16004
+ init_config();
16003
16005
  init_updater();
16004
16006
  init_commands();
16005
16007
  init_setup();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.15.7",
3
+ "version": "0.15.8",
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",