@agenticmail/enterprise 0.5.364 → 0.5.366

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.
@@ -13752,7 +13752,7 @@ async function createAllTools(options) {
13752
13752
  var smtpEmailTools = [];
13753
13753
  if (options?.emailConfig?.smtpHost && !tp) {
13754
13754
  try {
13755
- var { executeSmtpEmailTool, getSmtpEmailTools: getSmtpIds } = await import("./smtp-email-UZ53LCJ7.js");
13755
+ var { executeSmtpEmailTool, getSmtpEmailTools: getSmtpIds } = await import("./smtp-email-XPNVA6RW.js");
13756
13756
  var smtpToolIds = getSmtpIds();
13757
13757
  var smtpToolDefs = {
13758
13758
  email_send: { desc: "Send an email via SMTP", params: { type: "object", properties: { to: { type: "string", description: "Recipient email" }, cc: { type: "string" }, bcc: { type: "string" }, subject: { type: "string" }, body: { type: "string", description: "Email body text" }, html: { type: "string" }, replyTo: { type: "string" } }, required: ["to", "body"] } },
@@ -6,7 +6,7 @@ import {
6
6
  MicrosoftEmailProvider,
7
7
  createEmailProvider,
8
8
  detectImapSettings
9
- } from "./chunk-EPMO34YI.js";
9
+ } from "./chunk-Q3MRZOAF.js";
10
10
  import "./chunk-KFQGP6VL.js";
11
11
  export {
12
12
  AgenticMailManager,
@@ -1234,7 +1234,7 @@ async function deploy(config, db, jwtSecret, vaultKey, spinner, chalk) {
1234
1234
  const { deployTarget, company, database, domain, tunnel, cloud } = config;
1235
1235
  if (deployTarget === "cloudflare-tunnel" && tunnel) {
1236
1236
  spinner.start(`Starting local server on port ${tunnel.port}...`);
1237
- const { createServer: createServer2 } = await import("./server-EG3L2NQG.js");
1237
+ const { createServer: createServer2 } = await import("./server-7IR64ZIT.js");
1238
1238
  const server2 = createServer2({ port: tunnel.port, db, jwtSecret });
1239
1239
  const handle2 = await server2.start();
1240
1240
  spinner.succeed("Server running");
@@ -1535,7 +1535,7 @@ async function deploy(config, db, jwtSecret, vaultKey, spinner, chalk) {
1535
1535
  return {};
1536
1536
  }
1537
1537
  spinner.start("Starting local server...");
1538
- const { createServer } = await import("./server-EG3L2NQG.js");
1538
+ const { createServer } = await import("./server-7IR64ZIT.js");
1539
1539
  const server = createServer({ port: 3e3, db, jwtSecret });
1540
1540
  const handle = await server.start();
1541
1541
  spinner.succeed("Server running");
@@ -613,7 +613,12 @@ var ImapEmailProvider = class {
613
613
  user: imapIdentity.email,
614
614
  pass: imapIdentity.password || imapIdentity.accessToken
615
615
  },
616
- logger: false
616
+ logger: false,
617
+ socketTimeout: 3e4,
618
+ greetingTimeout: 15e3
619
+ });
620
+ this.imapClient.on("error", (err) => {
621
+ console.warn(`[imap-provider] IMAP error (suppressed): ${err.message}`);
617
622
  });
618
623
  await this.imapClient.connect();
619
624
  } catch (err) {
@@ -2824,6 +2824,17 @@ var TOOL_REGISTRY = {
2824
2824
  google_chat_upload_attachment: "gws_chat",
2825
2825
  google_chat_download_attachment: "gws_chat",
2826
2826
  google_chat_setup_space: "gws_chat",
2827
+ // ── SMTP/IMAP Email (10) ──
2828
+ email_send: "smtp_email",
2829
+ email_reply: "smtp_email",
2830
+ email_forward: "smtp_email",
2831
+ email_search: "smtp_email",
2832
+ email_read: "smtp_email",
2833
+ email_list: "smtp_email",
2834
+ email_folders: "smtp_email",
2835
+ email_move: "smtp_email",
2836
+ email_delete: "smtp_email",
2837
+ email_mark_read: "smtp_email",
2827
2838
  // ── Gmail (15) ──
2828
2839
  gmail_search: "gws_gmail",
2829
2840
  gmail_read: "gws_gmail",
@@ -3303,6 +3314,7 @@ var SET_DESCRIPTIONS = {
3303
3314
  meeting_voice: "In-meeting voice + chat (4 tools)",
3304
3315
  meeting_lifecycle: "Join/schedule/manage meetings (8 tools)",
3305
3316
  gws_chat: "Google Chat messaging (14 tools)",
3317
+ smtp_email: "Email via SMTP/IMAP \u2014 send, read, search, manage (10 tools)",
3306
3318
  gws_gmail: "Gmail read/send/search (15 tools)",
3307
3319
  gws_calendar: "Google Calendar events (6 tools)",
3308
3320
  gws_drive: "Google Drive files (7 tools)",
@@ -3385,7 +3397,7 @@ function createRequestToolsTool(allTools, activeSets, _context) {
3385
3397
  };
3386
3398
  }
3387
3399
  async function createToolsForContext(options, context, opts) {
3388
- const { createAllTools } = await import("./agent-tools-WE35CALJ.js");
3400
+ const { createAllTools } = await import("./agent-tools-XBMJR6DQ.js");
3389
3401
  if (context === "full") {
3390
3402
  return createAllTools(options);
3391
3403
  }
@@ -4691,7 +4691,7 @@ function createServer(config) {
4691
4691
  engineInitialized = true;
4692
4692
  if (config.runtime?.enabled) {
4693
4693
  try {
4694
- const { createAgentRuntime } = await import("./runtime-MQB6MSYG.js");
4694
+ const { createAgentRuntime } = await import("./runtime-5AZEZO75.js");
4695
4695
  const { mountRuntimeApp, setRuntime } = await import("./routes-OKGFOUUP.js");
4696
4696
  let getEmailConfig;
4697
4697
  let onTokenRefresh;
@@ -4960,7 +4960,7 @@ function createServer(config) {
4960
4960
  await setEngineDb(engineDb, config.db);
4961
4961
  if (config.runtime?.enabled) {
4962
4962
  try {
4963
- const { createAgentRuntime } = await import("./runtime-MQB6MSYG.js");
4963
+ const { createAgentRuntime } = await import("./runtime-5AZEZO75.js");
4964
4964
  const { mountRuntimeApp, setRuntime } = await import("./routes-OKGFOUUP.js");
4965
4965
  let getEmailConfig;
4966
4966
  let onTokenRefresh;
@@ -820,7 +820,7 @@ async function runAgent(_args) {
820
820
  }
821
821
  } catch {
822
822
  }
823
- const { createAgentRuntime } = await import("./runtime-MQB6MSYG.js");
823
+ const { createAgentRuntime } = await import("./runtime-5AZEZO75.js");
824
824
  let orgIntMgr = null;
825
825
  try {
826
826
  const { orgIntegrations: oi } = await import("./routes-OKGFOUUP.js");
@@ -1075,7 +1075,7 @@ Priority: ${task.priority}
1075
1075
  Description: ${task.description}
1076
1076
 
1077
1077
  Please complete this task now.`,
1078
- model: task.model || void 0
1078
+ model: task.model || process.env.AGENTICMAIL_MODEL || void 0
1079
1079
  });
1080
1080
  if (session?.id) {
1081
1081
  sessionRouter.register({
@@ -2016,7 +2016,7 @@ ${identity.personality.slice(0, 800)}` : "";
2016
2016
  if (managerEmail && emailConfig) {
2017
2017
  console.log(`[welcome] Sending introduction email to ${managerEmail}...`);
2018
2018
  try {
2019
- const { createEmailProvider } = await import("./agenticmail-ETOYJ3FP.js");
2019
+ const { createEmailProvider } = await import("./agenticmail-L76WQBSU.js");
2020
2020
  const providerType = emailConfig.provider || (emailConfig.oauthProvider === "google" ? "google" : emailConfig.oauthProvider === "microsoft" ? "microsoft" : "imap");
2021
2021
  const emailProvider = createEmailProvider(providerType);
2022
2022
  let currentAccessToken = emailConfig.oauthAccessToken;
@@ -94,7 +94,7 @@ async function runServe(_args) {
94
94
  process.exit(1);
95
95
  }
96
96
  const { createAdapter, smartDbConfig } = await import("./factory-RTZU2K54.js");
97
- const { createServer } = await import("./server-EG3L2NQG.js");
97
+ const { createServer } = await import("./server-7IR64ZIT.js");
98
98
  const db = await createAdapter(smartDbConfig(DATABASE_URL));
99
99
  await db.migrate();
100
100
  const server = createServer({
package/dist/cli.js CHANGED
@@ -57,14 +57,14 @@ Skill Development:
57
57
  break;
58
58
  case "serve":
59
59
  case "start":
60
- import("./cli-serve-XD6GIKKV.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
60
+ import("./cli-serve-YTFZUDRS.js").then((m) => m.runServe(args.slice(1))).catch(fatal);
61
61
  break;
62
62
  case "agent":
63
- import("./cli-agent-34VINSC3.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
63
+ import("./cli-agent-TMZDB7ZQ.js").then((m) => m.runAgent(args.slice(1))).catch(fatal);
64
64
  break;
65
65
  case "setup":
66
66
  default:
67
- import("./setup-OEJQGMPH.js").then((m) => m.runSetupWizard()).catch(fatal);
67
+ import("./setup-R4AAM5PT.js").then((m) => m.runSetupWizard()).catch(fatal);
68
68
  break;
69
69
  }
70
70
  function fatal(err) {
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  GoogleEmailProvider,
4
4
  MicrosoftEmailProvider,
5
5
  createEmailProvider
6
- } from "./chunk-EPMO34YI.js";
6
+ } from "./chunk-Q3MRZOAF.js";
7
7
  import {
8
8
  deployToCloud,
9
9
  generateDockerCompose,
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  provision,
15
15
  runSetupWizard
16
- } from "./chunk-ZMSWJFRX.js";
16
+ } from "./chunk-OKLI672B.js";
17
17
  import {
18
18
  AgentRuntime,
19
19
  EmailChannel,
@@ -28,7 +28,7 @@ import {
28
28
  executeTool,
29
29
  runAgentLoop,
30
30
  toolsToDefinitions
31
- } from "./chunk-GQWPMU5G.js";
31
+ } from "./chunk-ULKGUIVP.js";
32
32
  import {
33
33
  ValidationError,
34
34
  auditLogger,
@@ -42,7 +42,7 @@ import {
42
42
  requireRole,
43
43
  securityHeaders,
44
44
  validate
45
- } from "./chunk-XETBBD3K.js";
45
+ } from "./chunk-Z3OXPQ73.js";
46
46
  import "./chunk-DJBCRQTD.js";
47
47
  import {
48
48
  PROVIDER_REGISTRY,
@@ -14,7 +14,7 @@ import {
14
14
  executeTool,
15
15
  runAgentLoop,
16
16
  toolsToDefinitions
17
- } from "./chunk-GQWPMU5G.js";
17
+ } from "./chunk-ULKGUIVP.js";
18
18
  import {
19
19
  PROVIDER_REGISTRY,
20
20
  listAllProviders,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-XETBBD3K.js";
3
+ } from "./chunk-Z3OXPQ73.js";
4
4
  import "./chunk-DJBCRQTD.js";
5
5
  import "./chunk-UF3ZJMJO.js";
6
6
  import "./chunk-YB5BWHQU.js";
@@ -6,7 +6,7 @@ import {
6
6
  promptRegistration,
7
7
  provision,
8
8
  runSetupWizard
9
- } from "./chunk-ZMSWJFRX.js";
9
+ } from "./chunk-OKLI672B.js";
10
10
  import "./chunk-Z3I6GNTS.js";
11
11
  import "./chunk-KFQGP6VL.js";
12
12
  export {
@@ -38,7 +38,10 @@ function getImapConfig(ctx) {
38
38
  }
39
39
  async function withImap(ctx, fn) {
40
40
  const config = getImapConfig(ctx);
41
- const client = new ImapFlow(config);
41
+ const client = new ImapFlow({ ...config, socketTimeout: 3e4, greetingTimeout: 15e3 });
42
+ client.on("error", (err) => {
43
+ console.warn(`[smtp-email] IMAP error (suppressed): ${err.message}`);
44
+ });
42
45
  try {
43
46
  await client.connect();
44
47
  return await fn(client);
@@ -47,6 +50,10 @@ async function withImap(ctx, fn) {
47
50
  await client.logout();
48
51
  } catch {
49
52
  }
53
+ try {
54
+ client.close();
55
+ } catch {
56
+ }
50
57
  }
51
58
  }
52
59
  function formatAddress(addr) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/enterprise",
3
- "version": "0.5.364",
3
+ "version": "0.5.366",
4
4
  "description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
5
5
  "type": "module",
6
6
  "bin": {