open-agents-ai 0.186.22 → 0.186.23
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 +17 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51417,9 +51417,22 @@ Clone a new voice: /voice clone <wav-file> [name]`);
|
|
|
51417
51417
|
const enabledEps = config.endpoints.filter((e) => e.enabled);
|
|
51418
51418
|
const allModels = enabledEps.flatMap((e) => e.models || []);
|
|
51419
51419
|
const sponsorUrl = tunnelGw?.tunnelUrl || "";
|
|
51420
|
-
|
|
51421
|
-
|
|
51422
|
-
|
|
51420
|
+
const sponsorPeerId = tunnelGw?.peerId || "";
|
|
51421
|
+
if (!sponsorUrl && !sponsorPeerId) {
|
|
51422
|
+
let daemonPeerId = "";
|
|
51423
|
+
try {
|
|
51424
|
+
const nexus = new NexusTool(projectDir);
|
|
51425
|
+
const st = String(await nexus.execute({ action: "status" }) ?? "");
|
|
51426
|
+
const pm = st.match(/Peer ID:\s*(12D3KooW\S+)/i);
|
|
51427
|
+
if (pm)
|
|
51428
|
+
daemonPeerId = pm[1];
|
|
51429
|
+
} catch {
|
|
51430
|
+
}
|
|
51431
|
+
if (!daemonPeerId) {
|
|
51432
|
+
renderWarning("No tunnel URL or P2P peerId available \u2014 sponsor not registered.");
|
|
51433
|
+
return false;
|
|
51434
|
+
}
|
|
51435
|
+
renderInfo(`Registering as P2P-only sponsor (peerId: ${daemonPeerId.slice(0, 20)}...)`);
|
|
51423
51436
|
}
|
|
51424
51437
|
let sponsorName = (config.header.message || "").replace(/^\/+/, "").trim();
|
|
51425
51438
|
if (!sponsorName || sponsorName.length < 2) {
|
|
@@ -51460,8 +51473,7 @@ Clone a new voice: /voice clone <wav-file> [name]`);
|
|
|
51460
51473
|
message: config.header.message || sponsorName,
|
|
51461
51474
|
linkUrl: config.header.linkUrl,
|
|
51462
51475
|
linkText: config.header.linkText,
|
|
51463
|
-
status: sponsorUrl ? "active" : "inactive"
|
|
51464
|
-
// don't register without a URL
|
|
51476
|
+
status: sponsorUrl || libp2pPeerId ? "active" : "inactive"
|
|
51465
51477
|
};
|
|
51466
51478
|
try {
|
|
51467
51479
|
const kvResp = await fetch("https://openagents.nexus/api/v1/sponsors", {
|
package/package.json
CHANGED