@agenticmail/core 0.9.34 → 0.9.35

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.cjs CHANGED
@@ -10607,7 +10607,9 @@ var OPERATOR_QUERY_SUBJECT_TAG = "AgenticMail Operator Query";
10607
10607
  var ASK_OPERATOR_TOOL = {
10608
10608
  type: "function",
10609
10609
  name: "ask_operator",
10610
- description: "Ask your human operator a question when you need information, a decision, or approval that you do not already have. Your operator may take a few minutes to reply. Before you call this, tell the caller you need a moment to check.",
10610
+ description: `Ask your human operator a question when you need information, a decision, or approval that you do not already have. Your operator may take a few minutes to reply. Before you call this, tell the caller you need a moment to check.
10611
+
10612
+ USE THIS \u2014 DO NOT SAY "I DON'T KNOW" \u2014 whenever the other party asks you to verify identity on the operator's behalf: date of birth, account number, last-4 of SSN, mother's maiden name, billing-address ZIP, security-question answer, member ID, policy number, etc. The right move is ALWAYS: "Hold on one moment while I check that," then call ask_operator with the exact question the rep asked, wait for the operator's reply, relay it back. The operator gets the question on Telegram in real time; you stay on the line; the rep stays on hold. Telling the rep "I don't know, I'll have to call back" wastes everyone's time when ask_operator would have closed the loop in 30\u201360 seconds.`,
10611
10613
  parameters: {
10612
10614
  type: "object",
10613
10615
  properties: {
@@ -10804,6 +10806,27 @@ function buildRealtimeToolGuidance(tools) {
10804
10806
  lines.push(
10805
10807
  'ask_operator reaches your human operator and can take a few minutes. Before you call it, tell the caller you need a moment \u2014 e.g. "Let me check on that \u2014 can you hold for a moment?". While you wait, stay on the line and reassure the caller now and then ("still checking on that, thanks for holding"). If your operator does not answer in time, tell the caller you will follow up and call them back \u2014 do not make something up.'
10806
10808
  );
10809
+ lines.push(
10810
+ `# Verification challenges \u2014 DO NOT say "I don't know"`,
10811
+ "Hospitals, banks, insurers, utilities, and government lines routinely ask you to verify the",
10812
+ "operator's identity before they'll act on the call \u2014 DOB, last 4 of SSN, account number,",
10813
+ "address ZIP, mother's maiden name, member ID, policy number, security-question answer, etc.",
10814
+ `You will not have most of these baked in. The CORRECT response is NEVER "I don't know" or`,
10815
+ '"my operator will have to call back." It is:',
10816
+ ' 1. Tell the caller: "Hold on one moment while I check that with my operator."',
10817
+ ` 2. Call ask_operator with the rep's exact question (e.g. "The hospital is asking for your`,
10818
+ ' date of birth to verify the appointment \u2014 what should I tell them?"). Use urgency: "high".',
10819
+ ' 3. Stay on the line. Every ~30s reassure the rep: "Still checking \u2014 thanks for holding."',
10820
+ " 4. When the operator replies (it arrives within a minute or two via Telegram / email),",
10821
+ ' relay the answer to the rep verbatim: "Their date of birth is March 4th, 1990."',
10822
+ " 5. Continue the call.",
10823
+ "The operator chose to delegate this call to YOU specifically so they would NOT have to do it",
10824
+ 'themselves. Bouncing the rep back to "call us another time" defeats the entire point of the',
10825
+ "delegation and embarrasses the operator. Use ask_operator. Always.",
10826
+ "",
10827
+ "If \u2014 and only if \u2014 ask_operator times out without an answer, THEN you tell the rep you'll",
10828
+ "need to follow up and offer schedule_callback for a specific later time."
10829
+ );
10807
10830
  }
10808
10831
  if (names.has("web_search") || names.has("recall_memory") || names.has("get_datetime") || names.has("search_email")) {
10809
10832
  lines.push(
@@ -11043,7 +11066,7 @@ var MAX_PENDING_AUDIO_FRAMES = 200;
11043
11066
  var REALTIME_TOOL_CALL_TIMEOUT_MS = 6 * 6e4;
11044
11067
  var MAX_LOADED_SKILLS = 2;
11045
11068
  var MAX_IN_FLIGHT_TOOL_CALLS = 8;
11046
- var DEFAULT_PERSONA = 'You are an AI agent on a live phone call on behalf of your operator. You are not "just an assistant" and not "a voice assistant" \u2014 you are a single, consistent person whether you are on a call, in email, or on Telegram. Speak naturally and concisely, the way a person would on a real call. Listen carefully, do not talk over the other party, keep each turn short. Never invent facts; if you do not know something, say so or look it up. If asked whether you are an AI, answer honestly without making a production of it.';
11069
+ var DEFAULT_PERSONA = `You are an AI agent on a live phone call on behalf of your operator. You are not "just an assistant" and not "a voice assistant" \u2014 you are a single, consistent person whether you are on a call, in email, or on Telegram. Speak naturally and concisely, the way a person would on a real call. Listen carefully, do not talk over the other party, keep each turn short. Never invent facts; if you do not know something, say so or look it up. If asked whether you are an AI, answer honestly without making a production of it. When the other party asks for verification information about your operator (DOB, account number, last-4 of SSN, billing ZIP, member ID, mother's maiden name, security-question answer, etc.) that you do not have memorised, put the caller on hold ("hold on one moment, let me check that") and use the ask_operator tool to reach the operator on Telegram in real time. Do NOT say "I don't know \u2014 they'll have to call you back." The whole reason the operator delegated this call to you was to avoid having to do it themselves; routing the rep back to them defeats the point.`;
11047
11070
  function buildRealtimeInstructions(opts) {
11048
11071
  const persona = opts.persona?.trim() || DEFAULT_PERSONA;
11049
11072
  const sections = [];
@@ -16211,6 +16234,12 @@ function buildDefaultPersona(agentName) {
16211
16234
  ` Don't start with "Hello! I am an AI assistant\u2026" \u2014 that's a script, not a person.`,
16212
16235
  "- If the other party asks if you're a human or an AI, answer honestly without making a",
16213
16236
  ` production of it: "I'm an AI \u2014 calling on behalf of <operator>. Happy to keep going if you are."`,
16237
+ "- When asked for verification info you don't have (DOB, account number, last-4 of SSN, billing ZIP,",
16238
+ ` member ID, mother's maiden name, security question, etc.) \u2014 DO NOT say "I don't know, they'll`,
16239
+ ' have to call back." Put the rep on hold ("hold on one moment, let me check that") and use the',
16240
+ " ask_operator tool. The operator gets the question on Telegram in real time and replies within a",
16241
+ " minute or two; you relay the answer back. Bouncing the rep defeats the whole point of delegating",
16242
+ " the call to you.",
16214
16243
  "- When you have what you came for, wrap up cleanly and call `end_call`. Saying goodbye is",
16215
16244
  " not the same as hanging up.",
16216
16245
  "",
package/dist/index.js CHANGED
@@ -8938,7 +8938,9 @@ var OPERATOR_QUERY_SUBJECT_TAG = "AgenticMail Operator Query";
8938
8938
  var ASK_OPERATOR_TOOL = {
8939
8939
  type: "function",
8940
8940
  name: "ask_operator",
8941
- description: "Ask your human operator a question when you need information, a decision, or approval that you do not already have. Your operator may take a few minutes to reply. Before you call this, tell the caller you need a moment to check.",
8941
+ description: `Ask your human operator a question when you need information, a decision, or approval that you do not already have. Your operator may take a few minutes to reply. Before you call this, tell the caller you need a moment to check.
8942
+
8943
+ USE THIS \u2014 DO NOT SAY "I DON'T KNOW" \u2014 whenever the other party asks you to verify identity on the operator's behalf: date of birth, account number, last-4 of SSN, mother's maiden name, billing-address ZIP, security-question answer, member ID, policy number, etc. The right move is ALWAYS: "Hold on one moment while I check that," then call ask_operator with the exact question the rep asked, wait for the operator's reply, relay it back. The operator gets the question on Telegram in real time; you stay on the line; the rep stays on hold. Telling the rep "I don't know, I'll have to call back" wastes everyone's time when ask_operator would have closed the loop in 30\u201360 seconds.`,
8942
8944
  parameters: {
8943
8945
  type: "object",
8944
8946
  properties: {
@@ -9135,6 +9137,27 @@ function buildRealtimeToolGuidance(tools) {
9135
9137
  lines.push(
9136
9138
  'ask_operator reaches your human operator and can take a few minutes. Before you call it, tell the caller you need a moment \u2014 e.g. "Let me check on that \u2014 can you hold for a moment?". While you wait, stay on the line and reassure the caller now and then ("still checking on that, thanks for holding"). If your operator does not answer in time, tell the caller you will follow up and call them back \u2014 do not make something up.'
9137
9139
  );
9140
+ lines.push(
9141
+ `# Verification challenges \u2014 DO NOT say "I don't know"`,
9142
+ "Hospitals, banks, insurers, utilities, and government lines routinely ask you to verify the",
9143
+ "operator's identity before they'll act on the call \u2014 DOB, last 4 of SSN, account number,",
9144
+ "address ZIP, mother's maiden name, member ID, policy number, security-question answer, etc.",
9145
+ `You will not have most of these baked in. The CORRECT response is NEVER "I don't know" or`,
9146
+ '"my operator will have to call back." It is:',
9147
+ ' 1. Tell the caller: "Hold on one moment while I check that with my operator."',
9148
+ ` 2. Call ask_operator with the rep's exact question (e.g. "The hospital is asking for your`,
9149
+ ' date of birth to verify the appointment \u2014 what should I tell them?"). Use urgency: "high".',
9150
+ ' 3. Stay on the line. Every ~30s reassure the rep: "Still checking \u2014 thanks for holding."',
9151
+ " 4. When the operator replies (it arrives within a minute or two via Telegram / email),",
9152
+ ' relay the answer to the rep verbatim: "Their date of birth is March 4th, 1990."',
9153
+ " 5. Continue the call.",
9154
+ "The operator chose to delegate this call to YOU specifically so they would NOT have to do it",
9155
+ 'themselves. Bouncing the rep back to "call us another time" defeats the entire point of the',
9156
+ "delegation and embarrasses the operator. Use ask_operator. Always.",
9157
+ "",
9158
+ "If \u2014 and only if \u2014 ask_operator times out without an answer, THEN you tell the rep you'll",
9159
+ "need to follow up and offer schedule_callback for a specific later time."
9160
+ );
9138
9161
  }
9139
9162
  if (names.has("web_search") || names.has("recall_memory") || names.has("get_datetime") || names.has("search_email")) {
9140
9163
  lines.push(
@@ -9374,7 +9397,7 @@ var MAX_PENDING_AUDIO_FRAMES = 200;
9374
9397
  var REALTIME_TOOL_CALL_TIMEOUT_MS = 6 * 6e4;
9375
9398
  var MAX_LOADED_SKILLS = 2;
9376
9399
  var MAX_IN_FLIGHT_TOOL_CALLS = 8;
9377
- var DEFAULT_PERSONA = 'You are an AI agent on a live phone call on behalf of your operator. You are not "just an assistant" and not "a voice assistant" \u2014 you are a single, consistent person whether you are on a call, in email, or on Telegram. Speak naturally and concisely, the way a person would on a real call. Listen carefully, do not talk over the other party, keep each turn short. Never invent facts; if you do not know something, say so or look it up. If asked whether you are an AI, answer honestly without making a production of it.';
9400
+ var DEFAULT_PERSONA = `You are an AI agent on a live phone call on behalf of your operator. You are not "just an assistant" and not "a voice assistant" \u2014 you are a single, consistent person whether you are on a call, in email, or on Telegram. Speak naturally and concisely, the way a person would on a real call. Listen carefully, do not talk over the other party, keep each turn short. Never invent facts; if you do not know something, say so or look it up. If asked whether you are an AI, answer honestly without making a production of it. When the other party asks for verification information about your operator (DOB, account number, last-4 of SSN, billing ZIP, member ID, mother's maiden name, security-question answer, etc.) that you do not have memorised, put the caller on hold ("hold on one moment, let me check that") and use the ask_operator tool to reach the operator on Telegram in real time. Do NOT say "I don't know \u2014 they'll have to call you back." The whole reason the operator delegated this call to you was to avoid having to do it themselves; routing the rep back to them defeats the point.`;
9378
9401
  function buildRealtimeInstructions(opts) {
9379
9402
  const persona = opts.persona?.trim() || DEFAULT_PERSONA;
9380
9403
  const sections = [];
@@ -14558,6 +14581,12 @@ function buildDefaultPersona(agentName) {
14558
14581
  ` Don't start with "Hello! I am an AI assistant\u2026" \u2014 that's a script, not a person.`,
14559
14582
  "- If the other party asks if you're a human or an AI, answer honestly without making a",
14560
14583
  ` production of it: "I'm an AI \u2014 calling on behalf of <operator>. Happy to keep going if you are."`,
14584
+ "- When asked for verification info you don't have (DOB, account number, last-4 of SSN, billing ZIP,",
14585
+ ` member ID, mother's maiden name, security question, etc.) \u2014 DO NOT say "I don't know, they'll`,
14586
+ ' have to call back." Put the rep on hold ("hold on one moment, let me check that") and use the',
14587
+ " ask_operator tool. The operator gets the question on Telegram in real time and replies within a",
14588
+ " minute or two; you relay the answer back. Bouncing the rep defeats the whole point of delegating",
14589
+ " the call to you.",
14561
14590
  "- When you have what you came for, wrap up cleanly and call `end_call`. Saying goodbye is",
14562
14591
  " not the same as hanging up.",
14563
14592
  "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/core",
3
- "version": "0.9.34",
3
+ "version": "0.9.35",
4
4
  "description": "Core SDK for AgenticMail — email, SMS, and phone call-control for AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",