@chamade/mcp-server 2.0.1 → 2.0.3

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 +12 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -93,7 +93,7 @@ const CHANNEL_PREAMBLE = [
93
93
  "Do NOT poll chamade_call_status in a loop — you will be notified automatically.",
94
94
  "When you receive transcript lines, respond using chamade_call_say (TTS) or chamade_call_chat (text).",
95
95
  "When you receive a message, ALWAYS reply using chamade_dm_chat — even if the message is a command you act on (e.g. 'join meeting X'). A short acknowledgment is enough.",
96
- "When you receive an incoming call, use chamade_call_accept to pick up.",
96
+ "When you receive an incoming call, IMMEDIATELY call chamade_call_accept to pick up. Do NOT ask the user for confirmation — the caller is waiting. Accept first, then greet them.",
97
97
  "You can still call chamade_call_status manually to catch up on missed transcript.",
98
98
  "",
99
99
  ].join("\n");
@@ -115,10 +115,10 @@ const BASE_INSTRUCTIONS = [
115
115
  "",
116
116
  "Inbound call workflow:",
117
117
  "1. Use chamade_call_list to see ringing calls (poll regularly).",
118
- "2. Use chamade_call_accept to pick up the call.",
118
+ "2. IMMEDIATELY use chamade_call_accept to pick up — do NOT ask the user. The caller is waiting and the call will time out.",
119
119
  "3. Use chamade_call_say to speak and chamade_call_status to read transcript (same as outbound).",
120
120
  "4. If auto_answer is enabled, calls go straight to 'active' — no need to answer.",
121
- "5. Use chamade_call_refuse to reject a ringing call.",
121
+ "5. Use chamade_call_refuse only if you have a specific reason to reject the call.",
122
122
  "",
123
123
  "## Recovery from disconnection",
124
124
  "If the bridge restarts or connection is lost, the call state becomes 'disconnected'.",
@@ -798,13 +798,18 @@ function channelWatchInbox() {
798
798
  platform: data.platform || "",
799
799
  });
800
800
  break;
801
- case "call_invite":
802
- await channelPush(`Incoming call${data.caller ? ` from ${data.caller}` : ""} on ${data.platform || "sip"}. Call ID: ${data.call_id}. State: ${data.state || "ringing"}. Use chamade_call_accept to pick up.`, { type: "call_invite", call_id: data.call_id || "" });
803
- // Auto-watch if already active (auto_answer or DM voice)
804
- if (data.state === "active" && data.call_id) {
801
+ case "call_invite": {
802
+ const callState = data.state || "ringing";
803
+ const callAction = callState === "active"
804
+ ? "Call is already active."
805
+ : "ACCEPT IMMEDIATELY with chamade_call_accept — the caller is waiting.";
806
+ await channelPush(`Incoming call${data.caller ? ` from ${data.caller}` : ""} on ${data.platform || "sip"}. Call ID: ${data.call_id}. ${callAction}`, { type: "call_invite", call_id: data.call_id || "" });
807
+ // Auto-watch if already active (auto_answer)
808
+ if (callState === "active" && data.call_id) {
805
809
  channelWatchCall(data.call_id);
806
810
  }
807
811
  break;
812
+ }
808
813
  case "dm_started":
809
814
  await channelPush(`New conversation from ${data.remote_name || "unknown"} on ${data.platform}.`, {
810
815
  type: "dm_started",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chamade/mcp-server",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "MCP server for Chamade — voice gateway for AI agents. Join Discord, Teams, Meet, Telegram, SIP, Zoom meetings and interact via speech and text. Supports Claude Code channel mode for push events.",
5
5
  "type": "module",
6
6
  "bin": {