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.
- package/dist/index.js +6 -5
- 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:
|
|
5703
|
-
libp2pPeerId:
|
|
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:
|
|
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
|
-
|
|
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(
|
|
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