open-agents-ai 0.141.7 → 0.142.1

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 +272 -130
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -31294,125 +31294,14 @@ function renderCompactHeader(model) {
31294
31294
  `);
31295
31295
  }
31296
31296
  function renderSlashHelp() {
31297
- const commands = [
31298
- ["/model", "Select from available models"],
31299
- ["/model <name>", "Switch to a specific model"],
31300
- ["/models", "List all available models"],
31301
- ["/endpoint", "Show current endpoint"],
31302
- ["/endpoint <url>", "Set backend URL (auto-detects type)"],
31303
- ["/endpoint <url> --auth <t>", "Set endpoint with Bearer auth"],
31304
- ["/config", "Show current configuration"],
31305
- ["/parallel", "Show current Ollama parallel inference slots"],
31306
- ["/parallel <1-15>", "Set parallel slots (restarts Ollama, max 15)"],
31307
- ["/update", "Check for updates and auto-install"],
31308
- ["/update auto", "Enable auto-update after task completion (default)"],
31309
- ["/update manual", "Disable auto-update (only update on /update)"],
31310
- ["/voice", "Toggle TTS voice feedback"],
31311
- ["/voice <model>", "Set voice: glados, overwatch, kokoro, luxtts"],
31312
- ["/voice clone <file>", "Set voice clone reference audio (wav/mp3/ogg/flac)"],
31313
- ["/voice clone glados", "Generate clone ref from GLaDOS for LuxTTS"],
31314
- ["/voice clone overwatch", "Generate clone ref from Overwatch for LuxTTS"],
31315
- ["/think", "Toggle thinking/reasoning mode (Qwen3, DeepSeek-R1, etc.)"],
31316
- ["/stream", "Toggle real-time token streaming (pastel syntax highlighting)"],
31317
- ["/neovim", "Toggle embedded Neovim editor (Ctrl+N to switch focus)"],
31318
- ["/neovim <file>", "Open file in embedded Neovim editor"],
31319
- ["/dream", "Start dream mode \u2014 creative idle exploration (writes to .oa/dreams/)"],
31320
- ["/dream deep", "Deep dream \u2014 multi-cycle exploration with sleep architecture"],
31321
- ["/dream lucid", "Lucid dream \u2014 implements proposals, tests, evaluates in cycles"],
31322
- ["/dream stop", "Wake up \u2014 stop dreaming"],
31323
- ["/listen", "Toggle live microphone transcription (Whisper)"],
31324
- ["/listen <model>", "Set model: tiny, base, small, medium, large"],
31325
- ["/listen manual", "Manual mode \u2014 press Enter to submit (turns off auto)"],
31326
- ["/listen auto", "Auto-submit after 3s silence (blinking \u25CF indicator)"],
31327
- ["/listen stop", "Stop listening"],
31328
- ["/call", "Start voice call session (cloudflared tunnel + ASR/TTS)"],
31329
- ["/hangup", "End active call session"],
31330
- ["/cost", "Show session token cost breakdown"],
31331
- ["/evaluate", "Evaluate last completed task (LLM quality scoring)"],
31332
- ["/score", "Show inference capability scorecard (memory, compute, speed, models)"],
31333
- ["/task-type", "Set task type (code, document, analysis, plan, general, auto)"],
31334
- ["/stats", "Show session dashboard (metrics, tool usage, task history)"],
31335
- ["/pause", "Pause after current turn finishes (gentle halt, /resume to continue)"],
31336
- ["/stop", "Kill current inference immediately and save state (/resume to continue)"],
31337
- ["/resume", "Resume a paused or stopped task"],
31338
- ["/destroy", "Remove .oa folder, kill all tasks, clear console, and exit"],
31339
- ["/context save", "Force-save session context to .oa/context/"],
31340
- ["/context restore", "Restore context from previous sessions into next task"],
31341
- ["/context show", "Show saved session context status"],
31342
- ["/compact", "Force context compaction now (default strategy)"],
31343
- ["/compact <strategy>", "Compact with strategy: aggressive, decisions, errors, summary, structured"],
31344
- ["/bruteforce", "Toggle brute-force mode (auto re-engage on turn limit)"],
31345
- ["/deep", "Toggle deep context \u2014 relaxes compaction so large models use 85% of context"],
31346
- ["/flow", "Toggle FlowState protocol \u2014 immediate action, tight loops, goal clarity"],
31347
- ["/tools", "List agent-created custom tools"],
31348
- ["/skills", "List available AIWG skills"],
31349
- ["/skills <keyword>", "Filter skills by name or trigger"],
31350
- ["/<skill-name> [args]", "Invoke an AIWG skill directly"],
31351
- ["/full-send-bless", "Infinite warm loop \u2014 DMN self-reflection chains tasks autonomously"],
31352
- ["/bless stop", "End blessed mode + DMN"],
31353
- ["/telegram --key <token>", "Save Telegram bot token (persisted to settings)"],
31354
- ["/telegram --admin <userid>", "Set admin user filter (only this user can interact)"],
31355
- ["/telegram", "Toggle Telegram bridge on/off (uses saved key)"],
31356
- ["/telegram status", "Show Telegram bridge status"],
31357
- ["/telegram stop", "Disconnect Telegram bridge"],
31358
- ["/cohere", "Toggle COHERE cognitive commons \u2014 join distributed memory/identity mesh"],
31359
- ["/cohere stats", "Show network stats \u2014 queries in/out, model usage, peer transparency"],
31360
- ["/cohere models", "List downloaded models with COHERE exposure status"],
31361
- ["/cohere allow <model>", "Allow a model for remote COHERE queries"],
31362
- ["/cohere deny <model>", "Hide a model from remote COHERE queries"],
31363
- ["/nexus", "Show nexus P2P network status"],
31364
- ["/nexus connect", "Connect to the agent mesh network"],
31365
- ["/nexus restart", "Kill daemon and reconnect (picks up new version)"],
31366
- ["/nexus restart --clean", "Restart + clear metering data for fresh stats"],
31367
- ["/nexus disconnect", "Kill daemon without reconnecting"],
31368
- ["/nexus wallet", "Show wallet address and x402 payment status"],
31369
- ["/expose <backend>", "Expose local inference via libp2p (default)"],
31370
- ["/expose <backend> --tunnel", "Expose via cloudflared tunnel"],
31371
- ["/expose passthrough", "Forward configured /endpoint through libp2p P2P"],
31372
- ["/expose forward --loadbalance", "Passthrough with distributed rate-limit budget"],
31373
- ["/expose config", "Interactive expose configuration menu"],
31374
- ["/expose status", "Show gateway stats (requests, models, budget)"],
31375
- ["/expose stop", "Stop all expose gateways"],
31376
- ["/expose stop --tunnel", "Stop tunnel gateway only"],
31377
- ["/expose stop --libp2p", "Stop libp2p gateway only"],
31378
- ["/p2p start", "Join the P2P agent mesh network"],
31379
- ["/p2p status", "Show mesh peers and rooms"],
31380
- ["/p2p stop", "Leave the mesh network"],
31381
- ["/style", "Show current response style"],
31382
- ["/style <preset>", "Set style: concise, balanced, verbose, pedagogical"],
31383
- ["/commands auto", "Allow agent to invoke slash commands as tools"],
31384
- ["/commands manual", "Slash commands are user-only (default)"],
31385
- ["/verbose", "Toggle verbose mode"],
31386
- ["/clear", "Clear the screen"],
31387
- ["/help", "Show this help"],
31388
- ["/quit", "Exit open-agents"]
31389
- ];
31390
31297
  process.stdout.write(`
31391
31298
  ${c2.bold("Available commands:")}
31392
31299
 
31393
31300
  `);
31394
- for (const [cmd, desc] of commands) {
31301
+ for (const [cmd, desc] of SLASH_COMMANDS) {
31395
31302
  process.stdout.write(` ${c2.cyan(cmd.padEnd(30))} ${c2.dim(desc)}
31396
31303
  `);
31397
31304
  }
31398
- process.stdout.write(`
31399
- ${c2.bold("Project-local overrides:")}
31400
-
31401
- `);
31402
- process.stdout.write(` ${c2.dim("Append")} ${c2.yellow("--local")} ${c2.dim("to save settings to .oa/settings.json (this project only).")}
31403
- `);
31404
- process.stdout.write(` ${c2.dim("Example:")} ${c2.cyan("/model qwen3:32b --local")} ${c2.dim("/endpoint http://remote:8000/v1 --local")}
31405
- `);
31406
- process.stdout.write(`
31407
- ${c2.bold("Mid-task steering:")}
31408
-
31409
- `);
31410
- process.stdout.write(` ${c2.dim("While the agent is working (")}${c2.cyan("+")}${c2.dim(" prompt), type to add context.")}
31411
- `);
31412
- process.stdout.write(` ${c2.dim("Your input is injected into the agent's next turn.")}
31413
- `);
31414
- process.stdout.write(` ${c2.dim("Press Ctrl+C to abort the current task.")}
31415
- `);
31416
31305
  process.stdout.write("\n");
31417
31306
  }
31418
31307
  function renderModelSwitch(oldModel, newModel) {
@@ -31509,7 +31398,7 @@ function formatDuration2(ms) {
31509
31398
  const secs = Math.floor(totalSecs % 60);
31510
31399
  return `${mins}m ${secs}s`;
31511
31400
  }
31512
- var isTTY2, c2, pastel, _emojisEnabled, _colorsEnabled, MD, TOOL_ICONS, TOOL_LABELS, TOOL_COLORS, _contentWriteHook;
31401
+ var isTTY2, c2, pastel, _emojisEnabled, _colorsEnabled, MD, TOOL_ICONS, TOOL_LABELS, TOOL_COLORS, _contentWriteHook, SLASH_COMMANDS;
31513
31402
  var init_render = __esm({
31514
31403
  "packages/cli/dist/tui/render.js"() {
31515
31404
  "use strict";
@@ -31667,6 +31556,99 @@ var init_render = __esm({
31667
31556
  ask_user: pastel.sky
31668
31557
  };
31669
31558
  _contentWriteHook = null;
31559
+ SLASH_COMMANDS = [
31560
+ ["/model", "Select from available models"],
31561
+ ["/model <name>", "Switch to a specific model"],
31562
+ ["/models", "List all available models"],
31563
+ ["/endpoint", "Show current endpoint"],
31564
+ ["/endpoint <url>", "Set backend URL (auto-detects type)"],
31565
+ ["/endpoint <url> --auth <t>", "Set endpoint with Bearer auth"],
31566
+ ["/config", "Show current configuration"],
31567
+ ["/parallel", "Show current Ollama parallel inference slots"],
31568
+ ["/parallel <1-15>", "Set parallel slots (restarts Ollama, max 15)"],
31569
+ ["/update", "Check for updates and auto-install"],
31570
+ ["/update auto", "Enable auto-update after task completion (default)"],
31571
+ ["/update manual", "Disable auto-update (only update on /update)"],
31572
+ ["/voice", "Toggle TTS voice feedback"],
31573
+ ["/voice <model>", "Set voice: glados, overwatch, kokoro, luxtts"],
31574
+ ["/voice clone <file>", "Set voice clone reference audio (wav/mp3/ogg/flac)"],
31575
+ ["/voice clone glados", "Generate clone ref from GLaDOS for LuxTTS"],
31576
+ ["/voice clone overwatch", "Generate clone ref from Overwatch for LuxTTS"],
31577
+ ["/think", "Toggle thinking/reasoning mode (Qwen3, DeepSeek-R1, etc.)"],
31578
+ ["/stream", "Toggle real-time token streaming (pastel syntax highlighting)"],
31579
+ ["/neovim", "Toggle embedded Neovim editor (Ctrl+N to switch focus)"],
31580
+ ["/neovim <file>", "Open file in embedded Neovim editor"],
31581
+ ["/dream", "Start dream mode \u2014 creative idle exploration (writes to .oa/dreams/)"],
31582
+ ["/dream deep", "Deep dream \u2014 multi-cycle exploration with sleep architecture"],
31583
+ ["/dream lucid", "Lucid dream \u2014 implements proposals, tests, evaluates in cycles"],
31584
+ ["/dream stop", "Wake up \u2014 stop dreaming"],
31585
+ ["/listen", "Toggle live microphone transcription (Whisper)"],
31586
+ ["/listen <model>", "Set model: tiny, base, small, medium, large"],
31587
+ ["/listen manual", "Manual mode \u2014 press Enter to submit (turns off auto)"],
31588
+ ["/listen auto", "Auto-submit after 3s silence (blinking \u25CF indicator)"],
31589
+ ["/listen stop", "Stop listening"],
31590
+ ["/call", "Start voice call session (cloudflared tunnel + ASR/TTS)"],
31591
+ ["/hangup", "End active call session"],
31592
+ ["/cost", "Show session token cost breakdown"],
31593
+ ["/evaluate", "Evaluate last completed task (LLM quality scoring)"],
31594
+ ["/score", "Show inference capability scorecard (memory, compute, speed, models)"],
31595
+ ["/task-type", "Set task type (code, document, analysis, plan, general, auto)"],
31596
+ ["/stats", "Show session dashboard (metrics, tool usage, task history)"],
31597
+ ["/pause", "Pause after current turn finishes (gentle halt, /resume to continue)"],
31598
+ ["/stop", "Kill current inference immediately and save state (/resume to continue)"],
31599
+ ["/resume", "Resume a paused or stopped task"],
31600
+ ["/destroy", "Remove .oa folder, kill all tasks, clear console, and exit"],
31601
+ ["/context save", "Force-save session context to .oa/context/"],
31602
+ ["/context restore", "Restore context from previous sessions into next task"],
31603
+ ["/context show", "Show saved session context status"],
31604
+ ["/compact", "Force context compaction now (default strategy)"],
31605
+ ["/compact <strategy>", "Compact with strategy: aggressive, decisions, errors, summary, structured"],
31606
+ ["/bruteforce", "Toggle brute-force mode (auto re-engage on turn limit)"],
31607
+ ["/deep", "Toggle deep context \u2014 relaxes compaction so large models use 85% of context"],
31608
+ ["/flow", "Toggle FlowState protocol \u2014 immediate action, tight loops, goal clarity"],
31609
+ ["/tools", "List agent-created custom tools"],
31610
+ ["/skills", "List available AIWG skills"],
31611
+ ["/skills <keyword>", "Filter skills by name or trigger"],
31612
+ ["/<skill-name> [args]", "Invoke an AIWG skill directly"],
31613
+ ["/full-send-bless", "Infinite warm loop \u2014 DMN self-reflection chains tasks autonomously"],
31614
+ ["/bless stop", "End blessed mode + DMN"],
31615
+ ["/telegram --key <token>", "Save Telegram bot token (persisted to settings)"],
31616
+ ["/telegram --admin <userid>", "Set admin user filter (only this user can interact)"],
31617
+ ["/telegram", "Toggle Telegram bridge on/off (uses saved key)"],
31618
+ ["/telegram status", "Show Telegram bridge status"],
31619
+ ["/telegram stop", "Disconnect Telegram bridge"],
31620
+ ["/cohere", "Toggle COHERE cognitive commons \u2014 join distributed memory/identity mesh"],
31621
+ ["/cohere stats", "Show network stats \u2014 queries in/out, model usage, peer transparency"],
31622
+ ["/cohere models", "List downloaded models with COHERE exposure status"],
31623
+ ["/cohere allow <model>", "Allow a model for remote COHERE queries"],
31624
+ ["/cohere deny <model>", "Hide a model from remote COHERE queries"],
31625
+ ["/nexus", "Show nexus P2P network status"],
31626
+ ["/nexus connect", "Connect to the agent mesh network"],
31627
+ ["/nexus restart", "Kill daemon and reconnect (picks up new version)"],
31628
+ ["/nexus restart --clean", "Restart + clear metering data for fresh stats"],
31629
+ ["/nexus disconnect", "Kill daemon without reconnecting"],
31630
+ ["/nexus wallet", "Show wallet address and x402 payment status"],
31631
+ ["/expose <backend>", "Expose local inference via libp2p (default)"],
31632
+ ["/expose <backend> --tunnel", "Expose via cloudflared tunnel"],
31633
+ ["/expose passthrough", "Forward configured /endpoint through libp2p P2P"],
31634
+ ["/expose forward --loadbalance", "Passthrough with distributed rate-limit budget"],
31635
+ ["/expose config", "Interactive expose configuration menu"],
31636
+ ["/expose status", "Show gateway stats (requests, models, budget)"],
31637
+ ["/expose stop", "Stop all expose gateways"],
31638
+ ["/expose stop --tunnel", "Stop tunnel gateway only"],
31639
+ ["/expose stop --libp2p", "Stop libp2p gateway only"],
31640
+ ["/p2p start", "Join the P2P agent mesh network"],
31641
+ ["/p2p status", "Show mesh peers and rooms"],
31642
+ ["/p2p stop", "Leave the mesh network"],
31643
+ ["/style", "Show current response style"],
31644
+ ["/style <preset>", "Set style: concise, balanced, verbose, pedagogical"],
31645
+ ["/commands auto", "Allow agent to invoke slash commands as tools"],
31646
+ ["/commands manual", "Slash commands are user-only (default)"],
31647
+ ["/verbose", "Toggle verbose mode"],
31648
+ ["/clear", "Clear the screen"],
31649
+ ["/help", "Show this help"],
31650
+ ["/quit", "Exit open-agents"]
31651
+ ];
31670
31652
  }
31671
31653
  });
31672
31654
 
@@ -42072,7 +42054,7 @@ async function handleSlashCommand(input, ctx) {
42072
42054
  case "help":
42073
42055
  case "h":
42074
42056
  case "?":
42075
- renderSlashHelp();
42057
+ await showHelpMenu(ctx);
42076
42058
  return "handled";
42077
42059
  case "quit":
42078
42060
  case "exit":
@@ -44227,6 +44209,66 @@ async function handleExposeConfig(ctx) {
44227
44209
  }
44228
44210
  }
44229
44211
  }
44212
+ async function showHelpMenu(ctx) {
44213
+ const groups = /* @__PURE__ */ new Map();
44214
+ for (const [cmd, desc] of SLASH_COMMANDS) {
44215
+ const base = cmd.split(" ")[0].replace(/^\//, "");
44216
+ if (!groups.has(base))
44217
+ groups.set(base, []);
44218
+ groups.get(base).push([cmd, desc]);
44219
+ }
44220
+ const items = [];
44221
+ const skipKeys = [];
44222
+ for (const [base, cmds] of groups) {
44223
+ if (cmds.length > 1) {
44224
+ const hdrKey = `hdr:${base}`;
44225
+ items.push({ key: hdrKey, label: selectColors.dim(`\u2500\u2500\u2500 ${base} \u2500\u2500\u2500`) });
44226
+ skipKeys.push(hdrKey);
44227
+ }
44228
+ for (const [cmd, desc] of cmds) {
44229
+ items.push({ key: cmd, label: cmd, detail: desc });
44230
+ }
44231
+ }
44232
+ const result = await tuiSelect({
44233
+ items,
44234
+ title: "Commands",
44235
+ rl: ctx.rl,
44236
+ skipKeys,
44237
+ availableRows: ctx.availableContentRows?.(),
44238
+ customKeyHint: " Enter to use"
44239
+ });
44240
+ if (!result.confirmed || !result.key)
44241
+ return;
44242
+ const selectedCmd = result.key;
44243
+ const related = SLASH_COMMANDS.filter(([cmd]) => cmd.startsWith(selectedCmd.split(" ")[0]));
44244
+ const detailItems = [
44245
+ { key: "hdr", label: selectColors.dim(`\u2500\u2500\u2500 ${selectedCmd} \u2500\u2500\u2500`) },
44246
+ { key: "use", label: "Use this command", detail: "Load into input area" },
44247
+ { key: "hdr2", label: selectColors.dim("\u2500\u2500\u2500 Description \u2500\u2500\u2500") },
44248
+ ...related.map(([cmd, desc]) => ({
44249
+ key: `info:${cmd}`,
44250
+ label: cmd,
44251
+ detail: desc
44252
+ }))
44253
+ ];
44254
+ const detailResult = await tuiSelect({
44255
+ items: detailItems,
44256
+ title: selectedCmd,
44257
+ breadcrumbs: ["Help"],
44258
+ rl: ctx.rl,
44259
+ skipKeys: ["hdr", "hdr2", ...related.map(([cmd]) => `info:${cmd}`)],
44260
+ availableRows: ctx.availableContentRows?.()
44261
+ });
44262
+ if (detailResult.confirmed && detailResult.key === "use") {
44263
+ const baseCmd = selectedCmd.replace(/<[^>]+>/g, "").replace(/\s+$/, "");
44264
+ if (ctx.rl) {
44265
+ const rlAny = ctx.rl;
44266
+ rlAny.line = baseCmd + " ";
44267
+ rlAny.cursor = baseCmd.length + 1;
44268
+ ctx.showPrompt?.();
44269
+ }
44270
+ }
44271
+ }
44230
44272
  async function showCohereDashboard(ctx) {
44231
44273
  const isActive = ctx.isCohere?.() ?? false;
44232
44274
  let stats = { queriesAnswered: 0, queriesSent: 0, insightsShared: 0, peersConnected: 0 };
@@ -44303,32 +44345,132 @@ async function showCohereDashboard(ctx) {
44303
44345
  continue;
44304
44346
  }
44305
44347
  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 {
44348
+ const statItems = [
44349
+ { key: "hdr", label: selectColors.dim("\u2500\u2500\u2500 Network Activity \u2500\u2500\u2500") },
44350
+ { key: "answered", label: `Queries answered: ${c2.bold(String(stats.queriesAnswered || 0))}` },
44351
+ { key: "sent", label: `Queries sent: ${c2.bold(String(stats.queriesSent || 0))}` },
44352
+ { key: "insights", label: `Insights shared: ${c2.bold(String(stats.insightsShared || 0))}` },
44353
+ { key: "peers", label: `Peers connected: ${c2.bold(String(stats.peersConnected || 0))}` },
44354
+ { key: "hdr2", label: selectColors.dim("\u2500\u2500\u2500 Actions \u2500\u2500\u2500") },
44355
+ { key: "refresh", label: "Refresh Stats", detail: "Fetch latest from daemon" }
44356
+ ];
44357
+ const statResult = await tuiSelect({
44358
+ items: statItems,
44359
+ title: "Stats",
44360
+ breadcrumbs: ["COHERE"],
44361
+ rl: ctx.rl,
44362
+ skipKeys: ["hdr", "hdr2", "answered", "sent", "insights", "peers"],
44363
+ availableRows: ctx.availableContentRows?.()
44364
+ });
44365
+ if (statResult.key === "refresh") {
44366
+ try {
44367
+ const { NexusTool: NexusTool2 } = __require("@open-agents/execution");
44368
+ const nexus = new NexusTool2(ctx.repoRoot);
44369
+ const r = await nexus.execute({ action: "cohere_stats" });
44370
+ if (r.success) {
44371
+ try {
44372
+ Object.assign(stats, JSON.parse(r.output));
44373
+ } catch {
44374
+ }
44315
44375
  }
44376
+ } catch {
44316
44377
  }
44317
- } catch {
44318
44378
  }
44319
44379
  continue;
44320
44380
  }
44321
44381
  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 {
44382
+ const idItems = [
44383
+ { key: "hdr", label: selectColors.dim("\u2500\u2500\u2500 Identity Kernel \u2500\u2500\u2500") },
44384
+ { key: "publish", label: "Publish Snapshot", detail: "Publish current identity to IPFS" },
44385
+ { key: "view", label: "View Self-State", detail: "Show current identity kernel" },
44386
+ { key: "history", label: "Version History", detail: "Show identity evolution" }
44387
+ ];
44388
+ const idResult = await tuiSelect({
44389
+ items: idItems,
44390
+ title: "Identity",
44391
+ breadcrumbs: ["COHERE"],
44392
+ rl: ctx.rl,
44393
+ skipKeys: ["hdr"],
44394
+ availableRows: ctx.availableContentRows?.()
44395
+ });
44396
+ if (idResult.confirmed && idResult.key) {
44397
+ try {
44398
+ const { IdentityKernelTool: IdentityKernelTool2 } = __require("@open-agents/execution");
44399
+ const ik = new IdentityKernelTool2(ctx.repoRoot);
44400
+ if (idResult.key === "publish") {
44401
+ await ik.execute({ operation: "publish_snapshot" });
44402
+ } else if (idResult.key === "view") {
44403
+ await ik.execute({ operation: "hydrate" });
44404
+ } else if (idResult.key === "history") {
44405
+ const snapDir = join52(ctx.repoRoot, ".oa", "identity", "snapshots");
44406
+ if (existsSync37(snapDir)) {
44407
+ const snaps = readdirSync10(snapDir).filter((f) => f.endsWith(".json")).sort().reverse();
44408
+ const snapItems = snaps.slice(0, 20).map((f) => ({
44409
+ key: f,
44410
+ label: f.replace(".json", ""),
44411
+ detail: `${formatFileSize(statSync13(join52(snapDir, f)).size)}`
44412
+ }));
44413
+ if (snapItems.length > 0) {
44414
+ await tuiSelect({
44415
+ items: snapItems,
44416
+ title: "Versions",
44417
+ breadcrumbs: ["COHERE", "Identity"],
44418
+ rl: ctx.rl,
44419
+ availableRows: ctx.availableContentRows?.()
44420
+ });
44421
+ }
44422
+ }
44423
+ }
44424
+ } catch {
44425
+ }
44327
44426
  }
44328
44427
  continue;
44329
44428
  }
44330
44429
  case "ipfs": {
44331
- break;
44430
+ const ipfsItems = [
44431
+ { key: "hdr", label: selectColors.dim("\u2500\u2500\u2500 IPFS / Helia \u2500\u2500\u2500") },
44432
+ { key: "status", label: "Storage Status", detail: "Helia blocks, local fallback, sizes" },
44433
+ { key: "cids", label: "Pinned CIDs", detail: "List all pinned content" },
44434
+ { key: "publish", label: "Publish Identity", detail: "Share identity kernel via IPFS" },
44435
+ { key: "peers", label: "Peer Info", detail: "Peer ID + multiaddrs" }
44436
+ ];
44437
+ const ipfsResult = await tuiSelect({
44438
+ items: ipfsItems,
44439
+ title: "IPFS",
44440
+ breadcrumbs: ["COHERE"],
44441
+ rl: ctx.rl,
44442
+ skipKeys: ["hdr"],
44443
+ availableRows: ctx.availableContentRows?.()
44444
+ });
44445
+ if (ipfsResult.confirmed && ipfsResult.key) {
44446
+ if (ipfsResult.key === "cids") {
44447
+ try {
44448
+ const { NexusTool: NexusTool2 } = __require("@open-agents/execution");
44449
+ const nexus = new NexusTool2(ctx.repoRoot);
44450
+ const r = await nexus.execute({ action: "ipfs_ls" });
44451
+ if (r.success) {
44452
+ const data = JSON.parse(r.output);
44453
+ const pins = data.pins || [];
44454
+ if (pins.length > 0) {
44455
+ const cidItems = pins.map((p) => ({
44456
+ key: p.cid,
44457
+ label: p.cid.slice(0, 30) + "...",
44458
+ detail: p.source || "unknown"
44459
+ }));
44460
+ await tuiSelect({
44461
+ items: cidItems,
44462
+ title: "Pinned CIDs",
44463
+ breadcrumbs: ["COHERE", "IPFS"],
44464
+ rl: ctx.rl,
44465
+ availableRows: ctx.availableContentRows?.()
44466
+ });
44467
+ }
44468
+ }
44469
+ } catch {
44470
+ }
44471
+ }
44472
+ }
44473
+ continue;
44332
44474
  }
44333
44475
  default: {
44334
44476
  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.1",
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",