open-agents-ai 0.48.0 → 0.50.0

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 +38 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -27456,9 +27456,19 @@ with summary "no_reply" to silently skip without responding.
27456
27456
  async start() {
27457
27457
  if (this.polling)
27458
27458
  throw new Error("Telegram bridge already active.");
27459
- const me = await this.apiCall("getMe");
27460
- if (!me.ok) {
27461
- throw new Error(`Invalid Telegram bot token: ${me.description || "unknown error"}`);
27459
+ let me;
27460
+ for (let attempt = 0; attempt < 3; attempt++) {
27461
+ try {
27462
+ me = await this.apiCall("getMe");
27463
+ break;
27464
+ } catch (err) {
27465
+ if (attempt === 2)
27466
+ throw err;
27467
+ await new Promise((r) => setTimeout(r, 2e3 * (attempt + 1)));
27468
+ }
27469
+ }
27470
+ if (!me?.ok) {
27471
+ throw new Error(`Invalid Telegram bot token: ${me?.description || "unknown error"}`);
27462
27472
  }
27463
27473
  this.state = {
27464
27474
  active: true,
@@ -28223,8 +28233,11 @@ ${caption}\r
28223
28233
  if (body) {
28224
28234
  options.body = JSON.stringify(body);
28225
28235
  }
28236
+ const isLongPoll = method === "getUpdates";
28226
28237
  if (this.abortController) {
28227
28238
  options.signal = this.abortController.signal;
28239
+ } else if (!isLongPoll) {
28240
+ options.signal = AbortSignal.timeout(3e4);
28228
28241
  }
28229
28242
  const res = await fetch(url, options);
28230
28243
  const data = await res.json();
@@ -28838,6 +28851,14 @@ var init_status_bar = __esm({
28838
28851
  if (this.active)
28839
28852
  this.renderFooterPreserveCursor();
28840
28853
  }
28854
+ /** Active model name — shown to the left of capability emojis */
28855
+ _modelName = "";
28856
+ /** Update active model name shown in the status bar */
28857
+ setModelName(name) {
28858
+ this._modelName = name;
28859
+ if (this.active)
28860
+ this.renderFooterPreserveCursor();
28861
+ }
28841
28862
  /** Model capabilities — shown as emoji indicators on the status bar */
28842
28863
  _caps = {
28843
28864
  vision: false,
@@ -29071,6 +29092,7 @@ var init_status_bar = __esm({
29071
29092
  const countdown = this._countdown > 0 ? c2.dim(` ${this._countdown}s`) : "";
29072
29093
  recordingLabel = pipe + dot + pastel2(210, " REC") + countdown;
29073
29094
  }
29095
+ const modelLabel = this._modelName ? pipe + pastel2(146, this._modelName) : "";
29074
29096
  const capParts = [];
29075
29097
  if (this._caps.vision)
29076
29098
  capParts.push("\u{1F441}");
@@ -29079,7 +29101,7 @@ var init_status_bar = __esm({
29079
29101
  if (this._caps.thinking)
29080
29102
  capParts.push("\u{1F9E0}");
29081
29103
  const capsLabel = capParts.length > 0 ? pipe + pastel2(183, capParts.join(" ")) : "";
29082
- return ` ${tokInLabel}${pipe}${tokOutLabel}${pipe}${ctxLabel}${snrLabel}${emotionLabel}${speedLabel}${costLabel}${capsLabel}${recordingLabel}`;
29104
+ return ` ${tokInLabel}${pipe}${tokOutLabel}${pipe}${ctxLabel}${snrLabel}${emotionLabel}${speedLabel}${costLabel}${modelLabel}${capsLabel}${recordingLabel}`;
29083
29105
  }
29084
29106
  // -------------------------------------------------------------------------
29085
29107
  // Private
@@ -30134,6 +30156,7 @@ async function startInteractive(config, repoPath) {
30134
30156
  statusBar.setCapabilities(caps);
30135
30157
  }).catch(() => {
30136
30158
  });
30159
+ statusBar.setModelName(config.model);
30137
30160
  const provider = detectProvider(config.backendUrl);
30138
30161
  const costTracker = new CostTracker(provider.id);
30139
30162
  const sessionMetrics = new SessionMetrics();
@@ -30454,6 +30477,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
30454
30477
  sessionMetrics,
30455
30478
  setModel(model) {
30456
30479
  currentConfig = { ...currentConfig, model };
30480
+ statusBar.setModelName(model);
30457
30481
  },
30458
30482
  setVerbose(verbose) {
30459
30483
  currentConfig = { ...currentConfig, verbose };
@@ -31008,6 +31032,16 @@ ${sessionCtx}` : "",
31008
31032
  }, 100);
31009
31033
  }
31010
31034
  }
31035
+ if (!isResumed && savedSettings.telegramKey) {
31036
+ setTimeout(async () => {
31037
+ try {
31038
+ await commandCtx.telegramStart(savedSettings.telegramKey, savedSettings.telegramAdmin);
31039
+ } catch (err) {
31040
+ writeContent(() => renderWarning(`Telegram auto-start failed: ${err instanceof Error ? err.message : String(err)}`));
31041
+ showPrompt();
31042
+ }
31043
+ }, 200);
31044
+ }
31011
31045
  let pasteBuffer = [];
31012
31046
  let pasteTimer = null;
31013
31047
  let pasteIndicatorShown = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.48.0",
3
+ "version": "0.50.0",
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",