open-agents-ai 0.184.13 → 0.184.14
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 +14 -28
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -46862,8 +46862,7 @@ async function handleSlashCommand(input, ctx) {
|
|
|
46862
46862
|
const ipfsArg = ipfsSubCmd.slice(1).join(" ");
|
|
46863
46863
|
const ensureDaemon = async () => {
|
|
46864
46864
|
try {
|
|
46865
|
-
const
|
|
46866
|
-
const nexus = new NexusTool2(ctx.repoRoot);
|
|
46865
|
+
const nexus = new NexusTool(ctx.repoRoot);
|
|
46867
46866
|
const statusResult = await nexus.execute({ action: "status" });
|
|
46868
46867
|
if (statusResult.success && statusResult.output.includes("connected"))
|
|
46869
46868
|
return true;
|
|
@@ -46889,8 +46888,7 @@ async function handleSlashCommand(input, ctx) {
|
|
|
46889
46888
|
try {
|
|
46890
46889
|
if (!await ensureDaemon())
|
|
46891
46890
|
return "handled";
|
|
46892
|
-
const
|
|
46893
|
-
const nexus = new NexusTool2(ctx.repoRoot);
|
|
46891
|
+
const nexus = new NexusTool(ctx.repoRoot);
|
|
46894
46892
|
const result = await nexus.execute({ action: "ipfs_pin", cid: cidToPin, source: "user-pin" });
|
|
46895
46893
|
if (result.success) {
|
|
46896
46894
|
renderInfo(`Pinned: ${cidToPin}`);
|
|
@@ -46904,8 +46902,7 @@ async function handleSlashCommand(input, ctx) {
|
|
|
46904
46902
|
}
|
|
46905
46903
|
if (ipfsAction === "publish") {
|
|
46906
46904
|
try {
|
|
46907
|
-
const
|
|
46908
|
-
const ik = new IdentityKernelTool2(ctx.repoRoot);
|
|
46905
|
+
const ik = new IdentityKernelTool(ctx.repoRoot);
|
|
46909
46906
|
const result = await ik.execute({ operation: "publish_snapshot" });
|
|
46910
46907
|
if (result.success) {
|
|
46911
46908
|
const cidMatch = result.output.match(/CID:\s*(bafy\S+|bafk\S+)/);
|
|
@@ -46960,8 +46957,7 @@ async function handleSlashCommand(input, ctx) {
|
|
|
46960
46957
|
content = content.replace(/["']?api[_-]?key["']?\s*[:=]\s*["'][^"']*["']/gi, '"api_key": "[REDACTED]"').replace(/["']?secret["']?\s*[:=]\s*["'][^"']*["']/gi, '"secret": "[REDACTED]"').replace(/["']?password["']?\s*[:=]\s*["'][^"']*["']/gi, '"password": "[REDACTED]"').replace(/["']?token["']?\s*[:=]\s*["'][^"']*["']/gi, '"token": "[REDACTED]"').replace(/Bearer\s+[A-Za-z0-9._-]+/g, "Bearer [REDACTED]");
|
|
46961
46958
|
const payload = JSON.stringify({ ...metadata, content, sharedAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
46962
46959
|
try {
|
|
46963
|
-
const
|
|
46964
|
-
const nexus = new NexusTool2(ctx.repoRoot);
|
|
46960
|
+
const nexus = new NexusTool(ctx.repoRoot);
|
|
46965
46961
|
const result = await nexus.execute({ action: "ipfs_add", content: payload });
|
|
46966
46962
|
if (result.success) {
|
|
46967
46963
|
const data = JSON.parse(result.output);
|
|
@@ -46987,8 +46983,7 @@ async function handleSlashCommand(input, ctx) {
|
|
|
46987
46983
|
return "handled";
|
|
46988
46984
|
}
|
|
46989
46985
|
try {
|
|
46990
|
-
const
|
|
46991
|
-
const nexus = new NexusTool2(ctx.repoRoot);
|
|
46986
|
+
const nexus = new NexusTool(ctx.repoRoot);
|
|
46992
46987
|
await nexus.execute({ action: "ipfs_pin", cid: importCid, source: "import" });
|
|
46993
46988
|
const regFile = join58(ctx.repoRoot, ".oa", "nexus", "ipfs", "cid-registry", "learning-cids.json");
|
|
46994
46989
|
if (existsSync42(regFile)) {
|
|
@@ -47010,8 +47005,7 @@ async function handleSlashCommand(input, ctx) {
|
|
|
47010
47005
|
}
|
|
47011
47006
|
if (ipfsAction === "cids" || ipfsAction === "ls" || ipfsAction === "pins") {
|
|
47012
47007
|
try {
|
|
47013
|
-
const
|
|
47014
|
-
const nexus = new NexusTool2(ctx.repoRoot);
|
|
47008
|
+
const nexus = new NexusTool(ctx.repoRoot);
|
|
47015
47009
|
const result = await nexus.execute({ action: "ipfs_ls" });
|
|
47016
47010
|
if (result.success) {
|
|
47017
47011
|
const data = JSON.parse(result.output);
|
|
@@ -47869,8 +47863,7 @@ async function handleSlashCommand(input, ctx) {
|
|
|
47869
47863
|
onGoLive: async (config) => {
|
|
47870
47864
|
if (config.transport.libp2p) {
|
|
47871
47865
|
try {
|
|
47872
|
-
const
|
|
47873
|
-
const nexus = new NexusTool2(projectDir);
|
|
47866
|
+
const nexus = new NexusTool(projectDir);
|
|
47874
47867
|
renderInfo("Connecting to nexus P2P mesh...");
|
|
47875
47868
|
await nexus.execute({ action: "connect" });
|
|
47876
47869
|
await new Promise((r) => setTimeout(r, 3e3));
|
|
@@ -47909,8 +47902,7 @@ async function handleSlashCommand(input, ctx) {
|
|
|
47909
47902
|
}
|
|
47910
47903
|
}
|
|
47911
47904
|
try {
|
|
47912
|
-
const
|
|
47913
|
-
const nexus = new NexusTool2(projectDir);
|
|
47905
|
+
const nexus = new NexusTool(projectDir);
|
|
47914
47906
|
try {
|
|
47915
47907
|
await nexus.execute({ action: "connect" });
|
|
47916
47908
|
} catch {
|
|
@@ -48815,8 +48807,7 @@ async function showCohereDashboard(ctx) {
|
|
|
48815
48807
|
let stats = { queriesAnswered: 0, queriesSent: 0, insightsShared: 0, peersConnected: 0 };
|
|
48816
48808
|
let modelList = [];
|
|
48817
48809
|
try {
|
|
48818
|
-
const
|
|
48819
|
-
const nexus = new NexusTool2(ctx.repoRoot);
|
|
48810
|
+
const nexus = new NexusTool(ctx.repoRoot);
|
|
48820
48811
|
try {
|
|
48821
48812
|
const st = await nexus.execute({ action: "status" });
|
|
48822
48813
|
if (!st.success || !st.output.includes("connected")) {
|
|
@@ -48905,8 +48896,7 @@ async function showCohereDashboard(ctx) {
|
|
|
48905
48896
|
});
|
|
48906
48897
|
if (statResult.key === "refresh") {
|
|
48907
48898
|
try {
|
|
48908
|
-
const
|
|
48909
|
-
const nexus = new NexusTool2(ctx.repoRoot);
|
|
48899
|
+
const nexus = new NexusTool(ctx.repoRoot);
|
|
48910
48900
|
const r = await nexus.execute({ action: "cohere_stats" });
|
|
48911
48901
|
if (r.success) {
|
|
48912
48902
|
try {
|
|
@@ -48936,8 +48926,7 @@ async function showCohereDashboard(ctx) {
|
|
|
48936
48926
|
});
|
|
48937
48927
|
if (idResult.confirmed && idResult.key) {
|
|
48938
48928
|
try {
|
|
48939
|
-
const
|
|
48940
|
-
const ik = new IdentityKernelTool2(ctx.repoRoot);
|
|
48929
|
+
const ik = new IdentityKernelTool(ctx.repoRoot);
|
|
48941
48930
|
if (idResult.key === "publish") {
|
|
48942
48931
|
await ik.execute({ operation: "publish_snapshot" });
|
|
48943
48932
|
} else if (idResult.key === "view") {
|
|
@@ -48986,8 +48975,7 @@ async function showCohereDashboard(ctx) {
|
|
|
48986
48975
|
if (ipfsResult.confirmed && ipfsResult.key) {
|
|
48987
48976
|
if (ipfsResult.key === "cids") {
|
|
48988
48977
|
try {
|
|
48989
|
-
const
|
|
48990
|
-
const nexus = new NexusTool2(ctx.repoRoot);
|
|
48978
|
+
const nexus = new NexusTool(ctx.repoRoot);
|
|
48991
48979
|
const r = await nexus.execute({ action: "ipfs_ls" });
|
|
48992
48980
|
if (r.success) {
|
|
48993
48981
|
const data = JSON.parse(r.output);
|
|
@@ -49017,8 +49005,7 @@ async function showCohereDashboard(ctx) {
|
|
|
49017
49005
|
if (result.key.startsWith("model:")) {
|
|
49018
49006
|
const modelName = result.key.slice(6);
|
|
49019
49007
|
try {
|
|
49020
|
-
const
|
|
49021
|
-
const nexus = new NexusTool2(ctx.repoRoot);
|
|
49008
|
+
const nexus = new NexusTool(ctx.repoRoot);
|
|
49022
49009
|
await nexus.execute({ action: "cohere_allow_model", model: modelName });
|
|
49023
49010
|
} catch {
|
|
49024
49011
|
}
|
|
@@ -49709,8 +49696,7 @@ async function handleSponsoredEndpoint(ctx, local) {
|
|
|
49709
49696
|
const sponsors = [];
|
|
49710
49697
|
let nexusTool = null;
|
|
49711
49698
|
try {
|
|
49712
|
-
|
|
49713
|
-
nexusTool = new NexusTool2(ctx.repoRoot ?? process.cwd());
|
|
49699
|
+
nexusTool = new NexusTool(ctx.repoRoot ?? process.cwd());
|
|
49714
49700
|
} catch {
|
|
49715
49701
|
}
|
|
49716
49702
|
if (nexusTool) {
|
package/package.json
CHANGED