open-agents-ai 0.185.0 → 0.185.2

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 +36 -19
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -62091,8 +62091,10 @@ ${CONTENT_BG_SEQ}`);
62091
62091
  for (let si = 0; si < this._suggestions.length; si++) {
62092
62092
  const row = pos.suggestStartRow + si;
62093
62093
  const cmd = this._suggestions[si];
62094
- const prefix = si === 0 ? `\x1B[38;5;${TEXT_DIM}m/` : `\x1B[38;5;${TEXT_DIM}m `;
62095
- buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K ${prefix}\x1B[38;5;${TEXT_PRIMARY}m${cmd}\x1B[0m${RESET}`;
62094
+ buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K`;
62095
+ buf += `${PANEL_BG_SEQ}\x1B[38;5;${TEXT_DIM}m /`;
62096
+ buf += `\x1B[38;5;${TEXT_PRIMARY}m${cmd}`;
62097
+ buf += `${RESET}`;
62096
62098
  }
62097
62099
  } else {
62098
62100
  buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildBufferContent(w)}${RESET}`;
@@ -62137,7 +62139,18 @@ ${CONTENT_BG_SEQ}`);
62137
62139
  if (pos.tabBarRow > 0) {
62138
62140
  buf += `\x1B[${pos.tabBarRow};1H${PANEL_BG_SEQ}\x1B[2K${RESET}`;
62139
62141
  }
62140
- buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildBufferContent(w)}${RESET}\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET}\x1B[?7h\x1B8` + // DEC restore cursor
62142
+ if (this._suggestions.length > 0 && pos.suggestStartRow > 0) {
62143
+ for (let si = 0; si < this._suggestions.length; si++) {
62144
+ const row = pos.suggestStartRow + si;
62145
+ const cmd = this._suggestions[si];
62146
+ buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K`;
62147
+ buf += `${PANEL_BG_SEQ}\x1B[38;5;${TEXT_DIM}m /`;
62148
+ buf += `\x1B[38;5;${TEXT_PRIMARY}m${cmd}${RESET}`;
62149
+ }
62150
+ } else {
62151
+ buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildBufferContent(w)}${RESET}`;
62152
+ }
62153
+ buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET}\x1B[?7h\x1B8` + // DEC restore cursor
62141
62154
  (this.writeDepth === 0 ? "\x1B[?25h" : "");
62142
62155
  this.termWrite(buf);
62143
62156
  if (pos.tabBarRow > 0)
@@ -64396,6 +64409,8 @@ async function handleRequest(req, res, ollamaUrl, verbose) {
64396
64409
  }
64397
64410
  }
64398
64411
  function startApiServer(options = {}) {
64412
+ const log = options.quiet ? (_msg) => {
64413
+ } : (msg) => process.stderr.write(msg);
64399
64414
  let host = "127.0.0.1";
64400
64415
  let port = 11435;
64401
64416
  const envHost = process.env["OA_HOST"];
@@ -64433,7 +64448,7 @@ function startApiServer(options = {}) {
64433
64448
  server.on("error", (err) => {
64434
64449
  if (err.code === "EADDRINUSE" && !retried) {
64435
64450
  retried = true;
64436
- process.stderr.write(` Port ${port} in use \u2014 reclaiming...
64451
+ log(` Port ${port} in use \u2014 reclaiming...
64437
64452
  `);
64438
64453
  try {
64439
64454
  const { execSync: es } = __require("node:child_process");
@@ -64459,10 +64474,10 @@ function startApiServer(options = {}) {
64459
64474
  server.listen(port, host);
64460
64475
  }, 2e3);
64461
64476
  } else if (err.code === "EADDRINUSE" && retried) {
64462
- process.stderr.write(` Port ${port} still in use after reclaim attempt \u2014 API server skipped (non-fatal).
64477
+ log(` Port ${port} still in use after reclaim attempt \u2014 API server skipped (non-fatal).
64463
64478
  `);
64464
64479
  } else {
64465
- process.stderr.write(` API server error (non-fatal): ${err.message}
64480
+ log(` API server error (non-fatal): ${err.message}
64466
64481
  `);
64467
64482
  }
64468
64483
  });
@@ -64483,43 +64498,43 @@ function startApiServer(options = {}) {
64483
64498
  });
64484
64499
  server.listen(port, host, () => {
64485
64500
  const version = getVersion3();
64486
- process.stderr.write(`
64501
+ log(`
64487
64502
  open-agents API server v${version}
64488
64503
  `);
64489
- process.stderr.write(` Listening on http://${host}:${port}
64504
+ log(` Listening on http://${host}:${port}
64490
64505
  `);
64491
- process.stderr.write(` Primary: ${config.backendUrl} (${config.backendType || "ollama"})
64506
+ log(` Primary: ${config.backendUrl} (${config.backendType || "ollama"})
64492
64507
  `);
64493
64508
  if (process.env["OA_API_KEYS"]) {
64494
64509
  const keyCount = process.env["OA_API_KEYS"].split(",").length;
64495
- process.stderr.write(` Auth: ${keyCount} scoped key(s) (read/run/admin)
64510
+ log(` Auth: ${keyCount} scoped key(s) (read/run/admin)
64496
64511
  `);
64497
64512
  } else if (process.env["OA_API_KEY"]) {
64498
- process.stderr.write(` Auth: single Bearer token (admin scope)
64513
+ log(` Auth: single Bearer token (admin scope)
64499
64514
  `);
64500
64515
  } else {
64501
- process.stderr.write(` Auth: disabled (set OA_API_KEY or OA_API_KEYS to enable)
64516
+ log(` Auth: disabled (set OA_API_KEY or OA_API_KEYS to enable)
64502
64517
  `);
64503
64518
  }
64504
- process.stderr.write(` Discovering sponsors in background...
64519
+ log(` Discovering sponsors in background...
64505
64520
 
64506
64521
  `);
64507
64522
  refreshEndpointRegistry().then(() => {
64508
64523
  if (endpointRegistry.length > 1) {
64509
- process.stderr.write(` Sponsors: ${endpointRegistry.length - 1} endpoint(s) discovered
64524
+ log(` Sponsors: ${endpointRegistry.length - 1} endpoint(s) discovered
64510
64525
  `);
64511
64526
  for (const ep of endpointRegistry.slice(1)) {
64512
- process.stderr.write(` ${ep.label}: ${ep.url} (${ep.type})${ep.authKey ? " [auth]" : ""}
64527
+ log(` ${ep.label}: ${ep.url} (${ep.type})${ep.authKey ? " [auth]" : ""}
64513
64528
  `);
64514
64529
  }
64515
- process.stderr.write(`
64530
+ log(`
64516
64531
  `);
64517
64532
  }
64518
64533
  }).catch(() => {
64519
64534
  });
64520
64535
  });
64521
64536
  const shutdown = () => {
64522
- process.stderr.write("\n Shutting down API server...\n");
64537
+ log("\n Shutting down API server...\n");
64523
64538
  for (const [id, child] of runningProcesses) {
64524
64539
  if (!child.killed) {
64525
64540
  child.kill("SIGTERM");
@@ -64527,7 +64542,7 @@ function startApiServer(options = {}) {
64527
64542
  runningProcesses.delete(id);
64528
64543
  }
64529
64544
  server.close(() => {
64530
- process.stderr.write(" Server stopped.\n");
64545
+ log(" Server stopped.\n");
64531
64546
  process.exit(0);
64532
64547
  });
64533
64548
  setTimeout(() => process.exit(1), 5e3).unref();
@@ -66915,7 +66930,9 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
66915
66930
  const apiPort = parseInt(process.env["OA_PORT"] || "11435", 10);
66916
66931
  const apiServer = startApiServer2({
66917
66932
  port: apiPort,
66918
- ollamaUrl: currentConfig.backendUrl || "http://127.0.0.1:11434"
66933
+ ollamaUrl: currentConfig.backendUrl || "http://127.0.0.1:11434",
66934
+ quiet: true
66935
+ // TUI mode — suppress all direct stderr/stdout output
66919
66936
  });
66920
66937
  apiServer.on?.("listening", () => {
66921
66938
  setTimeout(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.185.0",
3
+ "version": "0.185.2",
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",