@agenticmail/mcp 0.9.6 → 0.9.8

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 +33 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -22672,6 +22672,7 @@ var TOOL_SETS = {
22672
22672
  /** Mail-server setup / onboarding wizards. */
22673
22673
  setup: [
22674
22674
  "setup_guide",
22675
+ "setup_operator_email",
22675
22676
  "setup_email_relay",
22676
22677
  "setup_email_domain",
22677
22678
  "setup_gmail_alias",
@@ -23137,6 +23138,17 @@ var toolDefinitions = [
23137
23138
  required: ["name"]
23138
23139
  }
23139
23140
  },
23141
+ {
23142
+ name: "setup_operator_email",
23143
+ description: 'Save the operator\'s notification email address for bridge-escalation alerts. When sub-agents mail a host bridge (e.g. `wake: ["codex"]`) AND no fresh host session is available for a headless resume, the dispatcher forwards a digest to this address so the operator gets a phone push (via Gmail / Apple Mail / whichever app handles their address). Master-key scoped. The host agent should call this during bootstrap after asking the operator: "what email should we alert you at when sub-agents need your attention?" \u2014 the answer is typically the operator\'s personal Gmail with mobile push enabled. Idempotent: re-running with a new address updates the config.',
23144
+ inputSchema: {
23145
+ type: "object",
23146
+ properties: {
23147
+ email: { type: "string", description: "Operator notification email (e.g. ope@gmail.com). Pass `null` or an empty string to clear an existing setting." }
23148
+ },
23149
+ required: ["email"]
23150
+ }
23151
+ },
23140
23152
  {
23141
23153
  name: "setup_email_relay",
23142
23154
  description: "Configure Gmail/Outlook relay for sending real internet email (requires master API key). BEGINNER-FRIENDLY: Just needs a Gmail/Outlook email + app password. Agents send as user+agentname@gmail.com. Automatically creates a default agent (secretary) unless skipped. Best for: quick setup, personal use, no domain needed.",
@@ -23985,10 +23997,16 @@ Connected account (${result.relayResults[0].account}): ${result.relayResults.len
23985
23997
  const subject = origSubject.startsWith("Re:") ? origSubject : `Re: ${origSubject}`;
23986
23998
  const refs = Array.isArray(original.references) ? [...original.references] : [];
23987
23999
  if (original.messageId) refs.push(original.messageId);
24000
+ const fmtAddrs = (arr) => (Array.isArray(arr) ? arr : []).map((a) => typeof a === "string" ? a : a?.address ?? "").filter(Boolean).join(", ");
24001
+ const origTo = fmtAddrs(original.to);
24002
+ const origCc = fmtAddrs(original.cc);
24003
+ const headerLines = [`On ${original.date}, ${replyTo} wrote:`];
24004
+ if (origTo) headerLines.push(`To: ${origTo}`);
24005
+ if (origCc) headerLines.push(`Cc: ${origCc}`);
23988
24006
  const quotedBody = (original.text || "").split("\n").map((l) => `> ${l}`).join("\n");
23989
24007
  const fullText = `${args2.text}
23990
24008
 
23991
- On ${original.date}, ${replyTo} wrote:
24009
+ ${headerLines.join("\n")}
23992
24010
  ${quotedBody}`;
23993
24011
  let to = replyTo;
23994
24012
  let cc;
@@ -24269,6 +24287,20 @@ ${r.messages.map((m) => ` UID ${m.uid} (${m.folder})`).join("\n")}`;
24269
24287
  hostTag ? ` Host: ${hostTag} (this account is owned by the ${hostTag} dispatcher)` : ""
24270
24288
  ].filter(Boolean).join("\n");
24271
24289
  }
24290
+ case "setup_operator_email": {
24291
+ const raw = args2.email;
24292
+ const email2 = typeof raw === "string" ? raw.trim() : "";
24293
+ const body = email2 ? { email: email2 } : { email: null };
24294
+ const result = await apiRequest("PATCH", "/system/operator-email", body, true);
24295
+ if (!email2) {
24296
+ return "Operator escalation email cleared. Bridge alerts will still be recorded as system events but no email forward will be sent.";
24297
+ }
24298
+ return [
24299
+ `\u2713 Operator escalation email set to ${result?.email ?? email2}.`,
24300
+ `When sub-agents mail a bridge inbox and no fresh host session is available for a headless resume, the dispatcher will email this address with a digest so you get a phone push.`,
24301
+ `Re-run setup_operator_email with a new address any time to update.`
24302
+ ].join("\n");
24303
+ }
24272
24304
  case "setup_email_relay": {
24273
24305
  const result = await apiRequest("POST", "/gateway/relay", {
24274
24306
  provider: args2.provider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/mcp",
3
- "version": "0.9.6",
3
+ "version": "0.9.8",
4
4
  "mcpName": "io.github.agenticmail/mcp",
5
5
  "description": "MCP server for AgenticMail — give any AI client real email and SMS capabilities",
6
6
  "type": "module",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@modelcontextprotocol/sdk": "^1.12.0",
32
32
  "zod": "^3.24.0",
33
- "@agenticmail/core": "^0.9.5"
33
+ "@agenticmail/core": "^0.9.6"
34
34
  },
35
35
  "devDependencies": {
36
36
  "tsup": "^8.4.0",