open-agents-ai 0.186.35 → 0.186.37

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 +6 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5699,8 +5699,8 @@ async function handleCmd(cmd) {
5699
5699
  } catch {}
5700
5700
  var sponsorData = {
5701
5701
  type: 'sponsor.announce',
5702
- peerId: globalThis._daemonPeerId || 'unknown',
5703
- libp2pPeerId: globalThis._daemonPeerId || '',
5702
+ peerId: (connected ? nexus.peerId : 'unknown') || 'unknown',
5703
+ libp2pPeerId: (connected ? nexus.peerId : '') || '',
5704
5704
  name: args.name || 'Anonymous Sponsor',
5705
5705
  models: _saModels.length > 0 ? _saModels : _saModelDetails.map(function(m) { return m.name; }),
5706
5706
  modelDetails: _saModelDetails, // NX-07: per-model capacity
@@ -5933,7 +5933,7 @@ async function handleCmd(cmd) {
5933
5933
  }
5934
5934
  }
5935
5935
 
5936
- writeResp(id, { ok: true, output: unique.length + ' sponsor(s) found', sponsors: unique });
5936
+ writeResp(id, { ok: true, output: JSON.stringify({ sponsors: unique, count: unique.length }) });
5937
5937
  break;
5938
5938
  }
5939
5939
  case 'discover_peers': {
@@ -53512,9 +53512,10 @@ async function handleSponsoredEndpoint(ctx, local) {
53512
53512
  action: "sponsor_discover",
53513
53513
  timeout_ms: "5000"
53514
53514
  });
53515
- if (typeof discoverResult === "string") {
53515
+ const discoverOutput = typeof discoverResult === "object" && discoverResult?.output ? String(discoverResult.output) : typeof discoverResult === "string" ? discoverResult : "";
53516
+ if (discoverOutput) {
53516
53517
  try {
53517
- const parsed = JSON.parse(discoverResult);
53518
+ const parsed = JSON.parse(discoverOutput);
53518
53519
  const nexusSponsors = parsed.sponsors || [];
53519
53520
  for (const ns of nexusSponsors) {
53520
53521
  sponsors.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.186.35",
3
+ "version": "0.186.37",
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",