open-agents-ai 0.138.75 → 0.138.77
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 +36 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -44490,17 +44490,49 @@ async function showExposeDashboard(gateway, rl, ctx) {
|
|
|
44490
44490
|
const id = gateway.tunnelUrl ?? gateway.peerId ?? null;
|
|
44491
44491
|
if (id) {
|
|
44492
44492
|
const cmd = `/endpoint ${id} --auth ${gateway.authKey ?? ""}`;
|
|
44493
|
-
|
|
44494
|
-
|
|
44495
|
-
|
|
44496
|
-
|
|
44493
|
+
let copied = false;
|
|
44494
|
+
try {
|
|
44495
|
+
const { execSync: execSync30 } = __require("node:child_process");
|
|
44496
|
+
const platform5 = process.platform;
|
|
44497
|
+
if (platform5 === "darwin") {
|
|
44498
|
+
execSync30("pbcopy", { input: cmd, timeout: 3e3 });
|
|
44499
|
+
copied = true;
|
|
44500
|
+
} else if (platform5 === "win32") {
|
|
44501
|
+
execSync30("clip", { input: cmd, timeout: 3e3 });
|
|
44502
|
+
copied = true;
|
|
44503
|
+
} else {
|
|
44504
|
+
for (const tool of ["xclip -selection clipboard", "xsel --clipboard --input", "wl-copy"]) {
|
|
44505
|
+
try {
|
|
44506
|
+
execSync30(tool, { input: cmd, timeout: 3e3, stdio: ["pipe", "pipe", "pipe"] });
|
|
44507
|
+
copied = true;
|
|
44508
|
+
break;
|
|
44509
|
+
} catch {
|
|
44510
|
+
continue;
|
|
44511
|
+
}
|
|
44512
|
+
}
|
|
44513
|
+
}
|
|
44514
|
+
} catch {
|
|
44515
|
+
}
|
|
44516
|
+
if (!copied) {
|
|
44517
|
+
const b64 = Buffer.from(cmd).toString("base64");
|
|
44518
|
+
overlayWrite(`\x1B]52;c;${b64}\x07`);
|
|
44519
|
+
copied = true;
|
|
44520
|
+
}
|
|
44521
|
+
overlayWrite(`\x1B[${rows()}H\x1B[2K ${c2.green("\u2713 Copied to clipboard: ")}${c2.dim(cmd.slice(0, 60))}${cmd.length > 60 ? "..." : ""}`);
|
|
44522
|
+
setTimeout(() => scheduleRender(), 2e3);
|
|
44497
44523
|
}
|
|
44498
44524
|
}
|
|
44499
44525
|
};
|
|
44526
|
+
if (process.stdout.isTTY) {
|
|
44527
|
+
process.stdout.write("\x1B[?1002l\x1B[?1006l");
|
|
44528
|
+
}
|
|
44500
44529
|
process.stdin.on("data", onData);
|
|
44501
44530
|
const cleanup = () => {
|
|
44502
44531
|
stopped = true;
|
|
44503
44532
|
process.stdin.removeListener("data", onData);
|
|
44533
|
+
if (process.stdout.isTTY) {
|
|
44534
|
+
process.stdout.write("\x1B[?1002h\x1B[?1006h");
|
|
44535
|
+
}
|
|
44504
44536
|
};
|
|
44505
44537
|
const origResolve = resolve32;
|
|
44506
44538
|
resolve32 = (() => {
|
package/package.json
CHANGED