open-agents-ai 0.184.12 → 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.
Files changed (2) hide show
  1. package/dist/index.js +29 -26
  2. 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 { NexusTool: NexusTool2 } = __require("@open-agents/execution");
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 { NexusTool: NexusTool2 } = __require("@open-agents/execution");
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 { IdentityKernelTool: IdentityKernelTool2 } = __require("@open-agents/execution");
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 { NexusTool: NexusTool2 } = __require("@open-agents/execution");
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 { NexusTool: NexusTool2 } = __require("@open-agents/execution");
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 { NexusTool: NexusTool2 } = __require("@open-agents/execution");
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);
@@ -47867,6 +47861,17 @@ async function handleSlashCommand(input, ctx) {
47867
47861
  ollamaUrl: "http://localhost:11434",
47868
47862
  availableRows: ctx.availableContentRows?.(),
47869
47863
  onGoLive: async (config) => {
47864
+ if (config.transport.libp2p) {
47865
+ try {
47866
+ const nexus = new NexusTool(projectDir);
47867
+ renderInfo("Connecting to nexus P2P mesh...");
47868
+ await nexus.execute({ action: "connect" });
47869
+ await new Promise((r) => setTimeout(r, 3e3));
47870
+ renderInfo("Nexus daemon connected.");
47871
+ } catch (err) {
47872
+ renderWarning(`Nexus auto-connect: ${err instanceof Error ? err.message : String(err)}`);
47873
+ }
47874
+ }
47870
47875
  if (config.transport.cloudflared && ctx.exposeStart) {
47871
47876
  try {
47872
47877
  const url = await ctx.exposeStart("ollama", void 0, "tunnel");
@@ -47897,8 +47902,12 @@ async function handleSlashCommand(input, ctx) {
47897
47902
  }
47898
47903
  }
47899
47904
  try {
47900
- const { NexusTool: NexusTool2 } = __require("@open-agents/execution");
47901
- const nexus = new NexusTool2(projectDir);
47905
+ const nexus = new NexusTool(projectDir);
47906
+ try {
47907
+ await nexus.execute({ action: "connect" });
47908
+ } catch {
47909
+ }
47910
+ await new Promise((r) => setTimeout(r, 2e3));
47902
47911
  const tunnelGw = ctx.getExposeGateway?.();
47903
47912
  const enabledEps = config.endpoints.filter((e) => e.enabled);
47904
47913
  const allModels = enabledEps.flatMap((e) => e.models || []);
@@ -48798,8 +48807,7 @@ async function showCohereDashboard(ctx) {
48798
48807
  let stats = { queriesAnswered: 0, queriesSent: 0, insightsShared: 0, peersConnected: 0 };
48799
48808
  let modelList = [];
48800
48809
  try {
48801
- const { NexusTool: NexusTool2 } = __require("@open-agents/execution");
48802
- const nexus = new NexusTool2(ctx.repoRoot);
48810
+ const nexus = new NexusTool(ctx.repoRoot);
48803
48811
  try {
48804
48812
  const st = await nexus.execute({ action: "status" });
48805
48813
  if (!st.success || !st.output.includes("connected")) {
@@ -48888,8 +48896,7 @@ async function showCohereDashboard(ctx) {
48888
48896
  });
48889
48897
  if (statResult.key === "refresh") {
48890
48898
  try {
48891
- const { NexusTool: NexusTool2 } = __require("@open-agents/execution");
48892
- const nexus = new NexusTool2(ctx.repoRoot);
48899
+ const nexus = new NexusTool(ctx.repoRoot);
48893
48900
  const r = await nexus.execute({ action: "cohere_stats" });
48894
48901
  if (r.success) {
48895
48902
  try {
@@ -48919,8 +48926,7 @@ async function showCohereDashboard(ctx) {
48919
48926
  });
48920
48927
  if (idResult.confirmed && idResult.key) {
48921
48928
  try {
48922
- const { IdentityKernelTool: IdentityKernelTool2 } = __require("@open-agents/execution");
48923
- const ik = new IdentityKernelTool2(ctx.repoRoot);
48929
+ const ik = new IdentityKernelTool(ctx.repoRoot);
48924
48930
  if (idResult.key === "publish") {
48925
48931
  await ik.execute({ operation: "publish_snapshot" });
48926
48932
  } else if (idResult.key === "view") {
@@ -48969,8 +48975,7 @@ async function showCohereDashboard(ctx) {
48969
48975
  if (ipfsResult.confirmed && ipfsResult.key) {
48970
48976
  if (ipfsResult.key === "cids") {
48971
48977
  try {
48972
- const { NexusTool: NexusTool2 } = __require("@open-agents/execution");
48973
- const nexus = new NexusTool2(ctx.repoRoot);
48978
+ const nexus = new NexusTool(ctx.repoRoot);
48974
48979
  const r = await nexus.execute({ action: "ipfs_ls" });
48975
48980
  if (r.success) {
48976
48981
  const data = JSON.parse(r.output);
@@ -49000,8 +49005,7 @@ async function showCohereDashboard(ctx) {
49000
49005
  if (result.key.startsWith("model:")) {
49001
49006
  const modelName = result.key.slice(6);
49002
49007
  try {
49003
- const { NexusTool: NexusTool2 } = __require("@open-agents/execution");
49004
- const nexus = new NexusTool2(ctx.repoRoot);
49008
+ const nexus = new NexusTool(ctx.repoRoot);
49005
49009
  await nexus.execute({ action: "cohere_allow_model", model: modelName });
49006
49010
  } catch {
49007
49011
  }
@@ -49692,8 +49696,7 @@ async function handleSponsoredEndpoint(ctx, local) {
49692
49696
  const sponsors = [];
49693
49697
  let nexusTool = null;
49694
49698
  try {
49695
- const { NexusTool: NexusTool2 } = __require("@open-agents/execution");
49696
- nexusTool = new NexusTool2(ctx.repoRoot ?? process.cwd());
49699
+ nexusTool = new NexusTool(ctx.repoRoot ?? process.cwd());
49697
49700
  } catch {
49698
49701
  }
49699
49702
  if (nexusTool) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.184.12",
3
+ "version": "0.184.14",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) \u2014 interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",