open-agents-ai 0.141.7 → 0.142.0

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 +116 -16
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -44303,32 +44303,132 @@ async function showCohereDashboard(ctx) {
44303
44303
  continue;
44304
44304
  }
44305
44305
  case "stats": {
44306
- try {
44307
- const { NexusTool: NexusTool2 } = __require("@open-agents/execution");
44308
- const nexus = new NexusTool2(ctx.repoRoot);
44309
- const r = await nexus.execute({ action: "cohere_stats" });
44310
- if (r.success) {
44311
- try {
44312
- const d = JSON.parse(r.output);
44313
- Object.assign(stats, d);
44314
- } catch {
44306
+ const statItems = [
44307
+ { key: "hdr", label: selectColors.dim("\u2500\u2500\u2500 Network Activity \u2500\u2500\u2500") },
44308
+ { key: "answered", label: `Queries answered: ${c2.bold(String(stats.queriesAnswered || 0))}` },
44309
+ { key: "sent", label: `Queries sent: ${c2.bold(String(stats.queriesSent || 0))}` },
44310
+ { key: "insights", label: `Insights shared: ${c2.bold(String(stats.insightsShared || 0))}` },
44311
+ { key: "peers", label: `Peers connected: ${c2.bold(String(stats.peersConnected || 0))}` },
44312
+ { key: "hdr2", label: selectColors.dim("\u2500\u2500\u2500 Actions \u2500\u2500\u2500") },
44313
+ { key: "refresh", label: "Refresh Stats", detail: "Fetch latest from daemon" }
44314
+ ];
44315
+ const statResult = await tuiSelect({
44316
+ items: statItems,
44317
+ title: "Stats",
44318
+ breadcrumbs: ["COHERE"],
44319
+ rl: ctx.rl,
44320
+ skipKeys: ["hdr", "hdr2", "answered", "sent", "insights", "peers"],
44321
+ availableRows: ctx.availableContentRows?.()
44322
+ });
44323
+ if (statResult.key === "refresh") {
44324
+ try {
44325
+ const { NexusTool: NexusTool2 } = __require("@open-agents/execution");
44326
+ const nexus = new NexusTool2(ctx.repoRoot);
44327
+ const r = await nexus.execute({ action: "cohere_stats" });
44328
+ if (r.success) {
44329
+ try {
44330
+ Object.assign(stats, JSON.parse(r.output));
44331
+ } catch {
44332
+ }
44315
44333
  }
44334
+ } catch {
44316
44335
  }
44317
- } catch {
44318
44336
  }
44319
44337
  continue;
44320
44338
  }
44321
44339
  case "identity": {
44322
- try {
44323
- const { IdentityKernelTool: IdentityKernelTool2 } = __require("@open-agents/execution");
44324
- const ik = new IdentityKernelTool2(ctx.repoRoot);
44325
- await ik.execute({ operation: "publish_snapshot" });
44326
- } catch {
44340
+ const idItems = [
44341
+ { key: "hdr", label: selectColors.dim("\u2500\u2500\u2500 Identity Kernel \u2500\u2500\u2500") },
44342
+ { key: "publish", label: "Publish Snapshot", detail: "Publish current identity to IPFS" },
44343
+ { key: "view", label: "View Self-State", detail: "Show current identity kernel" },
44344
+ { key: "history", label: "Version History", detail: "Show identity evolution" }
44345
+ ];
44346
+ const idResult = await tuiSelect({
44347
+ items: idItems,
44348
+ title: "Identity",
44349
+ breadcrumbs: ["COHERE"],
44350
+ rl: ctx.rl,
44351
+ skipKeys: ["hdr"],
44352
+ availableRows: ctx.availableContentRows?.()
44353
+ });
44354
+ if (idResult.confirmed && idResult.key) {
44355
+ try {
44356
+ const { IdentityKernelTool: IdentityKernelTool2 } = __require("@open-agents/execution");
44357
+ const ik = new IdentityKernelTool2(ctx.repoRoot);
44358
+ if (idResult.key === "publish") {
44359
+ await ik.execute({ operation: "publish_snapshot" });
44360
+ } else if (idResult.key === "view") {
44361
+ await ik.execute({ operation: "hydrate" });
44362
+ } else if (idResult.key === "history") {
44363
+ const snapDir = join52(ctx.repoRoot, ".oa", "identity", "snapshots");
44364
+ if (existsSync37(snapDir)) {
44365
+ const snaps = readdirSync10(snapDir).filter((f) => f.endsWith(".json")).sort().reverse();
44366
+ const snapItems = snaps.slice(0, 20).map((f) => ({
44367
+ key: f,
44368
+ label: f.replace(".json", ""),
44369
+ detail: `${formatFileSize(statSync13(join52(snapDir, f)).size)}`
44370
+ }));
44371
+ if (snapItems.length > 0) {
44372
+ await tuiSelect({
44373
+ items: snapItems,
44374
+ title: "Versions",
44375
+ breadcrumbs: ["COHERE", "Identity"],
44376
+ rl: ctx.rl,
44377
+ availableRows: ctx.availableContentRows?.()
44378
+ });
44379
+ }
44380
+ }
44381
+ }
44382
+ } catch {
44383
+ }
44327
44384
  }
44328
44385
  continue;
44329
44386
  }
44330
44387
  case "ipfs": {
44331
- break;
44388
+ const ipfsItems = [
44389
+ { key: "hdr", label: selectColors.dim("\u2500\u2500\u2500 IPFS / Helia \u2500\u2500\u2500") },
44390
+ { key: "status", label: "Storage Status", detail: "Helia blocks, local fallback, sizes" },
44391
+ { key: "cids", label: "Pinned CIDs", detail: "List all pinned content" },
44392
+ { key: "publish", label: "Publish Identity", detail: "Share identity kernel via IPFS" },
44393
+ { key: "peers", label: "Peer Info", detail: "Peer ID + multiaddrs" }
44394
+ ];
44395
+ const ipfsResult = await tuiSelect({
44396
+ items: ipfsItems,
44397
+ title: "IPFS",
44398
+ breadcrumbs: ["COHERE"],
44399
+ rl: ctx.rl,
44400
+ skipKeys: ["hdr"],
44401
+ availableRows: ctx.availableContentRows?.()
44402
+ });
44403
+ if (ipfsResult.confirmed && ipfsResult.key) {
44404
+ if (ipfsResult.key === "cids") {
44405
+ try {
44406
+ const { NexusTool: NexusTool2 } = __require("@open-agents/execution");
44407
+ const nexus = new NexusTool2(ctx.repoRoot);
44408
+ const r = await nexus.execute({ action: "ipfs_ls" });
44409
+ if (r.success) {
44410
+ const data = JSON.parse(r.output);
44411
+ const pins = data.pins || [];
44412
+ if (pins.length > 0) {
44413
+ const cidItems = pins.map((p) => ({
44414
+ key: p.cid,
44415
+ label: p.cid.slice(0, 30) + "...",
44416
+ detail: p.source || "unknown"
44417
+ }));
44418
+ await tuiSelect({
44419
+ items: cidItems,
44420
+ title: "Pinned CIDs",
44421
+ breadcrumbs: ["COHERE", "IPFS"],
44422
+ rl: ctx.rl,
44423
+ availableRows: ctx.availableContentRows?.()
44424
+ });
44425
+ }
44426
+ }
44427
+ } catch {
44428
+ }
44429
+ }
44430
+ }
44431
+ continue;
44332
44432
  }
44333
44433
  default: {
44334
44434
  if (result.key.startsWith("model:")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.141.7",
3
+ "version": "0.142.0",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",