open-agents-ai 0.49.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 +26 -3
  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();
@@ -31019,6 +31032,16 @@ ${sessionCtx}` : "",
31019
31032
  }, 100);
31020
31033
  }
31021
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
+ }
31022
31045
  let pasteBuffer = [];
31023
31046
  let pasteTimer = null;
31024
31047
  let pasteIndicatorShown = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.49.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",