open-agents-ai 0.80.0 → 0.82.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.
package/dist/index.js CHANGED
@@ -11445,7 +11445,7 @@ process.on('SIGINT', () => process.emit('SIGTERM'));
11445
11445
  ];
11446
11446
  NexusTool = class {
11447
11447
  name = "nexus";
11448
- description = "Decentralized agent-to-agent communication via open-agents-nexus v1.3.0. Spawns a background Node.js process with real network sockets for libp2p + NATS P2P mesh. Simple flow: connect \u2192 join room \u2192 send messages. Auto-installs nexus if needed. Also supports direct peer invoke (streaming inference), IPFS content storage, direct messages, peer discovery, x402 micropayments, and inference proofs. Onboarding: curl openagents.nexus/llms.txt for full instructions, /.well-known/agent.json for machine-readable manifest.";
11448
+ description = "Decentralized agent-to-agent communication via open-agents-nexus v1.4.0. Spawns a background Node.js process with real network sockets for libp2p + NATS P2P mesh. Simple flow: connect \u2192 join room \u2192 send messages. Auto-installs/updates nexus if needed. Also supports direct peer invoke (streaming inference), IPFS content storage, direct messages, peer discovery, x402 micropayments, and inference proofs. Onboarding: curl openagents.nexus/llms.txt for full instructions, /.well-known/agent.json for machine-readable manifest.";
11449
11449
  parameters = {
11450
11450
  type: "object",
11451
11451
  properties: {
@@ -11667,18 +11667,50 @@ process.on('SIGINT', () => process.emit('SIGTERM'));
11667
11667
  }
11668
11668
  const nodeModulesDir = resolve26(this.repoRoot, "node_modules");
11669
11669
  let nexusResolved = false;
11670
+ let installedVersion = "";
11670
11671
  try {
11671
11672
  const nexusPkg = join28(nodeModulesDir, "open-agents-nexus", "package.json");
11672
11673
  if (existsSync21(nexusPkg)) {
11673
11674
  nexusResolved = true;
11675
+ try {
11676
+ const pkg = JSON.parse(readFileSync15(nexusPkg, "utf8"));
11677
+ installedVersion = pkg.version || "";
11678
+ } catch {
11679
+ }
11674
11680
  } else {
11675
11681
  const globalDir = execSync21("npm root -g", { encoding: "utf8", timeout: 5e3 }).trim();
11676
- if (existsSync21(join28(globalDir, "open-agents-nexus", "package.json"))) {
11682
+ const globalPkg = join28(globalDir, "open-agents-nexus", "package.json");
11683
+ if (existsSync21(globalPkg)) {
11677
11684
  nexusResolved = true;
11685
+ try {
11686
+ const pkg = JSON.parse(readFileSync15(globalPkg, "utf8"));
11687
+ installedVersion = pkg.version || "";
11688
+ } catch {
11689
+ }
11678
11690
  }
11679
11691
  }
11680
11692
  } catch {
11681
11693
  }
11694
+ if (nexusResolved && installedVersion) {
11695
+ try {
11696
+ const latestRaw = execSync21("npm view open-agents-nexus version 2>/dev/null", {
11697
+ encoding: "utf8",
11698
+ timeout: 8e3
11699
+ }).trim();
11700
+ if (latestRaw && latestRaw !== installedVersion) {
11701
+ try {
11702
+ execSync21(`npm install open-agents-nexus@${latestRaw} --save 2>&1`, {
11703
+ cwd: this.repoRoot,
11704
+ stdio: "pipe",
11705
+ timeout: 6e4
11706
+ });
11707
+ installedVersion = latestRaw;
11708
+ } catch {
11709
+ }
11710
+ }
11711
+ } catch {
11712
+ }
11713
+ }
11682
11714
  if (!nexusResolved) {
11683
11715
  try {
11684
11716
  execSync21("npm install open-agents-nexus@latest 2>&1", {
@@ -24663,11 +24695,14 @@ var init_call_agent = __esm({
24663
24695
  const feed = getActivityFeed();
24664
24696
  const systemPrompt = this.buildSystemPrompt();
24665
24697
  const runnerOpts = {
24666
- maxTurns: this.tier === "admin" ? 15 : 5,
24667
- maxTokens: 4096,
24698
+ maxTurns: this.tier === "admin" ? 8 : 3,
24699
+ // Keep low for fast voice responses
24700
+ maxTokens: 2048,
24701
+ // Short responses for TTS
24668
24702
  temperature: 0.3,
24669
- requestTimeoutMs: 3e4,
24670
- taskTimeoutMs: 12e4,
24703
+ requestTimeoutMs: 2e4,
24704
+ // Fast timeout for voice responsiveness
24705
+ taskTimeoutMs: 6e4,
24671
24706
  modelTier: this.opts.modelTier ?? "large",
24672
24707
  contextWindowSize: this.opts.contextWindowSize,
24673
24708
  personality: this.opts.personality,
@@ -24766,17 +24801,17 @@ var init_call_agent = __esm({
24766
24801
  const historyContext = this.conversationHistory.slice(-10).map((h) => `${h.role === "user" ? "User" : "You"}: ${h.text}`).join("\n");
24767
24802
  const feed = getActivityFeed();
24768
24803
  const activitySummary = feed.getSummary(this.tier === "admin" ? 20 : 10, this.tier === "admin");
24804
+ const wantsAction = /\b(read|open|show|run|execute|check|look at|find|search|grep|edit|write|fix|test|build|deploy|install)\b/i.test(text) && !/\b(how are you|what's up|hello|hi|hey|can you hear|stop|quit|bye)\b/i.test(text);
24769
24805
  const taskPrompt = [
24770
- `The user said (via voice): "${text}"`,
24771
- "",
24772
- "Recent conversation:",
24773
- historyContext,
24806
+ `User said: "${text}"`,
24774
24807
  "",
24775
- "Recent agent activity:",
24776
- activitySummary,
24777
- "",
24778
- "Respond conversationally and concisely. Your response will be spoken aloud via TTS.",
24779
- "Call task_complete with your spoken response as the summary."
24808
+ historyContext ? `Conversation so far:
24809
+ ${historyContext}
24810
+ ` : "",
24811
+ `Background activity:
24812
+ ${activitySummary}
24813
+ `,
24814
+ wantsAction ? "The user is requesting an action. You may use tools, then call task_complete with a brief spoken summary of what you did." : "RESPOND IMMEDIATELY \u2014 call task_complete with your spoken reply. Do NOT use any tools. Just answer conversationally in 1-3 sentences."
24780
24815
  ].join("\n");
24781
24816
  const result = await this.runner.run(taskPrompt, `Working directory: ${this.repoRoot}`);
24782
24817
  if (result.summary) {
@@ -24797,18 +24832,24 @@ var init_call_agent = __esm({
24797
24832
  }
24798
24833
  buildSystemPrompt() {
24799
24834
  const base = [
24800
- "You are a voice assistant for an AI coding agent. Users are speaking to you through a live audio call.",
24801
- "Keep responses SHORT and conversational \u2014 they will be spoken aloud via text-to-speech.",
24802
- "Avoid code blocks, markdown formatting, or long technical explanations in your spoken responses.",
24803
- "If the user asks about what the agent is doing, summarize the recent activity concisely."
24835
+ "You are a voice assistant on a LIVE AUDIO CALL. This is a real-time conversation.",
24836
+ "",
24837
+ "CRITICAL RULES FOR VOICE CALLS:",
24838
+ "1. ALWAYS respond IMMEDIATELY with speech. Do NOT use tools before responding.",
24839
+ "2. Your response goes through text-to-speech \u2014 keep it SHORT (1-3 sentences).",
24840
+ "3. NEVER use code blocks, markdown, or long technical text.",
24841
+ "4. Be conversational and natural, like talking to a colleague.",
24842
+ "5. Call task_complete with your spoken response as the summary.",
24843
+ "6. Only use tools (file_read, grep, shell, etc.) if the user EXPLICITLY asks you to look something up, run a command, or make a change. For normal conversation, NEVER call tools.",
24844
+ "7. If the user asks what's happening, summarize from the activity context below \u2014 do NOT run tools to find out."
24804
24845
  ];
24805
24846
  if (this.opts.emotionContext) {
24806
- base.push("", "Current emotional context:", this.opts.emotionContext);
24847
+ base.push("", "Mood:", this.opts.emotionContext);
24807
24848
  }
24808
24849
  if (this.tier === "admin") {
24809
- base.push("", "This is an ADMIN call \u2014 you have full access to all tools and can execute commands, read/write files, search code, etc.", "You can take actions on behalf of the user just like the main agent.");
24850
+ base.push("", "ADMIN call \u2014 you CAN use tools IF the user explicitly requests an action (e.g. 'read that file', 'run the tests').", "But for general chat, status questions, or greetings \u2014 respond immediately WITHOUT tools.");
24810
24851
  } else {
24811
- base.push("", "This is a PUBLIC call \u2014 you have read-only access. You can read files and search code but cannot modify anything.", "You can answer questions about the project and explain what the agent is working on.", "Be helpful and friendly but do not execute any write operations.");
24852
+ base.push("", "PUBLIC call \u2014 read-only access. Answer questions about the project conversationally.");
24812
24853
  }
24813
24854
  return base.join("\n");
24814
24855
  }
@@ -39452,6 +39493,11 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
39452
39493
  if (voiceSession?.isActive) {
39453
39494
  return voiceSession.tunnelUrl;
39454
39495
  }
39496
+ if (!voiceEngine.enabled || !voiceEngine.ready) {
39497
+ writeContent(() => renderInfo("Auto-enabling voice for call session..."));
39498
+ const voiceMsg = await voiceEngine.toggle();
39499
+ writeContent(() => renderInfo(voiceMsg));
39500
+ }
39455
39501
  if (!adminSessionKey) {
39456
39502
  adminSessionKey = generateSessionKey();
39457
39503
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.80.0",
3
+ "version": "0.82.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",
@@ -70,6 +70,6 @@
70
70
  },
71
71
  "optionalDependencies": {
72
72
  "moondream": "^0.2.0",
73
- "open-agents-nexus": "^1.3.0"
73
+ "open-agents-nexus": "^1.4.0"
74
74
  }
75
75
  }
@@ -26,6 +26,7 @@ If a tool fails, try a different approach. If you're unsure, explore with your t
26
26
  - web_fetch: Fetch a web page and extract text content (for docs, MDN, w3schools.com, etc.)
27
27
  - memory_read: Read from persistent memory (learned patterns, solutions)
28
28
  - memory_write: Store a fact, pattern, or solution in persistent memory for future tasks
29
+ - nexus: P2P agent networking (libp2p + NATS + IPFS). Connect to other agents, join rooms, send messages, discover peers, invoke capabilities, store content, manage wallet. Actions: connect, disconnect, status, join_room, leave_room, send_message, read_messages, discover_peers, list_rooms, send_dm, find_agent, invoke_capability, store_content, retrieve_content, wallet_status, wallet_create, inference_proof.
29
30
  - task_complete: Signal task completion with a summary
30
31
 
31
32
  ## Parallel Execution & Sub-Agents
@@ -184,9 +185,9 @@ If you notice you're performing the SAME multi-step sequence for the 3rd time or
184
185
  - Test the tool mentally before creating — ensure the steps would work in order
185
186
  - Prefer 'project' scope unless the pattern genuinely applies to all projects
186
187
 
187
- ## Nexus P2P Networking (v1.2.1) — Decentralized Agent Communication
188
+ ## Nexus P2P Networking (v1.4.0) — Decentralized Agent Communication
188
189
 
189
- - nexus: Agent-to-agent communication via open-agents-nexus (libp2p + NATS + IPFS).
190
+ You HAVE the nexus tool. It is one of your registered tools. USE IT when asked about connecting, messaging, or networking with other agents.
190
191
 
191
192
  open-agents-nexus is auto-installed on first use. Requires Node >= 22 (Promise.withResolvers).
192
193
 
@@ -17,6 +17,7 @@ NEVER say "I can't do that". ALWAYS attempt the task using your tools. If a tool
17
17
  - web_search: Search the web
18
18
  - web_fetch: Fetch a web page's text
19
19
  - memory_read / memory_write: Persistent memory across sessions
20
+ - nexus: P2P agent networking (connect, join_room, send_message, discover_peers, invoke_capability, wallet, etc.)
20
21
  - task_complete: Signal completion with a summary
21
22
  - background_run / task_status / task_output / task_stop: Background tasks
22
23
  - batch_edit: Multiple edits across files in one call
@@ -1,6 +1,6 @@
1
1
  You are a coding agent. You MUST call tools in EVERY response. NEVER reply with only text.
2
2
 
3
- Tools: file_read, file_write, file_edit, shell, task_complete, find_files, grep_search, web_search, web_fetch
3
+ Tools: file_read, file_write, file_edit, shell, task_complete, find_files, grep_search, web_search, web_fetch, nexus
4
4
 
5
5
  Steps:
6
6
  1. file_read the source files AND test files