open-agents-ai 0.184.47 → 0.184.49

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 +52 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -50146,6 +50146,40 @@ async function handleSponsoredEndpoint(ctx, local) {
50146
50146
  });
50147
50147
  }
50148
50148
  }
50149
+ try {
50150
+ const kvResp = await fetch("https://openagents.nexus/api/v1/sponsors", {
50151
+ signal: AbortSignal.timeout(5e3)
50152
+ });
50153
+ if (kvResp.ok) {
50154
+ const kvData = await kvResp.json();
50155
+ const kvSponsors = (kvData.sponsors || []).filter((s) => s.status === "active");
50156
+ let kvAdded = 0;
50157
+ for (const ks of kvSponsors) {
50158
+ const url = ks.tunnelUrl || "";
50159
+ if (sponsors.some((s) => s.url && s.url === url || s.peerId && s.peerId === ks.peerId))
50160
+ continue;
50161
+ sponsors.push({
50162
+ name: ks.name || "Unknown Sponsor",
50163
+ url,
50164
+ peerId: ks.peerId || void 0,
50165
+ authKey: ks.authKey || "",
50166
+ models: Array.isArray(ks.models) ? ks.models : [],
50167
+ limits: {
50168
+ rpm: ks.limits?.maxRequestsPerMinute || 60,
50169
+ tpd: ks.limits?.maxTokensPerDay || 1e5
50170
+ },
50171
+ source: "nexus",
50172
+ banner: ks.banner ? { preset: ks.banner?.preset, message: ks.message } : void 0
50173
+ });
50174
+ kvAdded++;
50175
+ }
50176
+ if (kvAdded > 0) {
50177
+ process.stdout.write(` ${c2.green("\u25CF")} Found ${kvAdded} sponsor(s) in directory
50178
+ `);
50179
+ }
50180
+ }
50181
+ } catch {
50182
+ }
50149
50183
  const sponsorDir2 = join58(ctx.repoRoot ?? process.cwd(), ".oa", "sponsor");
50150
50184
  const knownFile = join58(sponsorDir2, "known-sponsors.json");
50151
50185
  try {
@@ -64646,6 +64680,8 @@ Review its full output in the [${id}] tab or via full_sub_agent(action='output',
64646
64680
  const costTracker = new CostTracker(provider.id);
64647
64681
  const sessionMetrics = new SessionMetrics();
64648
64682
  const workEvaluator = new WorkEvaluator();
64683
+ let setupReady = false;
64684
+ const setupTasks = [];
64649
64685
  ensureTranscribeCliBackground();
64650
64686
  ensureCloudflaredBackground((msg) => {
64651
64687
  if (statusBar?.isActive) {
@@ -64656,7 +64692,7 @@ Review its full output in the [${id}] tab or via full_sub_agent(action='output',
64656
64692
  });
64657
64693
  let depSudoResolver = null;
64658
64694
  let depSudoPromptPending = false;
64659
- ensureVisionDeps((msg) => {
64695
+ const visionDepsPromise = ensureVisionDeps((msg) => {
64660
64696
  if (statusBar?.isActive) {
64661
64697
  statusBar.beginContentWrite();
64662
64698
  renderInfo(msg);
@@ -64686,6 +64722,8 @@ Review its full output in the [${id}] tab or via full_sub_agent(action='output',
64686
64722
  }
64687
64723
  })).catch(() => {
64688
64724
  });
64725
+ setupTasks.push(visionDepsPromise.catch(() => {
64726
+ }));
64689
64727
  let updateNotified = false;
64690
64728
  if (!isResumed) {
64691
64729
  checkForUpdate(version).then((updateInfo) => {
@@ -65175,7 +65213,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
65175
65213
  }
65176
65214
  return fn();
65177
65215
  }
65178
- (async () => {
65216
+ const startupChecksPromise = (async () => {
65179
65217
  if (!isResumed && !isFirstRun()) {
65180
65218
  try {
65181
65219
  const available = await isModelAvailable(currentConfig);
@@ -65368,6 +65406,8 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
65368
65406
  }
65369
65407
  })().catch(() => {
65370
65408
  });
65409
+ setupTasks.push(startupChecksPromise.catch(() => {
65410
+ }));
65371
65411
  Promise.resolve().then(() => (init_serve(), serve_exports)).then(({ startApiServer: startApiServer2 }) => {
65372
65412
  const apiPort = parseInt(process.env["OA_PORT"] || "11435", 10);
65373
65413
  const apiServer = startApiServer2({
@@ -66672,6 +66712,14 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
66672
66712
  headerBtnQueue = null;
66673
66713
  setTimeout(() => statusBar.fireHeaderButton?.(queued), 100);
66674
66714
  }
66715
+ if (setupTasks.length > 0 && !isResumed) {
66716
+ statusBar.setPromptText(" setting up...", 0);
66717
+ const setupTimeout = new Promise((r) => setTimeout(r, 15e3));
66718
+ await Promise.race([Promise.all(setupTasks), setupTimeout]);
66719
+ setupReady = true;
66720
+ } else {
66721
+ setupReady = true;
66722
+ }
66675
66723
  showPrompt();
66676
66724
  if (!isResumed) {
66677
66725
  const savedCtx = loadSessionContext(repoRoot);
@@ -66839,6 +66887,8 @@ ${result.content.slice(0, 2e3)}${result.content.length > 2e3 ? "\n[truncated]" :
66839
66887
  };
66840
66888
  };
66841
66889
  rl.on("line", (line) => {
66890
+ if (!setupReady)
66891
+ return;
66842
66892
  persistHistoryLine(line);
66843
66893
  const input = line.trim();
66844
66894
  if (!input) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.184.47",
3
+ "version": "0.184.49",
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",