open-agents-ai 0.184.64 → 0.184.65
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 +18 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5588,6 +5588,7 @@ async function handleCmd(cmd) {
|
|
|
5588
5588
|
var sponsorData = {
|
|
5589
5589
|
type: 'sponsor.announce',
|
|
5590
5590
|
peerId: globalThis._daemonPeerId || 'unknown',
|
|
5591
|
+
libp2pPeerId: globalThis._daemonPeerId || '',
|
|
5591
5592
|
name: args.name || 'Anonymous Sponsor',
|
|
5592
5593
|
models: args.models || [],
|
|
5593
5594
|
tunnelUrl: args.tunnel_url || null,
|
|
@@ -48312,8 +48313,21 @@ async function handleSlashCommand(input, ctx) {
|
|
|
48312
48313
|
if (!sponsorName)
|
|
48313
48314
|
sponsorName = "OA Sponsor";
|
|
48314
48315
|
}
|
|
48316
|
+
let stablePeerId = `oa-${Date.now()}`;
|
|
48317
|
+
let libp2pPeerId = "";
|
|
48318
|
+
try {
|
|
48319
|
+
const nexus = new NexusTool(projectDir);
|
|
48320
|
+
const statusCheck = String(await nexus.execute({ action: "status" }) ?? "");
|
|
48321
|
+
const peerMatch = statusCheck.match(/peerId:\s*(12D3KooW\S+)/i);
|
|
48322
|
+
if (peerMatch) {
|
|
48323
|
+
stablePeerId = peerMatch[1];
|
|
48324
|
+
libp2pPeerId = peerMatch[1];
|
|
48325
|
+
}
|
|
48326
|
+
} catch {
|
|
48327
|
+
}
|
|
48315
48328
|
const sponsorPayload = {
|
|
48316
|
-
peerId:
|
|
48329
|
+
peerId: stablePeerId,
|
|
48330
|
+
libp2pPeerId,
|
|
48317
48331
|
name: sponsorName,
|
|
48318
48332
|
models: allModels,
|
|
48319
48333
|
tunnelUrl: sponsorUrl,
|
|
@@ -53211,7 +53225,9 @@ var init_banner = __esm({
|
|
|
53211
53225
|
}
|
|
53212
53226
|
buf += "\x1B[0m";
|
|
53213
53227
|
}
|
|
53214
|
-
|
|
53228
|
+
const termRows = process.stdout.rows ?? 24;
|
|
53229
|
+
const inputRow = termRows - 2;
|
|
53230
|
+
buf += `\x1B[${inputRow};1H\x1B[0m\x1B[?2026l`;
|
|
53215
53231
|
process.stdout.write(buf);
|
|
53216
53232
|
if (this.onAfterRender)
|
|
53217
53233
|
this.onAfterRender();
|
package/package.json
CHANGED