open-agents-ai 0.184.63 → 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 +25 -16
- 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,
|
|
@@ -52753,7 +52767,7 @@ function createDefaultBanner(version = "0.120.0") {
|
|
|
52753
52767
|
const x = r * 7 + c3 * 13 + frame * 3 + 37;
|
|
52754
52768
|
return (x * x * 31 + x * 17 + 59) % 97 / 97;
|
|
52755
52769
|
};
|
|
52756
|
-
const frameCount =
|
|
52770
|
+
const frameCount = 8;
|
|
52757
52771
|
const frames = [];
|
|
52758
52772
|
for (let f = 0; f < frameCount; f++) {
|
|
52759
52773
|
const grid = [];
|
|
@@ -52805,7 +52819,7 @@ function createDefaultBanner(version = "0.120.0") {
|
|
|
52805
52819
|
}
|
|
52806
52820
|
bCol += padded.length + 1;
|
|
52807
52821
|
}
|
|
52808
|
-
frames.push({ grid, durationMs:
|
|
52822
|
+
frames.push({ grid, durationMs: 200 });
|
|
52809
52823
|
}
|
|
52810
52824
|
return {
|
|
52811
52825
|
id: "default-header",
|
|
@@ -53111,14 +53125,9 @@ var init_banner = __esm({
|
|
|
53111
53125
|
process.stdout.on("resize", this._resizeHandler);
|
|
53112
53126
|
if (this.currentDesign.frames.length > 1) {
|
|
53113
53127
|
this.timer = setInterval(() => {
|
|
53114
|
-
this.
|
|
53115
|
-
|
|
53116
|
-
|
|
53117
|
-
this.currentFrame = (this.currentFrame + 1) % this.currentDesign.frames.length;
|
|
53118
|
-
this.frameTick = 0;
|
|
53119
|
-
this.renderCurrentFrame();
|
|
53120
|
-
}
|
|
53121
|
-
}, 80);
|
|
53128
|
+
this.currentFrame = (this.currentFrame + 1) % this.currentDesign.frames.length;
|
|
53129
|
+
this.renderCurrentFrame();
|
|
53130
|
+
}, 200);
|
|
53122
53131
|
}
|
|
53123
53132
|
return this.rows + 1;
|
|
53124
53133
|
}
|
|
@@ -53142,7 +53151,7 @@ var init_banner = __esm({
|
|
|
53142
53151
|
if (!frame)
|
|
53143
53152
|
return;
|
|
53144
53153
|
this.width = process.stdout.columns ?? 80;
|
|
53145
|
-
let buf = "\x1B[?
|
|
53154
|
+
let buf = "\x1B[?2026h";
|
|
53146
53155
|
for (let r = 0; r < this.rows; r++) {
|
|
53147
53156
|
buf += `\x1B[${r + 1};1H\x1B[2K`;
|
|
53148
53157
|
const row = frame.grid[r];
|
|
@@ -53217,8 +53226,8 @@ var init_banner = __esm({
|
|
|
53217
53226
|
buf += "\x1B[0m";
|
|
53218
53227
|
}
|
|
53219
53228
|
const termRows = process.stdout.rows ?? 24;
|
|
53220
|
-
const
|
|
53221
|
-
buf += `\x1B[${
|
|
53229
|
+
const inputRow = termRows - 2;
|
|
53230
|
+
buf += `\x1B[${inputRow};1H\x1B[0m\x1B[?2026l`;
|
|
53222
53231
|
process.stdout.write(buf);
|
|
53223
53232
|
if (this.onAfterRender)
|
|
53224
53233
|
this.onAfterRender();
|
|
@@ -63362,10 +63371,10 @@ function startApiServer(options = {}) {
|
|
|
63362
63371
|
server.listen(port, host);
|
|
63363
63372
|
}, 2e3);
|
|
63364
63373
|
} else if (err.code === "EADDRINUSE" && retried) {
|
|
63365
|
-
process.stderr.write(` Port ${port} still in use after reclaim attempt \u2014 API server
|
|
63374
|
+
process.stderr.write(` Port ${port} still in use after reclaim attempt \u2014 API server skipped (non-fatal).
|
|
63366
63375
|
`);
|
|
63367
63376
|
} else {
|
|
63368
|
-
process.stderr.write(` API server error: ${err.message}
|
|
63377
|
+
process.stderr.write(` API server error (non-fatal): ${err.message}
|
|
63369
63378
|
`);
|
|
63370
63379
|
}
|
|
63371
63380
|
});
|
package/package.json
CHANGED