open-agents-ai 0.141.3 → 0.141.5
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 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -42482,6 +42482,26 @@ async function handleSlashCommand(input, ctx) {
|
|
|
42482
42482
|
const ipfsSubCmd = (arg || "").trim().split(/\s+/);
|
|
42483
42483
|
const ipfsAction = ipfsSubCmd[0]?.toLowerCase() || "";
|
|
42484
42484
|
const ipfsArg = ipfsSubCmd.slice(1).join(" ");
|
|
42485
|
+
const ensureDaemon = async () => {
|
|
42486
|
+
try {
|
|
42487
|
+
const { NexusTool: NexusTool2 } = __require("@open-agents/execution");
|
|
42488
|
+
const nexus = new NexusTool2(ctx.repoRoot);
|
|
42489
|
+
const statusResult = await nexus.execute({ action: "status" });
|
|
42490
|
+
if (statusResult.success && statusResult.output.includes("connected"))
|
|
42491
|
+
return true;
|
|
42492
|
+
renderInfo("Starting nexus daemon for IPFS...");
|
|
42493
|
+
const connectResult = await nexus.execute({ action: "connect" });
|
|
42494
|
+
if (connectResult.success) {
|
|
42495
|
+
await new Promise((r) => setTimeout(r, 2e3));
|
|
42496
|
+
return true;
|
|
42497
|
+
}
|
|
42498
|
+
renderWarning("Could not start nexus daemon. IPFS operations require /connect first.");
|
|
42499
|
+
return false;
|
|
42500
|
+
} catch {
|
|
42501
|
+
renderWarning("Nexus daemon unavailable. Run /connect to enable IPFS.");
|
|
42502
|
+
return false;
|
|
42503
|
+
}
|
|
42504
|
+
};
|
|
42485
42505
|
if (ipfsAction === "pin" && ipfsArg) {
|
|
42486
42506
|
const cidToPin = ipfsArg.trim();
|
|
42487
42507
|
if (!cidToPin.startsWith("bafy") && !cidToPin.startsWith("bafk") && !cidToPin.startsWith("Qm")) {
|
|
@@ -42489,6 +42509,8 @@ async function handleSlashCommand(input, ctx) {
|
|
|
42489
42509
|
return "handled";
|
|
42490
42510
|
}
|
|
42491
42511
|
try {
|
|
42512
|
+
if (!await ensureDaemon())
|
|
42513
|
+
return "handled";
|
|
42492
42514
|
const { NexusTool: NexusTool2 } = __require("@open-agents/execution");
|
|
42493
42515
|
const nexus = new NexusTool2(ctx.repoRoot);
|
|
42494
42516
|
const result = await nexus.execute({ action: "ipfs_pin", cid: cidToPin, source: "user-pin" });
|
|
@@ -42640,6 +42662,7 @@ async function handleSlashCommand(input, ctx) {
|
|
|
42640
42662
|
}
|
|
42641
42663
|
return "handled";
|
|
42642
42664
|
}
|
|
42665
|
+
await ensureDaemon();
|
|
42643
42666
|
const lines = [];
|
|
42644
42667
|
lines.push(`
|
|
42645
42668
|
${c2.bold("IPFS / Helia Status")}
|
|
@@ -43332,8 +43355,17 @@ async function handleSlashCommand(input, ctx) {
|
|
|
43332
43355
|
const cohereAction = cohereSubCmd[0]?.toLowerCase() || "";
|
|
43333
43356
|
if (cohereAction === "stats") {
|
|
43334
43357
|
try {
|
|
43335
|
-
const { NexusTool: NexusTool2 } = __require("
|
|
43358
|
+
const { NexusTool: NexusTool2 } = __require("@open-agents/execution");
|
|
43336
43359
|
const nexusTool = new NexusTool2(ctx.repoRoot || process.cwd());
|
|
43360
|
+
try {
|
|
43361
|
+
const st = await nexusTool.execute({ action: "status" });
|
|
43362
|
+
if (!st.success || !st.output.includes("connected")) {
|
|
43363
|
+
renderInfo("Connecting to nexus daemon...");
|
|
43364
|
+
await nexusTool.execute({ action: "connect" });
|
|
43365
|
+
await new Promise((r) => setTimeout(r, 1e3));
|
|
43366
|
+
}
|
|
43367
|
+
} catch {
|
|
43368
|
+
}
|
|
43337
43369
|
const result = await nexusTool.execute({ action: "cohere_stats" });
|
|
43338
43370
|
if (result.success) {
|
|
43339
43371
|
renderInfo(result.output);
|
|
@@ -57912,19 +57944,13 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
57912
57944
|
headerBtnActive = command;
|
|
57913
57945
|
(async () => {
|
|
57914
57946
|
try {
|
|
57915
|
-
|
|
57916
|
-
if (isOverlayCmd) {
|
|
57917
|
-
await handleSlashCommand(command, commandCtxRef);
|
|
57918
|
-
} else {
|
|
57919
|
-
writeContent(() => {
|
|
57920
|
-
handleSlashCommand(command, commandCtxRef).catch(() => {
|
|
57921
|
-
});
|
|
57922
|
-
});
|
|
57923
|
-
}
|
|
57947
|
+
await writeContentAsync(() => handleSlashCommand(command, commandCtxRef));
|
|
57924
57948
|
} catch {
|
|
57925
57949
|
}
|
|
57926
57950
|
headerBtnActive = null;
|
|
57927
57951
|
if (statusBar.isActive) {
|
|
57952
|
+
statusBar.disableMouseTracking();
|
|
57953
|
+
statusBar.enableMouseTracking();
|
|
57928
57954
|
banner.renderCurrentFrame();
|
|
57929
57955
|
statusBar.refreshDisplay();
|
|
57930
57956
|
}
|
package/package.json
CHANGED